summaryrefslogtreecommitdiff
path: root/ucbhelper/source/client/content.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 /ucbhelper/source/client/content.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 'ucbhelper/source/client/content.cxx')
-rw-r--r--ucbhelper/source/client/content.cxx66
1 files changed, 8 insertions, 58 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 5f723e62cfb4..d1e7feb3b6dc 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -80,22 +80,16 @@ class EmptyInputStream : public ::cppu::WeakImplHelper< XInputStream >
{
public:
virtual sal_Int32 SAL_CALL readBytes(
- Sequence< sal_Int8 > & data, sal_Int32 nBytesToRead )
- throw (IOException, RuntimeException, std::exception) override;
+ Sequence< sal_Int8 > & data, sal_Int32 nBytesToRead ) override;
virtual sal_Int32 SAL_CALL readSomeBytes(
- Sequence< sal_Int8 > & data, sal_Int32 nMaxBytesToRead )
- throw (IOException, RuntimeException, std::exception) override;
- virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip )
- throw (IOException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL available()
- throw (IOException, RuntimeException, std::exception) override;
- virtual void SAL_CALL closeInput()
- throw (IOException, RuntimeException, std::exception) override;
+ Sequence< sal_Int8 > & data, 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;
};
sal_Int32 EmptyInputStream::readBytes(
Sequence< sal_Int8 > & data, sal_Int32 )
- throw (IOException, RuntimeException, std::exception)
{
data.realloc( 0 );
return 0;
@@ -103,25 +97,21 @@ sal_Int32 EmptyInputStream::readBytes(
sal_Int32 EmptyInputStream::readSomeBytes(
Sequence< sal_Int8 > & data, sal_Int32 )
- throw (IOException, RuntimeException, std::exception)
{
data.realloc( 0 );
return 0;
}
void EmptyInputStream::skipBytes( sal_Int32 )
- throw (IOException, RuntimeException, std::exception)
{
}
sal_Int32 EmptyInputStream::available()
- throw (IOException, RuntimeException, std::exception)
{
return 0;
}
void EmptyInputStream::closeInput()
- throw (IOException, RuntimeException, std::exception)
{
}
@@ -139,20 +129,17 @@ public:
: m_rContent( rContent ) {}
// XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
- throw( css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
virtual void SAL_CALL acquire()
throw() override;
virtual void SAL_CALL release()
throw() override;
// XContentEventListener
- virtual void SAL_CALL contentEvent( const ContentEvent& evt )
- throw( RuntimeException, std::exception ) override;
+ virtual void SAL_CALL contentEvent( const ContentEvent& evt ) override;
// XEventListener ( base of XContentEventListener )
- virtual void SAL_CALL disposing( const EventObject& Source )
- throw( RuntimeException, std::exception ) override;
+ virtual void SAL_CALL disposing( const EventObject& Source ) override;
};
@@ -205,7 +192,6 @@ public:
/// @throws RuntimeException
static void ensureContentProviderForURL( const Reference< XUniversalContentBroker >& rBroker,
const OUString & rURL )
- throw ( ContentCreationException, RuntimeException )
{
Reference< XContentProvider > xProv
= rBroker->queryContentProvider( rURL );
@@ -223,7 +209,6 @@ static void ensureContentProviderForURL( const Reference< XUniversalContentBroke
static Reference< XContentIdentifier > getContentIdentifierThrow(
const Reference< XUniversalContentBroker > & rBroker,
const OUString & rURL)
- throw (ContentCreationException, RuntimeException)
{
Reference< XContentIdentifier > xId
= rBroker->createContentIdentifier( rURL );
@@ -245,7 +230,6 @@ static Reference< XContentIdentifier > getContentIdentifierThrow(
static Reference< XContentIdentifier > getContentIdentifierNoThrow(
const Reference< XUniversalContentBroker > & rBroker,
const OUString & rURL)
- throw (RuntimeException)
{
return rBroker->createContentIdentifier(rURL);
}
@@ -255,7 +239,6 @@ static Reference< XContentIdentifier > getContentIdentifierNoThrow(
static Reference< XContent > getContentThrow(
const Reference< XUniversalContentBroker > & rBroker,
const Reference< XContentIdentifier > & xId)
- throw ( ContentCreationException, RuntimeException )
{
Reference< XContent > xContent;
OUString msg;
@@ -286,7 +269,6 @@ static Reference< XContent > getContentThrow(
static Reference< XContent > getContentNoThrow(
const Reference< XUniversalContentBroker > & rBroker,
const Reference< XContentIdentifier > & xId)
- throw ( RuntimeException )
{
Reference< XContent > xContent;
try
@@ -314,7 +296,6 @@ Content::Content()
Content::Content( const OUString& rURL,
const Reference< XCommandEnvironment >& rEnv,
const Reference< XComponentContext >& rCtx )
- throw ( ContentCreationException, RuntimeException )
{
Reference< XUniversalContentBroker > pBroker(
UniversalContentBroker::create( rCtx ) );
@@ -331,7 +312,6 @@ Content::Content( const OUString& rURL,
Content::Content( const Reference< XContent >& rContent,
const Reference< XCommandEnvironment >& rEnv,
const Reference< XComponentContext >& rCtx )
- throw ( ContentCreationException, RuntimeException )
{
m_xImpl = new Content_Impl( rCtx, rContent, rEnv );
}
@@ -415,7 +395,6 @@ void Content::setCommandEnvironment(
Reference< XCommandInfo > Content::getCommands()
- throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
aCommand.Name = "getCommandInfo";
@@ -431,7 +410,6 @@ Reference< XCommandInfo > Content::getCommands()
Reference< XPropertySetInfo > Content::getProperties()
- throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
aCommand.Name = "getPropertySetInfo";
@@ -447,7 +425,6 @@ Reference< XPropertySetInfo > Content::getProperties()
Any Content::getPropertyValue( const OUString& rPropertyName )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Sequence<OUString> aNames { rPropertyName };
@@ -458,7 +435,6 @@ Any Content::getPropertyValue( const OUString& rPropertyName )
Any Content::setPropertyValue( const OUString& rName,
const Any& rValue )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Sequence<OUString> aNames { rName };
@@ -472,7 +448,6 @@ Any Content::setPropertyValue( const OUString& rName,
Sequence< Any > Content::getPropertyValues(
const Sequence< OUString >& rPropertyNames )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Reference< XRow > xRow = getPropertyValuesInterface( rPropertyNames );
@@ -493,7 +468,6 @@ Sequence< Any > Content::getPropertyValues(
Reference< XRow > Content::getPropertyValuesInterface(
const Sequence< OUString >& rPropertyNames )
- throw( CommandAbortedException, RuntimeException, Exception )
{
sal_Int32 nCount = rPropertyNames.getLength();
Sequence< Property > aProps( nCount );
@@ -527,7 +501,6 @@ Reference< XRow > Content::getPropertyValuesInterface(
Sequence< Any > Content::setPropertyValues(
const Sequence< OUString >& rPropertyNames,
const Sequence< Any >& rValues )
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( rPropertyNames.getLength() != rValues.getLength() )
{
@@ -574,7 +547,6 @@ Sequence< Any > Content::setPropertyValues(
Any Content::executeCommand( const OUString& rCommandName,
const Any& rCommandArgument )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
aCommand.Name = rCommandName;
@@ -587,7 +559,6 @@ Any Content::executeCommand( const OUString& rCommandName,
Any Content::createCursorAny( const Sequence< OUString >& rPropertyNames,
ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
{
sal_Int32 nCount = rPropertyNames.getLength();
Sequence< Property > aProps( nCount );
@@ -621,7 +592,6 @@ Any Content::createCursorAny( const Sequence< OUString >& rPropertyNames,
Reference< XResultSet > Content::createCursor(
const Sequence< OUString >& rPropertyNames,
ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Any aCursorAny = createCursorAny( rPropertyNames, eMode );
@@ -651,7 +621,6 @@ Reference< XResultSet > Content::createCursor(
Reference< XDynamicResultSet > Content::createDynamicCursor(
const Sequence< OUString >& rPropertyNames,
ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Reference< XDynamicResultSet > aResult;
createCursorAny( rPropertyNames, eMode ) >>= aResult;
@@ -667,7 +636,6 @@ Reference< XResultSet > Content::createSortedCursor(
const Sequence< NumberedSortingInfo >& rSortInfo,
const Reference< XAnyCompareFactory >& rAnyCompareFactory,
ResultSetInclude eMode )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Reference< XResultSet > aResult;
Reference< XDynamicResultSet > aDynSet;
@@ -715,7 +683,6 @@ Reference< XResultSet > Content::createSortedCursor(
Reference< XInputStream > Content::openStream()
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return Reference< XInputStream >();
@@ -740,7 +707,6 @@ Reference< XInputStream > Content::openStream()
Reference< XInputStream > Content::openStreamNoLock()
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return Reference< XInputStream >();
@@ -765,7 +731,6 @@ Reference< XInputStream > Content::openStreamNoLock()
Reference< XStream > Content::openWriteableStream()
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return Reference< XStream >();
@@ -790,7 +755,6 @@ Reference< XStream > Content::openWriteableStream()
Reference< XStream > Content::openWriteableStreamNoLock()
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return Reference< XStream >();
@@ -815,7 +779,6 @@ Reference< XStream > Content::openWriteableStreamNoLock()
bool Content::openStream( const Reference< XActiveDataSink >& rSink )
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return false;
@@ -838,7 +801,6 @@ bool Content::openStream( const Reference< XActiveDataSink >& rSink )
bool Content::openStream( const Reference< XOutputStream >& rStream )
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
return false;
@@ -862,7 +824,6 @@ bool Content::openStream( const Reference< XOutputStream >& rStream )
void Content::writeStream( const Reference< XInputStream >& rStream,
bool bReplaceExisting )
- throw( CommandAbortedException, RuntimeException, Exception )
{
InsertCommandArgument aArg;
aArg.Data = rStream.is() ? rStream : new EmptyInputStream;
@@ -880,7 +841,6 @@ void Content::writeStream( const Reference< XInputStream >& rStream,
Sequence< ContentInfo > Content::queryCreatableContentsInfo()
- throw( CommandAbortedException, RuntimeException, Exception )
{
// First, try it using "CreatableContentsInfo" property -> the "new" way.
Sequence< ContentInfo > aInfo;
@@ -904,7 +864,6 @@ bool Content::insertNewContent( const OUString& rContentType,
rPropertyNames,
const Sequence< Any >& rPropertyValues,
Content& rNewContent )
- throw( CommandAbortedException, RuntimeException, Exception )
{
return insertNewContent( rContentType,
rPropertyNames,
@@ -920,7 +879,6 @@ bool Content::insertNewContent( const OUString& rContentType,
const Sequence< Any >& rPropertyValues,
const Reference< XInputStream >& rData,
Content& rNewContent )
- throw( CommandAbortedException, RuntimeException, Exception )
{
if ( rContentType.isEmpty() )
return false;
@@ -987,7 +945,6 @@ bool Content::transferContent( const Content& rSourceContent,
const OUString & rVersionComment,
OUString* pResultURL,
const OUString & rDocumentId )
- throw( CommandAbortedException, RuntimeException, Exception )
{
Reference< XUniversalContentBroker > pBroker(
UniversalContentBroker::create( m_xImpl->getComponentContext() ) );
@@ -1048,7 +1005,6 @@ bool Content::transferContent( const Content& rSourceContent,
bool Content::isFolder()
- throw( CommandAbortedException, RuntimeException, Exception )
{
bool bFolder = false;
if ( getPropertyValue("IsFolder")
@@ -1073,7 +1029,6 @@ bool Content::isFolder()
SAL_WNOUNREACHABLE_CODE_PUSH
bool Content::isDocument()
- throw( CommandAbortedException, RuntimeException, Exception )
{
bool bDoc = false;
if ( getPropertyValue("IsDocument")
@@ -1095,7 +1050,6 @@ bool Content::isDocument()
SAL_WNOUNREACHABLE_CODE_POP
void Content::lock()
- throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
aCommand.Name = "lock";
@@ -1106,7 +1060,6 @@ void Content::lock()
}
void Content::unlock()
- throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
@@ -1353,7 +1306,6 @@ void SAL_CALL ContentEventListener_Impl::release()
}
css::uno::Any SAL_CALL ContentEventListener_Impl::queryInterface( const css::uno::Type & rType )
- throw( css::uno::RuntimeException, std::exception )
{
css::uno::Any aRet = cppu::queryInterface( rType,
(static_cast< XContentEventListener* >(this)),
@@ -1367,7 +1319,6 @@ css::uno::Any SAL_CALL ContentEventListener_Impl::queryInterface( const css::uno
// virtual
void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt )
- throw( RuntimeException, std::exception )
{
if ( evt.Source == m_rContent.m_xContent )
{
@@ -1393,7 +1344,6 @@ void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt )
// virtual
void SAL_CALL ContentEventListener_Impl::disposing( const EventObject& Source )
- throw( RuntimeException, std::exception )
{
m_rContent.disposing(Source);
}