Kaydet (Commit) e6b2860e authored tarafından Miklos Vajna's avatar Miklos Vajna

Extract SwTxtFmtColl::dumpAsXml() from docnode

Change-Id: I3ffe83afa0e0e6f181f75319af3d5cbcc78de395
üst 1e970284
...@@ -130,6 +130,8 @@ public: ...@@ -130,6 +130,8 @@ public:
} }
bool AreListLevelIndentsApplicable() const; bool AreListLevelIndentsApplicable() const;
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
class SwGrfFmtColl: public SwFmtColl class SwGrfFmtColl: public SwFmtColl
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <libxml/xmlwriter.h>
#include <sal/macros.h> #include <sal/macros.h>
#include <hintids.hxx> #include <hintids.hxx>
#include <editeng/ulspitem.hxx> #include <editeng/ulspitem.hxx>
...@@ -462,6 +464,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const ...@@ -462,6 +464,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
return bAreListLevelIndentsApplicable; return bAreListLevelIndentsApplicable;
} }
void SwTxtFmtColl::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("swTxtFmtColl"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"), BAD_CAST(GetName().toUtf8().getStr()));
GetAttrSet().dumpAsXml(pWriter);
xmlTextWriterEndElement(pWriter);
}
//FEATURE::CONDCOLL //FEATURE::CONDCOLL
SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond, SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
......
...@@ -308,15 +308,7 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) const ...@@ -308,15 +308,7 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) const
{ {
writer.startElement("swtxtfmtcolls"); writer.startElement("swtxtfmtcolls");
for (size_t i = 0; i < size(); ++i) for (size_t i = 0; i < size(); ++i)
{ GetFmt(i)->dumpAsXml(w);
const SwTxtFmtColl* pColl = GetFmt(i);
writer.startElement("swtxtfmtcoll");
OString aName = OUStringToOString(pColl->GetName(), RTL_TEXTENCODING_UTF8);
writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr()));
pColl->GetAttrSet().dumpAsXml(w);
writer.endElement();
}
writer.endElement(); writer.endElement();
} }
} }
......
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