Kaydet (Commit) 9decde00 authored tarafından Michael Stahl's avatar Michael Stahl

sax: FastSaxSerializer: cannot do anything without a stream

Change-Id: If2fbfe776039fe1a3104d541279ab52f219f45bf
üst 0c220608
...@@ -73,6 +73,7 @@ namespace sax_fastparser { ...@@ -73,6 +73,7 @@ namespace sax_fastparser {
void SAL_CALL FastSaxSerializer::startDocument( ) throw (SAXException, RuntimeException) void SAL_CALL FastSaxSerializer::startDocument( ) throw (SAXException, RuntimeException)
{ {
assert(mxOutputStream.is()); // cannot do anything without that
if (!mxOutputStream.is()) if (!mxOutputStream.is())
return; return;
rtl::ByteSequence aXmlHeader((const sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56); rtl::ByteSequence aXmlHeader((const sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56);
...@@ -186,6 +187,7 @@ namespace sax_fastparser { ...@@ -186,6 +187,7 @@ namespace sax_fastparser {
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
mxOutputStream = xOutputStream; mxOutputStream = xOutputStream;
assert(mxOutputStream.is()); // cannot do anything without that
} }
void SAL_CALL FastSaxSerializer::setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler ) void SAL_CALL FastSaxSerializer::setFastTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& xFastTokenHandler )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment