[Libreoffice-commits] .: 4 commits - oox/inc oox/source

Radek Doulík rodo at kemper.freedesktop.org
Thu Apr 14 06:21:20 PDT 2011


 oox/inc/oox/helper/propertymap.hxx             |    2 
 oox/source/drawingml/customshapeproperties.cxx |  313 ++++++++++
 oox/source/drawingml/shape.cxx                 |    2 
 oox/source/helper/propertymap.cxx              |  717 ++++++++++++++++++++++++-
 4 files changed, 1021 insertions(+), 13 deletions(-)

New commits:
commit 88e5e837c3fec0f98da96a262141e170d86d9567
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Apr 14 15:19:53 2011 +0200

    fix crash in fdo#36203, the referenced shape didn't contain texbody

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 39bcd7b..1864125 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -198,7 +198,7 @@ void Shape::addShape(
 
 void Shape::applyShapeReference( const Shape& rReferencedShape )
 {
-    mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() ) );
+    mpTextBody = TextBodyPtr( rReferencedShape.mpTextBody.get() ? new TextBody( *rReferencedShape.mpTextBody.get() ) : new TextBody() );
     maShapeProperties = rReferencedShape.maShapeProperties;
     mpLinePropertiesPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) );
     mpFillPropertiesPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );
commit 0158d851b05cd8c478096f105dd1a0987856e644
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Apr 14 13:51:24 2011 +0200

    dump property map of customshape preset only when building with debug

diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 7f7b740..cc174f7 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -389,8 +389,10 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
             aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
             OSL_TRACE("created ooxml preset");
 
+#ifdef DEBUG
             aPropertyMap.dump();
             aPropertyMap.dumpCode();
+#endif
         } else {
             //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY );
             Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY );
commit 341239119f04a4cb847a7f764d77d3ae264b0b6f
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Apr 14 10:34:38 2011 +0200

    added preset for right-arrow - proof of concept

diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 7037b09..7f7b740 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -45,6 +45,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::graphic;
 using namespace ::com::sun::star::drawing;
 
