vcl/source/control/PriorityHBox.cxx       |    6 +++---
 vcl/source/control/PriorityMergedHBox.cxx |    4 ++--
 vcl/source/uitest/uiobject.cxx            |    4 ++--
 vcl/source/window/menu.cxx                |    2 +-
 vcl/source/window/winproc.cxx             |    2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b595a93f3022badf4f8a1e0edd19475778b0fddc
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Jul 28 20:40:30 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jul 30 09:24:45 2021 +0200

    use less GetOutDev()
    
    Change-Id: If6a528a5ff18e23226d5ec371a040cd994f1d384
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119678
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to