[Libreoffice-commits] .: editeng/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 1 10:34:27 PDT 2012


 editeng/source/editeng/editdoc.cxx |   15 +++++++++++++++
 editeng/source/editeng/editdoc.hxx |    9 ++-------
 2 files changed, 17 insertions(+), 7 deletions(-)

New commits:
commit f3f706274172879324884e845629ef74b2e2e443
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Mon Oct 1 19:33:34 2012 +0200

    Outline methods with conditionals in editeng

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index cb13c91..560d7ca 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1034,6 +1034,21 @@ sal_Bool operator != ( const EditLine& r1,  const EditLine& r2  )
     return !( r1 == r2 );
 }
 
+void EditLine::SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH, sal_uInt16 nCrsrH )
+{
+    nHeight = nH;
+    nTxtHeight = ( nTxtH ? nTxtH : nH );
+    nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight );
+}
+
+void EditLine::SetStartPosX( long start )
+{
+    if (start > 0)
+        nStartPosX = start;
+    else
+        nStartPosX = 0;
+}
+
 Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
 {
     Size aSz;
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index c595ea8..2c303ee 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -513,11 +513,7 @@ public:
     sal_uInt16          GetEndPortion() const           { return nEndPortion; }
     sal_uInt16&         GetEndPortion()                 { return nEndPortion; }
 
-    void            SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0, sal_uInt16 nCrsrH = 0 )
-                    {   nHeight = nH;
-                        nTxtHeight = ( nTxtH ? nTxtH : nH );
-                        nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight );
-                    }
+    void            SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0, sal_uInt16 nCrsrH = 0 );
     sal_uInt16          GetHeight() const               { return nHeight; }
     sal_uInt16          GetTxtHeight() const            { return nTxtHeight; }
     sal_uInt16          GetCrsrHeight() const           { return nCrsrHeight; }
@@ -534,8 +530,7 @@ public:
     sal_uInt16          GetLen() const                  { return nEnd - nStart; }
 
     sal_uInt16          GetStartPosX() const            { return nStartPosX; }
-    void            SetStartPosX( long start )      { if (start > 0) nStartPosX = start; else nStartPosX = 0; }
-
+    void            SetStartPosX( long start );
     Size            CalcTextSize( ParaPortion& rParaPortion );
 
     bool            IsInvalid() const               { return bInvalid; }


More information about the Libreoffice-commits mailing list