diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-14 09:05:18 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-14 09:05:57 +0100 |
commit | 97260d8a011d2dba69df47433bb73a6da0317352 (patch) | |
tree | 87223dc869880998084058280f4038e4d9245179 | |
parent | 4efa9604cf90a581af05c231470bc3fe2e0c49ef (diff) |
Factor out SwFmtEditInReadonly::dumpAsXml() from sw core
Change-Id: I0b0f5a7fca8c5cb4aefd355f79b5141ce9803a55
-rw-r--r-- | sw/inc/fmteiro.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/utlui/attrdesc.cxx | 8 |
3 files changed, 13 insertions, 3 deletions
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx index 4be9b7a86af2..1d6e365c5dff 100644 --- a/sw/inc/fmteiro.hxx +++ b/sw/inc/fmteiro.hxx @@ -39,6 +39,7 @@ public: SfxMapUnit ePresMetric, OUString &rText, const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE; + void dumpAsXml(struct _xmlTextWriter* pWriter) const; }; inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(bool bInP) const diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 4f0e834896b4..381689d70077 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -25,6 +25,7 @@ #include "fmtcntnt.hxx" #include "fmtornt.hxx" #include "fmtfsize.hxx" +#include "fmteiro.hxx" #include "charfmt.hxx" #include "frmfmt.hxx" #include "fmtanchr.hxx" @@ -482,6 +483,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) case RES_PROTECT: static_cast<const SvxProtectItem*>(pItem)->dumpAsXml(writer); break; + case RES_EDIT_IN_READONLY: + static_cast<const SwFmtEditInReadonly*>(pItem)->dumpAsXml(writer); + break; default: bDone = false; break; } if (bDone) @@ -496,9 +500,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) boost::optional<OString> oValue; switch (pItem->Which()) { - case RES_EDIT_IN_READONLY: - pWhich = "edit in read-only"; - break; case RES_COLUMNBALANCE: pWhich = "column balance"; break; diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 26ca4903e586..67479ebb562c 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -549,6 +549,14 @@ bool SwFmtEditInReadonly::GetPresentation return true; } +void SwFmtEditInReadonly::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtEditInReadonly")); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr())); + xmlTextWriterEndElement(pWriter); +} + bool SwFmtLayoutSplit::GetPresentation ( SfxItemPresentation /*ePres*/, |