diff options
Diffstat (limited to 'package/source/xstor')
-rw-r--r-- | package/source/xstor/disposelistener.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/disposelistener.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/ocompinstream.cxx | 36 | ||||
-rw-r--r-- | package/source/xstor/ocompinstream.hxx | 14 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 4 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/oseekinstream.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/oseekinstream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 282 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.hxx | 34 | ||||
-rw-r--r-- | package/source/xstor/register.cxx | 10 | ||||
-rw-r--r-- | package/source/xstor/selfterminatefilestream.cxx | 14 | ||||
-rw-r--r-- | package/source/xstor/selfterminatefilestream.hxx | 12 | ||||
-rw-r--r-- | package/source/xstor/switchpersistencestream.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/switchpersistencestream.hxx | 4 | ||||
-rw-r--r-- | package/source/xstor/xfactory.cxx | 20 | ||||
-rw-r--r-- | package/source/xstor/xfactory.hxx | 4 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 244 | ||||
-rw-r--r-- | package/source/xstor/xstorage.hxx | 108 |
19 files changed, 403 insertions, 403 deletions
diff --git a/package/source/xstor/disposelistener.cxx b/package/source/xstor/disposelistener.cxx index 97b06e790051..312c77d040f9 100644 --- a/package/source/xstor/disposelistener.cxx +++ b/package/source/xstor/disposelistener.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/package/source/xstor/disposelistener.hxx b/package/source/xstor/disposelistener.hxx index 8c8e02096027..54b336688ec1 100644 --- a/package/source/xstor/disposelistener.hxx +++ b/package/source/xstor/disposelistener.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx index 50333b0d4982..446e33996c53 100644 --- a/package/source/xstor/ocompinstream.cxx +++ b/package/source/xstor/ocompinstream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,7 +55,7 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl, OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex is provided!\n" ); if ( !m_pImpl->m_rMutexRef.Is() ) throw uno::RuntimeException(); // just a disaster - + OSL_ENSURE( xStream.is(), "No stream is provided!\n" ); } @@ -99,12 +99,12 @@ uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType ) // common interfaces aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XInputStream*> ( this ) - , static_cast<io::XStream*> ( this ) - , static_cast<lang::XComponent*> ( this ) - , static_cast<beans::XPropertySet*> ( this ) - , static_cast<embed::XExtendedStorageStream*> ( this ) ); + ( rType + , static_cast<io::XInputStream*> ( this ) + , static_cast<io::XStream*> ( this ) + , static_cast<lang::XComponent*> ( this ) + , static_cast<beans::XPropertySet*> ( this ) + , static_cast<embed::XExtendedStorageStream*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -112,9 +112,9 @@ uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType ) if ( m_nStorageType == embed::StorageFormats::OFOPXML ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XRelationshipAccess*> ( this ) ); - + ( rType + , static_cast<embed::XRelationshipAccess*> ( this ) ); + if ( aReturn.hasValue() == sal_True ) return aReturn ; } @@ -123,7 +123,7 @@ uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType ) } //----------------------------------------------- -sal_Int32 SAL_CALL OInputCompStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) +sal_Int32 SAL_CALL OInputCompStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -146,7 +146,7 @@ sal_Int32 SAL_CALL OInputCompStream::readBytes( uno::Sequence< sal_Int8 >& aData } //----------------------------------------------- -sal_Int32 SAL_CALL OInputCompStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) +sal_Int32 SAL_CALL OInputCompStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -170,7 +170,7 @@ sal_Int32 SAL_CALL OInputCompStream::readSomeBytes( uno::Sequence< sal_Int8 >& a } //----------------------------------------------- -void SAL_CALL OInputCompStream::skipBytes( sal_Int32 nBytesToSkip ) +void SAL_CALL OInputCompStream::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -194,7 +194,7 @@ void SAL_CALL OInputCompStream::skipBytes( sal_Int32 nBytesToSkip ) } //----------------------------------------------- -sal_Int32 SAL_CALL OInputCompStream::available( ) +sal_Int32 SAL_CALL OInputCompStream::available( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -217,7 +217,7 @@ sal_Int32 SAL_CALL OInputCompStream::available( ) } //----------------------------------------------- -void SAL_CALL OInputCompStream::closeInput( ) +void SAL_CALL OInputCompStream::closeInput( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -449,7 +449,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByI return aSeq[nInd1]; break; } - + throw container::NoSuchElementException(); } @@ -679,7 +679,7 @@ uno::Any SAL_CALL OInputCompStream::getPropertyValue( const ::rtl::OUString& aPr //----------------------------------------------- -void SAL_CALL OInputCompStream::addPropertyChangeListener( +void SAL_CALL OInputCompStream::addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) throw ( beans::UnknownPropertyException, diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx index 98bafe333efb..c585f18fc4bb 100644 --- a/package/source/xstor/ocompinstream.hxx +++ b/package/source/xstor/ocompinstream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,19 +78,19 @@ public: void InternalDispose(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException ); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) + virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available( ) + virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput( ) + virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); //XStream diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index d36fd2d23895..6f0b3c5ec883 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -276,7 +276,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source throw ( uno::RuntimeException ) { uno::Sequence< embed::XStorage > aStoragesToCommit; - + try { ::osl::ClearableMutexGuard aGuard( m_aMutex ); diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx index cc6fb1e211d9..6fff34c17f75 100644 --- a/package/source/xstor/ohierarchyholder.hxx +++ b/package/source/xstor/ohierarchyholder.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/package/source/xstor/oseekinstream.cxx b/package/source/xstor/oseekinstream.cxx index 0c8ee1527b0d..229bba9ebb7f 100644 --- a/package/source/xstor/oseekinstream.cxx +++ b/package/source/xstor/oseekinstream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,7 +92,7 @@ uno::Any SAL_CALL OInputSeekStream::queryInterface( const uno::Type& rType ) throw( uno::RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. uno::Any aReturn( ::cppu::queryInterface( rType, static_cast< io::XSeekable* >( this ) ) ); @@ -140,7 +140,7 @@ void SAL_CALL OInputSeekStream::seek( sal_Int64 location ) } sal_Int64 SAL_CALL OInputSeekStream::getPosition() - throw ( io::IOException, + throw ( io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); diff --git a/package/source/xstor/oseekinstream.hxx b/package/source/xstor/oseekinstream.hxx index 8203be6ec8b9..b605d25e8a8d 100644 --- a/package/source/xstor/oseekinstream.hxx +++ b/package/source/xstor/oseekinstream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 7e45f6574355..b68162eeec73 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -178,8 +178,8 @@ sal_Bool KillFile( const ::rtl::OUString& aURL, const uno::Reference< lang::XMul try { - uno::Reference < ucb::XSimpleFileAccess > xAccess( - xFactory->createInstance ( + uno::Reference < ucb::XSimpleFileAccess > xAccess( + xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); @@ -205,7 +205,7 @@ const sal_Int32 n_ConstBufferSize = 32000; { ::rtl::OUString aTempURL; - uno::Reference < beans::XPropertySet > xTempFile( + uno::Reference < beans::XPropertySet > xTempFile( xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), uno::UNO_QUERY ); @@ -222,7 +222,7 @@ const sal_Int32 n_ConstBufferSize = 32000; ::package::StaticAddLog( aException.Message ); ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Quiet exception" ) ) ); } - + if ( !aTempURL.getLength() ) throw uno::RuntimeException(); // TODO: can not create tempfile @@ -352,9 +352,9 @@ void OWriteStream_Impl::InsertIntoPackageFolder( const ::rtl::OUString& aName, uno::Reference< lang::XUnoTunnel > xTunnel( m_xPackageStream, uno::UNO_QUERY ); if ( !xTunnel.is() ) throw uno::RuntimeException(); // TODO - + xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) ); - + m_bFlushed = sal_False; m_bHasInsertedStreamOptimization = sal_False; } @@ -478,17 +478,17 @@ void OWriteStream_Impl::DisposeWrappers() { try { m_pAntiImpl->dispose(); - } + } catch ( uno::RuntimeException& aRuntimeException ) { AddLog( aRuntimeException.Message ); AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Quiet exception" ) ) ); } - + m_pAntiImpl = NULL; } m_pParent = NULL; - + if ( !m_aInputStreamsList.empty() ) { for ( InputStreamsList_Impl::iterator pStreamIter = m_aInputStreamsList.begin(); @@ -510,7 +510,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor { if ( m_xFactory.is() ) return m_xFactory; - + return ::comphelper::getProcessServiceFactory(); } @@ -524,11 +524,11 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor try { if ( aTempURL && xStream.is() ) { - uno::Reference < ucb::XSimpleFileAccess > xTempAccess( - GetServiceFactory()->createInstance ( + uno::Reference < ucb::XSimpleFileAccess > xTempAccess( + GetServiceFactory()->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); - + if ( !xTempAccess.is() ) throw uno::RuntimeException(); // TODO: @@ -538,7 +538,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor // the current position of the original stream should be still OK, copy further ::comphelper::OStorageHelper::CopyInputToOutput( xStream, xTempOutStream ); xTempOutStream->closeOutput(); - xTempOutStream = uno::Reference< io::XOutputStream >(); + xTempOutStream = uno::Reference< io::XOutputStream >(); } else throw io::IOException(); // TODO: @@ -577,7 +577,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor if ( !m_xCacheStream.is() && !m_aTempURL.getLength() ) { uno::Reference< io::XInputStream > xOrigStream = m_xPackageStream->getDataStream(); - if ( !xOrigStream.is() ) + if ( !xOrigStream.is() ) { // in case of new inserted package stream it is possible that input stream still was not set uno::Reference< io::XStream > xCacheStream = CreateMemoryStream( GetServiceFactory() ); @@ -599,7 +599,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor OSL_ENSURE( xCacheStream.is(), "If the stream can not be created an exception must be thrown!\n" ); if ( nRead ) - { + { uno::Reference< io::XOutputStream > xOutStream( xCacheStream->getOutputStream(), uno::UNO_SET_THROW ); xOutStream->writeBytes( aData ); } @@ -614,11 +614,11 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor try { if ( m_aTempURL.getLength() ) { - uno::Reference < ucb::XSimpleFileAccess > xTempAccess( - GetServiceFactory()->createInstance ( + uno::Reference < ucb::XSimpleFileAccess > xTempAccess( + GetServiceFactory()->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); - + if ( !xTempAccess.is() ) throw uno::RuntimeException(); // TODO: @@ -632,7 +632,7 @@ uno::Reference< lang::XMultiServiceFactory > OWriteStream_Impl::GetServiceFactor // the current position of the original stream should be still OK, copy further ::comphelper::OStorageHelper::CopyInputToOutput( xOrigStream, xTempOutStream ); xTempOutStream->closeOutput(); - xTempOutStream = uno::Reference< io::XOutputStream >(); + xTempOutStream = uno::Reference< io::XOutputStream >(); } else throw io::IOException(); // TODO: @@ -670,8 +670,8 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream() if ( m_aTempURL.getLength() ) { // the temporary file is not used if the cache is used - uno::Reference < ucb::XSimpleFileAccess > xTempAccess( - GetServiceFactory()->createInstance ( + uno::Reference < ucb::XSimpleFileAccess > xTempAccess( + GetServiceFactory()->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); @@ -715,8 +715,8 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream() if ( m_aTempURL.getLength() ) { // the temporary file is not used if the cache is used - uno::Reference < ucb::XSimpleFileAccess > xTempAccess( - GetServiceFactory()->createInstance ( + uno::Reference < ucb::XSimpleFileAccess > xTempAccess( + GetServiceFactory()->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); @@ -755,7 +755,7 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; - // this call can be made only during parent storage commit + // this call can be made only during parent storage commit // the parent storage is responsible for the correct handling // of deleted and renamed contents @@ -847,7 +847,7 @@ void OWriteStream_Impl::Commit() uno::Reference< packages::XDataSinkEncrSupport > xNewPackageStream; uno::Sequence< uno::Any > aSeq( 1 ); - aSeq[0] <<= sal_False; + aSeq[0] <<= sal_False; if ( m_xCacheStream.is() ) { @@ -960,7 +960,7 @@ void OWriteStream_Impl::Revert() m_xCacheStream = uno::Reference< io::XStream >(); m_xCacheSeek = uno::Reference< io::XSeekable >(); } - + if ( m_aTempURL.getLength() ) { KillFile( m_aTempURL, GetServiceFactory() ); @@ -1054,10 +1054,10 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( return aResult; } - + //----------------------------------------------- sal_Bool OWriteStream_Impl::IsTransacted() -{ +{ ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; return ( m_pAntiImpl && m_pAntiImpl->m_bTransacted ); } @@ -1077,7 +1077,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary() m_xOrigRelInfoStream, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels/*.rels" ) ), m_xFactory ); - + // in case of success the stream must be thrown away, that means that the OrigRelInfo is initialized // the reason for this is that the original stream might not be seekable ( at the same time the new // provided stream must be seekable ), so it must be read only once @@ -1112,7 +1112,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary() } } } - + //----------------------------------------------- uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProperties() { @@ -1135,7 +1135,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProper aResult[2].Name = ::rtl::OUString::createFromAscii("Size"); if ( m_nStorageType == embed::StorageFormats::PACKAGE ) - aResult[3].Name = ::rtl::OUString::createFromAscii("Encrypted"); + aResult[3].Name = ::rtl::OUString::createFromAscii("Encrypted"); } else { @@ -1208,7 +1208,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRel return uno::Sequence< uno::Sequence< beans::StringPair > >(); ReadRelInfoIfNecessary(); - + if ( m_nRelInfoStatus == RELINFO_READ ) return m_aOrigRelInfo; else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED ) @@ -1391,7 +1391,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre uno::Reference< io::XStream > xCompStream( static_cast< ::cppu::OWeakObject* >( pStream ), uno::UNO_QUERY ); - OSL_ENSURE( xCompStream.is(), + OSL_ENSURE( xCompStream.is(), "OInputCompStream MUST provide XStream interfaces!\n" ); m_aInputStreamsList.push_back( pStream ); @@ -1416,7 +1416,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre uno::Reference< io::XStream > xSeekStream( static_cast< ::cppu::OWeakObject* >( pStream ), uno::UNO_QUERY ); - OSL_ENSURE( xSeekStream.is(), + OSL_ENSURE( xSeekStream.is(), "OInputSeekStream MUST provide XStream interfaces!\n" ); m_aInputStreamsList.push_back( pStream ); @@ -1491,7 +1491,7 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream() // this method is used only internally, this stream object should not go outside of this implementation // if ( m_pAntiImpl ) - // throw io::IOException(); // TODO: + // throw io::IOException(); // TODO: return m_xPackageStream->getPlainRawStream(); } @@ -1537,7 +1537,7 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io: { uno::Reference < io::XStream > xTempFile; if ( !xTargetStream.is() ) - xTempFile = uno::Reference < io::XStream >( + xTempFile = uno::Reference < io::XStream >( m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), uno::UNO_QUERY ); else @@ -1546,7 +1546,7 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io: uno::Reference < io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY ); if ( !xTempSeek.is() ) throw uno::RuntimeException(); // TODO - + uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream(); if ( !xTempOut.is() ) throw uno::RuntimeException(); @@ -1577,7 +1577,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar OSL_ENSURE( m_xPackageStream.is(), "The source stream for copying is incomplete!\n" ); if ( !m_xPackageStream.is() ) throw uno::RuntimeException(); - + uno::Reference< io::XInputStream > xDataToCopy; if ( IsEncrypted() ) { @@ -1725,7 +1725,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora aNewRelStreamName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".rels" ) ); sal_Bool bRenamed = !aOrigRelStreamName.equals( aNewRelStreamName ); - if ( m_nRelInfoStatus == RELINFO_CHANGED + if ( m_nRelInfoStatus == RELINFO_CHANGED || m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED_STREAM ) { @@ -1771,7 +1771,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora xSeek->seek( 0 ); ::comphelper::OStorageHelper::CopyInputToOutput( m_xNewRelInfoStream, xOutputStream ); xSeek->seek( 0 ); - + // set the mediatype uno::Reference< beans::XPropertySet > xPropSet( xRelsStream, uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue( @@ -1822,7 +1822,7 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted ) if ( !m_pImpl || !m_pImpl->m_rMutexRef.Is() ) throw uno::RuntimeException(); // just a disaster - + m_pData = new WSInternalData_Impl( pImpl->m_rMutexRef, m_pImpl->m_nStorageType ); } @@ -1839,7 +1839,7 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStrea if ( !m_pImpl || !m_pImpl->m_rMutexRef.Is() ) throw uno::RuntimeException(); // just a disaster - + m_pData = new WSInternalData_Impl( pImpl->m_rMutexRef, m_pImpl->m_nStorageType ); if ( xStream.is() ) @@ -1957,7 +1957,7 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea // if it fails the stream will become invalid try { m_xSeekable->seek( nCurPos ); - } + } catch ( uno::Exception& aException ) { m_pImpl->AddLog( aException.Message ); @@ -1967,7 +1967,7 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea OSL_ENSURE( sal_False, "The stream become invalid during copiing!\n" ); throw uno::RuntimeException(); } - + if ( bThrown ) throw eThrown; @@ -2012,31 +2012,31 @@ uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType ) // common interfaces aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<lang::XTypeProvider*> ( this ) - , static_cast<io::XInputStream*> ( this ) - , static_cast<io::XOutputStream*> ( this ) - , static_cast<io::XStream*> ( this ) - , static_cast<embed::XExtendedStorageStream*> ( this ) - , static_cast<io::XSeekable*> ( this ) - , static_cast<io::XTruncate*> ( this ) - , static_cast<lang::XComponent*> ( this ) - , static_cast<beans::XPropertySet*> ( this ) ); - + ( rType + , static_cast<lang::XTypeProvider*> ( this ) + , static_cast<io::XInputStream*> ( this ) + , static_cast<io::XOutputStream*> ( this ) + , static_cast<io::XStream*> ( this ) + , static_cast<embed::XExtendedStorageStream*> ( this ) + , static_cast<io::XSeekable*> ( this ) + , static_cast<io::XTruncate*> ( this ) + , static_cast<lang::XComponent*> ( this ) + , static_cast<beans::XPropertySet*> ( this ) ); + if ( aReturn.hasValue() == sal_True ) return aReturn ; if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XEncryptionProtectedSource*> ( this ) ); + ( rType + , static_cast<embed::XEncryptionProtectedSource*> ( this ) ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XRelationshipAccess*> ( this ) ); + ( rType + , static_cast<embed::XRelationshipAccess*> ( this ) ); } if ( aReturn.hasValue() == sal_True ) @@ -2045,9 +2045,9 @@ uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType ) if ( m_bTransacted ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XTransactedObject*> ( this ) - , static_cast<embed::XTransactionBroadcaster*> ( this ) ); + ( rType + , static_cast<embed::XTransactedObject*> ( this ) + , static_cast<embed::XTransactionBroadcaster*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -2083,49 +2083,49 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else // if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } } else @@ -2133,40 +2133,40 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else // if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) + , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) + , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } } } @@ -2186,7 +2186,7 @@ uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId() } //----------------------------------------------- -sal_Int32 SAL_CALL OWriteStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) +sal_Int32 SAL_CALL OWriteStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -2209,7 +2209,7 @@ sal_Int32 SAL_CALL OWriteStream::readBytes( uno::Sequence< sal_Int8 >& aData, sa } //----------------------------------------------- -sal_Int32 SAL_CALL OWriteStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) +sal_Int32 SAL_CALL OWriteStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -2232,7 +2232,7 @@ sal_Int32 SAL_CALL OWriteStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData } //----------------------------------------------- -void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip ) +void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -2255,7 +2255,7 @@ void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip ) } //----------------------------------------------- -sal_Int32 SAL_CALL OWriteStream::available( ) +sal_Int32 SAL_CALL OWriteStream::available( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -2278,7 +2278,7 @@ sal_Int32 SAL_CALL OWriteStream::available( ) } //----------------------------------------------- -void SAL_CALL OWriteStream::closeInput( ) +void SAL_CALL OWriteStream::closeInput( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -2412,7 +2412,7 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData ) } //----------------------------------------------- -void SAL_CALL OWriteStream::flush() +void SAL_CALL OWriteStream::flush() throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -2445,7 +2445,7 @@ void SAL_CALL OWriteStream::flush() void OWriteStream::CloseOutput_Impl() { // all the checks must be done in calling method - + m_xOutStream->closeOutput(); m_xOutStream = uno::Reference< io::XOutputStream >(); @@ -2483,7 +2483,7 @@ void SAL_CALL OWriteStream::closeOutput() if ( !m_xOutStream.is() ) throw io::NotConnectedException(); - + CloseOutput_Impl(); if ( m_bInStreamDisconnected || !m_xInStream.is() ) @@ -2514,7 +2514,7 @@ void SAL_CALL OWriteStream::seek( sal_Int64 location ) //----------------------------------------------- sal_Int64 SAL_CALL OWriteStream::getPosition() - throw ( io::IOException, + throw ( io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); @@ -2838,7 +2838,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OWriteStream::getRelationshipByID( return aSeq[nInd1]; break; } - + throw container::NoSuchElementException(); } @@ -3043,7 +3043,7 @@ void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequ nIndSourceSame = nIndSource1; } - + break; } } @@ -3173,7 +3173,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa && aPropertyName.equalsAscii( "UseCommonStoragePasswordEncryption" ) ) { sal_Bool bUseCommonPass = sal_False; - if ( aValue >>= bUseCommonPass ) + if ( aValue >>= bUseCommonPass ) { if ( m_bInitOnDemand && m_pImpl->m_bHasInsertedStreamOptimization ) { @@ -3300,7 +3300,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) //----------------------------------------------- -void SAL_CALL OWriteStream::addPropertyChangeListener( +void SAL_CALL OWriteStream::addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) throw ( beans::UnknownPropertyException, @@ -3379,7 +3379,7 @@ void SAL_CALL OWriteStream::removeVetoableChangeListener( } //____________________________________________________________________________________________________ -// XTransactedObject +// XTransactedObject //____________________________________________________________________________________________________ //----------------------------------------------- @@ -3456,7 +3456,7 @@ void SAL_CALL OWriteStream::commit() throw lang::DisposedException(); } - m_pImpl->Commit(); + m_pImpl->Commit(); // when the storage is commited the parent is modified ModifyParentUnlockMutex_Impl( aGuard ); @@ -3560,7 +3560,7 @@ void SAL_CALL OWriteStream::revert() } //____________________________________________________________________________________________________ -// XTransactionBroadcaster +// XTransactionBroadcaster //____________________________________________________________________________________________________ //----------------------------------------------- diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index d3c15f00d44c..1247a92408b7 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -85,7 +85,7 @@ struct WSInternalData_Impl ::cppu::OTypeCollection* m_pTypeCollection; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners sal_Int32 m_nStorageType; - + // the mutex reference MUST NOT be empty WSInternalData_Impl( const SotMutexHolderRef rMutexRef, sal_Int32 nStorageType ) : m_rSharedMutexRef( rMutexRef ) @@ -106,12 +106,12 @@ struct OWriteStream_Impl : public PreCreationStruct friend class OWriteStream; friend class OInputCompStream; - OWriteStream* m_pAntiImpl; + OWriteStream* m_pAntiImpl; ::rtl::OUString m_aTempURL; - + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xCacheStream; ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xCacheSeek; - + InputStreamsList_Impl m_aInputStreamsList; sal_Bool m_bHasDataToFlush; // only modified elements will be sent to the original content @@ -131,7 +131,7 @@ struct OWriteStream_Impl : public PreCreationStruct sal_Bool m_bUseCommonPass; sal_Bool m_bHasCachedPassword; ::rtl::OUString m_aPass; - + sal_Bool m_bCompressedSetExplicit; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > m_xPackage; @@ -144,7 +144,7 @@ struct OWriteStream_Impl : public PreCreationStruct ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xOrigRelInfoStream; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aOrigRelInfo; sal_Bool m_bOrigRelInfoBroken; - + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aNewRelInfo; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream; sal_Int16 m_nRelInfoStatus; @@ -156,8 +156,8 @@ private: ::rtl::OUString GetFilledTempFileIfNo( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream ); ::rtl::OUString FillTempGetFileName(); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetTempFileAsStream(); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetTempFileAsInputStream(); + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetTempFileAsStream(); + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetTempFileAsInputStream(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream_Impl( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess ); @@ -182,7 +182,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >() ); ~OWriteStream_Impl(); - + void CleanCacheStream(); void AddLog( const ::rtl::OUString& aMessage ); @@ -217,7 +217,7 @@ public: void Revert(); void Free( sal_Bool bMust ); // allows to try to disconnect from the temporary stream - // in case bMust is set to sal_True the method + // in case bMust is set to sal_True the method // will throw exception in case the file is still busy void SetModified(); // can be done only by parent storage after renaming @@ -315,26 +315,26 @@ public: void DeInit(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); - // XTypeProvider + // XTypeProvider virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available( ) + virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput( ) + virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); // XOutputStream diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx index b398b61e7f5e..d81c5b4a80b8 100644 --- a/package/source/xstor/register.cxx +++ b/package/source/xstor/register.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTyp void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; - + ::rtl::OUString aImplName( ::rtl::OUString::createFromAscii( pImplName ) ); uno::Reference< lang::XSingleServiceFactory > xFactory; @@ -60,13 +60,13 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic OStorageFactory::impl_staticCreateSelfInstance, OStorageFactory::impl_staticGetSupportedServiceNames() ); } - + if ( xFactory.is() ) { xFactory->acquire(); pRet = xFactory.get(); } - + return pRet; } @@ -80,7 +80,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis uno::Reference< registry::XRegistryKey > xNewKey; - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + OStorageFactory::impl_staticGetImplementationName() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx index b69170a57791..2c6f177e6856 100644 --- a/package/source/xstor/selfterminatefilestream.cxx +++ b/package/source/xstor/selfterminatefilestream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,7 +80,7 @@ void OSelfTerminateFileStream::CloseStreamDeleteFile() } //----------------------------------------------- -sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) +sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -90,7 +90,7 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8 } //----------------------------------------------- -sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) +sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -100,7 +100,7 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_I } //----------------------------------------------- -void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) +void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -110,7 +110,7 @@ void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) } //----------------------------------------------- -sal_Int32 SAL_CALL OSelfTerminateFileStream::available( ) +sal_Int32 SAL_CALL OSelfTerminateFileStream::available( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -119,7 +119,7 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::available( ) } //----------------------------------------------- -void SAL_CALL OSelfTerminateFileStream::closeInput( ) +void SAL_CALL OSelfTerminateFileStream::closeInput( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -138,7 +138,7 @@ void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location ) //----------------------------------------------- sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition() - throw ( io::IOException, + throw ( io::IOException, uno::RuntimeException) { return m_xSeekable->getPosition(); diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx index 16bc65c5d6cd..a9d28f0a6f85 100644 --- a/package/source/xstor/selfterminatefilestream.hxx +++ b/package/source/xstor/selfterminatefilestream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,15 +55,15 @@ public: void CloseStreamDeleteFile(); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) + virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available() + virtual sal_Int32 SAL_CALL available() throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput() + virtual void SAL_CALL closeInput() throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); //XSeekable diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx index 84dc04e0ed95..c3121a9cfa85 100644 --- a/package/source/xstor/switchpersistencestream.cxx +++ b/package/source/xstor/switchpersistencestream.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -132,7 +132,7 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io: } xNewSeekable->seek( nPos ); - + CloseAll_Impl(); m_pStreamData = new SPStreamData_Impl( m_xFactory, sal_False, @@ -184,7 +184,7 @@ void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Referen if ( !xTargetStream.is() ) { - xTargetStream = uno::Reference < io::XStream >( + xTargetStream = uno::Reference < io::XStream >( m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), uno::UNO_QUERY_THROW ); diff --git a/package/source/xstor/switchpersistencestream.hxx b/package/source/xstor/switchpersistencestream.hxx index a1f47b4063db..730aca1bff35 100644 --- a/package/source/xstor/switchpersistencestream.hxx +++ b/package/source/xstor/switchpersistencestream.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,7 +61,7 @@ class SwitchablePersistenceStream ::com::sun::star::io::XSeekable, ::com::sun::star::io::XAsyncOutputMonitor > { - ::osl::Mutex m_aMutex; + ::osl::Mutex m_aMutex; const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index 160162e47267..2e1656b437c8 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,15 +92,15 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance() uno::RuntimeException ) { // TODO: reimplement TempStream service to support XStream interface - uno::Reference < io::XStream > xTempStream( + uno::Reference < io::XStream > xTempStream( m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), uno::UNO_QUERY ); if ( !xTempStream.is() ) throw uno::RuntimeException(); // TODO: - return uno::Reference< uno::XInterface >( - static_cast< OWeakObject* >( new OStorage( xTempStream, + return uno::Reference< uno::XInterface >( + static_cast< OWeakObject* >( new OStorage( xTempStream, embed::ElementModes::READWRITE, uno::Sequence< beans::PropertyValue >(), m_xFactory, @@ -164,8 +164,8 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr throw lang::IllegalArgumentException(); // TODO: } - uno::Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess( - m_xFactory->createInstance ( + uno::Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess( + m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY ); @@ -186,9 +186,9 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr // retrieve mediadescriptor and set storage properties uno::Sequence< beans::PropertyValue > aDescr; uno::Sequence< beans::PropertyValue > aPropsToSet; - + sal_Int32 nStorageType = embed::StorageFormats::PACKAGE; - + if ( nArgNum >= 3 ) { if( aArguments[2] >>= aDescr ) @@ -268,7 +268,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr if ( !CheckPackageSignature_Impl( xInputStream, xSeekable ) ) throw io::IOException(); // TODO: this is not a package file - return uno::Reference< uno::XInterface >( + return uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( new OStorage( xInputStream, nStorageMode, aPropsToSet, m_xFactory, nStorageType ) ), uno::UNO_QUERY ); } @@ -288,7 +288,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr if ( !CheckPackageSignature_Impl( xStream->getInputStream(), xSeekable ) ) throw io::IOException(); // TODO: this is not a package file - return uno::Reference< uno::XInterface >( + return uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( new OStorage( xStream, nStorageMode, aPropsToSet, m_xFactory, nStorageType ) ), uno::UNO_QUERY ); } diff --git a/package/source/xstor/xfactory.hxx b/package/source/xstor/xfactory.hxx index 86dca8dc264c..0a6a5fad7f39 100644 --- a/package/source/xstor/xfactory.hxx +++ b/package/source/xstor/xfactory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ public: static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - impl_staticCreateSelfInstance( + impl_staticCreateSelfInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index a99170749a0d..e45427e4858d 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,9 +81,9 @@ struct StorInternalData_Impl OChildDispListener_Impl* m_pSubElDispListener; WeakComponentList m_aOpenSubComponentsList; - + ::rtl::Reference< OHierarchyHolder_Impl > m_rHierarchyHolder; - + // the mutex reference MUST NOT be empty StorInternalData_Impl( const SotMutexHolderRef& rMutexRef, sal_Bool bRoot, sal_Int32 nStorageType, sal_Bool bReadOnlyWrap ) : m_rSharedMutexRef( rMutexRef ) @@ -194,7 +194,7 @@ SotElement_Impl::~SotElement_Impl() //----------------------------------------------- // most of properties are holt by the storage but are not used -OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream, +OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream, sal_Int32 nMode, uno::Sequence< beans::PropertyValue > xProperties, uno::Reference< lang::XMultiServiceFactory > xFactory, @@ -234,7 +234,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream, //----------------------------------------------- // most of properties are holt by the storage but are not used -OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream, +OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream, sal_Int32 nMode, uno::Sequence< beans::PropertyValue > xProperties, uno::Reference< lang::XMultiServiceFactory > xFactory, @@ -276,7 +276,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream, } //----------------------------------------------- -OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent, +OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent, sal_Int32 nMode, uno::Reference< container::XNameContainer > xPackageFolder, uno::Reference< lang::XSingleServiceFactory > xPackage, @@ -603,7 +603,7 @@ void OStorage_Impl::ReadRelInfoIfNecessary() xRelInfoStream, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels/.rels" ) ), m_xFactory ); - + m_nRelInfoStatus = RELINFO_READ; } else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM ) @@ -764,16 +764,16 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes } else if ( m_nStorageType == embed::StorageFormats::OFOPXML ) { - + // TODO/LATER: currently the optimization is not active // uno::Reference< io::XInputStream > xRelInfoStream = GetRelInfoStreamForName( ::rtl::OUString() ); // own stream // if ( xRelInfoStream.is() ) // { - // // Relations info stream is a writeonly property, introduced only to optimyze copying - // // Should be used carefuly since no check for stream consistency is done, and the stream must not stay locked + // // Relations info stream is a writeonly property, introduced only to optimyze copying + // // Should be used carefuly since no check for stream consistency is done, and the stream must not stay locked // - // ::rtl::OUString aRelInfoString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelationsInfoStream" ) ); - // xPropSet->setPropertyValue( aRelInfoString, uno::makeAny( GetSeekableTempCopy( xRelInfoStream, m_xFactory ) ) ); + // ::rtl::OUString aRelInfoString = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelationsInfoStream" ) ); + // xPropSet->setPropertyValue( aRelInfoString, uno::makeAny( GetSeekableTempCopy( xRelInfoStream, m_xFactory ) ) ); // } uno::Reference< embed::XRelationshipAccess > xRels( xDest, uno::UNO_QUERY ); @@ -865,9 +865,9 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, // uno::Reference< io::XInputStream > xInStream = GetRelInfoStreamForName( ::rtl::OUString() ); // own rels stream // if ( xInStream.is() ) // { - // aStrProps.realloc( ++nNum ); - // aStrProps[nNum-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelationsInfoStream" ) ); - // aStrProps[nNum-1].Value <<= GetSeekableTempCopy( xInStream, m_xFactory ); + // aStrProps.realloc( ++nNum ); + // aStrProps[nNum-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelationsInfoStream" ) ); + // aStrProps[nNum-1].Value <<= GetSeekableTempCopy( xInStream, m_xFactory ); // } uno::Reference< embed::XRelationshipAccess > xRels( xDest, uno::UNO_QUERY ); @@ -891,7 +891,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, { // for now get just nonseekable access to the stream // TODO/LATER: the raw stream can be used - + xInputToInsert = pElement->m_pStream->m_xPackageStream->getDataStream(); } @@ -1001,7 +1001,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelatio return uno::Sequence< uno::Sequence< beans::StringPair > >(); ReadRelInfoIfNecessary(); - + if ( m_nRelInfoStatus == RELINFO_READ || m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED ) return m_aRelInfo; @@ -1027,7 +1027,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x m_nStorageType); // TODO/LATER: could use direct copying - aTempRepresent.CopyToStorage( xNewStor, sal_False ); + aTempRepresent.CopyToStorage( xNewStor, sal_False ); } //----------------------------------------------- @@ -1167,7 +1167,7 @@ void OStorage_Impl::Commit() // the renamed elements are not in new temporary storage if ( m_bCommited || m_bIsRoot ) xNewPackageFolder->removeByName( (*pElementIter)->m_aOriginalName ); - + (*pElementIter)->m_pStream->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder ); } else if ( !m_bCommited && !m_bIsRoot ) @@ -1733,7 +1733,7 @@ void OStorage_Impl::RemoveStreamRelInfo( const ::rtl::OUString& aOriginalName ) { ::rtl::OUString aRelStreamName = aOriginalName; aRelStreamName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".rels" ) ); - + if ( m_xRelStorage->hasByName( aRelStreamName ) ) m_xRelStorage->removeElement( aRelStreamName ); } @@ -1784,7 +1784,7 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement ) // Create new rels storage, this is commit scenario so it must be possible CreateRelStorage(); } - + pStreamElement->m_pStream->CommitStreamRelInfo( m_xRelStorage, pStreamElement->m_aOriginalName, pStreamElement->m_aName ); } } @@ -1825,7 +1825,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - if ( m_nRelInfoStatus == RELINFO_CHANGED + if ( m_nRelInfoStatus == RELINFO_CHANGED || m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED_STREAM ) { @@ -1873,7 +1873,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain uno::Reference< io::XSeekable > xSeek( m_xNewRelInfoStream, uno::UNO_QUERY_THROW ); xSeek->seek( 0 ); ::comphelper::OStorageHelper::CopyInputToOutput( m_xNewRelInfoStream, xOutputStream ); - + // set the mediatype uno::Reference< beans::XPropertySet > xPropSet( xRelsStream, uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue( @@ -1922,7 +1922,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain //===================================================== //----------------------------------------------- -OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream, +OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream, sal_Int32 nMode, uno::Sequence< beans::PropertyValue > xProperties, uno::Reference< lang::XMultiServiceFactory > xFactory, @@ -1934,7 +1934,7 @@ OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream, } //----------------------------------------------- -OStorage::OStorage( uno::Reference< io::XStream > xStream, +OStorage::OStorage( uno::Reference< io::XStream > xStream, sal_Int32 nMode, uno::Sequence< beans::PropertyValue > xProperties, uno::Reference< lang::XMultiServiceFactory > xFactory, @@ -1946,7 +1946,7 @@ OStorage::OStorage( uno::Reference< io::XStream > xStream, } //----------------------------------------------- -OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap ) +OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap ) : m_pImpl( pImpl ) { // this call can be done only from OStorage_Impl implementation to create child storage @@ -2046,7 +2046,7 @@ void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl ) } } } - + m_pData->m_aOpenSubComponentsList.clear(); } } @@ -2235,7 +2235,7 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone } //____________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________ //----------------------------------------------- @@ -2246,18 +2246,18 @@ uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType ) // common interfaces aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<lang::XTypeProvider*> ( this ) - , static_cast<embed::XStorage*> ( this ) - , static_cast<embed::XTransactedObject*> ( this ) - , static_cast<embed::XTransactionBroadcaster*> ( this ) - , static_cast<util::XModifiable*> ( this ) - , static_cast<container::XNameAccess*> ( this ) - , static_cast<container::XElementAccess*> ( this ) - , static_cast<lang::XComponent*> ( this ) - , static_cast<beans::XPropertySet*> ( this ) - , static_cast<embed::XOptimizedStorage*> ( this ) - , static_cast<embed::XHierarchicalStorageAccess*> ( this ) ); + ( rType + , static_cast<lang::XTypeProvider*> ( this ) + , static_cast<embed::XStorage*> ( this ) + , static_cast<embed::XTransactedObject*> ( this ) + , static_cast<embed::XTransactionBroadcaster*> ( this ) + , static_cast<util::XModifiable*> ( this ) + , static_cast<container::XNameAccess*> ( this ) + , static_cast<container::XElementAccess*> ( this ) + , static_cast<lang::XComponent*> ( this ) + , static_cast<beans::XPropertySet*> ( this ) + , static_cast<embed::XOptimizedStorage*> ( this ) + , static_cast<embed::XHierarchicalStorageAccess*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -2267,22 +2267,22 @@ uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType ) if ( m_pData->m_bIsRoot ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XStorageRawAccess*> ( this ) - , static_cast<embed::XEncryptionProtectedSource*> ( this ) ); + ( rType + , static_cast<embed::XStorageRawAccess*> ( this ) + , static_cast<embed::XEncryptionProtectedSource*> ( this ) ); } else { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XStorageRawAccess*> ( this ) ); + ( rType + , static_cast<embed::XStorageRawAccess*> ( this ) ); } } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<embed::XRelationshipAccess*> ( this ) ); + ( rType + , static_cast<embed::XRelationshipAccess*> ( this ) ); } if ( aReturn.hasValue() == sal_True ) @@ -2304,7 +2304,7 @@ void SAL_CALL OStorage::release() throw() } //____________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________ //----------------------------------------------- @@ -2322,47 +2322,47 @@ uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes() if ( m_pData->m_bIsRoot ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } else { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) + , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } } } @@ -2381,7 +2381,7 @@ uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId() } //____________________________________________________________________________________________________ -// XStorage +// XStorage //____________________________________________________________________________________________________ @@ -2555,7 +2555,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( } //----------------------------------------------- -uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement( +uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode, const ::rtl::OUString& aPass ) throw ( embed::InvalidStorageException, lang::IllegalArgumentException, @@ -2736,7 +2736,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( // virtual, that means that it is just enough to change the flag to let it be writable // and since there is no AntiImpl nobody should be notified about it pElement->m_pStorage->m_nStorageMode = nStorageMode | embed::ElementModes::READ; - + if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) ) { for ( SotElementList_Impl::iterator pElementIter = pElement->m_pStorage->m_aChildrenList.begin(); @@ -2744,7 +2744,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( { SotElement_Impl* pElementToDel = (*pElementIter); pElementIter++; - + m_pImpl->RemoveElement( pElementToDel ); } } @@ -2765,12 +2765,12 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( { // Before this call is done the object must be refcounted already pElement->m_pStorage->SetReadOnlyWrap( *pResultStorage ); - + // before the storage disposes the stream it must deregister itself as listener uno::Reference< lang::XComponent > xStorageComponent( xResult, uno::UNO_QUERY ); if ( !xStorageComponent.is() ) throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - + MakeLinkToSubComponent_Impl( xStorageComponent ); } } @@ -3107,7 +3107,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( { // the existence of m_pAntiImpl of the child is not interesting, // the copy will be created internally - + pElement->m_pStorage->CopyLastCommitTo( xTargetStorage ); } else @@ -3178,7 +3178,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const ::rtl::OUString& aElementName throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable name SotElement_Impl* pElement = NULL; - + try { pElement = m_pImpl->FindElement( aElementName ); @@ -3247,7 +3247,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const ::rtl::OUString& aElementNam throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); SotElement_Impl* pElement = NULL; - + try { pElement = m_pImpl->FindElement( aElementName ); @@ -3492,7 +3492,7 @@ void SAL_CALL OStorage::renameElement( const ::rtl::OUString& aElementName, cons } //----------------------------------------------- -void SAL_CALL OStorage::copyElementTo( const ::rtl::OUString& aElementName, +void SAL_CALL OStorage::copyElementTo( const ::rtl::OUString& aElementName, const uno::Reference< embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( embed::InvalidStorageException, @@ -3517,7 +3517,7 @@ void SAL_CALL OStorage::copyElementTo( const ::rtl::OUString& aElementName, || !aNewName.getLength() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( !xDest.is() ) + if ( !xDest.is() ) // || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 2 ); @@ -3597,7 +3597,7 @@ void SAL_CALL OStorage::copyElementTo( const ::rtl::OUString& aElementName, //----------------------------------------------- -void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName, +void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName, const uno::Reference< embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( embed::InvalidStorageException, @@ -3647,7 +3647,7 @@ void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName, throw container::ElementExistException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); m_pImpl->CopyStorageElement( pElement, xDest, aNewName, sal_False ); - + m_pImpl->RemoveElement( pElement ); m_pImpl->m_bIsModified = sal_True; @@ -3712,7 +3712,7 @@ void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName, } //____________________________________________________________________________________________________ -// XStorageRawAccess +// XStorageRawAccess //____________________________________________________________________________________________________ //----------------------------------------------- @@ -3759,8 +3759,8 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement( if ( !xRawInStream.is() ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - uno::Reference < io::XOutputStream > xTempOut( - m_pImpl->GetServiceFactory()->createInstance ( + uno::Reference < io::XOutputStream > xTempOut( + m_pImpl->GetServiceFactory()->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ), uno::UNO_QUERY ); xTempIn = uno::Reference < io::XInputStream >( xTempOut, uno::UNO_QUERY ); @@ -3857,7 +3857,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName ); if ( !pElement ) throw container::NoSuchElementException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - + if ( !pElement->m_pStream ) { m_pImpl->OpenSubStream( pElement ); @@ -3872,8 +3872,8 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( if ( !xRawInStream.is() ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - uno::Reference < io::XOutputStream > xTempOut( - m_pImpl->GetServiceFactory()->createInstance ( + uno::Reference < io::XOutputStream > xTempOut( + m_pImpl->GetServiceFactory()->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ), uno::UNO_QUERY ); xTempIn = uno::Reference < io::XInputStream >( xTempOut, uno::UNO_QUERY ); @@ -4040,7 +4040,7 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const ::rtl::OUString& aStre } //____________________________________________________________________________________________________ -// XTransactedObject +// XTransactedObject //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4183,7 +4183,7 @@ void SAL_CALL OStorage::revert() } //____________________________________________________________________________________________________ -// XTransactionBroadcaster +// XTransactionBroadcaster //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4219,10 +4219,10 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed:: } //____________________________________________________________________________________________________ -// XModifiable +// XModifiable // TODO: if there will be no demand on this interface it will be removed from implementation, -// I do not want to remove it now since it is still possible that it will be inserted -// to the service back. +// I do not want to remove it now since it is still possible that it will be inserted +// to the service back. //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4304,7 +4304,7 @@ void SAL_CALL OStorage::removeModifyListener( } //____________________________________________________________________________________________________ -// XNameAccess +// XNameAccess //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4518,7 +4518,7 @@ sal_Bool SAL_CALL OStorage::hasElements() //____________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4591,7 +4591,7 @@ void SAL_CALL OStorage::removeEventListener( } //____________________________________________________________________________________________________ -// XEncryptionProtectedSource +// XEncryptionProtectedSource //____________________________________________________________________________________________________ void SAL_CALL OStorage::setEncryptionPassword( const ::rtl::OUString& aPass ) @@ -4616,7 +4616,7 @@ void SAL_CALL OStorage::setEncryptionPassword( const ::rtl::OUString& aPass ) if ( m_pData->m_bIsRoot ) { try { - m_pImpl->ReadContents(); + m_pImpl->ReadContents(); } catch ( uno::RuntimeException& aRuntimeException ) { @@ -4635,7 +4635,7 @@ void SAL_CALL OStorage::setEncryptionPassword( const ::rtl::OUString& aPass ) uno::UNO_QUERY ), aCaught ); } - + uno::Reference< beans::XPropertySet > xPackPropSet( m_pImpl->m_xPackage, uno::UNO_QUERY ); if ( !xPackPropSet.is() ) throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -4729,7 +4729,7 @@ void SAL_CALL OStorage::removeEncryption() } //____________________________________________________________________________________________________ -// XPropertySet +// XPropertySet //____________________________________________________________________________________________________ //----------------------------------------------- @@ -4783,7 +4783,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, { aValue >>= m_pImpl->m_aMediaType; m_pImpl->m_bControlMediaType = sal_True; - + m_pImpl->m_bBroadcastModified = sal_True; m_pImpl->m_bIsModified = sal_True; } @@ -4791,7 +4791,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, { aValue >>= m_pImpl->m_aVersion; m_pImpl->m_bControlVersion = sal_True; - + // this property can be set even for readonly storage if ( !m_pData->m_bReadOnlyWrap ) { @@ -4938,7 +4938,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) - || aPropertyName.equalsAscii( "IsInconsistent" ) ) ) + || aPropertyName.equalsAscii( "IsInconsistent" ) ) ) { try { m_pImpl->ReadContents(); @@ -5052,7 +5052,7 @@ void SAL_CALL OStorage::removeVetoableChangeListener( } //____________________________________________________________________________________________________ -// XRelationshipAccess +// XRelationshipAccess //____________________________________________________________________________________________________ // TODO/LATER: the storage and stream implementations of this interface are very similar, they could use a helper class @@ -5164,7 +5164,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons return aSeq[nInd1]; break; } - + throw container::NoSuchElementException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } @@ -5370,7 +5370,7 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence nIndSourceSame = nIndSource1; } - + break; } } @@ -5435,7 +5435,7 @@ void SAL_CALL OStorage::clearRelationships() } //____________________________________________________________________________________________________ -// XOptimizedStorage +// XOptimizedStorage //____________________________________________________________________________________________________ //----------------------------------------------- void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect( @@ -5545,7 +5545,7 @@ void SAL_CALL OStorage::insertStreamElementDirect( aCaught ); } } - + //----------------------------------------------- void SAL_CALL OStorage::copyElementDirectlyTo( const ::rtl::OUString& aElementName, @@ -5675,7 +5675,7 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea if ( !m_pImpl->m_pSwitchStream ) throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - + try { m_pImpl->m_pSwitchStream->CopyAndSwitchPersistenceTo( xStream ); @@ -5747,12 +5747,12 @@ void SAL_CALL OStorage::attachToURL( const ::rtl::OUString& sURL, if ( !m_pImpl->m_pSwitchStream ) throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - - uno::Reference < ucb::XSimpleFileAccess > xAccess( - m_pImpl->m_xFactory->createInstance ( + + uno::Reference < ucb::XSimpleFileAccess > xAccess( + m_pImpl->m_xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) ) ), uno::UNO_QUERY_THROW ); - + try { if ( bReadOnly ) @@ -6006,7 +6006,7 @@ void SAL_CALL OStorage::copyStreamElementData( const ::rtl::OUString& aStreamNam //____________________________________________________________________________________________________ //----------------------------------------------- -uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath, ::sal_Int32 nOpenMode ) +uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath, ::sal_Int32 nOpenMode ) throw ( embed::InvalidStorageException, lang::IllegalArgumentException, packages::WrongPasswordException, @@ -6065,7 +6065,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle } //----------------------------------------------- -uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath, ::sal_Int32 nOpenMode, const ::rtl::OUString& sPassword ) +uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath, ::sal_Int32 nOpenMode, const ::rtl::OUString& sPassword ) throw ( embed::InvalidStorageException, lang::IllegalArgumentException, packages::NoEncryptionException, @@ -6132,7 +6132,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted } //----------------------------------------------- -void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath ) +void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const ::rtl::OUString& aStreamPath ) throw ( embed::InvalidStorageException, lang::IllegalArgumentException, container::NoSuchElementException, diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index 330b4c800f28..39c61e25b241 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,13 +58,13 @@ #include "mutexholder.hxx" -#define RELINFO_NO_INIT 1 -#define RELINFO_READ 2 -#define RELINFO_CHANGED 3 -#define RELINFO_CHANGED_STREAM 4 -#define RELINFO_CHANGED_STREAM_READ 5 -#define RELINFO_BROKEN 6 -#define RELINFO_CHANGED_BROKEN 7 +#define RELINFO_NO_INIT 1 +#define RELINFO_READ 2 +#define RELINFO_CHANGED 3 +#define RELINFO_CHANGED_STREAM 4 +#define RELINFO_CHANGED_STREAM_READ 5 +#define RELINFO_BROKEN 6 +#define RELINFO_CHANGED_BROKEN 7 #define STOR_MESS_PRECOMMIT 1 #define STOR_MESS_COMMITED 2 @@ -85,14 +85,14 @@ struct OWriteStream_Impl; struct SotElement_Impl { - ::rtl::OUString m_aName; + ::rtl::OUString m_aName; ::rtl::OUString m_aOriginalName; sal_Bool m_bIsRemoved; sal_Bool m_bIsInserted; - sal_Bool m_bIsStorage; - - OStorage_Impl* m_pStorage; - OWriteStream_Impl* m_pStream; + sal_Bool m_bIsStorage; + + OStorage_Impl* m_pStorage; + OWriteStream_Impl* m_pStream; public: SotElement_Impl( const ::rtl::OUString& rName, sal_Bool bStor, sal_Bool bNew ); @@ -131,12 +131,12 @@ typedef ::std::list< StorageHolder_Impl > OStorageList_Impl; class SwitchablePersistenceStream; struct OStorage_Impl { - SotMutexHolderRef m_rMutexRef; + SotMutexHolderRef m_rMutexRef; - OStorage* m_pAntiImpl; // only valid if external references exists - OStorageList_Impl m_aReadOnlyWrapList; // only valid if readonly external reference exists + OStorage* m_pAntiImpl; // only valid if external references exists + OStorageList_Impl m_aReadOnlyWrapList; // only valid if readonly external reference exists - sal_Int32 m_nStorageMode; // open mode ( read/write/trunc/nocreate ) + sal_Int32 m_nStorageMode; // open mode ( read/write/trunc/nocreate ) sal_Bool m_bIsModified; // only modified elements will be sent to the original content sal_Bool m_bBroadcastModified; // will be set if notification is required sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package @@ -145,8 +145,8 @@ struct OStorage_Impl sal_Bool m_bListCreated; - SotElementList_Impl m_aChildrenList; - SotElementList_Impl m_aDeletedList; + SotElementList_Impl m_aChildrenList; + SotElementList_Impl m_aDeletedList; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xPackageFolder; ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing; @@ -164,11 +164,11 @@ struct OStorage_Impl // must be empty in case of root storage OStorage_Impl* m_pParent; - sal_Bool m_bControlMediaType; + sal_Bool m_bControlMediaType; ::rtl::OUString m_aMediaType; - sal_Bool m_bMTFallbackUsed; + sal_Bool m_bMTFallbackUsed; - sal_Bool m_bControlVersion; + sal_Bool m_bControlVersion; ::rtl::OUString m_aVersion; SwitchablePersistenceStream* m_pSwitchStream; @@ -176,7 +176,7 @@ struct OStorage_Impl sal_Int32 m_nStorageType; // the mode in wich the storage is used // the _rels substorage that is handled in a special way in embed::StorageFormats::OFOPXML - SotElement_Impl* m_pRelStorElement; + SotElement_Impl* m_pRelStorElement; ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xRelStorage; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aRelInfo; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream; @@ -185,20 +185,20 @@ struct OStorage_Impl ////////////////////////////////////////// // Constructors - OStorage_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, + OStorage_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, sal_Int32 nMode, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, sal_Int32 nStorageType ); - OStorage_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, + OStorage_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, sal_Int32 nMode, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, sal_Int32 nStorageType ); // constructor for a substorage - OStorage_Impl( OStorage_Impl* pParent, + OStorage_Impl( OStorage_Impl* pParent, sal_Int32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xPackageFolder, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > xPackage, @@ -289,7 +289,7 @@ struct OStorage_Impl }; -class OStorage : public ::com::sun::star::lang::XTypeProvider +class OStorage : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::embed::XStorage , public ::com::sun::star::embed::XStorageRawAccess , public ::com::sun::star::embed::XTransactedObject @@ -304,7 +304,7 @@ class OStorage : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::embed::XHierarchicalStorageAccess , public ::cppu::OWeakObject { - OStorage_Impl* m_pImpl; + OStorage_Impl* m_pImpl; StorInternalData_Impl* m_pData; protected: @@ -322,19 +322,19 @@ protected: public: - OStorage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, + OStorage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream, sal_Int32 nMode, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, sal_Int32 nStorageType ); - OStorage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, + OStorage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, sal_Int32 nMode, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, sal_Int32 nStorageType ); - OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap ); + OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap ); virtual ~OStorage(); @@ -345,10 +345,10 @@ public: sal_Int32 GetRefCount_Impl() { return m_refCount; } //____________________________________________________________________________________________________ - // XInterface + // XInterface //____________________________________________________________________________________________________ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL acquire() throw(); @@ -356,7 +356,7 @@ public: virtual void SAL_CALL release() throw(); //____________________________________________________________________________________________________ - // XTypeProvider + // XTypeProvider //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() @@ -366,7 +366,7 @@ public: throw( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XStorage + // XStorage //____________________________________________________________________________________________________ virtual void SAL_CALL copyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest ) @@ -376,7 +376,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openStreamElement( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -385,7 +385,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStreamElement( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode, const ::rtl::OUString& aPass ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -395,7 +395,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > SAL_CALL openStorageElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > SAL_CALL openStorageElement( const ::rtl::OUString& aStorName, sal_Int32 nStorageMode ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -403,7 +403,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneStreamElement( const ::rtl::OUString& aStreamName ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -412,7 +412,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStreamElement( const ::rtl::OUString& aStreamName, const ::rtl::OUString& aPass ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -468,7 +468,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL copyElementTo( const ::rtl::OUString& aElementName, + virtual void SAL_CALL copyElementTo( const ::rtl::OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( ::com::sun::star::embed::InvalidStorageException, @@ -479,7 +479,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL moveElementTo( const ::rtl::OUString& aElementName, + virtual void SAL_CALL moveElementTo( const ::rtl::OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest, const ::rtl::OUString& rNewName ) throw ( ::com::sun::star::embed::InvalidStorageException, @@ -491,7 +491,7 @@ public: ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XStorageRawAccess + // XStorageRawAccess //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getPlainRawStreamElement( @@ -550,7 +550,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XModifiable + // XModifiable //____________________________________________________________________________________________________ virtual sal_Bool SAL_CALL isModified() @@ -569,7 +569,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XNameAccess + // XNameAccess //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) @@ -590,7 +590,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XComponent + // XComponent //____________________________________________________________________________________________________ virtual void SAL_CALL dispose() @@ -605,7 +605,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XEncryptionProtectedSource + // XEncryptionProtectedSource //____________________________________________________________________________________________________ virtual void SAL_CALL setEncryptionPassword( const ::rtl::OUString& aPass ) @@ -617,7 +617,7 @@ public: ::com::sun::star::io::IOException ); //____________________________________________________________________________________________________ - // XPropertySet + // XPropertySet //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() @@ -635,7 +635,7 @@ public: ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addPropertyChangeListener( + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, @@ -662,7 +662,7 @@ public: ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XOptimizedStorage + // XOptimizedStorage //____________________________________________________________________________________________________ virtual void SAL_CALL insertRawNonEncrStreamElementDirect( const ::rtl::OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream ) throw ( ::com::sun::star::embed::InvalidStorageException, @@ -680,7 +680,7 @@ public: ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL copyElementDirectlyTo( const ::rtl::OUString& sSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOptimizedStorage >& xTargetStorage, const ::rtl::OUString& sTargetName ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -776,7 +776,7 @@ public: // XHierarchicalStorageAccess //____________________________________________________________________________________________________ - virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const ::rtl::OUString& sStreamPath, ::sal_Int32 nOpenMode ) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const ::rtl::OUString& sStreamPath, ::sal_Int32 nOpenMode ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::WrongPasswordException, @@ -784,7 +784,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamElementByHierarchicalName( const ::rtl::OUString& sStreamName, ::sal_Int32 nOpenMode, const ::rtl::OUString& sPassword ) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamElementByHierarchicalName( const ::rtl::OUString& sStreamName, ::sal_Int32 nOpenMode, const ::rtl::OUString& sPassword ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::NoEncryptionException, @@ -793,7 +793,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeStreamElementByHierarchicalName( const ::rtl::OUString& sElementPath ) + virtual void SAL_CALL removeStreamElementByHierarchicalName( const ::rtl::OUString& sElementPath ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, |