[Libreoffice-commits] .: vcl/aqua writerfilter/qa writerfilter/source writerfilter/unocomponent xmloff/source xmlscript/source xmlscript/test xmlsecurity/tools

Takeshi Abe tabe at kemper.freedesktop.org
Sun Jan 8 10:21:41 PST 2012


 vcl/aqua/source/a11y/aqua11yfocuslistener.cxx                           |    4 +-
 writerfilter/qa/cppunittests/qname/testQName.cxx                        |    2 -
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx                |    4 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                       |    3 -
 writerfilter/source/dmapper/GraphicImport.cxx                           |    2 -
 writerfilter/source/dmapper/StyleSheetTable.cxx                         |    3 -
 writerfilter/source/doctok/WW8DocumentImpl.cxx                          |   18 +++++-----
 writerfilter/source/resourcemodel/TagLogger.cxx                         |    2 -
 writerfilter/source/resourcemodel/resourcemodel.cxx                     |   10 ++---
 writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx |    2 -
 xmloff/source/chart/SchXMLImport.cxx                                    |    4 +-
 xmloff/source/chart/SchXMLSeries2Context.cxx                            |   14 +++----
 xmloff/source/chart/SchXMLSeriesHelper.cxx                              |    6 +--
 xmloff/source/chart/SchXMLTableContext.cxx                              |    3 -
 xmloff/source/draw/XMLShapeStyleContext.cxx                             |    4 +-
 xmloff/source/draw/animationexport.cxx                                  |    9 +----
 xmloff/source/draw/ximpstyl.cxx                                         |    4 +-
 xmloff/source/style/xmlimppr.cxx                                        |    8 ++--
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx                      |    2 -
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx                         |    3 -
 xmlscript/source/xmlflat_imexp/xmlbas_export.cxx                        |    8 ++--
 xmlscript/source/xmlflat_imexp/xmlbas_import.cxx                        |   14 +++----
 xmlscript/test/imexp.cxx                                                |    6 +--
 xmlsecurity/tools/standalone/csfit/certmngr.cxx                         |    2 -
 xmlsecurity/tools/standalone/csfit/decrypter.cxx                        |    2 -
 xmlsecurity/tools/standalone/csfit/encrypter.cxx                        |    2 -
 xmlsecurity/tools/standalone/csfit/signer.cxx                           |    2 -
 xmlsecurity/tools/standalone/csfit/verifier.cxx                         |    2 -
 xmlsecurity/tools/standalone/mscsfit/certmngr.cxx                       |    2 -
 xmlsecurity/tools/standalone/mscsfit/decrypter.cxx                      |    2 -
 xmlsecurity/tools/standalone/mscsfit/encrypter.cxx                      |    2 -
 xmlsecurity/tools/standalone/mscsfit/signer.cxx                         |    2 -
 xmlsecurity/tools/standalone/mscsfit/verifier.cxx                       |    2 -
 33 files changed, 73 insertions(+), 82 deletions(-)

New commits:
commit b35c0ae4ffce43b881d66efe74a19f1bf6299331
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Jan 9 03:16:33 2012 +0900

    catch exception by constant reference

diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
index 0b2fe19..62dc790 100644
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
@@ -68,7 +68,7 @@ id AquaA11yFocusListener::getFocusedUIElement()
                 if( xContext.is() )
                     m_focusedObject = [ AquaA11yFactory wrapperForAccessibleContext: xContext ];
             }
-        } catch( RuntimeException )  {
+        } catch(const RuntimeException &)  {
             // intentionally do nothing ..
         }
     }
@@ -95,7 +95,7 @@ AquaA11yFocusListener::focusedObjectChanged(const Reference< XAccessible >& xAcc
                 NSAccessibilityPostNotification(m_focusedObject, NSAccessibilityFocusedUIElementChangedNotification);
             }
         }
-    } catch( RuntimeException ) {
+    } catch(const RuntimeException &) {
         // intentionally do nothing ..
     }
 }
diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx b/writerfilter/qa/cppunittests/qname/testQName.cxx
index 2a2b26e..1c0e24d 100644
--- a/writerfilter/qa/cppunittests/qname/testQName.cxx
+++ b/writerfilter/qa/cppunittests/qname/testQName.cxx
@@ -103,7 +103,7 @@ public:
                 sprintf(buf, "name%i", i++);
                 testAdd("myns", buf);
             }
