include/tools/gen.hxx                         |   15 ++++-----------
 reportdesign/source/ui/report/ViewsWindow.cxx |   16 ++++++++--------
 sw/source/ui/table/autoformatpreview.cxx      |    4 ++--
 3 files changed, 14 insertions(+), 21 deletions(-)

New commits:
commit ee69f5e0758a2a1842362bf403dc62746437f358
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Fri Mar 2 12:02:39 2018 +0200

    drop old tools/gen methods
    
    Change-Id: I9b9d1503b476f84e91fa283e523875b562c6b837
    Reviewed-on: https://gerrit.libreoffice.org/50166
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 38f80404e1f6..56ef15c2c742 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -102,8 +102,8 @@ public:
 
     long                getX() const { return X(); }
     long                getY() const { return Y(); }
-    void                setX(long nX)  { X() = nX; }
-    void                setY(long nY)  { Y() = nY; }
+    void                setX(long nX)  { nA = nX; }
+    void                setY(long nY)  { nB = nY; }
 
     Pair const &        toPair() const { return *this; }
     Pair &              toPair() { return *this; }
@@ -193,15 +193,13 @@ public:
     long            Width() const  { return nA; }
     long            Height() const { return nB; }
 
-    long&           Width()  { return nA; }
-    long&           Height() { return nB; }
     long            AdjustWidth( long n ) { nA += n; return nA; }
     long            AdjustHeight( long n ) { nB += n; return nB; }
 
     long            getWidth() const { return Width(); }
     long            getHeight() const { return Height(); }
-    void            setWidth(long nWidth)  { Width() = nWidth; }
-    void            setHeight(long nHeight)  { Height() = nHeight; }
+    void            setWidth(long nWidth)  { nA = nWidth; }
+    void            setHeight(long nHeight)  { nB = nHeight; }
 
     Pair const &    toPair() const { return *this; }
     Pair &          toPair() { return *this; }
@@ -390,11 +388,6 @@ public:
     long                Top() const     { return nTop;    }
     long                Bottom() const  { return nBottom; }
 
-    long&               Left()          { return nLeft;   }
-    long&               Right()         { return nRight;  }
-    long&               Top()           { return nTop;    }
-    long&               Bottom()        { return nBottom; }
-
     void                SetLeft(long v)    { nLeft = v;   }
     void                SetRight(long v)   { nRight = v;  }
     void                SetTop(long v)     { nTop = v;    }
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index 5e48c8c209f3..341dc465a397 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -770,9 +770,9 @@ void OViewsWindow::alignMarkedObjects(ControlModification 
_nControlModification,
 
     bool bMove = true;
 
-    auto aGetFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Bottom));
+    auto aGetFun = ::std::mem_fn(&tools::Rectangle::Bottom);
     auto aSetFun = ::std::mem_fn(&tools::Rectangle::SetBottom);
-    auto aRefFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Top));
+    auto aRefFun = ::std::mem_fn(&tools::Rectangle::Top);
     TRectangleMap::const_iterator aRectIter = aSortRectangles.begin();
     TRectangleMap::const_iterator aRectEnd = aSortRectangles.end();
     for (;aRectIter != aRectEnd ; ++aRectIter)
@@ -791,9 +791,9 @@ void OViewsWindow::alignMarkedObjects(ControlModification 
_nControlModification,
             switch(_nControlModification)
             {
                 case ControlModification::TOP   :
-                    aGetFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Top));
+                    aGetFun  = ::std::mem_fn(&tools::Rectangle::Top);
                     aSetFun  = ::std::mem_fn(&tools::Rectangle::SetTop);
-                    aRefFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Bottom));
+                    aRefFun  = ::std::mem_fn(&tools::Rectangle::Bottom);
                     pValue = &nYMov;
                     break;
                 case ControlModification::BOTTOM:
@@ -806,18 +806,18 @@ void OViewsWindow::alignMarkedObjects(ControlModification 
_nControlModification,
                     bMove = false;
                     break;
                 case ControlModification::RIGHT :
-                    aGetFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Right));
+                    aGetFun  = ::std::mem_fn(&tools::Rectangle::Right);
                     aSetFun  = ::std::mem_fn(&tools::Rectangle::SetRight);
-                    aRefFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Left));
+                    aRefFun  = ::std::mem_fn(&tools::Rectangle::Left);
                     break;
                 case ControlModification::CENTER_HORIZONTAL:
                     nXMov = aCenter.X() - aObjRect.Center().X();
                     bMove = false;
                     break;
                 case ControlModification::LEFT  :
-                    aGetFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Left));
+                    aGetFun  = ::std::mem_fn(&tools::Rectangle::Left);
                     aSetFun  = ::std::mem_fn(&tools::Rectangle::SetLeft);
-                    aRefFun  = 
::std::mem_fn(static_cast<long(tools::Rectangle:: *)() 
const>(&tools::Rectangle::Right));
+                    aRefFun  = ::std::mem_fn(&tools::Rectangle::Right);
                     break;
                 default:
                     bMove = false;
diff --git a/sw/source/ui/table/autoformatpreview.cxx 
b/sw/source/ui/table/autoformatpreview.cxx
index f7ba3c709971..ea16da988211 100644
--- a/sw/source/ui/table/autoformatpreview.cxx
+++ b/sw/source/ui/table/autoformatpreview.cxx
@@ -802,8 +802,8 @@ void AutoFormatPreview::CalcCellArray(bool _bFitWidth)
 
     maArray.SetAllRowHeights(nRowHeight);
 
-    aPrvSize.Width() = maArray.GetWidth() + 4;
-    aPrvSize.Height() = maArray.GetHeight() + 4;
+    aPrvSize.setWidth(maArray.GetWidth() + 4);
+    aPrvSize.setHeight(maArray.GetHeight() + 4);
 }
 
 void AutoFormatPreview::CalcLineMap()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to