[Libreoffice-commits] .: unodevtools/source unotools/source unoxml/source vcl/aqua vcl/ios vcl/source vcl/unx vcl/workben

Takeshi Abe tabe at kemper.freedesktop.org
Sat Jan 7 10:37:28 PST 2012


 unodevtools/source/skeletonmaker/cppcompskeleton.cxx  |    6 +++---
 unodevtools/source/skeletonmaker/javacompskeleton.cxx |    2 +-
 unodevtools/source/skeletonmaker/skeletonmaker.cxx    |    4 ++--
 unotools/source/config/confignode.cxx                 |    3 +--
 unotools/source/config/itemholder1.cxx                |    2 +-
 unotools/source/i18n/collatorwrapper.cxx              |   12 ++++--------
 unotools/source/i18n/localedatawrapper.cxx            |    4 ++--
 unotools/source/i18n/nativenumberwrapper.cxx          |   12 ++++--------
 unotools/source/i18n/numberformatcodewrapper.cxx      |   12 ++++--------
 unotools/source/i18n/transliterationwrapper.cxx       |    6 +++---
 unotools/source/ucbhelper/ucblockbytes.cxx            |    2 +-
 unoxml/source/dom/documentbuilder.cxx                 |    4 ++--
 unoxml/source/dom/elementlist.cxx                     |    2 +-
 unoxml/source/rdf/librdf_repository.cxx               |   14 +++++++-------
 vcl/aqua/source/gdi/salbmp.cxx                        |    2 +-
 vcl/ios/source/gdi/salbmp.cxx                         |    2 +-
 vcl/source/gdi/impimagetree.cxx                       |    4 ++--
 vcl/source/glyphs/graphite_layout.cxx                 |    2 +-
 vcl/unx/gtk/gdi/salprn-gtk.cxx                        |    2 +-
 vcl/workben/svpclient.cxx                             |    2 +-
 20 files changed, 43 insertions(+), 56 deletions(-)

New commits:
commit ff580eb39b46646309feba447f6bf485124db6b1
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Jan 8 03:34:57 2012 +0900

    catch exception by constant reference

diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 648efa6..97ba560 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -333,7 +333,7 @@ void generateXAddInBodies(std::ostream& o, const OString & classname)
         "::rtl::OUString(),\n                                           "
         "sDISPLAYNAME);\n            if (sDisplayName.equals(aDisplayName))\n"
         "                return functions[i];\n        }\n    }\n"
-        "     catch ( css::uno::RuntimeException & e ) {\n        throw e;\n    }\n"
+        "     catch ( const css::uno::RuntimeException & e ) {\n        throw e;\n    }\n"
         "     catch ( css::uno::Exception & ) {\n    }\n    return ret;\n}\n\n";
 
     o << "::rtl::OUString SAL_CALL " << classname << "getDisplayFunctionName(const "
@@ -406,7 +406,7 @@ void generateXCompatibilityNamesBodies(std::ostream& o, const OString & classnam
         "                } while ( nIndex >= 0 );\n\n                "
         "seqLocalizedNames[i].Locale = aLocale;\n                "
         "seqLocalizedNames[i].Name = sCompatibilityName;\n            }"
-        "\n        }\n    }\n    catch ( css::uno::RuntimeException & e ) {\n        "
+        "\n        }\n    }\n    catch ( const css::uno::RuntimeException & e ) {\n        "
         "throw e;\n    }\n    catch ( css::uno::Exception & ) {\n    }\n\n"
         "    return seqLocalizedNames;\n}\n\n";
 }
@@ -580,7 +580,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
             "                buf.makeStringAndClear()), css::uno::UNO_QUERY);\n"
             "        xPropSet->getPropertyValue(\n            "
             "::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(propName))) >>= ret;\n    }\n"
-            "     catch ( css::uno::RuntimeException & e ) {\n        throw e;\n    }\n"
+            "     catch ( const css::uno::RuntimeException & e ) {\n        throw e;\n    }\n"
             "     catch ( css::uno::Exception & ) {\n    }\n    return ret;\n";
     }
     o <<"}\n\n";
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index ba8851c..1b71276 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -975,7 +975,7 @@ void generateSkeleton(ProgramOptions const & options,
             delete pofs;
             OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False));
         }
