diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-05 18:12:20 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-05 18:13:21 +0200 |
commit | 72cb877e07194f5f9f13dd2716d03f9a50531b1b (patch) | |
tree | ed1b93a71ef164a0498da9aff169ed6b3d97e60c | |
parent | 25487875563c5aa05253e3f3199b082ded16184c (diff) |
sw doc model xml dump: include SwDBData
Change-Id: I082a9d3ca268d19ac21c28a6b453d457ed27c959
-rw-r--r-- | sw/inc/swdbdata.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx index 2547e3dc255d..6d91e2b85558 100644 --- a/sw/inc/swdbdata.hxx +++ b/sw/inc/swdbdata.hxx @@ -30,6 +30,7 @@ struct SwDBData sal_Int32 nCommandType; //com::sun::star::sdb::CommandType SwDBData() : nCommandType(0){} + void dumpAsXml(struct _xmlTextWriter* pWriter) const; bool operator !=(const SwDBData& rCmp) const {return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;} diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 227b0530ac97..c900a08556f4 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1923,6 +1923,7 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); m_pNodes->dumpAsXml(pWriter); + maDBData.dumpAsXml(pWriter); mpMarkManager->dumpAsXml(pWriter); m_pUndoManager->dumpAsXml(pWriter); getIDocumentFieldsAccess().GetFldTypes()->dumpAsXml(pWriter); @@ -1949,6 +1950,17 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const } } +void SwDBData::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("swDBData")); + + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("sDataSource"), BAD_CAST(sDataSource.toUtf8().getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("sCommand"), BAD_CAST(sCommand.toUtf8().getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nCommandType"), BAD_CAST(OString::number(nCommandType).getStr())); + + xmlTextWriterEndElement(pWriter); +} + std::set<Color> SwDoc::GetDocColors() { std::set<Color> aDocColors; |