summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-23 10:29:48 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-06-23 14:30:37 +0000
commit9a809eedf7327f925cd6be56545b8ed300ef28f4 (patch)
tree27127b185096162438a20b490b82f16f217ebe50 /starmath
parentfead68bbf107ca9f2632bdaf1d8407921a0320f2 (diff)
rendercontext: Mass fix of using the wrong size.
In the paints, we must use the size of the Window for the computations, not of the RenderContext - the RenderContext can be much bigger than the Window in the double-buffering case. Fixes for example the list boxes, and many others. Change-Id: I4c7607569f88b2d097587140858d0862e54b5ea6 Reviewed-on: https://gerrit.libreoffice.org/16421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/ElementsDockingWindow.cxx4
-rw-r--r--starmath/source/view.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index d3fcccb2554c..f00cefb38d45 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -262,8 +262,8 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
sal_Int32 nScrollbarWidth = bOldVisibleState ? GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
- sal_Int32 nControlWidth = rRenderContext.GetOutputSizePixel().Width() - nScrollbarWidth;
- sal_Int32 nControlHeight = rRenderContext.GetOutputSizePixel().Height();
+ sal_Int32 nControlWidth = GetOutputSizePixel().Width() - nScrollbarWidth;
+ sal_Int32 nControlHeight = GetOutputSizePixel().Height();
sal_Int32 boxX = maMaxElementDimensions.Width() + 10;
sal_Int32 boxY = maMaxElementDimensions.Height() + 10;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 88703f7b731f..1250d3d6f864 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -741,7 +741,7 @@ SmViewShell * SmCmdBoxWindow::GetView()
void SmCmdBoxWindow::Resize()
{
- Rectangle aRect = Rectangle(Point(0, 0), GetOutputSizePixel());
+ Rectangle aRect(Point(0, 0), GetOutputSizePixel());
aRect.Left() += CMD_BOX_PADDING;
aRect.Top() += CMD_BOX_PADDING_TOP;
aRect.Right() -= CMD_BOX_PADDING;
@@ -757,7 +757,7 @@ void SmCmdBoxWindow::Resize()
void SmCmdBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- Rectangle aRect = Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(Point(0, 0), GetOutputSizePixel());
aRect.Left() += CMD_BOX_PADDING;
aRect.Top() += CMD_BOX_PADDING_TOP;
aRect.Right() -= CMD_BOX_PADDING;