[Libreoffice-commits] .: rdbmaker/source remotebridges/examples remotebridges/source reportdesign/source sax/source

Takeshi Abe tabe at kemper.freedesktop.org
Fri Dec 23 08:56:24 PST 2011


 rdbmaker/source/rdbmaker/rdbmaker.cxx                        |    4 +-
 remotebridges/examples/officeclient.cxx                      |    8 ++--
 remotebridges/source/unourl_resolver/unourl_resolver.cxx     |    2 -
 reportdesign/source/core/sdr/RptObject.cxx                   |    4 +-
 reportdesign/source/filter/xml/xmlHelper.cxx                 |    2 -
 reportdesign/source/ui/dlg/Navigator.cxx                     |    2 -
 reportdesign/source/ui/inspection/DataProviderHandler.cxx    |    4 +-
 reportdesign/source/ui/inspection/DefaultInspection.cxx      |    2 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx        |    8 ++--
 reportdesign/source/ui/inspection/ReportComponentHandler.cxx |    4 +-
 reportdesign/source/ui/misc/RptUndo.cxx                      |    2 -
 reportdesign/source/ui/misc/UITools.cxx                      |    6 +--
 reportdesign/source/ui/report/FormattedFieldBeautifier.cxx   |    2 -
 reportdesign/source/ui/report/ReportSection.cxx              |    4 +-
 reportdesign/source/ui/report/ViewsWindow.cxx                |    2 -
 sax/source/expatwrap/sax_expat.cxx                           |   20 +++++------
 16 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit c9a54f532e6fbe2302167a7f8cb829b397f2569c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Dec 24 01:33:06 2011 +0900

    catch exception by constant reference

diff --git a/rdbmaker/source/rdbmaker/rdbmaker.cxx b/rdbmaker/source/rdbmaker/rdbmaker.cxx
index fba8469..4a4e8ae 100644
--- a/rdbmaker/source/rdbmaker/rdbmaker.cxx
+++ b/rdbmaker/source/rdbmaker/rdbmaker.cxx
@@ -313,7 +313,7 @@ int __cdecl main( int argc, char * argv[] )
             exit(1);
         }
     }
-    catch( IllegalArgument& e)
+    catch(const IllegalArgument& e)
     {
         fprintf(stderr, "Illegal option: %s\n", e.m_message.getStr());
         cleanUp(sal_True);
@@ -496,7 +496,7 @@ int __cdecl main( int argc, char * argv[] )
             }
         }
     }
-    catch( CannotDumpException& e)
+    catch(const CannotDumpException& e)
     {
         fprintf(stderr, "%s ERROR: %s\n",
                 options.getProgramName().getStr(),
diff --git a/remotebridges/examples/officeclient.cxx b/remotebridges/examples/officeclient.cxx
index 40c9023..adce0c1 100644
--- a/remotebridges/examples/officeclient.cxx
+++ b/remotebridges/examples/officeclient.cxx
@@ -214,25 +214,25 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw
             }
 
         }
-        catch( ConnectionSetupException &e )
+        catch( const ConnectionSetupException &e )
         {
             OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
             printf( "%s\n", o.pData->buffer );
             printf( "couldn't access local resource ( possible security resons )\n" );
         }
-        catch( NoConnectException &e )
+        catch( const NoConnectException &e )
         {
             OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
             printf( "%s\n", o.pData->buffer );
             printf( "no server listening on the resource\n" );
         }
-        catch( IllegalArgumentException &e )
+        catch( const IllegalArgumentException &e )
         {
             OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
             printf( "%s\n", o.pData->buffer );
             printf( "uno url invalid\n" );
         }
-        catch( RuntimeException & e )
+        catch( const RuntimeException & e )
         {
             OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
             printf( "%s\n", o.pData->buffer );
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 459f2fe..f3abd3d 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -150,7 +150,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
         aConnectDescr = aUrl.getConnection().getDescriptor();
         aInstanceName = aUrl.getObjectName();
     }
