summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-14 10:44:59 +0000
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-14 11:56:44 +0000
commit1525a2ca952d04e331c13f85bfdb16d89116ae6b (patch)
treef5e0891a58901b6e5b30c380e98a76877a0e8bf3 /sw/source/core
parentfe4e05f4d161e7366e251e3e6470af8967100ca6 (diff)
hackaround for assert
regression since 1c22545edf9085b9f2656ca92781158b6b123db3 Change-Id: Ia9aa06ed7fd0f31499226521fc5d6052b6d21704 (cherry picked from commit f42679fe7010284513cff3560d9aa47a49744ba8) Reviewed-on: https://gerrit.libreoffice.org/2722 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/docfmt.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 352a4511f8de..4341aa971824 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);
}
}