[Libreoffice-commits] .: 2 commits - oox/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Mon May 9 06:45:00 PDT 2011
oox/source/drawingml/customshapegeometry.cxx | 3
oox/source/drawingml/customshapeproperties.cxx | 1042 ++++++++++++++++++++++++-
oox/source/drawingml/shape.cxx | 79 -
3 files changed, 1071 insertions(+), 53 deletions(-)
New commits:
commit fd1abbacb5d8e612377e2c77c3b16fa7168d4031
Author: Radek Doulik <rodo at novell.com>
Date: Mon May 9 15:29:14 2011 +0200
added few more custom shape presets
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index ecbc7ca..fe39cf4 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -1471,7 +1471,8 @@ OUString GetShapeType( sal_Int32 nType )
sType = sBracePair;
} break;
case XML_straightConnector1: {
- static const OUString sStraightConnector1 = CREATE_OUSTRING( "mso-spt32" );
+ static const OUString sStraightConnector1 = CREATE_OUSTRING( "ooxml-straight-connector-1" );
+ OSL_TRACE("preset resolved as: ooxml-straight-connector-1");
sType = sStraightConnector1;
} break;
case XML_bentConnector2: {
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index f62a76e..c3a17bc 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -98,10 +98,1050 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
{
OSL_TRACE("preset: %s", USS(maShapePresetType));
+ static OUString sLeftRightArrow = CREATE_OUSTRING("left-right-arrow");
static OUString sRightArrow = CREATE_OUSTRING("right-arrow");
static OUString sStripedRightArrow = CREATE_OUSTRING("striped-right-arrow");
+ static OUString sWedgeRoundedRectCallout = CREATE_OUSTRING("round-rectangular-callout");
- if ( maShapePresetType.equals( sStripedRightArrow ) ) {
+if ( maShapePresetType.equals( sWedgeRoundedRectCallout ) ) {
+ PropertyMap aPropertyMap;
+
+ Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (3);
+ {
+ Any aAny ((sal_Int32) -4166);
+ aAdjSequence [0].Value = aAny;
+ }
+ {
+ Any aAny ((sal_Int32) 12500);
+ aAdjSequence [1].Value = aAny;
+ }
+ {
+ Any aAny ((sal_Int32) 3333);
+ aAdjSequence [2].Value = aAny;
+ }
+ aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+
+ Sequence< OUString > aStringSequence (43);
+ aStringSequence[0] = CREATE_OUSTRING ("width*$0 /20000");
+ aStringSequence[1] = CREATE_OUSTRING ("height*$1 /20000");
+ aStringSequence[2] = CREATE_OUSTRING ("width/2");
+ aStringSequence[3] = CREATE_OUSTRING ("?2 +?0 -0");
+ aStringSequence[4] = CREATE_OUSTRING ("height/2");
+ aStringSequence[5] = CREATE_OUSTRING ("?4 +?1 -0");
+ aStringSequence[6] = CREATE_OUSTRING ("?0 *height/width");
+ aStringSequence[7] = CREATE_OUSTRING ("abs(?1 )");
+ aStringSequence[8] = CREATE_OUSTRING ("abs(?6 )");
+ aStringSequence[9] = CREATE_OUSTRING ("?7 +0-?8 ");
+ aStringSequence[10] = CREATE_OUSTRING ("");
+ aStringSequence[11] = CREATE_OUSTRING ("");
+ aStringSequence[12] = CREATE_OUSTRING ("width*?10 /2");
+ aStringSequence[13] = CREATE_OUSTRING ("width*?11 /2");
+ aStringSequence[14] = CREATE_OUSTRING ("");
+ aStringSequence[15] = CREATE_OUSTRING ("");
+ aStringSequence[16] = CREATE_OUSTRING ("height*?14 /2");
+ aStringSequence[17] = CREATE_OUSTRING ("height*?15 /2");
+ aStringSequence[18] = CREATE_OUSTRING ("");
+ aStringSequence[19] = CREATE_OUSTRING ("");
+ aStringSequence[20] = CREATE_OUSTRING ("");
+ aStringSequence[21] = CREATE_OUSTRING ("");
+ aStringSequence[22] = CREATE_OUSTRING ("");
+ aStringSequence[23] = CREATE_OUSTRING ("");
+ aStringSequence[24] = CREATE_OUSTRING ("");
+ aStringSequence[25] = CREATE_OUSTRING ("");
+ aStringSequence[26] = CREATE_OUSTRING ("");
+ aStringSequence[27] = CREATE_OUSTRING ("");
+ aStringSequence[28] = CREATE_OUSTRING ("");
+ aStringSequence[29] = CREATE_OUSTRING ("");
+ aStringSequence[30] = CREATE_OUSTRING ("");
+ aStringSequence[31] = CREATE_OUSTRING ("");
+ aStringSequence[32] = CREATE_OUSTRING ("");
+ aStringSequence[33] = CREATE_OUSTRING ("");
+ aStringSequence[34] = CREATE_OUSTRING ("min(width,height)");
+ aStringSequence[35] = CREATE_OUSTRING ("?34 *$2 /20000");
+ aStringSequence[36] = CREATE_OUSTRING ("width+0-?35 ");
+ aStringSequence[37] = CREATE_OUSTRING ("height+0-?35 ");
+ aStringSequence[38] = CREATE_OUSTRING ("?35 *5857/20000");
+ aStringSequence[39] = CREATE_OUSTRING ("width+0-?38 ");
+ aStringSequence[40] = CREATE_OUSTRING ("height+0-?38 ");
+ aStringSequence[41] = CREATE_OUSTRING ("height");
+ aStringSequence[42] = CREATE_OUSTRING ("width");
+ aPropertyMap [PROP_Equations] <<= aStringSequence;
+
+ Sequence< Sequence < PropertyValue > > aPropSequenceSequence (1);
+ {
+ Sequence< PropertyValue > aPropSequence (7);
+ {
+ aPropSequence [0].Name = CREATE_OUSTRING ("Position");
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 3);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 5);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aPropSequence [0].Value = makeAny (aParameterPair);
+ }
+ {
+ aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 429496729);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aPropSequence [1].Value = makeAny (aParameter);
+ }
+ {
+ aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) -429496729);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aPropSequence [2].Value = makeAny (aParameter);
+ }
+ {
+ aPropSequence [3].Name = CREATE_OUSTRING ("RangeYMaximum");
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 429496729);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aPropSequence [3].Value = makeAny (aParameter);
+ }
+ {
+ aPropSequence [4].Name = CREATE_OUSTRING ("RangeYMinimum");
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) -429496729);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+ aPropSequence [4].Value = makeAny (aParameter);
+ }
+ {
+ aPropSequence [5].Name = CREATE_OUSTRING ("RefX");
+ Any aAny ((sal_Int32) 0);
+ aPropSequence [5].Value = makeAny (aAny);
+ }
+ {
+ aPropSequence [6].Name = CREATE_OUSTRING ("RefY");
+ Any aAny ((sal_Int32) 1);
+ aPropSequence [6].Value = makeAny (aAny);
+ }
+ aPropSequenceSequence [0] = 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 (32);
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 35);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [0] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [1] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [2] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [3] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [4] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 12);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [5] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 21);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 29);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [6] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 13);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [7] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 36);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [8] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [9] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [10] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [11] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [12] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 42);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 16);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [13] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 23);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 31);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [14] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 42);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 17);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [15] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 42);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 37);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [16] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [17] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [18] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [19] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [20] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 13);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 41);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [21] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 25);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 33);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [22] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 12);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 41);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [23] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 35);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 41);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [24] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [25] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [26] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [27] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [28] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 17);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [29] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 19);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 27);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [30] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 16);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [31] = aParameterPair;
+ }
+ aPropSequence [0].Value = makeAny (aParameterPairSeq);
+ }
+ {
+ aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
+ Sequence< EnhancedCustomShapeSegment > aSegmentSeq (11);
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 1;
+ aSegment.Count = 1;
+ aSegmentSeq [0] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 10;
+ aSegment.Count = 1;
+ aSegmentSeq [1] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 2;
+ aSegment.Count = 4;
+ aSegmentSeq [2] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 10;
+ aSegment.Count = 1;
+ aSegmentSeq [3] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 2;
+ aSegment.Count = 4;
+ aSegmentSeq [4] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 10;
+ aSegment.Count = 1;
+ aSegmentSeq [5] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 2;
+ aSegment.Count = 4;
+ aSegmentSeq [6] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 10;
+ aSegment.Count = 1;
+ aSegmentSeq [7] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 2;
+ aSegment.Count = 3;
+ aSegmentSeq [8] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 4;
+ aSegment.Count = 0;
+ aSegmentSeq [9] = aSegment;
+ }
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = 5;
+ aSegment.Count = 0;
+ aSegmentSeq [10] = aSegment;
+ }
+ aPropSequence [1].Value = makeAny (aSegmentSeq);
+ }
+ aPropertyMap [PROP_Path] <<= aPropSequence;
+
+ awt::Rectangle aRectangle;
+ aRectangle.X = 0;
+ aRectangle.Y = 0;
+ aRectangle.Width = 4663800;
+ aRectangle.Height = 283680;
+ aPropertyMap [PROP_ViewBox] <<= aRectangle;
+
+ aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-wedge-round-rect-callout");
+
+ Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+ PropertySet aPropSet( xPropSet );
+ aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+ OSL_TRACE("created ooxml preset for ooxml-wedge-round-rect-callout");
+ }
+ else if ( maShapePresetType.equals( sLeftRightArrow ) ) {
+ PropertyMap aPropertyMap;
+
+ Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
+ {
+ Any aAny ((sal_Int32) 10000);
+ aAdjSequence [0].Value = aAny;
+ }
+ {
+ Any aAny ((sal_Int32) 10000);
+ aAdjSequence [1].Value = aAny;
+ }
+ aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+
+ Sequence< OUString > aStringSequence (16);
+ aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
+ aStringSequence[1] = CREATE_OUSTRING ("10000*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 ("?4 +0-?11 ");
+ aStringSequence[13] = CREATE_OUSTRING ("?5 +?11 -0");
+ aStringSequence[14] = CREATE_OUSTRING ("width");
+ aStringSequence[15] = CREATE_OUSTRING ("height");
+ aPropertyMap [PROP_Equations] <<= aStringSequence;
+
+ Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
+ {
+ 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;
+ 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) 4);
+ 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 (10);
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 7);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [0] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 4);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [1] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 4);
+ 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 [2] = 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 [3] = 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 [4] = 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 [5] = 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) 15);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [6] = 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 [7] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 4);
+ 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 [8] = aParameterPair;
+ }
+ {
+ EnhancedCustomShapeParameterPair aParameterPair;
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 4);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.First = aParameter;
+ }
+ {
+ EnhancedCustomShapeParameter aParameter;
+ Any aAny ((sal_Int32) 15);
+ aParameter.Value = aAny;
+ aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+ aParameterPair.Second = aParameter;
+ }
+ aParameterPairSeq [9] = 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 = 9;
+ 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 = 4663800;
+ aRectangle.Height = 283680;
+ aPropertyMap [PROP_ViewBox] <<= aRectangle;
+
+ aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-left-right-arrow");
+
+ Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+ PropertySet aPropSet( xPropSet );
+ aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
+ OSL_TRACE("created ooxml preset for ooxml-left-right-arrow");
+
+ } else if ( maShapePresetType.equals( sStripedRightArrow ) ) {
PropertyMap aPropertyMap;
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
commit c48e4b2b560e303ec4ddacf4713a4af948826da0
Author: Radek Doulik <rodo at novell.com>
Date: Mon May 9 15:27:03 2011 +0200
fixed regression in group shapes transformations
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2855ff3..d5d8c95 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -229,39 +229,26 @@ void Shape::addChildren(
ShapeIdMap* pShapeMap,
basegfx::B2DHomMatrix& aTransformation )
{
- awt::Point& aPosition( mbIsChild ? maAbsolutePosition : maPosition );
- awt::Size& aSize( mbIsChild ? maAbsoluteSize : maSize );
basegfx::B2DHomMatrix aChildTransformation;
+ aChildTransformation.translate(-maChPosition.X, -maChPosition.Y);
+ aChildTransformation.scale(1/(maChSize.Width ? maChSize.Width : 1.0), 1/(maChSize.Height ? maChSize.Height : 1.0));
+ aChildTransformation *= aTransformation;
+
+ OSL_TRACE("parent matrix:\n%f %f %f\n%f %f %f\n%f %f %f",
+ aChildTransformation.get(0, 0),
+ aChildTransformation.get(0, 1),
+ aChildTransformation.get(0, 2),
+ aChildTransformation.get(1, 0),
+ aChildTransformation.get(1, 1),
+ aChildTransformation.get(1, 2),
+ aChildTransformation.get(2, 0),
+ aChildTransformation.get(2, 1),
+ aChildTransformation.get(2, 2));
+
std::vector< ShapePtr >::iterator aIter( rMaster.maChildren.begin() );
while( aIter != rMaster.maChildren.end() )
- {
- awt::Rectangle aShapeRect;
- awt::Rectangle* pShapeRect = 0;
- Shape& rChild = *(*aIter);
-
- double sx = (maChSize.Width) ? ((double)aSize.Width)/maChSize.Width : 1.0;
- double sy = (maChSize.Height) ? ((double)aSize.Height)/maChSize.Height : 1.0;
- rChild.maAbsolutePosition.X = aPosition.X + sx*(rChild.maPosition.X - maChPosition.X);
- rChild.maAbsolutePosition.Y = aPosition.Y + sy*(rChild.maPosition.Y - maChPosition.Y);
- rChild.maAbsoluteSize.Width = rChild.maSize.Width*sx;
- rChild.maAbsoluteSize.Height = rChild.maSize.Height*sy;
- rChild.mbIsChild = true;
-
- aShapeRect.X = rChild.maAbsolutePosition.X;
- aShapeRect.Y = rChild.maAbsolutePosition.Y;
- aShapeRect.Width = rChild.maAbsoluteSize.Width;
- aShapeRect.Height = rChild.maAbsoluteSize.Height;
-
- //pShapeRect = &aShapeRect;
-
- aChildTransformation = aTransformation;
-
- aChildTransformation.translate((-maChPosition.X)/360.0, (-maChPosition.Y)/360.0);
- aChildTransformation.scale((360.0*sx)/(maSize.Width ? maSize.Width : 1.0), (360.0*sy)/(maSize.Height ? maSize.Height : 1.0));
-
- (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, pShapeRect, pShapeMap );
- }
+ (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, NULL, pShapeMap );
}
Reference< XShape > Shape::createAndInsert(
@@ -273,20 +260,19 @@ Reference< XShape > Shape::createAndInsert(
sal_Bool bClearText,
basegfx::B2DHomMatrix& aParentTransformation )
{
- awt::Size aSize( pShapeRect ? awt::Size( pShapeRect->Width, pShapeRect->Height ) : maSize );
- awt::Point aPosition( pShapeRect ? awt::Point( pShapeRect->X, pShapeRect->Y ) : maPosition );
- awt::Rectangle aShapeRectHmm( aPosition.X / 360, aPosition.Y / 360, aSize.Width / 360, aSize.Height / 360 );
+ awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 );
OUString aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm );
- sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.CustomShape" ) );
+ sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.CustomShape" ) ) || aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ConnectorShape" ) );
+
+ basegfx::B2DHomMatrix aTransformation;
- basegfx::B2DHomMatrix aTransformation( aParentTransformation );
- if( aSize.Width != 1 || aSize.Height != 1)
+ if( maSize.Width != 1 || maSize.Height != 1)
{
// take care there are no zeros used by error
aTransformation.scale(
- aSize.Width ? aSize.Width / 360.0 : 1.0,
- aSize.Height ? aSize.Height / 360.0 : 1.0 );
+ maSize.Width ? maSize.Width : 1.0,
+ maSize.Height ? maSize.Height : 1.0 );
}
if( mbFlipH || mbFlipV || mnRotation != 0)
@@ -314,22 +300,15 @@ Reference< XShape > Shape::createAndInsert(
aTransformation.translate( aCenter.getX(), aCenter.getY() );
}
- if( aPosition.X != 0 || aPosition.Y != 0)
+ if( maPosition.X != 0 || maPosition.Y != 0)
{
// if global position is used, add it to transformation
- aTransformation.translate( aPosition.X / 360.0, aPosition.Y / 360.0 );
+ aTransformation.translate( maPosition.X, maPosition.Y );
}
- OSL_TRACE("transformation:\n%f %f %f\n%f %f %f\n%f %f %f\n",
- aTransformation.get(0,0),
- aTransformation.get(0,1),
- aTransformation.get(0,2),
- aTransformation.get(1,0),
- aTransformation.get(1,1),
- aTransformation.get(1,2),
- aTransformation.get(2,0),
- aTransformation.get(2,1),
- aTransformation.get(2,2));
+ aTransformation = aParentTransformation*aTransformation;
+ aParentTransformation = aTransformation;
+ aTransformation.scale(1/360.0, 1/360.0);
// special for lineshape
if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) )
@@ -389,8 +368,6 @@ Reference< XShape > Shape::createAndInsert(
maShapeProperties[ PROP_Transformation ] <<= aMatrix;
}
- aParentTransformation = aTransformation;
-
Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
if ( !mxShape.is() )
mxShape = Reference< drawing::XShape >( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
More information about the Libreoffice-commits
mailing list