filter/source/msfilter/escherex.cxx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
New commits: commit 60e55c7c2e9f9e6ad389b4527fa6332378e55e12 Author: Xisco Fauli <[email protected]> Date: Tue Mar 26 19:46:11 2013 +0100 remove duplicate declaration Change-Id: I3ef565d61096189a9abe45a5a43951ceb7aff724 diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 5af60c8..45e0d08 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -3038,7 +3038,6 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) ) { MSO_GeoTextAlign gTextAlign = mso_alignTextCenter; - SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); drawing::TextHorizontalAdjust eHA( drawing::TextHorizontalAdjust_LEFT ); aAny >>= eHA; switch( eHA ) commit 2003acca7b2ffc5a494182685e6983c90c39d137 Author: Andre Fischer <[email protected]> Date: Fri Jul 6 13:02:06 2012 +0000 #i119884# Fixed export of fontwork alignment. Reported by: Li Feng Wang Patch by: SunYing Review by: Andre Fischer diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 25a8443..5af60c8 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -70,6 +70,7 @@ #include <com/sun/star/drawing/ProjectionMode.hpp> #include <com/sun/star/text/XSimpleText.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> +#include <com/sun/star/drawing/TextFitToSizeType.hpp> #include <vcl/hatch.hxx> #include <com/sun/star/awt/XGraphics.hpp> #include <com/sun/star/awt/FontSlant.hpp> @@ -3033,6 +3034,42 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT nTextPathFlags &=~0x20; } } + //export gTextAlign attr + if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) ) + { + MSO_GeoTextAlign gTextAlign = mso_alignTextCenter; + SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); + drawing::TextHorizontalAdjust eHA( drawing::TextHorizontalAdjust_LEFT ); + aAny >>= eHA; + switch( eHA ) + { + case drawing::TextHorizontalAdjust_LEFT : + gTextAlign = mso_alignTextLeft; + break; + case drawing::TextHorizontalAdjust_CENTER: + gTextAlign = mso_alignTextCenter; + break; + case drawing::TextHorizontalAdjust_RIGHT: + gTextAlign = mso_alignTextRight; + break; + case drawing::TextHorizontalAdjust_BLOCK: + { + SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); + if ( eFTS == SDRTEXTFIT_ALLLINES) + { + gTextAlign = mso_alignTextStretch; + } + else + { + gTextAlign = mso_alignTextWordJust; + } + break; + } + default: + break; + } + AddOpt(DFF_Prop_gtextAlign,gTextAlign); + } } if ( nTextPathFlags != nTextPathFlagsOrg ) AddOpt( DFF_Prop_gtextFStrikethrough, nTextPathFlags ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
