diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-28 20:40:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 09:24:45 +0200 |
commit | b595a93f3022badf4f8a1e0edd19475778b0fddc (patch) | |
tree | ee3517dd9715c1e270c1ee178cb5e71406884fe9 | |
parent | e1511ce551f27a5560600029193f076fd65ece17 (diff) |
use less GetOutDev()
Change-Id: If6a528a5ff18e23226d5ec371a040cd994f1d384
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119678
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/source/control/PriorityHBox.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/PriorityMergedHBox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/control/PriorityHBox.cxx b/vcl/source/control/PriorityHBox.cxx index c3477d23f30d..c893cc8332eb 100644 --- a/vcl/source/control/PriorityHBox.cxx +++ b/vcl/source/control/PriorityHBox.cxx @@ -128,10 +128,10 @@ void PriorityHBox::Resize() if (pWindow && pWindow->GetParent() == this) { - nCurrentWidth -= pWindow->GetOutDev()->GetOutputWidthPixel() + get_spacing(); + nCurrentWidth -= pWindow->GetOutputSizePixel().Width() + get_spacing(); pWindow->Show(); pPrioritable->HideContent(); - nCurrentWidth += pWindow->GetOutDev()->GetOutputWidthPixel() + get_spacing(); + nCurrentWidth += pWindow->GetOutputSizePixel().Width() + get_spacing(); } } @@ -150,7 +150,7 @@ void PriorityHBox::Resize() if (pWindow) { - nCurrentWidth -= pWindow->GetOutDev()->GetOutputWidthPixel() + get_spacing(); + nCurrentWidth -= pWindow->GetOutputSizePixel().Width() + get_spacing(); pWindow->Show(); pPrioritable->ShowContent(); nCurrentWidth += getLayoutRequisition(*pWindow).Width() + get_spacing(); diff --git a/vcl/source/control/PriorityMergedHBox.cxx b/vcl/source/control/PriorityMergedHBox.cxx index b67368d87628..75a26daa52c1 100644 --- a/vcl/source/control/PriorityMergedHBox.cxx +++ b/vcl/source/control/PriorityMergedHBox.cxx @@ -69,8 +69,8 @@ void PriorityMergedHBox::Resize() if (pWindow && pWindow->GetParent() == this && pWindow->IsVisible()) { - if (pWindow->GetOutDev()->GetOutputWidthPixel()) - nCurrentWidth -= pWindow->GetOutDev()->GetOutputWidthPixel(); + if (pWindow->GetOutputSizePixel().Width()) + nCurrentWidth -= pWindow->GetOutputSizePixel().Width(); else nCurrentWidth -= DUMMY_WIDTH; pWindow->Hide(); diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index fe9791c83aba..da71b7d3e41d 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -1758,8 +1758,8 @@ void DrawingAreaUIObject::execute(const OUString& rAction, const StringMap& rPar double fPosX = std::atof(sPosX2.getStr()); double fPosY = std::atof(sPoxY2.getStr()); - fPosX = fPosX * mxDrawingArea->GetOutDev()->GetOutputWidthPixel(); - fPosY = fPosY * mxDrawingArea->GetOutDev()->GetOutputHeightPixel(); + fPosX = fPosX * mxDrawingArea->GetOutputSizePixel().Width(); + fPosY = fPosY * mxDrawingArea->GetOutputSizePixel().Height(); MouseEvent aEvent(Point(fPosX, fPosY), 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0); mxDrawingArea->MouseButtonDown(aEvent); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 6225f25a6d16..d9555da15de5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2725,7 +2725,7 @@ int MenuBar::GetMenuBarHeight() const else { vcl::Window* pMenubarWin = GetWindow(); - nMenubarHeight = pMenubarWin ? pMenubarWin->GetOutDev()->GetOutputHeightPixel() : 0; + nMenubarHeight = pMenubarWin ? pMenubarWin->GetOutputSizePixel().Height() : 0; } return nMenubarHeight; } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 3361b0d77858..890f4874aa6c 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1638,7 +1638,7 @@ static void KillOwnPopups( vcl::Window const * pWindow ) void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight ) { - const bool bChanged = (nNewWidth != pWindow->GetOutDev()->GetOutputWidthPixel()) || (nNewHeight != pWindow->GetOutDev()->GetOutputHeightPixel()); + const bool bChanged = (nNewWidth != pWindow->GetOutputSizePixel().Width()) || (nNewHeight != pWindow->GetOutDev()->GetOutputHeightPixel()); if (bChanged && pWindow->GetStyle() & (WB_MOVEABLE|WB_SIZEABLE)) { KillOwnPopups( pWindow ); |