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

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


 binfilter/bf_sw/source/core/docnode/sw_section.cxx  |    2 -
 binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx |    6 +--
 binfilter/bf_sw/source/filter/ascii/makefile.mk     |    2 -
 binfilter/bf_sw/source/filter/ascii/sw_ascatr.cxx   |    4 +-
 binfilter/bf_sw/source/filter/basflt/makefile.mk    |    2 -
 binfilter/bf_sw/source/filter/basflt/sw_fltini.cxx  |    1 
 binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx |   32 +++++++++++---------
 binfilter/bf_sw/source/ui/app/sw_docshini.cxx       |    2 -
 binfilter/bf_sw/source/ui/app/sw_swcomlib.cxx       |   13 --------
 binfilter/inc/bf_sw/iodetect.hxx                    |   23 +++++---------
 binfilter/inc/bf_sw/shellio.hxx                     |    1 
 11 files changed, 36 insertions(+), 52 deletions(-)

New commits:
commit a8b65ba28788f1a5117453651f7b5f60caaa8eb1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 09:18:51 2011 +0000

    WaE: mark this module as warnings free

diff --git a/binfilter/bf_sw/source/core/docnode/sw_section.cxx b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
index 2b2be42..5d5ae8f 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_section.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
@@ -831,7 +831,7 @@ void SwSectionFmt::MakeFrms()
 /*N*/ 		}
 /*N*/
 /*N*/ 		if( !pSfxFlt )
-/*N*/ 			pSfxFlt = SwIoSystem::GetFileFilter( pMed->GetPhysicalName(), aEmptyStr );
+/*N*/ 			pSfxFlt = SwIoSystem::GetFileFilter(pMed->GetPhysicalName());
 /*N*/
 /*N*/ 		if( pSfxFlt )
 /*N*/ 		{
diff --git a/binfilter/bf_sw/source/filter/basflt/makefile.mk b/binfilter/bf_sw/source/filter/basflt/makefile.mk
index b1a61f3..5c217c0 100644
--- a/binfilter/bf_sw/source/filter/basflt/makefile.mk
+++ b/binfilter/bf_sw/source/filter/basflt/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..$/..
 BFPRJ=..$/..$/..
 
diff --git a/binfilter/bf_sw/source/filter/basflt/sw_fltini.cxx b/binfilter/bf_sw/source/filter/basflt/sw_fltini.cxx
index 0dba035..6cad38c 100644
--- a/binfilter/bf_sw/source/filter/basflt/sw_fltini.cxx
+++ b/binfilter/bf_sw/source/filter/basflt/sw_fltini.cxx
@@ -93,6 +93,7 @@ SwRead ReadRtf = 0, ReadAscii = 0, ReadSwg = 0, ReadSw3 = 0,
 /*N*/ 						)
 /*N*/ {
 /*N*/ 	ASSERT( !strcmp( aReaderWriter[ rPos ].pName, pNm ), "falscher Filter" );
+/*N*/ 	(void)pNm;
 /*N*/ 	aReaderWriter[ rPos++ ].pReader = pReader;
 /*N*/ }
 
diff --git a/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx b/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx
index 021958c..0142d41 100644
--- a/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx
+++ b/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx
@@ -228,24 +228,24 @@ using namespace ::com::sun::star;
 // Initiales Einlesben
 
 
-/*N*/ SwReader::SwReader( SvStorage& rStg, const String& rFileName, SwDoc *pDoc )
-/*N*/ 	: SwDocFac( pDoc ),
+/*N*/ SwReader::SwReader( SvStorage& rStg, const String& rFileName, SwDoc *pInDoc )
+/*N*/ 	: SwDocFac( pInDoc ),
 /*N*/ 	pStrm( 0 ),
 /*N*/ 	pStg( &rStg ),
 /*N*/ 	pMedium( 0 ),
-/*N*/ 	aFileName( rFileName ),
-/*N*/ 	pCrsr( 0 )
+/*N*/ 	pCrsr( 0 ),
+/*N*/ 	aFileName( rFileName )
 /*N*/ {
 /*N*/ }
 
 
