summaryrefslogtreecommitdiff
path: root/sax/qa/cppunit
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 /sax/qa/cppunit
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 'sax/qa/cppunit')
-rw-r--r--sax/qa/cppunit/parser.cxx6
-rw-r--r--sax/qa/cppunit/xmlimport.cxx49
2 files changed, 20 insertions, 35 deletions
diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx
index c77277bcb456..83a7be3f2fda 100644
--- a/sax/qa/cppunit/parser.cxx
+++ b/sax/qa/cppunit/parser.cxx
@@ -28,13 +28,11 @@ class DummyTokenHandler : public cppu::WeakImplHelper< xml::sax::XFastTokenHandl
public:
DummyTokenHandler() {}
- virtual sal_Int32 SAL_CALL getTokenFromUTF8( const uno::Sequence<sal_Int8>& )
- throw (uno::RuntimeException, std::exception) override
+ virtual sal_Int32 SAL_CALL getTokenFromUTF8( const uno::Sequence<sal_Int8>& ) override
{
return FastToken::DONTKNOW;
}
- virtual uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 )
- throw (uno::RuntimeException, std::exception) override
+ virtual uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 ) override
{
CPPUNIT_ASSERT_MESSAGE( "getUTF8Identifier: unexpected call", false );
return uno::Sequence<sal_Int8>();
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index a5c66eb53704..8876a4aa01e7 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -87,14 +87,14 @@ public:
const OUString & getString() { return m_aStr; }
// XDocumentHandler
- virtual void SAL_CALL startDocument() throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endDocument() throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL startElement( const OUString& aName, const Reference< XAttributeList >& xAttribs ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endElement( const OUString& aName ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL characters( const OUString& aChars ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& xLocator ) throw (SAXException, RuntimeException, exception) override;
+ virtual void SAL_CALL startDocument() override;
+ virtual void SAL_CALL endDocument() override;
+ virtual void SAL_CALL startElement( const OUString& aName, const Reference< XAttributeList >& xAttribs ) override;
+ virtual void SAL_CALL endElement( const OUString& aName ) override;
+ virtual void SAL_CALL characters( const OUString& aChars ) override;
+ virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) override;
+ virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) override;
+ virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& xLocator ) override;
};
OUString TestDocumentHandler::canonicalform(const OUString &sName, const OUString &sValue, bool isElement)
@@ -139,7 +139,6 @@ OUString TestDocumentHandler::getNamespace(const OUString &sName)
}
void SAL_CALL TestDocumentHandler::startDocument()
- throw(SAXException, RuntimeException, exception)
{
m_aStr.clear();
m_aNamespaceStack.clear();
@@ -150,12 +149,10 @@ void SAL_CALL TestDocumentHandler::startDocument()
void SAL_CALL TestDocumentHandler::endDocument()
- throw(SAXException, RuntimeException, exception)
{
}
void SAL_CALL TestDocumentHandler::startElement( const OUString& aName, const Reference< XAttributeList >& xAttribs )
- throw( SAXException, RuntimeException, exception )
{
OUString sAttributes;
m_aCountStack.push(0);
@@ -172,7 +169,6 @@ void SAL_CALL TestDocumentHandler::startElement( const OUString& aName, const Re
void SAL_CALL TestDocumentHandler::endElement( const OUString& aName )
- throw( SAXException, RuntimeException, exception )
{
m_aStr = m_aStr + canonicalform(aName, "", true);
sal_uInt16 nPopQty = m_aCountStack.top();
@@ -183,27 +179,23 @@ void SAL_CALL TestDocumentHandler::endElement( const OUString& aName )
void SAL_CALL TestDocumentHandler::characters( const OUString& aChars )
- throw(SAXException, RuntimeException, exception)
{
m_aStr = m_aStr + aChars;
}
void SAL_CALL TestDocumentHandler::ignorableWhitespace( const OUString& aWhitespaces )
- throw(SAXException, RuntimeException, exception)
{
m_aStr = m_aStr + aWhitespaces;
}
void SAL_CALL TestDocumentHandler::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ )
- throw(SAXException, RuntimeException, exception)
{
}
void SAL_CALL TestDocumentHandler::setDocumentLocator( const Reference< XLocator >& /*xLocator*/ )
- throw(SAXException, RuntimeException, exception)
{
}
@@ -213,14 +205,14 @@ public:
NSDocumentHandler() {}
// XDocumentHandler
- virtual void SAL_CALL startDocument() throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL endDocument() throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL startElement( const OUString& aName, const Reference< XAttributeList >& xAttribs ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endElement( const OUString& /* aName */ ) throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL characters( const OUString& /* aChars */ ) throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL ignorableWhitespace( const OUString& /* aWhitespaces */ ) throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL processingInstruction( const OUString& /* aTarget */, const OUString& /* aData */ ) throw (SAXException, RuntimeException, exception) override {}
- virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& /* xLocator */ ) throw (SAXException, RuntimeException, exception) override {}
+ virtual void SAL_CALL startDocument() override {}
+ virtual void SAL_CALL endDocument() override {}
+ virtual void SAL_CALL startElement( const OUString& aName, const Reference< XAttributeList >& xAttribs ) override;
+ virtual void SAL_CALL endElement( const OUString& /* aName */ ) override {}
+ virtual void SAL_CALL characters( const OUString& /* aChars */ ) override {}
+ virtual void SAL_CALL ignorableWhitespace( const OUString& /* aWhitespaces */ ) override {}
+ virtual void SAL_CALL processingInstruction( const OUString& /* aTarget */, const OUString& /* aData */ ) override {}
+ virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& /* xLocator */ ) override {}
};
OUString getNamespaceValue( const OUString& rNamespacePrefix )
@@ -252,7 +244,6 @@ OUString resolveNamespace( const OUString& aName )
}
void SAL_CALL NSDocumentHandler::startElement( const OUString& aName, const Reference< XAttributeList >&/* xAttribs */ )
- throw( SAXException, RuntimeException, exception )
{
if (! (aName == "office:document" || aName == "office:body" || aName == "office:text" ||
aName == "text:p" || aName == "note:p") )
@@ -275,10 +266,8 @@ public:
const static OString namespacePrefixes[];
// XFastTokenHandler
- virtual Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 nToken )
- throw (css::uno::RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier )
- throw (css::uno::RuntimeException, std::exception) override;
+ virtual Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 nToken ) override;
+ virtual sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier ) override;
//FastTokenHandlerBase
virtual sal_Int32 getTokenDirect( const char *pToken, sal_Int32 nLength ) const override;
};
@@ -294,7 +283,6 @@ const OUStringLiteral DummyTokenHandler::namespaceURIs[] = { "http://www.w3.org/
const OString DummyTokenHandler::namespacePrefixes[] = { "", "w", "Player" };
Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken )
- throw (uno::RuntimeException, std::exception)
{
OString aUtf8Token;
if ( ( ( nToken & 0xffff0000 ) != 0 ) ) //namespace
@@ -315,7 +303,6 @@ Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken )
}
sal_Int32 DummyTokenHandler::getTokenFromUTF8( const uno::Sequence< sal_Int8 >& rIdentifier )
- throw (uno::RuntimeException, std::exception)
{
return getTokenDirect( reinterpret_cast< const char* >(
rIdentifier.getConstArray() ), rIdentifier.getLength() );