summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-01-19 09:45:34 +0100
committerRadek Doulik <rodo@novell.com>2012-01-19 09:46:52 +0100
commit76049db15945284b54bd84b3503839143c387510 (patch)
tree850f0bad06f6f5bab3d0c8a47230391ed0d00586 /oox
parent8447e7898d73249d13832144cd7e9167463b1391 (diff)
updated custom shapes presets generator to use new SubViewSize property
Diffstat (limited to 'oox')
-rwxr-xr-xoox/source/drawingml/customshapes/generatePresetsCXX.pl1
-rw-r--r--oox/source/helper/propertymap.cxx24
2 files changed, 25 insertions, 0 deletions
diff --git a/oox/source/drawingml/customshapes/generatePresetsCXX.pl b/oox/source/drawingml/customshapes/generatePresetsCXX.pl
index 5dd5f74ce134..827537c3a1d5 100755
--- a/oox/source/drawingml/customshapes/generatePresetsCXX.pl
+++ b/oox/source/drawingml/customshapes/generatePresetsCXX.pl
@@ -62,6 +62,7 @@ sub startSource
#include \"oox/drawingml/customshapeproperties.hxx\"
#include \"oox/token/tokenmap.hxx\"
#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index af0d3745fe5c..2858baffff51 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -44,6 +44,7 @@ using ::com::sun::star::text::WritingMode;
#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/awt/Size.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
@@ -471,6 +472,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
OUString strValue;
Sequence< OUString > strArray;
Sequence< Any > anyArray;
+ Sequence< awt::Size > sizeArray;
Sequence< PropertyValue > propArray;
Sequence< Sequence< PropertyValue > > propArrayArray;
Sequence< EnhancedCustomShapeAdjustmentValue > adjArray;
@@ -482,6 +484,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
EnhancedCustomShapeParameterPair pp;
EnhancedCustomShapeParameter par;
awt::Rectangle rect;
+ awt::Size size;
sal_Int32 intValue = 0;
sal_uInt32 uintValue = 0;
sal_Int16 int16Value = 0;
@@ -523,6 +526,19 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
fprintf (stderr, "}\n");
}
return "aPropSequence";
+ } else if( value >>= sizeArray ) {
+ printLevel (level);
+ fprintf (stderr, "Sequence< awt::Size > aSizeSequence (%" SAL_PRIdINT32 ");\n", sizeArray.getLength());
+ for( int i=0; i<sizeArray.getLength(); i++ ) {
+ printLevel (level);
+ fprintf (stderr, "{\n");
+ const char *var = lclDumpAnyValueCode (makeAny (sizeArray[i]), level + 1);
+ printLevel (level + 1);
+ fprintf (stderr, "aSizeSequence [%d] = %s;\n", i, var);
+ printLevel (level);
+ fprintf (stderr, "}\n");
+ }
+ return "aSizeSequence";
} else if( value >>= propArrayArray ) {
printLevel (level);
fprintf (stderr,"Sequence< Sequence < PropertyValue > > aPropSequenceSequence (%" SAL_PRIdINT32 ");\n", propArrayArray.getLength());
@@ -807,6 +823,14 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
printLevel (level);
fprintf (stderr, "aRectangle.Height = %" SAL_PRIdINT32 ";\n", rect.Height);
return "aRectangle";
+ } else if( value >>= size ) {
+ printLevel (level);
+ fprintf (stderr, "awt::Size aSize;\n");
+ printLevel (level);
+ fprintf (stderr, "aSize.Width = %" SAL_PRIdINT32 ";\n", size.Width);
+ printLevel (level);
+ fprintf (stderr, "aSize.Height = %" SAL_PRIdINT32 ";\n", size.Height);
+ return "aSize";
} else if( value.isExtractableTo(::getCppuType((const sal_Int32*)0))) {
fprintf (stderr,"is extractable to int32\n");
}