[Libreoffice-commits] core.git: dbaccess/source reportdesign/source sd/source svtools/source svx/source sw/source

Stephan Bergmann sbergman at redhat.com
Tue Nov 29 09:23:29 UTC 2016


 dbaccess/source/ui/app/AppView.cxx              |    4 ++--
 reportdesign/source/core/sdr/RptObject.cxx      |   16 ++++++++--------
 reportdesign/source/ui/report/ReportSection.cxx |    4 ++--
 sd/source/filter/eppt/pptx-text.cxx             |    4 ++--
 sd/source/ui/view/sdview3.cxx                   |    8 ++++----
 svtools/source/brwbox/brwbox2.cxx               |    2 +-
 svx/source/svdraw/svddrgmt.cxx                  |    2 +-
 sw/source/core/draw/dflyobj.cxx                 |    2 +-
 sw/source/uibase/uiview/viewport.cxx            |    2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 361c6eb18c9ba4043652ba91036094379aeaf05f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 29 10:22:33 2016 +0100

    Use Size::Width/Height instead of inherited Pair::A/B
    
    Change-Id: Ie0346d5ec054fbe7eff1d4b73814a5e2b9f654c2

diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index fdb2f07..c4b1a92 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -245,9 +245,9 @@ void OApplicationView::resizeDocumentView(Rectangle& _rPlayground)
     if ( m_pWin && !_rPlayground.IsEmpty() )
     {
         Size aFLSize = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont );
-        _rPlayground.Move( aFLSize.A(),aFLSize.B() );
+        _rPlayground.Move( aFLSize.Width(),aFLSize.Height() );
         Size aOldSize = _rPlayground.GetSize();
-        _rPlayground.SetSize( Size(aOldSize.A() - 2*aFLSize.A(), aOldSize.B() - 2*aFLSize.B()) );
+        _rPlayground.SetSize( Size(aOldSize.Width() - 2*aFLSize.Width(), aOldSize.Height() - 2*aFLSize.Height()) );
 
         m_pWin->SetPosSizePixel(_rPlayground.TopLeft() , _rPlayground.GetSize() );
     }
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 32a7b77..fda99ce 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -505,8 +505,8 @@ void OCustomShape::NbcMove( const Size& rSize )
         {
             OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
             OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
-            m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.A());
-            m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.B());
+            m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.Width());
+            m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.Height());
         }
 
         // set geometry properties
@@ -677,12 +677,12 @@ void OUnoObject::NbcMove( const Size& rSize )
             OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
 
             // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
-            int nNewX = m_xReportComponent->getPositionX() + rSize.A();
+            int nNewX = m_xReportComponent->getPositionX() + rSize.Width();
             m_xReportComponent->setPositionX(nNewX);
-            int nNewY = m_xReportComponent->getPositionY() + rSize.B();
+            int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
             if (nNewY < 0 && !bUndoMode)
             {
-                aUndoSize.B() = abs(nNewY);
+                aUndoSize.Height() = abs(nNewY);
                 bPositionFixed = true;
                 nNewY = 0;
             }
@@ -957,17 +957,17 @@ void OOle2Obj::NbcMove( const Size& rSize )
             OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
 
             // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
-            int nNewX = m_xReportComponent->getPositionX() + rSize.A();
+            int nNewX = m_xReportComponent->getPositionX() + rSize.Width();
             // can this hinder us to set components outside the area?
             // if (nNewX < 0)
             // {
             //     nNewX = 0;
             // }
             m_xReportComponent->setPositionX(nNewX);
-            int nNewY = m_xReportComponent->getPositionY() + rSize.B();
+            int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
             if (nNewY < 0 && !bUndoMode)
             {
-                aUndoSize.B() = abs(nNewY);
+                aUndoSize.Height() = abs(nNewY);
                 bPositionFixed = true;
                 nNewY = 0;
             }
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index bf86873..b93988e 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -202,8 +202,8 @@ void OReportSection::fill()
     m_pView->SetGridFine(aGridSizeFine);
 
     // #i93595# set snap grid width to snap to all existing subdivisions
