diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-14 10:44:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-14 10:46:25 +0000 |
commit | f42679fe7010284513cff3560d9aa47a49744ba8 (patch) | |
tree | 5ff1cdf6d8452a1a3cda16835d09cc37ac8f2122 | |
parent | remove unused tools/fsys.hxx from pch (diff) | |
download | core-f42679fe7010284513cff3560d9aa47a49744ba8.tar.gz core-f42679fe7010284513cff3560d9aa47a49744ba8.zip |
hackaround for assert
regression since 1c22545edf9085b9f2656ca92781158b6b123db3
Change-Id: Ia9aa06ed7fd0f31499226521fc5d6052b6d21704
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 582d52d48157..c855e901bb03 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); } } |