summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-05 09:07:36 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-05 09:08:58 +0100
commit3434327a5f2559a6d24146b35236042fe8741038 (patch)
tree7b15fd1f346947fcb1f6366c34a003712ad66342 /editeng
parent166fe80d65f1d46e52d313cf8894d9604b6a2ab8 (diff)
Factor out SvxPostureItem::dumpAsXml() from sw
Again, the motivation is that dumper for something in editeng should be in that module as well, before home-grown dumpers are invented and duplicated e.g. in all sw/sc/sd. Change-Id: Icfeed9549efbd80226ff04e9070766188cc8646e
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/textitem.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index b4f5303ff383..aa0e57c99902 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -93,6 +93,7 @@
#include <editeng/charreliefitem.hxx>
#include <editeng/itemtype.hxx>
#include <editeng/eerdll.hxx>
+#include <libxml/xmlwriter.h>
#define STORE_UNICODE_MAGIC_MARKER 0xFE331188
@@ -588,6 +589,14 @@ void SvxPostureItem::SetBoolValue( bool bVal )
SetValue( (sal_uInt16)(bVal ? ITALIC_NORMAL : ITALIC_NONE) );
}
+void SvxPostureItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("svxPostureItem"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%" SAL_PRIuUINT32, Which());
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(GetValueTextByPos(GetValue()).toUtf8().getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// class SvxWeightItem ---------------------------------------------------
SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) :