[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - oox/source sd/qa
Muthu Subramanian
sumuthu at collabora.com
Tue Feb 4 04:10:17 PST 2014
oox/source/drawingml/customshapeproperties.cxx | 6 ++++++
sd/qa/unit/data/xml/n762695_0.xml | 2 +-
sd/qa/unit/data/xml/n762695_1.xml | 4 ++--
3 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit d08422551128967bdabcd4a844c8598df129f2e5
Author: Muthu Subramanian <sumuthu at collabora.com>
Date: Fri Dec 27 19:59:22 2013 +0530
fdo#72998: Custom shapes have improper size.
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index d83b3e3..c54a021 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap[ PROP_Type ] <<= OUString( "ooxml-non-primitive" );
aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
+ // Note 1: If Equations are defined - they are processed using internal div by 360 coordinates
+ // while if they are not, standard ooxml coordinates are used.
+ // This size specifically affects scaling.
+ // Note 2: Width and Height are set to 0 to force scaling to 1.
awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+ if( maGuideList.size() )
+ aViewBox = awt::Rectangle( 0, 0, 0, 0 );
aPropertyMap[ PROP_ViewBox ] <<= aViewBox;
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
diff --git a/sd/qa/unit/data/xml/n762695_0.xml b/sd/qa/unit/data/xml/n762695_0.xml
index 68b99ab..a2eba94 100644
--- a/sd/qa/unit/data/xml/n762695_0.xml
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -82,7 +82,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="4820911" height="3908235"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
diff --git a/sd/qa/unit/data/xml/n762695_1.xml b/sd/qa/unit/data/xml/n762695_1.xml
index b5293ab..8d7b6fa 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -82,7 +82,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="6477000" height="2743200"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
@@ -168,7 +168,7 @@
</PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox">
- <ViewBox x="0" y="0" width="6365875" height="3430587"/>
+ <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue>
</CustomShapeGeometry>
</XShape>
More information about the Libreoffice-commits
mailing list