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)
uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
xWinPeer = xControl->getPeer();
}
catch( uno::Exception )
catch(const uno::Exception&)
{
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The Control does not exsit")),
uno::Reference< uno::XInterface >() );
......@@ -305,7 +305,7 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) );
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)
xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) );
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 )
}
}
}
catch( uno::Exception& e )
catch(const uno::Exception&)
{
}
}
......
......@@ -100,7 +100,7 @@ ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
getPropertyValue( aToolBar, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Visible") ) ) >>= bVisible;
}
}
catch ( uno::Exception e )
catch (const uno::Exception&)
{
}
return bVisible;
......@@ -122,7 +122,7 @@ ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
xLayoutManager->destroyElement( m_sResourceUrl );
}
}
catch( uno::Exception& )
catch(const uno::Exception&)
{
OSL_TRACE( "SetVisible get an exception\n" );
}
......
......@@ -157,7 +157,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
xDispatch->dispatch( aURL, uno::Sequence< beans::PropertyValue >() );
bUIClose = sal_True;
}
catch( uno::Exception& )
catch(const uno::Exception&)
{
}
......@@ -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
// 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.
try{
try
{
xCloseable->close(sal_True);
}
catch( util::CloseVetoException )
catch(const util::CloseVetoException&)
{
//close is cancelled, nothing to do
}
......@@ -193,7 +194,7 @@ VbaDocumentBase::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
{
xDisposable->dispose();
}
catch( uno::Exception& )
catch(const uno::Exception&)
{
}
}
......@@ -239,11 +240,11 @@ VbaDocumentBase::setSaved( sal_Bool bSave ) throw (uno::RuntimeException)
{
xModifiable->setModified( !bSave );
}
catch ( lang::DisposedException& )
catch (const lang::DisposedException&)
{
// 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() );
throw lang::WrappedTargetRuntimeException(
......@@ -289,7 +290,7 @@ VbaDocumentBase::getVBProject() throw (uno::RuntimeException)
mxVBProject = xServiceManager->createInstanceWithArgumentsAndContext(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.vbide.VBProject" ) ), aArgs, mxContext );
}
catch( uno::Exception& )
catch(const uno::Exception&)
{
}
return uno::Any( mxVBProject );
......
......@@ -220,7 +220,7 @@ ScVbaShapes::SelectAll() throw (uno::RuntimeException)
// viewuno.cxx ScTabViewObj::select will throw IllegalArgumentException
// if one of the shapes is no 'markable' e.g. a button
// the method still works
catch( lang::IllegalArgumentException& )
catch(const lang::IllegalArgumentException&)
{
}
}
......@@ -463,7 +463,7 @@ ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShap
{
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