summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-19 17:53:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-19 18:03:15 +0100
commitb814e4d0503ae135f4532e16db4830a4ac8c0167 (patch)
tree9e2733c61f637ba678a8f57377826020f7f14f23 /sax
parentf96428fc5f9c19b9fe1d6eb32ddac8d84f7372ef (diff)
New loplugin:dynexcspec: Add @throws documentation, sax
Change-Id: If43818ca79bf134a5025ed184c201f4129630500
Diffstat (limited to 'sax')
-rw-r--r--sax/inc/xml2utf.hxx4
-rw-r--r--sax/source/expatwrap/saxwriter.cxx16
-rw-r--r--sax/source/fastparser/fastparser.cxx16
3 files changed, 36 insertions, 0 deletions
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index c001518419d6..843a3ef0ffcc 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -88,6 +88,10 @@ public:
// @param nMaxToRead The number of chars, that should be read. Note that this is no exact number. There
// may be returned less or more bytes than ordered.
+ /// @throws css::io::IOException
+ /// @throws css::io::NotConnectedException
+ /// @throws css::io::BufferSizeExceededException
+ /// @throws css::uno::RuntimeException
sal_Int32 readAndConvert( css::uno::Sequence<sal_Int8> &seq , sal_Int32 nMaxToRead )
throw ( css::io::IOException,
css::io::NotConnectedException ,
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 50deb1f04768..0d216010c89a 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -92,19 +92,23 @@ private:
sal_uInt32 nCurrentPos;
bool m_bStartElementFinished;
+ /// @throws SAXException
inline sal_uInt32 writeSequence() throw( SAXException );
// use only if to insert the bytes more space in the sequence is needed and
// so the sequence has to write out and reset rPos to 0
// writes sequence only on overflow, sequence could be full on the end (rPos == SEQUENCESIZE)
+ /// @throws SAXException
inline void AddBytes(sal_Int8* pTarget, sal_uInt32& rPos,
const sal_Int8* pBytes, sal_uInt32 nBytesCount) throw( SAXException );
+ /// @throws SAXException
inline bool convertToXML(const sal_Unicode * pStr,
sal_Int32 nStrLen,
bool bDoNormalization,
bool bNormalizeWhitespace,
sal_Int8 *pTarget,
sal_uInt32& rPos) throw( SAXException );
+ /// @throws SAXException
inline void FinishStartElement() throw( SAXException );
public:
explicit SaxWriterHelper(Reference< XOutputStream > const & m_TempOut)
@@ -124,11 +128,13 @@ public:
OSL_ENSURE(m_bStartElementFinished, "StartElement not completely written");
}
+ /// @throws SAXException
inline void insertIndentation(sal_uInt32 m_nLevel) throw( SAXException );
// returns whether it works correct or invalid characters were in the string
// If there are invalid characters in the string it returns sal_False.
// Than the calling method has to throw the needed Exception.
+ /// @throws SAXException
inline bool writeString(const OUString& rWriteOutString,
bool bDoNormalization,
bool bNormalizeWhitespace) throw( SAXException );
@@ -136,32 +142,42 @@ public:
sal_uInt32 GetLastColumnCount() const throw()
{ return (sal_uInt32)(nCurrentPos - nLastLineFeedPos); }
+ /// @throws SAXException
inline void startDocument() throw( SAXException );
// returns whether it works correct or invalid characters were in the strings
// If there are invalid characters in one of the strings it returns sal_False.
// Than the calling method has to throw the needed Exception.
+ /// @throws SAXException
inline SaxInvalidCharacterError startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs) throw( SAXException );
+ /// @throws SAXException
inline bool FinishEmptyElement() throw( SAXException );
// returns whether it works correct or invalid characters were in the string
// If there are invalid characters in the string it returns sal_False.
// Than the calling method has to throw the needed Exception.
+ /// @throws SAXException
inline bool endElement(const OUString& rName) throw( SAXException );
+ /// @throws SAXException
inline void endDocument() throw( SAXException );
// returns whether it works correct or invalid characters were in the strings
// If there are invalid characters in the string it returns sal_False.
// Than the calling method has to throw the needed Exception.
+ /// @throws SAXException
inline bool processingInstruction(const OUString& rTarget, const OUString& rData) throw( SAXException );
+ /// @throws SAXException
inline void startCDATA() throw( SAXException );
+ /// @throws SAXException
inline void endCDATA() throw( SAXException );
// returns whether it works correct or invalid characters were in the strings
// If there are invalid characters in the string it returns sal_False.
// Than the calling method has to throw the needed Exception.
+ /// @throws SAXException
inline bool comment(const OUString& rComment) throw( SAXException );
+ /// @throws SAXException
inline void clearBuffer() throw( SAXException );
};
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 420f8c79ce2e..43fa6c6b0308 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -209,14 +209,27 @@ public:
~FastSaxParserImpl();
// XFastParser
+ /// @throws css::xml::sax::SAXException
+ /// @throws css::io::IOException
+ /// @throws css::uno::RuntimeException
void parseStream( const css::xml::sax::InputSource& aInputSource ) throw (css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException, std::exception);
+ /// @throws css::uno::RuntimeException
void setFastDocumentHandler( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& Handler ) throw (css::uno::RuntimeException);
+ /// @throws css::uno::RuntimeException
void setTokenHandler( const css::uno::Reference< css::xml::sax::XFastTokenHandler >& Handler ) throw (css::uno::RuntimeException);
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
void registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
OUString getNamespaceURL( const OUString& rPrefix ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ /// @throws css::uno::RuntimeException
void setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler ) throw (css::uno::RuntimeException);
+ /// @throws css::uno::RuntimeException
void setEntityResolver( const css::uno::Reference< css::xml::sax::XEntityResolver >& Resolver ) throw (css::uno::RuntimeException);
+ /// @throws css::uno::RuntimeException
void setNamespaceHandler( const css::uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler) throw (css::uno::RuntimeException);
+ /// @throws css::uno::RuntimeException
void setLocale( const css::lang::Locale& rLocale ) throw (css::uno::RuntimeException);
// called by the C callbacks of the expat parser
@@ -245,7 +258,9 @@ private:
void sendPendingCharacters();
sal_Int32 GetToken( const xmlChar* pName, sal_Int32 nameLen );
+ /// @throws css::xml::sax::SAXException
sal_Int32 GetTokenWithPrefix( const xmlChar* pPrefix, int prefixLen, const xmlChar* pName, int nameLen ) throw (css::xml::sax::SAXException);
+ /// @throws css::xml::sax::SAXException
OUString GetNamespaceURL( const OString& rPrefix ) throw (css::xml::sax::SAXException);
sal_Int32 GetNamespaceToken( const OUString& rNamespaceURL );
sal_Int32 GetTokenWithContextNamespace( sal_Int32 nNamespaceToken, const xmlChar* pName, int nNameLen );
@@ -338,6 +353,7 @@ public:
explicit FastLocatorImpl(FastSaxParserImpl *p) : mpParser(p) {}
void dispose() { mpParser = nullptr; }
+ /// @throws RuntimeException
void checkDispose() throw (RuntimeException) { if( !mpParser ) throw DisposedException(); }
//XLocator