+# define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()
+
 namespace oox { namespace drawingml {
 
 CustomShapeProperties::CustomShapeProperties()
@@ -94,10 +96,307 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
 {
     if ( maShapePresetType.getLength() )
     {
-        //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY );
-        Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY );
-        if( xDefaulter.is() )
-            xDefaulter->createCustomShapeDefaults( maShapePresetType );
+        static OUString sRightArrow = CREATE_OUSTRING("right-arrow");
+        if ( maShapePresetType.equals( sRightArrow ) ) {
+
+            PropertyMap aPropertyMap;
+
+    Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
+    {
+        Any aAny ((sal_Int32) 18000);
+        aAdjSequence [0].Value = aAny;
+    }
+    {
+        Any aAny ((sal_Int32) 10000);
+        aAdjSequence [1].Value = aAny;
+    }
+    aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+
+    Sequence< OUString > aStringSequence (15);
+    aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
+    aStringSequence[1] = CREATE_OUSTRING ("20000*width/?0 ");
+    aStringSequence[2] = CREATE_OUSTRING ("if(0-$0 ,0,if(20000-$0 ,$0 ,20000))");
+    aStringSequence[3] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))");
+    aStringSequence[4] = CREATE_OUSTRING ("?0 *?3 /20000");
+    aStringSequence[5] = CREATE_OUSTRING ("width+0-?4 ");
+    aStringSequence[6] = CREATE_OUSTRING ("height*?2 /40000");
+    aStringSequence[7] = CREATE_OUSTRING ("height/2");
+    aStringSequence[8] = CREATE_OUSTRING ("?7 +0-?6 ");
+    aStringSequence[9] = CREATE_OUSTRING ("?7 +?6 -0");
+    aStringSequence[10] = CREATE_OUSTRING ("height/2");
+    aStringSequence[11] = CREATE_OUSTRING ("?8 *?4 /?10 ");
+    aStringSequence[12] = CREATE_OUSTRING ("?5 +?11 -0");
+    aStringSequence[13] = CREATE_OUSTRING ("height");
+    aStringSequence[14] = CREATE_OUSTRING ("width");
+    aPropertyMap [PROP_Equations] <<= aStringSequence;
+
+    Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
+    {
+        Sequence< PropertyValue > aPropSequence (4);
+        {
+            aPropSequence [0].Name = CREATE_OUSTRING ("Position");
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aPropSequence [0].Value = makeAny (aParameterPair);
+        }
+        {
+            aPropSequence [1].Name = CREATE_OUSTRING ("RangeYMaximum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((sal_Int32) 20000);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [1].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [2].Name = CREATE_OUSTRING ("RangeYMinimum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((sal_Int32) 0);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [2].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [3].Name = CREATE_OUSTRING ("RefY");
+            Any aAny ((sal_Int32) 0);
+            aPropSequence [3].Value = makeAny (aAny);
+        }
+        aPropSequenceSequence [0] = aPropSequence;
+    }
+    {
+        Sequence< PropertyValue > aPropSequence (4);
+        {
+            aPropSequence [0].Name = CREATE_OUSTRING ("Position");
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.Second = aParameter;
+            }
+            aPropSequence [0].Value = makeAny (aParameterPair);
+        }
+        {
+            aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((sal_Int32) 1);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+            aPropSequence [1].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((sal_Int32) 0);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [2].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [3].Name = CREATE_OUSTRING ("RefX");
+            Any aAny ((sal_Int32) 1);
+            aPropSequence [3].Value = makeAny (aAny);
+        }
+        aPropSequenceSequence [1] = aPropSequence;
+    }
+    aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
+
+    aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+
+    aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+
+    Sequence< PropertyValue > aPropSequence (2);
+    {
+        aPropSequence [0].Name = CREATE_OUSTRING ("Coordinates");
+        Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (7);
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [0] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [1] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [2] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 14);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 7);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [3] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 13);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [4] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 9);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [5] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((sal_Int32) 9);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [6] = aParameterPair;
+        }
+        aPropSequence [0].Value = makeAny (aParameterPairSeq);
+    }
+    {
+        aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
+        Sequence< EnhancedCustomShapeSegment > aSegmentSeq (4);
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 1;
+            aSegment.Count = 1;
+            aSegmentSeq [0] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 2;
+            aSegment.Count = 6;
+            aSegmentSeq [1] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 4;
+            aSegment.Count = 0;
+            aSegmentSeq [2] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 5;
+            aSegment.Count = 0;
+            aSegmentSeq [3] = aSegment;
+        }
+        aPropSequence [1].Value = makeAny (aSegmentSeq);
+    }
+    aPropertyMap [PROP_Path] <<= aPropSequence;
+
+    awt::Rectangle aRectangle;
+    aRectangle.X = 0;
+    aRectangle.Y = 0;
+    aRectangle.Width = 1050480;
+    aRectangle.Height = 456840;
+    aPropertyMap [PROP_ViewBox] <<= aRectangle;
+
+
+            aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-right-arrow");
+            //aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" );
+
+            Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+            PropertySet aPropSet( xPropSet );
+            aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+            OSL_TRACE("created ooxml preset");
+
+            aPropertyMap.dump();
+            aPropertyMap.dumpCode();
+        } else {
+            //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY );
+            Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY );
+            if( xDefaulter.is() )
+                xDefaulter->createCustomShapeDefaults( maShapePresetType );
+        }
 
         if ( maAdjustmentGuideList.size() )
         {
@@ -141,7 +440,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
                             xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
                         }
                     }
-                    else if ( aGeoPropSeq[ i ].Name.equals( sType ) )
+                    else if ( aGeoPropSeq[ i ].Name.equals( sType ) && !maShapePresetType.equals ( CREATE_OUSTRING ( "right-arrow" ) ) )
                     {
                         aGeoPropSeq[ i ].Value <<= maShapePresetType;
                     }
@@ -255,6 +554,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
         aPropertyMap[ PROP_Handles ] <<= aHandles;
 
         // converting the vector to a sequence
+        // aPropertyMap.dump();
+        // aPropertyMap.dumpCode();
         Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
         PropertySet aPropSet( xPropSet );
         aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 5d3e245..e2eb4ca 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -684,7 +684,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
             return "aParameter";
         } else if( value >>= longValue ) {
             printLevel (level);
-            fprintf (stderr,"Any aAny ((long) %ld);\n", longValue);
+            fprintf (stderr,"Any aAny ((sal_Int32) %ld);\n", longValue);
             return "aAny";
         } else if( value >>= intValue )
             fprintf (stderr,"%"SAL_PRIdINT32"            (hex: %"SAL_PRIxUINT32")\n", intValue, intValue);
commit 3e1e830faf40ce3b92f97770fa91c2a6773fee6d
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Apr 14 10:29:36 2011 +0200

    added method to dump code for enhanced custom shape presets

