summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/xmldump.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index e5865b34d5ff..58e52f7b8cc5 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -299,19 +299,16 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const
const SwRootFrm* const pRootFrm = static_cast<const SwRootFrm* const>(this);
SwEditShell* pEditShell = pRootFrm->GetCurrShell()->GetDoc()->GetEditShell();
xmlTextWriterStartElement(writer, BAD_CAST("shellCrsr"));
- SwPaM* pPaM = pEditShell->getShellCrsr(false);
- do
+ for(SwPaM& rPaM : pEditShell->getShellCrsr(false)->GetRingContainer())
{
xmlTextWriterStartElement(writer, BAD_CAST("swpam"));
- xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointNodeIndex"), "%ld", pPaM->GetPoint()->nNode.GetIndex());
- xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointContentIndex"), "%" SAL_PRIdINT32, pPaM->GetPoint()->nContent.GetIndex());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointNodeIndex"), "%ld", rPaM.GetPoint()->nNode.GetIndex());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointContentIndex"), "%" SAL_PRIdINT32, rPaM.GetPoint()->nContent.GetIndex());
- xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markNodeIndex"), "%ld", pPaM->GetMark()->nNode.GetIndex());
- xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markContentIndex"), "%" SAL_PRIdINT32, pPaM->GetMark()->nContent.GetIndex());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markNodeIndex"), "%ld", rPaM.GetMark()->nNode.GetIndex());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markContentIndex"), "%" SAL_PRIdINT32, rPaM.GetMark()->nContent.GetIndex());
xmlTextWriterEndElement(writer);
- pPaM = static_cast<SwPaM*>(pPaM->GetNext());
}
- while (pPaM && pPaM != pEditShell->getShellCrsr(false));
xmlTextWriterEndElement(writer);
}