[Libreoffice-commits] .: Branch 'libreoffice-3-6' - editeng/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 4 08:36:45 PST 2012


 editeng/source/editeng/editdoc.hxx  |    2 +-
 editeng/source/editeng/impedit3.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 032d1d3cf5f69c28a39ba7e8a62eb580e545a0d5
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Dec 4 13:48:00 2012 +0100

    fdo#52640 fix right-aligned tabstops
    
    It is no good to change temporary object...
    
    Change-Id: Ib1178e154341dd0216fd965d3ed6c264de40d634
    Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>

diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index d952e6a..77f1d49 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -417,7 +417,7 @@ public:
     void        SetLen( sal_uInt16 nL )         { nLen = nL; }
 
     Size&       GetSize()                   { return aOutSz; }
-    Size        GetSize() const             { return aOutSz; }
+    const Size& GetSize() const             { return aOutSz; }
 
     sal_uInt8&      GetKind()                   { return nKind; }
     sal_uInt8       GetKind() const             { return nKind; }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 59c70bf..9f1a955 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1157,7 +1157,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
                     nW = nMaxW;
                     aCurrentTab.bValid = sal_False;
                 }
-                const TextPortion* pTabPortion = pParaPortion->GetTextPortions()[aCurrentTab.nTabPortion];
+                TextPortion* const pTabPortion = pParaPortion->GetTextPortions()[aCurrentTab.nTabPortion];
                 pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX;
                 nTmpWidth = aCurrentTab.nStartPosX + pTabPortion->GetSize().Width() + nWidthAfterTab;
             }
@@ -1400,7 +1400,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
             // Width from HangingPunctuation was set to 0 in ImpBreakLine,
             // check for rel width now, maybe create compression...
             long n = nMaxLineWidth - aTextSize.Width();
-            const TextPortion* pTP = pParaPortion->GetTextPortions()[pLine->GetEndPortion()];
+            TextPortion* const pTP = pParaPortion->GetTextPortions()[pLine->GetEndPortion()];
             sal_uInt16 nPosInArray = pLine->GetEnd()-1-pLine->GetStart();
             long nNewValue = ( nPosInArray ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0 ) + n;
             pLine->GetCharPosArray()[ nPosInArray ] = nNewValue;
@@ -1942,7 +1942,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
 
     if ( bCompressBlank || bHangingPunctuation )
     {
-        const TextPortion* pTP = pParaPortion->GetTextPortions()[nEndPortion];
+        TextPortion* const pTP = pParaPortion->GetTextPortions()[nEndPortion];
         DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: No TextPortion!" );
         DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion at the beginning of the line?" );
         sal_uInt16 nPosInArray = nBreakPos - 1 - pLine->GetStart();


More information about the Libreoffice-commits mailing list