[Libreoffice-commits] core.git: drawinglayer/source include/editeng include/svl include/svx offapi/com qadevOOo/objdsc svx/source

Andres Gomez agomez at igalia.com
Thu Sep 5 01:40:33 PDT 2013


 drawinglayer/source/dumper/XShapeDumper.cxx                                |   17 +++++
 include/editeng/unoprnms.hxx                                               |    1 
 include/svl/solar.hrc                                                      |    2 
 include/svx/svdobj.hxx                                                     |   10 +++
 include/svx/unoshprp.hxx                                                   |    4 -
 offapi/com/sun/star/drawing/Shape.idl                                      |   13 +++-
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv       |    1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScShapeObj.csv                 |    1 
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartLegend.csv               |    1 
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartTitle.csv                |    1 
 qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXShape.csv                   |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxGraphicObject.csv          |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShape.csv                  |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeCircle.csv            |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeConnector.csv         |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeControl.csv           |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeDimensioning.csv      |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeGroup.csv             |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygon.csv       |    1 
 qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygonBezier.csv |    1 
 qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXShape.csv                   |    1 
 svx/source/svdraw/svdobj.cxx                                               |   31 ++++++++++
 svx/source/unodraw/unoshape.cxx                                            |   12 +++
 23 files changed, 102 insertions(+), 3 deletions(-)

New commits:
commit 43b84bbba2519686eb6b0463f422bf695d2d74b9
Author: Andres Gomez <agomez at igalia.com>
Date:   Mon Aug 26 18:33:38 2013 +0300

    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 at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index caf3758..cc9eb45 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);
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 38ba3bd..3fa0ebd 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -154,6 +154,7 @@
 #define UNO_NAME_POLYPOLYGONBEZIER              "PolyPolygonBezier"
 #define UNO_NAME_POLYGON                        "Polygon"
 
+#define UNO_NAME_MISC_OBJ_INTEROPGRABBAG        "InteropGrabBag"
 #define UNO_NAME_MISC_OBJ_ZORDER                "ZOrder"
 #define UNO_NAME_MISC_OBJ_MOVEPROTECT           "MoveProtect"
 #define UNO_NAME_MISC_OBJ_SIZEPROTECT           "SizeProtect"
diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc
index a761c7d..c399a1a 100644
--- a/include/svl/solar.hrc
+++ b/include/svl/solar.hrc
@@ -23,7 +23,7 @@
 // defines ------------------------------------------------------------------
 
 #define OWN_ATTR_VALUE_START                    3900
-#define OWN_ATTR_VALUE_END                      3990
+#define OWN_ATTR_VALUE_END                      3991
 
 #define RID_SFX_START               260
 //      RID_SFX_END                 9999
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 4ec301b..b0c6232 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -26,6 +26,7 @@
 #include <vcl/mapmod.hxx>
 #include <tools/string.hxx>
 #include <tools/weakbase.hxx>
+#include <com/sun/star/uno/Any.hxx>
 #include <svl/lstner.hxx>
 #include <vcl/timer.hxx>
 #include <svx/svdsob.hxx>
@@ -61,6 +62,7 @@ class SdrPage;
 class SdrPageView;
 class SdrView;
 class SfxItemSet;
+class SfxGrabBagItem;
 class SfxSetItem;
 class SfxStyleSheet;
 class SfxUndoAction;
@@ -357,6 +359,9 @@ protected:
 
     sal_uInt32                  nOrdNum;      // Rangnummer des Obj in der Liste
 
+    SfxGrabBagItem*             pGrabBagItem; // Holds the GrabBagItem property
+
+
     /** Position in the navigation order.  SAL_MAX_UINT32 when not used.
     */
     sal_uInt32                  mnNavigationPosition;
@@ -538,6 +543,11 @@ public:
     // geschehen.
     void SetOrdNum(sal_uInt32 nNum);
 
