From 6ee9ab65db0a993bc93bbf0140f0a4657be10657 Mon Sep 17 00:00:00 2001 From: Noel Date: Fri, 2 Oct 2020 15:56:31 +0200 Subject: use more TOOLS_WARN_EXCEPTION Change-Id: Id83c478af5d04ad548c7cf4239fe2fb3ee154dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103861 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/i18n/charclass.cxx | 32 ++++++++++++------------- unotools/source/i18n/nativenumberwrapper.cxx | 9 +++---- unotools/source/i18n/textsearch.cxx | 5 ++-- unotools/source/i18n/transliterationwrapper.cxx | 4 ++-- 4 files changed, 26 insertions(+), 24 deletions(-) (limited to 'unotools') diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx index faec870ff55b..394ed81c2936 100644 --- a/unotools/source/i18n/charclass.cxx +++ b/unotools/source/i18n/charclass.cxx @@ -122,7 +122,7 @@ bool CharClass::isAlpha( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isAlpha: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -144,7 +144,7 @@ bool CharClass::isLetter( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isLetter: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -161,7 +161,7 @@ bool CharClass::isLetter( const OUString& rStr ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isLetter: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -183,7 +183,7 @@ bool CharClass::isDigit( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isDigit: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -200,7 +200,7 @@ bool CharClass::isNumeric( const OUString& rStr ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isNumeric: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -222,7 +222,7 @@ bool CharClass::isAlphaNumeric( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isAlphaNumeric: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -244,7 +244,7 @@ bool CharClass::isLetterNumeric( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isLetterNumeric: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -261,7 +261,7 @@ bool CharClass::isLetterNumeric( const OUString& rStr ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "isLetterNumeric: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return false; } @@ -278,7 +278,7 @@ OUString CharClass::titlecase(const OUString& rStr, sal_Int32 nPos, sal_Int32 nC } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "titlecase: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return rStr.copy( nPos, nCount ); } @@ -295,7 +295,7 @@ OUString CharClass::uppercase( const OUString& rStr, sal_Int32 nPos, sal_Int32 n } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "uppercase: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return rStr.copy( nPos, nCount ); } @@ -312,7 +312,7 @@ OUString CharClass::lowercase( const OUString& rStr, sal_Int32 nPos, sal_Int32 n } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "lowercase: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return rStr.copy( nPos, nCount ); } @@ -329,7 +329,7 @@ sal_Int16 CharClass::getType( const OUString& rStr, sal_Int32 nPos ) const } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "getType: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return 0; } @@ -346,7 +346,7 @@ css::i18n::DirectionProperty CharClass::getCharacterDirection( const OUString& r } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "getCharacterDirection: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return css::i18n::DirectionProperty_LEFT_TO_RIGHT; } @@ -363,7 +363,7 @@ css::i18n::UnicodeScript CharClass::getScript( const OUString& rStr, sal_Int32 n } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "getScript: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return UnicodeScript_kBasicLatin; } @@ -380,7 +380,7 @@ sal_Int32 CharClass::getCharacterType( const OUString& rStr, sal_Int32 nPos ) co } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "getCharacterType: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return 0; } @@ -397,7 +397,7 @@ sal_Int32 CharClass::getStringType( const OUString& rStr, sal_Int32 nPos, sal_In } catch ( const Exception& ) { - SAL_WARN( "unotools.i18n", "getStringType: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return 0; } diff --git a/unotools/source/i18n/nativenumberwrapper.cxx b/unotools/source/i18n/nativenumberwrapper.cxx index 26fcbd7fa32f..5c1bb4c0b5de 100644 --- a/unotools/source/i18n/nativenumberwrapper.cxx +++ b/unotools/source/i18n/nativenumberwrapper.cxx @@ -22,6 +22,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -49,7 +50,7 @@ NativeNumberWrapper::getNativeNumberString( } catch ( const uno::Exception& ) { - SAL_WARN( "unotools.i18n", "getNativeNumberString: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return OUString(); } @@ -69,7 +70,7 @@ NativeNumberWrapper::getNativeNumberStringParams( } catch ( const uno::Exception& ) { - SAL_WARN( "unotools.i18n", "getNativeNumberStringParams: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return OUString(); } @@ -86,7 +87,7 @@ NativeNumberWrapper::convertToXmlAttributes( } catch ( const uno::Exception& ) { - SAL_WARN( "unotools.i18n", "convertToXmlAttributes: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return i18n::NativeNumberXmlAttributes(); } @@ -102,7 +103,7 @@ NativeNumberWrapper::convertFromXmlAttributes( } catch ( const uno::Exception& ) { - SAL_WARN( "unotools.i18n", "convertFromXmlAttributes: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return 0; } diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx index c55b7a712147..b6c71aa25c1e 100644 --- a/unotools/source/i18n/textsearch.cxx +++ b/unotools/source/i18n/textsearch.cxx @@ -34,6 +34,7 @@ #include #include #include +#include using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; @@ -258,7 +259,7 @@ bool TextSearch::SearchForward( const OUString &rStr, } catch ( Exception& ) { - SAL_WARN( "unotools.i18n", "SearchForward: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return bRet; } @@ -298,7 +299,7 @@ bool TextSearch::SearchBackward( const OUString & rStr, sal_Int32* pStart, } catch ( Exception& ) { - SAL_WARN( "unotools.i18n", "SearchBackward: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } return bRet; } diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index 5deb0e5a6ee9..ff6f4933d88c 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -62,7 +62,7 @@ OUString TransliterationWrapper::transliterate(const OUString& rStr, LanguageTyp } catch( Exception& ) { - SAL_WARN( "unotools.i18n", "transliterate: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } } return sRet; @@ -80,7 +80,7 @@ OUString TransliterationWrapper::transliterate( const OUString& rStr, } catch( Exception& ) { - SAL_WARN( "unotools.i18n", "transliterate: Exception caught!" ); + TOOLS_WARN_EXCEPTION("unotools.i18n", "" ); } } return sRet; -- cgit