[Libreoffice-commits] .: binfilter/bf_sw binfilter/inc

Joseph Powers jpowers at kemper.freedesktop.org
Sun Jan 30 08:26:01 PST 2011


 binfilter/bf_sw/source/core/docnode/sw_ndcopy.cxx |   86 +++--------
 binfilter/bf_sw/source/core/fields/sw_docufld.cxx |   64 +++++---
 binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx  |  171 ++++++++++++----------
 binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx |    4 
 binfilter/inc/bf_sw/docufld.hxx                   |    4 
 binfilter/inc/bf_sw/fmtcnct.hxx                   |    8 -
 binfilter/inc/bf_sw/fmtpdsc.hxx                   |    9 -
 binfilter/inc/bf_sw/frmfmt.hxx                    |    8 -
 8 files changed, 177 insertions(+), 177 deletions(-)

New commits:
commit 53ff90bae615c50f0291f618a41b752f594a6cc9
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Sun Jan 30 08:25:47 2011 -0800

    Quite some more compiler warnings.
    
    Includes cleaning up a lot of white spaces.

diff --git a/binfilter/bf_sw/source/core/docnode/sw_ndcopy.cxx b/binfilter/bf_sw/source/core/docnode/sw_ndcopy.cxx
index 3e63556..f45fe06 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_ndcopy.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_ndcopy.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,6 @@
  *
  ************************************************************************/
 
-
 #ifdef _MSC_VER
 #pragma hdrstop
 #endif
@@ -34,8 +33,6 @@
 #define _ZFORLIST_DECLARE_TABLE
 #include <hintids.hxx>
 
-
-
 #include <fmtanchr.hxx>
 #include <fmtcntnt.hxx>
 
@@ -54,6 +51,7 @@
 #include <docary.hxx>
 #include <fmtcnct.hxx>
 #include <redline.hxx>
+
 namespace binfilter {
 
 // Struktur fuer das Mappen von alten und neuen Frame-Formaten an den
@@ -138,22 +136,31 @@ namespace binfilter {
 /*N*/ }
 
 
-/*N*/ struct _CopyTable
-/*N*/ {
-/*N*/ 	SwDoc* pDoc;
-/*N*/ 	ULONG nOldTblSttIdx;
-/*N*/ 	_MapTblFrmFmts& rMapArr;
-/*N*/ 	SwTableLine* pInsLine;
-/*N*/ 	SwTableBox* pInsBox;
-/*N*/ 	SwTableNode *pTblNd;
-/*N*/ 	const SwTable *pOldTable;
-/*N*/
-/*N*/ 	_CopyTable( SwDoc* pDc, _MapTblFrmFmts& rArr, ULONG nOldStt,
-/*N*/ 				SwTableNode& rTblNd, const SwTable* pOldTbl )
-/*N*/ 		: pDoc(pDc), pTblNd(&rTblNd), nOldTblSttIdx(nOldStt),
-/*N*/ 		rMapArr(rArr), pOldTable( pOldTbl ), pInsLine(0), pInsBox(0)
-/*N*/ 	{}
-/*N*/ };
+struct _CopyTable
+{
+    SwDoc* pDoc;
+    ULONG nOldTblSttIdx;
+    _MapTblFrmFmts& rMapArr;
+    SwTableLine* pInsLine;
+    SwTableBox* pInsBox;
+    SwTableNode *pTblNd;
+    const SwTable *pOldTable;
+
+    _CopyTable(
+        SwDoc* pDc,
+        _MapTblFrmFmts& rArr,
+        ULONG nOldStt,
+        SwTableNode& rTblNd,
+        const SwTable* pOldTbl
+    )   : pDoc(pDc)
+        , nOldTblSttIdx(nOldStt)
+        , rMapArr(rArr)
+        , pInsLine(0)
+        , pInsBox(0)
+        , pTblNd(&rTblNd)
+        , pOldTable( pOldTbl )
+    {}
+};
 
 /*N*/ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara );
 
