diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-04 03:20:19 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:16 +0200 |
commit | a2f212927728a4c0d8f2497b6d9335fc0cd37680 (patch) | |
tree | 6f91b9c9d58255afa854f832c7c5da716b26e8f7 /drawinglayer | |
parent | 62b1ad1d484786015be443145cf02b4943338275 (diff) |
Added EnhancedCustomShapeGeometry service & Type property
Change-Id: I38c60a10fc378a840f4bd267a9d6bec529906ca8
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx | 4 | ||||
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 18 | ||||
-rw-r--r-- | drawinglayer/source/dumper/XShapeDumper.cxx | 5 |
3 files changed, 27 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index eaf7e9e01cd7..a461a88e1634 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -78,6 +78,10 @@ public: void dumpOriginAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aOrigin); void dumpExtrusionColorAsAttribute(sal_Bool bExtrusionColor); + // EnhancedCustomShapeGeometry.idl + void dumpEnhancedCustomShapeGeometryService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet); + void dumpTypeAsAttribute(rtl::OUString sType); + private: xmlTextWriterPtr xmlWriter; }; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 3006e370fbe8..10f7572d3adc 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -391,3 +391,21 @@ void EnhancedShapeDumper::dumpExtrusionColorAsAttribute(sal_Bool bExtrusionColor xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionColor"), "%s", "false"); } +// ------------------------------------------------------ +// ---------- EnhancedCustomShapeGeometry.idl ----------- +// ------------------------------------------------------ + +void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(uno::Reference< beans::XPropertySet > xPropSet) +{ + { + uno::Any anotherAny = xPropSet->getPropertyValue("Type"); + rtl::OUString sType; + if(anotherAny >>= sType) + dumpTypeAsAttribute(sType); + } +} +void EnhancedShapeDumper::dumpTypeAsAttribute(rtl::OUString sType) + { + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s", + rtl::OUStringToOString(sType, RTL_TEXTENCODING_UTF8).getStr()); + } diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 7a3a18ac7e1d..24b9d12c75ea 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -1818,7 +1818,12 @@ namespace { EnhancedShapeDumper enhancedDumper(xmlWriter); enhancedDumper.dumpEnhancedCustomShapeExtrusionService(xPropSet); } + if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeGeometry")) + { + EnhancedShapeDumper enhancedDumper(xmlWriter); + enhancedDumper.dumpEnhancedCustomShapeGeometryService(xPropSet); } + } // end of the 'try' block catch (com::sun::star::beans::UnknownPropertyException &e) { printf("Problem in the XShapeDumper"); |