diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-09 02:56:30 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-12-09 09:59:02 +0900 |
commit | 9262039e908b3ea897180bc723d947d3d7546d4e (patch) | |
tree | 0937618fd39b4d73e770664fae96166304df7d68 | |
parent | e89c99ce5e5474173d354778b531f2dff8eff25e (diff) |
catch exception by constant reference
22 files changed, 162 insertions, 163 deletions
diff --git a/drawinglayer/source/processor2d/helperchartrenderer.cxx b/drawinglayer/source/processor2d/helperchartrenderer.cxx index bf7dec5d9d4f..c2747f20ca77 100644 --- a/drawinglayer/source/processor2d/helperchartrenderer.cxx +++ b/drawinglayer/source/processor2d/helperchartrenderer.cxx @@ -139,9 +139,8 @@ namespace drawinglayer } } } - catch( uno::Exception& e ) + catch( const uno::Exception& ) { - (void)e; OSL_FAIL( "Chart cannot be painted pretty!" ); } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index cdf29dee1be1..addb3f630a68 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1956,7 +1956,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) uno::Sequence < uno::Any > aSeq; uno::Any aNew; try { aNew = xConverter->convertTo( rVal, ::getCppuType((const uno::Sequence < uno::Any >*)0) ); } - catch (uno::Exception&) {} + catch (const uno::Exception&) {} aNew >>= aSeq; if ( aSeq.getLength() == 4 ) @@ -2754,7 +2754,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) uno::Any aNew; uno::Sequence < uno::Any > aSeq; try { aNew = xConverter->convertTo( rVal, ::getCppuType((const uno::Sequence < uno::Any >*)0) ); } - catch (uno::Exception&) {} + catch (const uno::Exception&) {} if( (aNew >>= aSeq) && aSeq.getLength() == 4 ) { diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 6939f2b94458..8f71ff238b11 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -82,7 +82,7 @@ void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumb DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); _xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY); } - catch(Exception& ) + catch(const Exception&) { } } @@ -147,7 +147,7 @@ String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const { aTmpStr = xFormatter->makeNumberingString( aProperties, rLocale ); } - catch(Exception&) + catch(const Exception&) { } } @@ -937,7 +937,7 @@ bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 pNumRule = pNewRule; return true; } - catch(lang::IllegalArgumentException&) + catch(const lang::IllegalArgumentException&) { } } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f044d6aca16c..8cbeb1e7ca7c 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2099,15 +2099,15 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp( { xParser->parseStream( aParserInput ); } - catch( xml::sax::SAXParseException& ) + catch( const xml::sax::SAXParseException& ) { // re throw ? } - catch( xml::sax::SAXException& ) + catch( const xml::sax::SAXException& ) { // re throw ? } - catch( io::IOException& ) + catch( const io::IOException& ) { // re throw ? } @@ -2226,7 +2226,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() xParser->parseStream( aParserInput ); } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -2650,7 +2650,7 @@ sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, delete pNew; } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 3ac90384e08c..db37c0573d8d 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -1124,7 +1124,7 @@ uno::Reference< XDictionary > LinguMgr::GetStandard() DictionaryType_POSITIVE, linguistic::GetWritableDictionaryURL( aDicName ) ); } - catch(com::sun::star::uno::Exception &) + catch(const com::sun::star::uno::Exception &) { } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index a64e759fde8a..c2763b37a89e 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -471,7 +471,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& } while( 0 ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL("exception during xml export"); } diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 2a7e3873fb3d..e73f8e87654a 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -235,7 +235,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r } while(0); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 151b45c663ee..4303a18f8221 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -103,10 +103,10 @@ void OCommonEmbeddedObject::Deactivate() try { xClientSite->saveObject(); } - catch( embed::ObjectSaveVetoException& ) + catch( const embed::ObjectSaveVetoException& ) { } - catch( uno::Exception& e ) + catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client could not store the object!" )), @@ -144,7 +144,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange else ((embed::XStateChangeListener*)pIterator.next())->stateChanged( aSource, nOldState, nNewState ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // even if the listener complains ignore it for now } @@ -329,7 +329,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) aModuleName = xManager->identify( xContDoc ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} // if currently another object is UIactive it will be deactivated; usually this will activate the LM of @@ -481,7 +481,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) SwitchStateTo_Impl( nNewState ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { if ( nOldState != m_nObjectState ) // notify listeners that the object has changed the state @@ -555,7 +555,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) { nNewState = ConvertVerbToState_Impl( nVerbID ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} if ( nNewState == -1 ) diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index de052802135c..1a34b4c615bd 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -283,7 +283,7 @@ OCommonEmbeddedObject::~OCommonEmbeddedObject() delete m_pInterfaceContainer; m_pInterfaceContainer = NULL; } - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} try { if ( m_pDocHolder ) @@ -291,13 +291,13 @@ OCommonEmbeddedObject::~OCommonEmbeddedObject() m_pDocHolder->CloseFrame(); try { m_pDocHolder->CloseDocument( sal_True, sal_True ); - } catch ( uno::Exception& ) {} + } catch ( const uno::Exception& ) {} m_pDocHolder->FreeOffice(); m_pDocHolder->release(); m_pDocHolder = NULL; } - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } } @@ -317,7 +317,7 @@ void OCommonEmbeddedObject::requestPositioning( const awt::Rectangle& aRect ) try { xInplaceClient->changedPlacement( aRect ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "Exception on request to resize!\n" ); } @@ -348,7 +348,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName, { ((document::XEventListener *)aIt.next())->notifyEvent( aEvent ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { aIt.remove(); } @@ -570,7 +570,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pIterator.next())->queryClosing( aSource, bDeliverOwnership ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -588,7 +588,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pCloseIterator.next())->notifyClosing( aSource ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pCloseIterator.remove(); } @@ -611,7 +611,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) try { m_pDocHolder->CloseDocument( bDeliverOwnership, bDeliverOwnership ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { if ( bDeliverOwnership ) { @@ -640,7 +640,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) { try { xComp->dispose(); - } catch ( uno::Exception& ) {} + } catch ( const uno::Exception& ) {} } m_xObjectStorage.clear(); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index a3c83948f64c..8afe92d881b1 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -159,7 +159,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( try { xStorage->copyToStorage( xTempStorage ); - } catch( uno::Exception& e ) + } catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't copy storage!" )), @@ -173,7 +173,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -182,7 +182,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( if ( xTempOut.is() ) xTempOut->closeOutput(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -253,7 +253,7 @@ static void SetDocToEmbedded( const uno::Reference< frame::XModel > xDocument, c uno::Reference< frame::XModule > xModule( xDocument, uno::UNO_QUERY_THROW ); xModule->setIdentifier( aModuleName ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } } @@ -291,7 +291,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } @@ -368,7 +368,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::InitNewDocument_Impl() } xModel->attachResource( xModel->getURL(), m_aDocMediaDescriptor ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { uno::Reference< util::XCloseable > xCloseable( xDocument, uno::UNO_QUERY ); if ( xCloseable.is() ) @@ -377,7 +377,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::InitNewDocument_Impl() { xCloseable->close( sal_True ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -440,7 +440,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() } } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { uno::Reference< util::XCloseable > xCloseable( xDocument, uno::UNO_QUERY ); if ( xCloseable.is() ) @@ -449,7 +449,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() { xCloseable->close( sal_True ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -470,7 +470,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() try { ::comphelper::MimeConfigurationHelper aHelper( m_xFactory ); aFilterName = aHelper.GetDefaultFilterFromServiceName( GetDocumentServiceName(), nVersion ); - } catch( uno::Exception& ) + } catch( const uno::Exception& ) {} } @@ -539,7 +539,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag uno::Reference< beans::XPropertySet > xTempStreamProps( xTempInpStream, uno::UNO_QUERY_THROW ); xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -566,7 +566,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag else xLoadable->load( aLoadArgs.getPropertyValues() ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { uno::Reference< util::XCloseable > xCloseable( xDocument, uno::UNO_QUERY ); if ( xCloseable.is() ) @@ -575,7 +575,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag { xCloseable->close( sal_True ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { DBG_UNHANDLED_EXCEPTION(); } @@ -632,7 +632,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr { xTempOut->closeOutput(); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "Looks like stream was closed already" ); } @@ -653,13 +653,13 @@ void OCommonEmbeddedObject::SaveObject_Impl() if ( xModifiable.is() && !xModifiable->isModified() ) return; } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} try { m_xClientSite->saveObject(); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "The object was not stored!\n" ); } @@ -688,7 +688,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } @@ -834,7 +834,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateDocFromMediaDesc xLoadable->load( addAsTemplate( aMedDescr ) ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { uno::Reference< util::XCloseable > xCloseable( xDocument, uno::UNO_QUERY ); if ( xCloseable.is() ) @@ -843,7 +843,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateDocFromMediaDesc { xCloseable->close( sal_True ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -867,11 +867,11 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ try { nStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( m_xParentStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve storage media type!\n" ); } @@ -892,11 +892,11 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ uno::Reference< beans::XPropertySet > xTempStreamProps( xTempStream, uno::UNO_QUERY_THROW ); xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } - OSL_ENSURE( aTempFileURL.getLength(), "Coudn't retrieve temporary file URL!\n" ); + OSL_ENSURE( aTempFileURL.getLength(), "Couldn't retrieve temporary file URL!\n" ); aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aTempMediaDescr[0].Value <<= aTempFileURL; @@ -1193,11 +1193,11 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: try { nTargetStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( xStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve target storage media type!\n" ); } @@ -1206,11 +1206,11 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: { nOriginalStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( m_xParentStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve own storage media type!\n" ); } @@ -1242,7 +1242,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: xSource->copyElementDirectlyTo( m_aEntryName, xTarget, sEntName ); bOptimizationWorks = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -1324,11 +1324,11 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: try { nTargetStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( xStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve target storage media type!\n" ); } @@ -1337,11 +1337,11 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: { nOriginalStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( m_xParentStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve own storage media type!\n" ); } @@ -1375,7 +1375,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: xSource->copyElementDirectlyTo( m_aEntryName, xTarget, sEntName ); bOptimizationWorks = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -1480,7 +1480,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } @@ -1613,11 +1613,11 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() try { nStorageFormat = ::comphelper::OStorageHelper::GetXStorageFormat( m_xParentStorage ); } - catch ( beans::IllegalTypeException& ) + catch ( const beans::IllegalTypeException& ) { // the container just has an unknown type, use current file format } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { OSL_FAIL( "Can not retrieve storage media type!\n" ); } @@ -1774,7 +1774,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -1857,7 +1857,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { xModif->setModified( sal_True ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} m_pDocHolder->SetComponent( xDocument, m_bReadOnly ); diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 3e51fb63915d..e12a939f88c9 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -114,7 +114,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ); aAny >>= aMediaType; } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -123,7 +123,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta if ( xComp.is() ) xComp->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } xSubStorage = uno::Reference< embed::XStorage >(); diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 036c2d65b807..2ba23df02744 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -190,7 +190,7 @@ DocumentHolder::DocumentHolder( const uno::Reference< lang::XMultiServiceFactory { xDesktop->addTerminateListener( this ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } m_refCount--; @@ -215,7 +215,7 @@ DocumentHolder::~DocumentHolder() { try { CloseDocument( sal_True, sal_False ); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } if ( m_pInterceptor ) @@ -400,7 +400,7 @@ sal_Bool DocumentHolder::SetFrameLMVisibility( const uno::Reference< frame::XFra bResult = sal_True; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} return bResult; @@ -569,7 +569,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() sal_False ); } } - catch( uno::Exception ) + catch( const uno::Exception& ) {} if ( !xResult.is() ) @@ -711,7 +711,7 @@ sal_Bool DocumentHolder::MergeMenues_Impl( const uno::Reference< ::com::sun::sta uno::UNO_QUERY_THROW ); bMenuMerged = xMerge->setMergedMenuBar( xMergedMenu ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} return bMenuMerged; @@ -734,7 +734,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; xDocAreaAcc = xContainerLM->getDockingAreaAcceptor(); } - catch( uno::Exception& ){} + catch( const uno::Exception& ){} // make sure that lock state of LM is correct even if an exception is thrown in between sal_Bool bUnlock = sal_False; @@ -776,7 +776,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: m_xOwnWindow->setFocus(); } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // activation failed; reestablish old state try @@ -795,7 +795,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: uno::Reference< ::com::sun::star::frame::XMenuBarMergingAcceptor > xMerge( xOwnLM, uno::UNO_QUERY_THROW ); xMerge->removeMergedMenuBar(); } - catch( uno::Exception& ) {} + catch( const uno::Exception& ) {} try { @@ -805,7 +805,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: if ( bUnlock ) xContainerLM->unlock(); } - catch( uno::Exception& ) {} + catch( const uno::Exception& ) {} } } } @@ -825,7 +825,7 @@ sal_Bool DocumentHolder::HideUI( const uno::Reference< ::com::sun::star::frame:: try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; - } catch( uno::Exception& ) + } catch( const uno::Exception& ) {} if ( xOwnLM.is() ) @@ -851,7 +851,7 @@ sal_Bool DocumentHolder::HideUI( const uno::Reference< ::com::sun::star::frame:: xContainerLM->doLayout(); bResult = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { SetFrameLMVisibility( m_xFrame, sal_True ); } @@ -904,7 +904,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; - } catch( uno::Exception& ) + } catch( const uno::Exception& ) {} if ( xOwnLM.is() ) @@ -958,7 +958,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() xHWindow->setVisible( sal_True ); } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -973,7 +973,7 @@ void DocumentHolder::SetComponent( const uno::Reference< util::XCloseable >& xDo // May be should be improved try { CloseDocument( sal_True, sal_False ); - } catch( uno::Exception& ) + } catch( const uno::Exception& ) {} } @@ -1076,7 +1076,7 @@ sal_Bool DocumentHolder::SetExtent( sal_Int64 nAspect, const awt::Size& aSize ) xDocVis->setVisualAreaSize( nAspect, aSize ); return sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO: Error handling } @@ -1096,7 +1096,7 @@ sal_Bool DocumentHolder::GetExtent( sal_Int64 nAspect, awt::Size *pSize ) *pSize = xDocVis->getVisualAreaSize( nAspect ); return sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO: Error handling } @@ -1115,7 +1115,7 @@ sal_Int32 DocumentHolder::GetMapUnit( sal_Int64 nAspect ) { return xDocVis->getMapUnit( nAspect ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO: Error handling } @@ -1314,11 +1314,11 @@ void SAL_CALL DocumentHolder::activated( ) throw (::com::sun::star::uno::Runtim { m_pEmbedObj->changeState( embed::EmbedStates::UI_ACTIVE ); } - catch ( com::sun::star::embed::StateChangeInProgressException& ) + catch ( const com::sun::star::embed::StateChangeInProgressException& ) { // must catch this exception because focus is grabbed while UI activation in doVerb() } - catch ( com::sun::star::uno::Exception& ) + catch ( const com::sun::star::uno::Exception& ) { // no outgoing exceptions specified here } diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 062d2a37ecca..c5cd7b1adf6c 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -81,7 +81,7 @@ void ODummyEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName, { ((document::XEventListener *)aIt.next())->notifyEvent( aEvent ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { aIt.remove(); } @@ -641,7 +641,7 @@ void SAL_CALL ODummyEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pIterator.next())->queryClosing( aSource, bDeliverOwnership ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -659,7 +659,7 @@ void SAL_CALL ODummyEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pCloseIterator.next())->notifyClosing( aSource ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pCloseIterator.remove(); } diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index e4fc3a1ad40c..f892e3b35493 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -159,7 +159,7 @@ Interceptor::dispatch( try { m_pDocHolder->GetEmbedObject()->changeState( embed::EmbedStates::RUNNING ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index a4c0a690b5cd..235dd7f343c9 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -161,7 +161,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -170,7 +170,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta if ( xComp.is() ) xComp->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } @@ -195,7 +195,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta if ( aMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) ) ) ) aEmbedFactory = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -204,7 +204,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta if ( xComp.is() ) xComp->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index ed126065b9a8..b39c88888583 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -84,7 +84,7 @@ sal_Bool ConvertBufferToFormat( void* pBuf, } } } - catch (uno::Exception&) + catch (const uno::Exception&) {} } @@ -119,7 +119,7 @@ void SAL_CALL MainThreadNotificationRequest::notify (const uno::Any& ) throw (un m_pObject->OnIconChanged_Impl(); } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // ignore all the errors } diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index 621d0ccd2fba..8ba9bc039329 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -471,7 +471,7 @@ OleComponent::~OleComponent() m_refCount++; try { Dispose(); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } for ( FormatEtcList::iterator aIter = m_pNativeImpl->m_aFormatsList.begin(); @@ -1465,7 +1465,7 @@ void SAL_CALL OleComponent::close( sal_Bool bDeliverOwnership ) { ( (util::XCloseListener* )pIterator.next() )->queryClosing( aSource, bDeliverOwnership ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -1483,7 +1483,7 @@ void SAL_CALL OleComponent::close( sal_Bool bDeliverOwnership ) { ( (util::XCloseListener* )pCloseIterator.next() )->notifyClosing( aSource ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pCloseIterator.remove(); } @@ -1672,7 +1672,7 @@ void SAL_CALL OleComponent::dispose() throw (::com::sun::star::uno::RuntimeExcep { close( sal_True ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } @@ -1729,7 +1729,7 @@ sal_Int64 SAL_CALL OleComponent::getSomething( const ::com::sun::star::uno::Sequ return (sal_Int64) (IUnknown*) m_pNativeImpl->m_pObj; } } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -1760,7 +1760,7 @@ void SAL_CALL OleComponent::setModified( sal_Bool bModified ) lang::EventObject aEvent( (util::XModifiable*) this ); ((util::XModifyListener*)pIterator.next())->modified( aEvent ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 4c5b4ff8d514..65bbb0d32c2f 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -74,12 +74,12 @@ void OleEmbeddedObject::SwitchComponentToRunningState_Impl() { m_pOleComponent->RunObject(); } - catch( embed::UnreachableStateException& ) + catch( const embed::UnreachableStateException& ) { GetRidOfComponent(); throw; } - catch( embed::WrongStateException& ) + catch( const embed::WrongStateException& ) { GetRidOfComponent(); throw; @@ -144,7 +144,7 @@ void OleEmbeddedObject::MoveListeners() { xWrappedObject->addStateChangeListener( (embed::XStateChangeListener*)pIterator.next() ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -169,7 +169,7 @@ void OleEmbeddedObject::MoveListeners() { xWrappedObject->addEventListener( (document::XEventListener*)pIterator.next() ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -194,7 +194,7 @@ void OleEmbeddedObject::MoveListeners() { xWrappedObject->addCloseListener( (util::XCloseListener*)pIterator.next() ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -373,14 +373,14 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() { m_xParentStorage->removeElement( aTmpStreamName ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // the success of the removing is not so important } } } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // repair the object if necessary switch( nStep ) @@ -394,11 +394,11 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() m_xParentStorage->removeElement( m_aEntryName ); m_xParentStorage->renameElement( aTmpStreamName, m_aEntryName ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { try { close( sal_True ); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} m_xParentStorage->dispose(); // ??? the storage has information loss, it should be closed without commiting! throw uno::RuntimeException(); // the repairing is not possible @@ -409,11 +409,11 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() m_xObjectStream = m_xParentStorage->openStreamElement( m_aEntryName, m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE ); m_nObjectState = embed::EmbedStates::LOADED; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { try { close( sal_True ); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} throw uno::RuntimeException(); // the repairing is not possible } @@ -424,7 +424,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() if ( aStorageName.getLength() ) try { m_xParentStorage->removeElement( aStorageName ); - } catch( uno::Exception& ) { OSL_FAIL( "Can not remove temporary storage!" ); } + } catch( const uno::Exception& ) { OSL_FAIL( "Can not remove temporary storage!" ); } break; } } @@ -546,7 +546,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) m_pOleComponent->SetExtent( m_aSizeToSet, m_nAspectToSet ); m_bHasSizeToSet = sal_False; } - catch( uno::Exception& ) {} + catch( const uno::Exception& ) {} aGuard.reset(); } diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 7fc8bc13f4fb..f85aa3576a6b 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -152,7 +152,7 @@ OleEmbeddedObject::~OleEmbeddedObject() m_refCount++; // to avoid crash try { Dispose(); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } if ( m_aTempURL.getLength() ) @@ -180,7 +180,7 @@ void OleEmbeddedObject::MakeEventListenerNotification_Impl( const ::rtl::OUStrin { ((document::XEventListener*)pIterator.next())->notifyEvent( aEvent ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { } } @@ -208,7 +208,7 @@ void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sa { ((embed::XStateChangeListener*)pIterator.next())->changingState( aSource, nOldState, nNewState ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // even if the listener complains ignore it for now } @@ -219,7 +219,7 @@ void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sa { ((embed::XStateChangeListener*)pIterator.next())->stateChanged( aSource, nOldState, nNewState ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // if anything happened it is problem of listener, ignore it } @@ -243,7 +243,7 @@ void OleEmbeddedObject::GetRidOfComponent() { m_pOleComponent->close( sal_False ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO: there should be a special listener to wait for component closing // and to notify object, may be object itself can be such a listener @@ -279,7 +279,7 @@ void OleEmbeddedObject::Dispose() if ( m_pOleComponent ) try { GetRidOfComponent(); - } catch( uno::Exception& ) + } catch( const uno::Exception& ) { m_bDisposed = true; throw; // TODO: there should be a special listener that will close object when @@ -295,7 +295,7 @@ void OleEmbeddedObject::Dispose() { try { xComp->dispose(); - } catch( uno::Exception& ) {} + } catch( const uno::Exception& ) {} } m_xObjectStream = uno::Reference< io::XStream >(); } @@ -481,7 +481,7 @@ void SAL_CALL OleEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pIterator.next())->queryClosing( aSource, bDeliverOwnership ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pIterator.remove(); } @@ -499,7 +499,7 @@ void SAL_CALL OleEmbeddedObject::close( sal_Bool bDeliverOwnership ) { ((util::XCloseListener*)pCloseIterator.next())->notifyClosing( aSource ); } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { pCloseIterator.remove(); } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 78ccd7183878..c428f70e2a29 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -79,7 +79,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: bRet = sal_True; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -105,7 +105,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -147,22 +147,22 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: else throw io::IOException(); // TODO: } - catch( packages::WrongPasswordException& ) + catch( const packages::WrongPasswordException& ) { KillFile_Impl( aResult, xFactory ); throw io::IOException(); //TODO: } - catch( io::IOException& ) + catch( const io::IOException& ) { KillFile_Impl( aResult, xFactory ); throw; } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { KillFile_Impl( aResult, xFactory ); throw; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { KillFile_Impl( aResult, xFactory ); aResult = ::rtl::OUString(); @@ -190,11 +190,11 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } - catch( uno::RuntimeException& ) + catch( const uno::RuntimeException& ) { throw; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -606,7 +606,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() xStream = xTempAccess->openFileRead( m_aTempURL ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } @@ -636,7 +636,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() { bExists = xNameContainer->hasByName( aStreamName ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } } @@ -673,7 +673,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres aArgs ), uno::UNO_QUERY ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} if ( xNameContainer.is() ) @@ -692,7 +692,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres break; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} if ( nInd == 0 ) @@ -708,7 +708,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres break; } } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } } @@ -765,7 +765,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres CreateOleComponentAndLoad_Impl( NULL ); m_aClassID = m_pOleComponent->GetCLSID(); // was not set during consruction } - catch( uno::Exception& ) + catch( const uno::Exception& ) { GetRidOfComponent(); } @@ -778,7 +778,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres } } } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } } @@ -803,7 +803,7 @@ void OleEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::XStor if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } @@ -840,7 +840,7 @@ sal_Bool OleEmbeddedObject::SaveObject_Impl() m_xClientSite->saveObject(); bResult = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -884,7 +884,7 @@ sal_Bool OleEmbeddedObject::OnShowWindow_Impl( sal_Bool bShow ) m_xClientSite->visibilityChanged( bShow ); bResult = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -1171,7 +1171,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( xSourceOptStor->copyElementDirectlyTo( m_aEntryName, xTargetOptStor, sEntName ); bOptimizedCopyingDone = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -1304,7 +1304,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( { try { xComp->dispose(); - } catch( uno::Exception& ) + } catch( const uno::Exception& ) { } } @@ -1427,7 +1427,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( CreateOleComponentAndLoad_Impl( NULL ); m_aClassID = m_pOleComponent->GetCLSID(); // was not set during consruction } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // TODO/LATER: detect classID of the object if possible // means that the object inprocess server could not be successfuly instantiated @@ -1647,7 +1647,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xComponent.is() ) xComponent->dispose(); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { } } @@ -1673,7 +1673,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) // probably it might need to be done earlier, while the object is in active state getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } @@ -1860,7 +1860,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() // probably it might need to be done earlier, while the object is in active state getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } @@ -2015,7 +2015,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag try { pNewOleComponent->InitEmbeddedCopyOfLink( m_pOleComponent ); } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { delete pNewOleComponent; if ( !m_aTempURL.isEmpty() ) @@ -2027,7 +2027,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag try { GetRidOfComponent(); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { delete pNewOleComponent; if ( !m_aTempURL.isEmpty() ) diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index c4e31b7ce720..617d8e4d7ea4 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -133,7 +133,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt try { changeState( embed::EmbedStates::RUNNING ); } - catch( uno::Exception& ) + catch( const uno::Exception& ) { OSL_FAIL( "The object should not be resized without activation!\n" ); } @@ -148,7 +148,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt m_pOleComponent->SetExtent( aSizeToSet, nAspect ); // will throw an exception in case of failure m_bHasSizeToSet = sal_False; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { // some objects do not allow to set the size even in running state m_bHasSizeToSet = sal_True; @@ -224,7 +224,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) try { changeState( embed::EmbedStates::RUNNING ); } - catch( uno::Exception ) + catch( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), @@ -238,7 +238,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) aSize = m_pOleComponent->GetExtent( nAspect ); // will throw an exception in case of failure bSuccess = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } @@ -250,7 +250,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) aSize = m_pOleComponent->GetCachedExtent( nAspect ); // will throw an exception in case of failure bSuccess = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -263,7 +263,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) aSize = m_pOleComponent->GetReccomendedExtent( nAspect ); // will throw an exception in case of failure bSuccess = sal_True; } - catch( uno::Exception& ) + catch( const uno::Exception& ) { } } @@ -282,11 +282,11 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) aResult = m_aCachedSize; } } - catch ( embed::NoVisualAreaSizeException& ) + catch ( const embed::NoVisualAreaSizeException& ) { throw; } - catch ( uno::Exception& ) + catch ( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), @@ -388,7 +388,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres return aVisualRepr; } - catch( uno::Exception& ) + catch( const uno::Exception& ) {} } #endif diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 7dfb0c7a9fe0..1257048222d7 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -131,7 +131,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta if ( xObj.is() ) xNew->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, xObj->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) ); } - catch ( uno::Exception& ) {}; + catch ( const uno::Exception& ) {} break; } } |