Kaydet (Commit) 75705b69 authored tarafından Caolán McNamara's avatar Caolán McNamara

catch by const reference

üst 43afab88
...@@ -93,7 +93,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException) ...@@ -93,7 +93,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY ); uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
xWinPeer = xControl->getPeer(); xWinPeer = xControl->getPeer();
} }
catch( uno::Exception ) catch(const uno::Exception&)
{ {
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The Control does not exsit")), throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The Control does not exsit")),
uno::Reference< uno::XInterface >() ); uno::Reference< uno::XInterface >() );
...@@ -305,7 +305,7 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException) ...@@ -305,7 +305,7 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) ); xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) );
xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sControlSource; xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sControlSource;
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
} }
} }
...@@ -345,7 +345,7 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException) ...@@ -345,7 +345,7 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException)
xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) ); xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) );
xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sRowSource; xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sRowSource;
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
} }
} }
...@@ -469,7 +469,7 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt ) ...@@ -469,7 +469,7 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt )
} }
} }
} }
catch( uno::Exception& e ) catch(const uno::Exception&)
{ {
} }
} }
......
...@@ -100,7 +100,7 @@ ScVbaCommandBar::getVisible() throw (uno::RuntimeException) ...@@ -100,7 +100,7 @@ ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
getPropertyValue( aToolBar, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Visible") ) ) >>= bVisible; getPropertyValue( aToolBar, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Visible") ) ) >>= bVisible;
} }
} }
catch ( uno::Exception e ) catch (const uno::Exception&)
{ {
} }
return bVisible; return bVisible;
...@@ -122,7 +122,7 @@ ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException) ...@@ -122,7 +122,7 @@ ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
xLayoutManager->destroyElement( m_sResourceUrl ); xLayoutManager->destroyElement( m_sResourceUrl );
} }
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
OSL_TRACE( "SetVisible get an exception\n" ); OSL_TRACE( "SetVisible get an exception\n" );
} }
......
...@@ -157,7 +157,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg, ...@@ -157,7 +157,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
xDispatch->dispatch( aURL, uno::Sequence< beans::PropertyValue >() ); xDispatch->dispatch( aURL, uno::Sequence< beans::PropertyValue >() );
bUIClose = sal_True; bUIClose = sal_True;
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
} }
...@@ -172,10 +172,11 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg, ...@@ -172,10 +172,11 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
// The boolean parameter DeliverOwnership tells objects vetoing the close process that they may // The boolean parameter DeliverOwnership tells objects vetoing the close process that they may
// assume ownership if they object the closure by throwing a CloseVetoException // assume ownership if they object the closure by throwing a CloseVetoException
// Here we give up ownership. To be on the safe side, catch possible veto exception anyway. // Here we give up ownership. To be on the safe side, catch possible veto exception anyway.
try{ try
{
xCloseable->close(sal_True); xCloseable->close(sal_True);
} }
catch( util::CloseVetoException ) catch(const util::CloseVetoException&)
{ {
//close is cancelled, nothing to do //close is cancelled, nothing to do
} }
...@@ -193,7 +194,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg, ...@@ -193,7 +194,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
{ {
xDisposable->dispose(); xDisposable->dispose();
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
} }
} }
...@@ -239,11 +240,11 @@ VbaDocumentBase::setSaved( sal_Bool bSave ) throw (uno::RuntimeException) ...@@ -239,11 +240,11 @@ VbaDocumentBase::setSaved( sal_Bool bSave ) throw (uno::RuntimeException)
{ {
xModifiable->setModified( !bSave ); xModifiable->setModified( !bSave );
} }
catch ( lang::DisposedException& ) catch (const lang::DisposedException&)
{ {
// impossibility to set the modified state on disposed document should not trigger an error // impossibility to set the modified state on disposed document should not trigger an error
} }
catch ( beans::PropertyVetoException& ) catch (const beans::PropertyVetoException&)
{ {
uno::Any aCaught( ::cppu::getCaughtException() ); uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( throw lang::WrappedTargetRuntimeException(
...@@ -289,7 +290,7 @@ VbaDocumentBase::getVBProject() throw (uno::RuntimeException) ...@@ -289,7 +290,7 @@ VbaDocumentBase::getVBProject() throw (uno::RuntimeException)
mxVBProject = xServiceManager->createInstanceWithArgumentsAndContext( mxVBProject = xServiceManager->createInstanceWithArgumentsAndContext(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.vbide.VBProject" ) ), aArgs, mxContext ); ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.vbide.VBProject" ) ), aArgs, mxContext );
} }
catch( uno::Exception& ) catch(const uno::Exception&)
{ {
} }
return uno::Any( mxVBProject ); return uno::Any( mxVBProject );
......
...@@ -220,7 +220,7 @@ ScVbaShapes::SelectAll() throw (uno::RuntimeException) ...@@ -220,7 +220,7 @@ ScVbaShapes::SelectAll() throw (uno::RuntimeException)
// viewuno.cxx ScTabViewObj::select will throw IllegalArgumentException // viewuno.cxx ScTabViewObj::select will throw IllegalArgumentException
// if one of the shapes is no 'markable' e.g. a button // if one of the shapes is no 'markable' e.g. a button
// the method still works // the method still works
catch( lang::IllegalArgumentException& ) catch(const lang::IllegalArgumentException&)
{ {
} }
} }
...@@ -463,7 +463,7 @@ ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShap ...@@ -463,7 +463,7 @@ ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShap
{ {
xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), uno::makeAny( sName ) ); xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), uno::makeAny( sName ) );
} }
catch( script::BasicErrorException e ) catch(const script::BasicErrorException&)
{ {
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment