From 75b835c8cd2953c5bc0f23df300ee553f94eb28d Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 11 Dec 2011 18:51:50 +0900 Subject: catch exception by constant reference --- filter/source/config/cache/filterfactory.cxx | 2 +- filter/source/flash/swfexporter.cxx | 10 ++++----- filter/source/graphicfilter/icgm/cgm.cxx | 2 +- filter/source/graphicfilter/itiff/itiff.cxx | 6 ++--- filter/source/msfilter/escherex.cxx | 10 ++++----- filter/source/msfilter/eschesdo.cxx | 4 ++-- filter/source/msfilter/msdffimp.cxx | 6 ++--- filter/source/msfilter/msoleexp.cxx | 14 ++++++------ filter/source/msfilter/mstoolbar.cxx | 4 ++-- filter/source/msfilter/msvbahelper.cxx | 6 ++--- filter/source/msfilter/powerpoint/pptimporter.cxx | 2 +- filter/source/msfilter/svdfppt.cxx | 10 ++++----- filter/source/odfflatxml/OdfFlatXml.cxx | 2 +- filter/source/pdf/impdialog.cxx | 4 ++-- filter/source/pdf/pdfexport.cxx | 4 ++-- filter/source/svg/test/svg2odf.cxx | 2 +- .../source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 8 +++---- filter/source/xmlfilterdetect/filterdetect.cxx | 2 +- filter/source/xsltdialog/typedetectionexport.cxx | 6 ++--- filter/source/xsltdialog/typedetectionimport.cxx | 2 +- filter/source/xsltdialog/xmlfileview.cxx | 2 +- filter/source/xsltdialog/xmlfilterjar.cxx | 10 ++++----- .../source/xsltdialog/xmlfiltersettingsdialog.cxx | 26 +++++++++++----------- filter/source/xsltdialog/xmlfiltertabdialog.cxx | 4 ++-- filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 2 +- filter/source/xsltdialog/xmlfiltertestdialog.cxx | 16 ++++++------- filter/source/xsltfilter/XSLTFilter.cxx | 6 ++--- 27 files changed, 86 insertions(+), 86 deletions(-) (limited to 'filter') diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index ec3254d599b7..f2b138e929ee 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -461,7 +461,7 @@ class stlcomp_removeIfMatchFlags // We are asked for bRemove ! And bMatch = !bRemove => so bRemove = !bMatch .-) return !bMatch; } - catch(css::container::NoSuchElementException) + catch(const css::container::NoSuchElementException &) { return true; } diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index 80b7d698c763..18c6d8f821ee 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -161,7 +161,7 @@ sal_Bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOut delete mpWriter; mpWriter = new Writer( nOutputWidth, nOutputHeight, mnDocWidth, mnDocHeight, mnJPEGcompressMode ); } - catch( Exception& ) + catch( const Exception& ) { OSL_ASSERT( false ); return false; // no writer, no cookies @@ -265,7 +265,7 @@ sal_Bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Referenc return sal_False; } } - catch( Exception& ) + catch( const Exception& ) { OSL_ASSERT( false ); } @@ -370,7 +370,7 @@ sal_Bool FlashExporter::exportSound( Reference< XOutputStream > &xOutputStream, delete mpWriter; mpWriter = new Writer( 0, 0, 0, 0 ); } - catch( Exception& ) + catch( const Exception& ) { OSL_ASSERT( false ); } @@ -564,7 +564,7 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) return; } } - catch( Exception& ) + catch( const Exception& ) { // TODO: If we are exporting a draw, this property is not available } @@ -642,7 +642,7 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) delete pShapeInfo; } - catch( Exception& ) + catch( const Exception& ) { OSL_ASSERT(false); } diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index 7308794e6a54..8023fa72a963 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -842,7 +842,7 @@ ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uIn } } } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { nStatus = 0; } diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 155b1342ce37..7f7023fc2652 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -354,7 +354,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen) { pStripOffsets = new sal_uLong[ nNumStripOffsets ]; } - catch (std::bad_alloc) + catch (const std::bad_alloc &) { pStripOffsets = NULL; nNumStripOffsets = 0; @@ -400,7 +400,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen) { pStripByteCounts = new sal_uLong[ nNumStripByteCounts ]; } - catch (std::bad_alloc) + catch (const std::bad_alloc &) { pStripByteCounts = NULL; nNumStripByteCounts = 0; @@ -1298,7 +1298,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) { pMap[ j ] = new sal_uInt8[ nBytesPerRow ]; } - catch (std::bad_alloc) + catch (const std::bad_alloc &) { pMap[ j ] = NULL; bStatus = sal_False; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 0bad56292aca..10f17706357d 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -2058,7 +2058,7 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape, rEquations.push_back( aEquation ); } } - catch ( EnhancedCustomShape::ParseError& ) + catch ( const EnhancedCustomShape::ParseError& ) { EnhancedCustomShapeEquation aEquation; // ups, we should not be here, aEquation.nOperation = 0; // creating a default equation with value 1 @@ -3277,7 +3277,7 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi } } } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { } } @@ -3386,7 +3386,7 @@ sal_Bool EscherPropertyValueHelper::GetPropertyValue( if ( aXPropSetInfo.is() ) bRetValue = aXPropSetInfo->hasPropertyByName( rString ); } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { bRetValue = sal_False; } @@ -3399,7 +3399,7 @@ sal_Bool EscherPropertyValueHelper::GetPropertyValue( if ( !rAny.hasValue() ) bRetValue = sal_False; } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { bRetValue = sal_False; } @@ -3419,7 +3419,7 @@ sal_Bool EscherPropertyValueHelper::GetPropertyValue( if ( aXPropState.is() ) eRetValue = aXPropState->getPropertyState( rPropertyName ); } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { } return eRetValue; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 0180e37b2875..438a72d44afe 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -1066,7 +1066,7 @@ sal_Bool ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString ) if( mAny.hasValue() ) bRetValue = sal_True; } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { bRetValue = sal_False; } @@ -1087,7 +1087,7 @@ sal_Bool ImplEESdrObject::ImplGetPropertyValue( const Reference< XPropertySet >& if( 0 != mAny.get() ) bRetValue = sal_True; } - catch( ::com::sun::star::uno::Exception& ) + catch( const ::com::sun::star::uno::Exception& ) { bRetValue = sal_False; } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 6853c139ebd2..e9d177b0a79f 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -7554,7 +7554,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( xObj->setVisualAreaSize( nAspect, aAwtSz ); //xInplaceObj->EnableSetModified( sal_True );*/ } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "Could not set visual area of the object!\n" ); } @@ -7601,7 +7601,7 @@ sal_Bool SvxMSDffManager::SetPropValue( const uno::Any& rAny, const uno::Referen if ( aXPropSetInfo.is() ) bRetValue = aXPropSetInfo->hasPropertyByName( rPropName ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { bRetValue = sal_False; } @@ -7613,7 +7613,7 @@ sal_Bool SvxMSDffManager::SetPropValue( const uno::Any& rAny, const uno::Referen rXPropSet->setPropertyValue( rPropName, rAny ); bRetValue = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { bRetValue = sal_False; } diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index e69ae3be3d3b..9915f1420139 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -117,7 +117,7 @@ sal_Bool UseOldMSExport() return bResult; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -215,13 +215,13 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto { xStor->storeToURL( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aSeq ); } - catch( uno::Exception& ) {} // #TODO really handle exceptions - interactionalhandler etc. ? + catch( const uno::Exception& ) {} // #TODO really handle exceptions - interactionalhandler etc. ? SotStorageRef xOLEStor = new SotStorage( pStream, sal_True ); xOLEStor->CopyTo( &rDestStg ); rDestStg.Commit(); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO/LATER: Error handling OSL_FAIL( "The object could not be exported!" ); @@ -257,13 +257,13 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto // extension stream aSize = rObj->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); } - catch( embed::NoVisualAreaSizeException& ) + catch( const embed::NoVisualAreaSizeException& ) { OSL_FAIL( "Could not get visual area size!\n" ); aSize.Width = 5000; aSize.Height = 5000; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "Unexpected exception while getting visual area size!\n" ); aSize.Width = 5000; @@ -311,7 +311,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY ); xStor->storeToURL( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aSeq ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO/LATER: Error handling OSL_FAIL( "The object could not be exported!" ); @@ -339,7 +339,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto { xPers->storeToEntry( xStor, aTempName, aEmptySeq, aEmptySeq ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) {} SotStorageRef xOLEStor = SotStorage::OpenOLEStorage( xStor, aTempName, STREAM_STD_READ ); diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 83e4dd44fe4a..2776e724d1f5 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -61,7 +61,7 @@ void CustomToolBarImportHelper::showToolbar( const rtl::OUString& rName ) uno::Reference< frame::XLayoutManager > xLayoutMgr( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LayoutManager") ) ), uno::UNO_QUERY_THROW ); xLayoutMgr->showElement( rName ); } - catch( uno::Exception& ) {} + catch( const uno::Exception& ) {} } void CustomToolBarImportHelper::ScaleImage( uno::Reference< graphic::XGraphic >& xGraphic, long nNewSize ) @@ -192,7 +192,7 @@ CustomToolBarImportHelper::createMenu( const rtl::OUString& rName, const uno::Re } } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { bRes = false; } diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index ca0288fb6364..ca7f34d22c76 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -323,7 +323,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& { xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY ); } - catch( uno::Exception& ) // createInstance may throw + catch( const uno::Exception& ) // createInstance may throw { } #endif @@ -358,7 +358,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW ); sThisProject = xVBAMode->getProjectName(); } - catch( uno::Exception& /*e*/) {} + catch( const uno::Exception& /*e*/) {} sSearchList.push_back( sThisProject ); // First Lib to search @@ -465,7 +465,7 @@ sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Se } bRes = ( nErr == ERRCODE_NONE ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { bRes = sal_False; } diff --git a/filter/source/msfilter/powerpoint/pptimporter.cxx b/filter/source/msfilter/powerpoint/pptimporter.cxx index 23760b68d8cd..713e1d32ff1e 100644 --- a/filter/source/msfilter/powerpoint/pptimporter.cxx +++ b/filter/source/msfilter/powerpoint/pptimporter.cxx @@ -67,7 +67,7 @@ PptImporter::PptImporter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) xHdl = REF( NMSP_SAX::XDocumentHandler ) ( xFact->createInstance( sService ), NMSP_UNO::UNO_QUERY ); xImporter = REF( NMSP_DOCUMENT::XImporter )( xHdl, NMSP_UNO::UNO_QUERY ); } - catch( NMSP_UNO::Exception & ) + catch( const NMSP_UNO::Exception & ) { } } diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 0cd57668c263..5e5726661284 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2719,7 +2719,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage, uno::Reference< text::XText > xText( xAnnotation->getTextRange() ); xText->setString( sText ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -7206,7 +7206,7 @@ void MergeCells( const Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nR if( xRange->isMergeable() ) xRange->merge(); } - catch( Exception& ) + catch( const Exception& ) { DBG_ASSERT( false, "exception caught!" ); } @@ -7311,7 +7311,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) } } } - catch( Exception& ) + catch( const Exception& ) { } } @@ -7376,7 +7376,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl ++aIter; } } - catch( Exception& ) + catch( const Exception& ) { } } @@ -7516,7 +7516,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab SdrObject::Free( pGroup ); } - catch( Exception& ) + catch( const Exception& ) { pTable->uno_unlock(); SdrObject* pObj = pTable; diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index b7674df13e29..87714e9f7552 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -159,7 +159,7 @@ OdfFlatXml::importer( { saxParser->parseStream(inputSource); } - catch (Exception &exc) + catch (const Exception &exc) { OString msg = OUStringToOString(exc.Message, RTL_TEXTENCODING_ASCII_US); diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 25dbbd116e2c..21f4424822f4 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -137,7 +137,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, xView->getSelection() >>= maSelection; } } - catch( RuntimeException ) + catch(const RuntimeException &) { } mbSelectionPresent = maSelection.hasValue(); @@ -175,7 +175,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent, mbIsWriter = sal_True; } } - catch( RuntimeException ) + catch(const RuntimeException &) { } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index cd5289907061..f023f04e463b 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -263,7 +263,7 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, } } } - catch( RuntimeException ) + catch(const RuntimeException &) { } return bRet; @@ -307,7 +307,7 @@ void PDFExportStreamDoc::write( const Reference< XOutputStream >& xStream ) xStore->storeToURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ), aArgs ); } - catch( IOException& ) + catch( const IOException& ) { } } diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx index 78d300e39076..438143eac11b 100644 --- a/filter/source/svg/test/svg2odf.cxx +++ b/filter/source/svg/test/svg2odf.cxx @@ -98,7 +98,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if( xFactory.is() ) ::comphelper::setProcessServiceFactory( xFactory ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 256b040e258b..78fcd893dfd9 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -198,9 +198,9 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star } } #if OSL_DEBUG_LEVEL > 0 - catch( Exception& e ) + catch( const Exception& e ) #else - catch( Exception& ) + catch( const Exception& ) #endif { if (xStatusIndicator.is()) @@ -320,9 +320,9 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star } } #if OSL_DEBUG_LEVEL > 0 - catch( Exception& exE ) + catch( const Exception& exE ) #else - catch( Exception& ) + catch( const Exception& ) #endif { OSL_FAIL( ::rtl::OUStringToOString( exE.Message, RTL_TEXTENCODING_ASCII_US).getStr()); diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index 6675a2a5cdc9..cb68f5747257 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -217,7 +217,7 @@ bool isXMLStream(const ::rtl::OString& aHeaderStrm) i++; } } - catch (Exception &) + catch (const Exception &) { OSL_FAIL( "An Exception occurred while opening File stream" ); } diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx index 0994197aad0b..d373fe4898be 100644 --- a/filter/source/xsltdialog/typedetectionexport.cxx +++ b/filter/source/xsltdialog/typedetectionexport.cxx @@ -226,7 +226,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML xHandler->endElement( sComponentData ); xHandler->endDocument(); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "TypeDetectionExporter::doExport exception catched!" ); } @@ -256,7 +256,7 @@ void TypeDetectionExporter::addProperty( Reference< XDocumentHandler > xHandler, xHandler->ignorableWhitespace ( sWhiteSpace ); xHandler->endElement( sProp ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "TypeDetectionExporter::addProperty exception catched!" ); } @@ -287,7 +287,7 @@ void TypeDetectionExporter::addLocaleProperty( Reference< XDocumentHandler > xHa xHandler->ignorableWhitespace ( sWhiteSpace ); xHandler->endElement( sProp ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "TypeDetectionExporter::addLocaleProperty exception catched!" ); } diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx index 4d4675e60f53..b370414dd1cd 100644 --- a/filter/source/xsltdialog/typedetectionimport.cxx +++ b/filter/source/xsltdialog/typedetectionimport.cxx @@ -87,7 +87,7 @@ void TypeDetectionImporter::doImport( Reference< XMultiServiceFactory >& xMSF, R pImporter->fillFilterVector( rFilters ); } } - catch( Exception& /* e */ ) + catch( const Exception& /* e */ ) { OSL_FAIL( "TypeDetectionImporter::doImport exception catched!" ); } diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx index 206af57dd49f..899a0a8b9c74 100644 --- a/filter/source/xsltdialog/xmlfileview.cxx +++ b/filter/source/xsltdialog/xmlfileview.cxx @@ -630,7 +630,7 @@ void XMLSourceFileDialog::onValidate() xImporter->importer( aSourceData, xWriter, aFilterUserData ); } } - catch(Exception& e) + catch(const Exception& e) { String sErr( e.Message ); sal_uInt16 nEntry = maLBOutput.InsertEntry( sErr ); diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index c95ab3bc5639..8c4863aa032e 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -90,7 +90,7 @@ XMLFilterJarHelper::XMLFilterJarHelper( Reference< XMultiServiceFactory >& xMSF sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath ); } } - catch(Exception&) + catch(const Exception&) { } } @@ -219,7 +219,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt if( pFilter->maImportXSLT.getLength() ) addFile( xFilterRoot, xFactory, pFilter->maImportXSLT ); } - catch( com::sun::star::container::ElementExistException&) + catch(const com::sun::star::container::ElementExistException&) { // in case of same named import / export XSLT the latter // is ignored @@ -258,7 +258,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt return true; } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterJarHelper::savePackage exception catched!" ); } @@ -334,7 +334,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterJarHelper::savePackage exception catched!" ); } @@ -408,7 +408,7 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterJarHelper::copyFile exception catched" ); } diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 29e04abd2153..306fe595dee8 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -114,7 +114,7 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath ); } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL( "XMLFilterSettingsDialog::XMLFilterSettingsDialog exception catched!" ); } @@ -432,7 +432,7 @@ OUString XMLFilterSettingsDialog::createUniqueInterfaceName( const OUString& rIn } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::createUniqueInterfaceName exception catched!" ); } @@ -477,7 +477,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi if( pOldInfo->maType != pNewInfo->maType ) mxTypeDetection->removeByName( pOldInfo->maType ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -599,7 +599,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi mxFilterContainer->insertByName( pFilterEntry->maFilterName, aAny ); } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -662,7 +662,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi mxTypeDetection->insertByName( pFilterEntry->maType, aAny ); } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -677,7 +677,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi if( xFlushable.is() ) xFlushable->flush(); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -691,7 +691,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi { mxFilterContainer->removeByName( pFilterEntry->maFilterName ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -707,7 +707,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi if( xFlushable.is() ) xFlushable->flush(); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); bOk = false; @@ -720,7 +720,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi { mxTypeDetection->removeByName( pFilterEntry->maType ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception catched!" ); } @@ -897,7 +897,7 @@ void XMLFilterSettingsDialog::onDelete() delete pInfo; } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::onDelete exception catched!" ); } @@ -1239,7 +1239,7 @@ void XMLFilterSettingsDialog::initFilterList() } } } - catch( ::com::sun::star::container::NoSuchElementException& ) + catch( const ::com::sun::star::container::NoSuchElementException& ) { OSL_FAIL( "Type not found, user error?" ); // TODO: error? } @@ -1252,7 +1252,7 @@ void XMLFilterSettingsDialog::initFilterList() pTempFilter = new filter_info_impl; } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterSettingsDialog::initFilterList exception catched!" ); } @@ -1768,7 +1768,7 @@ bool copyStreams( Reference< XInputStream > xIS, Reference< XOutputStream > xOS return true; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL( "copyStreams() exception catched!" ); } diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index d025ce07dc17..8b046f93706d 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -158,7 +158,7 @@ bool XMLFilterTabDialog::onOk() } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTabDialog::onOk exception catched!" ); } @@ -216,7 +216,7 @@ bool XMLFilterTabDialog::onOk() } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTabDialog::onOk exception catched!" ); } diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index 04a807b4bead..9399fd2c7b56 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -83,7 +83,7 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co if( xCfgMgr.is() ) sInstPath = xCfgMgr->substituteVariables( sInstPath ); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL( "XMLFilterTabPageXSLT::XMLFilterTabPageXSLT exception catched!" ); } diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index bffa4ba7d752..33b6b28a3569 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -132,7 +132,7 @@ static bool checkComponent( Reference< XComponent >& rxComponent, const OUString } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "checkComponent exception catched!" ); } @@ -191,7 +191,7 @@ XMLFilterTestDialog::XMLFilterTestDialog( Window* pParent, ResMgr& rResMgr, cons mxGlobalBroadcaster->addEventListener( mxGlobalEventListener ); } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTestDialog::XMLFilterTestDialog exception catched!" ); } @@ -204,7 +204,7 @@ XMLFilterTestDialog::~XMLFilterTestDialog() if( mxGlobalBroadcaster.is() ) mxGlobalBroadcaster->removeEventListener( mxGlobalEventListener ); } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTestDialog::~XMLFilterTestDialog exception catched!" ); } @@ -449,7 +449,7 @@ void XMLFilterTestDialog::onExportBrowse() } } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("XMLFilterTestDialog::onExportBrowse exception caught!"); } @@ -523,7 +523,7 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportGraphicObjectResolver" )) ) ); xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportEmbeddedObjectResolver" )) ) ); } - catch( Exception& ) + catch( const Exception& ) { } } @@ -556,7 +556,7 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTestDialog::doExport exception catched!" ); } @@ -689,7 +689,7 @@ void XMLFilterTestDialog::import( const OUString& rURL ) displayXMLFile( aTempFileURL ); } } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("XMLFilterTestDialog::import catched an exception" ); } @@ -769,7 +769,7 @@ Reference< XComponent > XMLFilterTestDialog::getFrontMostDocument( const OUStrin } } } - catch( Exception& ) + catch( const Exception& ) { OSL_FAIL( "XMLFilterTestDialog::getFrontMostDocument exception catched!" ); } diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index c1fd601ac935..e272ecdab4bc 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -203,7 +203,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) if (nPos != -1) sExpandedUrl = sExpandedUrl.copy(nPos + 20); } - catch (Exception&) + catch (const Exception&) { } return sExpandedUrl; @@ -401,9 +401,9 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) return !m_bError; } #if OSL_DEBUG_LEVEL > 0 - catch( Exception& exc) + catch( const Exception& exc) #else - catch (Exception&) + catch (const Exception&) #endif { // something went wrong -- cgit