[Libreoffice-commits] .: binfilter/bf_sw

Caolán McNamara caolan at kemper.freedesktop.org
Wed May 25 00:57:44 PDT 2011


 binfilter/bf_sw/source/core/fields/makefile.mk    |    2 -
 binfilter/bf_sw/source/core/fields/sw_authfld.cxx |   40 +++++++++++-----------
 binfilter/bf_sw/source/core/fields/sw_cellfml.cxx |   25 ++++++-------
 binfilter/bf_sw/source/core/fields/sw_dbfld.cxx   |   14 +++----
 binfilter/bf_sw/source/core/fields/sw_docufld.cxx |    6 +--
 binfilter/bf_sw/source/core/fields/sw_expfld.cxx  |   26 ++++++++------
 binfilter/bf_sw/source/core/fields/sw_fldbas.cxx  |    8 ++--
 binfilter/bf_sw/source/core/fields/sw_usrfld.cxx  |    6 +--
 8 files changed, 63 insertions(+), 64 deletions(-)

New commits:
commit 0822df1769a554ca412b25602b4a2b54b0a49ef7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 24 23:55:12 2011 +0100

    WaE: mark this dir as warnings free

diff --git a/binfilter/bf_sw/source/core/fields/makefile.mk b/binfilter/bf_sw/source/core/fields/makefile.mk
index 7d8bb38..49413d5 100644
--- a/binfilter/bf_sw/source/core/fields/makefile.mk
+++ b/binfilter/bf_sw/source/core/fields/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..$/..
 BFPRJ=..$/..$/..
 
diff --git a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx b/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
index ddb12bb..1170d5a 100644
--- a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
@@ -131,30 +131,30 @@ BOOL    SwAuthEntry::GetNextAuthorField(USHORT& nPos, String& rToFill)const
 
 
 SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
-    : SwFieldType( RES_AUTHORITY ),
-    m_pDoc(pDoc),
-    m_pDataArr(new SwAuthDataArr ),
-    m_pSequArr(new SvLongs(5, 5)),
-    m_pSortKeyArr(new SortKeyArr(3, 3)),
-    m_bSortByDocument(TRUE),
-    m_bIsSequence(FALSE),
-    m_cPrefix('['),
-    m_cSuffix(']'),
-    m_eLanguage((LanguageType)GetAppLanguage())
+    : SwFieldType( RES_AUTHORITY )
+    , m_pDoc(pDoc)
+    , m_pDataArr(new SwAuthDataArr )
+    , m_pSequArr(new SvLongs(5, 5))
+    , m_pSortKeyArr(new SortKeyArr(3, 3))
+    , m_cPrefix('[')
+    , m_cSuffix(']')
+    , m_bIsSequence(FALSE)
+    , m_bSortByDocument(TRUE)
+    , m_eLanguage((LanguageType)GetAppLanguage())
 {
 }
 
 SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
