summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Kraus <petr_kraus@email.cz>2013-04-04 19:12:46 +0200
committerMichael Stahl <mstahl@redhat.com>2013-04-04 20:59:08 +0000
commitf5928f09ad53de2c4683000619d29be140a97be8 (patch)
treecbb3a95eceaa7f4dac3b8ade9c7a3ced725546b5
parent75e014c30753f635ddc74cdb654a8342049a114b (diff)
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/3204 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/core/tox/toxhlp.cxx69
1 files changed, 12 insertions, 57 deletions
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 5dfc8dc37860..bdee756d557d 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -20,10 +20,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/IndexEntrySupplier.hpp>
-#include <rtl/strbuf.hxx>
#include <tools/string.hxx>
#include <toxwrap.hxx>
-#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -37,11 +36,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
}
catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "IndexEntrySupplierWrapper: Caught exception: " << e.Message );
}
}
@@ -57,17 +52,9 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
try {
sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale );
}
- catch (const ::com::sun::star::uno::Exception&
-#if OSL_DEBUG_LEVEL > 0
- e
-#endif
- )
+ catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("getIndexKey: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "getIndexKey: Caught exception: " << e.Message );
}
return sRet;
}
@@ -78,17 +65,9 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
try {
sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
}
- catch (const ::com::sun::star::uno::Exception&
-#if OSL_DEBUG_LEVEL > 0
- e
-#endif
- )
+ catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("getIndexFollowPageWord: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "getIndexFollowPageWord: Caught exception: " << e.Message );
}
return sRet;
}
@@ -101,17 +80,9 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const ::com::sun::star::lang::Local
try {
sRet = xIES->getAlgorithmList( rLcl );
}
- catch (const ::com::sun::star::uno::Exception&
-#if OSL_DEBUG_LEVEL > 0
- e
-#endif
- )
+ catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("getAlgorithmList: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "getAlgorithmList: Caught exception: " << e.Message );
}
return sRet;
}
@@ -124,17 +95,9 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
try {
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
- catch (const ::com::sun::star::uno::Exception&
-#if OSL_DEBUG_LEVEL > 0
- e
-#endif
- )
+ catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("loadAlgorithm: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "loadAlgorithm: Caught exception: " << e.Message );
}
return bRet;
}
@@ -150,17 +113,9 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
nRet = xIES->compareIndexEntry( rTxt1, rTxtReading1, rLocale1,
rTxt2, rTxtReading2, rLocale2 );
}
- catch (const ::com::sun::star::uno::Exception&
-#if OSL_DEBUG_LEVEL > 0
- e
-#endif
- )
+ catch (const uno::Exception& e)
{
-#if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aMsg("compareIndexEntry: Caught exception\n");
- aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
- OSL_FAIL( aMsg.getStr() );
-#endif
+ SAL_WARN( "sw.core", "compareIndexEntry: Caught exception: " << e.Message );
}
return nRet;
}