-        } catch (std::logic_error &e)
+        } catch (const std::logic_error &)
         {
             // only way to exit this function
             flag=true;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 6b04424..f9acfaa 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -714,7 +714,7 @@ void DomainMapperTableHandler::endTable()
                     m_xTableRange = xTable->getAnchor( );
             }
         }
-        catch ( lang::IllegalArgumentException &e )
+        catch ( const lang::IllegalArgumentException &e )
         {
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
             fprintf( stderr, "Conversion to table error: %s\n",
@@ -722,7 +722,7 @@ void DomainMapperTableHandler::endTable()
             dmapper_logger->chars("failed to import table!");
 #endif
         }
-        catch ( uno::Exception &e )
+        catch ( const uno::Exception &e )
         {
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
             fprintf( stderr, "Exception during table creation: %s\n",
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8352cdd..3137be1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3014,9 +3014,8 @@ void DomainMapper_Impl::CloseFieldCommand()
             //set the text field if there is any
             pContext->SetTextField( uno::Reference< text::XTextField >( xFieldInterface, uno::UNO_QUERY ) );
         }
-        catch( uno::Exception& rEx)
+        catch( const uno::Exception& )
         {
-            (void)rEx;
             OSL_FAIL( "Exception in CloseFieldCommand()" );
         }
         pContext->SetCommandCompleted();
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 52c22df..8aa0cb1 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -910,7 +910,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
                                    uno::makeAny( aSize.Width ) );
                         }
                     }
-                    catch( const beans::UnknownPropertyException )
+                    catch( const beans::UnknownPropertyException & )
                     {
                         // It isn't a graphic image
                     }
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 6b824b2..a187379 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -911,9 +911,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
             }
         }
     }
-    catch( uno::Exception& rEx)
+    catch( const uno::Exception& )
     {
-        (void)rEx;
         OSL_FAIL( "Styles could not be imported completely");
     }
 }
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index 407ea2d..b5e15ed 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -191,7 +191,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
         mpDataStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
                                     ("Data")));
     }
-    catch (ExceptionNotFound)
+    catch (const ExceptionNotFound &)
     {
     }
 
@@ -200,7 +200,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
         mpCompObjStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
                                        ("\1CompObj")));
     }
-    catch (ExceptionNotFound)
+    catch (const ExceptionNotFound &)
     {
     }
 
@@ -635,13 +635,13 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
 
                     mCpAndFcs.insert(aCpAndFc);
                 }
-                catch (ExceptionNotFound &e)
+                catch (const ExceptionNotFound &e)
                 {
                     clog << e.getText() << endl;
                 }
             }
         }
-        catch (ExceptionNotFound &e)
+        catch (const ExceptionNotFound &e)
         {
             clog << e.getText() << endl;
         }
@@ -838,7 +838,7 @@ writerfilter::Reference<Properties>::Pointer_t WW8DocumentImpl::getProperties
 
                 pResult = pFKP->getProperties(rCpAndFc.getFc());
             }
-            catch (ExceptionOutOfBounds)
+            catch (const ExceptionOutOfBounds &)
             {
             }
         }
@@ -978,7 +978,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getListTable() const
 
             pResult = writerfilter::Reference<Table>::Pointer_t(pList);
         }
-        catch (ExceptionOutOfBounds) {
+        catch (const ExceptionOutOfBounds &) {
         }
     }
 
@@ -1002,7 +1002,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getLFOTable() const
 
             pResult = writerfilter::Reference<Table>::Pointer_t(pLFOs);
         }
-        catch (Exception &e)
+        catch (const Exception &e)
         {
             clog << e.getText() << endl;
         }
@@ -1619,7 +1619,7 @@ void WW8DocumentImpl::resolve(Stream & rStream)
             if (pStyleSheet.get() != NULL)
                 rStream.table(NS_rtf::LN_STYLESHEET, pStyleSheet);
         }
-        catch (Exception &e)
+        catch (const Exception &e)
         {
             clog << e.getText() << endl;
         }
