diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-24 09:02:46 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-24 09:02:59 +0100 |
commit | 3b3cfa0e016de7712200785bc70ef2d6a5877113 (patch) | |
tree | 519b4a8da253ad3a6e3e95def355b90b23581874 /editeng | |
parent | c9067dd0e13a51e70b71c4730e08cd518477a4f3 (diff) |
Factor out EditTextObject::dumpAsXml() from SwDoc::dumpAsXml()
Change-Id: I1dae910e9d14db56d6388a71d76b1a479d5786b0
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/CppunitTest_editeng_core.mk | 1 | ||||
-rw-r--r-- | editeng/Library_editeng.mk | 1 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 13 |
3 files changed, 15 insertions, 0 deletions
diff --git a/editeng/CppunitTest_editeng_core.mk b/editeng/CppunitTest_editeng_core.mk index f66caec8a243..ea7f6896b52b 100644 --- a/editeng/CppunitTest_editeng_core.mk +++ b/editeng/CppunitTest_editeng_core.mk @@ -44,6 +44,7 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \ $(eval $(call gb_CppunitTest_use_externals,editeng_core,\ boost_headers \ icuuc \ + libxml2 \ )) $(eval $(call gb_CppunitTest_set_include,editeng_core,\ diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk index 22f4c086085d..0e9c6c2c4a21 100644 --- a/editeng/Library_editeng.mk +++ b/editeng/Library_editeng.mk @@ -152,6 +152,7 @@ $(eval $(call gb_Library_use_externals,editeng,\ boost_headers \ icuuc \ icu_headers \ + libxml2 \ )) # Runtime dependency for unit-tests diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index b100bd47299d..89bc9fe86aea 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -464,6 +464,19 @@ void EditTextObject::Dump() const } #endif +void EditTextObject::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("editTextObject")); + sal_Int32 nCount = GetParagraphCount(); + for (sal_Int32 i = 0; i < nCount; ++i) + { + xmlTextWriterStartElement(pWriter, BAD_CAST("paragraph")); + xmlTextWriterWriteString(pWriter, BAD_CAST(GetText(i).toUtf8().getStr())); + xmlTextWriterEndElement(pWriter); + } + xmlTextWriterEndElement(pWriter); +} + // from SfxItemPoolUser void EditTextObjectImpl::ObjectInDestruction(const SfxItemPool& rSfxItemPool) { |