- SwReader::SwReader( SfxMedium& rMedium, const String& rFileName, SwDoc *pDoc )
-    : SwDocFac( pDoc ),
+ SwReader::SwReader( SfxMedium& rMedium, const String& rFileName, SwDoc *pInDoc )
+    : SwDocFac( pInDoc ),
     pStrm( 0 ),
     pStg( 0 ),
     pMedium( &rMedium ),
-    aFileName( rFileName ),
-    pCrsr( 0 )
+    pCrsr( 0 ),
+    aFileName( rFileName )
  {
  }
 
@@ -253,17 +253,21 @@ using namespace ::com::sun::star;
 
  SwReader::SwReader( SfxMedium& rMedium, const String& rFileName, SwPaM& rPam )
     : SwDocFac( rPam.GetDoc() ),
-    aFileName( rFileName ),
-    pStg( 0 ),
     pStrm( 0 ),
+    pStg( 0 ),
     pMedium( &rMedium ),
-    pCrsr( &rPam )
+    pCrsr( &rPam ),
+    aFileName( rFileName )
  {
  }
 /*N*/ Reader::Reader()
-/*N*/ 	: pStrm(0), pStg(0), pMedium(0), pTemplate(0),
-/*N*/ 	bTmplBrowseMode( FALSE ), bInsertMode( FALSE ),
-/*N*/ 	bReadUTF8( FALSE ), bBlockMode( FALSE ), bOrganizerMode( FALSE ),
+/*N*/ 	: pTemplate(0)
+/*N*/ 	, pStrm(0)
+/*N*/ 	, pStg(0)
+/*N*/ 	, pMedium(0)
+/*N*/ 	, bInsertMode( FALSE )
+/*N*/ 	, bTmplBrowseMode( FALSE )
+/*N*/ 	, bReadUTF8( FALSE ), bBlockMode( FALSE ), bOrganizerMode( FALSE ),
 /*N*/     bHasAskTemplateName( FALSE ), bIgnoreHTMLComments( FALSE )
 /*N*/ {
 /*N*/ }
diff --git a/binfilter/bf_sw/source/ui/app/sw_docshini.cxx b/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
index 2a8c364..69cce6a 100644
--- a/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
+++ b/binfilter/bf_sw/source/ui/app/sw_docshini.cxx
@@ -686,7 +686,7 @@ using namespace ::rtl;
 /*?*/ 			if( SvStorage::IsStorageFile( rNm ) )
 /*?*/ 				break;
 /*?*/
-/*?*/ 			const SfxFilter* pFltr = SwIoSystem::GetFileFilter( rNm, aEmptyStr );
+/*?*/ 			const SfxFilter* pFltr = SwIoSystem::GetFileFilter(rNm);
 /*?*/ 			if( !pFltr || !pFltr->GetUserData().EqualsAscii( FILTER_SWG ))
 /*?*/ 				break;
 /*?*/
diff --git a/binfilter/bf_sw/source/ui/app/sw_swcomlib.cxx b/binfilter/bf_sw/source/ui/app/sw_swcomlib.cxx
index ccc2244..047b0e4 100644
--- a/binfilter/bf_sw/source/ui/app/sw_swcomlib.cxx
+++ b/binfilter/bf_sw/source/ui/app/sw_swcomlib.cxx
@@ -128,20 +128,9 @@ ULONG	SwDLL::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter,
                 nRet = ERRCODE_NONE;
                 break;
             }
-
-            // beim Browsen soll keine Filterbox kommen, wenn das Dokument nicht
-            // in den ersten paar Bytes HTML-Tags hat (MA/ST/...). Solche Dok.
-            // erzeugen z.B. SearchEngines
-//JP 20.07.00: from now on we are not a browser
-//			else if( aPrefFlt == C2S(sHTML) )
-//			{
-//				nRet = ERRCODE_NONE;
-//				break;
-//			}
         }
 
-        const SfxFilter* pTmp = SwIoSystem::GetFileFilter( rMedium.GetPhysicalName(),
-                                                            aPrefFlt, &rMedium );
+        const SfxFilter* pTmp = SwIoSystem::GetFileFilter(rMedium.GetPhysicalName(), &rMedium);
         if( !pTmp )
             nRet = ERRCODE_ABORT;
 
