From cd40d2ba9e8ed17cc870606b17ac2dffceb2813d Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Thu, 10 Oct 2013 12:19:38 +0530 Subject: n#819614: Lines running off the screens. Also fixed the test cases. --- oox/source/drawingml/customshapeproperties.cxx | 5 ++--- oox/source/drawingml/shape.cxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'oox/source') diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 05a9e0c3f1dc..48ace8bec689 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -109,7 +109,7 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */, - const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) + const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape, const awt::Size &aSize ) { if ( mnShapePresetType >= 0 ) { @@ -213,8 +213,7 @@ 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 ); - awt::Size aSize; - awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 ); + awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height ); aPropertyMap[ PROP_ViewBox ] <<= aViewBox; Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 44a43ff4c531..f174b34ac98b 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -621,7 +621,7 @@ Reference< XShape > Shape::createAndInsert( } SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'"); - mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape ); + mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape, maSize ); } else if( getTextBody() ) getTextBody()->getTextProperties().pushVertSimulation(); -- cgit