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 /cui/source/tabpages | |
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 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tabstpge.cxx | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8e21658aaef1..51fbd3003259 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -305,7 +305,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const Rect rRenderContext.DrawBitmap(aDrawPos, aDrawSize, *pBitmap); else { - Size aSize = rRenderContext.GetOutputSizePixel(); + Size aSize(GetOutputSizePixel()); rRenderContext.DrawLine(Point(0, 0), Point(aSize.Width(), aSize.Height())); rRenderContext.DrawLine(Point(0, aSize.Height()), Point(aSize.Width(), 0)); } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 7d24012235e3..538fa48836ac 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -800,7 +800,7 @@ VCL_BUILDER_DECL_FACTORY(SvxCropExample) void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { - Size aWinSize(rRenderContext.PixelToLogic(rRenderContext.GetOutputSizePixel())); + Size aWinSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); rRenderContext.SetRasterOp(ROP_OVERPAINT); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index c6413146ce01..e2f83551a9cc 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -148,7 +148,7 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { vcl::Font aDrawFont = rRenderContext.GetFont(); - Size aSzWnd = rRenderContext.GetOutputSizePixel(); + Size aSzWnd(GetOutputSizePixel()); OUString aTmpStr( aPrevStr ); long nLeadSpace = (aSzWnd.Width() - rRenderContext.GetTextWidth(aTmpStr)) / 2; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 57efff58d25a..569a006391fb 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2479,7 +2479,7 @@ VCL_BUILDER_FACTORY_ARGS(SvxNumberingPreview, WB_BORDER) // paint preview of numeration void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) { - Size aSize(rRenderContext.PixelToLogic(rRenderContext.GetOutputSizePixel())); + Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); const Color aBackColor = rStyleSettings.GetFieldColor(); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 87c493b43901..eb0ab81702e0 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -83,7 +83,7 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { // Paint tabulators Point aPoint; - Size aSize = rRenderContext.GetOutputSizePixel(); + Size aSize(GetOutputSizePixel()); aPoint.X() = aSize.Width() / 2; aPoint.Y() = aSize.Height() / 2; Ruler::DrawTab(rRenderContext, rRenderContext.GetSettings().GetStyleSettings().GetFontColor(), aPoint, nTabStyle); |