Hi,

this change is the culprit of this WaE issue:

cc1plus: warnings being treated as errors
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx: In copy 
constructor ‘SwFmtCol::SwFmtCol(const SwFmtCol&)’:
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx:88: warning: 
‘SwFmtCol::bOrtho’ will be initialized after
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx:86: warning:   
‘sal_Int16 SwFmtCol::aWidthAdjustValue’
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/core/layout/atrfrm.cxx:818: 
warning:   when initialized here
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx: In constructor 
‘SwFmtCol::SwFmtCol()’:
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx:88: warning: 
‘SwFmtCol::bOrtho’ will be initialized after
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/inc/fmtclds.hxx:86: warning:   
‘sal_Int16 SwFmtCol::aWidthAdjustValue’
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/sw/source/core/layout/atrfrm.cxx:858: 
warning:   when initialized here
make: *** 
[/Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/350/unxmacxi.pro/workdir/CxxObject/sw/source/core/layout/atrfrm.o]
 Error 1
dmake:  Error code 2, while making 'all'

Please reorder initializations to match the prototypes.

Thanks.

On Sep 4, 2012, at 11:39 AM, [email protected] wrote:

> 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,<[email protected]>
> Found by: Yan Ji,<[email protected]>
> Review by: Jian Hong Cheng,<[email protected]>
> 
> 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<SvxLRSpaceItem>( *(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<const 
> SwFmtCol&>(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
> 
> 

-- 
Pavel Janík



Reply via email to