summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-03-05 12:21:23 +0530
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2016-04-05 12:06:01 +0000
commit931d003ade7c4a88f46be1e89b32d58e5eb9d083 (patch)
tree2950188715ff8c1375f96f11906b039065d55628
parenta7ec6c29aaed1ed7dd8713a9b8698d12181c40a3 (diff)
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>
-rw-r--r--linguistic/source/hyphdsp.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx33
-rw-r--r--linguistic/source/spelldta.cxx4
3 files changed, 13 insertions, 30 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 5ed22c5fc929..42c42e41d9e4 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -120,8 +120,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
if (nHyphenationPos > 0)
{
-
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
{
if (aTmp.toString() != rOrigWord)
{
@@ -142,8 +141,7 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
sal_Int32 nL = aLonger.getLength();
if (nS > 0 && nL > 0)
{
- DBG_ASSERT( (nS + 1 == nL) && aLonger[nL-1] == '.',
- "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
+ assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
}
}
}
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index d77a372a1cf1..d45b4095107e 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -782,12 +782,7 @@ void LngSvcMgr::UpdateAll()
{
// add new or replace existing entries.
bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
- if (!bRes)
- {
-#if OSL_DEBUG_LEVEL > 1
- SAL_WARN( "linguistic", "failed to set new configuration values" );
-#endif
- }
+ SAL_WARN_IF(!bRes, "linguistic", "failed to set new configuration values");
}
}
}
@@ -1428,8 +1423,8 @@ uno::Reference< linguistic2::XSpellChecker > SAL_CALL
throw(uno::RuntimeException, std::exception)
{
osl::MutexGuard aGuard( GetLinguMutex() );
-#if OSL_DEBUG_LEVEL > 1
- getAvailableLocales( SN_SPELLCHECKER );
+#if OSL_DEBUG_LEVEL > 0
+ getAvailableLocales(SN_SPELLCHECKER);
#endif
uno::Reference< linguistic2::XSpellChecker > xRes;
@@ -1448,10 +1443,9 @@ uno::Reference< linguistic2::XHyphenator > SAL_CALL
throw(uno::RuntimeException, std::exception)
{
osl::MutexGuard aGuard( GetLinguMutex() );
-#if OSL_DEBUG_LEVEL > 1
- getAvailableLocales( SN_HYPHENATOR );
+#if OSL_DEBUG_LEVEL > 0
+ getAvailableLocales(SN_HYPHENATOR);
#endif
-
uno::Reference< linguistic2::XHyphenator > xRes;
if (!bDisposing)
{
@@ -1468,10 +1462,9 @@ uno::Reference< linguistic2::XThesaurus > SAL_CALL
throw(uno::RuntimeException, std::exception)
{
osl::MutexGuard aGuard( GetLinguMutex() );
-#if OSL_DEBUG_LEVEL > 1
- getAvailableLocales( SN_THESAURUS );
+#if OSL_DEBUG_LEVEL > 0
+ getAvailableLocales(SN_THESAURUS);
#endif
-
uno::Reference< linguistic2::XThesaurus > xRes;
if (!bDisposing)
{
@@ -1645,9 +1638,6 @@ void SAL_CALL
osl::MutexGuard aGuard( GetLinguMutex() );
-#if OSL_DEBUG_LEVEL > 1
-#endif
-
LanguageType nLanguage = LinguLocaleToLanguage( rLocale );
if (!LinguIsUnspecified( nLanguage))
{
@@ -1814,15 +1804,14 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any &rVal )
if (rVal.hasValue())
{
rVal >>= aRes;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
sal_Int32 nSvcs = aRes.getLength();
if (nSvcs)
{
const OUString *pSvcName = aRes.getConstArray();
for (sal_Int32 j = 0; j < nSvcs; ++j)
{
- OUString aImplName( pSvcName[j] );
- SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "service impl-name missing" );
+ SAL_WARN_IF( pSvcName[j].isEmpty(), "linguistic", "service impl-name missing" );
}
}
#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;
}
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 6a0a93891581..34027d95eb2c 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -82,10 +82,10 @@ void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage,
if ( xDic.is() && xDic->isActive()
&& (nLang == nLanguage || LinguIsUnspecified( nLang)) )
{
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
DictionaryType eType = xDic->getDictionaryType();
(void) eType;
- DBG_ASSERT( eType != DictionaryType_MIXED, "unexpected dictionary type" );
+ assert( eType != DictionaryType_MIXED && "unexpected dictionary type" );
#endif
const Sequence< Reference< XDictionaryEntry > > aEntries = xDic->getEntries();
const Reference< XDictionaryEntry > *pEntries = aEntries.getConstArray();