+    // GrabBagItem for interim interop purposes
+    void GetGrabBagItem(com::sun::star::uno::Any& rVal) const;
+
+    void SetGrabBagItem(const com::sun::star::uno::Any& rVal);
+
     /** Return the position in the navigation order for the called object.
         Note that this method may update the navigation position of the
         called and of other SdrObjects.  Therefore this method can not be
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 995eed8..3c35b39 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -186,7 +186,8 @@
 
 #define OWN_ATTR_MEDIA_STREAM                   (OWN_ATTR_VALUE_START+89)
 #define OWN_ATTR_MEDIA_TEMPFILEURL              (OWN_ATTR_VALUE_START+90)
-// ATTENTION: maximum is OWN_ATTR_VALUE_START+90, see svl/inc/svl/solar.hrc
+#define OWN_ATTR_INTEROPGRABBAG                 (OWN_ATTR_VALUE_START+91)
+// ATTENTION: maximum is OWN_ATTR_VALUE_START+91, see include/svl/solar.hrc
 
 // #FontWork#
 #define FONTWORK_PROPERTIES \
@@ -315,6 +316,7 @@
     { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT),        OWN_ATTR_BOUNDRECT,         &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
 
 #define MISC_OBJ_PROPERTIES \
+    { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_INTEROPGRABBAG),   OWN_ATTR_INTEROPGRABBAG,    SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)),  0,  0}, \
     MISC_OBJ_PROPERTIES_NO_SHEAR \
     { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SHEARANGLE),       SDRATTR_SHEARANGLE,         &::getCppuType((const sal_Int32*)0),        0,  0},
 
diff --git a/offapi/com/sun/star/drawing/Shape.idl b/offapi/com/sun/star/drawing/Shape.idl
index bc1ac37..64f8ab4 100644
--- a/offapi/com/sun/star/drawing/Shape.idl
+++ b/offapi/com/sun/star/drawing/Shape.idl
@@ -27,7 +27,7 @@
 #include <com/sun/star/drawing/XGluePointsSupplier.idl>
 #include <com/sun/star/container/XNameContainer.idl>
 #include <com/sun/star/beans/XTolerantMultiPropertySet.idl>
-
+#include <com/sun/star/beans/PropertyValue.idl>
 
  module com {  module sun {  module star {  module drawing {
 
@@ -153,6 +153,17 @@ published service Shape
     /** this property lets you get and set a hyperlink for this shape.
      */
     [optional, property] string Hyperlink;
+
+    /** Grab bag of shape properties, used as a string-any map for
+        interim interop purposes.
+
+        @since LibreOffice 4.2
+
+        <p>This property is intentionally not handled by the ODF
+        filter. Any member that should be handled there should be
+        first moved out from this grab bag to a separate property.</p>
+    */
+    [optional, property] sequence<com::sun::star::beans::PropertyValue> InteropGrabBag;
 };
 
 
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
index 8603486..66f2a89 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScAnnotationShapeObj.csv
@@ -76,6 +76,7 @@
 "ScAnnotationShapeObj";"com::sun::star::drawing::Shape";"Style#optional"
 "ScAnnotationShapeObj";"com::sun::star::drawing::Shape";"Transformation#optional"
 "ScAnnotationShapeObj";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"ScAnnotationShapeObj";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "ScAnnotationShapeObj";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "ScAnnotationShapeObj";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "ScAnnotationShapeObj";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScShapeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScShapeObj.csv
index e4cb081..607ebb7 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScShapeObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScShapeObj.csv
@@ -11,6 +11,7 @@
 "ScShapeObj";"com::sun::star::drawing::Shape";"Style#optional"
 "ScShapeObj";"com::sun::star::drawing::Shape";"Transformation#optional"
 "ScShapeObj";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"ScShapeObj";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "ScShapeObj";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "ScShapeObj";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "ScShapeObj";"com::sun::star::sheet::Shape";"Anchor"
diff --git a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartLegend.csv b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartLegend.csv
index 8622aca..1762649 100644
--- a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartLegend.csv
+++ b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartLegend.csv
@@ -12,6 +12,7 @@
 "ChartLegend";"com::sun::star::drawing::Shape";"Style#optional"
 "ChartLegend";"com::sun::star::drawing::Shape";"Transformation#optional"
 "ChartLegend";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"ChartLegend";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "ChartLegend";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "ChartLegend";"com::sun::star::drawing::LineProperties";"LineStyle"
 "ChartLegend";"com::sun::star::drawing::LineProperties";"LineDash"
