summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2016-12-28 16:07:48 +0300
committerEike Rathke <erack@redhat.com>2017-01-03 19:39:36 +0000
commit80e6671cacbe1785948de0311be972f897e962d9 (patch)
tree82ae5bbde6e6d449fe299767512997911908b9f6
parentbf80bbb7b75febc2769d6b64e6981224982f8fe2 (diff)
tdf#43157 Cleanup DBG_ASSERT in misc.cxx
Change-Id: I92faaf758e08776b731411c964f168c6ced253bc Reviewed-on: https://gerrit.libreoffice.org/32474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--linguistic/source/misc.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 37f20fb95df3..6fe170c2800c 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -18,7 +18,6 @@
*/
#include <sal/macros.h>
-#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
@@ -149,9 +148,9 @@ IntArray2D::~IntArray2D()
sal_Int32 & IntArray2D::Value( int i, int k )
{
- DBG_ASSERT( 0 <= i && i < n1, "first index out of range" );
- DBG_ASSERT( 0 <= k && k < n2, "first index out of range" );
- DBG_ASSERT( i * n2 + k < n1 * n2, "index out of range" );
+ assert( (0 <= i && i < n1) && "first index out of range" );
+ assert( (0 <= k && k < n2) && "second index out of range" );
+ assert( (i * n2 + k < n1 * n2) && "index out of range" );
return pData[ i * n2 + k ];
}
@@ -299,8 +298,8 @@ uno::Reference< XDictionaryEntry > SearchDicList(
if ( axDic.is() && axDic->isActive()
&& (nLang == nLanguage || LinguIsUnspecified( nLang)) )
{
- DBG_ASSERT( eType != DictionaryType_MIXED,
- "lng : unexpected dictionary type" );
+ // DictionaryType_MIXED is deprecated
+ SAL_WARN_IF(eType == DictionaryType_MIXED, "linguistic", "unexpected dictionary type");
if ( (!bSearchPosDics && eType == DictionaryType_NEGATIVE)
|| ( bSearchPosDics && eType == DictionaryType_POSITIVE))
@@ -477,7 +476,7 @@ static bool GetAltSpelling( sal_Int16 &rnChgPos, sal_Int16 &rnChgLen, OUString &
rnChgPos = sal::static_int_cast< sal_Int16 >(nPosL);
rnChgLen = sal::static_int_cast< sal_Int16 >(nAltPosR - nPosL);
- DBG_ASSERT( rnChgLen >= 0, "nChgLen < 0");
+ assert( rnChgLen >= 0 && "nChgLen < 0");
sal_Int32 nTxtStart = nPosL;
sal_Int32 nTxtLen = nAltPosR - nPosL + 1;