diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-04 09:22:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-04 11:23:58 +0000 |
commit | bef4b0dd6e638c1288c8855b514418e10ae19545 (patch) | |
tree | edfae52bf48a544e6b0395b899b798305144dc57 | |
parent | 23e572f47548c5465ccf588750fd614b59404f40 (diff) |
DBG_ASSERT->SAL_WARN_IF
Change-Id: I33c82b9f8ca992d24966211b010675744934d5cb
-rw-r--r-- | linguistic/source/dicimp.cxx | 10 | ||||
-rw-r--r-- | linguistic/source/dicimp.hxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 886a826f222d..1752a56ff050 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -363,7 +363,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL) } } - DBG_ASSERT(isSorted(), "lng : dictionary is not sorted"); + SAL_WARN_IF(!isSorted(), "linguistic", "dictionary is not sorted"); // since this routine should be called only initialy (prior to any // modification to be saved) we reset the bIsModified flag here that @@ -650,9 +650,9 @@ sal_Bool DictionaryNeo::seekEntry(const OUString &rWord, return sal_False; } -sal_Bool DictionaryNeo::isSorted() +bool DictionaryNeo::isSorted() { - sal_Bool bRes = sal_True; + bool bRes = true; const uno::Reference< XDictionaryEntry > *pEntry = aEntries.getConstArray(); sal_Int32 nEntries = getCount(); @@ -662,7 +662,7 @@ sal_Bool DictionaryNeo::isSorted() if (cmpDicEntry( pEntry[i-1]->getDictionaryWord(), pEntry[i]->getDictionaryWord() ) > 0) { - bRes = sal_False; + bRes = false; break; } } @@ -709,7 +709,7 @@ sal_Bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > x pEntry[ i+1 ] = pEntry[ i ]; // insert new entry at specified position pEntry[ nPos ] = xDicEntry; - DBG_ASSERT(isSorted(), "lng : dictionary entries unsorted"); + SAL_WARN_IF(!isSorted(), "linguistic", "dictionary entries unsorted"); nCount++; diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx index 012f3fdd656c..8ad6a69d0ff3 100644 --- a/linguistic/source/dicimp.hxx +++ b/linguistic/source/dicimp.hxx @@ -76,7 +76,7 @@ class DictionaryNeo : sal_Bool bSimilarOnly = sal_False); sal_Bool seekEntry(const ::rtl::OUString &rWord, sal_Int32 *pPos, sal_Bool bSimilarOnly = sal_False); - sal_Bool isSorted(); + bool isSorted(); sal_Bool addEntry_Impl(const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryEntry > xDicEntry, |