summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-27 22:04:13 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-10-23 11:53:17 +0200
commitb98b477c084c876a3a65583dbfed5c1f5f8bfe12 (patch)
treece12d03d8324e86fcc46f4299ee77dcebb00162f /sax
parent20538c25129ebadfa2050c0071887e1e2a46c838 (diff)
FastSerializer: Remove throw specs; this is not UNO implementation
Change-Id: I462f8ed89de48174ed7aa6e008709963bec50649
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/fastserializer.cxx34
-rw-r--r--sax/source/tools/fastserializer.hxx36
2 files changed, 27 insertions, 43 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 455df0b09aee..f2f8bc66c7b8 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -18,14 +18,14 @@
*/
#include "fastserializer.hxx"
-#include <rtl/ustrbuf.hxx>
-
-#include <comphelper/sequenceasvector.hxx>
#include <com/sun/star/xml/Attribute.hpp>
#include <com/sun/star/xml/FastAttribute.hpp>
#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+#include <rtl/ustrbuf.hxx>
+#include <comphelper/sequenceasvector.hxx>
+
#include <string.h>
#if OSL_DEBUG_LEVEL > 0
@@ -73,7 +73,7 @@ namespace sax_fastparser {
}
FastSaxSerializer::~FastSaxSerializer() {}
- void SAL_CALL FastSaxSerializer::startDocument( ) throw (SAXException, RuntimeException)
+ void FastSaxSerializer::startDocument()
{
writeBytes(sXmlHeader, N_CHARS(sXmlHeader));
}
@@ -110,13 +110,13 @@ namespace sax_fastparser {
}
}
- void SAL_CALL FastSaxSerializer::endDocument( ) throw (SAXException, RuntimeException)
+ void FastSaxSerializer::endDocument()
{
maOutputStream.flush();
mxOutputStream->writeBytes(maOutputData);
}
- void SAL_CALL FastSaxSerializer::writeId( ::sal_Int32 nElement )
+ void FastSaxSerializer::writeId( ::sal_Int32 nElement )
{
if( HAS_NAMESPACE( nElement ) ) {
writeBytes(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
@@ -127,7 +127,7 @@ namespace sax_fastparser {
}
#ifdef DBG_UTIL
- OString SAL_CALL FastSaxSerializer::getId( ::sal_Int32 nElement )
+ OString FastSaxSerializer::getId( ::sal_Int32 nElement )
{
if (HAS_NAMESPACE(nElement)) {
Sequence<sal_Int8> const ns(
@@ -145,8 +145,7 @@ namespace sax_fastparser {
}
#endif
- void SAL_CALL FastSaxSerializer::startFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
- throw (SAXException, RuntimeException)
+ void FastSaxSerializer::startFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
{
if ( !maMarkStack.empty() )
maMarkStack.top()->setCurrentElement( Element );
@@ -163,8 +162,7 @@ namespace sax_fastparser {
writeBytes(sClosingBracket, N_CHARS(sClosingBracket));
}
- void SAL_CALL FastSaxSerializer::endFastElement( ::sal_Int32 Element )
- throw (SAXException, RuntimeException)
+ void FastSaxSerializer::endFastElement( ::sal_Int32 Element )
{
#ifdef DBG_UTIL
assert(!m_DebugStartedElements.empty());
@@ -180,8 +178,7 @@ namespace sax_fastparser {
writeBytes(sClosingBracket, N_CHARS(sClosingBracket));
}
- void SAL_CALL FastSaxSerializer::singleFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
- throw (SAXException, RuntimeException)
+ void FastSaxSerializer::singleFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
{
if ( !maMarkStack.empty() )
maMarkStack.top()->setCurrentElement( Element );
@@ -194,14 +191,12 @@ namespace sax_fastparser {
writeBytes(sSlashAndClosingBracket, N_CHARS(sSlashAndClosingBracket));
}
- void SAL_CALL FastSaxSerializer::setOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream )
- throw (::com::sun::star::uno::RuntimeException)
+ void FastSaxSerializer::setOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream )
{
mxOutputStream = xOutputStream;
}
- void SAL_CALL FastSaxSerializer::setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler )
- throw (::com::sun::star::uno::RuntimeException)
+ void FastSaxSerializer::setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler )
{
mxFastTokenHandler = xFastTokenHandler;
}
@@ -295,13 +290,11 @@ namespace sax_fastparser {
}
void FastSaxSerializer::writeBytes( const Sequence< sal_Int8 >& rData )
- throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
{
writeBytes( reinterpret_cast<const char*>(rData.getConstArray()), rData.getLength() );
}
void FastSaxSerializer::writeBytes( const char* pStr, size_t nLen )
- throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
{
if ( maMarkStack.empty() )
writeOutput( reinterpret_cast<const sal_Int8*>(pStr), nLen );
@@ -310,13 +303,12 @@ namespace sax_fastparser {
reinterpret_cast<const sal_Int8*>(pStr), nLen) );
}
- void FastSaxSerializer::writeOutput( const Sequence< ::sal_Int8 >& aData ) throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
+ void FastSaxSerializer::writeOutput( const Sequence< ::sal_Int8 >& aData )
{
writeOutput( aData.getConstArray(), aData.getLength() );
}
void FastSaxSerializer::writeOutput( const sal_Int8* pStr, size_t nLen )
- throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
{
maOutputStream.writeBytes( pStr, nLen );
// Write when the sequence gets big enough
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index b84c1cc48c40..82e9eeaddb01 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -41,18 +41,18 @@ class FastSaxSerializer
typedef ::com::sun::star::uno::Sequence< ::sal_Int32 > Int32Sequence;
public:
- explicit FastSaxSerializer();
+ FastSaxSerializer();
~FastSaxSerializer();
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > getOutputStream() {return mxOutputStream;}
/** called by the parser when parsing of an XML stream is started.
*/
- void SAL_CALL startDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ void startDocument();
/** called by the parser after the last XML element of a stream is processed.
*/
- void SAL_CALL endDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ void endDocument();
/** receives notification of the beginning of an element.
@@ -71,14 +71,12 @@ public:
from the element.
*/
- void SAL_CALL startFastElement( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
- throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ void startFastElement( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
/** receives notification of the end of an known element.
@see startFastElement
*/
- void SAL_CALL endFastElement( ::sal_Int32 Element )
- throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ void endFastElement( ::sal_Int32 Element );
/** receives notification of the beginning of a single element.
@@ -97,18 +95,14 @@ public:
from the element.
*/
- void SAL_CALL singleFastElement( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
- throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ void singleFastElement( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
- void SAL_CALL setOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream )
- throw (::com::sun::star::uno::RuntimeException);
-
- void SAL_CALL setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler )
- throw (::com::sun::star::uno::RuntimeException);
+ void setOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream );
+ void setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler );
// C++ helpers
- void SAL_CALL writeId( ::sal_Int32 Element );
- OString SAL_CALL getId( ::sal_Int32 Element );
+ void writeId( ::sal_Int32 Element );
+ OString getId( ::sal_Int32 Element );
void write( const OUString& s, bool bEscape = false );
void write( const OString& s, bool bEscape = false );
@@ -214,17 +208,15 @@ private:
void writeFastAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
/// Write to maOutputData and if it's big enough flush that to mxOutputStream
- void writeOutput( const sal_Int8* pStr, size_t nLen )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException);
- void writeOutput( const css::uno::Sequence< ::sal_Int8 >& aData )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException);
+ void writeOutput( const sal_Int8* pStr, size_t nLen );
+ void writeOutput( const css::uno::Sequence< ::sal_Int8 >& aData );
/** Forward the call to the output stream, or write to the stack.
The latter in the case that we are inside a mark().
*/
- void writeBytes( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
- void writeBytes( const char* pStr, size_t nLen ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ void writeBytes( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aData );
+ void writeBytes( const char* pStr, size_t nLen );
};
} // namespace sax_fastparser