diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-25 21:31:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-26 18:22:20 +0100 |
commit | 5e21a413c788f839a66d9e4c14e745ed18058db8 (patch) | |
tree | d4451246461346a425ad6f796e08bf1514cdd942 /sax/source/expatwrap | |
parent | 6fc2bd0094a23aafadeef3f4a8c2803d621a588d (diff) |
cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
Diffstat (limited to 'sax/source/expatwrap')
-rw-r--r-- | sax/source/expatwrap/attrlistimpl.cxx | 14 | ||||
-rw-r--r-- | sax/source/expatwrap/attrlistimpl.hxx | 14 | ||||
-rw-r--r-- | sax/source/expatwrap/sax_expat.cxx | 54 | ||||
-rw-r--r-- | sax/source/expatwrap/saxwriter.cxx | 68 |
4 files changed, 75 insertions, 75 deletions
diff --git a/sax/source/expatwrap/attrlistimpl.cxx b/sax/source/expatwrap/attrlistimpl.cxx index dc626c60c08c..b06e54e8d3ca 100644 --- a/sax/source/expatwrap/attrlistimpl.cxx +++ b/sax/source/expatwrap/attrlistimpl.cxx @@ -60,7 +60,7 @@ struct AttributeList_impl -sal_Int16 AttributeList::getLength(void) throw (RuntimeException) +sal_Int16 AttributeList::getLength(void) throw (RuntimeException, std::exception) { return static_cast<sal_Int16>(m_pImpl->vecAttribute.size()); } @@ -73,7 +73,7 @@ AttributeList::AttributeList( const AttributeList &r ) : *m_pImpl = *(r.m_pImpl); } -OUString AttributeList::getNameByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getNameByIndex(sal_Int16 i) throw (RuntimeException, std::exception) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sName; @@ -82,7 +82,7 @@ OUString AttributeList::getNameByIndex(sal_Int16 i) throw (RuntimeException) } -OUString AttributeList::getTypeByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getTypeByIndex(sal_Int16 i) throw (RuntimeException, std::exception) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sType; @@ -90,7 +90,7 @@ OUString AttributeList::getTypeByIndex(sal_Int16 i) throw (RuntimeException) return OUString(); } -OUString AttributeList::getValueByIndex(sal_Int16 i) throw (RuntimeException) +OUString AttributeList::getValueByIndex(sal_Int16 i) throw (RuntimeException, std::exception) { if( std::vector< TagAttribute >::size_type(i) < m_pImpl->vecAttribute.size() ) { return m_pImpl->vecAttribute[i].sValue; @@ -99,7 +99,7 @@ OUString AttributeList::getValueByIndex(sal_Int16 i) throw (RuntimeException) } -OUString AttributeList::getTypeByName( const OUString& sName ) throw (RuntimeException) +OUString AttributeList::getTypeByName( const OUString& sName ) throw (RuntimeException, std::exception) { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); @@ -113,7 +113,7 @@ OUString AttributeList::getTypeByName( const OUString& sName ) throw (RuntimeExc return OUString(); } -OUString AttributeList::getValueByName(const OUString& sName) throw (RuntimeException) +OUString AttributeList::getValueByName(const OUString& sName) throw (RuntimeException, std::exception) { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); @@ -128,7 +128,7 @@ OUString AttributeList::getValueByName(const OUString& sName) throw (RuntimeExce } -Reference< XCloneable > AttributeList::createClone() throw (RuntimeException) +Reference< XCloneable > AttributeList::createClone() throw (RuntimeException, std::exception) { AttributeList *p = new AttributeList( *this ); return Reference< XCloneable > ( (XCloneable * ) p ); diff --git a/sax/source/expatwrap/attrlistimpl.hxx b/sax/source/expatwrap/attrlistimpl.hxx index 2828651ad19a..7661684022ad 100644 --- a/sax/source/expatwrap/attrlistimpl.hxx +++ b/sax/source/expatwrap/attrlistimpl.hxx @@ -48,21 +48,21 @@ public: public: // XAttributeList virtual sal_Int16 SAL_CALL getLength(void) - throw(::com::sun::star::uno::RuntimeException); + throw(::com::sun::star::uno::RuntimeException, std::exception); virtual OUString SAL_CALL getNameByIndex(sal_Int16 i) - throw(::com::sun::star::uno::RuntimeException); + throw(::com::sun::star::uno::RuntimeException, std::exception); virtual OUString SAL_CALL getTypeByIndex(sal_Int16 i) - throw(::com::sun::star::uno::RuntimeException); + throw(::com::sun::star::uno::RuntimeException, std::exception); virtual OUString SAL_CALL getTypeByName(const OUString& aName) - throw(::com::sun::star::uno::RuntimeException); + throw(::com::sun::star::uno::RuntimeException, std::exception); virtual OUString SAL_CALL getValueByIndex(sal_Int16 i) - throw(::com::sun::star::uno::RuntimeException); + throw(::com::sun::star::uno::RuntimeException, std::exception); virtual OUString SAL_CALL getValueByName(const OUString& aName) - throw( ::com::sun::star::uno::RuntimeException); + throw( ::com::sun::star::uno::RuntimeException, std::exception); // XCloneable virtual ::com::sun::star::uno::Reference< XCloneable > SAL_CALL - createClone() throw(::com::sun::star::uno::RuntimeException); + createClone() throw(::com::sun::star::uno::RuntimeException, std::exception); private: struct AttributeList_impl *m_pImpl; diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index f19305f5ae28..a262d2a896c9 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -145,29 +145,29 @@ public: // ::com::sun::star::lang::XInitialization: virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments) - throw (css::uno::RuntimeException, css::uno::Exception); + throw (css::uno::RuntimeException, css::uno::Exception, std::exception); // The SAX-Parser-Interface virtual void SAL_CALL parseStream( const InputSource& structSource) throw ( SAXException, IOException, - css::uno::RuntimeException); + css::uno::RuntimeException, std::exception); virtual void SAL_CALL setDocumentHandler(const css::uno::Reference< XDocumentHandler > & xHandler) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual void SAL_CALL setErrorHandler(const css::uno::Reference< XErrorHandler > & xHandler) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual void SAL_CALL setDTDHandler(const css::uno::Reference < XDTDHandler > & xHandler) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); virtual void SAL_CALL setEntityResolver(const css::uno::Reference< XEntityResolver >& xResolver) - throw (css::uno::RuntimeException); + throw (css::uno::RuntimeException, std::exception); - virtual void SAL_CALL setLocale( const Locale &locale ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocale( const Locale &locale ) throw (css::uno::RuntimeException, std::exception); public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (); - css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw (); - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (); + OUString SAL_CALL getImplementationName() throw (std::exception); + css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw (std::exception); + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception); private: @@ -363,33 +363,33 @@ public: } public: //XLocator - virtual sal_Int32 SAL_CALL getColumnNumber(void) throw () + virtual sal_Int32 SAL_CALL getColumnNumber(void) throw (std::exception) { return XML_GetCurrentColumnNumber( m_pParser->getEntity().pParser ); } - virtual sal_Int32 SAL_CALL getLineNumber(void) throw () + virtual sal_Int32 SAL_CALL getLineNumber(void) throw (std::exception) { return XML_GetCurrentLineNumber( m_pParser->getEntity().pParser ); } - virtual OUString SAL_CALL getPublicId(void) throw () + virtual OUString SAL_CALL getPublicId(void) throw (std::exception) { return m_pParser->getEntity().structSource.sPublicId; } - virtual OUString SAL_CALL getSystemId(void) throw () + virtual OUString SAL_CALL getSystemId(void) throw (std::exception) { return m_pParser->getEntity().structSource.sSystemId; } // XSeekable (only for getPosition) - virtual void SAL_CALL seek( sal_Int64 ) throw() + virtual void SAL_CALL seek( sal_Int64 ) throw(std::exception) { } - virtual sal_Int64 SAL_CALL getPosition() throw() + virtual sal_Int64 SAL_CALL getPosition() throw(std::exception) { return XML_GetCurrentByteIndex( m_pParser->getEntity().pParser ); } - virtual ::sal_Int64 SAL_CALL getLength() throw() + virtual ::sal_Int64 SAL_CALL getLength() throw(std::exception) { return 0; } @@ -425,7 +425,7 @@ SaxExpatParser::~SaxExpatParser() // ::com::sun::star::lang::XInitialization: void SAL_CALL SaxExpatParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments) - throw (css::uno::RuntimeException, css::uno::Exception) + throw (css::uno::RuntimeException, css::uno::Exception, std::exception) { // possible arguments: a string "DoSmeplease" if (rArguments.getLength()) @@ -448,7 +448,7 @@ SaxExpatParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments void SaxExpatParser::parseStream( const InputSource& structSource) throw (SAXException, IOException, - css::uno::RuntimeException) + css::uno::RuntimeException, std::exception) { // Only one text at one time MutexGuard guard( m_pImpl->aMutex ); @@ -556,7 +556,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource) } void SaxExpatParser::setDocumentHandler(const css::uno::Reference< XDocumentHandler > & xHandler) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { m_pImpl->rDocumentHandler = xHandler; m_pImpl->rExtendedDocumentHandler = @@ -564,43 +564,43 @@ void SaxExpatParser::setDocumentHandler(const css::uno::Reference< XDocumentHand } void SaxExpatParser::setErrorHandler(const css::uno::Reference< XErrorHandler > & xHandler) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { m_pImpl->rErrorHandler = xHandler; } void SaxExpatParser::setDTDHandler(const css::uno::Reference< XDTDHandler > & xHandler) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { m_pImpl->rDTDHandler = xHandler; } void SaxExpatParser::setEntityResolver(const css::uno::Reference < XEntityResolver > & xResolver) - throw (css::uno::RuntimeException) + throw (css::uno::RuntimeException, std::exception) { m_pImpl->rEntityResolver = xResolver; } -void SaxExpatParser::setLocale( const Locale & locale ) throw (css::uno::RuntimeException) +void SaxExpatParser::setLocale( const Locale & locale ) throw (css::uno::RuntimeException, std::exception) { m_pImpl->locale = locale; } // XServiceInfo -OUString SaxExpatParser::getImplementationName() throw () +OUString SaxExpatParser::getImplementationName() throw (std::exception) { return OUString("com.sun.star.comp.extensions.xml.sax.ParserExpat"); } // XServiceInfo -sal_Bool SaxExpatParser::supportsService(const OUString& ServiceName) throw () +sal_Bool SaxExpatParser::supportsService(const OUString& ServiceName) throw (std::exception) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames(void) throw () +css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames(void) throw (std::exception) { css::uno::Sequence<OUString> seq(1); seq[0] = "com.sun.star.xml.sax.Parser"; diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index cd8cf236c290..1bd84f93f9e7 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -891,7 +891,7 @@ public: public: // XActiveDataSource virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream) - throw (RuntimeException) + throw (RuntimeException, std::exception) { // temporary: set same stream again to clear buffer if ( m_out == aStream && m_pSaxWriterHelper && m_bDocStarted ) @@ -909,48 +909,48 @@ public: // XActiveDataSource } } virtual Reference< XOutputStream > SAL_CALL getOutputStream(void) - throw(RuntimeException) + throw(RuntimeException, std::exception) { return m_out; } public: // XDocumentHandler virtual void SAL_CALL startDocument(void) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL endDocument(void) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL startElement(const OUString& aName, const Reference< XAttributeList > & xAttribs) - throw (SAXException, RuntimeException); + throw (SAXException, RuntimeException, std::exception); virtual void SAL_CALL endElement(const OUString& aName) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL characters(const OUString& aChars) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL ignorableWhitespace(const OUString& aWhitespaces) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL processingInstruction(const OUString& aTarget, const OUString& aData) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL setDocumentLocator(const Reference< XLocator > & xLocator) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); public: // XExtendedDocumentHandler - virtual void SAL_CALL startCDATA(void) throw(SAXException, RuntimeException); - virtual void SAL_CALL endCDATA(void) throw(SAXException,RuntimeException); + virtual void SAL_CALL startCDATA(void) throw(SAXException, RuntimeException, std::exception); + virtual void SAL_CALL endCDATA(void) throw(SAXException,RuntimeException, std::exception); virtual void SAL_CALL comment(const OUString& sComment) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL unknown(const OUString& sString) - throw(SAXException, RuntimeException); + throw(SAXException, RuntimeException, std::exception); virtual void SAL_CALL allowLineBreak(void) - throw(SAXException,RuntimeException); + throw(SAXException,RuntimeException, std::exception); public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw(); - Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(); + OUString SAL_CALL getImplementationName() throw(std::exception); + Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(std::exception); + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception); private: @@ -990,26 +990,26 @@ static inline sal_Bool isFirstCharWhitespace( const sal_Unicode *p ) throw() } // XServiceInfo -OUString SAXWriter::getImplementationName() throw() +OUString SAXWriter::getImplementationName() throw(std::exception) { return OUString("com.sun.star.extensions.xml.sax.Writer"); } // XServiceInfo -sal_Bool SAXWriter::supportsService(const OUString& ServiceName) throw() +sal_Bool SAXWriter::supportsService(const OUString& ServiceName) throw(std::exception) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > SAXWriter::getSupportedServiceNames(void) throw () +Sequence< OUString > SAXWriter::getSupportedServiceNames(void) throw (std::exception) { Sequence<OUString> seq(1); seq[0] = "com.sun.star.xml.sax.Writer"; return seq; } -void SAXWriter::startDocument() throw(SAXException, RuntimeException ) +void SAXWriter::startDocument() throw(SAXException, RuntimeException, std::exception ) { if( m_bDocStarted || ! m_out.is() || !m_pSaxWriterHelper ) { throw SAXException(); @@ -1019,7 +1019,7 @@ void SAXWriter::startDocument() throw(SAXException, RuntimeE } -void SAXWriter::endDocument(void) throw(SAXException, RuntimeException) +void SAXWriter::endDocument(void) throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) { @@ -1050,7 +1050,7 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeList >& xAttribs) - throw(SAXException, RuntimeException) + throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) { @@ -1118,7 +1118,7 @@ void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeL } } -void SAXWriter::endElement(const OUString& aName) throw (SAXException, RuntimeException) +void SAXWriter::endElement(const OUString& aName) throw (SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) { throw SAXException (); @@ -1162,7 +1162,7 @@ void SAXWriter::endElement(const OUString& aName) throw (SAXException, Runtime } } -void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeException) +void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) { @@ -1215,7 +1215,7 @@ void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeE } -void SAXWriter::ignorableWhitespace(const OUString&) throw(SAXException, RuntimeException) +void SAXWriter::ignorableWhitespace(const OUString&) throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) { @@ -1226,7 +1226,7 @@ void SAXWriter::ignorableWhitespace(const OUString&) throw(SAXException, Runtime } void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& aData) - throw (SAXException, RuntimeException) + throw (SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted || m_bIsCDATA ) { @@ -1261,12 +1261,12 @@ void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& a void SAXWriter::setDocumentLocator(const Reference< XLocator >&) - throw (SAXException, RuntimeException) + throw (SAXException, RuntimeException, std::exception) { } -void SAXWriter::startCDATA(void) throw(SAXException, RuntimeException) +void SAXWriter::startCDATA(void) throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted || m_bIsCDATA) { @@ -1283,7 +1283,7 @@ void SAXWriter::startCDATA(void) throw(SAXException, RuntimeException) m_bIsCDATA = sal_True; } -void SAXWriter::endCDATA(void) throw (SAXException,RuntimeException) +void SAXWriter::endCDATA(void) throw (SAXException,RuntimeException, std::exception) { if( ! m_bDocStarted || ! m_bIsCDATA) { @@ -1303,7 +1303,7 @@ void SAXWriter::endCDATA(void) throw (SAXException,RuntimeException) } -void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeException) +void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted || m_bIsCDATA ) { @@ -1332,7 +1332,7 @@ void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeExc } -void SAXWriter::allowLineBreak( ) throw ( SAXException , RuntimeException) +void SAXWriter::allowLineBreak( ) throw ( SAXException , RuntimeException, std::exception) { if( ! m_bDocStarted || m_bAllowLineBreak ) { throw SAXException(); @@ -1341,7 +1341,7 @@ void SAXWriter::allowLineBreak( ) throw ( SAXException , RuntimeException) m_bAllowLineBreak = sal_True; } -void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeException) +void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeException, std::exception) { if( ! m_bDocStarted ) |