@@ -2067,7 +2067,7 @@ BookmarkHelper::getBookmark(const CpAndFc & rCpAndFc)
         pResult = writerfilter::Reference<Properties>::Pointer_t
             (new Bookmark(getBKF(rCpAndFc), aName));
     }
-    catch (ExceptionNotFound &e)
+    catch (const ExceptionNotFound &e)
     {
         clog << e.getText() << endl;
     }
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index 7ee16fe..f71971e 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -139,7 +139,7 @@ namespace writerfilter
             {
                 attribute( "value", rPropSet->getPropertyValue( sName ) );
             }
-            catch (uno::Exception)
+            catch (const uno::Exception &)
             {
                 startElement( "exception" );
 
diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx
index bd230ad..727296b 100644
--- a/writerfilter/source/resourcemodel/resourcemodel.cxx
+++ b/writerfilter/source/resourcemodel/resourcemodel.cxx
@@ -383,7 +383,7 @@ void WW8StreamHandler::table(Id name, writerfilter::Reference<Table>::Pointer_t
     {
         ref->resolve(aHandler);
     }
-    catch (Exception &e)
+    catch (const Exception &e)
     {
         output.addItem("<exception>" + e.getText() + "</exception>");
     }
@@ -442,7 +442,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
         {
             pProps->resolve(*this);
         }
-        catch (ExceptionOutOfBounds)
+        catch (const ExceptionOutOfBounds &)
         {
         }
 
@@ -459,7 +459,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
 
             pStream->resolve(aHandler);
         }
-        catch (ExceptionOutOfBounds)
+        catch (const ExceptionOutOfBounds &)
         {
         }
     }
@@ -474,7 +474,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
 
             pBinObj->resolve(aHandler);
         }
-        catch (ExceptionOutOfBounds)
+        catch (const ExceptionOutOfBounds &)
         {
         }
     }
@@ -539,7 +539,7 @@ void WW8TableHandler::entry(int /*pos*/,
     {
         ref->resolve(aHandler);
     }
-    catch (Exception &e)
+    catch (const Exception &e)
     {
         output.addItem("<exception>" + e.getText() + "</exception>");
         output.addItem("</tableentry>");
diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
index 55f66b5..c1b67e8 100644
--- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
+++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx
@@ -231,7 +231,7 @@ sal_Int32 SAL_CALL AnalyzeService::run
 
                     xInputStream->closeInput();
                 }
-                catch (Exception &e)
+                catch (const Exception &e)
                 {
                     fprintf(stdout, "<exception>%s</exception>\n",
                             e.getText().c_str());
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 9e95e9a..8de0a45 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -461,7 +461,7 @@ void SchXMLImportHelper::DeleteDataSeries(
             }
         }
     }
-    catch( uno::Exception & ex )
+    catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
         OSL_FAIL( OUStringToOString(
@@ -544,7 +544,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
             }
         }
     }
-    catch( uno::Exception & ex )
+    catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
         OSL_FAIL( OUStringToOString(
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 871ad04..cdacb25 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -459,7 +459,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
         Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW );
         xSink->setData( aSeq );
     }
-    catch( uno::Exception & ex )
+    catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
         OSL_FAIL( ::rtl::OUStringToOString(
@@ -488,9 +488,8 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
             }
         }
     }
-    catch( uno::Exception & ex )
+    catch( const uno::Exception & )
     {
-        (void)ex; // avoid warning for pro build
     }
 }
 
@@ -855,7 +854,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
                     }
                 }
             }
-            catch( uno::Exception & rEx )
+            catch( const uno::Exception & rEx )
             {
                 (void)rEx; // avoid warning for pro build
                 OSL_TRACE( "Exception caught during setting styles to series: %s",
@@ -939,7 +938,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
                         xRegCurve->setEquationProperties( iStyle->m_xEquationProperties );
                 }
             }
-            catch( uno::Exception & rEx )
+            catch( const uno::Exception & rEx )
             {
                 (void)rEx; // avoid warning for pro build
                 OSL_TRACE( "Exception caught during setting styles to series: %s",
@@ -1015,9 +1014,8 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
                     if( bSwitchOffLinesForScatter )
                         xPointProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")),uno::makeAny(sal_False));
                 }
-                catch( uno::Exception & rEx )
+                catch( const uno::Exception & )
                 {
-                    (void)rEx; // avoid warning for pro build
                 }
 
                 if( !rCurrStyleName.equals( iStyle->msStyleName ) )
@@ -1038,7 +1036,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
                         lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
                 }
             }
