diff options
author | Radek Doulik <rodo@novell.com> | 2011-04-28 14:16:29 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-04-28 14:18:06 +0200 |
commit | 3c594c6e5daacc49600e22b22be6692c23ae88b8 (patch) | |
tree | 701651c8445241854175daeb425e464f415254cc /oox/source/helper | |
parent | c73f4866c48d1f2d049c3371c2da930b76d97075 (diff) |
fixed string code dump, removed test code
Diffstat (limited to 'oox/source/helper')
-rw-r--r-- | oox/source/helper/propertymap.cxx | 287 |
1 files changed, 5 insertions, 282 deletions
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 835e3fa5d4f1..fba57bff86bb 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -497,9 +497,11 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0) TextHorizontalAdjust aTextHorizAdj; Reference< XIndexReplace > xNumRule; - if( value >>= strValue ) - fprintf (stderr,"\"%s\"\n", USS( strValue ) ); - else if( value >>= strArray ) { + if( value >>= strValue ) { + printLevel (level); + fprintf (stderr,"OUString str = CREATE_OUSTRING (\"%s\");\n", USS( strValue ) ); + return "str"; + } else if( value >>= strArray ) { printLevel (level); fprintf (stderr,"Sequence< OUString > aStringSequence (%"SAL_PRIdINT32");\n", strArray.getLength()); for( int i=0; i<strArray.getLength(); i++ ) { @@ -808,285 +810,6 @@ void PropertyMap::dumpCode( Reference< XPropertySet > rXPropSet ) void PropertyMap::dumpCode() { 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 |