[Libreoffice-commits] .: binfilter/bf_sw

Joseph Powers jpowers at kemper.freedesktop.org
Sat Jan 29 10:53:51 PST 2011


 binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx  |    9 -
 binfilter/bf_sw/source/core/docnode/sw_node.cxx    |   11 --
 binfilter/bf_sw/source/core/docnode/sw_nodes.cxx   |   54 +++++-----
 binfilter/bf_sw/source/core/docnode/sw_section.cxx |   11 +-
 binfilter/bf_sw/source/core/fields/sw_authfld.cxx  |   22 +---
 binfilter/bf_sw/source/core/fields/sw_chpfld.cxx   |  107 ++++++++++-----------
 binfilter/bf_sw/source/core/fields/sw_dbfld.cxx    |   58 ++++-------
 7 files changed, 119 insertions(+), 153 deletions(-)

New commits:
commit c817e0194723c9fb9dc777163cbe4e907fb2193b
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Sat Jan 29 10:53:05 2011 -0800

    Quite some more compiler warnings.

diff --git a/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx b/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx
index 604752b..3e4f033 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_ndsect.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
@@ -307,7 +307,6 @@ namespace binfilter {
 /*?*/ 						aIdx++;
 /*?*/ 					} while( aIdx.GetNode().IsEndNode() &&
 /*?*/ 								0 != aIdx.GetNode().FindSectionNode() );
