[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Feb 4 08:48:54 PST 2015
sw/source/core/doc/number.cxx | 10 ++++++++++
sw/source/core/docnode/nodedump.cxx | 12 ------------
2 files changed, 10 insertions(+), 12 deletions(-)
New commits:
commit a66950bb99069d5133ce28b48816148cc10b15d6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 4 17:34:41 2015 +0100
Extract SwNumRule::dumpAsXml() from docnode
Change-Id: I4104f39227cb42d5cc2013c9ae0f4bb15e0f0f00
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index ab57814..163eda1 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -46,6 +46,7 @@
#include <algorithm>
#include <unordered_map>
+#include <libxml/xmlwriter.h>
#include <unotools/saveopt.hxx>
@@ -1037,6 +1038,15 @@ void SwNumRule::RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl )
}
}
+void SwNumRule::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swNumRule"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("msName"), BAD_CAST(msName.toUtf8().getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mnPoolFmtId"), BAD_CAST(OString::number(mnPoolFmtId).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("mbAutoRuleFlag"), BAD_CAST(OString::boolean(mbAutoRuleFlag).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
void SwNumRule::GetGrabBagItem(uno::Any& rVal) const
{
if (mpGrabBagItem.get())
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index c9aa867..64ea367 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -373,18 +373,6 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) const
}
}
-void SwNumRule::dumpAsXml(xmlTextWriterPtr w) const
-{
- WriterHelper writer(w);
- writer.startElement("swnumrule");
- OString aName = OUStringToOString(GetName(), RTL_TEXTENCODING_UTF8);
- writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr()));
- writer.writeFormatAttribute("isautorule", TMP_FORMAT, IsAutoRule() ? 1 : 0);
- if (GetPoolFmtId() != USHRT_MAX)
- writer.writeFormatAttribute("poolfmtid", TMP_FORMAT, GetPoolFmtId());
- writer.endElement();
-}
-
void SwNumRuleTbl::dumpAsXml(xmlTextWriterPtr w) const
{
if (!empty())
More information about the Libreoffice-commits
mailing list