diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-03 15:36:35 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:14 +0200 |
commit | 3b97877219087a0d47f55bf5b7a080e3ed0df8f6 (patch) | |
tree | 879fe62cb917d46d31e9fda560446e1bf485d061 /drawinglayer/source/dumper | |
parent | 4024d146109b86131a10a78627aa149321df9065 (diff) |
Added auxiliary method for dumping EnhancedCustomShapeParameterPair
Change-Id: I3e0eca4f042565e8b64ab3e7286f66033c0e75a3
Diffstat (limited to 'drawinglayer/source/dumper')
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 542a687b6c6c..85bfd276f9e1 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -64,3 +64,31 @@ void EnhancedShapeDumper::dumpBrightnessAsAttribute(double aBrightness) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("brightness"), "%f", aBrightness); } +void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair(drawing::EnhancedCustomShapeParameterPair aParameterPair) +{ + { + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "First" )); + uno::Any aAny = aParameterPair.First.Value; + rtl::OUString sValue; + if(aAny >>= sValue) + { + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s", + rtl::OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr()); + } + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aParameterPair.First.Type); + xmlTextWriterEndElement( xmlWriter ); + } + { + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Second" )); + uno::Any aAny = aParameterPair.Second.Value; + rtl::OUString sValue; + if(aAny >>= sValue) + { + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s", + rtl::OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr()); + } + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aParameterPair.Second.Type); + xmlTextWriterEndElement( xmlWriter ); + } +} + |