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

Caolán McNamara caolanm at redhat.com
Thu Mar 14 03:46:43 PDT 2013


 sw/source/core/doc/docfmt.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f42679fe7010284513cff3560d9aa47a49744ba8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 14 10:44:59 2013 +0000

    hackaround for assert
    
    regression since 1c22545edf9085b9f2656ca92781158b6b123db3
    
    Change-Id: Ia9aa06ed7fd0f31499226521fc5d6052b6d21704

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 582d52d..c855e90 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1035,15 +1035,15 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
         if (aEndPos.nNode.GetNode().GetTxtNode() && aEndPos.nContent != aEndPos.nNode.GetNode().GetTxtNode()->Len())
             aEndPos.nNode--;
 
-        for (;aStartPos<=aEndPos;aStartPos.nNode++)
-        {
-            SwTxtNode* pCurrentNd = aStartPos.nNode.GetNode().GetTxtNode();
-
-            if (pCurrentNd)
-            {
-                 pCurrentNd->TryCharSetExpandToNum(*pCharSet);
-
-            }
+        sal_uLong nStart = aStartPos.nNode.GetIndex();
+        sal_uLong nEnd = aEndPos.nNode.GetIndex();
+        for(; nStart <= nEnd; ++nStart)
+        {
+            SwNode* pNd = pDoc->GetNodes()[ nStart ];
+            if (!pNd || !pNd->IsTxtNode())
+                continue;
+            SwTxtNode *pCurrentNd = (SwTxtNode*)pNd;
+            pCurrentNd->TryCharSetExpandToNum(*pCharSet);
 
         }
     }


More information about the Libreoffice-commits mailing list