-    catch (rtl::MalformedUriException & rEx)
+    catch (const rtl::MalformedUriException & rEx)
     {
         throw ConnectionSetupException(rEx.getMessage(), 0);
     }
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index f1c6e4d..ee502b2 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -393,7 +393,7 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/)
             {
                 m_xReportComponent->removePropertyChangeListener( ::rtl::OUString() , m_xPropertyChangeListener );
             }
-            catch(uno::Exception)
+            catch(const uno::Exception &)
             {
                 OSL_FAIL("OObjectBase::EndListening: Exception caught!");
             }
@@ -1204,7 +1204,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod
             xReceiver->attachDataProvider( xDataProvider.get() );
         }
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {
     }
 }
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 32b07be..0bddd7d 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -324,7 +324,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
                 {
                     xReportControlModel->setFontDescriptor(aFont);
                 }
-                catch(beans::UnknownPropertyException){}
+                catch(const beans::UnknownPropertyException &){}
             }
            }
         catch(uno::Exception&)
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 98272cd..b5ecd58 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -849,7 +849,7 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
             m_pTree->SetEntryText(pEntry,lcl_getName(xProp));
         }
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {}
 }
 // -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index d3f87a2..77fbcdb 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -75,7 +75,7 @@ DataProviderHandler::DataProviderHandler(uno::Reference< uno::XComponentContext
         m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.FormComponentPropertyHandler")),m_xContext),uno::UNO_QUERY_THROW);
         m_xTypeConverter.set(m_xContext->getServiceManager()->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter" )),m_xContext),uno::UNO_QUERY_THROW);
 
-    }catch(uno::Exception)
+    }catch(const uno::Exception &)
     {
     }
 }
@@ -169,7 +169,7 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
             m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation,sal_True );
         }
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {
         throw lang::NullPointerException();
     }
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 94b1928..3d00aac 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -266,7 +266,7 @@ namespace rptui
             {
                 m_xComponent.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.DefaultFormComponentInspectorModel")),m_xContext),UNO_QUERY_THROW);
             }
-            catch(Exception)
+            catch(const Exception &)
             {
                 return 0;
             }
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index fe765ca..45a698c 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -359,7 +359,7 @@ void SAL_CALL GeometryHandler::inspect( const uno::Reference< uno::XInterface >
         if ( xSection.is() )
             lcl_collectFunctionNames( xSection, m_aFunctionNames );
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {
         throw lang::NullPointerException();
     }
@@ -1607,9 +1607,9 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected
         if ( bSuccess )
             _out_rSelectedClause = xComposer->getFilter();
     }
-    catch (sdb::SQLContext& e) { aErrorInfo = e; }
-    catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
-    catch (sdbc::SQLException& e) { aErrorInfo = e; }
+    catch (const sdb::SQLContext& e) { aErrorInfo = e; }
+    catch (const sdbc::SQLWarning& e) { aErrorInfo = e; }
+    catch (const sdbc::SQLException& e) { aErrorInfo = e; }
     catch( const uno::Exception& )
     {
         OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index 36d9514..5ae7b02 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -56,7 +56,7 @@ ReportComponentHandler::ReportComponentHandler(uno::Reference< uno::XComponentCo
     {
         m_xFormComponentHandler.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.inspection.FormComponentPropertyHandler")),m_xContext),uno::UNO_QUERY_THROW);
 
-    }catch(uno::Exception)
+    }catch(const uno::Exception &)
     {
     }
 }
@@ -134,7 +134,7 @@ void SAL_CALL ReportComponentHandler::inspect(const uno::Reference< uno::XInterf
             xProp->setPropertyValue(sRowSet,xNameCont->getByName(sRowSet));
         }
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {
         throw lang::NullPointerException();
     }
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 2f96dae..c481463 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -154,7 +154,7 @@ OSectionUndo::~OSectionUndo()
             {
                 comphelper::disposeComponent(xShape);
             }
-            catch(uno::Exception)
+            catch(const uno::Exception &)
             {
                 OSL_FAIL("Exception caught!");
             }
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 4819558..0949606 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1051,9 +1051,9 @@ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
             }
         }
     }
