sw/source/core/tox/toxhlp.cxx |   69 +++++++-----------------------------------
 1 file changed, 12 insertions(+), 57 deletions(-)

New commits:
commit f5928f09ad53de2c4683000619d29be140a97be8
Author: Petr Kraus <petr_kr...@email.cz>
Date:   Thu Apr 4 19:12:46 2013 +0200

    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 <mst...@redhat.com>
    Tested-by: Michael Stahl <mst...@redhat.com>

diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 5dfc8dc..bdee756 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;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to