-            catch( uno::Exception & rEx )
+            catch( const uno::Exception & rEx )
             {
                 (void)rEx; // avoid warning for pro build
                 OSL_TRACE( "Exception caught during setting styles to data points: %s",
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 4ad0ef7..0b7b042 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -77,7 +77,7 @@ using ::rtl::OUString;
             }
         }
     }
-    catch( uno::Exception & ex )
+    catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
 
@@ -213,7 +213,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
                 }
             }
         }
-        catch( uno::Exception & rEx )
+        catch( const uno::Exception & rEx )
         {
             (void)rEx; // avoid warning for pro build
             OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s",
@@ -251,7 +251,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
                 }
             }
         }
-        catch( uno::Exception & rEx )
+        catch( const uno::Exception & rEx )
         {
             (void)rEx; // avoid warning for pro build
 
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 1cf487e..bce21c7 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -1127,9 +1127,8 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
                 }
             }
         }
-        catch( uno::Exception & ex )
+        catch( const uno::Exception & )
         {
-            (void)ex; // avoid warning for pro build
         }
     }
 }
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index 75fa866..6a8c847 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -263,7 +263,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
                     rPropSet->setPropertyValue( rPropertyName, Any( sStyleName ) );
                 }
             }
-            catch ( ::com::sun::star::lang::IllegalArgumentException& e )
+            catch ( const ::com::sun::star::lang::IllegalArgumentException& e )
             {
                 Sequence<OUString> aSeq(1);
                 aSeq[0] = sStyleName;
@@ -289,7 +289,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
                     rPropSet->setPropertyValue( rPropertyName, rState.maValue );
                 }
             }
-            catch ( ::com::sun::star::lang::IllegalArgumentException& e )
+            catch ( const ::com::sun::star::lang::IllegalArgumentException& e )
             {
                 Sequence<OUString> aSeq;
                 GetImport().SetError(
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 740903d..36bb889 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1364,9 +1364,8 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
         SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, eElementToken, sal_True, sal_True );
 
     }
-    catch( Exception& e )
+    catch( const Exception& )
     {
-        (void)e;
         OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAnimate(), Exception cought!" );
     }
 }
@@ -1397,9 +1396,8 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio )
         SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, XML_AUDIO, sal_True, sal_True );
 
     }
-    catch( Exception& e )
+    catch( const Exception& )
     {
-        (void)e;
         OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" );
     }
 }
@@ -1425,9 +1423,8 @@ void AnimationsExporterImpl::exportCommand( const Reference< XCommand >& xComman
         SvXMLElementExport aElement( mrExport, XML_NAMESPACE_ANIMATION, XML_COMMAND, sal_True, sal_True );
 
     }
-    catch( Exception& e )
+    catch( const Exception& )
     {
-        (void)e;
         OSL_FAIL( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" );
     }
 }
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 7d8d889..74a9635 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1441,7 +1441,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
                 }
             }
         }
-        catch( Exception& e)
+        catch(const Exception& e)
         {
             uno::Sequence<OUString> aSeq(0);
             const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
@@ -1481,7 +1481,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc
                 xStyle->setParentStyle( sParentStyleDisplayName );
             }
         }
-        catch( Exception& e )
+        catch( const Exception& e )
         {
             uno::Sequence<OUString> aSeq(0);
             const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL );
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 7953c5a..9793a97 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -508,7 +508,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
                 rPropSet->setPropertyValue( rPropName, rProp.maValue );
                 bSet = sal_True;
             }
-            catch ( IllegalArgumentException& e )
+            catch ( const IllegalArgumentException& e )
             {
                 // illegal value: check whether this property is
                 // allowed to throw this exception
@@ -521,7 +521,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
                         aSeq, e.Message, NULL );
                 }
             }
