Kaydet (Commit) 71edf281 authored tarafından Miklos Vajna's avatar Miklos Vajna

Factor out SvxShadowItem::dumpAsXml() from sw

Change-Id: Id25a050a9840d83cff4b390faec7478f17336524
üst be06f343
...@@ -1589,6 +1589,17 @@ void SvxShadowItem::SetEnumValue( sal_uInt16 nVal ) ...@@ -1589,6 +1589,17 @@ void SvxShadowItem::SetEnumValue( sal_uInt16 nVal )
SetLocation( (const SvxShadowLocation)nVal ); SetLocation( (const SvxShadowLocation)nVal );
} }
void SvxShadowItem::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("svxShadowItem"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aShadowColor"), BAD_CAST(aShadowColor.AsRGBHexString().toUtf8().getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidth"), BAD_CAST(OString::number(nWidth).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLocation"), BAD_CAST(OString::number(eLocation).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation).toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
}
// class SvxBoxItem ------------------------------------------------------ // class SvxBoxItem ------------------------------------------------------
SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) : SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) :
......
...@@ -83,6 +83,7 @@ public: ...@@ -83,6 +83,7 @@ public:
virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const SAL_OVERRIDE; virtual OUString GetValueTextByPos( sal_uInt16 nPos ) const SAL_OVERRIDE;
virtual sal_uInt16 GetEnumValue() const SAL_OVERRIDE; virtual sal_uInt16 GetEnumValue() const SAL_OVERRIDE;
virtual void SetEnumValue( sal_uInt16 nNewVal ) SAL_OVERRIDE; virtual void SetEnumValue( sal_uInt16 nNewVal ) SAL_OVERRIDE;
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
}; };
inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow ) inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow )
......
...@@ -496,6 +496,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -496,6 +496,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_UL_SPACE: case RES_UL_SPACE:
static_cast<const SvxULSpaceItem*>(pItem)->dumpAsXml(writer); static_cast<const SvxULSpaceItem*>(pItem)->dumpAsXml(writer);
break; break;
case RES_SHADOW:
static_cast<const SvxShadowItem*>(pItem)->dumpAsXml(writer);
break;
default: bDone = false; break; default: bDone = false; break;
} }
if (bDone) if (bDone)
...@@ -510,9 +513,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) ...@@ -510,9 +513,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue; boost::optional<OString> oValue;
switch (pItem->Which()) switch (pItem->Which())
{ {
case RES_SHADOW:
pWhich = "shadow";
break;
case RES_PAGEDESC: case RES_PAGEDESC:
{ {
pWhich = "page description"; pWhich = "page description";
......
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