diff --git a/oox/inc/oox/helper/propertymap.hxx b/oox/inc/oox/helper/propertymap.hxx
index 58dc540..24b6d07 100644
--- a/oox/inc/oox/helper/propertymap.hxx
+++ b/oox/inc/oox/helper/propertymap.hxx
@@ -94,6 +94,8 @@ public:
 #if OSL_DEBUG_LEVEL > 0
   static void dump( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet);
   void dump();
+  static void dumpCode( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet);
+  void dumpCode();
 #endif
 private:
     const PropertyNameVector* mpPropNames;
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index aa7059c..5d3e245 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -27,6 +27,7 @@
  ************************************************************************/
 
 #include "oox/helper/propertymap.hxx"
+#include "oox/helper/helper.hxx"
 
 #if OSL_DEBUG_LEVEL > 0
 # include <cstdio>
@@ -42,8 +43,14 @@ using ::com::sun::star::text::WritingMode;
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
 #include <cppuhelper/implbase2.hxx>
 #include <osl/mutex.hxx>
 #include "oox/token/propertynames.hxx"
@@ -272,6 +279,17 @@ Reference< XPropertySet > PropertyMap::makePropertySet() const
 static void lclDumpAnyValue( Any value)
 {
         OUString strValue;
+        Sequence< OUString > strArray;
+        Sequence< Any > anyArray;
+        Sequence< PropertyValue > propArray;
+        Sequence< Sequence< PropertyValue > > propArrayArray;
+        Sequence< EnhancedCustomShapeAdjustmentValue > adjArray;
+        Sequence< EnhancedCustomShapeSegment > segArray;
+        Sequence< EnhancedCustomShapeParameterPair > ppArray;
+        EnhancedCustomShapeSegment segment;
+        EnhancedCustomShapeParameterPair pp;
+        EnhancedCustomShapeParameter par;
+        HomogenMatrix3 aMatrix;
         sal_Int32 intValue = 0;
         sal_uInt32 uintValue = 0;
         sal_Int16 int16Value = 0;
@@ -287,7 +305,59 @@ static void lclDumpAnyValue( Any value)
 
         if( value >>= strValue )
             fprintf (stderr,"\"%s\"\n", USS( strValue ) );
-        else if( value >>= intValue )
+        else if( value >>= strArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<strArray.getLength(); i++ )
+                fprintf (stderr,"\t\t\t[%3d] \"%s\"\n", i, USS( strArray[i] ) );
+        } else if( value >>= propArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<propArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] %s (%s) ", i, USS( propArray[i].Name ), USS(propArray[i].Value.getValueTypeName()) );
+                lclDumpAnyValue( propArray[i].Value );
+            }
+        } else if( value >>= propArrayArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<propArrayArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] ", i);
+                lclDumpAnyValue( makeAny (propArrayArray[i]) );
+            }
+        } else if( value >>= anyArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<anyArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(value.getValueTypeName()) );
+                lclDumpAnyValue( anyArray[i] );
+            }
+        } else if( value >>= adjArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<adjArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(adjArray[i].Value.getValueTypeName()) );
+                lclDumpAnyValue( adjArray[i].Value );
+            }
+        } else if( value >>= segArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<segArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] ", i );
+                lclDumpAnyValue( makeAny( segArray[i] ) );
+            }
+        } else if( value >>= ppArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<ppArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] ", i );
+                lclDumpAnyValue( makeAny( ppArray[i] ) );
+            }
+        } else if( value >>= segment ) {
+            fprintf (stderr,"Command: %d Count: %d\n", segment.Command, segment.Count);
+        } else if( value >>= pp ) {
+            fprintf (stderr,"First: ");
+            lclDumpAnyValue( makeAny (pp.First) );
+            fprintf (stderr,"\t\t\t      Second: ");
+            lclDumpAnyValue( makeAny (pp.Second) );
+        } else if( value >>= par ) {
+            fprintf (stderr,"Parameter (%s): ", USS(par.Value.getValueTypeName()));
+            lclDumpAnyValue( par.Value );
+        } else if( value >>= aMatrix ) {
+            fprintf (stderr,"Matrix\n%f %f %f\n%f %f %f\n%f %f %f\n", aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3, aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3, aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3);
+        } else if( value >>= intValue )
             fprintf (stderr,"%"SAL_PRIdINT32"            (hex: %"SAL_PRIxUINT32")\n", intValue, intValue);
         else if( value >>= uintValue )
             fprintf (stderr,"%"SAL_PRIdINT32"            (hex: %"SAL_PRIxUINT32")\n", uintValue, uintValue);