diff --git a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartTitle.csv b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartTitle.csv
index 0bdbcc3..40b5311 100644
--- a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartTitle.csv
+++ b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChartTitle.csv
@@ -12,6 +12,7 @@
 "ChartTitle";"com::sun::star::drawing::Shape";"Style#optional"
 "ChartTitle";"com::sun::star::drawing::Shape";"Transformation#optional"
 "ChartTitle";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"ChartTitle";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "ChartTitle";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "ChartTitle";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "ChartTitle";"com::sun::star::chart::ChartTitle";"TextRotation"
diff --git a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXShape.csv b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXShape.csv
index 06fa7a0..de7cc83 100644
--- a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXShape.csv
+++ b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXShape.csv
@@ -11,6 +11,7 @@
 "SdXShape";"com::sun::star::drawing::Shape";"Style#optional"
 "SdXShape";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SdXShape";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SdXShape";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SdXShape";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "SdXShape";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "SdXShape";"com::sun::star::beans::XTolerantMultiPropertySet#optional";"setPropertyValuesTolerant()"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxGraphicObject.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxGraphicObject.csv
index b7605ee..9236825 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxGraphicObject.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxGraphicObject.csv
@@ -76,6 +76,7 @@
 "SvxGraphicObject";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxGraphicObject";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxGraphicObject";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxGraphicObject";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxGraphicObject";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxGraphicObject";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxGraphicObject";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShape.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShape.csv
index 7010893..96fa72a 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShape.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShape.csv
@@ -76,6 +76,7 @@
 "SvxShape";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShape";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShape";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShape";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShape";"com::sun::star::drawing::TextShape";"CornerRadius"
 "SvxShape";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShape";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeCircle.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeCircle.csv
index 8e1814d..8624bbb 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeCircle.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeCircle.csv
@@ -76,6 +76,7 @@
 "SvxShapeCircle";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapeCircle";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapeCircle";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapeCircle";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapeCircle";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShapeCircle";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxShapeCircle";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeConnector.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeConnector.csv
index 95b9abe..4502a89 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeConnector.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeConnector.csv
@@ -76,6 +76,7 @@
 "SvxShapeConnector";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapeConnector";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapeConnector";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapeConnector";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapeConnector";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShapeConnector";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxShapeConnector";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeControl.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeControl.csv
index 945c4fc..cc05a7c 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeControl.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeControl.csv
@@ -11,6 +11,7 @@
 "SvxShapeControl";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapeControl";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapeControl";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapeControl";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapeControl";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "SvxShapeControl";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "SvxShapeControl";"com::sun::star::drawing::XControlShape";"getControl()"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeDimensioning.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeDimensioning.csv
index 1713d9c..7ae14a3 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeDimensioning.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeDimensioning.csv
@@ -94,6 +94,7 @@
 "SvxShapeDimensioning";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapeDimensioning";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapeDimensioning";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapeDimensioning";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapeDimensioning";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShapeDimensioning";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxShapeDimensioning";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeGroup.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeGroup.csv
index c20164a..31cf3df 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeGroup.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapeGroup.csv
@@ -13,6 +13,7 @@
 "SvxShapeGroup";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapeGroup";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapeGroup";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapeGroup";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapeGroup";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "SvxShapeGroup";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "SvxShapeGroup";"com::sun::star::drawing::XShapeGroup";"enterGroup()"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygon.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygon.csv
index 9fdea2b..c266cb7 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygon.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygon.csv
@@ -76,6 +76,7 @@
 "SvxShapePolyPolygon";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapePolyPolygon";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapePolyPolygon";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapePolyPolygon";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapePolyPolygon";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShapePolyPolygon";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxShapePolyPolygon";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygonBezier.csv b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygonBezier.csv
index ad9eb30..f57e463 100644
--- a/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygonBezier.csv
+++ b/qadevOOo/objdsc/svx/com.sun.star.comp.office.SvxShapePolyPolygonBezier.csv
@@ -79,6 +79,7 @@
 "SvxShapePolyPolygonBezier";"com::sun::star::drawing::Shape";"Style#optional"
 "SvxShapePolyPolygonBezier";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SvxShapePolyPolygonBezier";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SvxShapePolyPolygonBezier";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SvxShapePolyPolygonBezier";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharHeightComplex"
 "SvxShapePolyPolygonBezier";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharWeightComplex"
 "SvxShapePolyPolygonBezier";"com::sun::star::style::CharacterPropertiesComplex#optional";"CharFontNameComplex"
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXShape.csv b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXShape.csv
index ca857ce..17acfb9 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXShape.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXShape.csv
@@ -11,6 +11,7 @@
 "SwXShape";"com::sun::star::drawing::Shape";"Style#optional"
 "SwXShape";"com::sun::star::drawing::Shape";"Transformation#optional"
 "SwXShape";"com::sun::star::drawing::Shape";"ShapeUserDefinedAttributes#optional"
