summaryrefslogtreecommitdiff
path: root/comphelper/source/streaming/seqoutputstreamserv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/streaming/seqoutputstreamserv.cxx')
-rw-r--r--comphelper/source/streaming/seqoutputstreamserv.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index cadc691c8f03..757df72c3f58 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -112,6 +112,7 @@ void SAL_CALL SequenceOutputStreamService::closeOutput()
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();
+ m_xOutputStream->flush();
m_xOutputStream->closeOutput();
m_xOutputStream.clear();
}
@@ -120,10 +121,13 @@ void SAL_CALL SequenceOutputStreamService::closeOutput()
uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes()
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_xOutputStream.is() )
- throw io::NotConnectedException();
- m_xOutputStream->flush();
+ if (m_xOutputStream.is())
+ {
+ m_xOutputStream->flush();
+ }
+ // else: no exception, just return the finished sequence
+
return m_aSequence;
}