@@ -301,6 +371,338 @@ static void lclDumpAnyValue( Any value)
             fprintf (stderr,"%d            (bool)\n", boolValue);
         else if( value >>= xNumRule ) {
             fprintf (stderr, "XIndexReplace\n");
+            if (xNumRule.is()) {
+                for (int k=0; k<xNumRule->getCount(); k++) {
+                    Sequence< PropertyValue > aBulletPropSeq;
+                    fprintf (stderr, "level %d\n", k);
+                    if (xNumRule->getByIndex (k) >>= aBulletPropSeq) {
+                        for (int j=0; j<aBulletPropSeq.getLength(); j++) {
+                            fprintf(stderr, "%46s = ", USS (aBulletPropSeq[j].Name));
+                            lclDumpAnyValue (aBulletPropSeq[j].Value);
+                        }
+                    }
+                }
+            } else {
+                fprintf (stderr, "empty reference\n");
+            }
+        } else if( value >>= aWritingMode )
+            fprintf (stderr, "%d writing mode\n", aWritingMode);
+        else if( value >>= aTextVertAdj ) {
+            const char* s = "uknown";
+            switch( aTextVertAdj ) {
+            case TextVerticalAdjust_TOP:
+                s = "top";
+                break;
+            case TextVerticalAdjust_CENTER:
+                s = "center";
+                break;
+            case TextVerticalAdjust_BOTTOM:
+                s = "bottom";
+                break;
+            case TextVerticalAdjust_BLOCK:
+                s = "block";
+                break;
+            case TextVerticalAdjust_MAKE_FIXED_SIZE:
+                s = "make_fixed_size";
+                break;
+        }
+        fprintf (stderr, "%s\n", s);
+    } else if( value >>= aTextHorizAdj ) {
+        const char* s = "uknown";
+        switch( aTextHorizAdj ) {
+            case TextHorizontalAdjust_LEFT:
+                s = "left";
+                break;
+            case TextHorizontalAdjust_CENTER:
+                s = "center";
+                break;
+            case TextHorizontalAdjust_RIGHT:
+                s = "right";
+                break;
+            case TextHorizontalAdjust_BLOCK:
+                s = "block";
+                break;
+            case TextHorizontalAdjust_MAKE_FIXED_SIZE:
+                s = "make_fixed_size";
+                break;
+        }
+        fprintf (stderr, "%s\n", s);
+    } else if( value >>= spacing ) {
+        fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height);
+    } else if( value.isExtractableTo(::getCppuType((const sal_Int32*)0))) {
+        fprintf (stderr,"is extractable to int32\n");
+    }
+//         else if( value >>= pointValue )
+//             fprintf (stderr,"%d            (RectanglePoint)\n", pointValue);
+        else
+      fprintf (stderr,"???           <unhandled type %s>\n", USS(value.getValueTypeName()));
+}
+
+void PropertyMap::dump( Reference< XPropertySet > rXPropSet )
+{
+    Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
+    Sequence< Property > props = info->getProperties ();
+
+    OSL_TRACE("dump props, len: %d", props.getLength ());
+
+    for (int i=0; i < props.getLength (); i++) {
+        OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8);
+        fprintf (stderr,"%30s = ", name.getStr() );
+
+        try {
+            lclDumpAnyValue (rXPropSet->getPropertyValue( props [i].Name ));
+        } catch (const Exception& e) {
+            fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name));
+        }
+    }
+}
+
+void PropertyMap::dump()
+{
+    dump( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) );
+}
+
+static void printLevel (int level)
+{
+    for (int i=0; i<level; i++)
+        fprintf (stderr, "    ");
+}
+
+static const char* lclDumpAnyValueCode( Any value, int level = 0)
+{
+    static OUString sVoid = CREATE_OUSTRING("void");
+    OUString strValue;
+    Sequence< OUString > strArray;
+    Sequence< Any > anyArray;
+    Sequence< PropertyValue > propArray;
+    Sequence< Sequence< PropertyValue > > propArrayArray;
+    Sequence< EnhancedCustomShapeAdjustmentValue > adjArray;
+    Sequence< EnhancedCustomShapeSegment > segArray;
+    Sequence< EnhancedCustomShapeParameterPair > ppArray;
+    EnhancedCustomShapeSegment segment;
+    EnhancedCustomShapeParameterPair pp;
+    EnhancedCustomShapeParameter par;
+    awt::Rectangle rect;
+    sal_Int32 intValue = 0;
+    sal_uInt32 uintValue = 0;
+    sal_Int16 int16Value = 0;
+    sal_uInt16 uint16Value = 0;
+    long longValue;
+    float floatValue = 0;
+    bool boolValue = false;
+    LineSpacing spacing;
+//         RectanglePoint pointValue;
+    WritingMode aWritingMode;
+    TextVerticalAdjust aTextVertAdj;
+    TextHorizontalAdjust aTextHorizAdj;
+    Reference< XIndexReplace > xNumRule;
+
+        if( value >>= strValue )
+            fprintf (stderr,"\"%s\"\n", USS( strValue ) );
+        else if( value >>= strArray ) {
+            printLevel (level);
+            fprintf (stderr,"Sequence< OUString > aStringSequence (%d);\n", strArray.getLength());
+            for( int i=0; i<strArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr,"aStringSequence[%d] = CREATE_OUSTRING (\"%s\");\n", i, USS( strArray[i] ) );
+            }
+            return "aStringSequence";
+        } else if( value >>= propArray ) {
+            printLevel (level);
+            fprintf (stderr,"Sequence< PropertyValue > aPropSequence (%d);\n", propArray.getLength());
+            for( int i=0; i<propArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr, "{\n");
+                printLevel (level + 1);
+                fprintf (stderr, "aPropSequence [%d].Name = CREATE_OUSTRING (\"%s\");\n", i, USS( propArray[i].Name ));
+                const char *var = lclDumpAnyValueCode( propArray[i].Value, level + 1 );
+                printLevel (level + 1);
+                fprintf (stderr, "aPropSequence [%d].Value = makeAny (%s);\n", i, var);
+                printLevel (level);
+                fprintf (stderr, "}\n");
+            }
+            return "aPropSequence";
+        } else if( value >>= propArrayArray ) {
+            printLevel (level);
+            fprintf (stderr,"Sequence< Sequence < PropertyValue > > aPropSequenceSequence (%d);\n", propArrayArray.getLength());
+            for( int i=0; i<propArrayArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr, "{\n");
+                const char *var = lclDumpAnyValueCode( makeAny (propArrayArray[i]), level + 1 );
+                printLevel (level + 1);
+                fprintf (stderr, "aPropSequenceSequence [%d] = %s;\n", i, var);
+                printLevel (level);
+                fprintf (stderr, "}\n");
+            }
+            return "aPropSequenceSequence";
+        } else if( value >>= anyArray ) {
+            fprintf (stderr,"%s\n", USS(value.getValueTypeName()));
+            for( int i=0; i<anyArray.getLength(); i++ ) {
+                fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(value.getValueTypeName()) );
+                lclDumpAnyValue( anyArray[i] );
+            }
+        } else if( value >>= adjArray ) {
+            printLevel (level);
+            fprintf (stderr,"Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (%d);\n", adjArray.getLength());
+            for( int i=0; i<adjArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr, "{\n");
+                const char *var = lclDumpAnyValueCode( makeAny (adjArray[i].Value), level + 1 );
+                printLevel (level + 1);
+                fprintf (stderr, "aAdjSequence [%d].Value = %s;\n", i, var);
+                printLevel (level);
+                fprintf (stderr, "}\n");
+            }
+            return "aAdjSequence";
+        } else if( value >>= segArray ) {
+            printLevel (level);
+            fprintf (stderr, "Sequence< EnhancedCustomShapeSegment > aSegmentSeq (%d);\n", segArray.getLength());
+            for( int i=0; i<segArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr, "{\n");
+                const char *var = lclDumpAnyValueCode (makeAny (segArray[i]), level + 1);
+                printLevel (level + 1);
+                fprintf (stderr, "aSegmentSeq [%d] = %s;\n", i, var);
+                printLevel (level);
+                fprintf (stderr, "}\n");
+            }
+            return "aSegmentSeq";
+        } else if( value >>= ppArray ) {
+            printLevel (level);
+            fprintf (stderr, "Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (%d);\n", ppArray.getLength());
+            for( int i=0; i<ppArray.getLength(); i++ ) {
+                printLevel (level);
+                fprintf (stderr, "{\n");
+                const char *var = lclDumpAnyValueCode (makeAny (ppArray[i]), level + 1);
+                printLevel (level + 1);
+                fprintf (stderr, "aParameterPairSeq [%d] = %s;\n", i, var);
+                printLevel (level);
+                fprintf (stderr, "}\n");
+            }
+            return "aParameterPairSeq";
+        } else if( value >>= segment ) {
+            printLevel (level);
+            fprintf (stderr, "EnhancedCustomShapeSegment aSegment;\n");
+            printLevel (level);
+            // TODO: use EnhancedCustomShapeSegmentCommand constants
+            fprintf (stderr, "aSegment.Command = %d;\n", segment.Command);
+            printLevel (level);
+            fprintf (stderr, "aSegment.Count = %d;\n", segment.Count);
+            return "aSegment";
+        } else if( value >>= pp ) {
+            printLevel (level);
+            fprintf (stderr, "EnhancedCustomShapeParameterPair aParameterPair;\n");
+            printLevel (level);
+            fprintf (stderr, "{\n");
+            if (!pp.First.Value.getValueTypeName().equals(sVoid)) {
+                const char* var = lclDumpAnyValueCode( makeAny (pp.First), level + 1 );
+                printLevel (level + 1);
+                fprintf (stderr, "aParameterPair.First = %s;\n", var);
+            } else {
+                printLevel (level + 1);
+                fprintf (stderr, "EnhancedCustomShapeParameter aParameter;\n");
+                printLevel (level + 1);
+                fprintf (stderr, "aParameterPair.First = aParameter;\n");
+            }
+            printLevel (level);
+            fprintf (stderr, "}\n");
+
+            printLevel (level);
+            fprintf (stderr, "{\n");
+            if (!pp.Second.Value.getValueTypeName().equals(sVoid)) {
+                const char* var = lclDumpAnyValueCode( makeAny (pp.Second), level + 1 );
+                printLevel (level + 1);
+                fprintf (stderr, "aParameterPair.Second = %s;\n", var);
+            } else {
+                printLevel (level + 1);
+                fprintf (stderr, "EnhancedCustomShapeParameter aParameter;\n");
+                printLevel (level + 1);
+                fprintf (stderr, "aParameterPair.Second = aParameter;\n");
+            }
+            printLevel (level);
+            fprintf (stderr, "}\n");
+            return "aParameterPair";
+        } else if( value >>= par ) {
+            printLevel (level);
+            fprintf (stderr,"EnhancedCustomShapeParameter aParameter;\n");
+            const char* var = lclDumpAnyValueCode( par.Value, level );
+            printLevel (level);
+            fprintf (stderr,"aParameter.Value = %s;\n", var);
+            const char* type;
+            switch (par.Type) {
+                case EnhancedCustomShapeParameterType::NORMAL:
+                    type = "EnhancedCustomShapeParameterType::NORMAL";
+                    break;
+                case EnhancedCustomShapeParameterType::EQUATION:
+                    type = "EnhancedCustomShapeParameterType::EQUATION";
+                    break;
+                case EnhancedCustomShapeParameterType::ADJUSTMENT:
+                    type = "EnhancedCustomShapeParameterType::ADJUSTMENT";
+                    break;
+                case EnhancedCustomShapeParameterType::LEFT:
+                    type = "EnhancedCustomShapeParameterType::LEFT";
+                    break;
+                case EnhancedCustomShapeParameterType::TOP:
+                    type = "EnhancedCustomShapeParameterType::TOP";
+                    break;
+                case EnhancedCustomShapeParameterType::RIGHT:
+                    type = "EnhancedCustomShapeParameterType::RIGHT";
+                    break;
+                case EnhancedCustomShapeParameterType::BOTTOM:
+                    type = "EnhancedCustomShapeParameterType::BOTTOM";
+                    break;
+                case EnhancedCustomShapeParameterType::XSTRETCH:
+                    type = "EnhancedCustomShapeParameterType::XSTRETCH";
+                    break;
+                case EnhancedCustomShapeParameterType::YSTRETCH:
+                    type = "EnhancedCustomShapeParameterType::YSTRETCH";
+                    break;
+                case EnhancedCustomShapeParameterType::HASSTROKE:
+                    type = "EnhancedCustomShapeParameterType::HASSTROKE";
+                    break;
+                case EnhancedCustomShapeParameterType::HASFILL:
+                    type = "EnhancedCustomShapeParameterType::HASFILL";
+                    break;
+                case EnhancedCustomShapeParameterType::WIDTH:
+                    type = "EnhancedCustomShapeParameterType::WIDTH";
+                    break;
+                case EnhancedCustomShapeParameterType::HEIGHT:
+                    type = "EnhancedCustomShapeParameterType::HEIGHT";
+                    break;
+                case EnhancedCustomShapeParameterType::LOGWIDTH:
+                    type = "EnhancedCustomShapeParameterType::LOGWIDTH";
+                    break;
+                case EnhancedCustomShapeParameterType::LOGHEIGHT:
+                    type = "EnhancedCustomShapeParameterType::LOGHEIGHT";
+                    break;
+                default:
+                    type = "unknown";
+                    break;
+            }
+            printLevel (level);
+            fprintf (stderr,"aParameter.Type = %s;\n", type);
+            return "aParameter";
+        } else if( value >>= longValue ) {
+            printLevel (level);
+            fprintf (stderr,"Any aAny ((long) %ld);\n", longValue);
+            return "aAny";
+        } else if( value >>= intValue )
+            fprintf (stderr,"%"SAL_PRIdINT32"            (hex: %"SAL_PRIxUINT32")\n", intValue, intValue);
+        else if( value >>= uintValue )
+            fprintf (stderr,"%"SAL_PRIdINT32"            (hex: %"SAL_PRIxUINT32")\n", uintValue, uintValue);
+        else if( value >>= int16Value )
+            fprintf (stderr,"%d            (hex: %x)\n", int16Value, int16Value);
+        else if( value >>= uint16Value )
+            fprintf (stderr,"%d            (hex: %x)\n", uint16Value, uint16Value);
+        else if( value >>= floatValue )
+            fprintf (stderr,"%f\n", floatValue);
+        else if( value >>= boolValue ) {
+            if (boolValue)
+                return "Any ((sal_Bool) sal_True)";
+            else
+                return "Any ((sal_Bool) sal_False)";
+        } else if( value >>= xNumRule ) {
+            fprintf (stderr, "XIndexReplace\n");
             for (int k=0; k<xNumRule->getCount(); k++) {
                 Sequence< PropertyValue > aBulletPropSeq;
                 fprintf (stderr, "level %d\n", k);
@@ -355,6 +757,18 @@ static void lclDumpAnyValue( Any value)
         fprintf (stderr, "%s\n", s);
     } else if( value >>= spacing ) {
         fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height);
+    } else if( value >>= rect ) {
+            printLevel (level);
+            fprintf (stderr, "awt::Rectangle aRectangle;\n");
+            printLevel (level);
+            fprintf (stderr, "aRectangle.X = %d;\n", rect.X);
+            printLevel (level);
+            fprintf (stderr, "aRectangle.Y = %d;\n", rect.Y);
+            printLevel (level);
+            fprintf (stderr, "aRectangle.Width = %d;\n", rect.Width);
+            printLevel (level);
+            fprintf (stderr, "aRectangle.Height = %d;\n", rect.Height);
+            return "aRectangle";
     } else if( value.isExtractableTo(::getCppuType((const sal_Int32*)0))) {
         fprintf (stderr,"is extractable to int32\n");
     }
