diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2016-03-09 19:08:34 +0530 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-04-05 10:22:14 +0000 |
commit | 0452db13db40e81522fb6bc49136d25b6ffcff41 (patch) | |
tree | a072b6504fa8904831e7d7fbb83d1050cc9e7988 | |
parent | a215cec969f7401b08cabb686c5b2b1d803399d0 (diff) |
tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals, replaced DBG_ASSERT to
standard assert(..) and used SAL_INFO() in some places
Change-Id: Ib6d6065e3f141e60f865fef1faacdb5598e12431
Reviewed-on: https://gerrit.libreoffice.org/23073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r-- | svl/source/items/poolitem.cxx | 8 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox3.cxx | 6 | ||||
-rw-r--r-- | svtools/source/config/helpopt.cxx | 4 | ||||
-rw-r--r-- | svtools/source/config/menuoptions.cxx | 5 | ||||
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 10 |
5 files changed, 14 insertions, 19 deletions
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 50a91fea09a8..90f5b739cc65 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -25,7 +25,7 @@ #include <typeinfo> -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong nItemCount = 0; const char* pw1 = "Wow! 10.000 items!"; @@ -41,7 +41,7 @@ SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich) , m_nKind(SFX_ITEMS_NONE) { DBG_ASSERT(nWhich <= SHRT_MAX, "invalid WhichId"); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nItemCount; if ( pw1 && nItemCount>=10000 ) { @@ -77,7 +77,7 @@ SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy ) , m_nWhich(rCpy.Which()) // call function because of ChkThis() (WTF does that mean?) , m_nKind( SFX_ITEMS_NONE ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nItemCount; if ( pw1 && nItemCount>=10000 ) { @@ -112,7 +112,7 @@ SfxPoolItem::~SfxPoolItem() { DBG_ASSERT(m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF, "destroying item in use"); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nItemCount; #endif } diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index c98cc999b270..4562ddd7198d 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -234,7 +234,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e } else aRetText = "TableCell"; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; @@ -247,7 +247,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e sal_Int32 rowId = _nPosition + 1; aRetText = OUString::number( rowId ); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; @@ -257,7 +257,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e break; case ::svt::BBTYPE_COLUMNHEADERCELL: aRetText = GetColumnDescription( sal_Int16( _nPosition ) ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index 01bf0658ae15..f03ebcf317ea 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -150,9 +150,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) { for ( int nProp = 0; nProp < rPropertyNames.getLength(); nProp++ ) { -#if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" ); -#endif + assert(pValues[nProp].hasValue() && "property value missing"); if ( pValues[nProp].hasValue() ) { bool bTmp; diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 1f27fc73c12d..7146b230f66e 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -276,10 +276,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" ); bMenuSettingsChanged |= seqValues[nProperty] >>= bSystemMenuIcons; } - - #if OSL_DEBUG_LEVEL > 1 - else DBG_ASSERT( sal_False, "SvtMenuOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n" ); - #endif + else assert( false && "SvtMenuOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n" ); } if ( bMenuSettingsChanged ) diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 9815951692df..dce30246043b 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -742,7 +742,7 @@ OUString makeRepresentativeTextForLanguage(LanguageType eLang) namespace { -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 void lcl_dump_unicode_coverage(const boost::dynamic_bitset<sal_uInt32> &rIn) { if (rIn.none()) @@ -1277,7 +1277,7 @@ OUString makeShortRepresentativeTextForSelectedFont(OutputDevice &rDevice) if (!rDevice.GetFontCapabilities(aFontCapabilities)) return OUString(); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 lcl_dump_unicode_coverage(aFontCapabilities.maUnicodeRange); lcl_dump_codepage_coverage(aFontCapabilities.maCodePageRange); #endif @@ -1631,7 +1631,7 @@ OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &r vcl::FontCapabilities aFontCapabilities; if (aDevice->GetFontCapabilities(aFontCapabilities)) { -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 lcl_dump_unicode_coverage(aFontCapabilities.maUnicodeRange); #endif @@ -1647,8 +1647,8 @@ OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &r if (nScriptType != css::i18n::ScriptType::COMPLEX) aFontCapabilities.maUnicodeRange &= getCTLMask(); -#if OSL_DEBUG_LEVEL > 2 - fprintf(stderr, "minimal\n"); +#if OSL_DEBUG_LEVEL > 0 + SAL_INFO("svtools", "minimal"); lcl_dump_unicode_coverage(aFontCapabilities.maUnicodeRange); lcl_dump_codepage_coverage(aFontCapabilities.maCodePageRange); #endif |