summaryrefslogtreecommitdiff
path: root/drawinglayer/source
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-04 19:01:54 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:20 +0200
commitcf7e4d3cedaee86da6887ff068565185fee4874a (patch)
tree593b14f5ab41c4a28b823f61c691e7ea17e03685 /drawinglayer/source
parent72fc403a6f90a7b4db5956acf2a572856aee9f7b (diff)
Added dumping of TextPathAllowed & SubViewSize properties
Change-Id: I4088e15cf010f2c0c4493b9a7781c9720d375480
Diffstat (limited to 'drawinglayer/source')
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 40203097b680..735919b16cbc 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -877,6 +877,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
if(anotherAny >>= bConcentricGradientFillAllowed)
dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("TextPathAllowed");
+ sal_Bool bTextPathAllowed;
+ if(anotherAny >>= bTextPathAllowed)
+ dumpTextPathAllowedAsAttribute(bTextPathAllowed);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("SubViewSize");
+ uno::Sequence< awt::Size > aSubViewSize;
+ if(anotherAny >>= aSubViewSize)
+ dumpSubViewSizeAsElement(aSubViewSize);
+ }
}
void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -984,4 +996,24 @@ void EnhancedShapeDumper::dumpConcentricGradientFillAllowedAsAttribute(sal_Bool
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false");
}
+void EnhancedShapeDumper::dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed)
+{
+ if(bTextPathAllowed)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "false");
+}
+void EnhancedShapeDumper::dumpSubViewSizeAsElement(uno::Sequence< awt::Size > aSubViewSize)
+{
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SubViewSize" ));
+ sal_Int32 nLength = aSubViewSize.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Size" ));
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSubViewSize[i].Width);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSubViewSize[i].Height);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+ xmlTextWriterEndElement( xmlWriter );
+}