-            catch ( UnknownPropertyException& e )
+            catch ( const UnknownPropertyException& e )
             {
                 // unknown property: This is always an error!
                 Sequence<OUString> aSeq(1);
@@ -530,7 +530,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
                     XMLERROR_STYLE_PROP_UNKNOWN | XMLERROR_FLAG_ERROR,
                     aSeq, e.Message, NULL );
             }
-            catch ( PropertyVetoException& e )
+            catch ( const PropertyVetoException& e )
             {
                 // property veto: this shouldn't happen
                 Sequence<OUString> aSeq(1);
@@ -539,7 +539,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
                     XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR,
                     aSeq, e.Message, NULL );
             }
-            catch ( WrappedTargetException& e )
+            catch ( const WrappedTargetException& e )
             {
                 // wrapped target: this shouldn't happen either
                 Sequence<OUString> aSeq(1);
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index fe34828..c59d630 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -718,7 +718,7 @@ void FormattedFieldElement::endElement()
             ctx.getControlModel()->setPropertyValue(
                 OUString( RTL_CONSTASCII_USTRINGPARAM("FormatKey") ), makeAny( nKey ) );
         }
-        catch (util::MalformedNumberFormatException & exc)
+        catch (const util::MalformedNumberFormatException & exc)
         {
             OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
             // rethrow
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index b0717ef..e013408 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1020,9 +1020,8 @@ bool ImportContext::importImageURLProperty(
                     if ( aTmp.getLength() )
                         sURL = aTmp;
                 }
-                catch( uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    (void)e;
                     return false;
                 }
 
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 5be275f..2a1741a 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -420,25 +420,25 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
                 m_xHandler->endDocument();
             }
         }
