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 41E5ADA69 for ; Tue, 4 Sep 2012 09:40:03 +0000 (UTC) Received: (qmail 54246 invoked by uid 500); 4 Sep 2012 09:40:02 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 53184 invoked by uid 500); 4 Sep 2012 09:39:55 -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 53142 invoked by uid 99); 4 Sep 2012 09:39:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 09:39:54 +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; Tue, 04 Sep 2012 09:39:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8F8192388993; Tue, 4 Sep 2012 09:39:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1380503 - in /incubator/ooo/trunk/main/sw: inc/fmtclds.hxx source/core/layout/atrfrm.cxx source/filter/ww8/wrtw8sty.cxx source/filter/ww8/ww8atr.cxx Date: Tue, 04 Sep 2012 09:39:07 -0000 To: ooo-commits@incubator.apache.org From: chengjh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120904093907.8F8192388993@eris.apache.org> Author: chengjh Date: Tue Sep 4 09:39:06 2012 New Revision: 1380503 URL: http://svn.apache.org/viewvc?rev=1380503&view=rev Log: Fix issue #i120133: Doc file saved by AOO, section size changed * sw/inc/fmtclds.hxx * sw/source/core/layout/atrfrm.cxx * sw/source/filter/ww8/wrtw8sty.cxx * sw/source/filter/ww8/ww8atr.cxx MS Word Binary compatibility Patch by: Chen Peng, Found by: Yan Ji, Review by: Jian Hong Cheng, Modified: incubator/ooo/trunk/main/sw/inc/fmtclds.hxx incubator/ooo/trunk/main/sw/source/core/layout/atrfrm.cxx incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx Modified: incubator/ooo/trunk/main/sw/inc/fmtclds.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/inc/fmtclds.hxx?rev=1380503&r1=1380502&r2=1380503&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/inc/fmtclds.hxx (original) +++ incubator/ooo/trunk/main/sw/inc/fmtclds.hxx Tue Sep 4 09:39:06 2012 @@ -83,6 +83,7 @@ class SW_DLLPUBLIC SwFmtCol : public Sfx SwColumns aColumns; //Informationen fuer die einzelnen Spalten. sal_uInt16 nWidth; //Gesamtwunschbreite aller Spalten. + sal_Int16 aWidthAdjustValue; sal_Bool bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen //der GutterWidth eine 'optische Verteilung' @@ -99,6 +100,9 @@ public: SwFmtCol(); SwFmtCol( const SwFmtCol& ); ~SwFmtCol(); + //i120133 + const sal_Int16 GetAdjustValue() const { return aWidthAdjustValue; } + void SetAdjustValue( const sal_Int16& n ) { aWidthAdjustValue = n; } SwFmtCol& operator=( const SwFmtCol& ); Modified: incubator/ooo/trunk/main/sw/source/core/layout/atrfrm.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/layout/atrfrm.cxx?rev=1380503&r1=1380502&r2=1380503&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/core/layout/atrfrm.cxx (original) +++ incubator/ooo/trunk/main/sw/source/core/layout/atrfrm.cxx Tue Sep 4 09:39:06 2012 @@ -823,7 +823,8 @@ SwFmtCol::SwFmtCol( const SwFmtCol& rCpy eAdj( rCpy.GetLineAdj() ), aColumns( (sal_Int8)rCpy.GetNumCols(), 1 ), nWidth( rCpy.GetWishWidth() ), - bOrtho( rCpy.IsOrtho() ) + bOrtho( rCpy.IsOrtho() ), + aWidthAdjustValue( rCpy.aWidthAdjustValue ) { for ( sal_uInt16 i = 0; i < rCpy.GetNumCols(); ++i ) { @@ -842,6 +843,7 @@ SwFmtCol& SwFmtCol::operator=( const SwF eAdj = rCpy.GetLineAdj(); nWidth = rCpy.GetWishWidth(); bOrtho = rCpy.IsOrtho(); + aWidthAdjustValue = rCpy.aWidthAdjustValue; if ( aColumns.Count() ) aColumns.DeleteAndDestroy( 0, aColumns.Count() ); @@ -859,7 +861,8 @@ SwFmtCol::SwFmtCol() nLineHeight( 100 ), eAdj( COLADJ_NONE ), nWidth( USHRT_MAX ), - bOrtho( sal_True ) + bOrtho( sal_True ), + aWidthAdjustValue( 0 ) { } @@ -873,7 +876,9 @@ int SwFmtCol::operator==( const SfxPoolI eAdj == rCmp.GetLineAdj() && nWidth == rCmp.GetWishWidth() && bOrtho == rCmp.IsOrtho() && - aColumns.Count() == rCmp.GetNumCols()) ) + aColumns.Count() == rCmp.GetNumCols() && + aWidthAdjustValue == rCmp.GetAdjustValue() + ) ) return 0; for ( sal_uInt16 i = 0; i < aColumns.Count(); ++i ) Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx?rev=1380503&r1=1380502&r2=1380503&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx Tue Sep 4 09:39:06 2012 @@ -1550,7 +1550,6 @@ void MSWordExportBase::SectionProperties // am Nachkommen NUR die Spaltigkeit gemaess Sect-Attr. // umsetzen - aSet.Put( rSepInfo.pSectionFmt->GetFmtAttr( RES_COL ) ); const SvxLRSpaceItem &rSectionLR = ItemGet( *(rSepInfo.pSectionFmt), RES_LR_SPACE ); @@ -1560,6 +1559,17 @@ void MSWordExportBase::SectionProperties SvxLRSpaceItem aResultLR( rPageLR.GetLeft() + rSectionLR.GetLeft(), rPageLR.GetRight() + rSectionLR.GetRight(), 0, 0, RES_LR_SPACE ); + //i120133: The Section width should consider section indent value. + if (rSectionLR.GetLeft()+rSectionLR.GetRight()!=0) + { + const SwFmtCol& rCol = dynamic_cast(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL)); + SwFmtCol aCol(rCol); + aCol.SetAdjustValue(rSectionLR.GetLeft()+rSectionLR.GetRight()); + aSet.Put(aCol); + } + else + aSet.Put(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL)); + aSet.Put( aResultLR ); Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx?rev=1380503&r1=1380502&r2=1380503&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx Tue Sep 4 09:39:06 2012 @@ -4504,6 +4504,9 @@ void AttributeOutputBase::FormatColumns( const SvxLRSpaceItem &rLR = pFmt->GetLRSpace(); nPageSize = pFmt->GetFrmSize().GetWidth(); nPageSize -= rLR.GetLeft() + rLR.GetRight(); + //i120133: The Section width should consider page indent value. + nPageSize -= rCol.GetAdjustValue(); + } // Nachsehen, ob alle Spalten gleich sind