-    } catch(CannotDumpException& e) {
+    } catch(const CannotDumpException& e) {
 
         std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
         if ( !standardout ) {
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index ddd2ab4..119b778 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -338,10 +338,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
         }
     }
 
-    } catch (CannotDumpException & e) {
+    } catch (const CannotDumpException & e) {
         std::cout.flush();
         std::cerr << "\nError: " << e.m_message << std::endl;
-    } catch(Exception& e) {
+    } catch(const Exception& e) {
         std::cout.flush();
         std::cerr
             << "\nError: "
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 3aebe4d..a6a4138 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -324,9 +324,8 @@ namespace utl
             if (xNode.is())
                 return OConfigurationNode( xNode );
         }
-        catch(NoSuchElementException& e)
+        catch(const NoSuchElementException&)
         {
-            (void)e;
             #if OSL_DEBUG_LEVEL > 0
             rtl::OStringBuffer aBuf( 256 );
             aBuf.append("OConfigurationNode::openNode: there is no element named ");
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index d21684f..c20128b 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -89,7 +89,7 @@ ItemHolder1::ItemHolder1()
             xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
     }
 #ifdef DBG_UTIL
-    catch(css::uno::Exception& rEx)
+    catch(const css::uno::Exception& rEx)
     {
         static sal_Bool bMessage = sal_True;
         if(bMessage)
diff --git a/unotools/source/i18n/collatorwrapper.cxx b/unotools/source/i18n/collatorwrapper.cxx
index 1c9b988..6c59d43 100644
--- a/unotools/source/i18n/collatorwrapper.cxx
+++ b/unotools/source/i18n/collatorwrapper.cxx
@@ -55,9 +55,8 @@ CollatorWrapper::compareString (const ::rtl::OUString& s1, const ::rtl::OUString
         if (mxInternationalCollator.is())
             return mxInternationalCollator->compareString (s1, s2);
     }
-    catch (uno::RuntimeException& rRuntimeException)
+    catch (const uno::RuntimeException&)
     {
-        (void)rRuntimeException;
         DBG_ERRORFILE ("CollatorWrapper: compareString failed");
     }
 
@@ -72,9 +71,8 @@ CollatorWrapper::listCollatorAlgorithms (const lang::Locale& rLocale) const
         if (mxInternationalCollator.is())
             return mxInternationalCollator->listCollatorAlgorithms (rLocale);
     }
-    catch (uno::RuntimeException& rRuntimeException)
+    catch (const uno::RuntimeException&)
     {
-        (void)rRuntimeException;
         DBG_ERRORFILE ("CollatorWrapper: listCollatorAlgorithms failed");
     }
 
@@ -89,9 +87,8 @@ CollatorWrapper::loadDefaultCollator (const lang::Locale& rLocale, sal_Int32 nOp
         if (mxInternationalCollator.is())
             return mxInternationalCollator->loadDefaultCollator (rLocale, nOptions);
     }
-    catch (uno::RuntimeException& rRuntimeException)
+    catch (const uno::RuntimeException&)
     {
-        (void)rRuntimeException;
         DBG_ERRORFILE ("CollatorWrapper: loadDefaultCollator failed");
     }
 
@@ -108,9 +105,8 @@ CollatorWrapper::loadCollatorAlgorithm (const ::rtl::OUString& rAlgorithm,
             return mxInternationalCollator->loadCollatorAlgorithm (
                                                         rAlgorithm, rLocale, nOptions);
     }
-    catch (uno::RuntimeException& rRuntimeException)
+    catch (const uno::RuntimeException&)
     {
-        (void)rRuntimeException;
         DBG_ERRORFILE ("CollatorWrapper: loadCollatorAlgorithm failed");
     }
 
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 56944d2..f6248e9 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -292,7 +292,7 @@ void LocaleDataWrapper::invalidateData()
         if ( xLD.is() )
             return xLD->getReservedWord( getLocale() );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
 #ifdef DBG_UTIL
         rtl::OStringBuffer aMsg("getReservedWord: Exception caught\n");