diff --git a/binfilter/inc/bf_sw/iodetect.hxx b/binfilter/inc/bf_sw/iodetect.hxx
index 3c9d98c..6f28ef5 100644
--- a/binfilter/inc/bf_sw/iodetect.hxx
+++ b/binfilter/inc/bf_sw/iodetect.hxx
@@ -61,7 +61,7 @@ struct SwIoDetect
         { if( fnGetWriter ) (*fnGetWriter)(rNm,xWrt); else xWrt = WriterRef(0); }
 #endif
 
-    const sal_Char* IsReader(const sal_Char* pHeader, ULONG nLen,
+    const sal_Char* IsReader(const sal_Char* pHeader, ULONG nInLen,
         const String &rFileName) const;
 };
 
@@ -207,7 +207,7 @@ struct W1_FIB
 #endif
 
 #define IO_DETECT_IMPL2 \
-const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen, \
+const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nInLen, \
     const String &rFileName) const				\
 {                                                                           \
     int bRet = FALSE;                                                       \
@@ -252,7 +252,7 @@ const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen, \
                   0 == strncmp( sSw6_FormatEnd, pHeader + 12 + 1, 4 );			\
     }                                                                       \
     else if (FILTER_TEXT == pName) \
-        bRet = SwIoSystem::IsDetectableText(pHeader, nLen); \
+        bRet = SwIoSystem::IsDetectableText(pHeader, nInLen); \
     else if (FILTER_W4W == pName) \
     bRet = SwIoSystem::IsDetectableW4W(rFileName); \
     return bRet ? pName : 0;                                       \
@@ -420,10 +420,7 @@ bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
 /* Es wird versucht, eine dem Filter entsprechende Byte-Folge zu finden.  */ \
 /* Wird kein entsprechender gefunden, wird zur Zeit der ASCII-Reader      */ \
 /* returnt !! Der Returnwert ist der interne Filtername!                  */ \
-/* rPrefFltName ist der interne Name des Filters, den der Benutzer im     */ \
-/* Open-Dialog eingestellt hat.                                           */ \
 const SfxFilter* SwIoSystem::GetFileFilter( const String& rFileName,         \
-                                             const String& rPrefFltName,      \
                                              SfxMedium* pMedium )             \
 {                                                                            \
     SfxFactoryFilterContainer* pFCntnr = IsDocShellRegistered()              \
@@ -505,13 +502,13 @@ const SfxFilter* SwIoSystem::GetFileFilter( const String& rFileName,         \
     /* nie erkannt und es wird auch der ASCII-Filter returnt.             */ \
     /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ \
     {                                                                        \
-        const SfxFilter* pFilter;                                            \
+        const SfxFilter* pLclFilter;                                         \
         const sal_Char* pNm;                                                 \
         for( USHORT n = 0; n < MAXFILTER; ++n )                              \
             if( 0 != ( pNm = aReaderWriter[n].IsReader(aBuffer, nBytesRead, rFileName)) &&        \
-                0 != ( pFilter =  SwIoSystem::GetFilterOfFormat(             \
+                0 != ( pLclFilter =  SwIoSystem::GetFilterOfFormat(          \
                                 String::CreateFromAscii(pNm), pFCntnr )))    \
-                return pFilter;                                              \
+                return pLclFilter;                                           \
     }                                                                        \
                                                                              \
     /* Ok, bis jetzt kein Filter gefunden, also befrage mal die */           \
@@ -575,7 +572,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen, \
         rLen-=nHead;\
     }\
 \
-    bool bCR = false, bLF = false, bNoNormalChar = false, \
+    bool bCR = false, bLF = false, \
         bIsBareUnicode = false;\
 \
     if (eCharSet != RTL_TEXTENCODING_DONTKNOW)\
@@ -661,8 +658,6 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen, \
                 case 0x9:\
                     break;\
                 default:\
-                    if (0x20 > (BYTE)*pBuf)\
-                        bNoNormalChar = true;\
                     break;\
             }\
         }\
@@ -686,9 +681,9 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen, \
 }\
 \
 \
