[PATCH libreoffice-4-0] hackaround for assert
Caolán McNamara (via_Code_Review)
gerrit at gerrit.libreoffice.org
Thu Mar 14 04:31:40 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2722
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/22/2722/1
hackaround for assert
regression since 1c22545edf9085b9f2656ca92781158b6b123db3
Change-Id: Ia9aa06ed7fd0f31499226521fc5d6052b6d21704
(cherry picked from commit f42679fe7010284513cff3560d9aa47a49744ba8)
---
M sw/source/core/doc/docfmt.cxx
1 file changed, 8 insertions(+), 8 deletions(-)
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 @@
if (aEndPos.nNode.GetNode().GetTxtNode() && aEndPos.nContent != aEndPos.nNode.GetNode().GetTxtNode()->Len())
aEndPos.nNode--;
- for (;aStartPos<=aEndPos;aStartPos.nNode++)
+ sal_uLong nStart = aStartPos.nNode.GetIndex();
+ sal_uLong nEnd = aEndPos.nNode.GetIndex();
+ for(; nStart <= nEnd; ++nStart)
{
- SwTxtNode* pCurrentNd = aStartPos.nNode.GetNode().GetTxtNode();
-
- if (pCurrentNd)
- {
- pCurrentNd->TryCharSetExpandToNum(*pCharSet);
-
- }
+ SwNode* pNd = pDoc->GetNodes()[ nStart ];
+ if (!pNd || !pNd->IsTxtNode())
+ continue;
+ SwTxtNode *pCurrentNd = (SwTxtNode*)pNd;
+ pCurrentNd->TryCharSetExpandToNum(*pCharSet);
}
}
--
To view, visit https://gerrit.libreoffice.org/2722
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9aa06ed7fd0f31499226521fc5d6052b6d21704
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Caolán McNamara <caolanm at redhat.com>
More information about the LibreOffice
mailing list