@@ -318,7 +318,7 @@ void LocaleDataWrapper::invalidateData()
         if ( xLD.is() )
             rInstalledLocales = xLD->getAllInstalledLocaleNames();
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
 #ifdef DBG_UTIL
         rtl::OStringBuffer aMsg("getAllInstalledLocaleNames: Exception caught\n");
diff --git a/unotools/source/i18n/nativenumberwrapper.cxx b/unotools/source/i18n/nativenumberwrapper.cxx
index 902eebb..9f831fd 100644
--- a/unotools/source/i18n/nativenumberwrapper.cxx
+++ b/unotools/source/i18n/nativenumberwrapper.cxx
@@ -62,9 +62,8 @@ NativeNumberWrapper::getNativeNumberString(
         if ( xNNS.is() )
             return xNNS->getNativeNumberString( rNumberString, rLocale, nNativeNumberMode );
     }
-    catch ( uno::Exception& e )
+    catch ( const uno::Exception& )
     {
-        (void)e;
         DBG_ERRORFILE( "getNativeNumberString: Exception caught!" );
     }
     return ::rtl::OUString();
@@ -81,9 +80,8 @@ NativeNumberWrapper::isValidNatNum(
         if ( xNNS.is() )
             return xNNS->isValidNatNum( rLocale, nNativeNumberMode );
     }
-    catch ( uno::Exception& e )
+    catch ( const uno::Exception& )
     {
-        (void)e;
         DBG_ERRORFILE( "isValidNatNum: Exception caught!" );
     }
     return sal_False;
@@ -100,9 +98,8 @@ NativeNumberWrapper::convertToXmlAttributes(
         if ( xNNS.is() )
             return xNNS->convertToXmlAttributes( rLocale, nNativeNumberMode );
     }
-    catch ( uno::Exception& e )
+    catch ( const uno::Exception& )
     {
-        (void)e;
         DBG_ERRORFILE( "convertToXmlAttributes: Exception caught!" );
     }
     return i18n::NativeNumberXmlAttributes();
@@ -118,9 +115,8 @@ NativeNumberWrapper::convertFromXmlAttributes(
         if ( xNNS.is() )
             return xNNS->convertFromXmlAttributes( rAttr );
     }
-    catch ( uno::Exception& e )
+    catch ( const uno::Exception& )
     {
-        (void)e;
         DBG_ERRORFILE( "convertFromXmlAttributes: Exception caught!" );
     }
     return 0;
diff --git a/unotools/source/i18n/numberformatcodewrapper.cxx b/unotools/source/i18n/numberformatcodewrapper.cxx
index 2650072..418337e 100644
--- a/unotools/source/i18n/numberformatcodewrapper.cxx
+++ b/unotools/source/i18n/numberformatcodewrapper.cxx
@@ -70,9 +70,8 @@ NumberFormatCodeWrapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage
         if ( xNFC.is() )
             return xNFC->getDefault( formatType, formatUsage, aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
-        (void)e;
         DBG_ERRORFILE( "getDefault: Exception caught!" );
     }
     return ::com::sun::star::i18n::NumberFormatCode();
@@ -87,9 +86,8 @@ NumberFormatCodeWrapper::getFormatCode( sal_Int16 formatIndex ) const
         if ( xNFC.is() )
             return xNFC->getFormatCode( formatIndex, aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
-        (void)e;
         DBG_ERRORFILE( "getFormatCode: Exception caught!" );
     }
     return ::com::sun::star::i18n::NumberFormatCode();
@@ -104,9 +102,8 @@ NumberFormatCodeWrapper::getAllFormatCode( sal_Int16 formatUsage ) const
         if ( xNFC.is() )
             return xNFC->getAllFormatCode( formatUsage, aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
-        (void)e;
         DBG_ERRORFILE( "getAllFormatCode: Exception caught!" );
     }
     return ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::NumberFormatCode > (0);