-const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, ULONG nLen)\
+const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, ULONG nInLen)\
 {                                                                            \
-    bool bAuto = IsDetectableText(pBuf, nLen); \
+    bool bAuto = IsDetectableText(pBuf, nInLen); \
     const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG; \
     return SwIoSystem::GetFilterOfFormat( String::CreateFromAscii(pNm), 0 ); \
 } \
diff --git a/binfilter/inc/bf_sw/shellio.hxx b/binfilter/inc/bf_sw/shellio.hxx
index 0cd0e14..1d37d77 100644
--- a/binfilter/inc/bf_sw/shellio.hxx
+++ b/binfilter/inc/bf_sw/shellio.hxx
@@ -456,7 +456,6 @@ public:
     // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
     // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
     static const SfxFilter* GetFileFilter( const String& rFileName,
-                                            const String& rPrefFltName,
                                             SfxMedium* pMedium = 0 );
 
         // Feststellen ob das File in dem vorgegebenen Format vorliegt.
commit 9d5d00133729adf3e73e28fef73a425adc9399ca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 09:03:57 2011 +0000

    WaE: mark this module as warnings free

diff --git a/binfilter/bf_sw/source/filter/ascii/makefile.mk b/binfilter/bf_sw/source/filter/ascii/makefile.mk
index d49daee..5b57a44 100644
--- a/binfilter/bf_sw/source/filter/ascii/makefile.mk
+++ b/binfilter/bf_sw/source/filter/ascii/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..$/..
 BFPRJ=..$/..$/..
 
diff --git a/binfilter/bf_sw/source/filter/ascii/sw_ascatr.cxx b/binfilter/bf_sw/source/filter/ascii/sw_ascatr.cxx
index 9801840..8cdfe89 100644
--- a/binfilter/bf_sw/source/filter/ascii/sw_ascatr.cxx
+++ b/binfilter/bf_sw/source/filter/ascii/sw_ascatr.cxx
@@ -203,8 +203,8 @@ public:
 /*N*/ 	} while( nStrPos < nEnde );
 /*N*/ 
 /*N*/ 	if( !bLastNd ||
-/*N*/ 		( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
-/*N*/ 			&& !nStrPos && nEnde == nNodeEnde )
+/*N*/ 		(( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
+/*N*/ 			&& !nStrPos && nEnde == nNodeEnde ))
 /*?*/ 		rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd());
 /*N*/ 
 /*N*/ 	return rWrt;
commit 97e7d4e7453c80e26bbee702239f78a85f206bc8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 08:55:55 2011 +0000

    WaE: throw out a few warnings

diff --git a/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx b/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
index 1e01bf7..31a6b42 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unostyle.cxx
@@ -1286,7 +1286,7 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, BOOL bConditional) :
     Reference < XNameAccess > xFamilies = xFamilySupplier->getStyleFamilies();
 
     Any aAny;
-    sal_uInt16 nMapId;
+    sal_uInt16 nMapId(0);
     switch( eFamily )
     {
         case SFX_STYLE_FAMILY_CHAR:
@@ -1910,7 +1910,7 @@ void lcl_SetStyleProperty(const SfxItemPropertyMap* pMap,
             short nSet;
             rValue >>= nSet;
 
-            sal_uInt16 nId;
+            sal_uInt16 nId(0);
             switch( nSet )
             {
                 case ParagraphStyleCategory::TEXT:
@@ -2123,7 +2123,7 @@ Any lcl_GetStyleProperty(const SfxItemPropertyMap* pMap,
             {
                 SfxItemSet& rSet = rBase.GetItemSet();
                 aRet = rPropSet.getPropertyValue(*pMap, rSet);
-                sal_Int8 nBin;
+                sal_Int8 nBin(-1);
                 aRet >>= nBin;
                 if ( nBin == -1 )
                     aRet <<= OUString ( RTL_CONSTASCII_USTRINGPARAM ( "[From printer settings]" ) );


More information about the Libreoffice-commits mailing list