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

Caolán McNamara caolan at kemper.freedesktop.org
Thu Feb 10 12:27:36 PST 2011


 binfilter/bf_sw/source/core/fields/sw_flddat.cxx    |    2 +-
 binfilter/bf_sw/source/core/fields/sw_reffld.cxx    |    6 +++---
 binfilter/bf_sw/source/core/frmedt/sw_tblsel.cxx    |    2 +-
 binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx |    5 +++--
 binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx     |    5 +----
 binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx    |    2 +-
 binfilter/bf_sw/source/filter/w4w/sw_w4wpar2.cxx    |    2 +-
 binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx |    2 +-
 binfilter/inc/bf_sw/ndgrf.hxx                       |    3 +--
 9 files changed, 13 insertions(+), 16 deletions(-)

New commits:
commit 4518b81fd126f0d1f4199134fa93d3975b1f2d1a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 20:24:38 2011 +0000

    throw out some warnings

diff --git a/binfilter/bf_sw/source/core/fields/sw_flddat.cxx b/binfilter/bf_sw/source/core/fields/sw_flddat.cxx
index bd85878..42295b2 100644
--- a/binfilter/bf_sw/source/core/fields/sw_flddat.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_flddat.cxx
@@ -272,7 +272,7 @@ DBG_BF_ASSERT(0, "STRIP"); return NULL;
 /*N*/ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, BYTE nMId )
 /*N*/ {
 /*N*/     nMId &= ~CONVERT_TWIPS;
-/*N*/ 	sal_Int32 nTmp;
+/*N*/ 	sal_Int32 nTmp(0);
 /*N*/ 	switch( nMId )
 /*N*/ 	{
 /*N*/ 	case FIELD_PROP_BOOL1:
diff --git a/binfilter/bf_sw/source/core/fields/sw_reffld.cxx b/binfilter/bf_sw/source/core/fields/sw_reffld.cxx
index cba7054..a8ecb5b 100644
--- a/binfilter/bf_sw/source/core/fields/sw_reffld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_reffld.cxx
@@ -552,7 +552,7 @@ String SwGetRefField::GetPar2() const
 /*N*/ 	{
 /*N*/ 	case FIELD_PROP_USHORT1:
 /*N*/ 		{
-/*N*/ 			sal_Int16 nPart;
+/*N*/ 			sal_Int16 nPart(0);
 /*N*/ 			rAny >>= nPart;
 /*N*/ 			switch(nPart)
 /*N*/ 			{
@@ -571,7 +571,7 @@ String SwGetRefField::GetPar2() const
 /*N*/ 		break;
 /*N*/ 	case FIELD_PROP_USHORT2:
 /*N*/ 		{
-/*N*/ 			sal_Int16 nSource;
+/*N*/ 			sal_Int16 nSource(0);
 /*N*/ 			rAny >>= nSource;
 /*N*/ 			switch(nSource)
 /*N*/ 			{
@@ -600,7 +600,7 @@ String SwGetRefField::GetPar2() const
 /*?*/ 		break;
 /*N*/ 	case FIELD_PROP_SHORT1:
 /*N*/ 		{
-/*N*/ 			sal_Int16 nSetSeq;
+/*N*/ 			sal_Int16 nSetSeq(0);
 /*N*/ 			rAny >>= nSetSeq;
 /*N*/ 			if(nSetSeq >= 0)
 /*N*/ 				nSeqNo = nSetSeq;
diff --git a/binfilter/bf_sw/source/core/frmedt/sw_tblsel.cxx b/binfilter/bf_sw/source/core/frmedt/sw_tblsel.cxx
index 122d3fe..790e61a 100644
--- a/binfilter/bf_sw/source/core/frmedt/sw_tblsel.cxx
+++ b/binfilter/bf_sw/source/core/frmedt/sw_tblsel.cxx
@@ -409,7 +409,7 @@ namespace binfilter {
 /*N*/ 			// alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob
 /*N*/ 			// all huebsch nebeneinander liegen.
 /*N*/ 			USHORT n, nEnd, nCellCnt = 0;
-/*N*/ 			long nYPos = LONG_MAX, nXPos, nHeight;
+/*N*/ 			long nYPos = LONG_MAX, nXPos(0), nHeight(0);
 /*N*/
 /*N*/ 			for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
 /*N*/ 			{
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx b/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
index 31a6b42..29ea141 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
@@ -1907,7 +1907,7 @@ void lcl_SetStyleProperty(const SfxItemPropertyMap* pMap,
         {
             if(!rBase.pNewBase->IsUserDefined())
                 throw lang::IllegalArgumentException();
-            short nSet;
+            short nSet(0);
             rValue >>= nSet;
 
             sal_uInt16 nId(0);
@@ -2638,7 +2638,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault(  )
                     }
                 }
                 break;
-            case SFX_STYLE_FAMILY_PSEUDO:
+            default:
                 break;
             }
             if( pTargetFmt )
@@ -2728,6 +2728,7 @@ Sequence< Any > SAL_CALL SwXStyle::getPropertyDefaults( const Sequence< OUString
                     case SFX_STYLE_FAMILY_FRAME: nPropSetId = PROPERTY_SET_FRAME_STYLE ;break;
                     case SFX_STYLE_FAMILY_PAGE: nPropSetId = PROPERTY_SET_PAGE_STYLE  ;break;
                     case SFX_STYLE_FAMILY_PSEUDO: nPropSetId = PROPERTY_SET_NUM_STYLE   ;break;
+                    default: break;
                 }
 
                 const SfxItemSet &rSet = aStyle.GetItemSet(), *pParentSet = rSet.GetParent();
diff --git a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
index f87a851..2547bd2 100644
--- a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
+++ b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
@@ -5545,7 +5545,6 @@ SwSw6Parser::~SwSw6Parser(void)
 ULONG Sw6Reader::Read( SwDoc &rDoc,SwPaM &rPam,const String &rFileName)
 {
     ULONG nRet = ERR_SWG_READ_ERROR;
-#ifndef COMPACT
 
     if( pStrm )
     {
@@ -5560,9 +5559,7 @@ ULONG Sw6Reader::Read( SwDoc &rDoc,SwPaM &rPam,const String &rFileName)
         pSw6Parser->CallParser();
         delete pSw6Parser;
     }
-    else
-        ASSERT( !this, "SW6-Read ohne Stream" );
-#endif
+
     return nRet;
 }
 
diff --git a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx
index f64bd43..764f759 100644
--- a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx
+++ b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar1.cxx
@@ -1338,7 +1338,7 @@ void SwW4WParser::Read_UpperCharSet()			// (UCS)
         bWasXCS = FALSE;		// nach einem XCS ueberlesen
         return;
     }
-    BYTE c, cRet;
+    BYTE c, cRet(0);
     while( !nError && W4WR_RED != ( cRet = GetHexByte( c )) )
         if( cRet == W4WR_TXTERM )
         {
diff --git a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar2.cxx b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar2.cxx
index 37293b3..1185d80 100644
--- a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar2.cxx
+++ b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar2.cxx
@@ -414,7 +414,7 @@ void SwW4WParser::Read_ParaNumberDef() 				// (PND)
     BYTE nW4WAttachPrev;	// g
 
     USHORT nStartNo;	// Start-Nr. fuer den Writer
-    BYTE nUpperLevel;	// aktuelle Anzeigetiefe fuer den Writer
+    BYTE nUpperLevel(0); // aktuelle Anzeigetiefe fuer den Writer
     SvxExtNumType eType;	   	// Writer-Num-Typ
 
     BOOL bError = TRUE;
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx b/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
index 9f92385..2ceddd2 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtvfldi.cxx
@@ -961,7 +961,7 @@ sal_Bool XMLVariableDeclImportContext::FindFieldMaster(
             // sPropertySubType
             OUString::createFromAscii(sAPI_sub_type)
             );
-        sal_Int16 nType;
+        sal_Int16 nType(0);
         aAny >>= nType;
         
         enum VarType eFMVarType = 
diff --git a/binfilter/inc/bf_sw/ndgrf.hxx b/binfilter/inc/bf_sw/ndgrf.hxx
index 0076eb5..b8b941d 100644
--- a/binfilter/inc/bf_sw/ndgrf.hxx
+++ b/binfilter/inc/bf_sw/ndgrf.hxx
@@ -51,7 +51,6 @@ class SwGrfNode: public SwNoTxtNode
     BfGraphicObject aGrfObj;
     ::binfilter::SvBaseLinkRef refLink;		// falls Grafik nur als Link, dann Pointer gesetzt
     Size nGrfSize;
-//	String aStrmName;			// SW3: Name des Storage-Streams fuer Embedded
     String aNewStrmName;		// SW3/XML: new stream name (either SW3 stream
                                 // name or package url)
     String aLowResGrf;			// HTML: LowRes Grafik (Ersatzdarstellung bis
@@ -83,7 +82,7 @@ class SwGrfNode: public SwNoTxtNode
                SwAttrSet* pAutoAttr = 0 );
 
     void InsertLink( const String& rGrfName, const String& rFltName );
-    BOOL ImportGraphic( SvStream& rStrm ){DBG_BF_ASSERT(0, "STRIP"); return FALSE;}
+    BOOL ImportGraphic( SvStream& ){DBG_BF_ASSERT(0, "STRIP"); return FALSE;}
     BOOL HasStreamName() const { return aGrfObj.HasUserData(); }
     BOOL GetStreamStorageNames( String& rStrmName, String& rStgName ) const;
 


More information about the Libreoffice-commits mailing list