diff options
author | Umesh Kadam <umesh.kadam@synerzip.com> | 2014-07-18 13:02:19 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-04 07:34:11 +0000 |
commit | ded5b1ecdef42fab84fa57ab504b4cc006a4df91 (patch) | |
tree | 0c8095cd56d1904a908e31319bde0d5e225d7d45 /oox | |
parent | 88ba62b0e0b6cfdefeff2752713103c6e154302c (diff) |
fdo#78301 : Size of word-arts change during import.
- Do not resize the fallback geometry for Word-Arts(VML), since the
overlay geometry is constructed using the properties of the
fallback geometry.
- The resize autoshape to fit text attr of FontWork/Word-Art should
always be false for the fallback geometry(the SdrObject).
Change-Id: If8badb382c525875a07a0a9e6268cec036739001
Reviewed-on: https://gerrit.libreoffice.org/10486
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index f98c717cb830..842a65cb2b02 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -58,6 +58,9 @@ #include "oox/vml/vmltextbox.hxx" #include "oox/core/xmlfilterbase.hxx" #include "oox/helper/containerhelper.hxx" +#include "svx/EnhancedCustomShapeTypeNames.hxx" +#include <svx/unoapi.hxx> +#include <svx/svdoashp.hxx> using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::uno::Any; @@ -534,6 +537,19 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes } Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, aShapeRect ); + SdrObject* pShape = GetSdrObjectFromXShape( xShape ); + if( pShape && getShapeType() >= 0 ) + { + OUString aShapeType; + aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< MSO_SPT >(getShapeType()) ); + //The resize autoshape to fit text attr of FontWork/Word-Art should always be false + //for the fallback geometry. + if(aShapeType.startsWith("fontwork")) + { + pShape->SetMergedItem(SdrTextAutoGrowHeightItem(false)); + pShape->SetMergedItem(SdrTextAutoGrowWidthItem(false)); + } + } convertShapeProperties( xShape ); // Handle left/right/top/bottom wrap distance. |