diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-13 23:35:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-14 09:55:48 +0100 |
commit | 2b570e8d1aa9bc30194363d9daef8ec4bace990e (patch) | |
tree | 31a7ac87380da4228c6953c4f845d94961f31e3b | |
parent | fc7980d50c07aac60042a9d675bd4532bd3ac4cd (diff) |
catch by const reference
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/docfac.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/docmacromode.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 34 | ||||
-rw-r--r-- | sfx2/source/doc/plugin.cxx | 2 |
6 files changed, 30 insertions, 27 deletions
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index a2a85ec4d7..a4c4a92291 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1307,7 +1307,7 @@ void Metadatable::RemoveMetadataReference() m_pReg = 0; } } - catch (uno::Exception &) + catch (const uno::Exception &) { OSL_FAIL("Metadatable::RemoveMetadataReference: exception"); } @@ -1469,7 +1469,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, } } } - catch (uno::Exception &) + catch (const uno::Exception &) { OSL_FAIL("Metadatable::RegisterAsCopyOf: exception"); } @@ -1492,7 +1492,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, return pUndo; } } - catch (uno::Exception &) + catch (const uno::Exception &) { OSL_FAIL("Metadatable::CreateUndo: exception"); } @@ -1562,7 +1562,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther, pRegDoc->JoinMetadatables(*this, i_rOther); } } - catch (uno::Exception &) + catch (const uno::Exception &) { OSL_FAIL("Metadatable::JoinMetadatable: exception"); } diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index cbd4082589..7afd79ba40 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -317,7 +317,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri ::comphelper::ConfigurationHelper::flush( xConfig ); } } - catch( uno::Exception& ) + catch(const uno::Exception&) { } } @@ -424,9 +424,12 @@ String SfxObjectFactory::GetModuleName() const return String(sModuleName); } catch(const css::uno::RuntimeException&) - { throw; } + { + throw; + } catch(const css::uno::Exception&) - {} + { + } return String(); } diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index eda8f50a12..9ac9fdf64c 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -295,7 +295,7 @@ namespace sfx2 return disallowMacroExecution(); } } - catch ( Exception& ) + catch ( const Exception& ) { if ( ( nMacroExecutionMode == MacroExecMode::FROM_LIST_NO_WARN ) || ( nMacroExecutionMode == MacroExecMode::FROM_LIST_AND_SIGNED_WARN ) diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 30c0e218c5..505872541e 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -489,7 +489,7 @@ sal_Bool GraphicHelper::getThumbnailReplacement_Impl( sal_Int32 nResID, const un } } } - catch( uno::Exception& ) + catch(const uno::Exception&) { } } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index ac4c671c88..783d623305 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -208,10 +208,10 @@ public: m_xDocumentSettings->setPropertyValue( aLoadReadonlyString, uno::makeAny( bReadOnly ) ); m_bReadOnlySupported = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} if ( ( bReadOnly && !m_bReadOnlySupported ) ) @@ -229,7 +229,7 @@ public: if ( m_bReadOnlySupported ) m_xDocumentSettings->setPropertyValue( aLoadReadonlyString, uno::makeAny( m_bPreserveReadOnly ) ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "Unexpected exception!" ); } @@ -458,7 +458,7 @@ void ModelData_Impl::CheckInteractionHandler() DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -600,18 +600,18 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const ::rtl::OUString& aFilte } } } - catch( container::NoSuchElementException& ) + catch( const container::NoSuchElementException& ) { // the filter name is unknown throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER ); } - catch( task::ErrorCodeIOException& ) + catch( const task::ErrorCodeIOException& ) { throw; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -659,7 +659,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) nResult = STATUS_NO_ACTION; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // impossibility to get the configuration access means normal saving flow for now } @@ -1087,7 +1087,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, ( GetMediaDescr().find( aFilterDataString ) == GetMediaDescr().end() && GetMediaDescr().find( aFilterOptionsString ) == GetMediaDescr().end() ); } - catch( lang::IllegalArgumentException& ) + catch( const lang::IllegalArgumentException& ) {} } } @@ -1136,7 +1136,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() } } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -1197,7 +1197,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() try { uno::Reference< frame::XTitle > xTitle( GetModel(), uno::UNO_QUERY_THROW ); aReccomendedName = xTitle->getTitle(); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } if ( aReccomendedName.getLength() && aTypeName.getLength() ) @@ -1403,7 +1403,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& { aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() ); } - catch( lang::IllegalArgumentException& ) + catch( const lang::IllegalArgumentException& ) { OSL_FAIL( "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" ); aModelData.GetStorable()->store(); @@ -1625,7 +1625,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& else aModelData.GetStorable()->storeAsURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aArgsSequence ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { if ( ( nStoreMode & EXPORT_REQUESTED ) ) SetDocInfoState( aModelData.GetModel(), xOldDocInfo, sal_True ); @@ -1676,7 +1676,7 @@ sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence( bUseFilterOptions = sal_True; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -1725,7 +1725,7 @@ void SfxStoringHelper::SetDocInfoState( // it is possible that the propertysets from XML and binary files differ; we shouldn't break then xSet->setPropertyValue( pProps[i].Name, aValue ); } - catch ( uno::Exception& ) {} + catch ( const uno::Exception& ) {} } sal_Int16 nCount = i_xOldDocInfo->getUserFieldCount(); @@ -1738,7 +1738,7 @@ void SfxStoringHelper::SetDocInfoState( xDocInfoToFill->setUserFieldValue( nInd, aPropVal ); } } - catch ( uno::Exception& ) {} + catch ( const uno::Exception& ) {} // set the modified flag back if required if ( bNoModify && bIsModified != xModifiable->isModified() ) @@ -1794,7 +1794,7 @@ Window* SfxStoringHelper::GetModelWindow( const uno::Reference< frame::XModel >& } } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 475aab6ce5..279c6ae3f9 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -155,7 +155,7 @@ throw( uno::RuntimeException ) } } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } |