diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-08 16:03:16 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-08 18:16:36 +0100 |
commit | 63c8904a7c6167f7eaaca534f0b8da3d3bb1ff31 (patch) | |
tree | 4e2336a9b4cd242ddd7ebff45d76132c854f016d | |
parent | 6cdf269a93685d5dfd7811faabb55acd2d7b2561 (diff) |
sw document model xml dump: include annotation marks
Change-Id: Iea687761a137650965ed48340063d20b6489b531
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index f83f2deb669c..0ef267416e89 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -142,6 +142,21 @@ void MarkManager::dumpAsXml( xmlTextWriterPtr w ) writer.endElement(); } writer.endElement(); + + writer.startElement("annotationmarks"); + for (const_iterator_t it = m_vAnnotationMarks.begin(); it != m_vAnnotationMarks.end(); ++it) + { + pMark_t pMark = *it; + writer.startElement("annotationmark"); + writer.writeFormatAttribute("startNode", TMP_FORMAT, pMark->GetMarkStart().nNode.GetIndex()); + writer.writeFormatAttribute("startOffset", TMP_FORMAT_I32, pMark->GetMarkStart().nContent.GetIndex()); + writer.writeFormatAttribute("endNode", TMP_FORMAT, pMark->GetMarkEnd().nNode.GetIndex()); + writer.writeFormatAttribute("endOffset", TMP_FORMAT_I32, pMark->GetMarkEnd().nContent.GetIndex()); + OString txt8 = OUStringToOString(pMark->GetName(), RTL_TEXTENCODING_UTF8); + writer.writeFormatAttribute("name", "%s", BAD_CAST( txt8.getStr())); + writer.endElement(); + } + writer.endElement(); writer.endElement(); } } // namespace mark @@ -422,6 +437,9 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w ) case RES_TXTATR_AUTOFMT: pWhich = "autofmt"; break; + case RES_TXTATR_ANNOTATION: + pWhich = "annotation"; + break; default: break; } |