summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
Diffstat (limited to 'sax')
-rw-r--r--sax/inc/xml2utf.hxx6
-rw-r--r--sax/qa/cppunit/parser.cxx6
-rw-r--r--sax/qa/cppunit/xmlimport.cxx49
-rw-r--r--sax/source/expatwrap/sax_expat.cxx62
-rw-r--r--sax/source/expatwrap/saxwriter.cxx142
-rw-r--r--sax/source/expatwrap/xml2utf.cxx1
-rw-r--r--sax/source/fastparser/fastparser.cxx75
-rw-r--r--sax/source/fastparser/legacyfastparser.cxx80
-rw-r--r--sax/source/tools/fastattribs.cxx14
9 files changed, 169 insertions, 266 deletions
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index 843a3ef0ffcc..a07a9588a7e9 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -92,11 +92,7 @@ public:
/// @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 ,
- css::io::BufferSizeExceededException ,
- css::uno::RuntimeException );
+ sal_Int32 readAndConvert( css::uno::Sequence<sal_Int8> &seq , sal_Int32 nMaxToRead );
private:
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() );
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 9330749185f4..ec53ee80edc8 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -107,30 +107,22 @@ public:
SaxExpatParser();
// css::lang::XInitialization:
- virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments)
- throw (css::uno::RuntimeException, css::uno::Exception, std::exception) override;
+ virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments) override;
// The SAX-Parser-Interface
- virtual void SAL_CALL parseStream( const InputSource& structSource)
- throw ( SAXException,
- IOException,
- css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL setDocumentHandler(const css::uno::Reference< XDocumentHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception) override;
-
- virtual void SAL_CALL setErrorHandler(const css::uno::Reference< XErrorHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL setDTDHandler(const css::uno::Reference < XDTDHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL setEntityResolver(const css::uno::Reference< XEntityResolver >& xResolver)
- throw (css::uno::RuntimeException, std::exception) override;
-
- virtual void SAL_CALL setLocale( const Locale &locale ) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL parseStream( const InputSource& structSource) override;
+ virtual void SAL_CALL setDocumentHandler(const css::uno::Reference< XDocumentHandler > & xHandler) override;
+
+ virtual void SAL_CALL setErrorHandler(const css::uno::Reference< XErrorHandler > & xHandler) override;
+ virtual void SAL_CALL setDTDHandler(const css::uno::Reference < XDTDHandler > & xHandler) override;
+ virtual void SAL_CALL setEntityResolver(const css::uno::Reference< XEntityResolver >& xResolver) override;
+
+ virtual void SAL_CALL setLocale( const Locale &locale ) override;
public: // XServiceInfo
- OUString SAL_CALL getImplementationName() throw (std::exception) override;
- css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override;
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override;
+ OUString SAL_CALL getImplementationName() override;
+ css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
private:
std::unique_ptr<SaxExpatParser_Impl> m_pImpl;
@@ -323,33 +315,33 @@ public:
}
public: //XLocator
- virtual sal_Int32 SAL_CALL getColumnNumber() throw (std::exception) override
+ virtual sal_Int32 SAL_CALL getColumnNumber() override
{
return XML_GetCurrentColumnNumber( m_pParser->getEntity().pParser );
}
- virtual sal_Int32 SAL_CALL getLineNumber() throw (std::exception) override
+ virtual sal_Int32 SAL_CALL getLineNumber() override
{
return XML_GetCurrentLineNumber( m_pParser->getEntity().pParser );
}
- virtual OUString SAL_CALL getPublicId() throw (std::exception) override
+ virtual OUString SAL_CALL getPublicId() override
{
return m_pParser->getEntity().structSource.sPublicId;
}
- virtual OUString SAL_CALL getSystemId() throw (std::exception) override
+ virtual OUString SAL_CALL getSystemId() override
{
return m_pParser->getEntity().structSource.sSystemId;
}
// XSeekable (only for getPosition)
- virtual void SAL_CALL seek( sal_Int64 ) throw(std::exception) override
+ virtual void SAL_CALL seek( sal_Int64 ) override
{
}
- virtual sal_Int64 SAL_CALL getPosition() throw(std::exception) override
+ virtual sal_Int64 SAL_CALL getPosition() override
{
return XML_GetCurrentByteIndex( m_pParser->getEntity().pParser );
}
- virtual ::sal_Int64 SAL_CALL getLength() throw(std::exception) override
+ virtual ::sal_Int64 SAL_CALL getLength() override
{
return 0;
}
@@ -378,7 +370,6 @@ SaxExpatParser::SaxExpatParser( )
// css::lang::XInitialization:
void SAL_CALL
SaxExpatParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments)
- throw (css::uno::RuntimeException, css::uno::Exception, std::exception)
{
// possible arguments: a string "DoSmeplease"
if (rArguments.getLength())
@@ -399,9 +390,6 @@ SaxExpatParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments
*
****************/
void SaxExpatParser::parseStream( const InputSource& structSource)
- throw (SAXException,
- IOException,
- css::uno::RuntimeException, std::exception)
{
// Only one text at one time
MutexGuard guard( m_pImpl->aMutex );
@@ -509,7 +497,6 @@ void SaxExpatParser::parseStream( const InputSource& structSource)
}
void SaxExpatParser::setDocumentHandler(const css::uno::Reference< XDocumentHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception)
{
m_pImpl->rDocumentHandler = xHandler;
m_pImpl->rExtendedDocumentHandler =
@@ -517,43 +504,40 @@ void SaxExpatParser::setDocumentHandler(const css::uno::Reference< XDocumentHand
}
void SaxExpatParser::setErrorHandler(const css::uno::Reference< XErrorHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception)
{
m_pImpl->rErrorHandler = xHandler;
}
void SaxExpatParser::setDTDHandler(const css::uno::Reference< XDTDHandler > & xHandler)
- throw (css::uno::RuntimeException, std::exception)
{
m_pImpl->rDTDHandler = xHandler;
}
void SaxExpatParser::setEntityResolver(const css::uno::Reference < XEntityResolver > & xResolver)
- throw (css::uno::RuntimeException, std::exception)
{
m_pImpl->rEntityResolver = xResolver;
}
-void SaxExpatParser::setLocale( const Locale & locale ) throw (css::uno::RuntimeException, std::exception)
+void SaxExpatParser::setLocale( const Locale & locale )
{
m_pImpl->locale = locale;
}
// XServiceInfo
-OUString SaxExpatParser::getImplementationName() throw (std::exception)
+OUString SaxExpatParser::getImplementationName()
{
return OUString("com.sun.star.comp.extensions.xml.sax.ParserExpat");
}
// XServiceInfo
-sal_Bool SaxExpatParser::supportsService(const OUString& ServiceName) throw (std::exception)
+sal_Bool SaxExpatParser::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
// XServiceInfo
-css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames() throw (std::exception)
+css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames()
{
css::uno::Sequence<OUString> seq { "com.sun.star.xml.sax.Parser" };
return seq;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 0d216010c89a..b4a1fb1cbfd7 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -93,23 +93,23 @@ private:
bool m_bStartElementFinished;
/// @throws SAXException
- inline sal_uInt32 writeSequence() throw( SAXException );
+ inline sal_uInt32 writeSequence();
// 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 );
+ const sal_Int8* pBytes, sal_uInt32 nBytesCount);
/// @throws SAXException
inline bool convertToXML(const sal_Unicode * pStr,
sal_Int32 nStrLen,
bool bDoNormalization,
bool bNormalizeWhitespace,
sal_Int8 *pTarget,
- sal_uInt32& rPos) throw( SAXException );
+ sal_uInt32& rPos);
/// @throws SAXException
- inline void FinishStartElement() throw( SAXException );
+ inline void FinishStartElement();
public:
explicit SaxWriterHelper(Reference< XOutputStream > const & m_TempOut)
: m_out(m_TempOut)
@@ -129,7 +129,7 @@ public:
}
/// @throws SAXException
- inline void insertIndentation(sal_uInt32 m_nLevel) throw( SAXException );
+ inline void insertIndentation(sal_uInt32 m_nLevel);
// returns whether it works correct or invalid characters were in the string
// If there are invalid characters in the string it returns sal_False.
@@ -137,48 +137,48 @@ public:
/// @throws SAXException
inline bool writeString(const OUString& rWriteOutString,
bool bDoNormalization,
- bool bNormalizeWhitespace) throw( SAXException );
+ bool bNormalizeWhitespace);
sal_uInt32 GetLastColumnCount() const throw()
{ return (sal_uInt32)(nCurrentPos - nLastLineFeedPos); }
/// @throws SAXException
- inline void startDocument() throw( SAXException );
+ inline void startDocument();
// 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 );
+ inline SaxInvalidCharacterError startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs);
/// @throws SAXException
- inline bool FinishEmptyElement() throw( SAXException );
+ inline bool FinishEmptyElement();
// 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 );
+ inline bool endElement(const OUString& rName);
/// @throws SAXException
- inline void endDocument() throw( SAXException );
+ inline void endDocument();
// 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 );
+ inline bool processingInstruction(const OUString& rTarget, const OUString& rData);
/// @throws SAXException
- inline void startCDATA() throw( SAXException );
+ inline void startCDATA();
/// @throws SAXException
- inline void endCDATA() throw( SAXException );
+ inline void endCDATA();
// 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 );
+ inline bool comment(const OUString& rComment);
/// @throws SAXException
- inline void clearBuffer() throw( SAXException );
+ inline void clearBuffer();
};
const bool g_bValidCharsBelow32[32] =
@@ -205,7 +205,7 @@ inline bool IsInvalidChar(const sal_Unicode aChar)
* write through to the output stream
*
*****/
-inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
+inline sal_uInt32 SaxWriterHelper::writeSequence()
{
try
{
@@ -225,7 +225,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
}
inline void SaxWriterHelper::AddBytes(sal_Int8* pTarget, sal_uInt32& rPos,
- const sal_Int8* pBytes, sal_uInt32 nBytesCount) throw( SAXException )
+ const sal_Int8* pBytes, sal_uInt32 nBytesCount)
{
OSL_ENSURE((rPos + nBytesCount) > SEQUENCESIZE, "wrong use of AddBytesMethod");
sal_uInt32 nCount(SEQUENCESIZE - rPos);
@@ -256,7 +256,7 @@ inline bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
bool bDoNormalization,
bool bNormalizeWhitespace,
sal_Int8 *pTarget,
- sal_uInt32& rPos ) throw( SAXException )
+ sal_uInt32& rPos )
{
bool bRet(true);
sal_uInt32 nSurrogate = 0;
@@ -480,7 +480,7 @@ inline bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
return bRet;
}
-inline void SaxWriterHelper::FinishStartElement() throw( SAXException )
+inline void SaxWriterHelper::FinishStartElement()
{
if (!m_bStartElementFinished)
{
@@ -492,7 +492,7 @@ inline void SaxWriterHelper::FinishStartElement() throw( SAXException )
}
}
-inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) throw( SAXException )
+inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel)
{
FinishStartElement();
if (m_nLevel > 0)
@@ -532,7 +532,7 @@ inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) throw( SAXEx
inline bool SaxWriterHelper::writeString( const OUString& rWriteOutString,
bool bDoNormalization,
- bool bNormalizeWhitespace ) throw( SAXException )
+ bool bNormalizeWhitespace )
{
FinishStartElement();
return convertToXML(rWriteOutString.getStr(),
@@ -543,7 +543,7 @@ inline bool SaxWriterHelper::writeString( const OUString& rWriteOutString,
nCurrentPos);
}
-inline void SaxWriterHelper::startDocument() throw( SAXException )
+inline void SaxWriterHelper::startDocument()
{
const char pc[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
const int nLen = strlen( pc );
@@ -565,7 +565,7 @@ inline void SaxWriterHelper::startDocument() throw( SAXException )
nCurrentPos = writeSequence();
}
-inline SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs) throw( SAXException )
+inline SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rName, const Reference< XAttributeList >& xAttribs)
{
FinishStartElement();
@@ -625,7 +625,7 @@ inline SaxInvalidCharacterError SaxWriterHelper::startElement(const OUString& rN
return eRet;
}
-inline bool SaxWriterHelper::FinishEmptyElement() throw( SAXException )
+inline bool SaxWriterHelper::FinishEmptyElement()
{
if (m_bStartElementFinished)
return false;
@@ -644,7 +644,7 @@ inline bool SaxWriterHelper::FinishEmptyElement() throw( SAXException )
return true;
}
-inline bool SaxWriterHelper::endElement(const OUString& rName) throw( SAXException )
+inline bool SaxWriterHelper::endElement(const OUString& rName)
{
FinishStartElement();
@@ -667,7 +667,7 @@ inline bool SaxWriterHelper::endElement(const OUString& rName) throw( SAXExcepti
return bRet;
}
-inline void SaxWriterHelper::endDocument() throw( SAXException )
+inline void SaxWriterHelper::endDocument()
{
if (nCurrentPos > 0)
{
@@ -677,7 +677,7 @@ inline void SaxWriterHelper::endDocument() throw( SAXException )
}
}
-inline void SaxWriterHelper::clearBuffer() throw( SAXException )
+inline void SaxWriterHelper::clearBuffer()
{
FinishStartElement();
if (nCurrentPos > 0)
@@ -690,7 +690,7 @@ inline void SaxWriterHelper::clearBuffer() throw( SAXException )
}
}
-inline bool SaxWriterHelper::processingInstruction(const OUString& rTarget, const OUString& rData) throw( SAXException )
+inline bool SaxWriterHelper::processingInstruction(const OUString& rTarget, const OUString& rData)
{
FinishStartElement();
mp_Sequence[nCurrentPos] = '<';
@@ -724,7 +724,7 @@ inline bool SaxWriterHelper::processingInstruction(const OUString& rTarget, cons
return bRet;
}
-inline void SaxWriterHelper::startCDATA() throw( SAXException )
+inline void SaxWriterHelper::startCDATA()
{
FinishStartElement();
if ((nCurrentPos + 9) <= SEQUENCESIZE)
@@ -738,7 +738,7 @@ inline void SaxWriterHelper::startCDATA() throw( SAXException )
nCurrentPos = writeSequence();
}
-inline void SaxWriterHelper::endCDATA() throw( SAXException )
+inline void SaxWriterHelper::endCDATA()
{
FinishStartElement();
if ((nCurrentPos + 3) <= SEQUENCESIZE)
@@ -752,7 +752,7 @@ inline void SaxWriterHelper::endCDATA() throw( SAXException )
nCurrentPos = writeSequence();
}
-inline bool SaxWriterHelper::comment(const OUString& rComment) throw( SAXException )
+inline bool SaxWriterHelper::comment(const OUString& rComment)
{
FinishStartElement();
mp_Sequence[nCurrentPos] = '<';
@@ -902,8 +902,7 @@ public:
}
public: // XActiveDataSource
- virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream)
- throw (RuntimeException, std::exception) override
+ virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream) override
{
try
{
@@ -927,51 +926,39 @@ public: // XActiveDataSource
e.WrappedException);
}
}
- virtual Reference< XOutputStream > SAL_CALL getOutputStream()
- throw(RuntimeException, std::exception) override
+ virtual Reference< XOutputStream > SAL_CALL getOutputStream() override
{
return m_out;
}
public: // XDocumentHandler
- virtual void SAL_CALL startDocument()
- throw(SAXException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL startDocument() override;
- virtual void SAL_CALL endDocument()
- throw(SAXException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL endDocument() override;
virtual void SAL_CALL startElement(const OUString& aName,
- const Reference< XAttributeList > & xAttribs)
- throw (SAXException, RuntimeException, std::exception) override;
+ const Reference< XAttributeList > & xAttribs) override;
- virtual void SAL_CALL endElement(const OUString& aName)
- throw(SAXException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL endElement(const OUString& aName) override;
- virtual void SAL_CALL characters(const OUString& aChars)
- throw(SAXException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL characters(const OUString& aChars) override;
- virtual void SAL_CALL ignorableWhitespace(const OUString& aWhitespaces)
- throw(SAXException, RuntimeException, std::exception) override;
+ virtual void SAL_CALL ignorableWhitespace(const OUString& aWhitespaces) override;
virtual void SAL_CALL processingInstruction(const OUString& aTarget,
- const OUString& aData)
- throw(SAXException, RuntimeException, std::exception) override;
- virtual void SAL_CALL setDocumentLocator(const Reference< XLocator > & xLocator)
- throw(SAXException, RuntimeException, std::exception) override;
+ const OUString& aData) override;
+ virtual void SAL_CALL setDocumentLocator(const Reference< XLocator > & xLocator) override;
public: // XExtendedDocumentHandler
- virtual void SAL_CALL startCDATA() throw(SAXException, RuntimeException, std::exception) override;
- virtual void SAL_CALL endCDATA() throw(SAXException,RuntimeException, std::exception) override;
- virtual void SAL_CALL comment(const OUString& sComment)
- throw(SAXException, RuntimeException, std::exception) override;
- virtual void SAL_CALL unknown(const OUString& sString)
- throw(SAXException, RuntimeException, std::exception) override;
- virtual void SAL_CALL allowLineBreak()
- throw(SAXException,RuntimeException, std::exception) override;
+ virtual void SAL_CALL startCDATA() override;
+ virtual void SAL_CALL endCDATA() override;
+ virtual void SAL_CALL comment(const OUString& sComment) override;
+ virtual void SAL_CALL unknown(const OUString& sString) override;
+ virtual void SAL_CALL allowLineBreak() override;
public: // XServiceInfo
- OUString SAL_CALL getImplementationName() throw(std::exception) override;
- Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception) override;
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception) override;
+ OUString SAL_CALL getImplementationName() override;
+ Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
private:
sal_Int32 getIndentPrefixLength( sal_Int32 nFirstLineBreakOccurrence ) throw();
@@ -1008,25 +995,25 @@ inline bool isFirstCharWhitespace( const sal_Unicode *p ) throw()
}
// XServiceInfo
-OUString SAXWriter::getImplementationName() throw(std::exception)
+OUString SAXWriter::getImplementationName()
{
return OUString("com.sun.star.extensions.xml.sax.Writer");
}
// XServiceInfo
-sal_Bool SAXWriter::supportsService(const OUString& ServiceName) throw(std::exception)
+sal_Bool SAXWriter::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
// XServiceInfo
-Sequence< OUString > SAXWriter::getSupportedServiceNames() throw (std::exception)
+Sequence< OUString > SAXWriter::getSupportedServiceNames()
{
Sequence<OUString> seq { "com.sun.star.xml.sax.Writer" };
return seq;
}
-void SAXWriter::startDocument() throw(SAXException, RuntimeException, std::exception )
+void SAXWriter::startDocument()
{
if( m_bDocStarted || ! m_out.is() || !m_pSaxWriterHelper ) {
throw SAXException();
@@ -1036,7 +1023,7 @@ void SAXWriter::startDocument() throw(SAXException, RuntimeE
}
-void SAXWriter::endDocument() throw(SAXException, RuntimeException, std::exception)
+void SAXWriter::endDocument()
{
if( ! m_bDocStarted )
{
@@ -1067,7 +1054,6 @@ void SAXWriter::endDocument() throw(SAXException, RuntimeExcep
void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeList >& xAttribs)
- throw(SAXException, RuntimeException, std::exception)
{
if( ! m_bDocStarted )
{
@@ -1135,7 +1121,7 @@ void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeL
}
}
-void SAXWriter::endElement(const OUString& aName) throw (SAXException, RuntimeException, std::exception)
+void SAXWriter::endElement(const OUString& aName)
{
if( ! m_bDocStarted ) {
throw SAXException ();
@@ -1179,7 +1165,7 @@ void SAXWriter::endElement(const OUString& aName) throw (SAXException, Runtime
}
}
-void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeException, std::exception)
+void SAXWriter::characters(const OUString& aChars)
{
if( ! m_bDocStarted )
{
@@ -1232,7 +1218,7 @@ void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeE
}
-void SAXWriter::ignorableWhitespace(const OUString&) throw(SAXException, RuntimeException, std::exception)
+void SAXWriter::ignorableWhitespace(const OUString&)
{
if( ! m_bDocStarted )
{
@@ -1243,7 +1229,6 @@ void SAXWriter::ignorableWhitespace(const OUString&) throw(SAXException, Runtime
}
void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& aData)
- throw (SAXException, RuntimeException, std::exception)
{
if( ! m_bDocStarted || m_bIsCDATA )
{
@@ -1278,12 +1263,11 @@ void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& a
void SAXWriter::setDocumentLocator(const Reference< XLocator >&)
- throw (SAXException, RuntimeException, std::exception)
{
}
-void SAXWriter::startCDATA() throw(SAXException, RuntimeException, std::exception)
+void SAXWriter::startCDATA()
{
if( ! m_bDocStarted || m_bIsCDATA)
{
@@ -1300,7 +1284,7 @@ void SAXWriter::startCDATA() throw(SAXException, RuntimeException, std::exceptio
m_bIsCDATA = true;
}
-void SAXWriter::endCDATA() throw (SAXException,RuntimeException, std::exception)
+void SAXWriter::endCDATA()
{
if( ! m_bDocStarted || ! m_bIsCDATA)
{
@@ -1320,7 +1304,7 @@ void SAXWriter::endCDATA() throw (SAXException,RuntimeException, std::exception)
}
-void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeException, std::exception)
+void SAXWriter::comment(const OUString& sComment)
{
if( ! m_bDocStarted || m_bIsCDATA )
{
@@ -1349,7 +1333,7 @@ void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeExc
}
-void SAXWriter::allowLineBreak( ) throw ( SAXException , RuntimeException, std::exception)
+void SAXWriter::allowLineBreak( )
{
if( ! m_bDocStarted || m_bAllowLineBreak ) {
throw SAXException();
@@ -1358,7 +1342,7 @@ void SAXWriter::allowLineBreak( ) throw ( SAXException , RuntimeException, std
m_bAllowLineBreak = true;
}
-void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeException, std::exception)
+void SAXWriter::unknown(const OUString& sString)
{
if( ! m_bDocStarted )
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index 361e02fc99b0..d19f56ea0603 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -37,7 +37,6 @@ using namespace ::com::sun::star::io;
namespace sax_expatwrap {
sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_Int32 nMaxToRead )
- throw ( IOException, NotConnectedException , BufferSizeExceededException , RuntimeException )
{
if( ! m_in.is() ) {
throw NotConnectedException();
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 3428297a933a..bf64bffe77b0 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -210,25 +210,25 @@ public:
/// @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);
+ void parseStream( const css::xml::sax::InputSource& aInputSource );
/// @throws css::uno::RuntimeException
- void setFastDocumentHandler( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& Handler ) throw (css::uno::RuntimeException);
+ void setFastDocumentHandler( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& Handler );
/// @throws css::uno::RuntimeException
- void setTokenHandler( const css::uno::Reference< css::xml::sax::XFastTokenHandler >& Handler ) throw (css::uno::RuntimeException);
+ void setTokenHandler( const css::uno::Reference< css::xml::sax::XFastTokenHandler >& Handler );
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- void registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ void registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken );
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- OUString getNamespaceURL( const OUString& rPrefix ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ OUString getNamespaceURL( const OUString& rPrefix );
/// @throws css::uno::RuntimeException
- void setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler ) throw (css::uno::RuntimeException);
+ void setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler );
/// @throws css::uno::RuntimeException
- void setEntityResolver( const css::uno::Reference< css::xml::sax::XEntityResolver >& Resolver ) throw (css::uno::RuntimeException);
+ void setEntityResolver( const css::uno::Reference< css::xml::sax::XEntityResolver >& Resolver );
/// @throws css::uno::RuntimeException
- void setNamespaceHandler( const css::uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler) throw (css::uno::RuntimeException);
+ void setNamespaceHandler( const css::uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler);
/// @throws css::uno::RuntimeException
- void setLocale( const css::lang::Locale& rLocale ) throw (css::uno::RuntimeException);
+ void setLocale( const css::lang::Locale& rLocale );
// called by the C callbacks of the expat parser
void callbackStartElement( const xmlChar *localName , const xmlChar* prefix, const xmlChar* URI,
@@ -257,9 +257,9 @@ private:
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);
+ sal_Int32 GetTokenWithPrefix( const xmlChar* pPrefix, int prefixLen, const xmlChar* pName, int nameLen );
/// @throws css::xml::sax::SAXException
- OUString GetNamespaceURL( const OString& rPrefix ) throw (css::xml::sax::SAXException);
+ OUString GetNamespaceURL( const OString& rPrefix );
sal_Int32 GetNamespaceToken( const OUString& rNamespaceURL );
sal_Int32 GetTokenWithContextNamespace( sal_Int32 nNamespaceToken, const xmlChar* pName, int nNameLen );
void DefineNamespace( const OString& rPrefix, const OUString& namespaceURL );
@@ -352,37 +352,37 @@ public:
void dispose() { mpParser = nullptr; }
/// @throws RuntimeException
- void checkDispose() throw (RuntimeException) { if( !mpParser ) throw DisposedException(); }
+ void checkDispose() { if( !mpParser ) throw DisposedException(); }
//XLocator
- virtual sal_Int32 SAL_CALL getColumnNumber() throw (RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL getLineNumber() throw (RuntimeException, std::exception) override;
- virtual OUString SAL_CALL getPublicId() throw (RuntimeException, std::exception) override;
- virtual OUString SAL_CALL getSystemId() throw (RuntimeException, std::exception) override;
+ virtual sal_Int32 SAL_CALL getColumnNumber() override;
+ virtual sal_Int32 SAL_CALL getLineNumber() override;
+ virtual OUString SAL_CALL getPublicId() override;
+ virtual OUString SAL_CALL getSystemId() override;
private:
FastSaxParserImpl *mpParser;
};
-sal_Int32 SAL_CALL FastLocatorImpl::getColumnNumber() throw (RuntimeException, std::exception)
+sal_Int32 SAL_CALL FastLocatorImpl::getColumnNumber()
{
checkDispose();
return xmlSAX2GetColumnNumber( mpParser->getEntity().mpParser );
}
-sal_Int32 SAL_CALL FastLocatorImpl::getLineNumber() throw (RuntimeException, std::exception)
+sal_Int32 SAL_CALL FastLocatorImpl::getLineNumber()
{
checkDispose();
return xmlSAX2GetLineNumber( mpParser->getEntity().mpParser );
}
-OUString SAL_CALL FastLocatorImpl::getPublicId() throw (RuntimeException, std::exception)
+OUString SAL_CALL FastLocatorImpl::getPublicId()
{
checkDispose();
return mpParser->getEntity().maStructSource.sPublicId;
}
-OUString SAL_CALL FastLocatorImpl::getSystemId() throw (RuntimeException, std::exception)
+OUString SAL_CALL FastLocatorImpl::getSystemId()
{
checkDispose();
return mpParser->getEntity().maStructSource.sSystemId;
@@ -663,7 +663,7 @@ sal_Int32 FastSaxParserImpl::GetToken( const xmlChar* pName, sal_Int32 nameLen /
XML_CAST( pName ), nameLen ); // uses utf-8
}
-sal_Int32 FastSaxParserImpl::GetTokenWithPrefix( const xmlChar* pPrefix, int nPrefixLen, const xmlChar* pName, int nNameLen ) throw (SAXException)
+sal_Int32 FastSaxParserImpl::GetTokenWithPrefix( const xmlChar* pPrefix, int nPrefixLen, const xmlChar* pName, int nNameLen )
{
sal_Int32 nNamespaceToken = FastToken::DONTKNOW;
@@ -706,7 +706,7 @@ sal_Int32 FastSaxParserImpl::GetNamespaceToken( const OUString& rNamespaceURL )
return FastToken::DONTKNOW;
}
-OUString FastSaxParserImpl::GetNamespaceURL( const OString& rPrefix ) throw (SAXException)
+OUString FastSaxParserImpl::GetNamespaceURL( const OString& rPrefix )
{
Entity& rEntity = getEntity();
if( !rEntity.maNamespaceCount.empty() )
@@ -740,7 +740,6 @@ sal_Int32 FastSaxParserImpl::GetTokenWithContextNamespace( sal_Int32 nNamespaceT
*
****************/
void FastSaxParserImpl::parseStream(const InputSource& maStructSource)
- throw (SAXException, IOException, RuntimeException, std::exception)
{
xmlInitParser();
@@ -858,18 +857,18 @@ void FastSaxParserImpl::parseStream(const InputSource& maStructSource)
popEntity();
}
-void FastSaxParserImpl::setFastDocumentHandler( const Reference< XFastDocumentHandler >& Handler ) throw (RuntimeException)
+void FastSaxParserImpl::setFastDocumentHandler( const Reference< XFastDocumentHandler >& Handler )
{
maData.mxDocumentHandler = Handler;
}
-void FastSaxParserImpl::setTokenHandler( const Reference< XFastTokenHandler >& xHandler ) throw (RuntimeException)
+void FastSaxParserImpl::setTokenHandler( const Reference< XFastTokenHandler >& xHandler )
{
maData.mxTokenHandler = xHandler;
maData.mpTokenHandler = dynamic_cast< FastTokenHandlerBase *>( xHandler.get() );
}
-void FastSaxParserImpl::registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) throw (IllegalArgumentException, RuntimeException)
+void FastSaxParserImpl::registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken )
{
if( NamespaceToken >= FastToken::NAMESPACE )
{
@@ -882,7 +881,7 @@ void FastSaxParserImpl::registerNamespace( const OUString& NamespaceURL, sal_Int
throw IllegalArgumentException();
}
-OUString FastSaxParserImpl::getNamespaceURL( const OUString& rPrefix ) throw(IllegalArgumentException, RuntimeException)
+OUString FastSaxParserImpl::getNamespaceURL( const OUString& rPrefix )
{
try
{
@@ -894,22 +893,22 @@ OUString FastSaxParserImpl::getNamespaceURL( const OUString& rPrefix ) throw(Ill
throw IllegalArgumentException();
}
-void FastSaxParserImpl::setErrorHandler(const Reference< XErrorHandler > & Handler) throw (RuntimeException)
+void FastSaxParserImpl::setErrorHandler(const Reference< XErrorHandler > & Handler)
{
maData.mxErrorHandler = Handler;
}
-void FastSaxParserImpl::setEntityResolver(const Reference < XEntityResolver > & Resolver) throw (RuntimeException)
+void FastSaxParserImpl::setEntityResolver(const Reference < XEntityResolver > & Resolver)
{
maData.mxEntityResolver = Resolver;
}
-void FastSaxParserImpl::setLocale( const lang::Locale & Locale ) throw (RuntimeException)
+void FastSaxParserImpl::setLocale( const lang::Locale & Locale )
{
maData.maLocale = Locale;
}
-void FastSaxParserImpl::setNamespaceHandler( const Reference< XFastNamespaceHandler >& Handler ) throw (RuntimeException)
+void FastSaxParserImpl::setNamespaceHandler( const Reference< XFastNamespaceHandler >& Handler )
{
maData.mxNamespaceHandler = Handler;
}
@@ -1366,7 +1365,6 @@ FastSaxParser::~FastSaxParser()
void SAL_CALL
FastSaxParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments)
- throw (css::uno::RuntimeException, css::uno::Exception, std::exception)
{
if (rArguments.getLength())
{
@@ -1383,74 +1381,61 @@ FastSaxParser::initialize(css::uno::Sequence< css::uno::Any > const& rArguments)
}
void FastSaxParser::parseStream( const xml::sax::InputSource& aInputSource )
- throw (xml::sax::SAXException, io::IOException,
- uno::RuntimeException, std::exception)
{
mpImpl->parseStream(aInputSource);
}
void FastSaxParser::setFastDocumentHandler( const uno::Reference<xml::sax::XFastDocumentHandler>& Handler )
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setFastDocumentHandler(Handler);
}
void FastSaxParser::setTokenHandler( const uno::Reference<xml::sax::XFastTokenHandler>& Handler )
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setTokenHandler(Handler);
}
void FastSaxParser::registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken )
- throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
mpImpl->registerNamespace(NamespaceURL, NamespaceToken);
}
OUString FastSaxParser::getNamespaceURL( const OUString& rPrefix )
- throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception)
{
return mpImpl->getNamespaceURL(rPrefix);
}
void FastSaxParser::setErrorHandler( const uno::Reference< xml::sax::XErrorHandler >& Handler )
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setErrorHandler(Handler);
}
void FastSaxParser::setEntityResolver( const uno::Reference< xml::sax::XEntityResolver >& Resolver )
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setEntityResolver(Resolver);
}
void FastSaxParser::setLocale( const lang::Locale& rLocale )
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setLocale(rLocale);
}
void FastSaxParser::setNamespaceHandler( const uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler)
- throw (uno::RuntimeException, std::exception)
{
mpImpl->setNamespaceHandler(Handler);
}
OUString FastSaxParser::getImplementationName()
- throw (uno::RuntimeException, std::exception)
{
return OUString("com.sun.star.comp.extensions.xml.sax.FastParser");
}
sal_Bool FastSaxParser::supportsService( const OUString& ServiceName )
- throw (uno::RuntimeException, std::exception)
{
return cppu::supportsService(this, ServiceName);
}
uno::Sequence<OUString> FastSaxParser::getSupportedServiceNames()
- throw (uno::RuntimeException, std::exception)
{
Sequence<OUString> seq { "com.sun.star.xml.sax.FastParser" };
return seq;
diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx
index dbcc03ff97b4..2c70d5327da6 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -58,10 +58,8 @@ public:
void addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList );
//XFastNamespaceHandler
- virtual void SAL_CALL registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI )
- throw (RuntimeException, exception) override;
- virtual OUString SAL_CALL getNamespaceURI( const OUString& rNamespacePrefix )
- throw (RuntimeException, exception) override;
+ virtual void SAL_CALL registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI ) override;
+ virtual OUString SAL_CALL getNamespaceURI( const OUString& rNamespacePrefix ) override;
};
NamespaceHandler::NamespaceHandler()
@@ -85,14 +83,12 @@ void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::Attribu
}
void NamespaceHandler::registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI )
- throw (RuntimeException, exception)
{
m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>(
rNamespacePrefix, rNamespaceURI) );
}
OUString NamespaceHandler::getNamespaceURI( const OUString&/* rNamespacePrefix */ )
- throw (RuntimeException, exception)
{
return OUString();
}
@@ -105,27 +101,20 @@ public:
SaxLegacyFastParser();
// css::lang::XInitialization:
- virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments)
- throw (RuntimeException, Exception, exception) override;
+ virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments) override;
// The SAX-Parser-Interface
- virtual void SAL_CALL parseStream( const InputSource& structSource)
- throw ( SAXException, IOException, RuntimeException, exception) override;
- virtual void SAL_CALL setDocumentHandler(const Reference< XDocumentHandler > & xHandler)
- throw (RuntimeException, exception) override;
- virtual void SAL_CALL setErrorHandler(const Reference< XErrorHandler > & xHandler)
- throw (RuntimeException, exception) override;
- virtual void SAL_CALL setDTDHandler(const Reference < XDTDHandler > & xHandler)
- throw (RuntimeException, exception) override;
- virtual void SAL_CALL setEntityResolver(const Reference< XEntityResolver >& xResolver)
- throw (RuntimeException, exception) override;
- virtual void SAL_CALL setLocale( const Locale &locale )
- throw (RuntimeException, exception) override;
+ virtual void SAL_CALL parseStream( const InputSource& structSource) override;
+ virtual void SAL_CALL setDocumentHandler(const Reference< XDocumentHandler > & xHandler) override;
+ virtual void SAL_CALL setErrorHandler(const Reference< XErrorHandler > & xHandler) override;
+ virtual void SAL_CALL setDTDHandler(const Reference < XDTDHandler > & xHandler) override;
+ virtual void SAL_CALL setEntityResolver(const Reference< XEntityResolver >& xResolver) override;
+ virtual void SAL_CALL setLocale( const Locale &locale ) override;
// XServiceInfo
- OUString SAL_CALL getImplementationName() throw (exception) override;
- Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (exception) override;
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (exception) override;
+ OUString SAL_CALL getImplementationName() override;
+ Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
private:
Reference< XFastParser > m_xParser;
@@ -150,18 +139,18 @@ public:
Reference< XFastTokenHandler > const & xTokenHandler);
// XFastDocumentHandler
- virtual void SAL_CALL startDocument() throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endDocument() 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 setDocumentLocator( const Reference< XLocator >& xLocator ) override;
// XFastContextHandler
- virtual void SAL_CALL startFastElement( sal_Int32 nElement, const Reference< XFastAttributeList >& Attribs ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endFastElement( sal_Int32 Element ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL endUnknownElement( const OUString& Namespace, const OUString& Name ) throw (SAXException, RuntimeException, exception) override;
- virtual Reference< XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList >& Attribs ) throw (SAXException, RuntimeException, exception) override;
- virtual Reference< XFastContextHandler > SAL_CALL createUnknownChildContext( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs ) throw (SAXException, RuntimeException, exception) override;
- virtual void SAL_CALL characters( const OUString& aChars ) throw (SAXException, RuntimeException, exception) override;
+ virtual void SAL_CALL startFastElement( sal_Int32 nElement, const Reference< XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL endFastElement( sal_Int32 Element ) override;
+ virtual void SAL_CALL endUnknownElement( const OUString& Namespace, const OUString& Name ) override;
+ virtual Reference< XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList >& Attribs ) override;
+ virtual Reference< XFastContextHandler > SAL_CALL createUnknownChildContext( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs ) override;
+ virtual void SAL_CALL characters( const OUString& aChars ) override;
};
@@ -194,35 +183,30 @@ CallbackDocumentHandler::CallbackDocumentHandler( Reference< XDocumentHandler >
}
void SAL_CALL CallbackDocumentHandler::startDocument()
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
m_xDocumentHandler->startDocument();
}
void SAL_CALL CallbackDocumentHandler::endDocument()
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
m_xDocumentHandler->endDocument();
}
void SAL_CALL CallbackDocumentHandler::setDocumentLocator( const Reference< XLocator >& xLocator )
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
m_xDocumentHandler->setDocumentLocator( xLocator );
}
void SAL_CALL CallbackDocumentHandler::startFastElement( sal_Int32 nElement , const Reference< XFastAttributeList >& Attribs )
- throw (SAXException, RuntimeException, exception)
{
startUnknownElement( CallbackDocumentHandler::getNamespacePrefixFromToken( nElement ),
CallbackDocumentHandler::getNameFromToken( nElement ), Attribs );
}
void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
{
@@ -265,7 +249,6 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& Name
}
void SAL_CALL CallbackDocumentHandler::endFastElement( sal_Int32 nElement )
- throw (SAXException, RuntimeException, exception)
{
endUnknownElement( CallbackDocumentHandler::getNamespacePrefixFromToken( nElement ),
CallbackDocumentHandler::getNameFromToken( nElement ) );
@@ -273,7 +256,6 @@ void SAL_CALL CallbackDocumentHandler::endFastElement( sal_Int32 nElement )
void SAL_CALL CallbackDocumentHandler::endUnknownElement( const OUString& Namespace, const OUString& Name )
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
{
@@ -287,20 +269,17 @@ void SAL_CALL CallbackDocumentHandler::endUnknownElement( const OUString& Namesp
}
Reference< XFastContextHandler > SAL_CALL CallbackDocumentHandler::createFastChildContext( sal_Int32/* nElement */, const Reference< XFastAttributeList >&/* Attribs */ )
- throw (SAXException, RuntimeException, exception)
{
return this;
}
Reference< XFastContextHandler > SAL_CALL CallbackDocumentHandler::createUnknownChildContext( const OUString&/* Namespace */, const OUString&/* Name */, const Reference< XFastAttributeList >&/* Attribs */ )
- throw (SAXException, RuntimeException, exception)
{
return this;
}
void SAL_CALL CallbackDocumentHandler::characters( const OUString& aChars )
- throw (SAXException, RuntimeException, exception)
{
if ( m_xDocumentHandler.is() )
m_xDocumentHandler->characters( aChars );
@@ -314,7 +293,6 @@ SaxLegacyFastParser::SaxLegacyFastParser( ) : m_aNamespaceHandler( new Namespace
}
void SAL_CALL SaxLegacyFastParser::initialize(Sequence< Any > const& rArguments )
- throw (RuntimeException, Exception, exception)
{
if (rArguments.getLength())
{
@@ -343,9 +321,6 @@ void SAL_CALL SaxLegacyFastParser::initialize(Sequence< Any > const& rArguments
}
void SaxLegacyFastParser::parseStream( const InputSource& structSource )
- throw ( SAXException,
- IOException,
- RuntimeException, exception)
{
m_xParser->setFastDocumentHandler( new CallbackDocumentHandler( m_xDocumentHandler.get(),
m_aNamespaceHandler.get(), m_xTokenHandler.get() ) );
@@ -354,46 +329,41 @@ void SaxLegacyFastParser::parseStream( const InputSource& structSource )
}
void SaxLegacyFastParser::setDocumentHandler( const Reference< XDocumentHandler > & xHandler )
- throw (RuntimeException, exception)
{
m_xDocumentHandler = xHandler;
}
void SaxLegacyFastParser::setErrorHandler( const Reference< XErrorHandler > & xHandler )
- throw (RuntimeException, exception)
{
m_xParser->setErrorHandler( xHandler );
}
void SaxLegacyFastParser::setDTDHandler( const Reference < XDTDHandler > &/* xHandler */ )
- throw (RuntimeException, exception)
{
}
void SaxLegacyFastParser::setEntityResolver( const Reference< XEntityResolver >& xResolver )
- throw (RuntimeException, exception)
{
m_xParser->setEntityResolver( xResolver );
}
void SaxLegacyFastParser::setLocale( const Locale &locale )
- throw (RuntimeException, exception)
{
m_xParser->setLocale( locale );
}
-OUString SaxLegacyFastParser::getImplementationName() throw (exception)
+OUString SaxLegacyFastParser::getImplementationName()
{
return OUString("com.sun.star.comp.extensions.xml.sax.LegacyFastParser");
}
-sal_Bool SaxLegacyFastParser::supportsService(const OUString& ServiceName) throw (exception)
+sal_Bool SaxLegacyFastParser::supportsService(const OUString& ServiceName)
{
return cppu::supportsService(this, ServiceName);
}
-Sequence< OUString > SaxLegacyFastParser::getSupportedServiceNames() throw (exception)
+Sequence< OUString > SaxLegacyFastParser::getSupportedServiceNames()
{
Sequence<OUString> seq { "com.sun.star.xml.sax.LegacyFastParser" };
return seq;
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index e9ae452a7aca..01a50f7d39d9 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -118,7 +118,7 @@ void FastAttributeList::addUnknown( const OString& rName, const OString& value )
}
// XFastAttributeList
-sal_Bool FastAttributeList::hasAttribute( ::sal_Int32 Token ) throw (RuntimeException, std::exception)
+sal_Bool FastAttributeList::hasAttribute( ::sal_Int32 Token )
{
for (sal_Int32 i : maAttributeTokens)
if (i == Token)
@@ -127,7 +127,7 @@ sal_Bool FastAttributeList::hasAttribute( ::sal_Int32 Token ) throw (RuntimeExce
return false;
}
-sal_Int32 FastAttributeList::getValueToken( ::sal_Int32 Token ) throw (SAXException, RuntimeException, std::exception)
+sal_Int32 FastAttributeList::getValueToken( ::sal_Int32 Token )
{
for (size_t i = 0; i < maAttributeTokens.size(); ++i)
if (maAttributeTokens[i] == Token)
@@ -139,7 +139,7 @@ sal_Int32 FastAttributeList::getValueToken( ::sal_Int32 Token ) throw (SAXExcept
throw SAXException();
}
-sal_Int32 FastAttributeList::getOptionalValueToken( ::sal_Int32 Token, ::sal_Int32 Default ) throw (RuntimeException, std::exception)
+sal_Int32 FastAttributeList::getOptionalValueToken( ::sal_Int32 Token, ::sal_Int32 Default )
{
for (size_t i = 0; i < maAttributeTokens.size(); ++i)
if (maAttributeTokens[i] == Token)
@@ -191,7 +191,7 @@ bool FastAttributeList::getAsChar( sal_Int32 nToken, const char*& rPos ) const
return false;
}
-OUString FastAttributeList::getValue( ::sal_Int32 Token ) throw (SAXException, RuntimeException, std::exception)
+OUString FastAttributeList::getValue( ::sal_Int32 Token )
{
for (size_t i = 0; i < maAttributeTokens.size(); ++i)
if (maAttributeTokens[i] == Token)
@@ -200,7 +200,7 @@ OUString FastAttributeList::getValue( ::sal_Int32 Token ) throw (SAXException, R
throw SAXException();
}
-OUString FastAttributeList::getOptionalValue( ::sal_Int32 Token ) throw (RuntimeException, std::exception)
+OUString FastAttributeList::getOptionalValue( ::sal_Int32 Token )
{
for (size_t i = 0; i < maAttributeTokens.size(); ++i)
if (maAttributeTokens[i] == Token)
@@ -208,7 +208,7 @@ OUString FastAttributeList::getOptionalValue( ::sal_Int32 Token ) throw (Runtime
return OUString();
}
-Sequence< Attribute > FastAttributeList::getUnknownAttributes( ) throw (RuntimeException, std::exception)
+Sequence< Attribute > FastAttributeList::getUnknownAttributes( )
{
Sequence< Attribute > aSeq( maUnknownAttributes.size() );
Attribute* pAttr = aSeq.getArray();
@@ -216,7 +216,7 @@ Sequence< Attribute > FastAttributeList::getUnknownAttributes( ) throw (Runtime
(*attrIter).FillAttribute( pAttr++ );
return aSeq;
}
-Sequence< FastAttribute > FastAttributeList::getFastAttributes( ) throw (RuntimeException, std::exception)
+Sequence< FastAttribute > FastAttributeList::getFastAttributes( )
{
Sequence< FastAttribute > aSeq( maAttributeTokens.size() );
FastAttribute* pAttr = aSeq.getArray();