[Libreoffice-commits] core.git: include/tools sw/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Mar 5 11:11:57 UTC 2018


 include/tools/gen.hxx                    |    3 ---
 sw/source/ui/table/autoformatpreview.cxx |   14 +++++++-------
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 05a195ffca41bc3883627b9503ade8cdd0b6d909
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Mar 5 09:35:05 2018 +0200

    drop long& returning methods in Point
    
    Change-Id: I5d23191fd5a549b867213acedf9d56c233e2fb13
    Reviewed-on: https://gerrit.libreoffice.org/50761
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 56ef15c2c742..d37ece2bedb5 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -79,9 +79,6 @@ public:
     long                X() const { return nA; }
     long                Y() const { return nB; }
 
-    long&               X() { return nA; }
-    long&               Y() { return nB; }
-
     void                Move( long nHorzMove, long nVertMove );
     void                Move( Size const & s );
     long                AdjustX( long nHorzMove ) { nA += nHorzMove; return nA; }
diff --git a/sw/source/ui/table/autoformatpreview.cxx b/sw/source/ui/table/autoformatpreview.cxx
index ea16da988211..27f5a4c0705c 100644
--- a/sw/source/ui/table/autoformatpreview.cxx
+++ b/sw/source/ui/table/autoformatpreview.cxx
@@ -696,24 +696,24 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nC
     nRightX = cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET;
 
     // vertical (always centering):
-    aPos.Y() += (nRowHeight - aStrSize.Height()) / 2;
+    aPos.AdjustY((nRowHeight - aStrSize.Height()) / 2);
 
     // horizontal
     if (mbRTL)
-        aPos.X() += nRightX;
+        aPos.AdjustX(nRightX);
     else if (aCurData.IsJustify())
     {
         const SvxAdjustItem& rAdj = aCurData.GetBoxFormat(nFormatIndex).GetAdjust();
         switch (rAdj.GetAdjust())
         {
             case SvxAdjust::Left:
-                aPos.X() += FRAME_OFFSET;
+                aPos.AdjustX(FRAME_OFFSET);
                 break;
             case SvxAdjust::Right:
-                aPos.X() += nRightX;
+                aPos.AdjustX(nRightX);
                 break;
             default:
-                aPos.X() += (cellRect.GetWidth() - aStrSize.Width()) / 2;
+                aPos.AdjustX((cellRect.GetWidth() - aStrSize.Width()) / 2);
                 break;
         }
     }
@@ -723,12 +723,12 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nC
         if (nCol == 0 || nIndex == 4)
         {
             // Text-Label left or sum left aligned
-            aPos.X() += FRAME_OFFSET;
+            aPos.AdjustX(FRAME_OFFSET);
         }
         else
         {
             // numbers/dates right aligned
-            aPos.X() += nRightX;
+            aPos.AdjustX(nRightX);
         }
     }
 


More information about the Libreoffice-commits mailing list