-/*?*/ //					if( !aIdx.GetNode().IsEndNode() )
 /*?*/ 					{
 /*?*/ 						nRet = 2;
 /*?*/ 						if( ppSttNd )
@@ -435,10 +434,6 @@ namespace binfilter {
 /*N*/ {
 /*N*/ 	SwSectionFmt* pFmt = (*pSectionFmtTbl)[ nPos ];
 /*N*/ 	SwSection* pSection = pFmt->GetSection();
-/*N*/     /// OD 04.10.2002 #102894#
-/*N*/     /// remember hidden condition flag of SwSection before changes
-/*N*/     pSection->IsCondHidden() ? true : false;
-/*N*/
 /*N*/ 	if( *pSection == rSect )
 /*N*/ 	{
 /*N*/ 		// die Attribute ueberpruefen
@@ -891,7 +886,7 @@ namespace binfilter {
 /*N*/ 	String aName( aId );
 /*N*/ 	xub_StrLen nNmLen = aName.Len();
 /*N*/
-/*N*/ 	USHORT nNum, nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
+/*N*/ 	USHORT nNum(0), nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
 /*N*/ 	BYTE* pSetFlags = new BYTE[ nFlagSize ];
 /*N*/ 	memset( pSetFlags, 0, nFlagSize );
 /*N*/
diff --git a/binfilter/bf_sw/source/core/docnode/sw_node.cxx b/binfilter/bf_sw/source/core/docnode/sw_node.cxx
index ef82363..48cda6c 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_node.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_node.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
@@ -639,10 +639,7 @@ using namespace ::com::sun::star::i18n;
 /*N*/ //FEATURE::CONDCOLL
 /*N*/ 		// HACK: hier muss die entsprechend der neuen Vorlage die Bedingungen
 /*N*/ 		//		neu ueberprueft werden!
-/*N*/ 		if( TRUE /*pNewColl */ )
-/*N*/ 		{
-/*N*/ 			SetCondFmtColl( 0 );
-/*N*/ 		}
+/*N*/       SetCondFmtColl( 0 );
 /*N*/ //FEATURE::CONDCOLL
 /*N*/
 /*N*/ 		if( !IsModifyLocked() )
@@ -1209,6 +1206,7 @@ using namespace ::com::sun::star::i18n;
 /*?*/ 					break;
 /*?*/ 				case SwHeaderStartNode:     nCond = PARA_IN_HEADER; break;
 /*?*/ 				case SwFooterStartNode:     nCond = PARA_IN_FOOTER; break;
+                    case SwNormalStartNode:     break;
 /*N*/ 				}
 /*N*/ 			}
 /*N*/
@@ -1297,9 +1295,6 @@ using namespace ::com::sun::star::i18n;
 /*N*/ }
 /*N*/ #endif
 
-
-
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/docnode/sw_nodes.cxx b/binfilter/bf_sw/source/core/docnode/sw_nodes.cxx
index 10efc84..6fa9a0c 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_nodes.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_nodes.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
@@ -48,11 +48,11 @@
 #include <ddefld.hxx>
 #include <swddetbl.hxx>
 #include <frame.hxx>
+
 namespace binfilter {
-/*N*/ extern bool CheckNodesRange( const SwNodeIndex& rStt,
-/*N*/ 							const SwNodeIndex& rEnd, bool bChkSection );
+    extern bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, bool bChkSection );
 
-SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
+    SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
 } //namespace binfilter
 
 namespace binfilter {
@@ -508,8 +508,8 @@ namespace binfilter {
 /*?*/ 		return 0;
 /*N*/
 /*N*/ 	SwNodeIndex aTmp(*pIdx, +1);
-/*N*/ 	SwNode* pNd;
-/*N*/ 	while( aTmp < Count()-1 && 0 == ( pNd = &aTmp.GetNode())->IsCntntNode() )
+/*N*/ 	SwNode* pNd(NULL);
+/*N*/ 	while( aTmp < Count()-1 && 0 == ( pNd = &aTmp.GetNode() )->IsCntntNode() )
 /*N*/ 		aTmp++;
 /*N*/
 /*N*/ 	if( aTmp == Count()-1 )
@@ -525,7 +525,7 @@ namespace binfilter {
 /*?*/ 		return 0;
 /*N*/
 /*N*/ 	SwNodeIndex aTmp( *pIdx, -1 );
-/*N*/ 	SwNode* pNd;
+/*N*/ 	SwNode* pNd(NULL);
 /*N*/ 	while( aTmp.GetIndex() && 0 == ( pNd = &aTmp.GetNode())->IsCntntNode() )
 /*N*/ 		aTmp--;
 /*N*/
@@ -542,7 +542,7 @@ namespace binfilter {
 /*?*/ 		return 0;
 /*N*/
 /*N*/ 	SwNodeIndex aTmp(*pIdx, +1);
-/*N*/ 	SwNode* pNd;
+/*N*/ 	SwNode* pNd(NULL);
 /*N*/ 	while( aTmp < Count()-1 )
 /*N*/ 	{
 /*N*/ 		pNd = &aTmp.GetNode();
@@ -1018,12 +1018,12 @@ namespace binfilter {
 /*N*/ 									const SwNode* pEnd ) const
 /*N*/ {
 /*N*/ 	SwNode* pFrmNd = 0;
-/*N*/ 
+/*N*/
 /*N*/ 	// habe wir gar kein Layout, vergiss es
 /*N*/ 	if( GetDoc()->GetRootFrm() )
 /*N*/ 	{
 /*N*/ 		SwNode* pSttNd = &rFrmIdx.GetNode();
-/*N*/ 
+/*N*/
 /*N*/ 		// wird in eine versteckte Section verschoben ??
 /*N*/ 		SwSectionNode* pSectNd = pSttNd->IsSectionNode()
 /*N*/ 					? pSttNd->FindStartNode()->FindSectionNode()
@@ -1039,10 +1039,10 @@ namespace binfilter {
 /*N*/ 			}
 /*N*/ 			else
 /*?*/ 				pNd = pSttNd;
-/*N*/ 
+/*N*/
 /*N*/ 			if( ( pFrmNd = pNd )->IsCntntNode() )
 /*N*/ 				rFrmIdx = aIdx;
-/*N*/ 
+/*N*/
 /*N*/ 				// suche nach vorne/hinten nach einem Content Node
 /*N*/ 			else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, TRUE, FALSE )) &&
 /*N*/ 					::binfilter::CheckNodesRange( aIdx, rFrmIdx, TRUE ) &&
@@ -1063,7 +1063,7 @@ namespace binfilter {
 /*N*/ 					aIdx = pEnd->GetIndex() + 1;
 /*N*/ 				else
 /*?*/ 					aIdx = rFrmIdx;
-/*N*/ 
+/*N*/
 /*N*/ 				// JP 19.09.93: aber nie die Section dafuer verlassen !!
 /*N*/ 				if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsCntntNode() ) ||
 /*N*/ 					( 0 != ( pFrmNd = GoNextSection( &aIdx, TRUE, FALSE )) &&
@@ -1105,13 +1105,13 @@ namespace binfilter {
 /*?*/ 						aIdx = pEnd->GetIndex() + 1;
 /*?*/ 					else
 /*?*/ 						aIdx = rFrmIdx.GetIndex() + 1;
-/*?*/ 
+/*?*/
 /*?*/ 					if( (pFrmNd = &aIdx.GetNode())->IsTableNode() )
 /*?*/ 						rFrmIdx = aIdx;
 /*?*/ 					else
 /*?*/ 					{
 /*?*/ 						pFrmNd = 0;
-/*?*/ 
+/*?*/
 /*?*/ 						// is there some sectionnodes before a tablenode?
 /*?*/ 						while( aIdx.GetNode().IsSectionNode() )
 /*?*/ 						{
@@ -1153,7 +1153,7 @@ namespace binfilter {
 /*N*/ {
 /*N*/ 	ULONG nEnd = nDelPos + nSize;
 /*N*/ 	SwNode* pNew = (*this)[ nEnd ];
-/*N*/ 
+/*N*/
 /*N*/ 	if( pRoot )
 /*N*/ 	{
 /*N*/ 		SwNodeIndex *p = pRoot;
@@ -1163,10 +1163,10 @@ namespace binfilter {
 /*N*/ 			SwNodeIndex* pNext = p->pNext;
 /*N*/ 			if( nDelPos <= nIdx && nIdx < nEnd )
 /*N*/ 				(*p) = *pNew;
-/*N*/ 
+/*N*/
 /*N*/ 			p = pNext;
 /*N*/ 		}
-/*N*/ 
+/*N*/
 /*N*/ 		p = pRoot->pPrev;
 /*N*/ 		while( p )
 /*N*/ 		{
@@ -1174,16 +1174,16 @@ namespace binfilter {
 /*?*/ 			SwNodeIndex* pPrev = p->pPrev;
 /*?*/ 			if( nDelPos <= nIdx && nIdx < nEnd )
 /*?*/ 				(*p) = *pNew;
-/*?*/ 
+/*?*/
 /*?*/ 			p = pPrev;
 /*N*/ 		}
 /*N*/ 	}
-/*N*/ 
+/*N*/
 /*N*/ 	if( bDel )
 /*N*/ 	{
 /*N*/ 		ULONG nCnt = nSize;
 /*N*/ 		SwNode *pDel = (*this)[ nDelPos+nCnt-1 ], *pPrev = (*this)[ nDelPos+nCnt-2 ];
-/*N*/ 
+/*N*/
 /*N*/ #if 1
 /*N*/ // temp. Object setzen
 /*N*/ 		//JP 24.08.98: muessten eigentlich einzeln removed werden, weil
@@ -1194,7 +1194,7 @@ namespace binfilter {
 /*N*/ 		// siehe Bug 55406
 /*N*/ 		_TempBigPtrEntry aTempEntry;
 /*N*/ 		BigPtrEntry* pTempEntry = &aTempEntry;
-/*N*/ 
+/*N*/
 /*N*/ 		while( nCnt-- )
 /*N*/ 		{
 /*N*/ 			delete pDel;
@@ -1223,7 +1223,7 @@ namespace binfilter {
 /*N*/ 	}
 /*N*/ 	else
 /*N*/ #endif
-/*N*/ 
+/*N*/
 /*N*/ 	BigPtrArray::Remove( nDelPos, nSize );
 /*N*/ }
 
@@ -1250,15 +1250,15 @@ namespace binfilter {
 /*N*/ {
 /*N*/ 	register SwNodeIndex* pN = rIdx.pNext;
 /*N*/ 	register SwNodeIndex* pP = rIdx.pPrev;
-/*N*/ 
+/*N*/
 /*N*/ 	if( pRoot == &rIdx )
 /*N*/ 		pRoot = pP ? pP : pN;
-/*N*/ 
+/*N*/
 /*N*/ 	if( pP )
 /*N*/ 		pP->pNext = pN;
 /*N*/ 	if( pN )
 /*N*/ 		pN->pPrev = pP;
-/*N*/ 
+/*N*/
 /*N*/ 	rIdx.pNext = 0;
 /*N*/ 	rIdx.pPrev = 0;
 /*N*/ }
@@ -1275,7 +1275,7 @@ namespace binfilter {
 /*N*/ 	BigPtrArray::Insert( pIns, nPos );
 /*N*/ }
 
-    // #i31620# 
+    // #i31620#
     SwNode * SwNodes::operator[](int n) const
     {
         return operator[]((ULONG) n);
diff --git a/binfilter/bf_sw/source/core/docnode/sw_section.cxx b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
index a489fc2..2b2be42 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_section.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_section.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
@@ -72,7 +72,6 @@ namespace binfilter {
 
 /*N*/ SV_IMPL_REF( SwServerObject )
 
-//static const char sSectionFmtNm[] = "Section";
 #define sSectionFmtNm aEmptyStr
 
 /*N*/ class SwIntrnlSectRefLink : public SwBaseLink
@@ -424,6 +423,10 @@ void SwSection::SetCondHidden( int bFlag )
 /*N*/ 				}
 /*N*/ 			}
 /*N*/ 			break;
+            case CONTENT_SECTION:
+            case TOX_HEADER_SECTION:
+            case TOX_CONTENT_SECTION:
+                break;
 /*N*/ 		}
 /*N*/ 		((SwSection*)this)->sLinkFileName = sTmp;
 /*N*/ 	}
@@ -1127,11 +1130,12 @@ void SwSectionFmt::MakeFrms()
 /*N*/ 	case CREATE_UPDATE: 		// Link connecten und updaten
 /*N*/ 		pLnk->Update();
 /*N*/ 		break;
+        case CREATE_NONE:
+            break;
 /*N*/ 	}
 /*N*/ }
 
 
-
 /*N*/ BOOL SwIntrnlSectRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen /*nStt*/, xub_StrLen /*nEnd */) const
 /*N*/ {
 /*N*/ 	SwStartNode* pSttNd = rSectFmt.GetSectionNode( FALSE );
@@ -1141,7 +1145,6 @@ void SwSectionFmt::MakeFrms()
 /*N*/ }
 
 
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx b/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
index 57a76a9..2db26dd 100644
--- a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_authfld.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
@@ -366,9 +366,6 @@ const SwAuthEntry*  SwAuthorityFieldType::GetEntryByPosition(USHORT nPos) const
 USHORT  SwAuthorityFieldType::GetSequencePos(long nHandle)
 {
     //find the field in a sorted array of handles,
-#ifdef DBG_UTIL
-    sal_Bool bCurrentFieldWithoutTextNode = sal_False;
-#endif
     if(m_pSequArr->Count() && m_pSequArr->Count() != m_pDataArr->Count())
         DelSequenceArray();
     if(!m_pSequArr->Count())
@@ -381,16 +378,10 @@ USHORT  SwAuthorityFieldType::GetSequencePos(long nHandle)
         for( SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE(SwFmtFld) );
                                 pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
         {
-            SwAuthorityField* pAFld = (SwAuthorityField*)pFmtFld->GetFld();
             const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
-         if(!pTxtFld || !pTxtFld->GetpTxtNode())
-            {
-#ifdef DBG_UTIL
-                if(nHandle == pAFld->GetHandle())
-                    bCurrentFieldWithoutTextNode = sal_True;
-#endif
+            if(!pTxtFld || !pTxtFld->GetpTxtNode())
                 continue;
-            }
+
             const SwTxtNode& rFldTxtNode = pTxtFld->GetTxtNode();
             SwPosition aFldPos(rFldTxtNode);
             SwDoc& rDoc = *(SwDoc*)rFldTxtNode.GetDoc();
@@ -398,7 +389,7 @@ USHORT  SwAuthorityFieldType::GetSequencePos(long nHandle)
             const SwTxtNode* pTxtNode = 0;
             if(pFrm && !pFrm->IsInDocBody())
                 pTxtNode = GetBodyTxtNode( rDoc, aFldPos, *pFrm );
-            //if no text node could be found or the field is in the document 
+            //if no text node could be found or the field is in the document
             //body the directly available text node will be used
             if(!pTxtNode)
                 pTxtNode = &rFldTxtNode;
@@ -457,7 +448,6 @@ USHORT  SwAuthorityFieldType::GetSequencePos(long nHandle)
             break;
         }
     }
-    ASSERT(bCurrentFieldWithoutTextNode || nRet, "Handle not found")
     return nRet;
 }
 /* -----------------------------15.11.00 17:33--------------------------------
@@ -668,7 +658,7 @@ String  SwAuthorityField::Expand() const
      String sRet;
      if(pAuthType->GetPrefix())
          sRet.Assign(pAuthType->GetPrefix());
- 
+
      if( pAuthType->IsSequence() )
      {
          sRet += String::CreateFromInt32( pAuthType->GetSequencePos( nHandle ));
@@ -813,7 +803,7 @@ BOOL    SwAuthorityField::PutValue( const Any& rAny, BYTE nMId )
             OUString sContent;
             if(AUTH_FIELD_AUTHORITY_TYPE == nFound)
             {
-                sal_Int16 nVal;
+                sal_Int16 nVal(0);
                 pParam[i].Value >>= nVal;
                 sContent = OUString::valueOf((sal_Int32)nVal);
             }
diff --git a/binfilter/bf_sw/source/core/fields/sw_chpfld.cxx b/binfilter/bf_sw/source/core/fields/sw_chpfld.cxx
index 9142e48..e6d989b 100644
--- a/binfilter/bf_sw/source/core/fields/sw_chpfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_chpfld.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
@@ -78,14 +78,14 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 	switch( GetFormat() )
 /*N*/ 	{
 /*N*/ 		case CF_TITLE:		sStr = sTitle;	break;
-/*N*/ 
+/*N*/
 /*N*/ 		case CF_NUMBER:
 /*N*/ 		case CF_NUM_TITLE:  sStr.Insert( sPre, 0 );
 /*N*/ 							sStr += sPost;
 /*N*/ 							if( CF_NUM_TITLE == GetFormat() )
 /*N*/ 								sStr += sTitle;
 /*N*/ 							break;
-/*N*/ 
+/*N*/
 /*?*/ 		case CF_NUM_NOPREPST_TITLE:	sStr += sTitle;	break;
 /*N*/ 	}
 /*N*/ 	return sStr;
@@ -101,7 +101,7 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 	pTmp->sNumber = sNumber;
 /*N*/ 	pTmp->sPost = sPost;
 /*N*/ 	pTmp->sPre = sPre;
-/*N*/ 
+/*N*/
 /*N*/ 	return pTmp;
 /*N*/ }
 
@@ -113,13 +113,13 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 	ASSERT( pFrm, "in welchem Frame stehe ich denn?" )
 /*N*/ 	SwDoc* pDoc = (SwDoc*)pTxtNd->GetDoc();
 /*N*/ 	SwPosition aPos( pDoc->GetNodes().GetEndOfContent() );
-/*N*/ 
+/*N*/
 /*N*/ 	if( pFrm->IsInDocBody() )
 /*N*/ 		aPos.nNode = *pTxtNd;
 /*N*/ 	else if( 0 == (pTxtNd = GetBodyTxtNode( *pDoc, aPos, *pFrm )) )
 /*N*/ 		// kein TxtNode (Formatierung Kopf/Fusszeile)
 /*?*/ 		return;
-/*N*/ 
+/*N*/
 /*N*/ 	ASSERT( pTxtNd, "Wo steht das Feld" );
 /*N*/ 	pTxtNd = pTxtNd->FindOutlineNodeOfLevel( nLevel );
 /*N*/ 	if( pTxtNd )
@@ -141,7 +141,7 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*?*/ 						pTxtNd = pONd;
 /*?*/ 						break;
 /*N*/ 					}
-/*N*/ 
+/*N*/
 /*N*/ 					if( !nLevel-- )
 /*N*/ 						break;
 /*N*/ 					pONd = pTxtNd->FindOutlineNodeOfLevel( nLevel );
@@ -150,11 +150,11 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*?*/ 					break;
 /*N*/ 			} while( sal_True );
 /*N*/ 		}
-/*N*/ 
+/*N*/
 /*N*/ 		const SwNodeNum& rNum = *pTxtNd->GetOutlineNum();
 /*N*/ 		// nur die Nummer besorgen, ohne Pre-/Post-fixstrings
 /*N*/ 		sNumber = pDoc->GetOutlineNumRule()->MakeNumString( rNum, sal_False );
-/*N*/ 
+/*N*/
 /*N*/ 		if( NO_NUM > rNum.GetLevel() && !( NO_NUMLEVEL & rNum.GetLevel() ) )
 /*N*/ 		{
 /*N*/ 			const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( rNum.GetLevel() );
@@ -163,9 +163,9 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 		}
 /*N*/ 		else
 /*?*/ 			sPost = aEmptyStr, sPre = aEmptyStr;
-/*N*/ 
+/*N*/
 /*N*/ 		sTitle = pTxtNd->GetExpandTxt();
-/*N*/ 
+/*N*/
 /*N*/ 		for( xub_StrLen i = 0; i < sTitle.Len(); ++i )
 /*N*/ 			if( ' ' > sTitle.GetChar( i ) )
 /*?*/ 				sTitle.Erase( i--, 1 );
@@ -190,7 +190,7 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 	case FIELD_PROP_BYTE1:
 /*N*/ 		rAny <<= (sal_Int8)nLevel;
 /*N*/ 		break;
-/*N*/ 
+/*N*/
 /*N*/ 	case FIELD_PROP_USHORT1:
 /*N*/ 		{
 /*N*/ 			sal_Int16 nRet;
@@ -210,7 +210,7 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*N*/ 			rAny <<= nRet;
 /*N*/ 		}
 /*N*/ 		break;
-/*N*/ 
+/*N*/
 /*N*/ 	default:
 /*?*/ 		DBG_ERROR("illegal property");
 /*N*/ 	}
@@ -219,47 +219,46 @@ SwFieldType* SwChapterFieldType::Copy() const
 /*-----------------05.03.98 16:19-------------------
 
 --------------------------------------------------*/
-/*N*/ BOOL SwChapterField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMId )
-/*N*/ {
-/*N*/ 	BOOL bRet = TRUE;
-/*N*/     nMId &= ~CONVERT_TWIPS;
-/*N*/ 	switch( nMId )
-/*N*/ 	{
-/*N*/ 	case FIELD_PROP_BYTE1:
-/*?*/ 		sal_Int8 nTmp;
-/*?*/ 		rAny >>= nTmp;
-/*?*/ 		if(nTmp >= 0 && nTmp < MAXLEVEL)
-/*?*/ 			nLevel = nTmp;
-/*?*/ 		else
-/*?*/ 			bRet = FALSE;
-/*?*/ 		break;
-/*N*/ 
-/*N*/ 	case FIELD_PROP_USHORT1:
-/*N*/ 		{
-/*N*/ 			sal_Int16 nVal;
-/*N*/ 			rAny >>= nVal;
-/*N*/ 			switch( nVal )
-/*N*/ 			{
-/*N*/ 				case text::ChapterFormat::NAME:	SetFormat(CF_TITLE); break;
-/*N*/ 				case text::ChapterFormat::NUMBER:  SetFormat(CF_NUMBER); break;
-/*N*/ 				case text::ChapterFormat::NO_PREFIX_SUFFIX:
-/*?*/ 							SetFormat(CF_NUM_NOPREPST_TITLE);
-/*?*/ 				break;
-/*N*/ 				case text::ChapterFormat::DIGIT:
-/*N*/ 						SetFormat(CF_NUMBER_NOPREPST);
-/*N*/ 				break;
-/*N*/ 				//case text::ChapterFormat::NAME_NUMBER:
-/*N*/ 				default:		SetFormat(CF_NUM_TITLE);
-/*N*/ 			}
-/*N*/ 		}
-/*N*/ 		break;
-/*N*/ 
-/*N*/ 	default:
-/*?*/ 		DBG_ERROR("illegal property");
-/*?*/ 		bRet = FALSE;
-/*N*/ 	}
-/*N*/ 	return bRet;
-/*N*/ }
+BOOL SwChapterField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMId )
+{
+    BOOL bRet = TRUE;
+    nMId &= ~CONVERT_TWIPS;
+
+    switch( nMId )
+    {
+    case FIELD_PROP_BYTE1:
+        {
+            sal_Int8 nTmp(0);
+            rAny >>= nTmp;
+            if(nTmp >= 0 && nTmp < MAXLEVEL)
+                nLevel = nTmp;
+            else
+                bRet = FALSE;
+        }
+        break;
+
+    case FIELD_PROP_USHORT1:
+        {
+            sal_Int16 nVal(0);
+            rAny >>= nVal;
+            switch( nVal )
+            {
+            case text::ChapterFormat::NAME:             SetFormat(CF_TITLE); break;
+            case text::ChapterFormat::NUMBER:           SetFormat(CF_NUMBER); break;
+            case text::ChapterFormat::NO_PREFIX_SUFFIX: SetFormat(CF_NUM_NOPREPST_TITLE); break;
+            case text::ChapterFormat::DIGIT:            SetFormat(CF_NUMBER_NOPREPST); break;
+            default:                                    SetFormat(CF_NUM_TITLE);
+            }
+        }
+        break;
+
+    default:
+        DBG_ERROR("illegal property");
+        bRet = FALSE;
+    }
+    return bRet;
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx b/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
index 119e7b3..f17c02e 100644
--- a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_dbfld.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
@@ -106,11 +106,11 @@ using namespace ::rtl;
 /*N*/ void SwDBFieldType::ReleaseRef()
 /*N*/ {
 /*N*/ 	ASSERT(nRefCnt > 0, "RefCount kleiner 0!");
-/*N*/ 
+/*N*/
 /*N*/ 	if (--nRefCnt <= 0)
 /*N*/ 	{
 /*N*/ 		USHORT nPos = GetDoc()->GetFldTypes()->GetPos(this);
-/*N*/ 
+/*N*/
 /*N*/ 		if (nPos != USHRT_MAX)
 /*N*/ 		{
 /*N*/ 			GetDoc()->RemoveFldType(nPos);
@@ -254,11 +254,11 @@ using namespace ::rtl;
 /*N*/ 	String sOldExpand = Expand();
 /*N*/ 	String sNewExpand = sOldExpand;
 /*N*/ 	BOOL bOldInit = bInitialized;
-/*N*/ 
+/*N*/
 /*N*/ 	bInitialized = FALSE;
 /*N*/ 	InitContent();
 /*N*/ 	bInitialized = bOldInit;
-/*N*/ 
+/*N*/
 /*N*/ 	if( ::binfilter::GetAppCmpStrIgnore().isEqual( sNewExpand, Expand() ) )
 /*N*/ 	{
 /*N*/ 		sNewExpand = '<';
@@ -266,7 +266,7 @@ using namespace ::rtl;
 /*N*/ 		sNewExpand += '>';
 /*N*/ 	}
 /*N*/ 	SetExpansion( sOldExpand );
-/*N*/ 
+/*N*/
 /*N*/ 	return sNewExpand;
 /*N*/ }
 
@@ -291,7 +291,7 @@ using namespace ::rtl;
 /*N*/ 	pTmp->bInitialized	= bInitialized;
 /*N*/ 	pTmp->nSubType		= nSubType;
 /*N*/ 	pTmp->SetValue(GetValue());
-/*N*/ 
+/*N*/
 /*N*/ 	return pTmp;
 /*N*/ }
 
@@ -386,7 +386,7 @@ const String& SwDBField::GetPar1() const
 /*?*/ 		DBG_ERROR("illegal property");
 /*N*/ 	}
 /*N*/ 	return TRUE;
-/*N*/ 
+/*N*/
 /*N*/ }
 /*-----------------06.03.98 16:15-------------------
 
@@ -403,9 +403,9 @@ const String& SwDBField::GetPar1() const
 /*N*/ 			SetSubType(GetSubType()|SUB_OWN_FMT);
 /*N*/ 		break;
 /*N*/     case FIELD_PROP_BOOL2:
-/*N*/     {    
+/*N*/     {
 /*N*/         USHORT nSubType = GetSubType();
-/*N*/         sal_Bool bVisible;
+/*N*/         sal_Bool bVisible(false);
 /*N*/         if(!(rAny >>= bVisible))
 /*N*/             return FALSE;
 /*N*/         if(bVisible)
@@ -413,9 +413,9 @@ const String& SwDBField::GetPar1() const
 /*N*/         else
 /*N*/             nSubType |= SUB_INVISIBLE;
 /*N*/         SetSubType(nSubType);
-/*N*/         //invalidate text node 
+/*N*/         //invalidate text node
 /*N*/         if(GetTyp())
-/*N*/         {        
+/*N*/         {
 /*N*/             SwClientIter aIter( *GetTyp() );
 /*N*/             SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
 /*N*/             while(pFld)
@@ -434,7 +434,7 @@ const String& SwDBField::GetPar1() const
 /*N*/     break;
 /*N*/ 	case FIELD_PROP_FORMAT:
 /*N*/ 		{
-/*N*/ 			sal_Int32 nTemp;
+/*N*/ 			sal_Int32 nTemp(0);
 /*N*/ 			rAny >>= nTemp;
 /*N*/ 			SetFormat(nTemp);
 /*N*/ 		}
@@ -519,9 +519,9 @@ BOOL SwDBNameInfField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nM
         rAny >>= aDBData.nCommandType;
         break;
     case FIELD_PROP_BOOL2:
-    {    
+    {
         USHORT nSubType = GetSubType();
-        sal_Bool bVisible;
+        sal_Bool bVisible(sal_False);
         if(!(rAny >>= bVisible))
             return FALSE;
         if(bVisible)
@@ -542,7 +542,7 @@ BOOL SwDBNameInfField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nM
 /*N*/ USHORT SwDBNameInfField::GetSubType() const
 /*N*/ {
 /*N*/     return nSubType;
-/*N*/ }        
+/*N*/ }
 /* -----------------4/10/2003 15:03------------------
 
  --------------------------------------------------*/
@@ -656,21 +656,6 @@ BOOL SwDBNextSetField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nM
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung:
- --------------------------------------------------------------------*/
-/*
-String SwDBNextSetField::GetPar2() const
-{
-    return GetDBName();
-}
-
-void SwDBNextSetField::SetPar2(const String& rStr)
-{
-    GetDBName() = rStr;
-}
-*/
-
-/*--------------------------------------------------------------------
     Beschreibung: Datensatz mit bestimmter ID
  --------------------------------------------------------------------*/
 
@@ -723,7 +708,7 @@ void SwDBNextSetField::SetPar2(const String& rStr)
 /*N*/ {
 /*N*/ 	SwNewDBMgr* pMgr = pDoc->GetNewDBMgr();
 /*N*/ 	const SwDBData& aTmpData = GetDBData();
-/*N*/ 
+/*N*/
 /*N*/ 	if( bCondValid && pMgr && pMgr->IsInMerge() &&
 /*N*/                         pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_True))
 /*N*/ 	{	// Bedingug OK -> aktuellen Set einstellen
@@ -792,7 +777,7 @@ BOOL    SwDBNumSetField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE
         break;
     case FIELD_PROP_FORMAT:
         {
-            sal_Int32 nVal;
+            sal_Int32 nVal(0);
             rAny >>= nVal;
             aPar2 = String::CreateFromInt32(nVal);
         }
@@ -913,7 +898,6 @@ BOOL SwDBNameField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMId
 /*?*/ 		return aEmptyStr;
 /*N*/ 	else
 /*N*/ 		return FormatNumber((USHORT)nNumber, GetFormat());
-/*N*/ 	//return(nNumber == 0 ? aEmptyStr : FormatNumber(nNumber, GetFormat()));
 /*N*/ }
 
 //------------------------------------------------------------------------------
@@ -921,9 +905,9 @@ BOOL SwDBNameField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMId
 /*N*/ void SwDBSetNumberField::Evaluate(SwDoc* pDoc)
 /*N*/ {
 /*N*/ 	SwNewDBMgr* pMgr = pDoc->GetNewDBMgr();
-/*N*/ 
+/*N*/
 /*N*/     const SwDBData& aTmpData = GetDBData();
-/*N*/     if (!pMgr || !pMgr->IsInMerge() || 
+/*N*/     if (!pMgr || !pMgr->IsInMerge() ||
 /*N*/         !pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_False))
 /*N*/         return;
 /*N*/     nNumber = pMgr->GetSelectedRecordId();
@@ -972,7 +956,7 @@ BOOL SwDBSetNumberField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE
     {
     case FIELD_PROP_USHORT1:
         {
-            sal_Int16 nSet;
+            sal_Int16 nSet(0);
             rAny >>= nSet;
             if(nSet < (INT16) SVX_NUMBER_NONE )
                 SetFormat(nSet);


More information about the Libreoffice-commits mailing list