[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon May 19 10:49:04 PDT 2014
sw/inc/docary.hxx | 2 +-
sw/source/core/docnode/nodedump.cxx | 34 +++++++++++++++++++++++++++++++---
2 files changed, 32 insertions(+), 4 deletions(-)
New commits:
commit 36f58d4dd1ee5ebe220a5e1e7d1b28aeb15b8977
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon May 19 19:37:44 2014 +0200
sw doc model xml dump: handle SwDoc::mpFrmFmtTbl
Change-Id: Ie15ff20524e7065323e681945bb5eaf199a2bf3a
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index f628fb2..94f8229 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -81,7 +81,7 @@ public:
virtual SwFmt* GetFmt(size_t idx) const SAL_OVERRIDE { return (SwFmt*)operator[](idx); }
sal_uInt16 GetPos(const SwFrmFmt* pFmt) const;
bool Contains(const SwFrmFmt* pFmt) const;
- void dumpAsXml(xmlTextWriterPtr w);
+ void dumpAsXml(xmlTextWriterPtr w, const char* pName);
/// free's any remaining child objects
virtual ~SwFrmFmts();
};
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index ab888ad..83768c4 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -182,7 +182,8 @@ void SwDoc::dumpAsXml( xmlTextWriterPtr w )
mpFldTypes->dumpAsXml( writer );
mpTxtFmtCollTbl->dumpAsXml( writer );
mpCharFmtTbl->dumpAsXml( writer );
- mpSpzFrmFmtTbl->dumpAsXml( writer );
+ mpFrmFmtTbl->dumpAsXml( writer, "frmFmtTbl" );
+ mpSpzFrmFmtTbl->dumpAsXml( writer, "spzFrmFmtTbl" );
mpSectionFmtTbl->dumpAsXml( writer );
mpNumRuleTbl->dumpAsXml( writer );
mpRedlineTbl->dumpAsXml( writer );
@@ -489,6 +490,24 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
}
break;
}
+ case XATTR_FILLCOLOR:
+ pWhich = "fill color";
+ break;
+ case XATTR_FILLBITMAP:
+ pWhich = "fill bitmap";
+ break;
+ case XATTR_FILLTRANSPARENCE:
+ pWhich = "fill transparence";
+ break;
+ case XATTR_FILLBMP_TILE:
+ pWhich = "fill bitmap tile";
+ break;
+ case XATTR_FILLBMP_POS:
+ pWhich = "fill bitmap position";
+ break;
+ case XATTR_FILLBMP_STRETCH:
+ pWhich = "fill bitmap stretch";
+ break;
case RES_COL:
{
pWhich = "columns formatting";
@@ -505,6 +524,15 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_COLUMNBALANCE:
pWhich = "column balance";
break;
+ case RES_LR_SPACE:
+ pWhich = "left-right space";
+ break;
+ case RES_UL_SPACE:
+ pWhich = "upper-lower space";
+ break;
+ case RES_SHADOW:
+ pWhich = "shadow";
+ break;
}
if (pWhich)
writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich));
@@ -515,12 +543,12 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
}
}
-void SwFrmFmts::dumpAsXml(xmlTextWriterPtr w)
+void SwFrmFmts::dumpAsXml(xmlTextWriterPtr w, const char* pName)
{
WriterHelper writer(w);
if (size())
{
- writer.startElement("swfrmfmts");
+ writer.startElement(pName);
for (size_t i = 0; i < size(); ++i)
{
SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(GetFmt(i));
More information about the Libreoffice-commits
mailing list