-    const Fraction aX(aGridSizeFine.A());
-    const Fraction aY(aGridSizeFine.B());
+    const Fraction aX(aGridSizeFine.Width());
+    const Fraction aY(aGridSizeFine.Height());
     m_pView->SetSnapGridWidth(aX, aY);
 
     m_pView->SetGridSnap( true );
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 2134e35..a0e09ed 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -849,8 +849,8 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
                         if (auto aSize = o3tl::tryAccess<css::awt::Size>(pPropValue[i].Value))
                         {
                             // don't cast awt::Size to Size as on 64-bits they are not the same.
-                            aBuGraSize.A() = aSize->Width;
-                            aBuGraSize.B() = aSize->Height;
+                            aBuGraSize.Width() = aSize->Width;
+                            aBuGraSize.Height() = aSize->Height;
                         }
                     }
                     else if ( aPropName == "StartWith" )
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 6490032..c095f87 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -543,8 +543,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
                                                         {
                                                             const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
                                                             Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
-                                                            aPosition.X() += aVector.A();
-                                                            aPosition.Y() += aVector.B();
+                                                            aPosition.X() += aVector.Width();
+                                                            aPosition.Y() += aVector.Height();
                                                             pCloneEdge->SetTailPoint(false, aPosition);
                                                         }
                                                     }
@@ -575,8 +575,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
                                                         {
                                                             const SdrGluePoint& rGluePoint = (*pGlueList)[nInd];
                                                             Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
-                                                            aPosition.X() += aVector.A();
-                                                            aPosition.Y() += aVector.B();
+                                                            aPosition.X() += aVector.Width();
+                                                            aPosition.Y() += aVector.Height();
                                                             pCloneEdge->SetTailPoint(true, aPosition);
                                                         }
                                                     }
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index e1f12bc..f840d2d 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -1978,7 +1978,7 @@ Rectangle BrowseBox::calcTableRect(bool _bOnScreen)
     long nY = aRowBar.Top() - aRect.Top();
     Size aSize(aRect.GetSize());
 
-    return Rectangle(aRowBar.TopRight(), Size(aSize.A() - nX, aSize.B() - nY - aHScroll->GetSizePixel().Height()) );
+    return Rectangle(aRowBar.TopRight(), Size(aSize.Width() - nX, aSize.Height() - nY - aHScroll->GetSizePixel().Height()) );
 }
 
 Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen )
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index bc40e1d..34b3a8b 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3778,7 +3778,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
     else
         aGraphicSize = OutputDevice::LogicToLogic( aGraphicSize, rGraphicObject.GetPrefMapMode(), aMapMode100thmm);
 
-    if( aGraphicSize.A() == 0 || aGraphicSize.B() == 0 )
+    if( aGraphicSize.Width() == 0 || aGraphicSize.Height() == 0 )
         return false;
 
     const SdrGrafCropItem& rOldCrop = static_cast<const SdrGrafCropItem&>(pObj->GetMergedItem(SDRATTR_GRAFCROP));
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 59aa2a6..0a360cc 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -751,7 +751,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
         aGraphicSize = Application::GetDefaultDevice()->PixelToLogic( aGraphicSize, aMapMode100thmm );
     else
         aGraphicSize = OutputDevice::LogicToLogic( aGraphicSize, pGraphicObject->GetPrefMapMode(), aMapMode100thmm);
-    if( aGraphicSize.A() == 0 || aGraphicSize.B() == 0 )
+    if( aGraphicSize.Width() == 0 || aGraphicSize.Height() == 0 )
         return ;
 
     // Get old values for crop in 10th of mm
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index f34b89c..00a773f 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -96,7 +96,7 @@ static void lcl_GetPos(SwView* pView,
 
     long lDelta = lPos - (bHori ? rSh.VisArea().Pos().X() : rSh.VisArea().Pos().Y());
 
-    const long lSize = (bHori ? aDocSz.A() : aDocSz.B()) + lBorder;
+    const long lSize = (bHori ? aDocSz.Width() : aDocSz.Height()) + lBorder;
     // Should right or below are too much space,
     // then they must be subtracted out of the VisArea!
     long nTmp = pView->GetVisArea().Right()+lDelta;


More information about the Libreoffice-commits mailing list