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:
}
bool AreListLevelIndentsApplicable() const;
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
class SwGrfFmtColl: public SwFmtColl
......
......@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <libxml/xmlwriter.h>
#include <sal/macros.h>
#include <hintids.hxx>
#include <editeng/ulspitem.hxx>
......@@ -462,6 +464,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
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
SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
......
......@@ -308,15 +308,7 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) const
{
writer.startElement("swtxtfmtcolls");
for (size_t i = 0; i < size(); ++i)
{
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();
}
GetFmt(i)->dumpAsXml(w);
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