diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-21 14:35:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-21 15:30:26 +0000 |
commit | 09f9a79b112aae36d54520568962d84a931f6491 (patch) | |
tree | 1daf69707fdaa18f6c8167e14c488583bde4d7e7 | |
parent | c1587b74c15d35fd85069d3a0f1ebe4770549021 (diff) |
[API CHANGE] fix endCDATA to allow throwing css::xml::sax::SAXException
coverity#1158397 Uncaught exception
Change-Id: Iabf0b1f0500cb4218d8cb3aff372777471e8f287
-rw-r--r-- | offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl | 3 | ||||
-rw-r--r-- | offapi/type_reference/offapi.idl | 2 | ||||
-rw-r--r-- | sax/source/expatwrap/saxwriter.cxx | 4 | ||||
-rw-r--r-- | sax/test/saxdemo.cxx | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl index 2529f30b165e..23dc57cfbac3 100644 --- a/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl +++ b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl @@ -49,7 +49,8 @@ published interface XExtendedDocumentHandler: com::sun::star::xml::sax::XDocumen <p>Note that <code>startCDATA/endCDATA</code> MUST NOT enclose any <code>startElement/endElement</code>-call!</p> */ - void endCDATA(); + void endCDATA() + raises( com::sun::star::xml::sax::SAXException ); /** receives notification about a comment in the XML-source. */ diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index a474f590ec15..b2042d612124 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -17577,7 +17577,7 @@ module com { published interface XExtendedDocumentHandler { interface ::com::sun::star::xml::sax::XDocumentHandler; void startCDATA() raises (::com::sun::star::xml::sax::SAXException); - void endCDATA(); + void endCDATA() raises (::com::sun::star::xml::sax::SAXException); void comment([in] string sComment) raises (::com::sun::star::xml::sax::SAXException); void allowLineBreak() raises (::com::sun::star::xml::sax::SAXException); void unknown([in] string sString) raises (::com::sun::star::xml::sax::SAXException); diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index c4338590a0e4..d871cce05224 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -939,7 +939,7 @@ public: // XDocumentHandler public: // XExtendedDocumentHandler virtual void SAL_CALL startCDATA(void) throw(SAXException, RuntimeException); - virtual void SAL_CALL endCDATA(void) throw(RuntimeException); + virtual void SAL_CALL endCDATA(void) throw(SAXException,RuntimeException); virtual void SAL_CALL comment(const OUString& sComment) throw(SAXException, RuntimeException); virtual void SAL_CALL unknown(const OUString& sString) @@ -1283,7 +1283,7 @@ void SAXWriter::startCDATA(void) throw(SAXException, RuntimeException) m_bIsCDATA = sal_True; } -void SAXWriter::endCDATA(void) throw (RuntimeException) +void SAXWriter::endCDATA(void) throw (SAXException,RuntimeException) { if( ! m_bDocStarted || ! m_bIsCDATA) { diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx index 3910bbf56dea..4d7be76653a7 100644 --- a/sax/test/saxdemo.cxx +++ b/sax/test/saxdemo.cxx @@ -225,7 +225,7 @@ public: // ExtendedDocumentHandler virtual void SAL_CALL startCDATA(void) throw (SAXException,RuntimeException) { } - virtual void SAL_CALL endCDATA(void) throw (RuntimeException) + virtual void SAL_CALL endCDATA(void) throw (SAXException,RuntimeException) { } virtual void SAL_CALL comment(const OUString& /* sComment */) throw (SAXException,RuntimeException) |