summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-23 10:29:48 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:51:38 +0200
commitd6615bd592bdfe2095aca77e4d38b2cd6fdd1b0b (patch)
tree08f84f3e6daaf33626c34989bd06caea376377d2
parentd672048a4b622ef6f19f6ed02e512dfe3b99cdd3 (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>
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--cui/source/dialogs/about.cxx2
-rw-r--r--cui/source/dialogs/colorpicker.cxx2
-rw-r--r--cui/source/dialogs/cuicharmap.cxx4
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx2
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/grfpage.cxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx2
-rw-r--r--cui/source/tabpages/tabstpge.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/splash/splash.cxx2
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--sfx2/source/dialog/dockwin.cxx3
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx4
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svtools/source/brwbox/brwbox2.cxx7
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/control/calendar.cxx2
-rw-r--r--svtools/source/control/roadmap.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx6
-rw-r--r--svtools/source/control/toolbarmenu.cxx6
-rw-r--r--svtools/source/control/valueset.cxx8
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx2
-rw-r--r--svx/source/dialog/charmap.cxx4
-rw-r--r--svx/source/dialog/dlgctrl.cxx8
-rw-r--r--svx/source/dialog/paraprev.cxx2
-rw-r--r--svx/source/dialog/swframeexample.cxx2
-rw-r--r--svx/source/tbxctrls/layctrl.cxx2
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx8
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx4
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--vcl/source/control/edit.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx8
-rw-r--r--vcl/source/control/prgsbar.cxx2
-rw-r--r--vcl/source/control/scrbar.cxx2
-rw-r--r--vcl/source/control/slider.cxx2
-rw-r--r--vcl/source/window/dockingarea.cxx3
-rw-r--r--vcl/source/window/dockmgr.cxx2
-rw-r--r--vcl/source/window/menubarwindow.cxx14
-rw-r--r--vcl/source/window/menufloatingwindow.cxx8
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx13
58 files changed, 104 insertions, 103 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 459449a5ed5f..830cb2ccae25 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -124,7 +124,7 @@ void lcl_DrawIDEWindowFrame(DockingWindow* pWin, vcl::RenderContext& rRenderCont
if (pWin->IsFloatingMode())
return;
- Size aSz = rRenderContext.GetOutputSizePixel();
+ Size aSz(pWin->GetOutputSizePixel());
const Color aOldLineColor(rRenderContext.GetLineColor());
rRenderContext.SetLineColor(Color(COL_WHITE));
// White line on top
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 7d2affb5d5b3..630dd30e9725 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -227,7 +227,7 @@ void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
{
rRenderContext.SetClipRegion(vcl::Region(rRect));
- Size aSize(rRenderContext.GetOutputSizePixel());
+ Size aSize(GetOutputSizePixel());
Point aPos(aSize.Width() - aBackgroundBitmap.GetSizePixel().Width(),
aSize.Height() - aBackgroundBitmap.GetSizePixel().Height());
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 755c4aa66c9e..0eb56724958c 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -927,7 +927,7 @@ void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const Rectang
if (!mpBitmap)
UpdateBitmap();
- const Size aSize(rRenderContext.GetOutputSizePixel());
+ const Size aSize(GetOutputSizePixel());
Bitmap aOutputBitmap(*mpBitmap);
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 89f63ef853c0..161301e64399 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -193,10 +193,10 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
rRenderContext.SetTextColor(aWindowTextColor);
const OUString aText = GetText();
- const Size aSize = rRenderContext.GetOutputSizePixel();
+ const Size aSize(GetOutputSizePixel());
long nAvailWidth = aSize.Width();
- long nWinHeight = rRenderContext.GetOutputSizePixel().Height();
+ long nWinHeight = GetOutputSizePixel().Height();
bool bGotBoundary = true;
bool bShrankFont = false;
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 59e8fd2ccb37..89794f778709 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -57,7 +57,7 @@ void GraphicPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Recta
{
Control::Paint(rRenderContext, rRect);
- const Size aOutputSize(rRenderContext.GetOutputSizePixel());
+ const Size aOutputSize(GetOutputSizePixel());
if (maPreview.IsAnimated())
{
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 2e7e2b4e9baf..dde5853986f6 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -331,7 +331,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 54bcb270b116..197ca95d3dfa 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 4d721afaffa0..33366446ab31 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);
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 3989e2d8ae3a..f98de990f11b 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -758,7 +758,7 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
RecalcAll();
Point aStart( 0, -m_nTopIndex );
- Size aSize(rRenderContext.GetOutputSizePixel());
+ Size aSize(GetOutputSizePixel());
if ( m_bHasScrollBar )
aSize.Width() -= m_pScrollBar->GetSizePixel().Width();
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index d0378ad58454..48d2933d5e94 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -669,7 +669,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
_vdev->SetTextColor(pSpl->_cProgressTextColor);
_vdev->DrawText(Point(pSpl->_tlx, pSpl->_textBaseline), pSpl->_sProgressText);
}
- rRenderContext.DrawOutDev(Point(), rRenderContext.GetOutputSizePixel(), Point(), _vdev->GetOutputSizePixel(), *_vdev.get());
+ rRenderContext.DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev->GetOutputSizePixel(), *_vdev.get());
}
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index cba5aae711e3..38326e1c943a 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -106,7 +106,7 @@ sal_Int32 OStartMarker::getMinHeight() const
void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
long nSize = aSize.Width();
const long nCornerWidth = long(CORNER_SPACE * double(GetMapMode().GetScaleX()));
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index e6ceac18e7f2..c46d935c0129 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -271,7 +271,7 @@ void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR
rRenderContext.SetFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor());
rRenderContext.SetTextFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor());
- Size aOut = rRenderContext.GetOutputSizePixel();
+ Size aOut(GetOutputSizePixel());
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
aStartWidth *= rRenderContext.GetMapMode().GetScaleX();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d0415df1326a..9d35bffd9785 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1518,7 +1518,7 @@ void ScTextWnd::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
{
if (pEditView)
{
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
long nDiff = aSize.Height() - rRenderContext.LogicToPixel(Size(0, rRenderContext.GetTextHeight())).Height();
pEditView->SetOutputArea(rRenderContext.PixelToLogic(Rectangle(Point(0, (nDiff > 0) ? nDiff / 2 : 1), aSize)));
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 98ba5335957c..bbbed3332cb8 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -245,7 +245,7 @@ void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Recta
Color aBackColor = rStyle.GetMenuColor();
Color aBorderColor = rStyle.GetShadowColor();
- Rectangle aCtrlRect(Point(0, 0), rRenderContext.GetOutputSizePixel());
+ Rectangle aCtrlRect(Point(0, 0), GetOutputSizePixel());
// Window background
bool bNativeDrawn = true;
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 17cc747984a9..74898e336a69 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -398,7 +398,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangl
if (mpImpl->mbOmitPaint)
return;
- Size aSliderWindowSize = rRenderContext.GetOutputSizePixel();
+ Size aSliderWindowSize(GetOutputSizePixel());
Rectangle aRect(Point(0, 0), aSliderWindowSize);
ScopedVclPtrInstance< VirtualDevice > pVDev(rRenderContext);
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index ad23cc893ad4..b5d308be1aab 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -83,11 +83,10 @@ void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
SetBackground(rStyleSettings.GetFaceColor());
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
long nPosX = aSize.Width() - 1;
long nPosY = aSize.Height() - 1;
-
Window::Paint(rRenderContext, rRect);
bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 90735cd40a6f..bda406e72078 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -377,7 +377,7 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvTree
void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/)
{
- Size aSize(rRenderContext.GetOutputSizePixel().Width(), static_cast<SvTreeListBox*>(&rDev)->GetEntryHeight());
+ Size aSize(rDev.GetOutputSizePixel().Width(), rDev.GetEntryHeight());
Point aPos(0, rPos.Y());
@@ -943,7 +943,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan
rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor());
::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MAP_APPFONT));
- Rectangle aRect(Point(0,0), rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(Point(0,0), GetOutputSizePixel());
aRect.Left() += aOffset.X();
aRect.Top() += aOffset.Y();
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index 06ac9c383441..028501a8b33a 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -493,7 +493,7 @@ void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPa
RecalcAll();
Point aStart(0, -m_nTopIndex);
- Size aSize(rRenderContext.GetOutputSizePixel());
+ Size aSize(GetOutputSizePixel());
if (m_bHasScrollBar)
aSize.Width() -= m_aScrollBar->GetSizePixel().Width();
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 22d4e803b407..b09bf8fe9e99 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -396,20 +396,20 @@ void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
Resize();
Wallpaper aBack(svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
- vcl::Region aClip(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel()));
+ vcl::Region aClip(Rectangle(Point(0, 0), GetOutputSizePixel()));
aClip.Exclude(maStartCentButtons);
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aClip);
- rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel()), aBack);
+ rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), GetOutputSizePixel()), aBack);
rRenderContext.Pop();
ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext);
pVDev->EnableRTL(rRenderContext.IsRTLEnabled());
pVDev->SetOutputSizePixel(maStartCentButtons.GetSize());
Point aOffset(Point(0, 0) - maStartCentButtons.TopLeft());
- pVDev->DrawWallpaper(Rectangle(aOffset, rRenderContext.GetOutputSizePixel()), aBack);
+ pVDev->DrawWallpaper(Rectangle(aOffset, GetOutputSizePixel()), aBack);
rRenderContext.DrawOutDev(maStartCentButtons.TopLeft(), maStartCentButtons.GetSize(),
Point(0, 0), maStartCentButtons.GetSize(),
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 6f30d5008270..f376e52761ad 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svl/eitem.hxx>
#include <vcl/decoview.hxx>
@@ -1673,7 +1672,7 @@ void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
if (pImp->bSplitable || IsFloatingMode())
return;
- Rectangle aRect = Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(Point(0, 0), GetOutputSizePixel());
switch (GetAlignment())
{
case SfxChildAlignment::TOP:
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index a80d77d6c1c0..b5e9067ad3ea 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -172,7 +172,7 @@ namespace sfx2
rRenderContext.SetFont(aFont);
// Set border values.
- Size aWindowSize(rRenderContext.GetOutputSizePixel());
+ Size aWindowSize(GetOutputSizePixel());
int nOuterLeft = 0;
int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1;
int nOuterRight = aWindowSize.Width() - 1;
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;
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 1fa03aa9f59d..1ffc334f76db 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -634,12 +634,15 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
if (nTitleLines)
{
if (!bHeaderBar)
+ {
rRenderContext.DrawLine(Point(0, GetTitleHeight() - 1),
- Point(rRenderContext.GetOutputSizePixel().Width(),
- GetTitleHeight() - 1));
+ Point(GetOutputSizePixel().Width(), GetTitleHeight() - 1));
+ }
else if (bHandleCol)
+ {
rRenderContext.DrawLine(Point(0, GetTitleHeight() - 1),
Point(pFirstCol->Width(), GetTitleHeight() - 1));
+ }
}
// Title Bar
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 7c790ff30b27..6b4d02ca2c3e 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -607,7 +607,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec
Color aColor(COL_BLACK);
rRenderContext.SetLineColor( aColor );
Point aOffs(rRenderContext.GetMapMode().GetOrigin());
- Size aXSize(rRenderContext.GetOutputSizePixel());
+ Size aXSize(GetOutputSizePixel());
{
Point aStart(LROFFS_WINBORDER, 0);
Point aEnd(LROFFS_WINBORDER, aXSize.Height());
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index e560bcd67dcc..d0ae9e4daeeb 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -785,7 +785,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint)
ImplFormat();
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Size aOutSize = rRenderContext.GetOutputSizePixel();
+ Size aOutSize(GetOutputSizePixel());
long i;
long j;
long nY;
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index b327ebac5b8a..a934bd29af63 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -569,7 +569,7 @@ void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect
if (!!m_pImpl->getPicture())
{
Size aBitmapSize = m_pImpl->getPicture().GetSizePixel();
- Size aMySize = rRenderContext.GetOutputSizePixel();
+ Size aMySize(GetOutputSizePixel());
Point aBitmapPos(aMySize.Width() - aBitmapSize.Width(), aMySize.Height() - aBitmapSize.Height());
@@ -585,7 +585,7 @@ void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext)
{
Point aTextPos = LogicToPixel(Point(ROADMAP_INDENT_X, 8), MAP_APPFONT);
- Size aOutputSize(rRenderContext.GetOutputSizePixel());
+ Size aOutputSize(GetOutputSizePixel());
// draw it
rRenderContext.DrawText(Rectangle(aTextPos, aOutputSize), GetText(),
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index d84695a53889..aebebd3617b7 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -50,7 +50,7 @@ class TabDrawer
private:
TabBar& mrParent;
vcl::RenderContext& mrRenderContext;
- const StyleSettings& mrStyleSettings;
+ const StyleSettings& mrStyleSettings;
Rectangle maRect;
@@ -82,7 +82,7 @@ public:
// draw extra line if above and below border
if ((nWinStyle & WB_BORDER) || (nWinStyle & WB_TOPBORDER))
{
- Size aOutputSize = mrRenderContext.GetOutputSizePixel();
+ Size aOutputSize(mrParent.GetOutputSizePixel());
Rectangle aOutRect = mrParent.GetPageArea();
// also draw border in 3D for 3D-tabs
@@ -384,7 +384,7 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt )
void ImplTabSizer::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
{
DecorationView aDecoView(&rRenderContext);
- Rectangle aOutputRect(Point(0, 0), rRenderContext.GetOutputSizePixel());
+ Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel());
aDecoView.DrawHandle(aOutputRect, true);
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 79d60caedf8d..115ea353c48e 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -849,7 +849,7 @@ ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const
void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry, bool bHighlight)
{
- Size aSz(rRenderContext.GetOutputSizePixel());
+ Size aSz(GetOutputSizePixel());
long nX = 0;
long nY = 0;
@@ -887,7 +887,7 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi
if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
{
- Size aPxSize(rRenderContext.GetOutputSizePixel());
+ Size aPxSize(GetOutputSizePixel());
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height())));
Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height()));
@@ -1295,7 +1295,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry
int nOuterSpace = 0; // ImplGetSVData()->maNWFData.mnMenuFormatExtraBorder;
Point aTopLeft(nOuterSpace, nOuterSpace), aTmpPos;
- Size aOutSz(rRenderContext.GetOutputSizePixel());
+ Size aOutSz(GetOutputSizePixel());
const int nEntryCount = mpImpl->maEntryVector.size();
int nEntry;
for (nEntry = 0; nEntry < nEntryCount; nEntry++)
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 9f9f47760937..106799670bc2 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -350,7 +350,7 @@ Reference<XAccessible> ValueSet::CreateAccessible()
void ValueSet::Format(vcl::RenderContext& rRenderContext)
{
- Size aWinSize = rRenderContext.GetOutputSizePixel();
+ Size aWinSize(GetOutputSizePixel());
size_t nItemCount = mItemList.size();
WinBits nStyle = GetStyle();
long nTxtHeight = rRenderContext.GetTextHeight();
@@ -694,7 +694,7 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUStri
if (!(GetStyle() & WB_NAMEFIELD))
return;
- Size aWinSize = rRenderContext.GetOutputSizePixel();
+ Size aWinSize(GetOutputSizePixel());
long nTxtWidth = rRenderContext.GetTextWidth(rText);
long nTxtOffset = mnTextOffset;
@@ -977,7 +977,7 @@ void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext)
if (!(GetStyle() & WB_FLATVALUESET))
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Size aWinSize = rRenderContext.GetOutputSizePixel();
+ Size aWinSize(GetOutputSizePixel());
Point aPos1(NAME_LINE_OFF_X, mnTextOffset + NAME_LINE_OFF_Y);
Point aPos2(aWinSize.Width() - (NAME_LINE_OFF_X * 2), mnTextOffset + NAME_LINE_OFF_Y);
if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
@@ -1435,7 +1435,7 @@ void ValueSet::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
long nOffY = maVirDev->GetOutputSizePixel().Height();
- Size aWinSize = rRenderContext.GetOutputSizePixel();
+ Size aWinSize(GetOutputSizePixel());
rRenderContext.DrawRect(Rectangle(Point(0, nOffY ), Point( aWinSize.Width(), aWinSize.Height())));
}
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index 4fc0d97dc559..e94da73ef89f 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -108,7 +108,7 @@ namespace svt
void ToolPanelDrawer::Paint(vcl::RenderContext& rRenderContext)
{
m_pPaintDevice->SetMapMode(rRenderContext.GetMapMode());
- m_pPaintDevice->SetOutputSize(rRenderContext.GetOutputSizePixel());
+ m_pPaintDevice->SetOutputSize(GetOutputSizePixel());
m_pPaintDevice->SetSettings(rRenderContext.GetSettings());
m_pPaintDevice->SetDrawMode(rRenderContext.GetDrawMode());
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index c334d3f577fe..9d0c9a58c960 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -372,7 +372,7 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1,
if (n1 > LastInView() || n2 < FirstInView())
return;
- Size aOutputSize = rRenderContext.GetOutputSizePixel();
+ Size aOutputSize(GetOutputSizePixel());
if (aVscrollSB->IsVisible())
aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width();
@@ -528,7 +528,7 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext)
if (nSelectedIndex >= 0)
getSelectedChar() = mpFontCharMap->GetCharFromIndex(nSelectedIndex);
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
long nSBWidth = aVscrollSB->GetOptimalSize().Width();
aSize.Width() -= nSBWidth;
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 4d6debd44b3d..ecad4ef3a368 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1830,12 +1830,12 @@ void SvxPreviewBase::dispose()
void SvxPreviewBase::LocalPrePaint(vcl::RenderContext& rRenderContext)
{
// init BufferDevice
- if(mpBufferDevice->GetOutputSizePixel() != rRenderContext.GetOutputSizePixel())
+ if (mpBufferDevice->GetOutputSizePixel() != GetOutputSizePixel())
{
mpBufferDevice->SetDrawMode(rRenderContext.GetDrawMode());
mpBufferDevice->SetSettings(rRenderContext.GetSettings());
mpBufferDevice->SetAntialiasing(rRenderContext.GetAntialiasing());
- mpBufferDevice->SetOutputSizePixel(rRenderContext.GetOutputSizePixel());
+ mpBufferDevice->SetOutputSizePixel(GetOutputSizePixel());
mpBufferDevice->SetMapMode(rRenderContext.GetMapMode());
}
@@ -1869,8 +1869,8 @@ void SvxPreviewBase::LocalPostPaint(vcl::RenderContext& rRenderContext)
mpBufferDevice->EnableMapMode(false);
rRenderContext.EnableMapMode(false);
- rRenderContext.DrawOutDev(aEmptyPoint, rRenderContext.GetOutputSizePixel(),
- aEmptyPoint, rRenderContext.GetOutputSizePixel(),
+ rRenderContext.DrawOutDev(aEmptyPoint, GetOutputSizePixel(),
+ aEmptyPoint, GetOutputSizePixel(),
*mpBufferDevice);
mpBufferDevice->EnableMapMode(bWasEnabledSrc);
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index e68f61fa50a0..a8e2b56ce0bb 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -59,7 +59,7 @@ void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext, bool bAll)
{
- Size aWinSize = rRenderContext.GetOutputSizePixel();
+ Size aWinSize(GetOutputSizePixel());
aWinSize = rRenderContext.PixelToLogic(aWinSize);
Size aTmp(1, 1);
aTmp = PixelToLogic(aTmp);
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index f4dfca86001f..ba99ac23460f 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -100,7 +100,7 @@ void SvxSwFrameExample::DataChanged(const DataChangedEvent& rDCEvt)
void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
{
- aPage.SetSize(rRenderContext.GetOutputSizePixel());
+ aPage.SetSize(GetOutputSizePixel());
sal_uIntPtr nOutWPix = aPage.GetWidth();
sal_uIntPtr nOutHPix = aPage.GetHeight();
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 40e195179b64..55c6ebe7fca2 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -640,7 +640,7 @@ void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
long i;
long nLineWidth;
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
for (i = 0; i < nWidth; i++)
{
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index a7f4c1a478ed..d57fc8169dd7 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -353,7 +353,7 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
rRenderContext.SetFillColor(maBackColor);
- Size aOutputSizePixel(rRenderContext.GetOutputSizePixel());
+ Size aOutputSizePixel(GetOutputSizePixel());
rRenderContext.DrawRect(Rectangle(Point(0, 0), aOutputSizePixel));
rRenderContext.SetClipRegion(vcl::Region(Rectangle(Point(BORDER, BORDER),
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index a70f57c0a9fb..2c648ff131aa 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1653,7 +1653,7 @@ void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt )
void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rRect*/)
{
- const Size aSz(rRenderContext.GetOutputSizePixel());
+ const Size aSz(GetOutputSizePixel());
// Page
aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 8e20c6adbd1f..37f6aac760a9 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -77,8 +77,8 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &)
const long nPageH = std::min(rItem.lWidth, rItem.lHeight);
const double f = 0.8 * std::min(
- double(rRenderContext.GetOutputSizePixel().Width()) / double(nPageW),
- double(rRenderContext.GetOutputSizePixel().Height()) / double(nPageH));
+ double(GetOutputSizePixel().Width()) / double(nPageW),
+ double(GetOutputSizePixel().Height()) / double(nPageH));
Color aBack = rSettings.GetWindowColor();
Color aFront = SwViewOption::GetFontColor();
@@ -91,8 +91,8 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &)
// Envelope
const long nW = static_cast<long>(f * nPageW);
const long nH = static_cast<long>(f * nPageH);
- const long nX = (rRenderContext.GetOutputSizePixel().Width () - nW) / 2;
- const long nY = (rRenderContext.GetOutputSizePixel().Height() - nH) / 2;
+ const long nX = (GetOutputSizePixel().Width () - nW) / 2;
+ const long nY = (GetOutputSizePixel().Height() - nH) / 2;
rRenderContext.SetFillColor(aBack);
rRenderContext.DrawRect(Rectangle(Point(nX, nY), Size(nW, nH)));
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 6ed49bc016af..2c7ff9b353cb 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -147,7 +147,7 @@ VCL_BUILDER_FACTORY(SwLabPreview)
void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
- const Size aSz(rRenderContext.GetOutputSizePixel());
+ const Size aSz(GetOutputSizePixel());
const long lOutWPix = aSz.Width ();
const long lOutHPix = aSz.Height();
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 59749f98a7c2..8b790267d7f7 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -920,7 +920,7 @@ VCL_BUILDER_FACTORY(NumberingPreview)
// paint numbering's preview
void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- const Size aSize(rRenderContext.PixelToLogic(rRenderContext.GetOutputSizePixel()));
+ const Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel()));
ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext);
pVDev->SetMapMode(rRenderContext.GetMapMode());
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 6a337a29786e..1d9fd38f7640 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,
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 3c32778be779..7ddad42aaa99 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1062,7 +1062,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
// mirror
Rectangle aBounds(aClipRgn.GetBoundRect());
- int xNew = rRenderContext.GetOutputSizePixel().Width() - aBounds.GetWidth() - aBounds.Left();
+ int xNew = GetOutputSizePixel().Width() - aBounds.GetWidth() - aBounds.Left();
aClipRgn.Move(xNew - aBounds.Left(), 0);
// move offset of border window
@@ -1081,13 +1081,13 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
vcl::Region oldRgn(pBorder->GetClipRegion());
pBorder->SetClipRegion(aClipRgn);
- pBorder->Paint(*pBorder, Rectangle()); // FIXME
+ pBorder->Paint(*pBorder, Rectangle());
pBorder->SetClipRegion(oldRgn);
}
else
{
- pBorder->Paint(*pBorder, Rectangle()); // FIXME
+ pBorder->Paint(*pBorder, Rectangle());
}
}
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index c6c82b2f63ba..98655e6b7c0a 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -1699,7 +1699,7 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
if (!pEntry)
return;
- long nWidth = rRenderContext.GetOutputSizePixel().Width();
+ long nWidth = GetOutputSizePixel().Width();
long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->mnHeight));
@@ -1809,10 +1809,10 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
OUString aStr(mpEntryList->GetEntryText(nPos));
if (!aStr.isEmpty())
{
- long nMaxWidth = std::max(static_cast< long >(mnMaxWidth), rRenderContext.GetOutputSizePixel().Width() - 2 * mnBorder);
+ long nMaxWidth = std::max(static_cast< long >(mnMaxWidth), GetOutputSizePixel().Width() - 2 * mnBorder);
// a multiline entry should only be as wide a the window
if ((pEntry->mnFlags & ListBoxEntryFlags::MultiLine))
- nMaxWidth = rRenderContext.GetOutputSizePixel().Width() - 2 * mnBorder;
+ nMaxWidth = GetOutputSizePixel().Width() - 2 * mnBorder;
Rectangle aTextRect(Point(mnBorder - mnLeft, nY),
Size(nMaxWidth, pEntry->mnHeight));
@@ -2785,7 +2785,7 @@ void ImplWin::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos, bool bLayout)
{
long nBorder = 1;
- Size aOutSz = rRenderContext.GetOutputSizePixel();
+ Size aOutSz(GetOutputSizePixel());
bool bImage = !!maImage;
if (bDrawImage && bImage && !bLayout)
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index b9e8cb932a12..4b2ce1bdd55e 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -123,7 +123,7 @@ void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt1
{
mbCalcNew = false;
- Size aSize = rRenderContext.GetOutputSizePixel();
+ Size aSize(GetOutputSizePixel());
mnPrgsHeight = aSize.Height() - (PROGRESSBAR_WIN_OFFSET * 2);
mnPrgsWidth = (mnPrgsHeight * 2) / 3;
maPos.Y() = PROGRESSBAR_WIN_OFFSET;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 2db7fc1bdcc7..a60595c2ee0d 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -509,7 +509,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
aCtrlRegion.Union(maPage2Rect);
aCtrlRegion.Union(maThumbRect);
- Rectangle aRequestedRegion(Point(0,0), rRenderContext.GetOutputSizePixel());
+ Rectangle aRequestedRegion(Point(0,0), GetOutputSizePixel());
// if the actual native control region is smaller then the region that
// we requested the control to draw in, then draw a background rectangle
// to avoid drawing artifacts in the uncovered region
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 04dcab615233..aed24993e331 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -332,7 +332,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags)
sldValue.mnThumbState |= ControlState::ROLLOVER;
}
- const Rectangle aCtrlRegion(Point(0,0), rRenderContext.GetOutputSizePixel());
+ const Rectangle aCtrlRegion(Point(0,0), GetOutputSizePixel());
bool bNativeOK = rRenderContext.DrawNativeControl(CTRL_SLIDER, nPart, aCtrlRegion, nState, sldValue, OUString());
if (bNativeOK)
return;
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 25519f9bb46f..f60292be9dc0 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -162,7 +162,6 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
-
const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings();
EnableNativeWidget(true); // only required because the toolkit currently switches this flag off
@@ -217,7 +216,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
else
{
// create map to find toolbar lines
- Size aOutSz = rRenderContext.GetOutputSizePixel();
+ Size aOutSz(GetOutputSizePixel());
std::map<int, int> ranges;
sal_uInt16 nChildren = GetChildCount();
for (sal_uInt16 n = 0; n < nChildren; n++)
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 52708dd7e865..bb2186f473b8 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -713,7 +713,7 @@ void ImplPopupFloatWin::DrawGrip(vcl::RenderContext& rRenderContext)
void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
- Rectangle aRect(Point(), rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(Point(), GetOutputSizePixel());
rRenderContext.DrawWallpaper(aRect, Wallpaper(rRenderContext.GetSettings().GetStyleSettings().GetFaceGradientColor()));
DrawBorder(rRenderContext);
if (hasGrip())
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 17a3ff6309ad..9d44a9edaf5f 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -562,7 +562,7 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow )
return 0;
}
-static void ImplAddNWFSeparator( vcl::RenderContext& rRenderContext, const MenubarValue& rMenubarValue )
+static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size& rSize, const MenubarValue& rMenubarValue)
{
// add a separator if
// - we have an adjacent docking area
@@ -575,7 +575,7 @@ static void ImplAddNWFSeparator( vcl::RenderContext& rRenderContext, const Menub
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor());
Point aPt;
- Rectangle aRect(aPt, rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(aPt, rSize);
rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight());
}
}
@@ -612,12 +612,12 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
Erase(rRenderContext);
else
{
- Rectangle aBgRegion(Point(), rRenderContext.GetOutputSizePixel());
+ Rectangle aBgRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_ENTIRE_CONTROL, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
}
- ImplAddNWFSeparator(rRenderContext, aControlValue);
+ ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aControlValue);
// draw selected item
ControlState nState = ControlState::ENABLED;
@@ -652,13 +652,13 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
// use full window size to get proper gradient
// but clip accordingly
Point aPt;
- Rectangle aCtrlRect(aPt, rRenderContext.GetOutputSizePixel());
+ Rectangle aCtrlRect(aPt, GetOutputSizePixel());
rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_ENTIRE_CONTROL,
aCtrlRect, ControlState::ENABLED, aMenubarValue, OUString());
}
- ImplAddNWFSeparator(rRenderContext, aMenubarValue);
+ ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aMenubarValue);
}
else
rRenderContext.Erase(aRect);
@@ -895,7 +895,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
ControlState::ENABLED, aMenubarValue, OUString());
}
- ImplAddNWFSeparator(rRenderContext, aMenubarValue);
+ ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aMenubarValue);
}
rRenderContext.SetFillColor(rStyleSettings.GetMenuColor());
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 8127536039a9..972ec16044f6 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -769,7 +769,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
if (!pMenu)
return;
- Size aSz = rRenderContext.GetOutputSizePixel();
+ Size aSz(GetOutputSizePixel());
long nX = 0;
long nStartY;
@@ -802,7 +802,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
{
- Size aPxSize(rRenderContext.GetOutputSizePixel());
+ Size aPxSize(GetOutputSizePixel());
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height())));
Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height()));
@@ -1146,7 +1146,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
{
rRenderContext.SetClipRegion();
long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
- Size aPxSize(rRenderContext.GetOutputSizePixel());
+ Size aPxSize(GetOutputSizePixel());
aPxSize.Width() -= nX;
ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER);
rRenderContext.DrawNativeControl(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
@@ -1174,7 +1174,7 @@ void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo
rRenderContext.SetClipRegion();
- Size aOutSz = rRenderContext.GetOutputSizePixel();
+ Size aOutSz(GetOutputSizePixel());
long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index c09c495472e0..4b6e8f5e07bd 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1457,7 +1457,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
ControlPart aCtrlPart = ImplGetWindowImpl()->mnNativeBackground;
if (aCtrlPart != 0 && ! IsControlBackground())
{
- Rectangle aCtrlRegion(Point(), rRenderContext.GetOutputSizePixel());
+ Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
ControlState nState = ControlState::NONE;
if (IsEnabled())
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 2d06c3b416b8..381489f8b5e8 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -335,7 +335,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
aFont.SetSize(Size(0, 24));
rRenderContext.SetFont(aFont);
Size aSampleTextSize(rRenderContext.GetTextWidth(OUString::number(nPages + 1)), rRenderContext.GetTextHeight());
- Size aOutSize(rRenderContext.GetOutputSizePixel());
+ Size aOutSize(GetOutputSizePixel());
Size aSubSize(aOutSize.Width() / mnColumns, aOutSize.Height() / mnRows);
// calculate font size: shrink the sample text so it fits
double fX = double(aSubSize.Width()) / double(aSampleTextSize.Width());
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 20ab55da96ed..f1f07810843d 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -268,11 +268,12 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext)
bool bNativeOk = false;
if (rRenderContext.IsNativeControlSupported(CTRL_TOOLBAR, mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT))
{
- ToolbarValue aToolbarValue;
+ ToolbarValue aToolbarValue;
aToolbarValue.maGripRect = pWrapper->GetDragArea();
+
Point aPt;
- Rectangle aCtrlRegion( aPt, rRenderContext.GetOutputSizePixel() );
- ControlState nState = ControlState::ENABLED;
+ Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
+ ControlState nState = ControlState::ENABLED;
bNativeOk = rRenderContext.DrawNativeControl( CTRL_TOOLBAR, mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
aCtrlRegion, nState, aToolbarValue, OUString() );
@@ -284,7 +285,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext)
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
- Size aSz (rRenderContext.GetOutputSizePixel());
+ Size aSz(GetOutputSizePixel());
if (meAlign == WINDOWALIGN_TOP || meAlign == WINDOWALIGN_BOTTOM)
{
@@ -355,7 +356,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp
Color aOldCol = rRenderContext.GetLineColor();
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
- Size aFullSz(rRenderContext.GetOutputSizePixel());
+ Size aFullSz(GetOutputSizePixel());
Size aLineSz(aFullSz);
// use the linesize only when floating
@@ -460,7 +461,7 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const
{
// use NWF
Point aPt;
- Rectangle aCtrlRegion(aPt, rRenderContext.GetOutputSizePixel());
+ Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
ControlState nState = ControlState::ENABLED;
return rRenderContext.DrawNativeControl( CTRL_TOOLBAR, mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,