@@ -362,30 +776,319 @@ static void lclDumpAnyValue( Any value)
 //             fprintf (stderr,"%d            (RectanglePoint)\n", pointValue);
         else
       fprintf (stderr,"???           <unhandled type %s>\n", USS(value.getValueTypeName()));
+
+        return "";
 }
 
-void PropertyMap::dump( Reference< XPropertySet > rXPropSet )
+void PropertyMap::dumpCode( Reference< XPropertySet > rXPropSet )
 {
     Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
     Sequence< Property > props = info->getProperties ();
+    const OUString sType = CREATE_OUSTRING( "Type" );
 
     OSL_TRACE("dump props, len: %d", props.getLength ());
 
     for (int i=0; i < props.getLength (); i++) {
+
+        // ignore Type, it is set elsewhere
+        if (props[i].Name.equals (sType))
+            continue;
+
         OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8);
-        fprintf (stderr,"%30s = ", name.getStr() );
+        int level = 1;
 
         try {
-            lclDumpAnyValue (rXPropSet->getPropertyValue( props [i].Name ));
-        } catch(const Exception& e) {
+            const char* var = lclDumpAnyValueCode (rXPropSet->getPropertyValue (props [i].Name), level);
+            printLevel (level);
+            fprintf (stderr,"aPropertyMap [PROP_%s] <<= %s;\n\n", name.getStr(), var);
+        } catch (const Exception& e) {
             fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name));
         }
     }
 }
 