-        catch ( container::NoSuchElementException& e )
+        catch ( const container::NoSuchElementException& e )
         {
             OSL_TRACE( "XMLBasicExporterBase::filter: caught NoSuchElementException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
             bReturn = sal_False;
         }
-        catch ( lang::IllegalArgumentException& e )
+        catch ( const lang::IllegalArgumentException& e )
         {
             OSL_TRACE( "XMLBasicExporterBase::filter: caught IllegalArgumentException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
             bReturn = sal_False;
         }
-        catch ( lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& e )
         {
             OSL_TRACE( "XMLBasicExporterBase::filter: caught WrappedTargetException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
             bReturn = sal_False;
         }
-        catch ( xml::sax::SAXException& e )
+        catch ( const xml::sax::SAXException& e )
         {
             OSL_TRACE( "XMLBasicExporterBase::filter: caught SAXException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index fdf0443..0f0af3b 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -240,12 +240,12 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
                         if ( xLib.is() )
                             xElement.set( new BasicElementBase( rLocalName, xAttributes, this, m_pImport ) );
                     }
-                    catch ( container::ElementExistException& e )
+                    catch ( const container::ElementExistException& e )
                     {
                         OSL_TRACE( "BasicLibrariesElement::startChildElement: caught ElementExceptionExist reason %s",
                             ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
                     }
-                    catch ( lang::IllegalArgumentException& e )
+                    catch ( const lang::IllegalArgumentException& e )
                     {
                         OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
                             ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -286,7 +286,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
                         if ( xLib.is() )
                             xElement.set( new BasicEmbeddedLibraryElement( rLocalName, xAttributes, this, m_pImport, m_xLibContainer, aName, bReadOnly ) );
                     }
-                    catch ( lang::IllegalArgumentException& e )
+                    catch ( const lang::IllegalArgumentException& e )
                     {
                         OSL_TRACE( "BasicLibrariesElement::startChildElement: caught IllegalArgumentException reason %s",
                             ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -331,7 +331,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
             if ( m_xLibContainer.is() && m_xLibContainer->hasByName( m_aLibName ) )
                 m_xLibContainer->getByName( m_aLibName ) >>= m_xLib;
         }
-        catch ( lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& e )
         {
             OSL_TRACE( "BasicEmbeddedLibraryElement CTOR: caught WrappedTargetException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -486,17 +486,17 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/
                 m_xLib->insertByName( m_aName, aElement );
             }
         }
-        catch ( container::ElementExistException& e )
+        catch ( const container::ElementExistException& e )
         {
             OSL_TRACE( "BasicSourceCodeElement::endElement: caught ElementExceptionExist reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
         }
-        catch ( lang::IllegalArgumentException& e )
+        catch ( const lang::IllegalArgumentException& e )
         {
             OSL_TRACE( "BasicSourceCodeElement::endElement: caught IllegalArgumentException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
         }
-        catch ( lang::WrappedTargetException& e )
+        catch ( const lang::WrappedTargetException& e )
         {
             OSL_TRACE( "BasicSourceCodeElement::endElement: caught WrappedTargetException reason %s",
                 ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index af53c97..eadedce 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -88,7 +88,7 @@ Reference< XComponentContext > createInitialComponentContext(
         return defaultBootstrap_InitialComponentContext( unorc );
     }
 
-    catch( Exception& rExc )
+    catch( const Exception& rExc )
     {
         OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_FAIL( aStr.getStr() );
@@ -213,7 +213,7 @@ void MyApp::Main()
             exportToFile( aParam2.getStr(), xModel, xContext );
         }
     }
-    catch (xml::sax::SAXException & rExc)
+    catch (const xml::sax::SAXException & rExc)
     {
         OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         uno::Exception exc;
@@ -224,7 +224,7 @@ void MyApp::Main()
         }
         OSL_FAIL( aStr.getStr() );
     }
-    catch (uno::Exception & rExc)
+    catch (const uno::Exception & rExc)
     {
         OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
         OSL_FAIL( aStr.getStr() );
diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
index b525791..82d8d5b 100644
--- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
@@ -169,7 +169,7 @@ int SAL_CALL main( int argc, char **argv )
             sal_Int32 validity = pSecEnv->verifyCertificate( xPersonalCerts[i] ) ;
             fprintf( stdout, "The certificate validities are %d\n", validity ) ;
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
index c3d27a8..a39352c 100644
--- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
@@ -236,7 +236,7 @@ int SAL_CALL main( int argc, char **argv )
         OSL_ENSURE( xDecrRes.is() ,
             "Decryptor - "
             "Cannot decrypt the xml document" ) ;
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
index 2000b03..bcf9c27 100644
--- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
@@ -269,7 +269,7 @@ int SAL_CALL main( int argc, char **argv )
         OSL_ENSURE( xTemplate.is() ,
             "Encryptor - "
             "Cannot encrypt the xml document" ) ;
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx
index ee21c0d..96cf72d 100644
--- a/xmlsecurity/tools/standalone/csfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/csfit/signer.cxx
@@ -326,7 +326,7 @@ int SAL_CALL main( int argc, char **argv )
         OSL_ENSURE( xTemplate.is() ,
             "Signer - "
             "Cannot generate the xml signature" ) ;
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx
index ecca402..a624f79 100644
--- a/xmlsecurity/tools/standalone/csfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/csfit/verifier.cxx
@@ -313,7 +313,7 @@ int SAL_CALL main( int argc, char **argv )
         } else {
             printf( "Signature is VALID!\n" ) ;
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
index 9ff7ae3..04ddd98 100644
--- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
@@ -135,7 +135,7 @@ int SAL_CALL main( int argc, char **argv )
             fprintf( stdout, "The certificate validities are %d\n", validity ) ;
 
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
index b2a0862..259d9ce 100644
--- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
@@ -210,7 +210,7 @@ int SAL_CALL main( int argc, char **argv )
         OSL_ENSURE( xDecrRes.is() ,
             "Decryptor - "
             "Cannot decrypt the xml document" ) ;
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
index 0312f27..1645163 100644
--- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
@@ -267,7 +267,7 @@ int SAL_CALL main( int argc, char **argv )
         {
             fprintf( stdout, "Operation fails.\n") ;
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
index 0c7fbec..9e96e4f 100644
--- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
@@ -299,7 +299,7 @@ int SAL_CALL main( int argc, char **argv )
         {
             fprintf( stdout, "Operation fails.\n") ;
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }
diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
index 74d827d..2278d10 100644
--- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
@@ -296,7 +296,7 @@ int SAL_CALL main( int argc, char **argv )
         {
             fprintf( stdout, "Operation fails.\n") ;
         }
-    } catch( Exception& e ) {
+    } catch( const Exception& e ) {
         fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ;
         goto done ;
     }


More information about the Libreoffice-commits mailing list