+"SwXShape";"com::sun::star::drawing::Shape";"InteropGrabBag#optional"
 "SwXShape";"com::sun::star::drawing::XShapeDescriptor";"getShapeType()"
 "SwXShape";"com::sun::star::drawing::XGluePointsSupplier#optional";"getGluePoints()"
 "SwXShape";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 0414d03..ec30110 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -38,6 +38,7 @@
 #include <sfx2/objface.hxx>
 #include <sfx2/objsh.hxx>
 #include <svl/whiter.hxx>
+#include <svl/grabbagitem.hxx>
 #include <svtools/colorcfg.hxx>
 #include <tools/bigint.hxx>
 #include <tools/diagnose_ex.h>
@@ -433,6 +434,7 @@ SdrObject::SdrObject()
     ,pUserCall(NULL)
     ,pPlusData(NULL)
     ,nOrdNum(0)
+    ,pGrabBagItem(NULL)
     ,mnNavigationPosition(SAL_MAX_UINT32)
     ,mnLayerID(0)
     ,mpSvxShape( NULL )
@@ -501,6 +503,8 @@ SdrObject::~SdrObject()
     SendUserCall(SDRUSERCALL_DELETE, GetLastBoundRect());
     delete pPlusData;
 
+    delete pGrabBagItem;
+
     if(mpProperties)
     {
         delete mpProperties;
@@ -906,6 +910,27 @@ void SdrObject::SetOrdNum(sal_uInt32 nNum)
     nOrdNum = nNum;
 }
 
+void SdrObject::GetGrabBagItem(com::sun::star::uno::Any& rVal) const
+{
+    if (pGrabBagItem != NULL)
+        pGrabBagItem->QueryValue(rVal);
+    else {
+        uno::Sequence<beans::PropertyValue> aValue(0);
+        rVal = uno::makeAny(aValue);
+    }
+}
+
+void SdrObject::SetGrabBagItem(const com::sun::star::uno::Any& rVal)
+{
+    if (pGrabBagItem == NULL)
+        pGrabBagItem = new SfxGrabBagItem;
+
+    pGrabBagItem->PutValue(rVal);
+
+    SetChanged();
+    BroadcastObjectChange();
+}
+
 sal_uInt32 SdrObject::GetNavigationPosition (void)
 {
     if (pObjList!=NULL && pObjList->RecalcNavigationPositions())
@@ -1086,6 +1111,12 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
         delete pPlusData->pBroadcast; // broadcaster isn't copied
         pPlusData->pBroadcast=NULL;
     }
+
+    delete pGrabBagItem;
+    pGrabBagItem=NULL;
+    if (rObj.pGrabBagItem!=NULL)
+        pGrabBagItem=static_cast< SfxGrabBagItem* >( rObj.pGrabBagItem->Clone() );
+
     aGridOffset = rObj.aGridOffset;
     return *this;
 }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 012d567..50330d4 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2451,6 +2451,12 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
         break;
     }
 
+    case OWN_ATTR_INTEROPGRABBAG:
+    {
+        mpObj->SetGrabBagItem(rValue);
+        return true;
+    }
+
     case SDRATTR_OBJMOVEPROTECT:
     {
         sal_Bool bMoveProtect = sal_Bool();
@@ -2854,6 +2860,12 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
         rValue <<= (sal_Int32)mpObj->GetShearAngle();
         break;
 
+    case OWN_ATTR_INTEROPGRABBAG:
+    {
+        mpObj->GetGrabBagItem(rValue);
+        break;
+    }
+
     case SDRATTR_OBJMOVEPROTECT:
         rValue = uno::makeAny( (sal_Bool) mpObj->IsMoveProtect() );
         break;


More information about the Libreoffice-commits mailing list