@@ -121,9 +118,8 @@ NumberFormatCodeWrapper::getAllFormatCodes() const
         if ( xNFC.is() )
             return xNFC->getAllFormatCodes( aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
-        (void)e;
         DBG_ERRORFILE( "getAllFormatCodes: Exception caught!" );
     }
     return ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::NumberFormatCode > (0);
diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx
index 1ae8b79..06030ce 100644
--- a/unotools/source/i18n/transliterationwrapper.cxx
+++ b/unotools/source/i18n/transliterationwrapper.cxx
@@ -169,7 +169,7 @@ void TransliterationWrapper::loadModuleImpl() const
         if ( xTrans.is() )
             xTrans->loadModule( (TransliterationModules)nType, aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
 #ifdef DBG_UTIL
         rtl::OStringBuffer aMsg("loadModuleImpl: Exception caught\n");
@@ -196,7 +196,7 @@ void TransliterationWrapper::loadModuleByImplName(
         if ( xTrans.is() )
             xTrans->loadModuleByImplName( rModuleName, aLocale );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
 #ifdef DBG_UTIL
         rtl::OStringBuffer aMsg("loadModuleByImplName: Exception caught\n");
@@ -222,7 +222,7 @@ sal_Bool TransliterationWrapper::equals(
         if ( xTrans.is() )
             return xTrans->equals( rStr1, nPos1, nCount1, nMatch1, rStr2, nPos2, nCount2, nMatch2 );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
 #ifdef DBG_UTIL
         rtl::OStringBuffer aMsg("equals: Exception caught\n");
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index e9fa41b..a313a1f 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -860,7 +860,7 @@ void SAL_CALL Moderator::run()
         nIOErrorCode = r.Code;
         aResultType = INTERACTIVEIO;
     }
-    catch (const UnsupportedDataSinkException )
+    catch (const UnsupportedDataSinkException &)
     {
         aResultType = UNSUPPORTED;
     }
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index b5c19d0..6104a5a 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -220,7 +220,7 @@ namespace DOM
             // copy bytes to the provided buffer
             rtl_copyMemory(buffer, chunk.getConstArray(), nread);
             return nread;
-        } catch (com::sun::star::uno::Exception& ex) {
+        } catch (const com::sun::star::uno::Exception& ex) {
             (void) ex;
             OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
             return -1;
@@ -240,7 +240,7 @@ namespace DOM
             if (pctx->freeOnClose)
                 delete pctx;
             return 0;
-        } catch (com::sun::star::uno::Exception& ex) {
+        } catch (const com::sun::star::uno::Exception& ex) {
             (void) ex;
             OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
             return -1;
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index f127952..ae66fa6 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -69,7 +69,7 @@ namespace DOM
             sal_Bool capture = sal_False;
             xTarget->addEventListener(aType,
                     Reference< XEventListener >(this), capture);
-        } catch (Exception &e){
+        } catch (const Exception &e){
             OString aMsg("Exception caught while registering NodeList as listener:\n");
             aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
             OSL_FAIL(aMsg.getStr());
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 7f8b183..f292682 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -867,7 +867,7 @@ throw (uno::RuntimeException)
         reinterpret_cast<const char *>(id)));
     try {
         return rdf::BlankNode::create(m_xContext, nodeID);
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::createBlankNode: "
@@ -1495,7 +1495,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         xXmlId.set( rdf::URI::create(m_xContext,
                 ::rtl::OUString::createFromAscii(s_nsOOo) + sXmlId),
             uno::UNO_QUERY_THROW);
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::setStatementRDFa: "
@@ -1516,7 +1516,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             xContent.set(rdf::Literal::create(m_xContext, content),
                 uno::UNO_QUERY_THROW);
         }
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::setStatementRDFa: "
@@ -1556,7 +1556,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
                 + mdref.First + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#"))
                 + mdref.Second),
             uno::UNO_QUERY_THROW);
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::removeStatementRDFa: "
@@ -1587,7 +1587,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         xXmlId.set( rdf::URI::create(m_xContext,
                 ::rtl::OUString::createFromAscii(s_nsOOo) + sXmlId),
             uno::UNO_QUERY_THROW);
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::getStatementRDFa: "
@@ -2144,7 +2144,7 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const
         RTL_TEXTENCODING_UTF8) );
     try {
         return rdf::URI::create(m_xContext, uriU);
-    } catch (lang::IllegalArgumentException & iae) {
+    } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_TypeConverter::convertToXURI: "
@@ -2187,7 +2187,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
         try {
             return uno::Reference<rdf::XResource>(
                 rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY);
-        } catch (lang::IllegalArgumentException & iae) {
+        } catch (const lang::IllegalArgumentException & iae) {
             throw lang::WrappedTargetRuntimeException(
                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "librdf_TypeConverter::convertToXResource: "
diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx
index 6b2f8d1..65a132f 100644
--- a/vcl/aqua/source/gdi/salbmp.cxx
+++ b/vcl/aqua/source/gdi/salbmp.cxx
@@ -229,7 +229,7 @@ bool AquaSalBitmap::CreateContext()
                                32, nContextBytesPerRow, maPalette, maContextBuffer.get(),
                                mnBits, mnBytesPerRow, maPalette, maUserBuffer.get() );
         }
