summaryrefslogtreecommitdiff
path: root/drawinglayer/source/dumper
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-04 04:07:27 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:17 +0200
commit30b646a4cf8fc9a455b52f9b83ec08c68928adfc (patch)
tree751c701b115c63d6601323b7df3bc565602ee138 /drawinglayer/source/dumper
parent1579148e83835b519c82add6b3a2e162b2875c73 (diff)
Added Equations & Handles properties
Change-Id: I7912399d2864c964483bbbbc0a6afac3bfa64f66
Diffstat (limited to 'drawinglayer/source/dumper')
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx45
1 files changed, 45 insertions, 0 deletions
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 63fea5fcb1c6..8556b3a61866 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -451,6 +451,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(uno::Reference<
if(anotherAny >>= aTextPath)
dumpTextPathAsElement(aTextPath);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Equations");
+ uno::Sequence< rtl::OUString > aEquations;
+ if(anotherAny >>= aEquations)
+ dumpEquationsAsElement(aEquations);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Handles");
+ uno::Sequence< beans::PropertyValues > aHandles;
+ if(anotherAny >>= aHandles)
+ dumpHandlesAsElement(aHandles);
+ }
}
void EnhancedShapeDumper::dumpTypeAsAttribute(rtl::OUString sType)
{
@@ -587,3 +599,36 @@ void EnhancedShapeDumper::dumpTextPathAsElement(uno::Sequence< beans::PropertyVa
xmlTextWriterEndElement( xmlWriter );
}
+void EnhancedShapeDumper::dumpEquationsAsElement(uno::Sequence< rtl::OUString > aEquations)
+{
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Equations" ));
+ sal_Int32 nLength = aEquations.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
+ rtl::OUStringToOString(aEquations[i], RTL_TEXTENCODING_UTF8).getStr());
+ }
+ xmlTextWriterEndElement( xmlWriter );
+}
+
+// PropertyValues specifies a sequence of PropertyValue instances.
+// so in this case it's a Sequence of a Sequence of a PropertyValue instances.
+// Welcome to Sequenception again.
+void EnhancedShapeDumper::dumpHandlesAsElement(uno::Sequence< beans::PropertyValues > aHandles)
+{
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Handles" ));
+ sal_Int32 nSequenceLength = aHandles.getLength();
+ for (sal_Int32 i = 0; i < nSequenceLength; ++i)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValues" ));
+ uno::Sequence< beans::PropertyValue > propertyValueSequence = aHandles[i];
+ sal_Int32 nLength = propertyValueSequence.getLength();
+ for (sal_Int32 j = 0; j < nLength; ++j)
+ {
+ dumpPropertyValueAsElement(propertyValueSequence[j]);
+ }
+ xmlTextWriterEndElement( xmlWriter );
+ }
+ xmlTextWriterEndElement( xmlWriter );
+}
+