From 43b84bbba2519686eb6b0463f422bf695d2d74b9 Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Mon, 26 Aug 2013 18:33:38 +0300 Subject: 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 Tested-by: Miklos Vajna --- drawinglayer/source/dumper/XShapeDumper.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drawinglayer/source/dumper') 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 >*, 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); -- cgit