[Libreoffice-commits] .: binfilter/bf_sw
Joseph Powers
jpowers at kemper.freedesktop.org
Tue Nov 23 21:46:38 PST 2010
binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx | 207 ++-------------
1 file changed, 29 insertions(+), 178 deletions(-)
New commits:
commit 395cb3d1eb698724cf7364f2656a9f69c2958c2a
Author: Joseph Powers <jpowers27 at cox.net>
Date: Tue Nov 23 21:46:04 2010 -0800
cppcheck error squash
diff --git a/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx b/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
index 80b4f4c..159c82a 100644
--- a/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.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
@@ -350,7 +350,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ {
/*N*/ NameToIdHash *pHash;
/*N*/ const SvStringsDtor *pStrings;
-/*N*/
+/*N*/
/*N*/ switch ( eFlags )
/*N*/ {
/*N*/ case GET_POOLID_TXTCOLL:
@@ -384,7 +384,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ pStrings = bProgName ? &GetHTMLProgNameArray() : &GetHTMLUINameArray();
/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_HTML_BEGIN ; nId < RES_POOLCOLL_HTML_END ; nId++,nIndex++ )
/*N*/ (*pHash)[(*pStrings)[nIndex]] = nId;
-/*N*/
+/*N*/
/*N*/ if ( bProgName )
/*N*/ pParaProgMap = pHash;
/*N*/ else
@@ -463,155 +463,6 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ }
/*N*/ break;
/*N*/ }
-/*N*/ #ifdef _NEED_TO_DEBUG_MAPPING
-/*N*/ static sal_Bool bTested = sal_False;
-/*N*/ if ( !bTested )
-/*N*/ {
-/*N*/ bTested = sal_True;
-/*N*/ {
-/*N*/ for ( sal_uInt16 nIndex = 0, nId = RES_POOLCOLL_TEXT_BEGIN ; nId < RES_POOLCOLL_TEXT_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_LISTS_BEGIN ; nId < RES_POOLCOLL_LISTS_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_EXTRA_BEGIN ; nId < RES_POOLCOLL_EXTRA_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_REGISTER_BEGIN ; nId < RES_POOLCOLL_REGISTER_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_DOC_BEGIN ; nId < RES_POOLCOLL_DOC_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCOLL_HTML_BEGIN ; nId < RES_POOLCOLL_HTML_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ }
-/*N*/ {
-/*N*/ for ( sal_uInt16 nIndex = 0, nId = RES_POOLCHR_NORMAL_BEGIN ; nId < RES_POOLCHR_NORMAL_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ for ( nIndex = 0, nId = RES_POOLCHR_HTML_BEGIN ; nId < RES_POOLCHR_HTML_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ }
-/*N*/ {
-/*N*/ for ( sal_uInt16 nIndex=0,nId = RES_POOLFRM_BEGIN ; nId < RES_POOLFRM_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ }
-/*N*/ {
-/*N*/ for ( sal_uInt16 nIndex=0,nId = RES_POOLPAGE_BEGIN ; nId < RES_POOLPAGE_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ }
-/*N*/ {
-/*N*/ for ( sal_uInt16 nIndex=0,nId = RES_POOLNUMRULE_BEGIN ; nId < RES_POOLNUMRULE_END ; nId++,nIndex++ )
-/*N*/ {
-/*N*/ String aString, bString;
-/*N*/ FillUIName ( nId, aString );
-/*N*/ bString = GetProgName ( GET_POOLID_TXTCOLL, aString );
-/*N*/ sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, GET_POOLID_TXTCOLL );
-/*N*/ FillProgName ( nNewId, aString );
-/*N*/ bString = GetUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ nNewId = GetPoolIdFromUIName ( aString, GET_POOLID_TXTCOLL );
-/*N*/ if ( nNewId != nId )
-/*N*/ *((sal_Int32*)0) = 42;
-/*N*/ }
-/*N*/ }
-/*N*/ }
-/*N*/ #endif
/*N*/ return *pHash;
/*N*/ }
// This gets the UI Name from the programmatic name
@@ -637,7 +488,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ {
/*N*/ // rName isn't in our UI name table...check if it's in the programmatic one
/*N*/ nId = GetPoolIdFromProgName ( rName, eFlags );
-/*N*/
+/*N*/
/*N*/ rFillName = rName;
/*N*/ if (nId == USHRT_MAX )
/*N*/ {
@@ -679,7 +530,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ {
/*N*/ sal_uInt16 nStt = 0;
/*N*/ const SvStringsDtor* pStrArr = 0;
-/*N*/
+/*N*/
/*N*/ switch( (USER_FMT | COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID) & nId )
/*N*/ {
/*N*/ case COLL_TEXT_BITS:
@@ -764,7 +615,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ {
/*N*/ sal_uInt16 nStt = 0;
/*N*/ const SvStringsDtor* pStrArr = 0;
-/*N*/
+/*N*/
/*N*/ switch( (USER_FMT | COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID) & nId )
/*N*/ {
/*N*/ case COLL_TEXT_BITS:
@@ -859,7 +710,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
// Get the programmatic Name from the pool ID
/*N*/ void SwStyleNameMapper::FillProgName ( sal_uInt16 nId, String& rFillName )
-/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
/*N*/ }
// Get the programmatic Name from the pool ID
/*N*/ const String& SwStyleNameMapper::GetProgName ( sal_uInt16 nId, const String& rName )
@@ -1003,77 +854,77 @@ const struct SwTableEntry NumRuleProgNameTable [] =
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetTextProgNameArray()
/*N*/ {
/*N*/ return pTextProgNameArray ? *pTextProgNameArray :
-/*N*/ *NewProgNameArray( pTextProgNameArray, TextProgNameTable,
-/*N*/ sizeof ( TextProgNameTable ) / sizeof ( SwTableEntry ) );
+/*N*/ *NewProgNameArray( pTextProgNameArray, TextProgNameTable,
+/*N*/ sizeof ( TextProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetListsProgNameArray()
/*N*/ {
-/*N*/ return pListsProgNameArray ? *pListsProgNameArray :
-/*N*/ *NewProgNameArray( pListsProgNameArray, ListsProgNameTable,
+/*N*/ return pListsProgNameArray ? *pListsProgNameArray :
+/*N*/ *NewProgNameArray( pListsProgNameArray, ListsProgNameTable,
/*N*/ sizeof ( ListsProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetExtraProgNameArray()
/*N*/ {
-/*N*/ return pExtraProgNameArray ? *pExtraProgNameArray :
-/*N*/ *NewProgNameArray( pExtraProgNameArray, ExtraProgNameTable,
+/*N*/ return pExtraProgNameArray ? *pExtraProgNameArray :
+/*N*/ *NewProgNameArray( pExtraProgNameArray, ExtraProgNameTable,
/*N*/ sizeof ( ExtraProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetRegisterProgNameArray()
/*N*/ {
-/*N*/ return pRegisterProgNameArray ? *pRegisterProgNameArray :
-/*N*/ *NewProgNameArray( pRegisterProgNameArray, RegisterProgNameTable,
+/*N*/ return pRegisterProgNameArray ? *pRegisterProgNameArray :
+/*N*/ *NewProgNameArray( pRegisterProgNameArray, RegisterProgNameTable,
/*N*/ sizeof ( RegisterProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetDocProgNameArray()
/*N*/ {
-/*N*/ return pDocProgNameArray ? *pDocProgNameArray :
-/*N*/ *NewProgNameArray( pDocProgNameArray, DocProgNameTable,
+/*N*/ return pDocProgNameArray ? *pDocProgNameArray :
+/*N*/ *NewProgNameArray( pDocProgNameArray, DocProgNameTable,
/*N*/ sizeof ( DocProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetHTMLProgNameArray()
/*N*/ {
-/*N*/ return pHTMLProgNameArray ? *pHTMLProgNameArray :
-/*N*/ *NewProgNameArray( pHTMLProgNameArray, HTMLProgNameTable,
+/*N*/ return pHTMLProgNameArray ? *pHTMLProgNameArray :
+/*N*/ *NewProgNameArray( pHTMLProgNameArray, HTMLProgNameTable,
/*N*/ sizeof ( HTMLProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetFrmFmtProgNameArray()
/*N*/ {
-/*N*/ return pFrmFmtProgNameArray ? *pFrmFmtProgNameArray :
-/*N*/ *NewProgNameArray( pFrmFmtProgNameArray, FrmFmtProgNameTable,
+/*N*/ return pFrmFmtProgNameArray ? *pFrmFmtProgNameArray :
+/*N*/ *NewProgNameArray( pFrmFmtProgNameArray, FrmFmtProgNameTable,
/*N*/ sizeof ( FrmFmtProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetChrFmtProgNameArray()
/*N*/ {
-/*N*/ return pChrFmtProgNameArray ? *pChrFmtProgNameArray :
-/*N*/ *NewProgNameArray( pChrFmtProgNameArray, ChrFmtProgNameTable,
+/*N*/ return pChrFmtProgNameArray ? *pChrFmtProgNameArray :
+/*N*/ *NewProgNameArray( pChrFmtProgNameArray, ChrFmtProgNameTable,
/*N*/ sizeof ( ChrFmtProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
/*N*/ {
-/*N*/ return pHTMLChrFmtProgNameArray ? *pHTMLChrFmtProgNameArray :
-/*N*/ *NewProgNameArray( pHTMLChrFmtProgNameArray, HTMLChrFmtProgNameTable,
+/*N*/ return pHTMLChrFmtProgNameArray ? *pHTMLChrFmtProgNameArray :
+/*N*/ *NewProgNameArray( pHTMLChrFmtProgNameArray, HTMLChrFmtProgNameTable,
/*N*/ sizeof ( HTMLChrFmtProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetPageDescProgNameArray()
/*N*/ {
-/*N*/ return pPageDescProgNameArray ? *pPageDescProgNameArray :
-/*N*/ *NewProgNameArray( pPageDescProgNameArray, PageDescProgNameTable,
+/*N*/ return pPageDescProgNameArray ? *pPageDescProgNameArray :
+/*N*/ *NewProgNameArray( pPageDescProgNameArray, PageDescProgNameTable,
/*N*/ sizeof ( PageDescProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
/*N*/ const SvStringsDtor& SwStyleNameMapper::GetNumRuleProgNameArray()
/*N*/ {
-/*N*/ return pNumRuleProgNameArray ? *pNumRuleProgNameArray :
-/*N*/ *NewProgNameArray( pNumRuleProgNameArray, NumRuleProgNameTable,
+/*N*/ return pNumRuleProgNameArray ? *pNumRuleProgNameArray :
+/*N*/ *NewProgNameArray( pNumRuleProgNameArray, NumRuleProgNameTable,
/*N*/ sizeof ( NumRuleProgNameTable ) / sizeof ( SwTableEntry ) );
/*N*/ }
More information about the Libreoffice-commits
mailing list