chart2/source/controller/accessibility/AccessibleViewForwarder.cxx |    6 
+++---
 svx/source/unodraw/unoshape.cxx                                    |    4 +---
 toolkit/source/hatchwindow/ipwin.cxx                               |    4 +---
 3 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 972aea543ef94066946dedd6cf6890d34869d89c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Jul 12 14:04:10 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Jul 12 15:25:33 2023 +0200

    simplify
    
    Change-Id: I276ba7809b08a359b377ea56259140675c5e00a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154354
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx 
b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
index 31395f1181dc..dbd8ac0d51f2 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
@@ -45,9 +45,9 @@ tools::Rectangle AccessibleViewForwarder::GetVisibleArea() 
const
     tools::Rectangle aVisibleArea;
     if ( m_pWindow )
     {
-        aVisibleArea.SetPos( Point( 0, 0 ) );
-        aVisibleArea.SetSize( m_pWindow->GetOutputSizePixel() );
-        aVisibleArea = m_pWindow->PixelToLogic( aVisibleArea, m_aMapMode );
+        aVisibleArea = m_pWindow->PixelToLogic(
+            tools::Rectangle( Point( 0, 0 ), m_pWindow->GetOutputSizePixel() ),
+            m_aMapMode );
     }
     return aVisibleArea;
 }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index b186a95097c2..c22c95ba504a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2112,9 +2112,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, 
const SfxItemPropertyMapEn
             Size aObjSize( aUnoRect.Width, aUnoRect.Height );
             ForceMetricToItemPoolMetric(aTopLeft);
             ForceMetricToItemPoolMetric(aObjSize);
-            tools::Rectangle aRect;
-            aRect.SetPos(aTopLeft);
-            aRect.SetSize(aObjSize);
+            tools::Rectangle aRect(aTopLeft, aObjSize);
             pSdrObject->SetSnapRect(aRect);
             return true;
         }
diff --git a/toolkit/source/hatchwindow/ipwin.cxx 
b/toolkit/source/hatchwindow/ipwin.cxx
index d21e94166c7c..52d3668b7ffb 100644
--- a/toolkit/source/hatchwindow/ipwin.cxx
+++ b/toolkit/source/hatchwindow/ipwin.cxx
@@ -189,9 +189,7 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const 
Point & rPos )
     }
     else
     {
-        tools::Rectangle aRect( GetTrackRectPixel( rPos ) );
-        aRect.SetSize( pWin->PixelToLogic( aRect.GetSize() ) );
-        aRect.SetPos( pWin->PixelToLogic( aRect.TopLeft() ) );
+        tools::Rectangle aRect = pWin->PixelToLogic(GetTrackRectPixel( rPos ));
         pWin->ShowTracking( aRect );
     }
     return nGrab;

Reply via email to