-        catch( std::bad_alloc )
+        catch( const std::bad_alloc& )
         {
             mxGraphicContext = 0;
         }
diff --git a/vcl/ios/source/gdi/salbmp.cxx b/vcl/ios/source/gdi/salbmp.cxx
index a88299c..5a7b145 100644
--- a/vcl/ios/source/gdi/salbmp.cxx
+++ b/vcl/ios/source/gdi/salbmp.cxx
@@ -229,7 +229,7 @@ bool IosSalBitmap::CreateContext()
                                32, nContextBytesPerRow, maPalette, maContextBuffer.get(),
                                mnBits, mnBytesPerRow, maPalette, maUserBuffer.get() );
         }
-        catch( std::bad_alloc )
+        catch( const std::bad_alloc& )
         {
             mxGraphicContext = 0;
         }
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 03442fc..ef48f92 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -231,7 +231,7 @@ bool ImplImageTree::doLoadImage(
         found = find(paths, bitmap);
     } catch (css::uno::RuntimeException &) {
         throw;
-    } catch (css::uno::Exception & e) {
+    } catch (const css::uno::Exception & e) {
         OSL_TRACE(
             "ImplImageTree::loadImage exception \"%s\"",
             rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
@@ -368,7 +368,7 @@ bool ImplImageTree::find(
                     css::uno::UNO_QUERY_THROW);
             } catch (css::uno::RuntimeException &) {
                 throw;
-            } catch (css::uno::Exception & e) {
+            } catch (const css::uno::Exception & e) {
                 OSL_TRACE(
                     "ImplImageTree::find exception \"%s\"",
                     rtl::OUStringToOString(
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index d39c292..85a6751 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -661,7 +661,7 @@ bool GraphiteLayout::LayoutGlyphs(ImplLayoutArgs& rArgs, gr_segment * pSegment)
                 mvCharDxs[mvCharDxs.size() - 1] = mnWidth;
             }
         }
-        catch (std::exception &e)
+        catch (const std::exception &e)
         {
 #ifdef GRLAYOUT_DEBUG
             fprintf(grLog(),"LayoutGlyphs failed %s\n", e.what());
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 6f7df7b..8351575 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -1038,7 +1038,7 @@ void GtkPrintDialog::ExportAsPDF(const rtl::OUString &rFileURL, GtkPrintSettings
                         xView->getSelection() >>= aSelection;
                 }
             }
-            catch (uno::RuntimeException)
+            catch (const uno::RuntimeException &)
             {
             }
             if (aSelection.hasValue())
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 47af3aa..dc0717c 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -92,7 +92,7 @@ SAL_IMPLEMENT_MAIN()
         if( xFactory.is() )
             setProcessServiceFactory( xFactory );
     }
-    catch( com::sun::star::uno::Exception& rExc)
+    catch(const com::sun::star::uno::Exception&)
     {
     }
 


More information about the Libreoffice-commits mailing list