summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2013-08-26 18:33:38 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-09-05 08:40:13 +0000
commit43b84bbba2519686eb6b0463f422bf695d2d74b9 (patch)
tree9beeb9c705ef08a3b45ac6e46176f3ea6c163baa /drawinglayer
parent6f135b0aa231a2543d73f94e39cb472e12ea47d5 (diff)
svx: new InteropGrabBag UNO prop in Shape service
Added the new InteropGrabBag property to the Shape service and modified the JUnit UNO unit tests for it. Added specific implementation in the svx module for the SvxShape class. This new property is intended by now for its usage on preserving OOX's Smart-Art but it could also be used for preserving other attributes for interoperability among document formats. Change-Id: Idc7a8e91592399ff05effd4da6eaa2935f8f4d42 Reviewed-on: https://gerrit.libreoffice.org/5769 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index caf3758bb79d..cc9eb4547360 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -37,6 +37,7 @@ namespace {
void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
void dumpPolyPolygonBezierCoords(com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter);
void dumpPointSequenceSequence(com::sun::star::drawing::PointSequenceSequence aPointSequenceSequence, uno::Sequence<uno::Sequence<drawing::PolygonFlags> >*, xmlTextWriterPtr xmlWriter);
+void dumpPropertyValueAsElement(const beans::PropertyValue& rPropertyValue, xmlTextWriterPtr xmlWriter);
// FillProperties.idl
void dumpFillStyleAsAttribute(com::sun::star::drawing::FillStyle eFillStyle, xmlTextWriterPtr xmlWriter);
@@ -133,6 +134,7 @@ void dumpHomogenMatrixLine3(com::sun::star::drawing::HomogenMatrixLine3 aLine, x
void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter);
void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter);
void dumpHyperlinkAsAttribute(OUString sHyperlink, xmlTextWriterPtr xmlWriter);
+void dumpInteropGrabBagAsElement(uno::Sequence< beans::PropertyValue> aInteropGrabBag, xmlTextWriterPtr xmlWriter);
// CustomShape.idl
void dumpCustomShapeEngineAsAttribute(OUString sCustomShapeEngine, xmlTextWriterPtr xmlWriter);
@@ -1052,6 +1054,17 @@ void dumpHyperlinkAsAttribute(OUString sHyperlink, xmlTextWriterPtr xmlWriter)
OUStringToOString(sHyperlink, RTL_TEXTENCODING_UTF8).getStr());
}
+void dumpInteropGrabBagAsElement(uno::Sequence< beans::PropertyValue> aInteropGrabBag, xmlTextWriterPtr xmlWriter)
+{
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "InteropGrabBag" ));
+
+ sal_Int32 nLength = aInteropGrabBag.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ dumpPropertyValueAsElement(aInteropGrabBag[i], xmlWriter);
+
+ xmlTextWriterEndElement( xmlWriter );
+}
+
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@@ -1154,6 +1167,10 @@ void dumpPropertyValueAsElement(const beans::PropertyValue& rPropertyValue, xmlT
xmlTextWriterEndElement(xmlWriter);
}
+
+ // TODO: Add here dumping of XDocument for future OOX Smart-Art
+ // properties.
+
// TODO more, if necessary
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("handle"), "%" SAL_PRIdINT32, rPropertyValue.Handle);