[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Tue Mar 14 14:47:11 UTC 2017


 vcl/source/edit/textdat2.hxx |    4 ----
 vcl/source/edit/textdata.cxx |    8 ++++----
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit d3b9b4e41e31ce276d2d7354602a586b300adee9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 14 15:46:25 2017 +0100

    Remove excess non-const getters
    
    Change-Id: Ia66394560cda5c4d517f2a9fd047bed30c2c8975

diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index 0607e1b..90b5f85 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -132,19 +132,15 @@ public:
 
     void            SetStart( sal_Int32 n )         { mnStart = n; }
     sal_Int32       GetStart() const                { return mnStart; }
-    sal_Int32&      GetStart()                      { return mnStart; }
 
     void            SetEnd( sal_Int32 n )           { mnEnd = n; }
     sal_Int32       GetEnd() const                  { return mnEnd; }
-    sal_Int32&      GetEnd()                        { return mnEnd; }
 
     void            SetStartPortion( sal_uInt16 n )     { mnStartPortion = n; }
     sal_uInt16      GetStartPortion() const         { return mnStartPortion; }
-    sal_uInt16&     GetStartPortion()               { return mnStartPortion; }
 
     void            SetEndPortion( sal_uInt16 n )       { mnEndPortion = n; }
     sal_uInt16      GetEndPortion() const           { return mnEndPortion; }
-    sal_uInt16&     GetEndPortion()                 { return mnEndPortion; }
 
     sal_Int32       GetLen() const                  { return mnEnd - mnStart; }
 
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index dd8fb43..010b585 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -252,11 +252,11 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat
             {
                 TextLine& rLine = maLines[ nL ];
 
-                rLine.GetStartPortion() = rLine.GetStartPortion() + nPDiff;
-                rLine.GetEndPortion() = rLine.GetEndPortion() + nPDiff;
+                rLine.SetStartPortion(rLine.GetStartPortion() + nPDiff);
+                rLine.SetEndPortion(rLine.GetEndPortion() + nPDiff);
 
-                rLine.GetStart() = rLine.GetStart() + nTDiff;
-                rLine.GetEnd() = rLine.GetEnd() + nTDiff;
+                rLine.SetStart(rLine.GetStart() + nTDiff);
+                rLine.SetEnd(rLine.GetEnd() + nTDiff);
 
                 rLine.SetValid();
             }


More information about the Libreoffice-commits mailing list