-    catch (sdb::SQLContext& e) { aErrorInfo = e; }
-    catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
-    catch (sdbc::SQLException& e) { aErrorInfo = e; }
+    catch (const sdb::SQLContext& e) { aErrorInfo = e; }
+    catch (const sdbc::SQLWarning& e) { aErrorInfo = e; }
+    catch (const sdbc::SQLException& e) { aErrorInfo = e; }
     catch( const uno::Exception& )
     {
         OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 95de847..fcdeb26 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -120,7 +120,7 @@ namespace rptui
             if ( xControlModel.is() )
                 setPlaceholderText( getVclWindowPeer( xControlModel.get() ), sDataField );
         }
-        catch (uno::Exception)
+        catch (const uno::Exception &)
         {
             DBG_UNHANDLED_EXCEPTION();
         }
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 06ad805..dbc6715 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -606,9 +606,9 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
             }
         }
     }
-    catch(uno::Exception)
+    catch(const uno::Exception &)
     {
-        OSL_FAIL("Exception caught: OReportSection::_propertyChanged(");
+        OSL_FAIL("Exception caught: OReportSection::impl_adjustObjectSizePosition()");
     }
 }
 //------------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 735b8eb..8de44ee 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -738,7 +738,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,
                                             getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width  - getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
                                             xSection->getHeight()));
                     }
-                    catch(uno::Exception){}
+                    catch(const uno::Exception &){}
                 }
             }
             else
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 8587e28..bd65a52 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -116,10 +116,10 @@ OUString XmlChar2OUString( const XML_Char *p )
         try {\
             pThis->call;\
         }\
-        catch( SAXParseException &e ) {\
+        catch( const SAXParseException &e ) {\
             pThis->callErrorHandler( pThis ,  e );\
          }\
-        catch( SAXException &e ) {\
+        catch( const SAXException &e ) {\
             pThis->callErrorHandler( pThis , SAXParseException(\
                                             e.Message, \
                                             e.Context, \
@@ -130,7 +130,7 @@ OUString XmlChar2OUString( const XML_Char *p )
                                             pThis->rDocumentLocator->getColumnNumber()\
                                      ) );\
         }\
-        catch( com::sun::star::uno::RuntimeException &e ) {\
+        catch( const com::sun::star::uno::RuntimeException &e ) {\
             pThis->bExceptionWasThrown = sal_True; \
             pThis->bRTExceptionWasThrown = sal_True; \
             pImpl->rtexception = e; \
@@ -899,12 +899,12 @@ int SaxExpatParser_Impl::callbackExternalEntityRef( XML_Parser parser,
                 XML_CHAR_TO_OUSTRING( publicId ) ,
                 XML_CHAR_TO_OUSTRING( systemId ) );
         }
-        catch( SAXParseException & e )
+        catch( const SAXParseException & e )
         {
             pImpl->exception = e;
             bOK = sal_False;
         }
-        catch( SAXException & e )
+        catch( const SAXException & e )
         {
             pImpl->exception = SAXParseException(
                 e.Message , e.Context , e.WrappedException ,
@@ -929,17 +929,17 @@ int SaxExpatParser_Impl::callbackExternalEntityRef( XML_Parser parser,
         {
             pImpl->parse();
         }
-        catch( SAXParseException & e )
+        catch( const SAXParseException & e )
         {
             pImpl->exception = e;
             bOK = sal_False;
         }
-        catch( IOException &e )
+        catch( const IOException &e )
         {
             pImpl->exception.WrappedException <<= e;
             bOK = sal_False;
         }
-        catch( RuntimeException &e )
+        catch( const RuntimeException &e )
         {
             pImpl->exception.WrappedException <<=e;
             bOK = sal_False;
@@ -998,11 +998,11 @@ void SaxExpatParser_Impl::callErrorHandler( SaxExpatParser_Impl *pImpl ,
             pImpl->bExceptionWasThrown = sal_True;
         }
     }
-    catch( SAXParseException & ex ) {
+    catch( const SAXParseException & ex ) {
         pImpl->exception = ex;
         pImpl->bExceptionWasThrown = sal_True;
     }
-    catch( SAXException & ex ) {
+    catch( const SAXException & ex ) {
         pImpl->exception = SAXParseException(
                                     ex.Message,
                                     ex.Context,


More information about the Libreoffice-commits mailing list