tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals

I disentangled my previous patch and uploaded one patch
per module

Change-Id: Ic7351452833816358cff96e154d6d5d40f094aa8
Reviewed-on: https://gerrit.libreoffice.org/22666
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
Rohan Kumar
2016-03-05 12:21:23 +05:30
committed by Björn Michaelsen
parent a7ec6c29aa
commit 931d003ade
3 changed files with 13 additions and 30 deletions

View File

@@ -120,8 +120,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
if (nHyphenationPos > 0) if (nHyphenationPos > 0)
{ {
#if OSL_DEBUG_LEVEL > 0
#if OSL_DEBUG_LEVEL > 1
{ {
if (aTmp.toString() != rOrigWord) if (aTmp.toString() != rOrigWord)
{ {
@@ -142,8 +141,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
sal_Int32 nL = aLonger.getLength(); sal_Int32 nL = aLonger.getLength();
if (nS > 0 && nL > 0) if (nS > 0 && nL > 0)
{ {
DBG_ASSERT( (nS + 1 == nL) && aLonger[nL-1] == '.', assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
"HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
} }
} }
} }

View File

@@ -782,12 +782,7 @@ void LngSvcMgr::UpdateAll()
{ {
// add new or replace existing entries. // add new or replace existing entries.
bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
if (!bRes) SAL_WARN_IF(!bRes, "linguistic", "failed to set new configuration values");
{
#if OSL_DEBUG_LEVEL > 1
SAL_WARN( "linguistic", "failed to set new configuration values" );
#endif
}
} }
} }
} }
@@ -1428,8 +1423,8 @@ uno::Reference< linguistic2::XSpellChecker > SAL_CALL
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
{ {
osl::MutexGuard aGuard( GetLinguMutex() ); osl::MutexGuard aGuard( GetLinguMutex() );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
getAvailableLocales( SN_SPELLCHECKER ); getAvailableLocales(SN_SPELLCHECKER);
#endif #endif
uno::Reference< linguistic2::XSpellChecker > xRes; uno::Reference< linguistic2::XSpellChecker > xRes;
@@ -1448,10 +1443,9 @@ uno::Reference< linguistic2::XHyphenator > SAL_CALL
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
{ {
osl::MutexGuard aGuard( GetLinguMutex() ); osl::MutexGuard aGuard( GetLinguMutex() );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
getAvailableLocales( SN_HYPHENATOR ); getAvailableLocales(SN_HYPHENATOR);
#endif #endif
uno::Reference< linguistic2::XHyphenator > xRes; uno::Reference< linguistic2::XHyphenator > xRes;
if (!bDisposing) if (!bDisposing)
{ {
@@ -1468,10 +1462,9 @@ uno::Reference< linguistic2::XThesaurus > SAL_CALL
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
{ {
osl::MutexGuard aGuard( GetLinguMutex() ); osl::MutexGuard aGuard( GetLinguMutex() );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
getAvailableLocales( SN_THESAURUS ); getAvailableLocales(SN_THESAURUS);
#endif #endif
uno::Reference< linguistic2::XThesaurus > xRes; uno::Reference< linguistic2::XThesaurus > xRes;
if (!bDisposing) if (!bDisposing)
{ {
@@ -1645,9 +1638,6 @@ void SAL_CALL
osl::MutexGuard aGuard( GetLinguMutex() ); osl::MutexGuard aGuard( GetLinguMutex() );
#if OSL_DEBUG_LEVEL > 1
#endif
LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); LanguageType nLanguage = LinguLocaleToLanguage( rLocale );
if (!LinguIsUnspecified( nLanguage)) if (!LinguIsUnspecified( nLanguage))
{ {
@@ -1814,15 +1804,14 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any &rVal )
if (rVal.hasValue()) if (rVal.hasValue())
{ {
rVal >>= aRes; rVal >>= aRes;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
sal_Int32 nSvcs = aRes.getLength(); sal_Int32 nSvcs = aRes.getLength();
if (nSvcs) if (nSvcs)
{ {
const OUString *pSvcName = aRes.getConstArray(); const OUString *pSvcName = aRes.getConstArray();
for (sal_Int32 j = 0; j < nSvcs; ++j) for (sal_Int32 j = 0; j < nSvcs; ++j)
{ {
OUString aImplName( pSvcName[j] ); SAL_WARN_IF( pSvcName[j].isEmpty(), "linguistic", "service impl-name missing" );
SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "service impl-name missing" );
} }
} }
#endif #endif
@@ -1930,10 +1919,6 @@ uno::Sequence< OUString > SAL_CALL
} }
} }
#if OSL_DEBUG_LEVEL > 1
const OUString *pImplNames = aSvcImplNames.getConstArray();
(void) pImplNames;
#endif
return aSvcImplNames; return aSvcImplNames;
} }

View File

@@ -82,10 +82,10 @@ void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage,
if ( xDic.is() && xDic->isActive() if ( xDic.is() && xDic->isActive()
&& (nLang == nLanguage || LinguIsUnspecified( nLang)) ) && (nLang == nLanguage || LinguIsUnspecified( nLang)) )
{ {
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
DictionaryType eType = xDic->getDictionaryType(); DictionaryType eType = xDic->getDictionaryType();
(void) eType; (void) eType;
DBG_ASSERT( eType != DictionaryType_MIXED, "unexpected dictionary type" ); assert( eType != DictionaryType_MIXED && "unexpected dictionary type" );
#endif #endif
const Sequence< Reference< XDictionaryEntry > > aEntries = xDic->getEntries(); const Sequence< Reference< XDictionaryEntry > > aEntries = xDic->getEntries();
const Reference< XDictionaryEntry > *pEntries = aEntries.getConstArray(); const Reference< XDictionaryEntry > *pEntries = aEntries.getConstArray();