Kaydet (Commit) f5928f09 authored tarafından Petr Kraus's avatar Petr Kraus Kaydeden (comit) Michael Stahl

fdo#42781 WaE: C4101 unreferenced local variable

fixed by OSL_FAIL -> SAL_WARN.
Rewritten rest of the file to match this style.

Change-Id: I7fdb5a1b0a16ee7cfe15f7aee4b2fb95b9072c3d
Reviewed-on: https://gerrit.libreoffice.org/3204Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 75e014c3
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/IndexEntrySupplier.hpp> #include <com/sun/star/i18n/IndexEntrySupplier.hpp>
#include <rtl/strbuf.hxx>
#include <tools/string.hxx> #include <tools/string.hxx>
#include <toxwrap.hxx> #include <toxwrap.hxx>
#include <tools/diagnose_ex.h> #include <sal/log.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -37,11 +36,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper() ...@@ -37,11 +36,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
} }
catch (const uno::Exception& e) catch (const uno::Exception& e)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "IndexEntrySupplierWrapper: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
} }
...@@ -57,17 +52,9 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt, ...@@ -57,17 +52,9 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
try { try {
sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale ); sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale );
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "getIndexKey: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("getIndexKey: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
return sRet; return sRet;
} }
...@@ -78,17 +65,9 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const ...@@ -78,17 +65,9 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
try { try {
sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl ); sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "getIndexFollowPageWord: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("getIndexFollowPageWord: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
return sRet; return sRet;
} }
...@@ -101,17 +80,9 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const ::com::sun::star::lang::Local ...@@ -101,17 +80,9 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const ::com::sun::star::lang::Local
try { try {
sRet = xIES->getAlgorithmList( rLcl ); sRet = xIES->getAlgorithmList( rLcl );
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "getAlgorithmList: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("getAlgorithmList: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
return sRet; return sRet;
} }
...@@ -124,17 +95,9 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm( ...@@ -124,17 +95,9 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
try { try {
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions ); bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "loadAlgorithm: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("loadAlgorithm: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
return bRet; return bRet;
} }
...@@ -150,17 +113,9 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry( ...@@ -150,17 +113,9 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
nRet = xIES->compareIndexEntry( rTxt1, rTxtReading1, rLocale1, nRet = xIES->compareIndexEntry( rTxt1, rTxtReading1, rLocale1,
rTxt2, rTxtReading2, rLocale2 ); rTxt2, rTxtReading2, rLocale2 );
} }
catch (const ::com::sun::star::uno::Exception& catch (const uno::Exception& e)
#if OSL_DEBUG_LEVEL > 0
e
#endif
)
{ {
#if OSL_DEBUG_LEVEL > 0 SAL_WARN( "sw.core", "compareIndexEntry: Caught exception: " << e.Message );
rtl::OStringBuffer aMsg("compareIndexEntry: Caught exception\n");
aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
OSL_FAIL( aMsg.getStr() );
#endif
} }
return nRet; return nRet;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment