summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-06-12 14:42:51 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-12 18:10:44 +0000
commit272a8afa60fe9a6b497c69a58b0054ad5b880690 (patch)
tree7ab255dd96cad6ab57b1271559b1d45a1c40baa1 /linguistic
parent29eac0e49e372092cb119898e9f1116ab4e00532 (diff)
convert more DBG_ASSERT(false to SAL_WARN
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55 Reviewed-on: https://gerrit.libreoffice.org/26195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdic.cxx4
-rw-r--r--linguistic/source/dicimp.cxx4
-rw-r--r--linguistic/source/dlistimp.cxx2
-rw-r--r--linguistic/source/gciterator.cxx18
-rw-r--r--linguistic/source/hyphdsp.cxx6
-rw-r--r--linguistic/source/lngprophelp.cxx6
-rw-r--r--linguistic/source/misc.cxx6
-rw-r--r--linguistic/source/spelldsp.cxx6
-rw-r--r--linguistic/source/thesdsp.cxx2
9 files changed, 27 insertions, 27 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 9b2597910425..d955c4c29a63 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -85,7 +85,7 @@ void ReadThroughDic( const OUString &rMainURL, ConvDicXMLImport &rImport )
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "failed to get input stream" );
+ SAL_WARN( "linguistic", "failed to get input stream" );
}
if (!xIn.is())
return;
@@ -245,7 +245,7 @@ void ConvDic::Save()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "failed to get input stream" );
+ SAL_WARN( "linguistic", "failed to get input stream" );
}
if (!xStream.is())
return;
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 272de85902ce..a6d31270054c 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -252,7 +252,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "failed to get input stream" );
+ SAL_WARN( "linguistic", "failed to get input stream" );
}
if (!xStream.is())
return static_cast< sal_uLong >(-1);
@@ -416,7 +416,7 @@ struct TmpDictionary
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "failed to overwrite dict" );
+ SAL_WARN( "linguistic", "failed to overwrite dict" );
return static_cast< sal_uLong >(-1);
}
return 0;
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index bba17f95bf55..d077bf0289fd 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -848,7 +848,7 @@ static bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, bool& bN
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "failed to get input stream" );
+ SAL_WARN( "linguistic", "failed to get input stream" );
}
DBG_ASSERT( xStream.is(), "failed to get stream for read" );
if (!xStream.is())
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 3133cd78a9fb..b15fa85258ff 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -158,7 +158,7 @@ static sal_Int32 lcl_SkipWhiteSpaces( const OUString &rText, sal_Int32 nStartPos
}
if (bIllegalArgument)
{
- DBG_ASSERT( false, "lcl_SkipWhiteSpaces: illegal arguments" );
+ SAL_WARN( "linguistic", "lcl_SkipWhiteSpaces: illegal arguments" );
}
sal_Int32 nRes = nStartPos;
@@ -193,7 +193,7 @@ static sal_Int32 lcl_BacktraceWhiteSpaces( const OUString &rText, sal_Int32 nSta
}
if (bIllegalArgument)
{
- DBG_ASSERT( false, "lcl_BacktraceWhiteSpaces: illegal arguments" );
+ SAL_WARN( "linguistic", "lcl_BacktraceWhiteSpaces: illegal arguments" );
}
sal_Int32 nRes = nStartPos;
@@ -473,12 +473,12 @@ uno::Reference< linguistic2::XProofreader > GrammarCheckingIterator::GetGrammarC
}
else
{
- DBG_ASSERT( false, "grammar checker does not support required locale" );
+ SAL_WARN( "linguistic", "grammar checker does not support required locale" );
}
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "instantiating grammar checker failed" );
+ SAL_WARN( "linguistic", "instantiating grammar checker failed" );
}
}
}
@@ -573,7 +573,7 @@ void GrammarCheckingIterator::DequeueAndCheck()
aRes.nBehindEndOfSentencePosition != nSuggestedEnd
)
{
- DBG_ASSERT( false, "!! Grammarchecker failed to provide end of sentence !!" );
+ SAL_WARN( "linguistic", "!! Grammarchecker failed to provide end of sentence !!" );
aRes.nBehindEndOfSentencePosition = nSuggestedEnd;
}
@@ -728,7 +728,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
//!! failed to properly identify the sentence end
if (aTmpRes.nBehindEndOfSentencePosition <= nStartPos)
{
- DBG_ASSERT( false, "!! Grammarchecker failed to provide end of sentence !!" );
+ SAL_WARN( "linguistic", "!! Grammarchecker failed to provide end of sentence !!" );
aTmpRes.nBehindEndOfSentencePosition = nSuggestedEndOfSentencePos;
}
@@ -749,7 +749,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
// prevent endless loop by forcefully advancing if needs be...
if (nStartPos <= nOldStartOfSentencePos)
{
- DBG_ASSERT( false, "end-of-sentence detection failed?" );
+ SAL_WARN( "linguistic", "end-of-sentence detection failed?" );
nStartPos = nOldStartOfSentencePos + 1;
}
}
@@ -1048,13 +1048,13 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
}
else
{
- DBG_ASSERT( false, "failed to get aImplNames. Wrong type?" );
+ SAL_WARN( "linguistic", "failed to get aImplNames. Wrong type?" );
}
}
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "exception caught. Failed to get configured services" );
+ SAL_WARN( "linguistic", "exception caught. Failed to get configured services" );
}
{
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index d9990d334eeb..6018af00f99a 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -369,7 +369,7 @@ Reference< XHyphenatedWord > SAL_CALL
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
pRef [i] = xHyph;
@@ -501,7 +501,7 @@ Reference< XHyphenatedWord > SAL_CALL
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
pRef [i] = xHyph;
@@ -624,7 +624,7 @@ Reference< XPossibleHyphens > SAL_CALL
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createWithArguments failed" );
+ SAL_WARN( "linguistic", "createWithArguments failed" );
}
pRef [i] = xHyph;
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index 8dccc52a1627..0528f5ddcbc9 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -440,7 +440,7 @@ bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt
break;
}
default:
- DBG_ASSERT( false, "unknown property" );
+ SAL_WARN( "linguistic", "unknown property" );
}
if (pbVal)
rEvt.NewValue >>= *pbVal;
@@ -504,7 +504,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
case UPH_IS_SPELL_WITH_DIGITS : pbResVal = &bResIsSpellWithDigits; break;
case UPH_IS_SPELL_CAPITALIZATION : pbResVal = &bResIsSpellCapitalization; break;
default:
- DBG_ASSERT( false, "unknown property" );
+ SAL_WARN( "linguistic", "unknown property" );
}
if (pbResVal)
pVal[i].Value >>= *pbResVal;
@@ -601,7 +601,7 @@ bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt
case UPH_HYPH_MIN_TRAILING : pnVal = &nHyphMinTrailing; break;
case UPH_HYPH_MIN_WORD_LENGTH : pnVal = &nHyphMinWordLength; break;
default:
- DBG_ASSERT( false, "unknown property" );
+ SAL_WARN( "linguistic", "unknown property" );
}
if (pnVal)
rEvt.NewValue >>= *pnVal;
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 6a1a96cb10bd..160af548b84f 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -568,7 +568,7 @@ uno::Reference< XHyphenatedWord > RebuildHyphensAndControlChars(
if (nOrigHyphenPos == -1 || nOrigHyphenationPos == -1)
{
- DBG_ASSERT( false, "failed to get nOrigHyphenPos or nOrigHyphenationPos" );
+ SAL_WARN( "linguistic", "failed to get nOrigHyphenPos or nOrigHyphenationPos" );
}
else
{
@@ -732,7 +732,7 @@ uno::Reference< XSearchableDictionaryList > GetDictionaryList()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
return xRef;
@@ -759,7 +759,7 @@ AppExitListener::AppExitListener()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( false, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
}
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 4c8b2300279b..cdcd95e0aab5 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -377,7 +377,7 @@ bool SpellCheckerDispatcher::isValid_Impl(
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
pRef [i] = xSpell;
@@ -560,7 +560,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
pRef [i] = xSpell;
@@ -733,7 +733,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
{
if (xRes.is())
{
- DBG_ASSERT( false, "XSetSpellAlternatives not implemented!" );
+ SAL_WARN( "linguistic", "XSetSpellAlternatives not implemented!" );
}
else if (!aProposals.empty())
{
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 3e81ed8e9fd8..bfd0875eb44e 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -175,7 +175,7 @@ Sequence< Reference< XMeaning > > SAL_CALL
}
catch (uno::Exception &)
{
- DBG_ASSERT( false, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
pRef[i] = xThes;