summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-14 09:05:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-14 09:05:57 +0100
commit97260d8a011d2dba69df47433bb73a6da0317352 (patch)
tree87223dc869880998084058280f4038e4d9245179 /sw/source
parent4efa9604cf90a581af05c231470bc3fe2e0c49ef (diff)
Factor out SwFmtEditInReadonly::dumpAsXml() from sw core
Change-Id: I0b0f5a7fca8c5cb4aefd355f79b5141ce9803a55
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/docnode/nodedump.cxx7
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx8
2 files changed, 12 insertions, 3 deletions
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*/,