Kaydet (Commit) beba4603 authored tarafından Muthu Subramanian's avatar Muthu Subramanian

fdo#72998: Custom shapes have improper size.

üst c6d1938f
...@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi ...@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap[ PROP_Type ] <<= OUString( "ooxml-non-primitive" ); aPropertyMap[ PROP_Type ] <<= OUString( "ooxml-non-primitive" );
aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX ); aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY ); 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 ); awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
if( maGuideList.size() )
aViewBox = awt::Rectangle( 0, 0, 0, 0 );
aPropertyMap[ PROP_ViewBox ] <<= aViewBox; aPropertyMap[ PROP_ViewBox ] <<= aViewBox;
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() ); Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</PropertyValue> </PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox"> <PropertyValue name="ViewBox">
<ViewBox x="0" y="0" width="4820911" height="3908235"/> <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue> </PropertyValue>
</CustomShapeGeometry> </CustomShapeGeometry>
</XShape> </XShape>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</PropertyValue> </PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox"> <PropertyValue name="ViewBox">
<ViewBox x="0" y="0" width="6477000" height="2743200"/> <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue> </PropertyValue>
</CustomShapeGeometry> </CustomShapeGeometry>
</XShape> </XShape>
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</PropertyValue> </PropertyValue>
<PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/>
<PropertyValue name="ViewBox"> <PropertyValue name="ViewBox">
<ViewBox x="0" y="0" width="6365875" height="3430587"/> <ViewBox x="0" y="0" width="0" height="0"/>
</PropertyValue> </PropertyValue>
</CustomShapeGeometry> </CustomShapeGeometry>
</XShape> </XShape>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment