summaryrefslogtreecommitdiff
path: root/svx/source/xml
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 /svx/source/xml
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 'svx/source/xml')
-rw-r--r--svx/source/xml/xmleohlp.cxx15
-rw-r--r--svx/source/xml/xmlgrhlp.cxx63
-rw-r--r--svx/source/xml/xmlxtexp.cxx1
3 files changed, 21 insertions, 58 deletions
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 432a786f5b56..3b6af7b87fa4 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -75,9 +75,9 @@ public:
OutputStorageWrapper_Impl();
// css::io::XOutputStream
- virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
- virtual void SAL_CALL flush() throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
- virtual void SAL_CALL closeOutput() throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override;
+ virtual void SAL_CALL flush() override;
+ virtual void SAL_CALL closeOutput() override;
SvStream* GetStream();
};
@@ -100,21 +100,18 @@ SvStream *OutputStorageWrapper_Impl::GetStream()
void SAL_CALL OutputStorageWrapper_Impl::writeBytes(
const Sequence< sal_Int8 >& aData)
- throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
xOut->writeBytes( aData );
}
void SAL_CALL OutputStorageWrapper_Impl::flush()
- throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
xOut->flush();
}
void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
- throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
xOut->closeOutput();
@@ -588,7 +585,6 @@ void SvXMLEmbeddedObjectHelper::Destroy(
// XGraphicObjectResolver: alien objects!
OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUString& rURL)
- throw(RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
@@ -613,7 +609,6 @@ OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUSt
// XNameAccess: alien objects!
Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
const OUString& rURLStr )
- throw (NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
Any aRet;
@@ -711,13 +706,11 @@ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
}
Sequence< OUString > SAL_CALL SvXMLEmbeddedObjectHelper::getElementNames()
- throw (RuntimeException, std::exception)
{
return Sequence< OUString >(0);
}
sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr )
- throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
@@ -740,7 +733,6 @@ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr
// XNameAccess
Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
- throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
@@ -750,7 +742,6 @@ Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
}
sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasElements()
- throw (RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 4ef3bfe43dff..bb922a2b2cbd 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -75,11 +75,11 @@ class SvXMLGraphicInputStream:
{
private:
- virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
- virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL available() throw(NotConnectedException, RuntimeException, std::exception) override;
- virtual void SAL_CALL closeInput() throw(NotConnectedException, RuntimeException, std::exception) override;
+ virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override;
+ virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override;
+ virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override;
+ virtual sal_Int32 SAL_CALL available() override;
+ virtual void SAL_CALL closeInput() override;
private:
@@ -151,7 +151,6 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
}
sal_Int32 SAL_CALL SvXMLGraphicInputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
- throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException();
@@ -160,7 +159,6 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readBytes( Sequence< sal_Int8 >& rDa
}
sal_Int32 SAL_CALL SvXMLGraphicInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
- throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -169,7 +167,6 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readSomeBytes( Sequence< sal_Int8 >&
}
void SAL_CALL SvXMLGraphicInputStream::skipBytes( sal_Int32 nBytesToSkip )
- throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -177,7 +174,7 @@ void SAL_CALL SvXMLGraphicInputStream::skipBytes( sal_Int32 nBytesToSkip )
mxStmWrapper->skipBytes( nBytesToSkip );
}
-sal_Int32 SAL_CALL SvXMLGraphicInputStream::available() throw( NotConnectedException, RuntimeException, std::exception )
+sal_Int32 SAL_CALL SvXMLGraphicInputStream::available()
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -185,7 +182,7 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::available() throw( NotConnectedExcep
return mxStmWrapper->available();
}
-void SAL_CALL SvXMLGraphicInputStream::closeInput() throw( NotConnectedException, RuntimeException, std::exception )
+void SAL_CALL SvXMLGraphicInputStream::closeInput()
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -199,9 +196,9 @@ class SvXMLGraphicOutputStream:
private:
// XOutputStream
- virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& rData ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override;
- virtual void SAL_CALL flush() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override;
- virtual void SAL_CALL closeOutput() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override;
+ virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& rData ) override;
+ virtual void SAL_CALL flush() override;
+ virtual void SAL_CALL closeOutput() override;
private:
@@ -242,7 +239,6 @@ SvXMLGraphicOutputStream::~SvXMLGraphicOutputStream()
}
void SAL_CALL SvXMLGraphicOutputStream::writeBytes( const Sequence< sal_Int8 >& rData )
- throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -251,7 +247,6 @@ void SAL_CALL SvXMLGraphicOutputStream::writeBytes( const Sequence< sal_Int8 >&
}
void SAL_CALL SvXMLGraphicOutputStream::flush()
- throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -260,7 +255,6 @@ void SAL_CALL SvXMLGraphicOutputStream::flush()
}
void SAL_CALL SvXMLGraphicOutputStream::closeOutput()
- throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception )
{
if( !mxStmWrapper.is() )
throw NotConnectedException() ;
@@ -799,7 +793,6 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper )
// XGraphicObjectResolver
OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const OUString& rURL )
- throw(uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( maMutex );
const sal_Int32 nIndex = maGrfURLs.size();
@@ -843,7 +836,6 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const OUString& r
// XBinaryStreamResolver
Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream( const OUString& rURL )
- throw( RuntimeException, std::exception )
{
Reference< XInputStream > xRet;
OUString aPictureStorageName, aGraphicId;
@@ -864,7 +856,6 @@ Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream( const OUS
}
Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream()
- throw( RuntimeException, std::exception )
{
Reference< XOutputStream > xRet;
@@ -882,7 +873,6 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream()
}
OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOutputStream >& rxBinaryStream )
- throw( RuntimeException, std::exception )
{
OUString aRet;
@@ -947,29 +937,20 @@ protected:
// ____ XInitialization ____
// one argument is allowed, which is the XStorage
- virtual void SAL_CALL initialize( const Sequence< Any >& aArguments )
- throw (Exception,
- RuntimeException, std::exception) override;
+ virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) override;
// ____ XGraphicObjectResolver ____
- virtual OUString SAL_CALL resolveGraphicObjectURL( const OUString& aURL )
- throw (RuntimeException, std::exception) override;
+ virtual OUString SAL_CALL resolveGraphicObjectURL( const OUString& aURL ) override;
// ____ XBinaryStreamResolver ____
- virtual Reference< io::XInputStream > SAL_CALL getInputStream( const OUString& aURL )
- throw (RuntimeException, std::exception) override;
- virtual Reference< io::XOutputStream > SAL_CALL createOutputStream()
- throw (RuntimeException, std::exception) override;
- virtual OUString SAL_CALL resolveOutputStream( const Reference< io::XOutputStream >& aBinaryStream )
- throw (RuntimeException, std::exception) override;
+ virtual Reference< io::XInputStream > SAL_CALL getInputStream( const OUString& aURL ) override;
+ virtual Reference< io::XOutputStream > SAL_CALL createOutputStream() override;
+ virtual OUString SAL_CALL resolveOutputStream( const Reference< io::XOutputStream >& aBinaryStream ) override;
// ____ XServiceInfo ____
- virtual OUString SAL_CALL getImplementationName()
- throw (RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
- throw (RuntimeException, std::exception) override;
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw (RuntimeException, std::exception) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
private:
SvXMLGraphicHelperMode m_eGraphicHelperMode;
@@ -995,7 +976,6 @@ void SAL_CALL SvXMLGraphicImportExportHelper::disposing()
// ____ XInitialization ____
void SAL_CALL SvXMLGraphicImportExportHelper::initialize(
const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException, std::exception)
{
Reference< embed::XStorage > xStorage;
if( aArguments.getLength() > 0 )
@@ -1011,7 +991,6 @@ void SAL_CALL SvXMLGraphicImportExportHelper::initialize(
// ____ XGraphicObjectResolver ____
OUString SAL_CALL SvXMLGraphicImportExportHelper::resolveGraphicObjectURL( const OUString& aURL )
- throw (uno::RuntimeException, std::exception)
{
return m_xGraphicObjectResolver->resolveGraphicObjectURL( aURL );
}
@@ -1019,24 +998,20 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::resolveGraphicObjectURL( const
// ____ XBinaryStreamResolver ____
Reference< io::XInputStream > SAL_CALL SvXMLGraphicImportExportHelper::getInputStream( const OUString& aURL )
- throw (uno::RuntimeException, std::exception)
{
return m_xBinaryStreamResolver->getInputStream( aURL );
}
Reference< io::XOutputStream > SAL_CALL SvXMLGraphicImportExportHelper::createOutputStream()
- throw (uno::RuntimeException, std::exception)
{
return m_xBinaryStreamResolver->createOutputStream();
}
OUString SAL_CALL SvXMLGraphicImportExportHelper::resolveOutputStream( const Reference< io::XOutputStream >& aBinaryStream )
- throw (uno::RuntimeException, std::exception)
{
return m_xBinaryStreamResolver->resolveOutputStream( aBinaryStream );
}
// ____ XServiceInfo ____
OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName()
- throw (uno::RuntimeException, std::exception)
{
if( m_eGraphicHelperMode == SvXMLGraphicHelperMode::Read )
return OUString("com.sun.star.comp.Svx.GraphicImportHelper");
@@ -1044,13 +1019,11 @@ OUString SAL_CALL SvXMLGraphicImportExportHelper::getImplementationName()
}
sal_Bool SAL_CALL SvXMLGraphicImportExportHelper::supportsService( const OUString& ServiceName )
- throw (uno::RuntimeException, std::exception)
{
return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServiceNames()
- throw (uno::RuntimeException, std::exception)
{
// XGraphicObjectResolver and XBinaryStreamResolver are not part of any service
Sequence< OUString > aSupportedServiceNames( 2 );
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 23391317e81f..62732b87671d 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -195,7 +195,6 @@ bool SvxXMLXTableExportComponent::save(
const uno::Reference<container::XNameContainer >& xTable,
const uno::Reference<embed::XStorage >& xStorage,
OUString *pOptName )
- throw (css::uno::RuntimeException, std::exception)
{
bool bRet = false;
SfxMedium* pMedium = nullptr;