incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suny...@apache.org
Subject svn commit: r1373715 - /incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
Date Thu, 16 Aug 2012 03:13:43 GMT
Author: sunying
Date: Thu Aug 16 03:13:43 2012
New Revision: 1373715

URL: http://svn.apache.org/viewvc?rev=1373715&view=rev
Log:
#119875# fix vertical text direction in table cell change when save .ppt file
Reported by: Li Feng Wang 
Patch by: Ying Sun
Review by: Jian Yuan Li

Modified:
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1373715&r1=1373714&r2=1373715&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Thu Aug 16 03:13:43 2012
@@ -7586,6 +7586,16 @@ void ApplyCellAttributes( const SdrObjec
 			eVA = drawing::TextVerticalAdjust_BOTTOM;
 		xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
 
+		//set textHorizontalAdjust and TextWritingMode attr
+		const sal_Int32 eHA(((const SdrTextLeftDistItem&)pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
+		const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem&)pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
+		static const rtl::OUString	sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust"
) );
+		static const rtl::OUString	sWritingMode( RTL_CONSTASCII_USTRINGPARAM("TextWritingMode")
);
+		xPropSet->setPropertyValue(  sHorizontalAdjust , Any( eHA ) );
+		if ( eDirection == FRMDIR_VERT_TOP_RIGHT )
+		{//vertical writing
+			xPropSet->setPropertyValue(  sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL
) );
+		}
 		SfxItemSet aSet( pObj->GetMergedItemSet() );
 		XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
 		::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );



Mime
View raw message