Kaydet (Commit) f0b92b8b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

use C++11 iteration

Change-Id: I383e7552160c5e12796ddf7cb13058d99032c7f5
üst 71101b2c
...@@ -299,19 +299,16 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const ...@@ -299,19 +299,16 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) const
const SwRootFrm* const pRootFrm = static_cast<const SwRootFrm* const>(this); const SwRootFrm* const pRootFrm = static_cast<const SwRootFrm* const>(this);
SwEditShell* pEditShell = pRootFrm->GetCurrShell()->GetDoc()->GetEditShell(); SwEditShell* pEditShell = pRootFrm->GetCurrShell()->GetDoc()->GetEditShell();
xmlTextWriterStartElement(writer, BAD_CAST("shellCrsr")); xmlTextWriterStartElement(writer, BAD_CAST("shellCrsr"));
SwPaM* pPaM = pEditShell->getShellCrsr(false); for(SwPaM& rPaM : pEditShell->getShellCrsr(false)->GetRingContainer())
do
{ {
xmlTextWriterStartElement(writer, BAD_CAST("swpam")); xmlTextWriterStartElement(writer, BAD_CAST("swpam"));
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointNodeIndex"), "%ld", pPaM->GetPoint()->nNode.GetIndex()); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointNodeIndex"), "%ld", rPaM.GetPoint()->nNode.GetIndex());
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("pointContentIndex"), "%" SAL_PRIdINT32, pPaM->GetPoint()->nContent.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("markNodeIndex"), "%ld", rPaM.GetMark()->nNode.GetIndex());
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markContentIndex"), "%" SAL_PRIdINT32, pPaM->GetMark()->nContent.GetIndex()); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("markContentIndex"), "%" SAL_PRIdINT32, rPaM.GetMark()->nContent.GetIndex());
xmlTextWriterEndElement(writer); xmlTextWriterEndElement(writer);
pPaM = static_cast<SwPaM*>(pPaM->GetNext());
} }
while (pPaM && pPaM != pEditShell->getShellCrsr(false));
xmlTextWriterEndElement(writer); xmlTextWriterEndElement(writer);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment