From be177d6974e651ec28dab3dddb1fa6e1d7aee736 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Wed, 1 Aug 2018 15:58:20 +0200 Subject: tdf#116350 Export preset text geometry (text effects) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifb921b56387ca183b5a57126f6e88e2f9a4ecb3d Reviewed-on: https://gerrit.libreoffice.org/58430 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- oox/source/drawingml/shape.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'oox/source') diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a7ac4751bf59..9a16ead2b78e 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -434,6 +434,7 @@ static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust ) static inline void lcl_createPresetShape( uno::Reference& xShape, const OUString& rClass, + const OUString& rPresetType, const CustomShapePropertiesPtr pCustomShapePropertiesPtr, const TextBodyPtr pTextBody, const GraphicHelper& rGraphicHelper ) @@ -538,6 +539,7 @@ static inline void lcl_createPresetShape( uno::Reference& xShap const OUString sPath( "Path" ); const OUString sTextPath( "TextPath" ); const OUString sAdjustmentValues( "AdjustmentValues" ); + const OUString sPresetTextWarp( "PresetTextWarp" ); lcl_resetPropertyValue( aGeomPropVec, sCoordinateSize ); lcl_resetPropertyValue( aGeomPropVec, sEquations ); @@ -554,6 +556,9 @@ static inline void lcl_createPresetShape( uno::Reference& xShap lcl_setPropertyValue( aGeomPropVec, sTextPath, comphelper::makePropertyValue( sTextPath, aPropertyValues ) ); + lcl_setPropertyValue( aGeomPropVec, sPresetTextWarp, + comphelper::makePropertyValue( sPresetTextWarp, rPresetType ) ); + if ( rClass == "fontwork-arch-up-curve" || rClass == "fontwork-circle-curve" || rClass == "fontwork-arch-down-curve" || rClass == "fontwork-open-circle-curve" ) lcl_setPropertyValue( aGeomPropVec, sAdjustmentValues, @@ -1306,7 +1311,7 @@ Reference< XShape > const & Shape::createAndInsert( const OUString sPresetType = mpTextBody->getTextProperties().msPrst; sClass = PresetGeometryTypeNames::GetFontworkType( sPresetType ); - lcl_createPresetShape( mxShape, sClass, mpCustomShapePropertiesPtr, mpTextBody, rGraphicHelper ); + lcl_createPresetShape( mxShape, sClass, sPresetType, mpCustomShapePropertiesPtr, mpTextBody, rGraphicHelper ); } } } -- cgit