-    : SwFieldType( RES_AUTHORITY ),
-    m_pDataArr(new SwAuthDataArr ),
-    m_pSequArr(new SvLongs(5, 5)),
-    m_pSortKeyArr(new SortKeyArr(3, 3)),
-    m_bSortByDocument(rFType.m_bSortByDocument),
-    m_bIsSequence(rFType.m_bIsSequence),
-    m_cPrefix(rFType.m_cPrefix),
-    m_cSuffix(rFType.m_cSuffix),
-    m_eLanguage(rFType.m_eLanguage),
-    m_sSortAlgorithm(rFType.m_sSortAlgorithm)
+    : SwFieldType( RES_AUTHORITY )
+    , m_pDataArr(new SwAuthDataArr )
+    , m_pSequArr(new SvLongs(5, 5))
+    , m_pSortKeyArr(new SortKeyArr(3, 3))
+    , m_cPrefix(rFType.m_cPrefix)
+    , m_cSuffix(rFType.m_cSuffix)
+    , m_bIsSequence(rFType.m_bIsSequence)
+    , m_bSortByDocument(rFType.m_bSortByDocument)
+    , m_eLanguage(rFType.m_eLanguage)
+    , m_sSortAlgorithm(rFType.m_sSortAlgorithm)
 {
     for(USHORT i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
         m_pSortKeyArr->Insert((*rFType.m_pSortKeyArr)[i], i);
diff --git a/binfilter/bf_sw/source/core/fields/sw_cellfml.cxx b/binfilter/bf_sw/source/core/fields/sw_cellfml.cxx
index cfb0737..4e7f823 100644
--- a/binfilter/bf_sw/source/core/fields/sw_cellfml.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_cellfml.cxx
@@ -236,8 +236,11 @@ const USHORT cMAXSTACKSIZE = 50;
 // Struktur, die zum TabelleRechnen benoetigt wird
 
 /*N*/ SwTblCalcPara::SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable )
-/*N*/ 	: rCalc( rCalculator ), pTbl( &rTable ), nStackCnt( 0 ),
-/*N*/ 	nMaxSize( cMAXSTACKSIZE ), pLastTblBox( 0 )
+/*N*/ 	: pLastTblBox( 0 )
+/*N*/ 	, nStackCnt( 0 )
+/*N*/ 	, nMaxSize( cMAXSTACKSIZE )
+/*N*/ 	, rCalc( rCalculator )
+/*N*/ 	, pTbl( &rTable )
 /*N*/ {
 /*N*/ 	pBoxStk = new SwTableSortBoxes;
 /*N*/ }
@@ -270,18 +273,14 @@ const USHORT cMAXSTACKSIZE = 50;
 /*N*/ 	// ein Bereich in dieser Klammer ?
 /*N*/ 	if( pLastBox )
 /*N*/ 	{
-/*N*/ 	//TODOUNICODE: does it work?
-/*N*/ //		pEndBox = (SwTableBox*)(long)(*pLastBox);
-/*N*/ 		pEndBox = (SwTableBox*)pLastBox->ToInt32();
+/*N*/ 		pEndBox = reinterpret_cast<SwTableBox*>(sal::static_int_cast<sal_IntPtr>(pLastBox->ToInt64()));
 /*N*/
 /*N*/ 		// ist das ueberhaupt ein gueltiger Pointer ??
 /*N*/ 		if( !rTbl.GetTabSortBoxes().Seek_Entry( pEndBox ))
 /*?*/ 			pEndBox = 0;
 /*N*/ 		rFirstBox.Erase( 0, pLastBox->Len()+1 );
 /*N*/ 	}
-/*N*/ 	//TODOUNICODE: does it work?
-/*N*/ //	pSttBox = (SwTableBox*)(long)rFirstBox;
-/*N*/ 	pSttBox = (SwTableBox*)rFirstBox.ToInt32();
+/*N*/ 	pSttBox = reinterpret_cast<SwTableBox*>(sal::static_int_cast<sal_IntPtr>(rFirstBox.ToInt64()));
 /*N*/ 	// ist das ueberhaupt ein gueltiger Pointer ??
 /*N*/ 	if( !rTbl.GetTabSortBoxes().Seek_Entry( pSttBox ))
 /*?*/ 		pSttBox = 0;
@@ -325,8 +324,7 @@ const USHORT cMAXSTACKSIZE = 50;
 /*N*/ 	rFirstBox.Erase(0,1);
 /*N*/ 	if( pLastBox )
 /*N*/ 	{
-/*N*/ //		pBox = (SwTableBox*)(long)(*pLastBox);
-/*N*/ 		pBox = (SwTableBox*)pLastBox->ToInt32();
+/*N*/ 		pBox = reinterpret_cast<SwTableBox*>(sal::static_int_cast<sal_IntPtr>(pLastBox->ToInt64()));
 /*N*/
 /*N*/ 		// ist das ueberhaupt ein gueltiger Pointer ??
 /*N*/ 		if( rTbl.GetTabSortBoxes().Seek_Entry( pBox ))
@@ -337,8 +335,7 @@ const USHORT cMAXSTACKSIZE = 50;
 /*N*/ 		rFirstBox.Erase( 0, pLastBox->Len()+1 );
 /*N*/ 	}
 /*N*/
-/*N*/ //	pBox = (SwTableBox*)(long)rFirstBox;
-/*N*/ 	pBox = (SwTableBox*)rFirstBox.ToInt32();
+/*N*/ 	pBox = reinterpret_cast<SwTableBox*>(sal::static_int_cast<sal_IntPtr>(rFirstBox.ToInt64()));
 /*N*/ 	// ist das ueberhaupt ein gueltiger Pointer ??
 /*N*/ 	if( rTbl.GetTabSortBoxes().Seek_Entry( pBox ))
 /*N*/ 		rNewStr += pBox->GetName();
@@ -360,13 +357,13 @@ const USHORT cMAXSTACKSIZE = 50;
 /*N*/ 	if( pLastBox )
 /*N*/ 	{
 /*N*/ 		pBox = rTbl.GetTblBox( *pLastBox );
-/*N*/ 		rNewStr += String::CreateFromInt32( (long)pBox );
+/*N*/ 		rNewStr += String::CreateFromInt64( (sal_PtrDiff)pBox );
 /*N*/ 		rNewStr += ':';
 /*N*/ 		rFirstBox.Erase( 0, pLastBox->Len()+1 );
 /*N*/ 	}
 /*N*/
 /*N*/ 	pBox = rTbl.GetTblBox( rFirstBox );
-/*N*/ 	rNewStr += String::CreateFromInt32( (long)pBox );
+/*N*/ 	rNewStr += String::CreateFromInt64( (sal_PtrDiff)pBox );
 /*N*/
 /*N*/ 	// Kennung fuer Box erhalten
 /*N*/ 	rNewStr += rFirstBox.GetChar( rFirstBox.Len() - 1 );
diff --git a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx b/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
index e225db1..b1917f2 100644
--- a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
@@ -75,8 +75,8 @@ using namespace ::rtl;
 SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const String& rNam, const SwDBData& rDBData )
     : SwValueFieldType( pDocPtr, RES_DBFLD )
     , aDBData(rDBData)
