Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0A77CF7E for ; Thu, 16 Aug 2012 03:14:34 +0000 (UTC) Received: (qmail 14163 invoked by uid 500); 16 Aug 2012 03:14:33 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 14026 invoked by uid 500); 16 Aug 2012 03:14:32 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 13983 invoked by uid 99); 16 Aug 2012 03:14:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2012 03:14:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2012 03:14:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8C24523888FD; Thu, 16 Aug 2012 03:13:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1373715 - /incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Date: Thu, 16 Aug 2012 03:13:43 -0000 To: ooo-commits@incubator.apache.org From: sunying@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120816031343.8C24523888FD@eris.apache.org> 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 );