From 272a8afa60fe9a6b497c69a58b0054ad5b880690 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 12 Jun 2016 14:42:51 +0200 Subject: convert more DBG_ASSERT(false to SAL_WARN Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55 Reviewed-on: https://gerrit.libreoffice.org/26195 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/config/cmdoptions.cxx | 2 +- unotools/source/config/compatibility.cxx | 2 +- unotools/source/config/dynamicmenuoptions.cxx | 2 +- unotools/source/config/lingucfg.cxx | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 5bd0e82cb718..e1ab5405fee8 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -249,7 +249,7 @@ bool SvtCommandOptions_Impl::Lookup( SvtCommandOptions::CmdOption eCmdOption, co return m_aDisabledCommands.Lookup( aCommand ); } default: - DBG_ASSERT( false, "SvtCommandOptions_Impl::Lookup()\nUnknown option type given!\n" ); + SAL_WARN( "unotools", "SvtCommandOptions_Impl::Lookup()\nUnknown option type given!\n" ); } return false; diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index 8dd58e27ef36..0e7ee779ab07 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -403,7 +403,7 @@ void SvtCompatibilityOptions_Impl::SetDefault( const OUString & sName, bool bVal void SvtCompatibilityOptions_Impl::Notify( const Sequence< OUString >& ) { - DBG_ASSERT( false, "SvtCompatibilityOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); + SAL_WARN( "unotools", "SvtCompatibilityOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); } // public method diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index 507d4b6f7f2c..f841fd329381 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -361,7 +361,7 @@ SvtDynamicMenuOptions_Impl::~SvtDynamicMenuOptions_Impl() void SvtDynamicMenuOptions_Impl::Notify( const Sequence< OUString >& ) { - DBG_ASSERT( false, "SvtDynamicMenuOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); + SAL_WARN( "unotools", "SvtDynamicMenuOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); } // public method diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 929354479e2d..3f7da46ec7d0 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -390,7 +391,7 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break; case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break; default : - DBG_ASSERT( false, "unexpected property handle" ); + SAL_WARN( "unotools", "unexpected property handle" ); } if (pbVal) @@ -489,7 +490,7 @@ bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any case UPH_IS_GRAMMAR_AUTO: pbVal = &rOpt.bIsGrammarAuto; break; case UPH_IS_GRAMMAR_INTERACTIVE: pbVal = &rOpt.bIsGrammarInteractive; break; default : - DBG_ASSERT( false, "unexpected property handle" ); + SAL_WARN( "unotools", "unexpected property handle" ); } if (pbVal) @@ -651,7 +652,7 @@ void SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN break; default: - DBG_ASSERT( false, "unexpected case" ); + SAL_WARN( "unotools", "unexpected case" ); } } @@ -776,7 +777,7 @@ bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const case UPH_IS_GRAMMAR_AUTO: bReadOnly = rOpt.bROIsGrammarAuto; break; case UPH_IS_GRAMMAR_INTERACTIVE: bReadOnly = rOpt.bROIsGrammarInteractive; break; default : - DBG_ASSERT( false, "unexpected property handle" ); + SAL_WARN( "unotools", "unexpected property handle" ); } return bReadOnly; } @@ -1111,7 +1112,7 @@ OUString SvtLinguConfig::GetVendorImageUrl_Impl( } catch (uno::Exception &) { - DBG_ASSERT( false, "exception caught. GetVendorImageUrl_Impl failed" ); + DBG_UNHANDLED_EXCEPTION(); } return aRes; } -- cgit