diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-08-18 08:49:46 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-08-18 13:50:27 +0900 |
commit | 91f85b294b7c71223b471279060f7a07d3c9bbd0 (patch) | |
tree | 9854ff3d52c394e3d53b2b179fca53ae5e479198 /oox/source | |
parent | aea70b22af92ca6ed013bf6c78a6fdcae58d13cc (diff) |
catch exceptions by const references
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 14 | ||||
-rw-r--r-- | oox/source/ole/oleobjecthelper.cxx | 6 | ||||
-rwxr-xr-x | oox/source/ole/olestorage.cxx | 20 | ||||
-rw-r--r-- | oox/source/ole/vbacontrol.cxx | 6 | ||||
-rw-r--r-- | oox/source/ole/vbamodule.cxx | 6 | ||||
-rw-r--r-- | oox/source/ole/vbaproject.cxx | 20 |
6 files changed, 36 insertions, 36 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index c69cc1fa1101..ef8ac40b00fe 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -202,7 +202,7 @@ bool lclExtractRangeFromName( CellRangeAddress& orRangeAddr, const Reference< XM orRangeAddr = xAddressable->getRangeAddress(); return true; } - catch( Exception& ) + catch(const Exception& ) { } return false; @@ -234,7 +234,7 @@ void lclPrepareConverter( PropertySet& rConverter, const Reference< XModel >& rx CREATE_OUSTRING( "com.sun.star.table.CellAddressConversion" ); rConverter.set( xModelFactory->createInstance( aServiceName ) ); } - catch( Exception& ) + catch(const Exception& ) { } rConverter.setProperty( PROP_XLA1Representation, rAddressString ); @@ -351,7 +351,7 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo CREATE_OUSTRING( "com.sun.star.table.CellValueBinding" ), aArgs ), UNO_QUERY_THROW ); xBindable->setValueBinding( xBinding ); } - catch( Exception& ) + catch(const Exception& ) { } @@ -383,7 +383,7 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo CREATE_OUSTRING( "com.sun.star.table.CellRangeListSource" ), aArgs ), UNO_QUERY_THROW ); xEntrySink->setListEntrySource( xEntrySource ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -1896,7 +1896,7 @@ bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtr { aPropMap.setProperty( PROP_GenerateVbaEvents, true); } - catch( Exception& ) + catch(const Exception& ) { } mxModel->convertProperties( aPropMap, rConv ); @@ -1936,7 +1936,7 @@ Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl if( rControl.convertProperties( xCtrlModel, maControlConv ) ) return xCtrlModel; } - catch( Exception& ) + catch(const Exception& ) { } return Reference< XControlModel >(); @@ -1961,7 +1961,7 @@ Reference< XIndexContainer > EmbeddedForm::createXForm() mxFormIC.set( xForm, UNO_QUERY_THROW ); } } - catch( Exception& ) + catch(const Exception& ) { } // always clear the forms supplier to not try to create the form again diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx index 7a5c7650e6a8..30a1ce699ae8 100644 --- a/oox/source/ole/oleobjecthelper.cxx +++ b/oox/source/ole/oleobjecthelper.cxx @@ -71,7 +71,7 @@ OleObjectHelper::OleObjectHelper( const Reference< XMultiServiceFactory >& rxMod { mxResolver.set( rxModelFactory->createInstance( CREATE_OUSTRING( "com.sun.star.document.ImportEmbeddedObjectResolver" ) ), UNO_QUERY ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -83,7 +83,7 @@ OleObjectHelper::~OleObjectHelper() Reference< XComponent > xResolverComp( mxResolver, UNO_QUERY_THROW ); xResolverComp->dispose(); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -122,7 +122,7 @@ bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInf bRet = true; } } - catch( Exception& ) + catch(const Exception& ) { } } diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index 6255def97b02..511b4ee81be5 100755 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -109,7 +109,7 @@ OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContex mxOutStrm = mxTempFile->getOutputStream(); mxSeekable.set( mxOutStrm, UNO_QUERY ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -246,7 +246,7 @@ void OleStorage::initStorage( const Reference< XInputStream >& rxInStream ) } // scope closes output stream of tempfile xInStrm = xTempFile->getInputStream(); } - catch( Exception& ) + catch(const Exception& ) { OSL_FAIL( "OleStorage::initStorage - cannot create temporary copy of input stream" ); } @@ -261,7 +261,7 @@ void OleStorage::initStorage( const Reference< XInputStream >& rxInStream ) mxStorage.set( xFactory->createInstanceWithArguments( CREATE_OUSTRING( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), UNO_QUERY_THROW ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -278,7 +278,7 @@ void OleStorage::initStorage( const Reference< XStream >& rxOutStream ) mxStorage.set( xFactory->createInstanceWithArguments( CREATE_OUSTRING( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), UNO_QUERY_THROW ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -295,7 +295,7 @@ bool OleStorage::implIsStorage() const mxStorage->hasElements(); return true; } - catch( Exception& ) + catch(const Exception& ) { } return false; @@ -316,7 +316,7 @@ void OleStorage::implGetElementNames( ::std::vector< OUString >& orElementNames if( aNames.getLength() > 0 ) orElementNames.insert( orElementNames.end(), aNames.getConstArray(), aNames.getConstArray() + aNames.getLength() ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -331,7 +331,7 @@ StorageRef OleStorage::implOpenSubStorage( const OUString& rElementName, bool bC Reference< XNameContainer > xSubElements( mxStorage->getByName( rElementName ), UNO_QUERY_THROW ); xSubStorage.reset( new OleStorage( *this, xSubElements, rElementName, true ) ); } - catch( Exception& ) + catch(const Exception& ) { } @@ -353,7 +353,7 @@ StorageRef OleStorage::implOpenSubStorage( const OUString& rElementName, bool bC // return the temp storage to caller xSubStorage = xTempStorage; } - catch( Exception& ) + catch(const Exception& ) { } } @@ -367,7 +367,7 @@ Reference< XInputStream > OleStorage::implOpenInputStream( const OUString& rElem { xInStream.set( mxStorage->getByName( rElementName ), UNO_QUERY ); } - catch( Exception& ) + catch(const Exception& ) { } return xInStream; @@ -400,7 +400,7 @@ void OleStorage::implCommit() const // this requires another commit(), which will be performed by the parent storage } } - catch( Exception& ) + catch(const Exception& ) { } } diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index fc750ca53821..048d4f8c737f 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -395,7 +395,7 @@ void VbaFormControl::createAndConvert( sal_Int32 nCtrlIndex, ContainerHelper::insertByName( rxParentNC, rCtrlName, Any( xCtrlModel ) ); } } - catch( Exception& ) + catch(const Exception& ) { } } @@ -478,7 +478,7 @@ bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrl maControls.forEachMemWithIndex( &VbaFormControl::createAndConvert, ::boost::cref( xCtrlModelNC ), ::boost::cref( rConv ) ); } - catch( Exception& ) + catch(const Exception& ) { OSL_FAIL( "VbaFormControl::convertProperties - cannot get control container interface" ); } @@ -881,7 +881,7 @@ void VbaUserForm::importForm( ContainerHelper::insertByName( rxDialogLib, aFormName, Any( xDialogSource ) ); } } - catch( Exception& ) + catch(const Exception& ) { } } diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 45a21df0e6f8..cbd9744b03d0 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -308,7 +308,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode, { aModuleInfo.ModuleObject.set( rxDocObjectNA->getByName( maName ), UNO_QUERY ); } - catch( Exception& ) + catch(const Exception& ) { } break; @@ -342,7 +342,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode, Reference< XVBAModuleInfo > xVBAModuleInfo( rxBasicLib, UNO_QUERY_THROW ); xVBAModuleInfo->insertModuleInfo( maName, aModuleInfo ); } - catch( Exception& ) + catch(const Exception& ) { } @@ -351,7 +351,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode, { rxBasicLib->insertByName( maName, Any( aSourceCode.makeStringAndClear() ) ); } - catch( Exception& ) + catch(const Exception& ) { OSL_FAIL( "VbaModule::createModule - cannot insert module into library" ); } diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index cf9af559e9b3..8e5d2eb42427 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -83,7 +83,7 @@ bool lclReadConfigItem( const Reference< XInterface >& rxConfigAccess, const OUS Any aItem = ConfigurationHelper::readRelativeKey( rxConfigAccess, CREATE_OUSTRING( "Filter/Import/VBA" ), rItemName ); return aItem.has< bool >() && aItem.get< bool >(); } - catch( Exception& ) + catch(const Exception& ) { } return false; @@ -103,7 +103,7 @@ VbaFilterConfig::VbaFilterConfig( const Reference< XComponentContext >& rxContex Reference< XMultiServiceFactory > xFactory( rxContext->getServiceManager(), UNO_QUERY_THROW ); mxConfigAccess = ConfigurationHelper::openConfig( xFactory, aConfigPackage, ConfigurationHelper::E_READONLY ); } - catch( Exception& ) + catch(const Exception& ) { } OSL_ENSURE( mxConfigAccess.is(), "VbaFilterConfig::VbaFilterConfig - cannot open configuration" ); @@ -146,7 +146,7 @@ void VbaMacroAttacherBase::resolveAndAttachMacro( const Reference< XVBAMacroReso { attachMacro( rxResolver->resolveVBAMacroToScriptURL( maMacroName ) ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -242,7 +242,7 @@ Reference< XNameContainer > VbaProject::openLibrary( sal_Int32 nPropId, bool bCr xLibContainer->createLibrary( maPrjName ); xLibrary.set( xLibContainer->getByName( maPrjName ), UNO_QUERY_THROW ); } - catch( Exception& ) + catch(const Exception& ) { } OSL_ENSURE( !bCreateMissing || xLibrary.is(), "VbaProject::openLibrary - cannot create library" ); @@ -436,7 +436,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap xVBACompat->setProjectName( maPrjName ); } - catch( Exception& ) + catch(const Exception& ) { } @@ -446,7 +446,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap { xDocObjectNA.set( xModelFactory->createInstance( CREATE_OUSTRING( "ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY ); } - catch( Exception& ) + catch(const Exception& ) { // not all documents support this } @@ -463,7 +463,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap ::boost::cref( xBasicLib ), ::boost::cref( xDocObjectNA ) ); } } - catch( Exception& ) + catch(const Exception& ) { } @@ -494,7 +494,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap VbaUserForm aForm( mxContext, mxDocModel, rGraphicHelper, bDefaultColorBgr ); aForm.importForm( mxDocModel, xDialogLib, *xSubStrg, aModuleName, eTextEnc ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -518,7 +518,7 @@ void VbaProject::attachMacros() CREATE_OUSTRING( "com.sun.star.script.vba.VBAMacroResolver" ), aArgs, mxContext ), UNO_QUERY_THROW ); maMacroAttachers.forEachMem( &VbaMacroAttacherBase::resolveAndAttachMacro, ::boost::cref( xResolver ) ); } - catch( Exception& ) + catch(const Exception& ) { } } @@ -538,7 +538,7 @@ void VbaProject::copyStorage( StorageBase& rVbaPrjStrg ) } Reference< XTransactedObject >( xDocStorage, UNO_QUERY_THROW )->commit(); } - catch( Exception& ) + catch(const Exception& ) { } } |