[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sw/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 14 04:57:02 PDT 2013
sw/source/core/doc/docfmt.cxx | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 1525a2ca952d04e331c13f85bfdb16d89116ae6b
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
(cherry picked from commit f42679fe7010284513cff3560d9aa47a49744ba8)
Reviewed-on: https://gerrit.libreoffice.org/2722
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 352a451..4341aa9 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