-void PropertyMap::dump()
+void PropertyMap::dumpCode()
 {
-    dump( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) );
+    dumpCode( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) );
+    PropertyMap aPropertyMap;
+    Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
+    {
+        Any aAny ((long) 18000);
+        aAdjSequence [0].Value = aAny;
+    }
+    {
+        Any aAny ((long) 10000);
+        aAdjSequence [1].Value = aAny;
+    }
+    aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+
+    Sequence< OUString > aStringSequence (15);
+    aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
+    aStringSequence[1] = CREATE_OUSTRING ("20000*width/?0 ");
+    aStringSequence[2] = CREATE_OUSTRING ("if(0-$0 ,0,if(20000-$0 ,$0 ,20000))");
+    aStringSequence[3] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))");
+    aStringSequence[4] = CREATE_OUSTRING ("?0 *?3 /20000");
+    aStringSequence[5] = CREATE_OUSTRING ("width+0-?4 ");
+    aStringSequence[6] = CREATE_OUSTRING ("height*?2 /40000");
+    aStringSequence[7] = CREATE_OUSTRING ("height/2");
+    aStringSequence[8] = CREATE_OUSTRING ("?7 +0-?6 ");
+    aStringSequence[9] = CREATE_OUSTRING ("?7 +?6 -0");
+    aStringSequence[10] = CREATE_OUSTRING ("height/2");
+    aStringSequence[11] = CREATE_OUSTRING ("?8 *?4 /?10 ");
+    aStringSequence[12] = CREATE_OUSTRING ("?5 +?11 -0");
+    aStringSequence[13] = CREATE_OUSTRING ("height");
+    aStringSequence[14] = CREATE_OUSTRING ("width");
+    aPropertyMap [PROP_Equations] <<= aStringSequence;
+
+    Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
+    {
+        Sequence< PropertyValue > aPropSequence (4);
+        {
+            aPropSequence [0].Name = CREATE_OUSTRING ("Position");
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aPropSequence [0].Value = makeAny (aParameterPair);
+        }
+        {
+            aPropSequence [1].Name = CREATE_OUSTRING ("RangeYMaximum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((long) 20000);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [1].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [2].Name = CREATE_OUSTRING ("RangeYMinimum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((long) 0);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [2].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [3].Name = CREATE_OUSTRING ("RefY");
+            Any aAny ((long) 0);
+            aPropSequence [3].Value = makeAny (aAny);
+        }
+        aPropSequenceSequence [0] = aPropSequence;
+    }
+    {
+        Sequence< PropertyValue > aPropSequence (4);
+        {
+            aPropSequence [0].Name = CREATE_OUSTRING ("Position");
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.Second = aParameter;
+            }
+            aPropSequence [0].Value = makeAny (aParameterPair);
+        }
+        {
+            aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((long) 1);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+            aPropSequence [1].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
+            EnhancedCustomShapeParameter aParameter;
+            Any aAny ((long) 0);
+            aParameter.Value = aAny;
+            aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+            aPropSequence [2].Value = makeAny (aParameter);
+        }
+        {
+            aPropSequence [3].Name = CREATE_OUSTRING ("RefX");
+            Any aAny ((long) 1);
+            aPropSequence [3].Value = makeAny (aAny);
+        }
+        aPropSequenceSequence [1] = aPropSequence;
+    }
+    aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
+
+    aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+
+    aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+
+    Sequence< PropertyValue > aPropSequence (2);
+    {
+        aPropSequence [0].Name = CREATE_OUSTRING ("Coordinates");
+        Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (7);
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [0] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 8);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [1] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [2] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 14);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 7);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [3] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 13);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [4] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 5);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 9);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [5] = aParameterPair;
+        }
+        {
+            EnhancedCustomShapeParameterPair aParameterPair;
+            {
+                EnhancedCustomShapeParameter aParameter;
+                aParameterPair.First = aParameter;
+            }
+            {
+                EnhancedCustomShapeParameter aParameter;
+                Any aAny ((long) 9);
+                aParameter.Value = aAny;
+                aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+                aParameterPair.Second = aParameter;
+            }
+            aParameterPairSeq [6] = aParameterPair;
+        }
+        aPropSequence [0].Value = makeAny (aParameterPairSeq);
+    }
+    {
+        aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
+        Sequence< EnhancedCustomShapeSegment > aSegmentSeq (4);
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 1;
+            aSegment.Count = 1;
+            aSegmentSeq [0] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 2;
+            aSegment.Count = 6;
+            aSegmentSeq [1] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 4;
+            aSegment.Count = 0;
+            aSegmentSeq [2] = aSegment;
+        }
+        {
+            EnhancedCustomShapeSegment aSegment;
+            aSegment.Command = 5;
+            aSegment.Count = 0;
+            aSegmentSeq [3] = aSegment;
+        }
+        aPropSequence [1].Value = makeAny (aSegmentSeq);
+    }
+    aPropertyMap [PROP_Path] <<= aPropSequence;
+
+    awt::Rectangle aRectangle;
+    aRectangle.X = 0;
+    aRectangle.Y = 0;
+    aRectangle.Width = 1050480;
+    aRectangle.Height = 456840;
+    aPropertyMap [PROP_ViewBox] <<= aRectangle;
 }
 #endif
 


More information about the Libreoffice-commits mailing list