-    , nRefCnt(0)
     , sColumn(rNam)
+    , nRefCnt(0)
 {
     if(aDBData.sDataSource.getLength() || aDBData.sCommand.getLength())
     {
@@ -192,11 +192,11 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const String& rNam, const SwDBData&
  --------------------------------------------------------------------*/
 
 /*N*/ SwDBField::SwDBField(SwDBFieldType* pTyp, ULONG nFmt)
-/*N*/ 	: 	SwValueField(pTyp, nFmt),
-/*N*/ 		bValidValue(FALSE),
-/*N*/ 		bIsInBodyTxt(TRUE),
-/*N*/ 		bInitialized(FALSE),
-/*N*/ 		nSubType(0)
+/*N*/ 	: SwValueField(pTyp, nFmt)
+/*N*/ 	, nSubType(0)
+/*N*/ 	, bIsInBodyTxt(TRUE)
+/*N*/ 	, bValidValue(FALSE)
+/*N*/ 	, bInitialized(FALSE)
 /*N*/ {
 /*N*/ 	if (GetTyp())
 /*N*/ 		((SwDBFieldType*)GetTyp())->AddRef();
@@ -766,7 +766,7 @@ BOOL    SwDBNumSetField::PutValue( const ::com::sun::star::uno::Any& rAny, BYTE
 
 /*N*/ String SwDBNameFieldType::Expand(ULONG nFmt) const
 /*N*/ {
-/*N*/ 	OSL_ENSURE( nFmt >= FF_BEGIN && nFmt < FF_END, "Expand: kein guelt. Fmt!" );
+/*N*/ 	OSL_ENSURE( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
 /*N*/ 	const SwDBData aData = pDoc->GetDBData();
 /*N*/ 	String sRet(aData.sDataSource);
 /*N*/ 	sRet += '.';
diff --git a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
index acbcf98..f88a25c 100644
--- a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
@@ -585,7 +585,7 @@ BOOL SwAuthorField::PutValue( const uno::Any& rAny, BYTE nMId )
 
 /*N*/ String SwTemplNameFieldType::Expand(ULONG nFmt) const
 /*N*/ {
-/*N*/ 	OSL_ENSURE(nFmt >= FF_BEGIN && nFmt < FF_END, "Expand: kein guelt. Fmt!" );
+/*N*/ 	OSL_ENSURE(nFmt < FF_END, "Expand: kein guelt. Fmt!" );
 /*N*/
 /*N*/ 	String aRet;
 /*N*/ 	const SfxDocumentInfo* pDInfo = pDoc->GetpInfo();
@@ -914,9 +914,9 @@ BOOL SwDocStatField::PutValue( const uno::Any& rAny, BYTE nMId )
 /*N*/ 			if( nSub == DI_CREATE )
 /*N*/ 				;		// das wars schon!!
 /*N*/ 			else if( ( nSub == DI_CHANGE &&
-/*N*/ 					(pInf->GetChanged().GetTime() != aTmp.GetTime() ) ||
+/*N*/ 					(pInf->GetChanged().GetTime() != aTmp.GetTime()) ) ||
 /*N*/ 					( (nExtSub & ~DI_SUB_FIXED) == DI_SUB_AUTHOR &&
-/*N*/ 					pInf->GetDocumentNumber() > 1) ) )
+/*N*/ 					pInf->GetDocumentNumber() > 1 ) )
 /*N*/ 				aTmp = pInf->GetChanged();
 /*N*/ 			else if( nSub == DI_PRINT &&
 /*N*/ 					pInf->GetPrinted().GetTime() != aTmp.GetTime() )
diff --git a/binfilter/bf_sw/source/core/fields/sw_expfld.cxx b/binfilter/bf_sw/source/core/fields/sw_expfld.cxx
index 1f02521..6023a22 100644
--- a/binfilter/bf_sw/source/core/fields/sw_expfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_expfld.cxx
@@ -310,9 +310,9 @@ using namespace ::rtl;
 
 /*N*/ SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const String& rFormel,
 /*N*/ 							USHORT nSub, ULONG nFmt)
-/*N*/ 	: SwFormulaField( pTyp, nFmt, 0.0 ),
-/*N*/ 	nSubType(nSub),
-/*N*/ 	bIsInBodyTxt( TRUE )
+/*N*/ 	: SwFormulaField( pTyp, nFmt, 0.0 )
+/*N*/ 	, bIsInBodyTxt( TRUE )
+/*N*/ 	, nSubType(nSub)
 /*N*/ {
 /*N*/ 	SetFormula( rFormel );
 /*N*/ }
@@ -466,12 +466,13 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, BYTE nMId )
  --------------------------------------------------*/
 
 /*N*/ SwSetExpFieldType::SwSetExpFieldType( SwDoc* pInDoc, const String& rName, USHORT nTyp )
-/*N*/ 	: SwValueFieldType( pInDoc, RES_SETEXPFLD ),
-/*N*/ 	sName( rName ),
-/*N*/ 	nType(nTyp),
-/*N*/ 	cDelim( '.' ), nLevel( UCHAR_MAX ),
-/*N*/ 	bDeleted( FALSE ),
-/*N*/ 	pOutlChgNd( 0 )
+/*N*/ 	: SwValueFieldType( pInDoc, RES_SETEXPFLD )
+/*N*/ 	, sName( rName )
+/*N*/ 	, pOutlChgNd( 0 )
+/*N*/ 	, cDelim( '.' )
+/*N*/ 	, nType(nTyp)
+/*N*/ 	, nLevel( UCHAR_MAX )
+/*N*/ 	, bDeleted( FALSE )
 /*N*/ {
 /*N*/ 	if( ( GSE_SEQ | GSE_STRING ) & nType )
 /*N*/ 		EnableFormat(FALSE);	// Numberformatter nicht einsetzen
@@ -837,8 +838,11 @@ void SwSetExpField::SetPar2(const String& rStr)
  --------------------------------------------------------------------*/
 
 /*N*/ SwInputField::SwInputField(SwInputFieldType* pType1, const String& rContent,
-/*N*/ 						   const String& rPrompt, USHORT nSub, ULONG nFmt) :
-/*N*/ 	SwField(pType1, nFmt), nSubType(nSub), aContent(rContent), aPText(rPrompt)
+/*N*/ 						   const String& rPrompt, USHORT nSub, ULONG nFmt)
+/*N*/ 	: SwField(pType1, nFmt)
+/*N*/ 	, aContent(rContent)
+/*N*/ 	, aPText(rPrompt)
+/*N*/ 	, nSubType(nSub)
 /*N*/ {
 /*N*/ }
 
diff --git a/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx b/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
index 0c8108e..4c8f534 100644
--- a/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
@@ -130,10 +130,10 @@ using namespace ::com::sun::star;
                     Felder sind n-mal vorhanden, Feldtypen nur einmal
  --------------------------------------------------------------------*/
 
-/*N*/ SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, USHORT nLng) :
-/*N*/ 	nFormat(nFmt),
-/*N*/     nLang(nLng),
-/*N*/     bIsAutomaticLanguage(TRUE)
+/*N*/ SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, USHORT nLng)
+/*N*/   : nLang(nLng)
+/*N*/   , bIsAutomaticLanguage(TRUE)
+/*N*/ 	, nFormat(nFmt)
 /*N*/ {
 /*N*/ 	OSL_ENSURE( pTyp, "SwField: ungueltiger SwFieldType" );
 /*N*/ 	pType = pTyp;
diff --git a/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx b/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
index a042198..de93479 100644
--- a/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
@@ -190,9 +190,9 @@ void SwUserField::SetPar2(const String& rStr)
  --------------------------------------------------------------------*/
 
 /*N*/ SwUserFieldType::SwUserFieldType( SwDoc* pDocPtr, const String& aNam )
-/*N*/ 	: SwValueFieldType( pDocPtr, RES_USERFLD ),
-/*N*/ 	nType(GSE_STRING),
-/*N*/ 	nValue( 0 )
+/*N*/ 	: SwValueFieldType( pDocPtr, RES_USERFLD )
+/*N*/ 	, nValue( 0 )
+/*N*/ 	, nType(GSE_STRING)
 /*N*/ {
 /*N*/ 	bValidValue = bDeleted = sal_False;
 /*N*/ 	aName = aNam;


More information about the Libreoffice-commits mailing list