summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba/vbafield.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-26 12:28:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-26 12:54:43 +0000
commite57ca02849c3d87142ff5ff9099a212e72b8139c (patch)
treebcce66b27261553c308779f3e8663a269ed3a671 /sw/source/ui/vba/vbafield.cxx
parent8802ebd5172ec4bc412a59d136c82b77ab452281 (diff)
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/ui/vba/vbafield.cxx')
-rw-r--r--sw/source/ui/vba/vbafield.cxx31
1 files changed, 15 insertions, 16 deletions
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index af1e1be2d9f7..ae340194c406 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -35,12 +35,12 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< css::text::XTextField >& xTextField) throw ( uno::RuntimeException ) : SwVbaField_BASE( rParent, rContext )
+SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< css::text::XTextField >& xTextField) : SwVbaField_BASE( rParent, rContext )
{
mxTextField.set( xTextField, uno::UNO_QUERY_THROW );
}
-sal_Bool SAL_CALL SwVbaField::Update() throw (uno::RuntimeException, std::exception)
+sal_Bool SAL_CALL SwVbaField::Update()
{
uno::Reference< util::XUpdatable > xUpdatable( mxTextField, uno::UNO_QUERY );
if( xUpdatable.is() )
@@ -234,11 +234,11 @@ public:
FieldEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XEnumeration >& xEnumeration ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxEnumeration( xEnumeration )
{
}
- virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override
+ virtual sal_Bool SAL_CALL hasMoreElements( ) override
{
return mxEnumeration->hasMoreElements();
}
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override
+ virtual uno::Any SAL_CALL nextElement( ) override
{
if ( !hasMoreElements() )
throw container::NoSuchElementException();
@@ -255,16 +255,16 @@ class FieldCollectionHelper : public ::cppu::WeakImplHelper< container::XIndexAc
uno::Reference< container::XEnumerationAccess > mxEnumerationAccess;
public:
/// @throws css::uno::RuntimeException
- FieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) throw (css::uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
+ FieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
{
uno::Reference< text::XTextFieldsSupplier > xSupp( xModel, uno::UNO_QUERY_THROW );
mxEnumerationAccess.set( xSupp->getTextFields(), uno::UNO_QUERY_THROW );
}
// XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override { return mxEnumerationAccess->getElementType(); }
- virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override { return mxEnumerationAccess->hasElements(); }
+ virtual uno::Type SAL_CALL getElementType( ) override { return mxEnumerationAccess->getElementType(); }
+ virtual sal_Bool SAL_CALL hasElements( ) override { return mxEnumerationAccess->hasElements(); }
// XIndexAccess
- virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override
+ virtual ::sal_Int32 SAL_CALL getCount( ) override
{
uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
sal_Int32 nCount = 0;
@@ -275,7 +275,7 @@ public:
}
return nCount;
}
- virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception ) override
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override
{
if( Index < 0 || Index >= getCount() )
throw lang::IndexOutOfBoundsException();
@@ -293,7 +293,7 @@ public:
throw lang::IndexOutOfBoundsException();
}
// XEnumerationAccess
- virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException, std::exception) override
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override
{
uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
return uno::Reference< container::XEnumeration >( new FieldEnumeration( mxParent, mxContext, mxModel, xEnumeration ) );
@@ -306,7 +306,7 @@ SwVbaFields::SwVbaFields( const uno::Reference< XHelperInterface >& xParent, con
}
uno::Reference< word::XField > SAL_CALL
-SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& /*PreserveFormatting*/ ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception)
+SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& /*PreserveFormatting*/ )
{
sal_Int32 nType = word::WdFieldType::wdFieldEmpty;
Type >>= nType;
@@ -343,7 +343,6 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
}
uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUString& _text )
- throw (uno::RuntimeException, script::BasicErrorException)
{
uno::Reference< text::XTextField > xTextField( mxMSF->createInstance("com.sun.star.text.TextField.FileName"), uno::UNO_QUERY_THROW );
sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
@@ -412,7 +411,7 @@ static const DocPropertyTable aDocPropertyTables[] =
{ nullptr, nullptr }
};
-uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString& _text ) throw (uno::RuntimeException)
+uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString& _text )
{
OUString aDocProperty;
SwVbaReadFieldParams aReadParam( _text );
@@ -473,7 +472,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
}
uno::Reference< container::XEnumeration > SAL_CALL
-SwVbaFields::createEnumeration() throw (uno::RuntimeException)
+SwVbaFields::createEnumeration()
{
uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
return xEnumerationAccess->createEnumeration();
@@ -486,7 +485,7 @@ SwVbaFields::createCollectionObject( const uno::Any& aSource )
return lcl_createField( mxParent, mxContext, mxModel, aSource );
}
-sal_Int32 SAL_CALL SwVbaFields::Update() throw (uno::RuntimeException, std::exception)
+sal_Int32 SAL_CALL SwVbaFields::Update()
{
sal_Int32 nUpdate = 1;
try
@@ -512,7 +511,7 @@ SwVbaFields::getServiceImplName()
// XEnumerationAccess
uno::Type SAL_CALL
-SwVbaFields::getElementType() throw (uno::RuntimeException)
+SwVbaFields::getElementType()
{
return cppu::UnoType<word::XField>::get();
}