diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-06-23 10:29:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-06-23 10:32:28 +0200 |
commit | 5ca1936975148ae3bdc87edb69f812347f1ecb92 (patch) | |
tree | 408758d75ef07d02ffa9f2781ccb83dd614cf53d /sw/source/uibase | |
parent | 4ec27ad35f00fbf5f5bc903cabe0692dc257f1e2 (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
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/frmdlg/colex.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 5968fbc7dbdc..1021428b903c 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -321,14 +321,14 @@ void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetFillColor(rSettings.GetWindowColor()); rRenderContext.SetLineColor(Color(COL_TRANSPARENT)); - rRenderContext.DrawRect(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel())); + rRenderContext.DrawRect(Rectangle(Point(0, 0), GetOutputSizePixel())); Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor()); rRenderContext.SetLineColor(aPaintColor); vcl::Font aFont(rRenderContext.GetFont()); aFont.SetColor(aPaintColor); rRenderContext.SetFont(aFont); - Size aSize = rRenderContext.GetOutputSizePixel(); + Size aSize(GetOutputSizePixel()); sal_uInt16 nStartRow = 0; if(aVScrollBar->IsVisible()) { diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index de12203c955b..dc41caad0f5a 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -346,7 +346,7 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan if (rFieldColor == aGrayColor) aGrayColor.Invert(); - Size aLogSize(rRenderContext.PixelToLogic(rRenderContext.GetOutputSizePixel())); + Size aLogSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); Rectangle aCompleteRect(Point(0,0), aLogSize); rRenderContext.SetLineColor(rDlgColor); rRenderContext.SetFillColor(rDlgColor); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 026396312c95..5d1ad3befe8d 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -219,7 +219,7 @@ void SwPagePreviewWin::Paint(vcl::RenderContext& rRenderContext, const Rectangl { // This is the size to which I always relate. if (!maPxWinSize.Height() || !maPxWinSize.Width()) - maPxWinSize = rRenderContext.GetOutputSizePixel(); + maPxWinSize = GetOutputSizePixel(); Rectangle aRect(rRenderContext.LogicToPixel(rRect)); mpPgPreviewLayout->Prepare(1, Point(0,0), maPxWinSize, |