summaryrefslogtreecommitdiff
path: root/svl/source/fsstor/ostreamcontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/fsstor/ostreamcontainer.cxx')
-rw-r--r--svl/source/fsstor/ostreamcontainer.cxx37
1 files changed, 13 insertions, 24 deletions
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index a26077b3c1f4..85a919df2b7c 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -20,6 +20,7 @@
#include "ostreamcontainer.hxx"
#include <cppuhelper/queryinterface.hxx>
+#include <comphelper/sequence.hxx>
using namespace ::com::sun::star;
@@ -28,7 +29,6 @@ OFSStreamContainer::OFSStreamContainer( const uno::Reference < io::XStream >& xS
: m_bDisposed( false )
, m_bInputClosed( false )
, m_bOutputClosed( false )
-, m_pTypeCollection( nullptr )
{
try
{
@@ -137,42 +137,31 @@ void SAL_CALL OFSStreamContainer::release()
// XTypeProvider
uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes()
{
- if ( m_pTypeCollection == nullptr )
+ if ( m_aTypes.getLength() == 0 )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pTypeCollection == nullptr )
+ if ( m_aTypes.getLength() == 0 )
{
- ::cppu::OTypeCollection aTypeCollection
- ( cppu::UnoType<lang::XTypeProvider>::get()
- , cppu::UnoType<embed::XExtendedStorageStream>::get());
+ std::vector<uno::Type> tmp;
+ tmp.push_back(cppu::UnoType<lang::XTypeProvider>::get());
+ tmp.push_back(cppu::UnoType<embed::XExtendedStorageStream>::get());
if ( m_xSeekable.is() )
- aTypeCollection = ::cppu::OTypeCollection
- ( cppu::UnoType<io::XSeekable>::get(),
- aTypeCollection.getTypes() );
+ tmp.push_back(cppu::UnoType<io::XSeekable>::get());
if ( m_xInputStream.is() )
- aTypeCollection = ::cppu::OTypeCollection
- ( cppu::UnoType<io::XInputStream>::get(),
- aTypeCollection.getTypes() );
-
+ tmp.push_back(cppu::UnoType<io::XInputStream>::get());
if ( m_xOutputStream.is() )
- aTypeCollection = ::cppu::OTypeCollection
- ( cppu::UnoType<io::XOutputStream>::get(),
- aTypeCollection.getTypes() );
+ tmp.push_back(cppu::UnoType<io::XOutputStream>::get());
if ( m_xTruncate.is() )
- aTypeCollection = ::cppu::OTypeCollection
- ( cppu::UnoType<io::XTruncate>::get(),
- aTypeCollection.getTypes() );
+ tmp.push_back(cppu::UnoType<io::XTruncate>::get());
if ( m_xAsyncOutputMonitor.is() )
- aTypeCollection = ::cppu::OTypeCollection
- ( cppu::UnoType<io::XAsyncOutputMonitor>::get(),
- aTypeCollection.getTypes() );
+ tmp.push_back(cppu::UnoType<io::XAsyncOutputMonitor>::get());
- m_pTypeCollection = new ::cppu::OTypeCollection( aTypeCollection );
+ m_aTypes = comphelper::containerToSequence(tmp);
}
}
- return m_pTypeCollection->getTypes() ;
+ return m_aTypes;
}
uno::Sequence< sal_Int8 > SAL_CALL OFSStreamContainer::getImplementationId()