@@ -264,16 +271,6 @@ namespace binfilter {
 /*N*/
 /*N*/ 	{
 /*N*/ 		// nicht in Fussnoten kopieren !!
-/*
-!! Mal ohne Frames
-        SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode();
-        SwFrm* pFrm;
-        if( (pCNd && 0 != ( pFrm = pCNd->GetFrm()))
-                ? pFrm->FindFtnFrm()
-                : rIdx < pDoc->GetNodes().EndOfInserts &&
-                    pDoc->GetNodes()[pDoc->GetNodes().EndOfInserts]->StartOfSection()
-                    < rIdx )
-*/
 /*N*/ 		if( rIdx < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
 /*N*/ 			rIdx >= pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() )
 /*?*/ 			return 0;
@@ -343,11 +340,7 @@ namespace binfilter {
 
 //  ----- Copy-Methode vom SwDoc ------
 
-    // verhinder das Kopieren in Fly's, die im Bereich verankert sind.
-
-
-
-
+// verhinder das Kopieren in Fly's, die im Bereich verankert sind.
 
 // Kopieren eines Bereiches im oder in ein anderes Dokument !
 
@@ -361,10 +354,6 @@ namespace binfilter {
 /*N*/ 	SwDoc* pDoc = rPos.nNode.GetNode().GetDoc();
 /*N*/
 /*N*/ 	// verhinder das Kopieren in Fly's, die im Bereich verankert sind.
-/*N*/ 	if( pDoc == this )
-/*N*/ 	{
-/*?*/ 		DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 	}
 /*N*/
 /*N*/ 	SwPaM* pRedlineRange = 0;
 /*N*/ 	if( pDoc->IsRedlineOn() ||
@@ -375,25 +364,14 @@ namespace binfilter {
 /*N*/
 /*N*/ 	BOOL bRet = FALSE;
 /*N*/
-/*N*/ 	if( pDoc && pDoc != this )
-/*?*/ 	{DBG_BF_ASSERT(0, "STRIP");}
 /*N*/ 	// Copy in sich selbst (ueber mehrere Nodes wird hier gesondert
 /*N*/ 	// behandelt; in einem TextNode wird normal behandelt)
-/*N*/ 	else if( ! ( *pStt <= rPos && rPos < *pEnd &&
+/*N*/ 	if( ! ( *pStt <= rPos && rPos < *pEnd &&
 /*N*/ 			( pStt->nNode != pEnd->nNode ||
 /*N*/ 			  !pStt->nNode.GetNode().IsTxtNode() )) )
 /*?*/ 	{DBG_BF_ASSERT(0, "STRIP");}
 /*N*/
-/*N*/ 	else
-/*N*/ 	{
-/*?*/ 		DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 	}
-/*N*/
 /*N*/ 	pDoc->SetRedlineMode_intern( eOld );
-/*N*/ 	if( pRedlineRange )
-/*N*/ 	{
-/*?*/ 		DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 	}
 /*N*/
 /*N*/ 	return bRet;
 /*N*/ }
@@ -547,17 +525,11 @@ namespace binfilter {
 /*N*/ 			const SwFmtChain &rChain = pFmt->GetChain();
 /*N*/ 			int nCnt = 0 != rChain.GetPrev();
 /*N*/ 			nCnt += rChain.GetNext() ? 1: 0;
-/*N*/ 			for ( USHORT k = 0; nCnt && k < aArr.Count(); ++k )
-/*N*/ 			{
-/*?*/ 				DBG_BF_ASSERT(0, "STRIP");
-/*N*/ 			}
 /*N*/ 		}
 /*N*/ 	}
 /*N*/ }
 
 
-
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
index cfb00fc..e850bc2 100644
--- a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
@@ -1179,15 +1179,20 @@ BOOL SwDocInfoField::PutValue( const uno::Any& rAny, BYTE nMId )
 /* ---------------------------------------------------------------------------
 
  ---------------------------------------------------------------------------*/
-/*N*/ SwHiddenTxtField::SwHiddenTxtField( SwHiddenTxtFieldType* pFldType,
-/*N*/ 									sal_Bool 	bConditional,
-/*N*/ 									const 	String& rCond,
-/*N*/ 									const	String& rStr,
-/*N*/ 									sal_Bool 	bHidden,
-/*N*/ 									sal_uInt16  nSub) :
-/*N*/ 	SwField( pFldType ), aCond(rCond), bValid(sal_False),
-/*N*/ 	bCanToggle(bConditional), bIsHidden(bHidden), nSubType(nSub)
-/*N*/ {
+SwHiddenTxtField::SwHiddenTxtField(
+    SwHiddenTxtFieldType* pFldType,
+    sal_Bool 	bConditional,
+    const 	String& rCond,
+    const	String& rStr,
+    sal_Bool 	bHidden,
+    sal_uInt16  nSub
+)   : SwField( pFldType )
+    , aCond(rCond)
+    , nSubType(nSub)
+    , bCanToggle(bConditional)
+    , bIsHidden(bHidden)
+    , bValid(sal_False)
+{
 /*N*/ 	if(nSubType == TYP_CONDTXTFLD)
 /*N*/ 	{
 /*N*/ 		sal_uInt16 nPos = 0;
@@ -1205,20 +1210,28 @@ BOOL SwDocInfoField::PutValue( const uno::Any& rAny, BYTE nMId )
 /*N*/ 	}
 /*N*/ 	else
 /*N*/ 		aTRUETxt = rStr;
-/*N*/ }
+}
 /* ---------------------------------------------------------------------------
 
  ---------------------------------------------------------------------------*/
-/*N*/ SwHiddenTxtField::SwHiddenTxtField( SwHiddenTxtFieldType* pFldType,
-/*N*/ 									const String& rCond,
-/*N*/ 									const String& rTrue,
-/*N*/ 									const String& rFalse,
-/*N*/ 									sal_uInt16 nSub)
-/*N*/ 	: SwField( pFldType ), aCond(rCond), bIsHidden(sal_True), nSubType(nSub),
-/*N*/ 	  aTRUETxt(rTrue), aFALSETxt(rFalse), bValid(sal_False)
-/*N*/ {
-/*N*/ 	bCanToggle	= aCond.Len() > 0;
-/*N*/ }
+SwHiddenTxtField::SwHiddenTxtField(
+    SwHiddenTxtFieldType* pFldType,
+    const String& rCond,
+    const String& rTrue,
+    const String& rFalse,
+    sal_uInt16 nSub
+)
+    : SwField( pFldType )
+    , aTRUETxt(rTrue)
+    , aFALSETxt(rFalse)
+    , aCond(rCond)
+    , nSubType(nSub)
+    , bCanToggle( aCond.Len() > 0 )
+    , bIsHidden(sal_True)
+    , bValid(sal_False)
+{
+}
+
 /* ---------------------------------------------------------------------------
 
  ---------------------------------------------------------------------------*/
@@ -1919,10 +1932,13 @@ BOOL SwRefPageSetField::PutValue( const uno::Any& rAny, BYTE nMId )
     Beschreibung: relatives Seitennummern - Abfrage Feld
  --------------------------------------------------------------------*/
 
-/*N*/ SwRefPageGetFieldType::SwRefPageGetFieldType( SwDoc* pDc )
-/*N*/ 	: SwFieldType( RES_REFPAGEGETFLD ), nNumberingType( SVX_NUM_ARABIC ), pDoc( pDc )
-/*N*/ {
-/*N*/ }
+SwRefPageGetFieldType::SwRefPageGetFieldType( SwDoc* pDc )
+    : SwFieldType( RES_REFPAGEGETFLD )
+    , pDoc( pDc )
+    , nNumberingType( SVX_NUM_ARABIC )
+{
+}
+
 /* ---------------------------------------------------------------------------
 
  ---------------------------------------------------------------------------*/
diff --git a/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx b/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
index 090a46d..959e304 100644
--- a/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
+++ b/binfilter/bf_sw/source/core/layout/sw_atrfrm.cxx
@@ -26,7 +26,6 @@
  *
  ************************************************************************/
 
-
 #ifdef _MSC_VER
 #pragma hdrstop
 #endif
@@ -92,6 +91,7 @@
 
 #include <cmdid.h>
 #include <unomid.h>
+
 namespace binfilter {
 
 using namespace ::com::sun::star;
@@ -129,13 +129,15 @@ sal_Int16 lcl_RelToINT(SwRelationOrient eRelation)
     case  REL_FRM_RIGHT:    nRet = text::RelOrientation::FRAME_RIGHT; break;
     case  REL_PG_FRAME:     nRet = text::RelOrientation::PAGE_FRAME; break;
     case  REL_PG_PRTAREA:   nRet = text::RelOrientation::PAGE_PRINT_AREA; break;
+    case  FRAME:            break;
+    case  LAST_ENUM_DUMMY:  break;
     }
     return nRet;
 }
 SwRelationOrient   lcl_IntToRelation(const uno::Any& rVal)
 {
     SwRelationOrient eRet = FRAME;
-    sal_Int16 nVal;
+    sal_Int16 nVal(0);
     rVal >>= nVal;
     switch(nVal)
     {
@@ -226,9 +228,9 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
 //  Implementierung teilweise inline im hxx
 
 SwFmtFrmSize::SwFmtFrmSize( SwFrmSize eSize, SwTwips nWidth, SwTwips nHeight )
-    : SfxPoolItem( RES_FRM_SIZE ),
-      aSize( nWidth, nHeight ),
-      eFrmSize( eSize )
+    : SfxPoolItem( RES_FRM_SIZE )
+    , aSize( nWidth, nHeight )
+    , eFrmSize( eSize )
 {
     nWidthPercent = nHeightPercent = 0;
 }
@@ -347,7 +349,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_FRMSIZE_REL_HEIGHT:
     {
-        sal_Int16 nSet;
+        sal_Int16 nSet(0);
         rVal >>= nSet;
         if(nSet >= 0 && nSet <= 0xfe)
             SetHeightPercent((BYTE)nSet);
@@ -357,7 +359,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_FRMSIZE_REL_WIDTH:
     {
-        sal_Int16 nSet;
+        sal_Int16 nSet(0);
         rVal >>= nSet;
         if(nSet >= 0 && nSet <= 0xfe)
             SetWidthPercent((BYTE)nSet);
@@ -385,7 +387,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_FRMSIZE_WIDTH :
     {
-        sal_Int32 nWd;
+        sal_Int32 nWd(0);
         if(rVal >>= nWd)
         {
             if(bConvert)
@@ -401,7 +403,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_FRMSIZE_HEIGHT:
     {
-        sal_Int32 nHg;
+        sal_Int32 nHg(0);
         if(rVal >>= nHg)
         {
             if(bConvert)
@@ -417,7 +419,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_FRMSIZE_SIZE_TYPE:
     {
-        sal_Int16 nType;
+        sal_Int16 nType(0);
         if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE )
         {
             SetSizeType((SwFrmSize)nType);
@@ -733,7 +735,7 @@ bool SwFmtPageDesc::PutValue( const uno::Any& rVal, BYTE nMemberId )
     {
     case MID_PAGEDESC_PAGENUMOFFSET:
     {
-        sal_Int16 nOffset;
+        sal_Int16 nOffset(0);
         if(rVal >>= nOffset)
             SetNumOffset( nOffset );
         else
@@ -757,12 +759,12 @@ bool SwFmtPageDesc::PutValue( const uno::Any& rVal, BYTE nMemberId )
 //  class SwFmtCol
 //  Implementierung teilweise inline im hxx
 
-SwColumn::SwColumn() :
-    nUpper( 0 ),
-    nLower( 0 ),
-    nLeft ( 0 ),
-    nRight( 0 ),
-    nWish ( 0 )
+SwColumn::SwColumn()
+    : nWish ( 0 )
+    , nUpper( 0 )
+    , nLower( 0 )
+    , nLeft ( 0 )
+    , nRight( 0 )
 {
 }
 
@@ -776,14 +778,14 @@ sal_Bool SwColumn::operator==( const SwColumn &rCmp )
 }
 
 SwFmtCol::SwFmtCol( const SwFmtCol& rCpy )
-    : SfxPoolItem( RES_COL ),
-      nLineWidth( rCpy.nLineWidth),
-      aLineColor( rCpy.aLineColor),
-      nLineHeight( rCpy.GetLineHeight() ),
-      eAdj( rCpy.GetLineAdj() ),
-      nWidth( rCpy.GetWishWidth() ),
-      bOrtho( rCpy.IsOrtho() ),
-      aColumns( (sal_Int8)rCpy.GetNumCols(), 1 )
+    : SfxPoolItem( RES_COL )
+    , nLineWidth( rCpy.nLineWidth)
+    , aLineColor( rCpy.aLineColor)
+    , nLineHeight( rCpy.GetLineHeight() )
+    , eAdj( rCpy.GetLineAdj() )
+    , aColumns( (sal_Int8)rCpy.GetNumCols(), 1 )
+    , nWidth( rCpy.GetWishWidth() )
+    , bOrtho( rCpy.IsOrtho() )
 {
     for ( sal_uInt16 i = 0; i < rCpy.GetNumCols(); ++i )
     {
@@ -814,12 +816,12 @@ SwFmtCol& SwFmtCol::operator=( const SwFmtCol& rCpy )
 }
 
 SwFmtCol::SwFmtCol()
-    : SfxPoolItem( RES_COL ),
-      nLineHeight( 100 ),
-      eAdj( COLADJ_NONE ),
-      nWidth( USHRT_MAX ),
-      bOrtho( sal_True ),
-      nLineWidth(0)
+    : SfxPoolItem( RES_COL )
+    , nLineWidth(0)
+    , nLineHeight( 100 )
+    , eAdj( COLADJ_NONE )
+    , nWidth( USHRT_MAX )
+    , bOrtho( sal_True )
 {
 }
 
@@ -1219,6 +1221,7 @@ bool SwFmtVertOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
         case VERT_LINE_TOP   :  nRet = text::VertOrientation::LINE_TOP   ;break;
         case VERT_LINE_CENTER:  nRet = text::VertOrientation::LINE_CENTER;break;
         case VERT_LINE_BOTTOM:  nRet = text::VertOrientation::LINE_BOTTOM;break;
+        case VERT_NONE:         break;
         }
         rVal <<= nRet;
     }
@@ -1245,7 +1248,7 @@ bool SwFmtVertOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
     {
     case MID_VERTORIENT_ORIENT:
     {
-        sal_uInt16 nVal;
+        sal_uInt16 nVal(0);
         rVal >>= nVal;
         switch( nVal )
         {
@@ -1269,7 +1272,7 @@ bool SwFmtVertOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_VERTORIENT_POSITION:
     {
-        sal_Int32 nVal;
+        sal_Int32 nVal(0);
         rVal >>= nVal;
         if(bConvert)
             nVal = MM100_TO_TWIP(nVal);
@@ -1359,6 +1362,7 @@ bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
         case HORI_LEFT_AND_WIDTH :
             nRet = text::HoriOrientation::LEFT_AND_WIDTH;
             break;
+        case HORI_NONE:     break;
         }
         rVal <<= nRet;
     }
@@ -1391,7 +1395,7 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
     {
     case MID_HORIORIENT_ORIENT:
     {
-        sal_Int16 nVal;
+        sal_Int16 nVal(0);
         rVal >>= nVal;
         switch( nVal )
         {
@@ -1415,7 +1419,7 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_HORIORIENT_POSITION:
     {
-        sal_Int32 nVal;
+        sal_Int32 nVal(0);
         if(!(rVal >>= nVal))
             bRet = false;
         if(bConvert)
@@ -1589,7 +1593,7 @@ bool SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_ANCHOR_PAGENUM:
     {
-        sal_Int16 nVal;
+        sal_Int16 nVal(0);
         if((rVal >>= nVal) && nVal > 0)
         {
             SetPageNum( nVal );
@@ -1620,19 +1624,19 @@ bool SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
 //  class SwFmtURL
 //  Implementierung teilweise inline im hxx
 
-SwFmtURL::SwFmtURL() :
-    SfxPoolItem( RES_URL ),
-    pMap( 0 ),
-    bIsServerMap( sal_False )
+SwFmtURL::SwFmtURL()
+    : SfxPoolItem( RES_URL )
+    , pMap( 0 )
+    , bIsServerMap( sal_False )
 {
 }
 
-SwFmtURL::SwFmtURL( const SwFmtURL &rURL) :
-    SfxPoolItem( RES_URL ),
-    sURL( rURL.GetURL() ),
-    sTargetFrameName( rURL.GetTargetFrameName() ),
-    sName( rURL.GetName() ),
-    bIsServerMap( rURL.IsServerMap() )
+SwFmtURL::SwFmtURL( const SwFmtURL &rURL)
+    : SfxPoolItem( RES_URL )
+    , sTargetFrameName( rURL.GetTargetFrameName() )
+    , sURL( rURL.GetURL() )
+    , sName( rURL.GetName() )
+    , bIsServerMap( rURL.IsServerMap() )
 {
     pMap = rURL.GetMap() ? new ImageMap( *rURL.GetMap() ) : 0;
 }
@@ -1888,7 +1892,7 @@ bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_NUM_START_AT:
     {
-        sal_Int16 nVal;
+        sal_Int16 nVal(0);
         rVal >>= nVal;
         if(nVal >= 0)
             nOffset = nVal;
@@ -1907,7 +1911,7 @@ bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
     break;
     case MID_NUM_TYPE    :
     {
-        sal_Int16 nVal;
+        sal_Int16 nVal(0);
         rVal >>= nVal;
         if(nVal >= 0 &&
            (nVal <= SVX_NUM_ARABIC ||
@@ -2084,7 +2088,7 @@ bool SwFmtLineNumber::PutValue( const uno::Any& rVal, BYTE nMemberId )
         break;
     case MID_LINENUMBER_STARTVALUE:
     {
-        sal_Int32 nVal;
+        sal_Int32 nVal(0);
         if(rVal >>= nVal)
             SetStartValue( nVal );
         else
@@ -2212,7 +2216,7 @@ bool SwTextGridItem::PutValue( const ::com::sun::star::uno::Any& rVal,
     {
     case MID_GRID_COLOR:
     {
-        sal_Int32 nTmp;
+        sal_Int32 nTmp(0);
         bRet = (rVal >>= nTmp);
         if( bRet )
             SetColor( Color(nTmp) );
@@ -2220,7 +2224,7 @@ bool SwTextGridItem::PutValue( const ::com::sun::star::uno::Any& rVal,
     break;
     case MID_GRID_LINES:
     {
-        sal_Int16 nTmp;
+        sal_Int16 nTmp(0);
         bRet = (rVal >>= nTmp);
         if( bRet && (nTmp >= 0) )
             SetLines( (sal_uInt16)nTmp );
@@ -2242,7 +2246,7 @@ bool SwTextGridItem::PutValue( const ::com::sun::star::uno::Any& rVal,
     {
         DBG_ASSERT( (nMemberId & CONVERT_TWIPS) != 0,
                     "This value needs TWIPS-MM100 conversion" );
-        sal_Int32 nTmp;
+        sal_Int32 nTmp(0);
         bRet = (rVal >>= nTmp);
         nTmp = MM100_TO_TWIP( nTmp );
         if( bRet && (nTmp >= 0) && ( nTmp <= USHRT_MAX) )
@@ -2255,24 +2259,26 @@ bool SwTextGridItem::PutValue( const ::com::sun::star::uno::Any& rVal,
     }
     break;
     case MID_GRID_TYPE:
-        sal_Int16 nTmp;
-        bRet = (rVal >>= nTmp);
-        if( bRet )
         {
-            switch( nTmp )
+            sal_Int16 nTmp(0);
+            bRet = (rVal >>= nTmp);
+            if( bRet )
             {
-            case TextGridMode::NONE:
-                SetGridType( GRID_NONE );
-                break;
-            case TextGridMode::LINES:
-                SetGridType( GRID_LINES_ONLY );
-                break;
-            case TextGridMode::LINES_AND_CHARS:
-                SetGridType( GRID_LINES_CHARS );
-                break;
-            default:
-                bRet = false;
-                break;
+                switch( nTmp )
+                {
+                case TextGridMode::NONE:
+                    SetGridType( GRID_NONE );
+                    break;
+                case TextGridMode::LINES:
+                    SetGridType( GRID_LINES_ONLY );
+                    break;
+                case TextGridMode::LINES_AND_CHARS:
+                    SetGridType( GRID_LINES_CHARS );
+                    break;
+                default:
+                    bRet = false;
+                    break;
+                }
             }
         }
         break;
@@ -2353,8 +2359,6 @@ void SwFrmFmt::MakeFrms()
     ASSERT( !this, "Sorry not implemented." );
 }
 
-
-
 SwRect SwFrmFmt::FindLayoutRect( const sal_Bool bPrtArea, const Point* pPoint,
                                  const sal_Bool bCalcFrm ) const
 {
@@ -2431,7 +2435,6 @@ SdrObject* SwFrmFmt::FindRealSdrObject()
 }
 
 
-
 //  class SwFlyFrmFmt
 //  Implementierung teilweise inline im hxx
 
@@ -2507,7 +2510,7 @@ void SwFlyFrmFmt::MakeFrms()
         break;
 
     case FLY_PAGE:
-    {
+        {
         sal_uInt16 nPgNum = aAnchorAttr.GetPageNum();
         SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetRootFrm()->Lower();
         if( !nPgNum && aAnchorAttr.GetCntntAnchor() )
@@ -2541,8 +2544,16 @@ void SwFlyFrmFmt::MakeFrms()
             }
             pPage = (SwPageFrm*)pPage->GetNext();
         }
-    }
-    break;
+        }
+        break;
+    case RND_STD_HEADER:
+    case RND_STD_FOOTER:
+    case RND_STD_HEADERL:
+    case RND_STD_HEADERR:
+    case RND_STD_FOOTERL:
+    case RND_STD_FOOTERR:
+    case RND_DRAW_OBJECT:
+        break;
     }
 
     if( pModify )
@@ -2590,10 +2601,20 @@ void SwFlyFrmFmt::MakeFrms()
                 case FLY_IN_CNTNT:
                     pFly = new SwFlyInCntFrm( this, pFrm );
                     break;
-#ifdef DBG_UTIL
                 default:
+                    // handle cases:
+                    // - FLY_PAGE
+                    // - RND_STD_HEADER
+                    // - RND_STD_FOOTER
+                    // - RND_STD_HEADERL
+                    // - RND_STD_HEADERR
+                    // - RND_STD_FOOTERL
+                    // - RND_STD_FOOTERR
+                    // - RND_DRAW_OBJECT
+#ifdef DBG_UTIL
                     ASSERT( !this, "Neuer Ankertyp" );
 #endif
+                    break;
                 }
                 pFrm->AppendFly( pFly );
                 SwPageFrm *pPage = pFly->FindPageFrm();
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx
index a2eaca1..eae0a04 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3npool.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -515,7 +515,7 @@ bool SwFmtFlyCnt::Sw3ioExportAllowed() const
 /*N*/ 	rStrm.ReadByteString( aURL1, rStrm.GetStreamCharSet() );
 /*N*/ 	rStrm.ReadByteString( aTarget, rStrm.GetStreamCharSet() );
 /*N*/ 	rStrm >> nId1 >> nId2;
-/*N*/ 
+/*N*/
 /*N*/ 	aURL1 = ::binfilter::StaticBaseUrl::SmartRelToAbs( aURL1 );
 /*N*/ 	SwFmtINetFmt *pNew = new SwFmtINetFmt( aURL1, aTarget );
 /*N*/ 	Sw3IoImp* pIo = Sw3IoImp::GetCurrentIo();
diff --git a/binfilter/inc/bf_sw/docufld.hxx b/binfilter/inc/bf_sw/docufld.hxx
index 1730e27..749f076 100644
--- a/binfilter/inc/bf_sw/docufld.hxx
+++ b/binfilter/inc/bf_sw/docufld.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -163,8 +163,8 @@ public:
 class SwPageNumberField : public SwField
 {
     String	sUserStr;
-    USHORT  nSubType;
     short 	nOffset;
+    USHORT  nSubType;
 
 public:
     SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
diff --git a/binfilter/inc/bf_sw/fmtcnct.hxx b/binfilter/inc/bf_sw/fmtcnct.hxx
index 1d6945d..2bbad7c 100644
--- a/binfilter/inc/bf_sw/fmtcnct.hxx
+++ b/binfilter/inc/bf_sw/fmtcnct.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,6 @@
 #ifndef _FMTCNCT_HXX
 #define _FMTCNCT_HXX
 
-
 #include <format.hxx>
 
 class IntlWrapper;
@@ -44,7 +43,6 @@ class SwFmtChain: public SfxPoolItem
     SwClient aPrev,	//Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
              aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
 
-
 public:
     SwFmtChain() : SfxPoolItem( RES_CHAIN ) {}
     SwFmtChain( const SwFmtChain &rCpy );
@@ -63,7 +61,6 @@ public:
     SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
     SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
 
-
     void SetPrev( SwFlyFrmFmt *pFmt );
     void SetNext( SwFlyFrmFmt *pFmt );
 };
@@ -76,14 +73,11 @@ SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
 }
 
 
-#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
-// GrP moved to gcc_outl.cxx; revisit with gcc3
 inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
     { return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
 
 inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
     { return aSet.GetChain(bInP); }
-#endif
 
 } //namespace binfilter
 #endif
diff --git a/binfilter/inc/bf_sw/fmtpdsc.hxx b/binfilter/inc/bf_sw/fmtpdsc.hxx
index 5eafd2d..ad368f4 100644
--- a/binfilter/inc/bf_sw/fmtpdsc.hxx
+++ b/binfilter/inc/bf_sw/fmtpdsc.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -50,10 +50,10 @@ class SwFmtPageDesc : public SfxPoolItem, public SwClient
     // Auto-Flag setzen zu koennen !!
     friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
                         SwHistory* );
-    USHORT nNumOffset;			// Seitennummer Offset
-    USHORT nDescNameIdx;		// SW3-Reader: Stringpool-Index des Vorlagennamens
     SwModify* pDefinedIn;		// Verweis auf das Objekt, in dem das
                                 // Attribut gesetzt wurde (CntntNode/Format)
+    USHORT nNumOffset;			// Seitennummer Offset
+    USHORT nDescNameIdx;		// SW3-Reader: Stringpool-Index des Vorlagennamens
 
 public:
     SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
@@ -90,14 +90,11 @@ public:
 };
 
 
-#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
-// GrP moved to gcc_outl.cxx; revisit with gcc3
 inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
     { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
 
 inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
     { return aSet.GetPageDesc(bInP); }
-#endif
 
 } //namespace binfilter
 #endif
diff --git a/binfilter/inc/bf_sw/frmfmt.hxx b/binfilter/inc/bf_sw/frmfmt.hxx
index bfcf964..90064d0 100644
--- a/binfilter/inc/bf_sw/frmfmt.hxx
+++ b/binfilter/inc/bf_sw/frmfmt.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -29,12 +29,12 @@
 #define _FRMFMT_HXX
 
 #include <format.hxx>
-class Graphic; 
-class Point; 
+class Graphic;
+class Point;
 
 namespace binfilter {
 
-class ImageMap; 
+class ImageMap;
 class SwDrawContact;
 class SwFlyFrm;
 class IMapObject;


More information about the Libreoffice-commits mailing list