fdo#62475 removed pointless comments

Change-Id: Ic3743e48ef9055933ff040c180561ef41b3a2990
Reviewed-on: https://gerrit.libreoffice.org/5174
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
This commit is contained in:
Jelle van der Waa 2013-07-29 22:22:17 +02:00 committed by Fridrich Strba
parent 85992e23e7
commit 608dec14f1
34 changed files with 7 additions and 619 deletions

View File

@ -56,7 +56,6 @@ const sal_Int32 n_ConstDigestDecrypt = 1056; // 1024 + 32
#define IS_INCONSISTENT_PROPERTY "IsInconsistent" #define IS_INCONSISTENT_PROPERTY "IsInconsistent"
#define MEDIATYPE_FALLBACK_USED_PROPERTY "MediaTypeFallbackUsed" #define MEDIATYPE_FALLBACK_USED_PROPERTY "MediaTypeFallbackUsed"
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -125,7 +125,6 @@ public:
SotMutexHolderRef aMutexHolder ) SotMutexHolderRef aMutexHolder )
throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException); throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > StaticGetDigestContextForChecksum( static ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > StaticGetDigestContextForChecksum(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xArgContext, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xArgContext,
const ::rtl::Reference< EncryptionData >& xEncryptionData ); const ::rtl::Reference< EncryptionData >& xEncryptionData );
@ -162,7 +161,6 @@ public:
const ::com::sun::star::uno::Sequence< sal_Int8 > &aReadBuffer, const ::com::sun::star::uno::Sequence< sal_Int8 > &aReadBuffer,
const ::rtl::Reference < EncryptionData > &rData ); const ::rtl::Reference < EncryptionData > &rData );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream(
ZipEntry& rEntry, ZipEntry& rEntry,
const ::rtl::Reference < EncryptionData > &rData, const ::rtl::Reference < EncryptionData > &rData,

View File

@ -62,7 +62,6 @@ public:
sal_Bool StringGoodForPattern_Impl( const OUString& aString, sal_Bool StringGoodForPattern_Impl( const OUString& aString,
const ::com::sun::star::uno::Sequence< OUString >& aPattern ); const ::com::sun::star::uno::Sequence< OUString >& aPattern );
static ::com::sun::star::uno::Sequence< OUString > SAL_CALL impl_staticGetSupportedServiceNames(); static ::com::sun::star::uno::Sequence< OUString > SAL_CALL impl_staticGetSupportedServiceNames();
static OUString SAL_CALL impl_staticGetImplementationName(); static OUString SAL_CALL impl_staticGetImplementationName();
@ -70,7 +69,6 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_staticCreateSelfInstance( static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_staticCreateSelfInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF ); const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF );
// XInitialization // XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp>
@ -36,7 +35,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHandler, const uno::Sequence< uno::Sequence < beans::PropertyValue > >& rManList ) ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHandler, const uno::Sequence< uno::Sequence < beans::PropertyValue > >& rManList )
{ {
const OUString sFileEntryElement ( ELEMENT_FILE_ENTRY ); const OUString sFileEntryElement ( ELEMENT_FILE_ENTRY );

View File

@ -31,8 +31,6 @@ using namespace com::sun::star::beans;
using namespace com::sun::star; using namespace com::sun::star;
using namespace std; using namespace std;
// ---------------------------------------------------
ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector ) ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
: bIgnoreEncryptData ( sal_False ) : bIgnoreEncryptData ( sal_False )
, nDerivedKeySize( 0 ) , nDerivedKeySize( 0 )
@ -95,18 +93,15 @@ ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManV
aStack.reserve( 10 ); aStack.reserve( 10 );
} }
// ---------------------------------------------------
ManifestImport::~ManifestImport ( void ) ManifestImport::~ManifestImport ( void )
{ {
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::startDocument( ) void SAL_CALL ManifestImport::startDocument( )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::endDocument( ) void SAL_CALL ManifestImport::endDocument( )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
@ -273,7 +268,6 @@ void ManifestImport::doStartKeyAlg(StringHashMap &rConvertedAttribs)
bIgnoreEncryptData = sal_True; bIgnoreEncryptData = sal_True;
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs ) void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
@ -344,7 +338,6 @@ namespace
} }
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::endElement( const OUString& aName ) void SAL_CALL ManifestImport::endElement( const OUString& aName )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
@ -367,31 +360,26 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
} }
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::characters( const OUString& /*aChars*/ ) void SAL_CALL ManifestImport::characters( const OUString& /*aChars*/ )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& /*aWhitespaces*/ ) void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& /*aWhitespaces*/ )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ ) void SAL_CALL ManifestImport::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
} }
// ---------------------------------------------------
void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ ) void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ )
throw( xml::sax::SAXException, uno::RuntimeException ) throw( xml::sax::SAXException, uno::RuntimeException )
{ {
} }
// ---------------------------------------------------
OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs, StringHashMap& o_aConvertedAttribs ) OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs, StringHashMap& o_aConvertedAttribs )
{ {
StringHashMap aNamespaces; StringHashMap aNamespaces;
@ -437,7 +425,6 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno
return aConvertedName; return aConvertedName;
} }
// ---------------------------------------------------
OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const StringHashMap& aNamespaces ) OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const StringHashMap& aNamespaces )
{ {
OUString aNsAlias; OUString aNsAlias;
@ -464,7 +451,6 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const
return aResult; return aResult;
} }
// ---------------------------------------------------
OUString ManifestImport::ConvertName( const OUString& aName ) OUString ManifestImport::ConvertName( const OUString& aName )
{ {
OUString aConvertedName; OUString aConvertedName;

View File

@ -115,7 +115,6 @@ protected:
const OUString sPBKDF2_Name; const OUString sPBKDF2_Name;
const OUString sPBKDF2_URL; const OUString sPBKDF2_URL;
OUString PushNameAndNamespaces( const OUString& aName, OUString PushNameAndNamespaces( const OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs,
StringHashMap& o_aConvertedAttribs ); StringHashMap& o_aConvertedAttribs );

View File

@ -34,7 +34,6 @@ using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::packages; using namespace ::com::sun::star::packages;
using namespace ::com::sun::star::packages::manifest; using namespace ::com::sun::star::packages::manifest;
/** /**
* This function is called to get service factories for an implementation. * This function is called to get service factories for an implementation.
* @param pImplName name of implementation * @param pImplName name of implementation

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "disposelistener.hxx" #include "disposelistener.hxx"
#include "xstorage.hxx" #include "xstorage.hxx"

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "ocompinstream.hxx" #include "ocompinstream.hxx"
#include <com/sun/star/embed/StorageFormats.hpp> #include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
@ -28,7 +27,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
//-----------------------------------------------
OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl, OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
uno::Reference < io::XInputStream > xStream, uno::Reference < io::XInputStream > xStream,
const uno::Sequence< beans::PropertyValue >& aProps, const uno::Sequence< beans::PropertyValue >& aProps,
@ -48,7 +46,6 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
OSL_ENSURE( xStream.is(), "No stream is provided!\n" ); OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
} }
//-----------------------------------------------
OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream, OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
const uno::Sequence< beans::PropertyValue >& aProps, const uno::Sequence< beans::PropertyValue >& aProps,
sal_Int32 nStorageType ) sal_Int32 nStorageType )
@ -63,7 +60,6 @@ OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
OSL_ENSURE( xStream.is(), "No stream is provided!\n" ); OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
} }
//-----------------------------------------------
OInputCompStream::~OInputCompStream() OInputCompStream::~OInputCompStream()
{ {
{ {
@ -80,7 +76,6 @@ OInputCompStream::~OInputCompStream()
} }
} }
//-----------------------------------------------
uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType ) uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -111,7 +106,6 @@ uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
return OWeakObject::queryInterface( rType ); return OWeakObject::queryInterface( 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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -134,7 +128,6 @@ sal_Int32 SAL_CALL OInputCompStream::readBytes( uno::Sequence< sal_Int8 >& aData
return m_xStream->readBytes( aData, nBytesToRead ); return m_xStream->readBytes( aData, nBytesToRead );
} }
//-----------------------------------------------
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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -158,7 +151,6 @@ 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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -182,7 +174,6 @@ void SAL_CALL OInputCompStream::skipBytes( sal_Int32 nBytesToSkip )
} }
//-----------------------------------------------
sal_Int32 SAL_CALL OInputCompStream::available( ) sal_Int32 SAL_CALL OInputCompStream::available( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -205,7 +196,6 @@ sal_Int32 SAL_CALL OInputCompStream::available( )
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::closeInput( ) void SAL_CALL OInputCompStream::closeInput( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -214,7 +204,6 @@ void SAL_CALL OInputCompStream::closeInput( )
dispose(); dispose();
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL OInputCompStream::getInputStream() uno::Reference< io::XInputStream > SAL_CALL OInputCompStream::getInputStream()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -231,7 +220,6 @@ uno::Reference< io::XInputStream > SAL_CALL OInputCompStream::getInputStream()
return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY ); return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY );
} }
//-----------------------------------------------
uno::Reference< io::XOutputStream > SAL_CALL OInputCompStream::getOutputStream() uno::Reference< io::XOutputStream > SAL_CALL OInputCompStream::getOutputStream()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -245,7 +233,6 @@ uno::Reference< io::XOutputStream > SAL_CALL OInputCompStream::getOutputStream()
return uno::Reference< io::XOutputStream >(); return uno::Reference< io::XOutputStream >();
} }
//-----------------------------------------------
void OInputCompStream::InternalDispose() void OInputCompStream::InternalDispose()
{ {
// can be called only by OWriteStream_Impl // can be called only by OWriteStream_Impl
@ -274,7 +261,6 @@ void OInputCompStream::InternalDispose()
m_bDisposed = sal_True; m_bDisposed = sal_True;
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::dispose( ) void SAL_CALL OInputCompStream::dispose( )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -302,7 +288,6 @@ void SAL_CALL OInputCompStream::dispose( )
m_bDisposed = sal_True; m_bDisposed = sal_True;
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) void SAL_CALL OInputCompStream::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -319,7 +304,6 @@ void SAL_CALL OInputCompStream::addEventListener( const uno::Reference< lang::XE
m_pInterfaceContainer->addInterface( xListener ); m_pInterfaceContainer->addInterface( xListener );
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) void SAL_CALL OInputCompStream::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -334,7 +318,6 @@ void SAL_CALL OInputCompStream::removeEventListener( const uno::Reference< lang:
m_pInterfaceContainer->removeInterface( xListener ); m_pInterfaceContainer->removeInterface( xListener );
} }
//-----------------------------------------------
sal_Bool SAL_CALL OInputCompStream::hasByID( const OUString& sID ) sal_Bool SAL_CALL OInputCompStream::hasByID( const OUString& sID )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -361,7 +344,6 @@ sal_Bool SAL_CALL OInputCompStream::hasByID( const OUString& sID )
return sal_False; return sal_False;
} }
//-----------------------------------------------
OUString SAL_CALL OInputCompStream::getTargetByID( const OUString& sID ) OUString SAL_CALL OInputCompStream::getTargetByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -386,7 +368,6 @@ OUString SAL_CALL OInputCompStream::getTargetByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
OUString SAL_CALL OInputCompStream::getTypeByID( const OUString& sID ) OUString SAL_CALL OInputCompStream::getTypeByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -411,7 +392,6 @@ OUString SAL_CALL OInputCompStream::getTypeByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByID( const OUString& sID ) uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -442,7 +422,6 @@ uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByI
throw container::NoSuchElementException(); throw container::NoSuchElementException();
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getRelationshipsByType( const OUString& sType ) uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getRelationshipsByType( const OUString& sType )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -478,7 +457,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::g
return aResult; return aResult;
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getAllRelationships() uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getAllRelationships()
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -507,7 +485,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::g
throw io::IOException(); // the relations info could not be read throw io::IOException(); // the relations info could not be read
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::insertRelationshipByID( const OUString& /*sID*/, const uno::Sequence< beans::StringPair >& /*aEntry*/, ::sal_Bool /*bReplace*/ ) void SAL_CALL OInputCompStream::insertRelationshipByID( const OUString& /*sID*/, const uno::Sequence< beans::StringPair >& /*aEntry*/, ::sal_Bool /*bReplace*/ )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -527,7 +504,6 @@ void SAL_CALL OInputCompStream::insertRelationshipByID( const OUString& /*sID*/
throw io::IOException(); // TODO: Access denied throw io::IOException(); // TODO: Access denied
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::removeRelationshipByID( const OUString& /*sID*/ ) void SAL_CALL OInputCompStream::removeRelationshipByID( const OUString& /*sID*/ )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -547,7 +523,6 @@ void SAL_CALL OInputCompStream::removeRelationshipByID( const OUString& /*sID*/
throw io::IOException(); // TODO: Access denied throw io::IOException(); // TODO: Access denied
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& /*aEntries*/, ::sal_Bool /*bReplace*/ ) void SAL_CALL OInputCompStream::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& /*aEntries*/, ::sal_Bool /*bReplace*/ )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -567,7 +542,6 @@ void SAL_CALL OInputCompStream::insertRelationships( const uno::Sequence< uno::
throw io::IOException(); // TODO: Access denied throw io::IOException(); // TODO: Access denied
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::clearRelationships() void SAL_CALL OInputCompStream::clearRelationships()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -586,7 +560,6 @@ void SAL_CALL OInputCompStream::clearRelationships()
throw io::IOException(); // TODO: Access denied throw io::IOException(); // TODO: Access denied
} }
//-----------------------------------------------
uno::Reference< beans::XPropertySetInfo > SAL_CALL OInputCompStream::getPropertySetInfo() uno::Reference< beans::XPropertySetInfo > SAL_CALL OInputCompStream::getPropertySetInfo()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -602,7 +575,6 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OInputCompStream::getProperty
return uno::Reference< beans::XPropertySetInfo >(); return uno::Reference< beans::XPropertySetInfo >();
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::setPropertyValue( const OUString& aPropertyName, const uno::Any& /*aValue*/ ) void SAL_CALL OInputCompStream::setPropertyValue( const OUString& aPropertyName, const uno::Any& /*aValue*/ )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
beans::PropertyVetoException, beans::PropertyVetoException,
@ -630,8 +602,6 @@ void SAL_CALL OInputCompStream::setPropertyValue( const OUString& aPropertyName,
throw beans::UnknownPropertyException(); // TODO throw beans::UnknownPropertyException(); // TODO
} }
//-----------------------------------------------
uno::Any SAL_CALL OInputCompStream::getPropertyValue( const OUString& aProp ) uno::Any SAL_CALL OInputCompStream::getPropertyValue( const OUString& aProp )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
lang::WrappedTargetException, lang::WrappedTargetException,
@ -666,8 +636,6 @@ uno::Any SAL_CALL OInputCompStream::getPropertyValue( const OUString& aProp )
throw beans::UnknownPropertyException(); // TODO throw beans::UnknownPropertyException(); // TODO
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::addPropertyChangeListener( void SAL_CALL OInputCompStream::addPropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
@ -686,8 +654,6 @@ void SAL_CALL OInputCompStream::addPropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::removePropertyChangeListener( void SAL_CALL OInputCompStream::removePropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
@ -706,8 +672,6 @@ void SAL_CALL OInputCompStream::removePropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::addVetoableChangeListener( void SAL_CALL OInputCompStream::addVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -726,8 +690,6 @@ void SAL_CALL OInputCompStream::addVetoableChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OInputCompStream::removeVetoableChangeListener( void SAL_CALL OInputCompStream::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -746,5 +708,4 @@ void SAL_CALL OInputCompStream::removeVetoableChangeListener(
//TODO: //TODO:
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -28,11 +28,8 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
//===============================================
// OHierarchyHolder_Impl // OHierarchyHolder_Impl
//===============================================
//-----------------------------------------------
uno::Reference< embed::XExtendedStorageStream > OHierarchyHolder_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData ) uno::Reference< embed::XExtendedStorageStream > OHierarchyHolder_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData )
{ {
uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW ); uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
@ -48,7 +45,6 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyHolder_Impl::GetStream
return xResult; return xResult;
} }
//-----------------------------------------------
void OHierarchyHolder_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath ) void OHierarchyHolder_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath )
{ {
uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW ); uno::Reference< embed::XStorage > xOwnStor( m_xWeakOwnStorage.get(), uno::UNO_QUERY_THROW );
@ -56,7 +52,6 @@ void OHierarchyHolder_Impl::RemoveStreamHierarchically( OStringList_Impl& aListP
m_xChild->RemoveStreamHierarchically( aListPath ); m_xChild->RemoveStreamHierarchically( aListPath );
} }
//-----------------------------------------------
// static // static
OStringList_Impl OHierarchyHolder_Impl::GetListPathFromString( const OUString& aPath ) OStringList_Impl OHierarchyHolder_Impl::GetListPathFromString( const OUString& aPath )
{ {
@ -75,11 +70,8 @@ OStringList_Impl OHierarchyHolder_Impl::GetListPathFromString( const OUString& a
return aResult; return aResult;
} }
//===============================================
// OHierarchyElement_Impl // OHierarchyElement_Impl
//===============================================
//-----------------------------------------------
uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData ) uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, OStringList_Impl& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData )
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
@ -166,7 +158,6 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
return xResult; return xResult;
} }
//-----------------------------------------------
void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath ) void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aListPath )
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
@ -217,7 +208,6 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList
TestForClosing(); TestForClosing();
} }
//-----------------------------------------------
void OHierarchyElement_Impl::Commit() void OHierarchyElement_Impl::Commit()
{ {
::rtl::Reference< OHierarchyElement_Impl > aLocker( this ); ::rtl::Reference< OHierarchyElement_Impl > aLocker( this );
@ -239,7 +229,6 @@ void OHierarchyElement_Impl::Commit()
} }
} }
//-----------------------------------------------
void OHierarchyElement_Impl::TestForClosing() void OHierarchyElement_Impl::TestForClosing()
{ {
::rtl::Reference< OHierarchyElement_Impl > aLocker( this ); ::rtl::Reference< OHierarchyElement_Impl > aLocker( this );
@ -269,7 +258,6 @@ void OHierarchyElement_Impl::TestForClosing()
} }
} }
//-----------------------------------------------
void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source ) void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -298,7 +286,6 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source
} }
} }
//-----------------------------------------------
void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyElement_Impl >& aRef ) void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyElement_Impl >& aRef )
{ {
{ {
@ -318,13 +305,11 @@ void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyEl
} }
// XTransactionListener // XTransactionListener
//-----------------------------------------------
void SAL_CALL OHierarchyElement_Impl::preCommit( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) void SAL_CALL OHierarchyElement_Impl::preCommit( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{ {
} }
//-----------------------------------------------
void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
@ -341,13 +326,11 @@ void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::Ev
} }
} }
//-----------------------------------------------
void SAL_CALL OHierarchyElement_Impl::preRevert( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) void SAL_CALL OHierarchyElement_Impl::preRevert( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{ {
} }
//-----------------------------------------------
void SAL_CALL OHierarchyElement_Impl::reverted( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) void SAL_CALL OHierarchyElement_Impl::reverted( const ::com::sun::star::lang::EventObject& /*aEvent*/ )
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {

View File

@ -95,7 +95,6 @@ public:
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
throw (::com::sun::star::uno::RuntimeException); throw (::com::sun::star::uno::RuntimeException);
// XTransactionListener // XTransactionListener
virtual void SAL_CALL preCommit( const ::com::sun::star::lang::EventObject& aEvent ) virtual void SAL_CALL preCommit( const ::com::sun::star::lang::EventObject& aEvent )
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);

View File

@ -106,7 +106,6 @@ void SAL_CALL OInputSeekStream::release()
OInputCompStream::release(); OInputCompStream::release();
} }
void SAL_CALL OInputSeekStream::seek( sal_Int64 location ) void SAL_CALL OInputSeekStream::seek( sal_Int64 location )
throw ( lang::IllegalArgumentException, throw ( lang::IllegalArgumentException,
io::IOException, io::IOException,

View File

@ -52,12 +52,11 @@
// since the copying uses 32000 blocks usually, it makes sense to have a smaller size // since the copying uses 32000 blocks usually, it makes sense to have a smaller size
#define MAX_STORCACHE_SIZE 30000 #define MAX_STORCACHE_SIZE 30000
using namespace ::com::sun::star; using namespace ::com::sun::star;
namespace package namespace package
{ {
//-----------------------------------------------
bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 ) bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 )
{ {
bool bResult = ( aHash1.size() && aHash1.size() == aHash2.size() ); bool bResult = ( aHash1.size() && aHash1.size() == aHash2.size() );
@ -79,7 +78,6 @@ bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1,
return bResult; return bResult;
} }
//-----------------------------------------------
void StaticAddLog( const OUString& aMessage ) void StaticAddLog( const OUString& aMessage )
{ {
try try
@ -95,10 +93,9 @@ void StaticAddLog( const OUString& aMessage )
} }
} // namespace package } // namespace package
// ================================================================
namespace namespace
{ {
//-----------------------------------------------
void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet, void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet,
const uno::Sequence< beans::NamedValue >& aKey ) const uno::Sequence< beans::NamedValue >& aKey )
{ {
@ -118,7 +115,6 @@ void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >&
} }
} }
//-----------------------------------------------
uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet ) uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet )
{ {
SAL_WARN_IF( !xPropertySet.is(), "package.xstor", "No property set is provided!" ); SAL_WARN_IF( !xPropertySet.is(), "package.xstor", "No property set is provided!" );
@ -138,7 +134,6 @@ uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySe
} }
} }
//-----------------------------------------------
bool SequencesEqual( const uno::Sequence< sal_Int8 >& aSequence1, const uno::Sequence< sal_Int8 >& aSequence2 ) bool SequencesEqual( const uno::Sequence< sal_Int8 >& aSequence1, const uno::Sequence< sal_Int8 >& aSequence2 )
{ {
if ( aSequence1.getLength() != aSequence2.getLength() ) if ( aSequence1.getLength() != aSequence2.getLength() )
@ -151,7 +146,6 @@ bool SequencesEqual( const uno::Sequence< sal_Int8 >& aSequence1, const uno::Seq
return true; return true;
} }
//-----------------------------------------------
bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const uno::Sequence< beans::NamedValue >& aSequence2 ) bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const uno::Sequence< beans::NamedValue >& aSequence2 )
{ {
if ( aSequence1.getLength() != aSequence2.getLength() ) if ( aSequence1.getLength() != aSequence2.getLength() )
@ -200,7 +194,6 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
return true; return true;
} }
//-----------------------------------------------
sal_Bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContext >& xContext ) sal_Bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContext >& xContext )
{ {
if ( !xContext.is() ) if ( !xContext.is() )
@ -226,7 +219,6 @@ sal_Bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentCo
const sal_Int32 n_ConstBufferSize = 32000; const sal_Int32 n_ConstBufferSize = 32000;
//-----------------------------------------------
OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xContext ) OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xContext )
{ {
OUString aTempURL; OUString aTempURL;
@ -252,7 +244,6 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xCont
return aTempURL; return aTempURL;
} }
//-----------------------------------------------
uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XComponentContext >& xContext ) uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XComponentContext >& xContext )
{ {
return uno::Reference< io::XStream >( return uno::Reference< io::XStream >(
@ -261,9 +252,7 @@ uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XCo
} }
} // anonymous namespace } // anonymous namespace
// ================================================================
//-----------------------------------------------
OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent, OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
const uno::Reference< packages::XDataSinkEncrSupport >& xPackageStream, const uno::Reference< packages::XDataSinkEncrSupport >& xPackageStream,
const uno::Reference< lang::XSingleServiceFactory >& xPackage, const uno::Reference< lang::XSingleServiceFactory >& xPackage,
@ -297,7 +286,6 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
OSL_ENSURE( m_nStorageType == embed::StorageFormats::OFOPXML || !m_xOrigRelInfoStream.is(), "The Relations info makes sence only for OFOPXML format!\n" ); OSL_ENSURE( m_nStorageType == embed::StorageFormats::OFOPXML || !m_xOrigRelInfoStream.is(), "The Relations info makes sence only for OFOPXML format!\n" );
} }
//-----------------------------------------------
OWriteStream_Impl::~OWriteStream_Impl() OWriteStream_Impl::~OWriteStream_Impl()
{ {
DisposeWrappers(); DisposeWrappers();
@ -311,7 +299,6 @@ OWriteStream_Impl::~OWriteStream_Impl()
CleanCacheStream(); CleanCacheStream();
} }
//-----------------------------------------------
void OWriteStream_Impl::CleanCacheStream() void OWriteStream_Impl::CleanCacheStream()
{ {
if ( m_xCacheStream.is() ) if ( m_xCacheStream.is() )
@ -339,7 +326,6 @@ void OWriteStream_Impl::CleanCacheStream()
} }
} }
//-----------------------------------------------
void OWriteStream_Impl::AddLog( const OUString& aMessage ) void OWriteStream_Impl::AddLog( const OUString& aMessage )
{ {
if ( !m_xLogRing.is() ) if ( !m_xLogRing.is() )
@ -359,8 +345,6 @@ void OWriteStream_Impl::AddLog( const OUString& aMessage )
m_xLogRing->logString( aMessage ); m_xLogRing->logString( aMessage );
} }
//-----------------------------------------------
void OWriteStream_Impl::InsertIntoPackageFolder( const OUString& aName, void OWriteStream_Impl::InsertIntoPackageFolder( const OUString& aName,
const uno::Reference< container::XNameContainer >& xParentPackageFolder ) const uno::Reference< container::XNameContainer >& xParentPackageFolder )
{ {
@ -380,7 +364,6 @@ void OWriteStream_Impl::InsertIntoPackageFolder( const OUString& aName,
m_bHasInsertedStreamOptimization = sal_False; m_bHasInsertedStreamOptimization = sal_False;
} }
} }
//-----------------------------------------------
sal_Bool OWriteStream_Impl::IsEncrypted() sal_Bool OWriteStream_Impl::IsEncrypted()
{ {
if ( m_nStorageType != embed::StorageFormats::PACKAGE ) if ( m_nStorageType != embed::StorageFormats::PACKAGE )
@ -440,7 +423,6 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
return bToBeEncr; return bToBeEncr;
} }
//-----------------------------------------------
void OWriteStream_Impl::SetDecrypted() void OWriteStream_Impl::SetDecrypted()
{ {
SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" ); SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" );
@ -465,7 +447,6 @@ void OWriteStream_Impl::SetDecrypted()
} }
} }
//-----------------------------------------------
void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEncryptionData ) void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEncryptionData )
{ {
SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" ); SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" );
@ -494,7 +475,6 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn
m_aEncryptionData = aEncryptionData; m_aEncryptionData = aEncryptionData;
} }
//-----------------------------------------------
void OWriteStream_Impl::DisposeWrappers() void OWriteStream_Impl::DisposeWrappers()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -529,7 +509,6 @@ void OWriteStream_Impl::DisposeWrappers()
} }
} }
//-----------------------------------------------
OUString OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference< io::XInputStream >& xStream ) OUString OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference< io::XInputStream >& xStream )
{ {
if ( !m_aTempURL.getLength() ) if ( !m_aTempURL.getLength() )
@ -579,7 +558,6 @@ OUString OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference< io::XIn
return m_aTempURL; return m_aTempURL;
} }
//-----------------------------------------------
OUString OWriteStream_Impl::FillTempGetFileName() OUString OWriteStream_Impl::FillTempGetFileName()
{ {
// should try to create cache first, if the amount of contents is too big, the temp file should be taken // should try to create cache first, if the amount of contents is too big, the temp file should be taken
@ -659,7 +637,6 @@ OUString OWriteStream_Impl::FillTempGetFileName()
return m_aTempURL; return m_aTempURL;
} }
//-----------------------------------------------
uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream() uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream()
{ {
uno::Reference< io::XStream > xTempStream; uno::Reference< io::XStream > xTempStream;
@ -698,7 +675,6 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream()
return xTempStream; return xTempStream;
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream() uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream()
{ {
uno::Reference< io::XInputStream > xInputStream; uno::Reference< io::XInputStream > xInputStream;
@ -737,9 +713,6 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream()
return xInputStream; return xInputStream;
} }
// =================================================================================================
//-----------------------------------------------
void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputStream >& xInStream, void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputStream >& xInStream,
const uno::Sequence< beans::PropertyValue >& aProps ) const uno::Sequence< beans::PropertyValue >& aProps )
{ {
@ -824,7 +797,6 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt
m_bHasInsertedStreamOptimization = sal_True; m_bHasInsertedStreamOptimization = sal_True;
} }
//-----------------------------------------------
void OWriteStream_Impl::Commit() void OWriteStream_Impl::Commit()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -931,7 +903,6 @@ void OWriteStream_Impl::Commit()
m_bFlushed = sal_True; // will allow to use transaction on stream level if will need it m_bFlushed = sal_True; // will allow to use transaction on stream level if will need it
} }
//-----------------------------------------------
void OWriteStream_Impl::Revert() void OWriteStream_Impl::Revert()
{ {
// can be called only from parent storage // can be called only from parent storage
@ -986,7 +957,6 @@ void OWriteStream_Impl::Revert()
} }
} }
//-----------------------------------------------
uno::Sequence< beans::PropertyValue > OWriteStream_Impl::GetStreamProperties() uno::Sequence< beans::PropertyValue > OWriteStream_Impl::GetStreamProperties()
{ {
if ( !m_aProps.getLength() ) if ( !m_aProps.getLength() )
@ -995,7 +965,6 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::GetStreamProperties()
return m_aProps; return m_aProps;
} }
//-----------------------------------------------
uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
const uno::Sequence< beans::PropertyValue >& aProps, const uno::Sequence< beans::PropertyValue >& aProps,
sal_Bool bUseCommonEncryption ) sal_Bool bUseCommonEncryption )
@ -1044,7 +1013,6 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
return aResult; return aResult;
} }
//-----------------------------------------------
sal_Bool OWriteStream_Impl::IsTransacted() sal_Bool OWriteStream_Impl::IsTransacted()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1102,7 +1070,6 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
} }
} }
//-----------------------------------------------
uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProperties() uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProperties()
{ {
sal_Int32 nPropNum = 0; sal_Int32 nPropNum = 0;
@ -1160,7 +1127,6 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProper
return aResult; return aResult;
} }
//-----------------------------------------------
void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream, void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream,
const ::comphelper::SequenceAsHashMap& aEncryptionData ) const ::comphelper::SequenceAsHashMap& aEncryptionData )
{ {
@ -1189,7 +1155,6 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
xEncr->setEncryptionData( aEncryptionData.getAsConstNamedValueList() ); xEncr->setEncryptionData( aEncryptionData.getAsConstNamedValueList() );
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRelationshipsIfAny() uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRelationshipsIfAny()
{ {
if ( m_nStorageType != embed::StorageFormats::OFOPXML ) if ( m_nStorageType != embed::StorageFormats::OFOPXML )
@ -1206,7 +1171,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRel
uno::Reference< uno::XInterface >() ); uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream ) void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1225,7 +1189,6 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
} }
} }
//-----------------------------------------------
uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData, sal_Bool bHierarchyAccess ) uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData, sal_Bool bHierarchyAccess )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1286,7 +1249,6 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
return xResultStream; return xResultStream;
} }
//-----------------------------------------------
uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess ) uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1321,7 +1283,6 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
return xResultStream; return xResultStream;
} }
//-----------------------------------------------
uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess ) uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess )
{ {
// private method, no mutex is used // private method, no mutex is used
@ -1435,7 +1396,6 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
throw lang::IllegalArgumentException(); // TODO throw lang::IllegalArgumentException(); // TODO
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream() uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1449,7 +1409,6 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream()
return m_xPackageStream->getPlainRawStream(); return m_xPackageStream->getPlainRawStream();
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream() uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@ -1466,7 +1425,6 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream()
return m_xPackageStream->getRawStream(); return m_xPackageStream->getRawStream();
} }
//-----------------------------------------------
::comphelper::SequenceAsHashMap OWriteStream_Impl::GetCommonRootEncryptionData() ::comphelper::SequenceAsHashMap OWriteStream_Impl::GetCommonRootEncryptionData()
throw ( packages::NoEncryptionException ) throw ( packages::NoEncryptionException )
{ {
@ -1478,14 +1436,12 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream()
return m_pParent->GetCommonRootEncryptionData(); return m_pParent->GetCommonRootEncryptionData();
} }
//-----------------------------------------------
void OWriteStream_Impl::InputStreamDisposed( OInputCompStream* pStream ) void OWriteStream_Impl::InputStreamDisposed( OInputCompStream* pStream )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
m_aInputStreamsList.remove( pStream ); m_aInputStreamsList.remove( pStream );
} }
//-----------------------------------------------
void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, sal_Bool, uno::Reference< io::XStream >& xTargetStream ) void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, sal_Bool, uno::Reference< io::XStream >& xTargetStream )
{ {
uno::Reference < io::XStream > xTempFile; uno::Reference < io::XStream > xTempFile;
@ -1522,7 +1478,6 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io:
uno::UNO_QUERY_THROW ); uno::UNO_QUERY_THROW );
} }
//-----------------------------------------------
void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTargetStream ) void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTargetStream )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1561,7 +1516,6 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
} }
} }
//-----------------------------------------------
void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTargetStream, const ::comphelper::SequenceAsHashMap& aEncryptionData ) void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTargetStream, const ::comphelper::SequenceAsHashMap& aEncryptionData )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1630,7 +1584,6 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, m_bUseCommonEncryption, xTargetStream ); CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, m_bUseCommonEncryption, xTargetStream );
} }
//-----------------------------------------------
void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStorage >& xRelStorage, const OUString& aOrigStreamName, const OUString& aNewStreamName ) void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStorage >& xRelStorage, const OUString& aOrigStreamName, const OUString& aNewStreamName )
{ {
// at this point of time the old stream must be already cleaned // at this point of time the old stream must be already cleaned
@ -1731,11 +1684,8 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
} }
} }
//===============================================
// OWriteStream implementation // OWriteStream implementation
//===============================================
//-----------------------------------------------
OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted ) OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted )
: m_pImpl( pImpl ) : m_pImpl( pImpl )
, m_bInStreamDisconnected( sal_False ) , m_bInStreamDisconnected( sal_False )
@ -1752,7 +1702,6 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted )
m_pData = new WSInternalData_Impl( pImpl->m_rMutexRef, m_pImpl->m_nStorageType ); m_pData = new WSInternalData_Impl( pImpl->m_rMutexRef, m_pImpl->m_nStorageType );
} }
//-----------------------------------------------
OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStream > xStream, sal_Bool bTransacted ) OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStream > xStream, sal_Bool bTransacted )
: m_pImpl( pImpl ) : m_pImpl( pImpl )
, m_bInStreamDisconnected( sal_False ) , m_bInStreamDisconnected( sal_False )
@ -1777,7 +1726,6 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStrea
} }
} }
//-----------------------------------------------
OWriteStream::~OWriteStream() OWriteStream::~OWriteStream()
{ {
{ {
@ -1803,7 +1751,6 @@ OWriteStream::~OWriteStream()
delete m_pData; delete m_pData;
} }
//-----------------------------------------------
void OWriteStream::DeInit() void OWriteStream::DeInit()
{ {
if ( !m_pImpl ) if ( !m_pImpl )
@ -1818,7 +1765,6 @@ void OWriteStream::DeInit()
m_bInitOnDemand = sal_True; m_bInitOnDemand = sal_True;
} }
//-----------------------------------------------
void OWriteStream::CheckInitOnDemand() void OWriteStream::CheckInitOnDemand()
{ {
if ( !m_pImpl ) if ( !m_pImpl )
@ -1844,7 +1790,6 @@ void OWriteStream::CheckInitOnDemand()
} }
} }
//-----------------------------------------------
void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStream >& xDest ) void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStream >& xDest )
{ {
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@ -1914,7 +1859,6 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea
} }
} }
//-----------------------------------------------
void OWriteStream::ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aGuard ) void OWriteStream::ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aGuard )
{ {
if ( m_pImpl->m_pParent ) if ( m_pImpl->m_pParent )
@ -1930,7 +1874,6 @@ void OWriteStream::ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aG
} }
} }
//-----------------------------------------------
uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType ) uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -1983,19 +1926,16 @@ uno::Any SAL_CALL OWriteStream::queryInterface( const uno::Type& rType )
return OWeakObject::queryInterface( rType ); return OWeakObject::queryInterface( rType );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::acquire() throw() void SAL_CALL OWriteStream::acquire() throw()
{ {
OWeakObject::acquire(); OWeakObject::acquire();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::release() throw() void SAL_CALL OWriteStream::release() throw()
{ {
OWeakObject::release(); OWeakObject::release();
} }
//-----------------------------------------------
uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -2109,7 +2049,6 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes()
namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
//-----------------------------------------------
uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -2117,7 +2056,6 @@ uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId()
return rId.getImplementationId(); return rId.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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2140,7 +2078,6 @@ sal_Int32 SAL_CALL OWriteStream::readBytes( uno::Sequence< sal_Int8 >& aData, sa
return m_xInStream->readBytes( aData, nBytesToRead ); return m_xInStream->readBytes( aData, nBytesToRead );
} }
//-----------------------------------------------
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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2163,7 +2100,6 @@ sal_Int32 SAL_CALL OWriteStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData
return m_xInStream->readSomeBytes( aData, nMaxBytesToRead ); return m_xInStream->readSomeBytes( aData, nMaxBytesToRead );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip ) void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2186,7 +2122,6 @@ void SAL_CALL OWriteStream::skipBytes( sal_Int32 nBytesToSkip )
m_xInStream->skipBytes( nBytesToSkip ); m_xInStream->skipBytes( nBytesToSkip );
} }
//-----------------------------------------------
sal_Int32 SAL_CALL OWriteStream::available( ) sal_Int32 SAL_CALL OWriteStream::available( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -2209,7 +2144,6 @@ sal_Int32 SAL_CALL OWriteStream::available( )
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::closeInput( ) void SAL_CALL OWriteStream::closeInput( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -2236,7 +2170,6 @@ void SAL_CALL OWriteStream::closeInput( )
dispose(); dispose();
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL OWriteStream::getInputStream() uno::Reference< io::XInputStream > SAL_CALL OWriteStream::getInputStream()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -2254,7 +2187,6 @@ uno::Reference< io::XInputStream > SAL_CALL OWriteStream::getInputStream()
return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY ); return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY );
} }
//-----------------------------------------------
uno::Reference< io::XOutputStream > SAL_CALL OWriteStream::getOutputStream() uno::Reference< io::XOutputStream > SAL_CALL OWriteStream::getOutputStream()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -2274,7 +2206,6 @@ uno::Reference< io::XOutputStream > SAL_CALL OWriteStream::getOutputStream()
return uno::Reference< io::XOutputStream >( static_cast< io::XOutputStream* >( this ), uno::UNO_QUERY ); return uno::Reference< io::XOutputStream >( static_cast< io::XOutputStream* >( this ), uno::UNO_QUERY );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData ) void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2333,7 +2264,6 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
} }
} }
if ( !m_xOutStream.is() ) if ( !m_xOutStream.is() )
throw io::NotConnectedException(); throw io::NotConnectedException();
@ -2343,7 +2273,6 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::flush() void SAL_CALL OWriteStream::flush()
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2373,7 +2302,6 @@ void SAL_CALL OWriteStream::flush()
} }
} }
//-----------------------------------------------
void OWriteStream::CloseOutput_Impl() void OWriteStream::CloseOutput_Impl()
{ {
// all the checks must be done in calling method // all the checks must be done in calling method
@ -2396,7 +2324,6 @@ void OWriteStream::CloseOutput_Impl()
} }
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::closeOutput() void SAL_CALL OWriteStream::closeOutput()
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -2422,7 +2349,6 @@ void SAL_CALL OWriteStream::closeOutput()
dispose(); dispose();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::seek( sal_Int64 location ) void SAL_CALL OWriteStream::seek( sal_Int64 location )
throw ( lang::IllegalArgumentException, throw ( lang::IllegalArgumentException,
io::IOException, io::IOException,
@ -2444,7 +2370,6 @@ void SAL_CALL OWriteStream::seek( sal_Int64 location )
m_xSeekable->seek( location ); m_xSeekable->seek( location );
} }
//-----------------------------------------------
sal_Int64 SAL_CALL OWriteStream::getPosition() sal_Int64 SAL_CALL OWriteStream::getPosition()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException) uno::RuntimeException)
@ -2465,7 +2390,6 @@ sal_Int64 SAL_CALL OWriteStream::getPosition()
return m_xSeekable->getPosition(); return m_xSeekable->getPosition();
} }
//-----------------------------------------------
sal_Int64 SAL_CALL OWriteStream::getLength() sal_Int64 SAL_CALL OWriteStream::getLength()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -2486,7 +2410,6 @@ sal_Int64 SAL_CALL OWriteStream::getLength()
return m_xSeekable->getLength(); return m_xSeekable->getLength();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::truncate() void SAL_CALL OWriteStream::truncate()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -2519,7 +2442,6 @@ void SAL_CALL OWriteStream::truncate()
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::dispose() void SAL_CALL OWriteStream::dispose()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -2584,7 +2506,6 @@ void SAL_CALL OWriteStream::dispose()
m_pData->m_aListenersContainer.disposeAndClear( aSource ); m_pData->m_aListenersContainer.disposeAndClear( aSource );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::addEventListener( void SAL_CALL OWriteStream::addEventListener(
const uno::Reference< lang::XEventListener >& xListener ) const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -2601,7 +2522,6 @@ void SAL_CALL OWriteStream::addEventListener(
xListener ); xListener );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removeEventListener( void SAL_CALL OWriteStream::removeEventListener(
const uno::Reference< lang::XEventListener >& xListener ) const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -2618,7 +2538,6 @@ void SAL_CALL OWriteStream::removeEventListener(
xListener ); xListener );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::setEncryptionPassword( const OUString& aPass ) void SAL_CALL OWriteStream::setEncryptionPassword( const OUString& aPass )
throw ( uno::RuntimeException, throw ( uno::RuntimeException,
io::IOException ) io::IOException )
@ -2640,7 +2559,6 @@ void SAL_CALL OWriteStream::setEncryptionPassword( const OUString& aPass )
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removeEncryption() void SAL_CALL OWriteStream::removeEncryption()
throw ( uno::RuntimeException, throw ( uno::RuntimeException,
io::IOException ) io::IOException )
@ -2662,7 +2580,6 @@ void SAL_CALL OWriteStream::removeEncryption()
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::setEncryptionData( const uno::Sequence< beans::NamedValue >& aEncryptionData ) void SAL_CALL OWriteStream::setEncryptionData( const uno::Sequence< beans::NamedValue >& aEncryptionData )
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -2683,7 +2600,6 @@ void SAL_CALL OWriteStream::setEncryptionData( const uno::Sequence< beans::Named
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
sal_Bool SAL_CALL OWriteStream::hasEncryptionData() sal_Bool SAL_CALL OWriteStream::hasEncryptionData()
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@ -2700,7 +2616,6 @@ sal_Bool SAL_CALL OWriteStream::hasEncryptionData()
return bRet; return bRet;
} }
//-----------------------------------------------
sal_Bool SAL_CALL OWriteStream::hasByID( const OUString& sID ) sal_Bool SAL_CALL OWriteStream::hasByID( const OUString& sID )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -2730,7 +2645,6 @@ sal_Bool SAL_CALL OWriteStream::hasByID( const OUString& sID )
return sal_False; return sal_False;
} }
//-----------------------------------------------
OUString SAL_CALL OWriteStream::getTargetByID( const OUString& sID ) OUString SAL_CALL OWriteStream::getTargetByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -2755,7 +2669,6 @@ OUString SAL_CALL OWriteStream::getTargetByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
OUString SAL_CALL OWriteStream::getTypeByID( const OUString& sID ) OUString SAL_CALL OWriteStream::getTypeByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -2780,7 +2693,6 @@ OUString SAL_CALL OWriteStream::getTypeByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
uno::Sequence< beans::StringPair > SAL_CALL OWriteStream::getRelationshipByID( const OUString& sID ) uno::Sequence< beans::StringPair > SAL_CALL OWriteStream::getRelationshipByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -2811,7 +2723,6 @@ uno::Sequence< beans::StringPair > SAL_CALL OWriteStream::getRelationshipByID(
throw container::NoSuchElementException(); throw container::NoSuchElementException();
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getRelationshipsByType( const OUString& sType ) uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getRelationshipsByType( const OUString& sType )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -2847,7 +2758,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getRe
return aResult; return aResult;
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getAllRelationships() uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getAllRelationships()
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -2865,7 +2775,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getAl
return m_pImpl->GetAllRelationshipsIfAny(); return m_pImpl->GetAllRelationshipsIfAny();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::insertRelationshipByID( const OUString& sID, const uno::Sequence< beans::StringPair >& aEntry, ::sal_Bool bReplace ) void SAL_CALL OWriteStream::insertRelationshipByID( const OUString& sID, const uno::Sequence< beans::StringPair >& aEntry, ::sal_Bool bReplace )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -2924,13 +2833,11 @@ void SAL_CALL OWriteStream::insertRelationshipByID( const OUString& sID, const
else else
throw container::ElementExistException(); // TODO throw container::ElementExistException(); // TODO
m_pImpl->m_aNewRelInfo = aSeq; m_pImpl->m_aNewRelInfo = aSeq;
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >(); m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removeRelationshipByID( const OUString& sID ) void SAL_CALL OWriteStream::removeRelationshipByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -2972,7 +2879,6 @@ void SAL_CALL OWriteStream::removeRelationshipByID( const OUString& sID )
throw container::NoSuchElementException(); throw container::NoSuchElementException();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, ::sal_Bool bReplace ) void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, ::sal_Bool bReplace )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -3055,7 +2961,6 @@ void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequ
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::clearRelationships() void SAL_CALL OWriteStream::clearRelationships()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -3076,7 +2981,6 @@ void SAL_CALL OWriteStream::clearRelationships()
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//-----------------------------------------------
uno::Reference< beans::XPropertySetInfo > SAL_CALL OWriteStream::getPropertySetInfo() uno::Reference< beans::XPropertySetInfo > SAL_CALL OWriteStream::getPropertySetInfo()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -3086,7 +2990,6 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OWriteStream::getPropertySetI
return uno::Reference< beans::XPropertySetInfo >(); return uno::Reference< beans::XPropertySetInfo >();
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
beans::PropertyVetoException, beans::PropertyVetoException,
@ -3210,8 +3113,6 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
ModifyParentUnlockMutex_Impl( aGuard ); ModifyParentUnlockMutex_Impl( aGuard );
} }
//-----------------------------------------------
uno::Any SAL_CALL OWriteStream::getPropertyValue( const OUString& aProp ) uno::Any SAL_CALL OWriteStream::getPropertyValue( const OUString& aProp )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
lang::WrappedTargetException, lang::WrappedTargetException,
@ -3265,8 +3166,6 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const OUString& aProp )
throw beans::UnknownPropertyException(); // TODO throw beans::UnknownPropertyException(); // TODO
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::addPropertyChangeListener( void SAL_CALL OWriteStream::addPropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
@ -3285,8 +3184,6 @@ void SAL_CALL OWriteStream::addPropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removePropertyChangeListener( void SAL_CALL OWriteStream::removePropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
@ -3305,8 +3202,6 @@ void SAL_CALL OWriteStream::removePropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::addVetoableChangeListener( void SAL_CALL OWriteStream::addVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -3325,8 +3220,6 @@ void SAL_CALL OWriteStream::addVetoableChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removeVetoableChangeListener( void SAL_CALL OWriteStream::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -3345,11 +3238,8 @@ void SAL_CALL OWriteStream::removeVetoableChangeListener(
//TODO: //TODO:
} }
//____________________________________________________________________________________________________
// XTransactedObject // XTransactedObject
//____________________________________________________________________________________________________
//-----------------------------------------------
void OWriteStream::BroadcastTransaction( sal_Int8 nMessage ) void OWriteStream::BroadcastTransaction( sal_Int8 nMessage )
/* /*
1 - preCommit 1 - preCommit
@ -3395,7 +3285,6 @@ void OWriteStream::BroadcastTransaction( sal_Int8 nMessage )
} }
} }
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::commit() void SAL_CALL OWriteStream::commit()
throw ( io::IOException, throw ( io::IOException,
embed::StorageWrappedTargetException, embed::StorageWrappedTargetException,
@ -3460,7 +3349,6 @@ void SAL_CALL OWriteStream::commit()
BroadcastTransaction( STOR_MESS_COMMITED ); BroadcastTransaction( STOR_MESS_COMMITED );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::revert() void SAL_CALL OWriteStream::revert()
throw ( io::IOException, throw ( io::IOException,
embed::StorageWrappedTargetException, embed::StorageWrappedTargetException,
@ -3526,11 +3414,8 @@ void SAL_CALL OWriteStream::revert()
BroadcastTransaction( STOR_MESS_REVERTED ); BroadcastTransaction( STOR_MESS_REVERTED );
} }
//____________________________________________________________________________________________________
// XTransactionBroadcaster // XTransactionBroadcaster
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OWriteStream::addTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener ) void SAL_CALL OWriteStream::addTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -3549,7 +3434,6 @@ void SAL_CALL OWriteStream::addTransactionListener( const uno::Reference< embed:
aListener ); aListener );
} }
//-----------------------------------------------
void SAL_CALL OWriteStream::removeTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener ) void SAL_CALL OWriteStream::removeTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -3568,5 +3452,4 @@ void SAL_CALL OWriteStream::removeTransactionListener( const uno::Reference< emb
aListener ); aListener );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -40,7 +40,6 @@
#include <com/sun/star/beans/StringPair.hpp> #include <com/sun/star/beans/StringPair.hpp>
#include <com/sun/star/logging/XSimpleLogRing.hpp> #include <com/sun/star/logging/XSimpleLogRing.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weak.hxx> #include <cppuhelper/weak.hxx>
#include <cppuhelper/interfacecontainer.h> #include <cppuhelper/interfacecontainer.h>
@ -52,7 +51,6 @@
#include "ocompinstream.hxx" #include "ocompinstream.hxx"
#include "mutexholder.hxx" #include "mutexholder.hxx"
struct PreCreationStruct struct PreCreationStruct
{ {
SotMutexHolderRef m_rMutexRef; SotMutexHolderRef m_rMutexRef;
@ -143,7 +141,6 @@ struct OWriteStream_Impl : public PreCreationStruct
sal_Int16 m_nRelInfoStatus; sal_Int16 m_nRelInfoStatus;
sal_Int32 m_nRelId; sal_Int32 m_nRelId;
private: private:
OUString GetFilledTempFileIfNo( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream ); OUString GetFilledTempFileIfNo( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream );
OUString FillTempGetFileName(); OUString FillTempGetFileName();
@ -231,7 +228,6 @@ public:
sal_Int32 nStreamMode, sal_Int32 nStreamMode,
sal_Bool bHierarchyAccess ); sal_Bool bHierarchyAccess );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRawInStream(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRawInStream();
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetPlainRawInStream(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetPlainRawInStream();
@ -248,7 +244,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream, ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream,
const ::comphelper::SequenceAsHashMap& aEncryptionData ); const ::comphelper::SequenceAsHashMap& aEncryptionData );
void CommitStreamRelInfo( void CommitStreamRelInfo(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xRelStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xRelStorage,
const OUString& aOrigStreamName, const OUString& aOrigStreamName,

View File

@ -25,7 +25,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
extern "C" { extern "C" {
SAL_DLLPUBLIC_EXPORT void * SAL_CALL xstor_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) SAL_DLLPUBLIC_EXPORT void * SAL_CALL xstor_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include "selfterminatefilestream.hxx" #include "selfterminatefilestream.hxx"
@ -25,7 +24,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
//-----------------------------------------------
OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext > xContext, const OUString& aURL ) OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext > xContext, const OUString& aURL )
: m_aURL( aURL ) : m_aURL( aURL )
{ {
@ -42,13 +40,11 @@ OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::X
m_xSeekable.set( m_xInputStream, uno::UNO_QUERY_THROW ); m_xSeekable.set( m_xInputStream, uno::UNO_QUERY_THROW );
} }
//-----------------------------------------------
OSelfTerminateFileStream::~OSelfTerminateFileStream() OSelfTerminateFileStream::~OSelfTerminateFileStream()
{ {
CloseStreamDeleteFile(); CloseStreamDeleteFile();
} }
//-----------------------------------------------
void OSelfTerminateFileStream::CloseStreamDeleteFile() void OSelfTerminateFileStream::CloseStreamDeleteFile()
{ {
try try
@ -66,7 +62,6 @@ 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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -76,7 +71,6 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::readBytes( uno::Sequence< sal_Int8
return m_xInputStream->readBytes( aData, nBytesToRead ); return m_xInputStream->readBytes( aData, nBytesToRead );
} }
//-----------------------------------------------
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, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -86,7 +80,6 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::readSomeBytes( uno::Sequence< sal_I
return m_xInputStream->readSomeBytes( aData, nMaxBytesToRead ); return m_xInputStream->readSomeBytes( aData, nMaxBytesToRead );
} }
//-----------------------------------------------
void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip ) void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::BufferSizeExceededException, io::BufferSizeExceededException,
@ -96,7 +89,6 @@ void SAL_CALL OSelfTerminateFileStream::skipBytes( sal_Int32 nBytesToSkip )
return m_xInputStream->skipBytes( nBytesToSkip ); return m_xInputStream->skipBytes( nBytesToSkip );
} }
//-----------------------------------------------
sal_Int32 SAL_CALL OSelfTerminateFileStream::available( ) sal_Int32 SAL_CALL OSelfTerminateFileStream::available( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -105,7 +97,6 @@ sal_Int32 SAL_CALL OSelfTerminateFileStream::available( )
return m_xInputStream->available(); return m_xInputStream->available();
} }
//-----------------------------------------------
void SAL_CALL OSelfTerminateFileStream::closeInput( ) void SAL_CALL OSelfTerminateFileStream::closeInput( )
throw ( io::NotConnectedException, throw ( io::NotConnectedException,
io::IOException, io::IOException,
@ -114,7 +105,6 @@ void SAL_CALL OSelfTerminateFileStream::closeInput( )
CloseStreamDeleteFile(); CloseStreamDeleteFile();
} }
//-----------------------------------------------
void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location ) void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location )
throw ( lang::IllegalArgumentException, throw ( lang::IllegalArgumentException,
io::IOException, io::IOException,
@ -123,7 +113,6 @@ void SAL_CALL OSelfTerminateFileStream::seek( sal_Int64 location )
m_xSeekable->seek( location ); m_xSeekable->seek( location );
} }
//-----------------------------------------------
sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition() sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException) uno::RuntimeException)
@ -131,7 +120,6 @@ sal_Int64 SAL_CALL OSelfTerminateFileStream::getPosition()
return m_xSeekable->getPosition(); return m_xSeekable->getPosition();
} }
//-----------------------------------------------
sal_Int64 SAL_CALL OSelfTerminateFileStream::getLength() sal_Int64 SAL_CALL OSelfTerminateFileStream::getLength()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )

View File

@ -26,7 +26,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
// ========================================================================
struct SPStreamData_Impl struct SPStreamData_Impl
{ {
sal_Bool m_bInStreamBased; sal_Bool m_bInStreamBased;
@ -43,7 +42,6 @@ struct SPStreamData_Impl
sal_Bool m_bInOpen; sal_Bool m_bInOpen;
sal_Bool m_bOutOpen; sal_Bool m_bOutOpen;
SPStreamData_Impl( SPStreamData_Impl(
sal_Bool bInStreamBased, sal_Bool bInStreamBased,
const uno::Reference< io::XStream >& xOrigStream, const uno::Reference< io::XStream >& xOrigStream,
@ -65,8 +63,6 @@ struct SPStreamData_Impl
} }
}; };
// ========================================================================
// ------------------------------------------------------------------------
SwitchablePersistenceStream::SwitchablePersistenceStream( SwitchablePersistenceStream::SwitchablePersistenceStream(
const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< io::XStream >& xStream ) const uno::Reference< io::XStream >& xStream )
@ -76,7 +72,6 @@ SwitchablePersistenceStream::SwitchablePersistenceStream(
SwitchPersistenceTo( xStream ); SwitchPersistenceTo( xStream );
} }
// ------------------------------------------------------------------------
SwitchablePersistenceStream::SwitchablePersistenceStream( SwitchablePersistenceStream::SwitchablePersistenceStream(
const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< io::XInputStream >& xInputStream ) const uno::Reference< io::XInputStream >& xInputStream )
@ -86,13 +81,11 @@ SwitchablePersistenceStream::SwitchablePersistenceStream(
SwitchPersistenceTo( xInputStream ); SwitchPersistenceTo( xInputStream );
} }
// ------------------------------------------------------------------------
SwitchablePersistenceStream::~SwitchablePersistenceStream() SwitchablePersistenceStream::~SwitchablePersistenceStream()
{ {
CloseAll_Impl(); CloseAll_Impl();
} }
// ------------------------------------------------------------------------
void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io::XStream >& xStream ) void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io::XStream >& xStream )
{ {
uno::Reference< io::XTruncate > xNewTruncate( xStream, uno::UNO_QUERY_THROW ); uno::Reference< io::XTruncate > xNewTruncate( xStream, uno::UNO_QUERY_THROW );
@ -127,7 +120,6 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
bInOpen, bOutOpen ); bInOpen, bOutOpen );
} }
// ------------------------------------------------------------------------
void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io::XInputStream >& xInputStream ) void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io::XInputStream >& xInputStream )
{ {
uno::Reference< io::XStream > xNewStream; uno::Reference< io::XStream > xNewStream;
@ -163,7 +155,6 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
} }
// ------------------------------------------------------------------------
void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Reference< io::XStream >& xStream ) void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Reference< io::XStream >& xStream )
{ {
uno::Reference< io::XStream > xTargetStream = xStream; uno::Reference< io::XStream > xTargetStream = xStream;
@ -210,7 +201,6 @@ void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Referen
bInOpen, bOutOpen ); bInOpen, bOutOpen );
} }
// ------------------------------------------------------------------------
void SwitchablePersistenceStream::CloseAll_Impl() void SwitchablePersistenceStream::CloseAll_Impl()
{ {
if ( m_pStreamData ) if ( m_pStreamData )
@ -221,7 +211,6 @@ void SwitchablePersistenceStream::CloseAll_Impl()
} }
// com::sun::star::io::XStream // com::sun::star::io::XStream
// ------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInputStream( ) uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInputStream( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@ -232,8 +221,6 @@ uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInpu
return static_cast< io::XInputStream* >( this ); return static_cast< io::XInputStream* >( this );
} }
// ------------------------------------------------------------------------
uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOutputStream( ) uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOutputStream( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@ -244,10 +231,7 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
return static_cast< io::XOutputStream* >( this ); return static_cast< io::XOutputStream* >( this );
} }
// com::sun::star::io::XInputStream // com::sun::star::io::XInputStream
// ------------------------------------------------------------------------
::sal_Int32 SAL_CALL SwitchablePersistenceStream::readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) ::sal_Int32 SAL_CALL SwitchablePersistenceStream::readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -263,8 +247,6 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
return m_pStreamData->m_xOrigInStream->readBytes( aData, nBytesToRead ); return m_pStreamData->m_xOrigInStream->readBytes( aData, nBytesToRead );
} }
// ------------------------------------------------------------------------
::sal_Int32 SAL_CALL SwitchablePersistenceStream::readSomeBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead ) ::sal_Int32 SAL_CALL SwitchablePersistenceStream::readSomeBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -280,7 +262,6 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
return m_pStreamData->m_xOrigInStream->readBytes( aData, nMaxBytesToRead ); return m_pStreamData->m_xOrigInStream->readBytes( aData, nMaxBytesToRead );
} }
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip ) void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -296,8 +277,6 @@ void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
m_pStreamData->m_xOrigInStream->skipBytes( nBytesToSkip ); m_pStreamData->m_xOrigInStream->skipBytes( nBytesToSkip );
} }
// ------------------------------------------------------------------------
::sal_Int32 SAL_CALL SwitchablePersistenceStream::available( ) ::sal_Int32 SAL_CALL SwitchablePersistenceStream::available( )
throw (io::NotConnectedException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::IOException, uno::RuntimeException)
{ {
@ -313,8 +292,6 @@ void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
return m_pStreamData->m_xOrigInStream->available(); return m_pStreamData->m_xOrigInStream->available();
} }
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::closeInput() void SAL_CALL SwitchablePersistenceStream::closeInput()
throw (io::NotConnectedException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::IOException, uno::RuntimeException)
{ {
@ -328,10 +305,7 @@ void SAL_CALL SwitchablePersistenceStream::closeInput()
CloseAll_Impl(); CloseAll_Impl();
} }
// com::sun::star::io::XOutputStream // com::sun::star::io::XOutputStream
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::writeBytes( const uno::Sequence< ::sal_Int8 >& aData ) void SAL_CALL SwitchablePersistenceStream::writeBytes( const uno::Sequence< ::sal_Int8 >& aData )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -350,8 +324,6 @@ void SAL_CALL SwitchablePersistenceStream::writeBytes( const uno::Sequence< ::sa
m_pStreamData->m_xOrigOutStream->writeBytes( aData ); m_pStreamData->m_xOrigOutStream->writeBytes( aData );
} }
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::flush( ) void SAL_CALL SwitchablePersistenceStream::flush( )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -373,8 +345,6 @@ void SAL_CALL SwitchablePersistenceStream::flush( )
m_pStreamData->m_xOrigOutStream->flush(); m_pStreamData->m_xOrigOutStream->flush();
} }
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::closeOutput( ) void SAL_CALL SwitchablePersistenceStream::closeOutput( )
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{ {
@ -388,10 +358,7 @@ void SAL_CALL SwitchablePersistenceStream::closeOutput( )
CloseAll_Impl(); CloseAll_Impl();
} }
// com::sun::star::io::XTruncate // com::sun::star::io::XTruncate
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::truncate( ) void SAL_CALL SwitchablePersistenceStream::truncate( )
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -410,9 +377,7 @@ void SAL_CALL SwitchablePersistenceStream::truncate( )
m_pStreamData->m_xOrigTruncate->truncate(); m_pStreamData->m_xOrigTruncate->truncate();
} }
// com::sun::star::io::XSeekable // com::sun::star::io::XSeekable
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location ) void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
throw (lang::IllegalArgumentException, io::IOException, uno::RuntimeException) throw (lang::IllegalArgumentException, io::IOException, uno::RuntimeException)
{ {
@ -428,8 +393,6 @@ void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
m_pStreamData->m_xOrigSeekable->seek( location ); m_pStreamData->m_xOrigSeekable->seek( location );
} }
// ------------------------------------------------------------------------
::sal_Int64 SAL_CALL SwitchablePersistenceStream::getPosition( ) ::sal_Int64 SAL_CALL SwitchablePersistenceStream::getPosition( )
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -445,8 +408,6 @@ void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
return m_pStreamData->m_xOrigSeekable->getPosition(); return m_pStreamData->m_xOrigSeekable->getPosition();
} }
// ------------------------------------------------------------------------
::sal_Int64 SAL_CALL SwitchablePersistenceStream::getLength( ) ::sal_Int64 SAL_CALL SwitchablePersistenceStream::getLength( )
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -462,7 +423,6 @@ void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
return m_pStreamData->m_xOrigSeekable->getLength(); return m_pStreamData->m_xOrigSeekable->getLength();
} }
// ------------------------------------------------------------------------
void SAL_CALL SwitchablePersistenceStream::waitForCompletion() void SAL_CALL SwitchablePersistenceStream::waitForCompletion()
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{ {

View File

@ -34,13 +34,11 @@
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <cppuhelper/implbase6.hxx> #include <cppuhelper/implbase6.hxx>
//==================================================================
// SwitchablePersistenceStream // SwitchablePersistenceStream
// //
// Allows to switch the stream persistence on the fly. The target // Allows to switch the stream persistence on the fly. The target
// stream ( if not filled by the implementation ) MUST have the same // stream ( if not filled by the implementation ) MUST have the same
// size as the original one! // size as the original one!
//==================================================================
struct SPStreamData_Impl; struct SPStreamData_Impl;
class SwitchablePersistenceStream class SwitchablePersistenceStream
@ -109,5 +107,4 @@ public:
#endif //_SPSTREAM_HXX #endif //_SPSTREAM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -30,10 +30,8 @@
#include "xfactory.hxx" #include "xfactory.hxx"
#include "xstorage.hxx" #include "xstorage.hxx"
using namespace ::com::sun::star; using namespace ::com::sun::star;
//-------------------------------------------------------------------------
sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& xInputStream, sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& xInputStream,
const uno::Reference< io::XSeekable >& xSeekable ) const uno::Reference< io::XSeekable >& xSeekable )
{ {
@ -55,7 +53,6 @@ sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& x
return sal_True; // allow to create a storage based on empty stream return sal_True; // allow to create a storage based on empty stream
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OStorageFactory::impl_staticGetSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OStorageFactory::impl_staticGetSupportedServiceNames()
{ {
uno::Sequence< OUString > aRet(2); uno::Sequence< OUString > aRet(2);
@ -64,20 +61,17 @@ uno::Sequence< OUString > SAL_CALL OStorageFactory::impl_staticGetSupportedServi
return aRet; return aRet;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OStorageFactory::impl_staticGetImplementationName() OUString SAL_CALL OStorageFactory::impl_staticGetImplementationName()
{ {
return OUString("com.sun.star.comp.embed.StorageFactory"); return OUString("com.sun.star.comp.embed.StorageFactory");
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::impl_staticCreateSelfInstance( uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::impl_staticCreateSelfInstance(
const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) const uno::Reference< lang::XMultiServiceFactory >& xServiceManager )
{ {
return uno::Reference< uno::XInterface >( *new OStorageFactory( comphelper::getComponentContext(xServiceManager) ) ); return uno::Reference< uno::XInterface >( *new OStorageFactory( comphelper::getComponentContext(xServiceManager) ) );
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance() uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance()
throw ( uno::Exception, throw ( uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
@ -96,7 +90,6 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance()
uno::UNO_QUERY ); uno::UNO_QUERY );
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithArguments( uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithArguments(
const uno::Sequence< uno::Any >& aArguments ) const uno::Sequence< uno::Any >& aArguments )
throw ( uno::Exception, throw ( uno::Exception,
@ -280,14 +273,12 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
throw uno::Exception(); // general error during creation throw uno::Exception(); // general error during creation
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OStorageFactory::getImplementationName() OUString SAL_CALL OStorageFactory::getImplementationName()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
return impl_staticGetImplementationName(); return impl_staticGetImplementationName();
} }
//-------------------------------------------------------------------------
sal_Bool SAL_CALL OStorageFactory::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL OStorageFactory::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -300,7 +291,6 @@ sal_Bool SAL_CALL OStorageFactory::supportsService( const OUString& ServiceName
return sal_False; return sal_False;
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OStorageFactory::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OStorageFactory::getSupportedServiceNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {

View File

@ -23,10 +23,8 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
class OStorageFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleServiceFactory, class OStorageFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleServiceFactory,
::com::sun::star::lang::XServiceInfo > ::com::sun::star::lang::XServiceInfo >
{ {
@ -48,7 +46,6 @@ public:
impl_staticCreateSelfInstance( impl_staticCreateSelfInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
// XSingleServiceFactory // XSingleServiceFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);

View File

@ -31,7 +31,6 @@
#include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
@ -56,8 +55,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
//=========================================================
typedef ::std::list< uno::WeakReference< lang::XComponent > > WeakComponentList; typedef ::std::list< uno::WeakReference< lang::XComponent > > WeakComponentList;
struct StorInternalData_Impl struct StorInternalData_Impl
@ -89,7 +86,6 @@ struct StorInternalData_Impl
~StorInternalData_Impl(); ~StorInternalData_Impl();
}; };
//=========================================================
OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xContext ); OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext > xContext );
// static // static
@ -161,7 +157,6 @@ StorInternalData_Impl::~StorInternalData_Impl()
delete m_pTypeCollection; delete m_pTypeCollection;
} }
SotElement_Impl::SotElement_Impl( const OUString& rName, sal_Bool bStor, sal_Bool bNew ) SotElement_Impl::SotElement_Impl( const OUString& rName, sal_Bool bStor, sal_Bool bNew )
: m_aName( rName ) : m_aName( rName )
, m_aOriginalName( rName ) , m_aOriginalName( rName )
@ -182,7 +177,6 @@ SotElement_Impl::~SotElement_Impl()
delete m_pStream; delete m_pStream;
} }
//-----------------------------------------------
// most of properties are holt by the storage but are not used // 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, sal_Int32 nMode,
@ -222,7 +216,6 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
} }
} }
//-----------------------------------------------
// most of properties are holt by the storage but are not used // 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, sal_Int32 nMode,
@ -265,7 +258,6 @@ 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, sal_Int32 nMode,
uno::Reference< container::XNameContainer > xPackageFolder, uno::Reference< container::XNameContainer > xPackageFolder,
@ -296,7 +288,6 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
SAL_WARN_IF( !xPackageFolder.is(), "package.xstor", "No package folder!" ); SAL_WARN_IF( !xPackageFolder.is(), "package.xstor", "No package folder!" );
} }
//-----------------------------------------------
OStorage_Impl::~OStorage_Impl() OStorage_Impl::~OStorage_Impl()
{ {
{ {
@ -394,7 +385,6 @@ OStorage_Impl::~OStorage_Impl()
} }
} }
//-----------------------------------------------
void OStorage_Impl::AddLog( const OUString& aMessage ) void OStorage_Impl::AddLog( const OUString& aMessage )
{ {
if ( !m_xLogRing.is() ) if ( !m_xLogRing.is() )
@ -414,7 +404,6 @@ void OStorage_Impl::AddLog( const OUString& aMessage )
m_xLogRing->logString( aMessage ); m_xLogRing->logString( aMessage );
} }
//-----------------------------------------------
void OStorage_Impl::SetReadOnlyWrap( OStorage& aStorage ) void OStorage_Impl::SetReadOnlyWrap( OStorage& aStorage )
{ {
// Weak reference is used inside the holder so the refcount must not be zero at this point // Weak reference is used inside the holder so the refcount must not be zero at this point
@ -422,7 +411,6 @@ void OStorage_Impl::SetReadOnlyWrap( OStorage& aStorage )
m_aReadOnlyWrapList.push_back( StorageHolder_Impl( &aStorage ) ); m_aReadOnlyWrapList.push_back( StorageHolder_Impl( &aStorage ) );
} }
//-----------------------------------------------
void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage ) void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage )
{ {
for ( OStorageList_Impl::iterator pStorageIter = m_aReadOnlyWrapList.begin(); for ( OStorageList_Impl::iterator pStorageIter = m_aReadOnlyWrapList.begin();
@ -448,7 +436,6 @@ void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage )
} }
} }
//-----------------------------------------------
void OStorage_Impl::OpenOwnPackage() void OStorage_Impl::OpenOwnPackage()
{ {
SAL_WARN_IF( !m_bIsRoot, "package.xstor", "Opening of the package has no sence!" ); SAL_WARN_IF( !m_bIsRoot, "package.xstor", "Opening of the package has no sence!" );
@ -532,7 +519,6 @@ void OStorage_Impl::OpenOwnPackage()
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext() uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext()
{ {
if ( m_xContext.is() ) if ( m_xContext.is() )
@ -541,7 +527,6 @@ uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext()
return ::comphelper::getProcessComponentContext(); return ::comphelper::getProcessComponentContext();
} }
//-----------------------------------------------
SotElementList_Impl& OStorage_Impl::GetChildrenList() SotElementList_Impl& OStorage_Impl::GetChildrenList()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -550,7 +535,6 @@ SotElementList_Impl& OStorage_Impl::GetChildrenList()
return m_aChildrenList; return m_aChildrenList;
} }
//-----------------------------------------------
void OStorage_Impl::GetStorageProperties() void OStorage_Impl::GetStorageProperties()
{ {
if ( m_nStorageType == embed::StorageFormats::PACKAGE ) if ( m_nStorageType == embed::StorageFormats::PACKAGE )
@ -576,7 +560,6 @@ void OStorage_Impl::GetStorageProperties()
// the properties of OFOPXML will be handled directly // the properties of OFOPXML will be handled directly
} }
//-----------------------------------------------
void OStorage_Impl::ReadRelInfoIfNecessary() void OStorage_Impl::ReadRelInfoIfNecessary()
{ {
if ( m_nStorageType != embed::StorageFormats::OFOPXML ) if ( m_nStorageType != embed::StorageFormats::OFOPXML )
@ -614,7 +597,6 @@ void OStorage_Impl::ReadRelInfoIfNecessary()
} }
} }
//-----------------------------------------------
void OStorage_Impl::ReadContents() void OStorage_Impl::ReadContents()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -693,7 +675,6 @@ void OStorage_Impl::ReadContents()
GetStorageProperties(); GetStorageProperties();
} }
//-----------------------------------------------
void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDest, sal_Bool bDirect ) void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDest, sal_Bool bDirect )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -784,7 +765,6 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
xObjToCommit->commit(); xObjToCommit->commit();
} }
//-----------------------------------------------
void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< embed::XStorage > xDest, uno::Reference< embed::XStorage > xDest,
OUString aName, OUString aName,
@ -991,7 +971,6 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
} }
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelationshipsIfAny() uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelationshipsIfAny()
{ {
if ( m_nStorageType != embed::StorageFormats::OFOPXML ) if ( m_nStorageType != embed::StorageFormats::OFOPXML )
@ -1007,7 +986,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelatio
uno::Reference< uno::XInterface >() ); uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& xNewStor ) void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& xNewStor )
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1027,7 +1005,6 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
aTempRepresent.CopyToStorage( xNewStor, sal_False ); aTempRepresent.CopyToStorage( xNewStor, sal_False );
} }
//-----------------------------------------------
void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName, void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
const uno::Reference< container::XNameContainer >& xParentPackageFolder ) const uno::Reference< container::XNameContainer >& xParentPackageFolder )
{ {
@ -1043,7 +1020,6 @@ void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
m_bCommited = sal_False; m_bCommited = sal_False;
} }
//-----------------------------------------------
void OStorage_Impl::Commit() void OStorage_Impl::Commit()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1296,7 +1272,6 @@ void OStorage_Impl::Commit()
m_bMTFallbackUsed = sal_False; m_bMTFallbackUsed = sal_False;
} }
//-----------------------------------------------
void OStorage_Impl::Revert() void OStorage_Impl::Revert()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1358,7 +1333,6 @@ void OStorage_Impl::Revert()
} }
} }
//-----------------------------------------------
::comphelper::SequenceAsHashMap OStorage_Impl::GetCommonRootEncryptionData() ::comphelper::SequenceAsHashMap OStorage_Impl::GetCommonRootEncryptionData()
throw ( packages::NoEncryptionException ) throw ( packages::NoEncryptionException )
{ {
@ -1383,7 +1357,6 @@ void OStorage_Impl::Revert()
} }
} }
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName ) SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
{ {
SAL_WARN_IF( rName.isEmpty(), "package.xstor", "Name is empty!" ); SAL_WARN_IF( rName.isEmpty(), "package.xstor", "Name is empty!" );
@ -1402,7 +1375,6 @@ SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
return NULL; return NULL;
} }
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr ) SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr )
{ {
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" ); SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
@ -1437,7 +1409,6 @@ SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr )
return pNewElement; return pNewElement;
} }
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Reference< io::XInputStream >& xInStream ) SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Reference< io::XInputStream >& xInStream )
{ {
// insert of raw stream means insert and commit // insert of raw stream means insert and commit
@ -1480,7 +1451,6 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Refe
return pNewElement; return pNewElement;
} }
//-----------------------------------------------
OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode ) OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
{ {
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" ); SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
@ -1507,7 +1477,6 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
return pResult; return pResult;
} }
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::InsertStorage( OUString aName, sal_Int32 nStorageMode ) SotElement_Impl* OStorage_Impl::InsertStorage( OUString aName, sal_Int32 nStorageMode )
{ {
SotElement_Impl* pNewElement = InsertElement( aName, sal_True ); SotElement_Impl* pNewElement = InsertElement( aName, sal_True );
@ -1519,7 +1488,6 @@ SotElement_Impl* OStorage_Impl::InsertStorage( OUString aName, sal_Int32 nStorag
return pNewElement; return pNewElement;
} }
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::InsertElement( OUString aName, sal_Bool bIsStorage ) SotElement_Impl* OStorage_Impl::InsertElement( OUString aName, sal_Bool bIsStorage )
{ {
OSL_ENSURE( FindElement( aName ) == NULL, "Should not try to insert existing element" ); OSL_ENSURE( FindElement( aName ) == NULL, "Should not try to insert existing element" );
@ -1558,7 +1526,6 @@ SotElement_Impl* OStorage_Impl::InsertElement( OUString aName, sal_Bool bIsStora
return new SotElement_Impl( aName, bIsStorage, sal_True ); return new SotElement_Impl( aName, bIsStorage, sal_True );
} }
//-----------------------------------------------
void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode ) void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode )
{ {
SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" ); SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" );
@ -1586,7 +1553,6 @@ void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorag
} }
} }
//-----------------------------------------------
void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement ) void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
{ {
SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" ); SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" );
@ -1612,7 +1578,6 @@ void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
} }
} }
//-----------------------------------------------
uno::Sequence< OUString > OStorage_Impl::GetElementNames() uno::Sequence< OUString > OStorage_Impl::GetElementNames()
{ {
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@ -1634,7 +1599,6 @@ uno::Sequence< OUString > OStorage_Impl::GetElementNames()
return aElementNames; return aElementNames;
} }
//-----------------------------------------------
void OStorage_Impl::RemoveElement( SotElement_Impl* pElement ) void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
{ {
SAL_WARN_IF( !pElement, "package.xstor", "Element must be provided!" ); SAL_WARN_IF( !pElement, "package.xstor", "Element must be provided!" );
@ -1660,7 +1624,6 @@ void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
// TODO/OFOPXML: the rel stream should be removed as well // TODO/OFOPXML: the rel stream should be removed as well
} }
//-----------------------------------------------
void OStorage_Impl::ClearElement( SotElement_Impl* pElement ) void OStorage_Impl::ClearElement( SotElement_Impl* pElement )
{ {
if ( pElement->m_pStorage ) if ( pElement->m_pStorage )
@ -1676,7 +1639,6 @@ void OStorage_Impl::ClearElement( SotElement_Impl* pElement )
} }
} }
//-----------------------------------------------
void OStorage_Impl::CloneStreamElement( const OUString& aStreamName, void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
sal_Bool bEncryptionDataProvided, sal_Bool bEncryptionDataProvided,
const ::comphelper::SequenceAsHashMap& aEncryptionData, const ::comphelper::SequenceAsHashMap& aEncryptionData,
@ -1720,7 +1682,6 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error
} }
//-----------------------------------------------
void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName ) void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName )
{ {
// this method should be used only in OStorage_Impl::Commit() method // this method should be used only in OStorage_Impl::Commit() method
@ -1736,7 +1697,6 @@ void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName )
} }
} }
//-----------------------------------------------
void OStorage_Impl::CreateRelStorage() void OStorage_Impl::CreateRelStorage()
{ {
if ( m_nStorageType != embed::StorageFormats::OFOPXML ) if ( m_nStorageType != embed::StorageFormats::OFOPXML )
@ -1763,7 +1723,6 @@ void OStorage_Impl::CreateRelStorage()
} }
} }
//-----------------------------------------------
void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement ) void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement )
{ {
// this method should be used only in OStorage_Impl::Commit() method // this method should be used only in OStorage_Impl::Commit() method
@ -1786,7 +1745,6 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement )
} }
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName( const OUString& aName ) uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName( const OUString& aName )
{ {
if ( m_nStorageType == embed::StorageFormats::OFOPXML ) if ( m_nStorageType == embed::StorageFormats::OFOPXML )
@ -1808,7 +1766,6 @@ uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName( const
return uno::Reference< io::XInputStream >(); return uno::Reference< io::XInputStream >();
} }
//-----------------------------------------------
void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContainer >& xNewPackageFolder ) void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContainer >& xNewPackageFolder )
{ {
// this method should be used only in OStorage_Impl::Commit() method // this method should be used only in OStorage_Impl::Commit() method
@ -1912,11 +1869,8 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
} }
} }
//=====================================================
// OStorage implementation // OStorage implementation
//=====================================================
//-----------------------------------------------
OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream, OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream,
sal_Int32 nMode, sal_Int32 nMode,
uno::Sequence< beans::PropertyValue > xProperties, uno::Sequence< beans::PropertyValue > xProperties,
@ -1928,7 +1882,6 @@ OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream,
m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False ); m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False );
} }
//-----------------------------------------------
OStorage::OStorage( uno::Reference< io::XStream > xStream, OStorage::OStorage( uno::Reference< io::XStream > xStream,
sal_Int32 nMode, sal_Int32 nMode,
uno::Sequence< beans::PropertyValue > xProperties, uno::Sequence< beans::PropertyValue > xProperties,
@ -1940,7 +1893,6 @@ OStorage::OStorage( uno::Reference< io::XStream > xStream,
m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False ); m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False );
} }
//-----------------------------------------------
OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap ) OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap )
: m_pImpl( pImpl ) : m_pImpl( pImpl )
{ {
@ -1957,7 +1909,6 @@ OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap )
m_pImpl->m_pAntiImpl = this; m_pImpl->m_pAntiImpl = this;
} }
//-----------------------------------------------
OStorage::~OStorage() OStorage::~OStorage()
{ {
{ {
@ -1994,7 +1945,6 @@ OStorage::~OStorage()
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl ) void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl )
{ {
SAL_INFO( "package.xstor", "package (mv76033) OStorage::InternalDispose" ); SAL_INFO( "package.xstor", "package (mv76033) OStorage::InternalDispose" );
@ -2068,7 +2018,6 @@ void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl )
m_pImpl = NULL; m_pImpl = NULL;
} }
//-----------------------------------------------
void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild ) void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild )
{ {
// this method can only be called by child disposing listener // this method can only be called by child disposing listener
@ -2094,7 +2043,6 @@ void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild
} }
} }
//-----------------------------------------------
void OStorage::BroadcastModifiedIfNecessary() void OStorage::BroadcastModifiedIfNecessary()
{ {
// no need to lock mutex here for the checking of m_pImpl, and m_pData is alive until the object is destructed // no need to lock mutex here for the checking of m_pImpl, and m_pData is alive until the object is destructed
@ -2126,7 +2074,6 @@ void OStorage::BroadcastModifiedIfNecessary()
} }
} }
//-----------------------------------------------
void OStorage::BroadcastTransaction( sal_Int8 nMessage ) void OStorage::BroadcastTransaction( sal_Int8 nMessage )
/* /*
1 - preCommit 1 - preCommit
@ -2175,7 +2122,6 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage )
} }
} }
//-----------------------------------------------
SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, sal_Bool bEncr ) SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, sal_Bool bEncr )
{ {
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); ::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@ -2211,7 +2157,6 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
return pElement; return pElement;
} }
//-----------------------------------------------
void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XComponent >& xComponent ) void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XComponent >& xComponent )
{ {
if ( !xComponent.is() ) if ( !xComponent.is() )
@ -2229,11 +2174,8 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone
m_pData->m_aOpenSubComponentsList.push_back( xComponent ); m_pData->m_aOpenSubComponentsList.push_back( xComponent );
} }
//____________________________________________________________________________________________________
// XInterface // XInterface
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType ) uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -2296,23 +2238,17 @@ uno::Any SAL_CALL OStorage::queryInterface( const uno::Type& rType )
return OWeakObject::queryInterface( rType ); return OWeakObject::queryInterface( rType );
} }
//-----------------------------------------------
void SAL_CALL OStorage::acquire() throw() void SAL_CALL OStorage::acquire() throw()
{ {
OWeakObject::acquire(); OWeakObject::acquire();
} }
//-----------------------------------------------
void SAL_CALL OStorage::release() throw() void SAL_CALL OStorage::release() throw()
{ {
OWeakObject::release(); OWeakObject::release();
} }
//____________________________________________________________________________________________________
// XTypeProvider // XTypeProvider
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes() uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -2381,7 +2317,6 @@ uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes()
namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
//-----------------------------------------------
uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
@ -2389,12 +2324,7 @@ uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
return rID.getImplementationId(); return rID.getImplementationId();
} }
//____________________________________________________________________________________________________
// XStorage // XStorage
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >& xDest ) void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >& xDest )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
io::IOException, io::IOException,
@ -2460,7 +2390,6 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
} }
} }
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
const OUString& aStreamName, sal_Int32 nOpenMode ) const OUString& aStreamName, sal_Int32 nOpenMode )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -2562,7 +2491,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
return xResult; return xResult;
} }
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement( uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement(
const OUString& aStreamName, sal_Int32 nOpenMode, const OUString& aPass ) const OUString& aStreamName, sal_Int32 nOpenMode, const OUString& aPass )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -2578,7 +2506,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement(
return openEncryptedStream( aStreamName, nOpenMode, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) ); return openEncryptedStream( aStreamName, nOpenMode, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
} }
//-----------------------------------------------
uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
const OUString& aStorName, sal_Int32 nStorageMode ) const OUString& aStorName, sal_Int32 nStorageMode )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -2732,7 +2659,6 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
return xResult; return xResult;
} }
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUString& aStreamName ) uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUString& aStreamName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -2813,7 +2739,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
} }
} }
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStreamElement( uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStreamElement(
const OUString& aStreamName, const OUString& aStreamName,
const OUString& aPass ) const OUString& aPass )
@ -2830,7 +2755,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStreamElement(
return cloneEncryptedStream( aStreamName, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) ); return cloneEncryptedStream( aStreamName, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
} }
//-----------------------------------------------
void SAL_CALL OStorage::copyLastCommitTo( void SAL_CALL OStorage::copyLastCommitTo(
const uno::Reference< embed::XStorage >& xTargetStorage ) const uno::Reference< embed::XStorage >& xTargetStorage )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -2896,7 +2820,6 @@ void SAL_CALL OStorage::copyLastCommitTo(
} }
//-----------------------------------------------
void SAL_CALL OStorage::copyStorageElementLastCommitTo( void SAL_CALL OStorage::copyStorageElementLastCommitTo(
const OUString& aStorName, const OUString& aStorName,
const uno::Reference< embed::XStorage >& xTargetStorage ) const uno::Reference< embed::XStorage >& xTargetStorage )
@ -2994,7 +2917,6 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
} }
} }
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName ) sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -3062,7 +2984,6 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
return !pElement->m_bIsStorage; return !pElement->m_bIsStorage;
} }
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName ) sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -3130,7 +3051,6 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
return pElement->m_bIsStorage; return pElement->m_bIsStorage;
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeElement( const OUString& aElementName ) void SAL_CALL OStorage::removeElement( const OUString& aElementName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -3222,7 +3142,6 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
BroadcastModifiedIfNecessary(); BroadcastModifiedIfNecessary();
} }
//-----------------------------------------------
void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUString& aNewName ) void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUString& aNewName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -3325,7 +3244,6 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
BroadcastModifiedIfNecessary(); BroadcastModifiedIfNecessary();
} }
//-----------------------------------------------
void SAL_CALL OStorage::copyElementTo( const OUString& aElementName, void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
const uno::Reference< embed::XStorage >& xDest, const uno::Reference< embed::XStorage >& xDest,
const OUString& aNewName ) const OUString& aNewName )
@ -3427,8 +3345,6 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::moveElementTo( const OUString& aElementName, void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
const uno::Reference< embed::XStorage >& xDest, const uno::Reference< embed::XStorage >& xDest,
const OUString& aNewName ) const OUString& aNewName )
@ -3541,11 +3457,7 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
BroadcastModifiedIfNecessary(); BroadcastModifiedIfNecessary();
} }
//____________________________________________________________________________________________________
// XStorage2 // XStorage2
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream( uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
const OUString& aStreamName, sal_Int32 nOpenMode, const uno::Sequence< beans::NamedValue >& aEncryptionData ) const OUString& aStreamName, sal_Int32 nOpenMode, const uno::Sequence< beans::NamedValue >& aEncryptionData )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -3654,7 +3566,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
return xResult; return xResult;
} }
//-----------------------------------------------
uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream( uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
const OUString& aStreamName, const OUString& aStreamName,
const uno::Sequence< beans::NamedValue >& aEncryptionData ) const uno::Sequence< beans::NamedValue >& aEncryptionData )
@ -3744,12 +3655,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
} }
} }
//____________________________________________________________________________________________________
// XStorageRawAccess // XStorageRawAccess
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement( uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
const OUString& sStreamName ) const OUString& sStreamName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -3856,7 +3762,6 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
return xTempIn; return xTempIn;
} }
//-----------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
const OUString& sStreamName ) const OUString& sStreamName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -3974,7 +3879,6 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
return xTempIn; return xTempIn;
} }
//-----------------------------------------------
void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName, void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
const uno::Reference< io::XInputStream >& xInStream ) const uno::Reference< io::XInputStream >& xInStream )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -4069,11 +3973,7 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
} }
} }
//____________________________________________________________________________________________________
// XTransactedObject // XTransactedObject
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::commit() void SAL_CALL OStorage::commit()
throw ( io::IOException, throw ( io::IOException,
embed::StorageWrappedTargetException, embed::StorageWrappedTargetException,
@ -4139,7 +4039,6 @@ void SAL_CALL OStorage::commit()
BroadcastTransaction( STOR_MESS_COMMITED ); BroadcastTransaction( STOR_MESS_COMMITED );
} }
//-----------------------------------------------
void SAL_CALL OStorage::revert() void SAL_CALL OStorage::revert()
throw ( io::IOException, throw ( io::IOException,
embed::StorageWrappedTargetException, embed::StorageWrappedTargetException,
@ -4212,11 +4111,7 @@ void SAL_CALL OStorage::revert()
BroadcastTransaction( STOR_MESS_REVERTED ); BroadcastTransaction( STOR_MESS_REVERTED );
} }
//____________________________________________________________________________________________________
// XTransactionBroadcaster // XTransactionBroadcaster
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener ) void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4232,7 +4127,6 @@ void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTr
aListener ); aListener );
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener ) void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed::XTransactionListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4248,14 +4142,11 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed::
aListener ); aListener );
} }
//____________________________________________________________________________________________________
// XModifiable // XModifiable
// TODO: if there will be no demand on this interface it will be removed from implementation, // 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 // I do not want to remove it now since it is still possible that it will be inserted
// to the service back. // to the service back.
//____________________________________________________________________________________________________
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::isModified() sal_Bool SAL_CALL OStorage::isModified()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4270,8 +4161,6 @@ sal_Bool SAL_CALL OStorage::isModified()
return m_pImpl->m_bIsModified; return m_pImpl->m_bIsModified;
} }
//-----------------------------------------------
void SAL_CALL OStorage::setModified( sal_Bool bModified ) void SAL_CALL OStorage::setModified( sal_Bool bModified )
throw ( beans::PropertyVetoException, throw ( beans::PropertyVetoException,
uno::RuntimeException ) uno::RuntimeException )
@ -4298,7 +4187,6 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified )
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::addModifyListener( void SAL_CALL OStorage::addModifyListener(
const uno::Reference< util::XModifyListener >& aListener ) const uno::Reference< util::XModifyListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -4315,8 +4203,6 @@ void SAL_CALL OStorage::addModifyListener(
::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener ); ::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener );
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeModifyListener( void SAL_CALL OStorage::removeModifyListener(
const uno::Reference< util::XModifyListener >& aListener ) const uno::Reference< util::XModifyListener >& aListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -4333,11 +4219,8 @@ void SAL_CALL OStorage::removeModifyListener(
::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener ); ::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener );
} }
//____________________________________________________________________________________________________
// XNameAccess // XNameAccess
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Any SAL_CALL OStorage::getByName( const OUString& aName ) uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
lang::WrappedTargetException, lang::WrappedTargetException,
@ -4404,8 +4287,6 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
return aResult; return aResult;
} }
//-----------------------------------------------
uno::Sequence< OUString > SAL_CALL OStorage::getElementNames() uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4442,8 +4323,6 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
} }
} }
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName ) sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4489,8 +4368,6 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
return ( pElement != NULL ); return ( pElement != NULL );
} }
//-----------------------------------------------
uno::Type SAL_CALL OStorage::getElementType() uno::Type SAL_CALL OStorage::getElementType()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4506,8 +4383,6 @@ uno::Type SAL_CALL OStorage::getElementType()
return uno::Type(); return uno::Type();
} }
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::hasElements() sal_Bool SAL_CALL OStorage::hasElements()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4544,12 +4419,7 @@ sal_Bool SAL_CALL OStorage::hasElements()
} }
} }
//____________________________________________________________________________________________________
// XComponent // XComponent
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::dispose() void SAL_CALL OStorage::dispose()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4584,7 +4454,6 @@ void SAL_CALL OStorage::dispose()
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::addEventListener( void SAL_CALL OStorage::addEventListener(
const uno::Reference< lang::XEventListener >& xListener ) const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -4601,7 +4470,6 @@ void SAL_CALL OStorage::addEventListener(
::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener ); ::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener );
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeEventListener( void SAL_CALL OStorage::removeEventListener(
const uno::Reference< lang::XEventListener >& xListener ) const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
@ -4618,9 +4486,7 @@ void SAL_CALL OStorage::removeEventListener(
::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener ); ::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener );
} }
//____________________________________________________________________________________________________
// XEncryptionProtectedSource // XEncryptionProtectedSource
//____________________________________________________________________________________________________
void SAL_CALL OStorage::setEncryptionPassword( const OUString& aPass ) void SAL_CALL OStorage::setEncryptionPassword( const OUString& aPass )
throw ( uno::RuntimeException, throw ( uno::RuntimeException,
@ -4630,7 +4496,6 @@ void SAL_CALL OStorage::setEncryptionPassword( const OUString& aPass )
setEncryptionData( ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) ); setEncryptionData( ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeEncryption() void SAL_CALL OStorage::removeEncryption()
throw ( uno::RuntimeException, throw ( uno::RuntimeException,
io::IOException ) io::IOException )
@ -4703,9 +4568,7 @@ void SAL_CALL OStorage::removeEncryption()
} }
} }
//____________________________________________________________________________________________________
// XEncryptionProtectedSource2 // XEncryptionProtectedSource2
//____________________________________________________________________________________________________
void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValue >& aEncryptionData ) void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValue >& aEncryptionData )
throw ( io::IOException, throw ( io::IOException,
@ -4778,12 +4641,8 @@ sal_Bool SAL_CALL OStorage::hasEncryptionData()
return m_pImpl && m_pImpl->m_bHasCommonEncryptionData; return m_pImpl && m_pImpl->m_bHasCommonEncryptionData;
} }
//____________________________________________________________________________________________________
// XEncryptionProtectedStorage // XEncryptionProtectedStorage
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::NamedValue >& aAlgorithms ) void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::NamedValue >& aAlgorithms )
throw (lang::IllegalArgumentException, uno::RuntimeException) throw (lang::IllegalArgumentException, uno::RuntimeException)
{ {
@ -4849,7 +4708,6 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
} }
} }
//-----------------------------------------------
uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms() uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@ -4914,12 +4772,8 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
return aResult; return aResult;
} }
//____________________________________________________________________________________________________
// XPropertySet // XPropertySet
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo() uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -4935,8 +4789,6 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo(
return uno::Reference< beans::XPropertySetInfo >(); return uno::Reference< beans::XPropertySetInfo >();
} }
//-----------------------------------------------
void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
beans::PropertyVetoException, beans::PropertyVetoException,
@ -5046,8 +4898,6 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
BroadcastModifiedIfNecessary(); BroadcastModifiedIfNecessary();
} }
//-----------------------------------------------
uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName ) uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
throw ( beans::UnknownPropertyException, throw ( beans::UnknownPropertyException,
lang::WrappedTargetException, lang::WrappedTargetException,
@ -5155,8 +5005,6 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
void SAL_CALL OStorage::addPropertyChangeListener( void SAL_CALL OStorage::addPropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
@ -5175,8 +5023,6 @@ void SAL_CALL OStorage::addPropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OStorage::removePropertyChangeListener( void SAL_CALL OStorage::removePropertyChangeListener(
const OUString& /*aPropertyName*/, const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
@ -5195,8 +5041,6 @@ void SAL_CALL OStorage::removePropertyChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OStorage::addVetoableChangeListener( void SAL_CALL OStorage::addVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -5215,8 +5059,6 @@ void SAL_CALL OStorage::addVetoableChangeListener(
//TODO: //TODO:
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeVetoableChangeListener( void SAL_CALL OStorage::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
@ -5235,13 +5077,10 @@ void SAL_CALL OStorage::removeVetoableChangeListener(
//TODO: //TODO:
} }
//____________________________________________________________________________________________________
// XRelationshipAccess // XRelationshipAccess
//____________________________________________________________________________________________________
// TODO/LATER: the storage and stream implementations of this interface are very similar, they could use a helper class // TODO/LATER: the storage and stream implementations of this interface are very similar, they could use a helper class
//-----------------------------------------------
sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID ) sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -5271,7 +5110,6 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
return sal_False; return sal_False;
} }
//-----------------------------------------------
OUString SAL_CALL OStorage::getTargetByID( const OUString& sID ) OUString SAL_CALL OStorage::getTargetByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -5296,7 +5134,6 @@ OUString SAL_CALL OStorage::getTargetByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
OUString SAL_CALL OStorage::getTypeByID( const OUString& sID ) OUString SAL_CALL OStorage::getTypeByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -5321,7 +5158,6 @@ OUString SAL_CALL OStorage::getTypeByID( const OUString& sID )
return OUString(); return OUString();
} }
//-----------------------------------------------
uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( const OUString& sID ) uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -5352,7 +5188,6 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons
throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelationshipsByType( const OUString& sType ) uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelationshipsByType( const OUString& sType )
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -5389,7 +5224,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelati
return aResult; return aResult;
} }
//-----------------------------------------------
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRelationships() uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRelationships()
throw (io::IOException, uno::RuntimeException) throw (io::IOException, uno::RuntimeException)
{ {
@ -5407,7 +5241,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRel
return m_pImpl->GetAllRelationshipsIfAny(); return m_pImpl->GetAllRelationshipsIfAny();
} }
//-----------------------------------------------
void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno::Sequence< beans::StringPair >& aEntry, ::sal_Bool bReplace ) void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno::Sequence< beans::StringPair >& aEntry, ::sal_Bool bReplace )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -5466,13 +5299,11 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
else else
throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
m_pImpl->m_aRelInfo = aSeq; m_pImpl->m_aRelInfo = aSeq;
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >(); m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID ) void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -5514,7 +5345,6 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, ::sal_Bool bReplace ) void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, ::sal_Bool bReplace )
throw ( container::ElementExistException, throw ( container::ElementExistException,
io::IOException, io::IOException,
@ -5597,7 +5427,6 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//-----------------------------------------------
void SAL_CALL OStorage::clearRelationships() void SAL_CALL OStorage::clearRelationships()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -5618,10 +5447,7 @@ void SAL_CALL OStorage::clearRelationships()
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED; m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
} }
//____________________________________________________________________________________________________
// XOptimizedStorage // XOptimizedStorage
//____________________________________________________________________________________________________
//-----------------------------------------------
void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect( void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect(
const OUString& /*sStreamName*/, const OUString& /*sStreamName*/,
const uno::Reference< io::XInputStream >& /*xInStream*/ ) const uno::Reference< io::XInputStream >& /*xInStream*/ )
@ -5638,7 +5464,6 @@ void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect(
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//-----------------------------------------------
void SAL_CALL OStorage::insertStreamElementDirect( void SAL_CALL OStorage::insertStreamElementDirect(
const OUString& aStreamName, const OUString& aStreamName,
const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< io::XInputStream >& xInStream,
@ -5729,7 +5554,6 @@ void SAL_CALL OStorage::insertStreamElementDirect(
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::copyElementDirectlyTo( void SAL_CALL OStorage::copyElementDirectlyTo(
const OUString& aElementName, const OUString& aElementName,
const uno::Reference< embed::XOptimizedStorage >& xDest, const uno::Reference< embed::XOptimizedStorage >& xDest,
@ -5833,7 +5657,6 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStream >& xStream ) void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStream >& xStream )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -5904,7 +5727,6 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea
} }
//-----------------------------------------------
void SAL_CALL OStorage::attachToURL( const OUString& sURL, void SAL_CALL OStorage::attachToURL( const OUString& sURL,
sal_Bool bReadOnly ) sal_Bool bReadOnly )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
@ -5987,7 +5809,6 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL,
} }
} }
//-----------------------------------------------
uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementName, const OUString& aPropertyName ) uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementName, const OUString& aPropertyName )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6093,7 +5914,6 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
} }
} }
//-----------------------------------------------
void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, const uno::Reference< io::XStream >& xTargetStream ) void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, const uno::Reference< io::XStream >& xTargetStream )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6175,14 +5995,9 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
aCaught ); aCaught );
} }
} }
//____________________________________________________________________________________________________
// XHierarchicalStorageAccess // XHierarchicalStorageAccess
//____________________________________________________________________________________________________
//-----------------------------------------------
uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamElementByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode ) uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamElementByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6241,7 +6056,6 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
return xResult; return xResult;
} }
//-----------------------------------------------
uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamElementByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode, const OUString& sPassword ) uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamElementByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode, const OUString& sPassword )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6254,7 +6068,6 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
return openEncryptedStreamByHierarchicalName( aStreamPath, nOpenMode, ::comphelper::OStorageHelper::CreatePackageEncryptionData( sPassword ) ); return openEncryptedStreamByHierarchicalName( aStreamPath, nOpenMode, ::comphelper::OStorageHelper::CreatePackageEncryptionData( sPassword ) );
} }
//-----------------------------------------------
void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& aStreamPath ) void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& aStreamPath )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6287,10 +6100,7 @@ void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& a
m_pData->m_rHierarchyHolder->RemoveStreamHierarchically( aListPath ); m_pData->m_rHierarchyHolder->RemoveStreamHierarchically( aListPath );
} }
//____________________________________________________________________________________________________
// XHierarchicalStorageAccess2 // XHierarchicalStorageAccess2
//____________________________________________________________________________________________________
uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode, const uno::Sequence< beans::NamedValue >& aEncryptionData ) uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncryptedStreamByHierarchicalName( const OUString& aStreamPath, ::sal_Int32 nOpenMode, const uno::Sequence< beans::NamedValue >& aEncryptionData )
throw ( embed::InvalidStorageException, throw ( embed::InvalidStorageException,
lang::IllegalArgumentException, lang::IllegalArgumentException,
@ -6357,5 +6167,4 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
return xResult; return xResult;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -63,7 +63,6 @@
#define STOR_MESS_PREREVERT 3 #define STOR_MESS_PREREVERT 3
#define STOR_MESS_REVERTED 4 #define STOR_MESS_REVERTED 4
//================================================
// a common implementation for an entry // a common implementation for an entry
struct StorInternalData_Impl; struct StorInternalData_Impl;
@ -89,7 +88,6 @@ public:
#include <list> #include <list>
typedef ::std::list< SotElement_Impl* > SotElementList_Impl; typedef ::std::list< SotElement_Impl* > SotElementList_Impl;
//=========================================================================
// Main storage implementation // Main storage implementation
class OStorage; class OStorage;
@ -131,7 +129,6 @@ struct OStorage_Impl
sal_Bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts sal_Bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts
sal_Bool m_bListCreated; sal_Bool m_bListCreated;
SotElementList_Impl m_aChildrenList; SotElementList_Impl m_aChildrenList;
SotElementList_Impl m_aDeletedList; SotElementList_Impl m_aDeletedList;
@ -169,9 +166,7 @@ struct OStorage_Impl
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream;
sal_Int16 m_nRelInfoStatus; sal_Int16 m_nRelInfoStatus;
//////////////////////////////////////////
// Constructors // 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, sal_Int32 nMode,
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties,
@ -232,7 +227,6 @@ struct OStorage_Impl
SotElement_Impl* FindElement( const OUString& rName ); SotElement_Impl* FindElement( const OUString& rName );
SotElement_Impl* InsertStream( OUString aName, sal_Bool bEncr ); SotElement_Impl* InsertStream( OUString aName, sal_Bool bEncr );
SotElement_Impl* InsertRawStream( OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream ); SotElement_Impl* InsertRawStream( OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream );
@ -275,7 +269,6 @@ struct OStorage_Impl
}; };
class OStorage : public ::com::sun::star::lang::XTypeProvider class OStorage : public ::com::sun::star::lang::XTypeProvider
, public ::com::sun::star::embed::XStorage2 , public ::com::sun::star::embed::XStorage2
, public ::com::sun::star::embed::XStorageRawAccess , public ::com::sun::star::embed::XStorageRawAccess
@ -329,9 +322,7 @@ public:
sal_Int32 GetRefCount_Impl() { return m_refCount; } 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 ); throw( ::com::sun::star::uno::RuntimeException );
@ -340,9 +331,7 @@ public:
virtual void SAL_CALL release() throw(); virtual void SAL_CALL release() throw();
//____________________________________________________________________________________________________
// XTypeProvider // XTypeProvider
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
throw( ::com::sun::star::uno::RuntimeException ); throw( ::com::sun::star::uno::RuntimeException );
@ -350,9 +339,7 @@ public:
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
throw( ::com::sun::star::uno::RuntimeException ); 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 ) virtual void SAL_CALL copyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest )
throw ( ::com::sun::star::embed::InvalidStorageException, throw ( ::com::sun::star::embed::InvalidStorageException,
@ -475,9 +462,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XStorage2 // XStorage2
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStream( const OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ) virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStream( const OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
throw ( ::com::sun::star::embed::InvalidStorageException, throw ( ::com::sun::star::embed::InvalidStorageException,
@ -497,9 +482,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XStorageRawAccess // XStorageRawAccess
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getPlainRawStreamElement( virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getPlainRawStreamElement(
const OUString& sStreamName ) const OUString& sStreamName )
@ -530,10 +513,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XTransactedObject // XTransactedObject
//____________________________________________________________________________________________________
virtual void SAL_CALL commit() virtual void SAL_CALL commit()
throw ( ::com::sun::star::io::IOException, throw ( ::com::sun::star::io::IOException,
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
@ -544,10 +524,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XTransactionBroadcaster // XTransactionBroadcaster
//____________________________________________________________________________________________________
virtual void SAL_CALL addTransactionListener( virtual void SAL_CALL addTransactionListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener ) const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
@ -556,9 +533,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener ) const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XModifiable // XModifiable
//____________________________________________________________________________________________________
virtual sal_Bool SAL_CALL isModified() virtual sal_Bool SAL_CALL isModified()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
@ -575,9 +550,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XNameAccess // XNameAccess
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException,
@ -596,9 +569,7 @@ public:
virtual sal_Bool SAL_CALL hasElements() virtual sal_Bool SAL_CALL hasElements()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XComponent // XComponent
//____________________________________________________________________________________________________
virtual void SAL_CALL dispose() virtual void SAL_CALL dispose()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
@ -611,9 +582,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XEncryptionProtectedSource // XEncryptionProtectedSource
//____________________________________________________________________________________________________
virtual void SAL_CALL setEncryptionPassword( const OUString& aPass ) virtual void SAL_CALL setEncryptionPassword( const OUString& aPass )
throw ( ::com::sun::star::uno::RuntimeException, throw ( ::com::sun::star::uno::RuntimeException,
@ -623,9 +592,7 @@ public:
throw ( ::com::sun::star::uno::RuntimeException, throw ( ::com::sun::star::uno::RuntimeException,
::com::sun::star::io::IOException ); ::com::sun::star::io::IOException );
//____________________________________________________________________________________________________
// XEncryptionProtectedSource2 // XEncryptionProtectedSource2
//____________________________________________________________________________________________________
virtual void SAL_CALL setEncryptionData( virtual void SAL_CALL setEncryptionData(
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ) const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
@ -635,17 +602,13 @@ public:
virtual sal_Bool SAL_CALL hasEncryptionData() virtual sal_Bool SAL_CALL hasEncryptionData()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XEncryptionProtectedStorage // XEncryptionProtectedStorage
//____________________________________________________________________________________________________
virtual void SAL_CALL setEncryptionAlgorithms( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aAlgorithms ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setEncryptionAlgorithms( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aAlgorithms ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getEncryptionAlgorithms() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getEncryptionAlgorithms() throw (::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XPropertySet // XPropertySet
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
throw ( ::com::sun::star::uno::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
@ -688,9 +651,7 @@ public:
::com::sun::star::lang::WrappedTargetException, ::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XOptimizedStorage // XOptimizedStorage
//____________________________________________________________________________________________________
virtual void SAL_CALL insertRawNonEncrStreamElementDirect( const OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream ) virtual void SAL_CALL insertRawNonEncrStreamElementDirect( const OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream )
throw ( ::com::sun::star::embed::InvalidStorageException, throw ( ::com::sun::star::embed::InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalArgumentException,
@ -749,10 +710,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
// XRelationshipAccess // XRelationshipAccess
//____________________________________________________________________________________________________
virtual ::sal_Bool SAL_CALL hasByID( const OUString& sID ) virtual ::sal_Bool SAL_CALL hasByID( const OUString& sID )
throw ( ::com::sun::star::io::IOException, throw ( ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
@ -799,10 +757,7 @@ public:
throw ( ::com::sun::star::io::IOException, throw ( ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XHierarchicalStorageAccess // XHierarchicalStorageAccess
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const OUString& sStreamPath, ::sal_Int32 nOpenMode ) virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const OUString& sStreamPath, ::sal_Int32 nOpenMode )
throw ( ::com::sun::star::embed::InvalidStorageException, throw ( ::com::sun::star::embed::InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalArgumentException,
@ -828,10 +783,7 @@ public:
::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::embed::StorageWrappedTargetException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
//____________________________________________________________________________________________________
// XHierarchicalStorageAccess2 // XHierarchicalStorageAccess2
//____________________________________________________________________________________________________
virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamByHierarchicalName( const OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ) virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamByHierarchicalName( const OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
throw ( ::com::sun::star::embed::InvalidStorageException, throw ( ::com::sun::star::embed::InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalArgumentException,
@ -842,7 +794,6 @@ public:
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
}; };
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/packages/zip/ZipConstants.hpp> #include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp> #include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/xml/crypto/CipherID.hpp> #include <com/sun/star/xml/crypto/CipherID.hpp>

View File

@ -77,7 +77,6 @@ public:
const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& xRawStream, const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& xRawStream,
const ::rtl::Reference< EncryptionData >& rData ); const ::rtl::Reference< EncryptionData >& rData );
virtual ~XUnbufferedStream(); virtual ~XUnbufferedStream();
// XInputStream // XInputStream

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/packages/zip/ZipConstants.hpp> #include <com/sun/star/packages/zip/ZipConstants.hpp>
@ -79,8 +78,6 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
} }
} }
ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise, sal_Bool bForceRecovery, uno::Reference < XProgressHandler > xProgress ) ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise, sal_Bool bForceRecovery, uno::Reference < XProgressHandler > xProgress )
throw(IOException, ZipException, RuntimeException) throw(IOException, ZipException, RuntimeException)
: aGrabber(xInput) : aGrabber(xInput)
@ -392,7 +389,6 @@ uno::Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const uno::R
throw ZipIOException("The stream must be seekable!\n", throw ZipIOException("The stream must be seekable!\n",
uno::Reference< XInterface >() ); uno::Reference< XInterface >() );
// if we have a digest, then this file is an encrypted one and we should // if we have a digest, then this file is an encrypted one and we should
// check if we can decrypt it or not // check if we can decrypt it or not
OSL_ENSURE( rData->m_aDigest.getLength(), "Can't detect password correctness without digest!\n" ); OSL_ENSURE( rData->m_aDigest.getLength(), "Can't detect password correctness without digest!\n" );
@ -523,7 +519,6 @@ uno::Reference< XInputStream > ZipFile::createUnbufferedStream(
return new XUnbufferedStream ( m_xContext, aMutexHolder, rEntry, xStream, rData, nStreamMode, bIsEncrypted, aMediaType, bRecoveryMode ); return new XUnbufferedStream ( m_xContext, aMutexHolder, rEntry, xStream, rData, nStreamMode, bIsEncrypted, aMediaType, bRecoveryMode );
} }
ZipEnumeration * SAL_CALL ZipFile::entries( ) ZipEnumeration * SAL_CALL ZipFile::entries( )
{ {
return new ZipEnumeration ( aEntries ); return new ZipEnumeration ( aEntries );

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/packages/zip/ZipConstants.hpp> #include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XOutputStream.hpp>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <rtl/cipher.h> #include <rtl/cipher.h>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
@ -109,5 +108,4 @@ uno::Sequence< ::sal_Int8 > SAL_CALL BlowfishCFB8CipherContext::finalizeCipherCo
return uno::Sequence< sal_Int8 >(); return uno::Sequence< sal_Int8 >();
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <rtl/digest.h> #include <rtl/digest.h>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
@ -84,5 +83,4 @@ uno::Sequence< ::sal_Int8 > SAL_CALL SHA1DigestContext::finalizeDigestAndDispose
return aResult; return aResult;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -96,8 +96,6 @@ using namespace com::sun::star::packages::zip;
using namespace com::sun::star::packages::manifest; using namespace com::sun::star::packages::manifest;
using namespace com::sun::star::packages::zip::ZipConstants; using namespace com::sun::star::packages::zip::ZipConstants;
//===========================================================================
class ActiveDataStreamer : public ::cppu::WeakImplHelper1< XActiveDataStreamer > class ActiveDataStreamer : public ::cppu::WeakImplHelper1< XActiveDataStreamer >
{ {
uno::Reference< XStream > mStream; uno::Reference< XStream > mStream;
@ -135,8 +133,6 @@ class DummyInputStream : public ::cppu::WeakImplHelper1< XInputStream >
{} {}
}; };
//===========================================================================
ZipPackage::ZipPackage ( const uno::Reference < XComponentContext > &xContext ) ZipPackage::ZipPackage ( const uno::Reference < XComponentContext > &xContext )
: m_aMutexHolder( new SotMutexHolder ) : m_aMutexHolder( new SotMutexHolder )
, m_nStartKeyGenerationID( xml::crypto::DigestID::SHA1 ) , m_nStartKeyGenerationID( xml::crypto::DigestID::SHA1 )
@ -184,7 +180,6 @@ sal_Bool ZipPackage::isLocalFile() const
return !aSystemPath.isEmpty(); return !aSystemPath.isEmpty();
} }
//--------------------------------------------------------
void ZipPackage::parseManifest() void ZipPackage::parseManifest()
{ {
if ( m_nFormat == embed::StorageFormats::PACKAGE ) if ( m_nFormat == embed::StorageFormats::PACKAGE )
@ -378,7 +373,6 @@ void ZipPackage::parseManifest()
} }
} }
if ( !bManifestParsed ) if ( !bManifestParsed )
{ {
// the manifest.xml could not be successfully parsed, this is an inconsistent package // the manifest.xml could not be successfully parsed, this is an inconsistent package
@ -434,7 +428,6 @@ void ZipPackage::parseManifest()
} }
} }
//--------------------------------------------------------
void ZipPackage::parseContentType() void ZipPackage::parseContentType()
{ {
if ( m_nFormat == embed::StorageFormats::OFOPXML ) if ( m_nFormat == embed::StorageFormats::OFOPXML )
@ -503,7 +496,6 @@ void ZipPackage::parseContentType()
} }
} }
//--------------------------------------------------------
void ZipPackage::getZipFileContents() void ZipPackage::getZipFileContents()
{ {
auto_ptr < ZipEnumeration > pEnum ( m_pZipFile->entries() ); auto_ptr < ZipEnumeration > pEnum ( m_pZipFile->entries() );
@ -575,7 +567,6 @@ void ZipPackage::getZipFileContents()
parseContentType(); parseContentType();
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException ) throw( Exception, RuntimeException )
{ {
@ -785,7 +776,6 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
} }
} }
//--------------------------------------------------------
Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName )
throw( NoSuchElementException, RuntimeException ) throw( NoSuchElementException, RuntimeException )
{ {
@ -867,7 +857,6 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName )
} }
} }
//--------------------------------------------------------
sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName ) sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -947,14 +936,13 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
} }
} }
//--------------------------------------------------------
uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance() uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance()
throw( Exception, RuntimeException ) throw( Exception, RuntimeException )
{ {
uno::Reference < XInterface > xRef = *( new ZipPackageStream ( *this, m_xContext, m_bAllowRemoveOnInsert ) ); uno::Reference < XInterface > xRef = *( new ZipPackageStream ( *this, m_xContext, m_bAllowRemoveOnInsert ) );
return xRef; return xRef;
} }
//--------------------------------------------------------
uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const uno::Sequence< Any >& aArguments ) uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException ) throw( Exception, RuntimeException )
{ {
@ -970,7 +958,6 @@ uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( c
return xRef; return xRef;
} }
//--------------------------------------------------------
void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut ) void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
{ {
const OUString sMime ("mimetype"); const OUString sMime ("mimetype");
@ -983,7 +970,6 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
uno::Sequence< sal_Int8 > aType( ( sal_Int8* )sMediaType.getStr(), uno::Sequence< sal_Int8 > aType( ( sal_Int8* )sMediaType.getStr(),
nBufferLength ); nBufferLength );
pEntry->sPath = sMime; pEntry->sPath = sMime;
pEntry->nMethod = STORED; pEntry->nMethod = STORED;
pEntry->nSize = pEntry->nCompressedSize = nBufferLength; pEntry->nSize = pEntry->nCompressedSize = nBufferLength;
@ -1008,7 +994,6 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
} }
} }
//--------------------------------------------------------
void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList ) void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList )
{ {
// Write the manifest // Write the manifest
@ -1043,7 +1028,6 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
aZipOut.closeEntry(); aZipOut.closeEntry();
} }
//--------------------------------------------------------
void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList ) void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno::Sequence < PropertyValue > >& aManList )
{ {
const OUString sFullPath ("FullPath"); const OUString sFullPath ("FullPath");
@ -1097,7 +1081,6 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
aZipOut.closeEntry(); aZipOut.closeEntry();
} }
//--------------------------------------------------------
void ZipPackage::ConnectTo( const uno::Reference< io::XInputStream >& xInStream ) void ZipPackage::ConnectTo( const uno::Reference< io::XInputStream >& xInStream )
{ {
m_xContentSeek.set( xInStream, uno::UNO_QUERY_THROW ); m_xContentSeek.set( xInStream, uno::UNO_QUERY_THROW );
@ -1111,7 +1094,6 @@ void ZipPackage::ConnectTo( const uno::Reference< io::XInputStream >& xInStream
m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, sal_False ); m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, sal_False );
} }
//--------------------------------------------------------
uno::Reference< io::XInputStream > ZipPackage::writeTempFile() uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
{ {
// In case the target local file does not exist or empty // In case the target local file does not exist or empty
@ -1300,7 +1282,6 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
return xResult; return xResult;
} }
//--------------------------------------------------------
uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput() uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput()
{ {
// open and truncate the original file // open and truncate the original file
@ -1354,7 +1335,6 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput()
return xSink; return xSink;
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::commitChanges() void SAL_CALL ZipPackage::commitChanges()
throw( WrappedTargetException, RuntimeException ) throw( WrappedTargetException, RuntimeException )
{ {
@ -1522,7 +1502,6 @@ void SAL_CALL ZipPackage::commitChanges()
m_bMediaTypeFallbackUsed = sal_False; m_bMediaTypeFallbackUsed = sal_False;
} }
//--------------------------------------------------------
void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Reference< io::XInputStream >& xTempStream ) void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Reference< io::XInputStream >& xTempStream )
{ {
m_xStream = uno::Reference< io::XStream >( xTempStream, uno::UNO_QUERY ); m_xStream = uno::Reference< io::XStream >( xTempStream, uno::UNO_QUERY );
@ -1551,7 +1530,6 @@ void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Referenc
makeAny ( aException ) ); makeAny ( aException ) );
} }
//--------------------------------------------------------
const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
{ {
uno::Sequence< sal_Int8 > aResult; uno::Sequence< sal_Int8 > aResult;
@ -1581,13 +1559,11 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
return aResult; return aResult;
} }
//--------------------------------------------------------
sal_Bool SAL_CALL ZipPackage::hasPendingChanges() sal_Bool SAL_CALL ZipPackage::hasPendingChanges()
throw( RuntimeException ) throw( RuntimeException )
{ {
return sal_False; return sal_False;
} }
//--------------------------------------------------------
Sequence< ElementChange > SAL_CALL ZipPackage::getPendingChanges() Sequence< ElementChange > SAL_CALL ZipPackage::getPendingChanges()
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -1604,45 +1580,41 @@ uno::Reference < XInterface >SAL_CALL ZipPackage_createInstance(
return uno::Reference< XInterface >( *new ZipPackage( comphelper::getComponentContext(xMgr) ) ); return uno::Reference< XInterface >( *new ZipPackage( comphelper::getComponentContext(xMgr) ) );
} }
//--------------------------------------------------------
OUString ZipPackage::static_getImplementationName() OUString ZipPackage::static_getImplementationName()
{ {
return OUString("com.sun.star.packages.comp.ZipPackage"); return OUString("com.sun.star.packages.comp.ZipPackage");
} }
//--------------------------------------------------------
Sequence< OUString > ZipPackage::static_getSupportedServiceNames() Sequence< OUString > ZipPackage::static_getSupportedServiceNames()
{ {
uno::Sequence< OUString > aNames( 1 ); uno::Sequence< OUString > aNames( 1 );
aNames[0] = OUString("com.sun.star.packages.Package"); aNames[0] = OUString("com.sun.star.packages.Package");
return aNames; return aNames;
} }
//--------------------------------------------------------
sal_Bool SAL_CALL ZipPackage::static_supportsService( OUString const & rServiceName ) sal_Bool SAL_CALL ZipPackage::static_supportsService( OUString const & rServiceName )
{ {
return rServiceName == getSupportedServiceNames()[0]; return rServiceName == getSupportedServiceNames()[0];
} }
//--------------------------------------------------------
OUString ZipPackage::getImplementationName() OUString ZipPackage::getImplementationName()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return static_getImplementationName(); return static_getImplementationName();
} }
//--------------------------------------------------------
Sequence< OUString > ZipPackage::getSupportedServiceNames() Sequence< OUString > ZipPackage::getSupportedServiceNames()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return static_getSupportedServiceNames(); return static_getSupportedServiceNames();
} }
//--------------------------------------------------------
sal_Bool SAL_CALL ZipPackage::supportsService( OUString const & rServiceName ) sal_Bool SAL_CALL ZipPackage::supportsService( OUString const & rServiceName )
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return static_supportsService ( rServiceName ); return static_supportsService ( rServiceName );
} }
//--------------------------------------------------------
uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno::Reference < XMultiServiceFactory > const & rServiceFactory ) uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno::Reference < XMultiServiceFactory > const & rServiceFactory )
{ {
return cppu::createSingleFactory ( rServiceFactory, return cppu::createSingleFactory ( rServiceFactory,
@ -1653,7 +1625,6 @@ uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno::
namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
//--------------------------------------------------------
Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void ) Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void )
throw ( RuntimeException ) throw ( RuntimeException )
{ {
@ -1661,7 +1632,6 @@ Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void )
return rId.getImplementationId(); return rId.getImplementationId();
} }
//--------------------------------------------------------
sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -1670,14 +1640,12 @@ sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aI
return 0; return 0;
} }
//--------------------------------------------------------
uno::Reference< XPropertySetInfo > SAL_CALL ZipPackage::getPropertySetInfo() uno::Reference< XPropertySetInfo > SAL_CALL ZipPackage::getPropertySetInfo()
throw( RuntimeException ) throw( RuntimeException )
{ {
return uno::Reference < XPropertySetInfo > (); return uno::Reference < XPropertySetInfo > ();
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException )
{ {
@ -1774,7 +1742,6 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
throw UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------
Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {
@ -1824,22 +1791,18 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
} }
throw UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::addPropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ ) void SAL_CALL ZipPackage::addPropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::removePropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*aListener*/ ) void SAL_CALL ZipPackage::removePropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*aListener*/ )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::addVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) void SAL_CALL ZipPackage::addVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {
} }
//--------------------------------------------------------
void SAL_CALL ZipPackage::removeVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) void SAL_CALL ZipPackage::removeVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ )
throw( UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {

View File

@ -72,7 +72,6 @@ ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat,
rCachedImplId = getImplementationId(); rCachedImplId = getImplementationId();
} }
ZipPackageFolder::~ZipPackageFolder() ZipPackageFolder::~ZipPackageFolder()
{ {
} }
@ -352,7 +351,6 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty; aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty;
aPropSet[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath; aPropSet[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath;
OSL_ENSURE( rInfo.pStream->GetStreamMode() != PACKAGE_STREAM_NOTSET, "Unacceptable ZipPackageStream mode!" ); OSL_ENSURE( rInfo.pStream->GetStreamMode() != PACKAGE_STREAM_NOTSET, "Unacceptable ZipPackageStream mode!" );
sal_Bool bRawStream = sal_False; sal_Bool bRawStream = sal_False;

View File

@ -124,7 +124,6 @@ void ZipPackageStream::setZipEntryOnLoading( const ZipEntry &rInEntry )
bToBeCompressed = sal_False; bToBeCompressed = sal_False;
} }
//--------------------------------------------------------------------------
void ZipPackageStream::CloseOwnStreamIfAny() void ZipPackageStream::CloseOwnStreamIfAny()
{ {
if ( xStream.is() ) if ( xStream.is() )
@ -135,7 +134,6 @@ void ZipPackageStream::CloseOwnStreamIfAny()
} }
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream() uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream()
{ {
if ( !m_bHasSeekable && xStream.is() ) if ( !m_bHasSeekable && xStream.is() )
@ -156,7 +154,6 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream()
return xStream; return xStream;
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCopy() uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCopy()
{ {
if ( m_nStreamMode != PACKAGE_STREAM_RAW || !GetOwnSeekStream().is() ) if ( m_nStreamMode != PACKAGE_STREAM_RAW || !GetOwnSeekStream().is() )
@ -189,19 +186,16 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCop
return xTempIn; return xTempIn;
} }
//--------------------------------------------------------------------------
sal_Int32 ZipPackageStream::GetEncryptionAlgorithm() const sal_Int32 ZipPackageStream::GetEncryptionAlgorithm() const
{ {
return m_nImportedEncryptionAlgorithm ? m_nImportedEncryptionAlgorithm : rZipPackage.GetEncAlgID(); return m_nImportedEncryptionAlgorithm ? m_nImportedEncryptionAlgorithm : rZipPackage.GetEncAlgID();
} }
//--------------------------------------------------------------------------
sal_Int32 ZipPackageStream::GetBlockSize() const sal_Int32 ZipPackageStream::GetBlockSize() const
{ {
return GetEncryptionAlgorithm() == ::com::sun::star::xml::crypto::CipherID::AES_CBC_W3C_PADDING ? 16 : 8; return GetEncryptionAlgorithm() == ::com::sun::star::xml::crypto::CipherID::AES_CBC_W3C_PADDING ? 16 : 8;
} }
//--------------------------------------------------------------------------
::rtl::Reference< EncryptionData > ZipPackageStream::GetEncryptionData( bool bUseWinEncoding ) ::rtl::Reference< EncryptionData > ZipPackageStream::GetEncryptionData( bool bUseWinEncoding )
{ {
::rtl::Reference< EncryptionData > xResult; ::rtl::Reference< EncryptionData > xResult;
@ -217,7 +211,6 @@ sal_Int32 ZipPackageStream::GetBlockSize() const
return xResult; return xResult;
} }
//--------------------------------------------------------------------------
uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncoding ) uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncoding )
{ {
uno::Sequence< sal_Int8 > aResult; uno::Sequence< sal_Int8 > aResult;
@ -254,7 +247,6 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi
return aResult; return aResult;
} }
//--------------------------------------------------------------------------
sal_Int32 ZipPackageStream::GetStartKeyGenID() sal_Int32 ZipPackageStream::GetStartKeyGenID()
{ {
// generally should all the streams use the same Start Key // generally should all the streams use the same Start Key
@ -262,7 +254,6 @@ sal_Int32 ZipPackageStream::GetStartKeyGenID()
return m_nImportedStartKeyAlgorithm ? m_nImportedStartKeyAlgorithm : rZipPackage.GetStartKeyGenID(); return m_nImportedStartKeyAlgorithm ? m_nImportedStartKeyAlgorithm : rZipPackage.GetStartKeyGenID();
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_Bool bAddHeaderForEncr ) uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_Bool bAddHeaderForEncr )
{ {
if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || ( bAddHeaderForEncr && !bToBeEncrypted ) ) if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || ( bAddHeaderForEncr && !bToBeEncrypted ) )
@ -370,7 +361,6 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------------------------
sal_Bool ZipPackageStream::ParsePackageRawStream() sal_Bool ZipPackageStream::ParsePackageRawStream()
{ {
OSL_ENSURE( GetOwnSeekStream().is(), "A stream must be provided!\n" ); OSL_ENSURE( GetOwnSeekStream().is(), "A stream must be provided!\n" );
@ -454,7 +444,6 @@ void ZipPackageStream::SetPackageMember( sal_Bool bNewValue )
} }
// XActiveDataSink // XActiveDataSink
//--------------------------------------------------------------------------
void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInputStream >& aStream ) void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInputStream >& aStream )
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -467,7 +456,6 @@ void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInput
m_nStreamMode = PACKAGE_STREAM_DETECT; m_nStreamMode = PACKAGE_STREAM_DETECT;
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData() uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData()
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -496,7 +484,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData()
} }
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream() uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -528,7 +515,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
} }
// XDataSinkEncrSupport // XDataSinkEncrSupport
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream()
throw ( packages::WrongPasswordException, throw ( packages::WrongPasswordException,
io::IOException, io::IOException,
@ -572,7 +558,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream()
return uno::Reference< io::XInputStream >(); return uno::Reference< io::XInputStream >();
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream() uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
throw ( packages::NoEncryptionException, throw ( packages::NoEncryptionException,
io::IOException, io::IOException,
@ -606,8 +591,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------------------------
void SAL_CALL ZipPackageStream::setDataStream( const uno::Reference< io::XInputStream >& aStream ) void SAL_CALL ZipPackageStream::setDataStream( const uno::Reference< io::XInputStream >& aStream )
throw ( io::IOException, throw ( io::IOException,
RuntimeException ) RuntimeException )
@ -616,7 +599,6 @@ void SAL_CALL ZipPackageStream::setDataStream( const uno::Reference< io::XInputS
m_nStreamMode = PACKAGE_STREAM_DATA; m_nStreamMode = PACKAGE_STREAM_DATA;
} }
//--------------------------------------------------------------------------
void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputStream >& aStream ) void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputStream >& aStream )
throw ( packages::EncryptionNotAllowedException, throw ( packages::EncryptionNotAllowedException,
packages::NoRawFormatException, packages::NoRawFormatException,
@ -647,7 +629,6 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt
m_nStreamMode = PACKAGE_STREAM_RAW; m_nStreamMode = PACKAGE_STREAM_RAW;
} }
//--------------------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream() uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream()
throw ( io::IOException, throw ( io::IOException,
uno::RuntimeException ) uno::RuntimeException )
@ -680,7 +661,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream(
// XUnoTunnel // XUnoTunnel
//--------------------------------------------------------------------------
sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier ) sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier )
throw( RuntimeException ) throw( RuntimeException )
{ {
@ -692,7 +672,6 @@ sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& a
} }
// XPropertySet // XPropertySet
//--------------------------------------------------------------------------
void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
throw( beans::UnknownPropertyException, beans::PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) throw( beans::UnknownPropertyException, beans::PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException )
{ {
@ -851,7 +830,6 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------------------------
Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName ) Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException ) throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException )
{ {
@ -895,21 +873,18 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
//--------------------------------------------------------------------------
void ZipPackageStream::setSize ( const sal_Int64 nNewSize ) void ZipPackageStream::setSize ( const sal_Int64 nNewSize )
{ {
if ( aEntry.nCompressedSize != nNewSize ) if ( aEntry.nCompressedSize != nNewSize )
aEntry.nMethod = DEFLATED; aEntry.nMethod = DEFLATED;
aEntry.nSize = nNewSize; aEntry.nSize = nNewSize;
} }
//--------------------------------------------------------------------------
OUString ZipPackageStream::getImplementationName() OUString ZipPackageStream::getImplementationName()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return OUString ("ZipPackageStream"); return OUString ("ZipPackageStream");
} }
//--------------------------------------------------------------------------
Sequence< OUString > ZipPackageStream::getSupportedServiceNames() Sequence< OUString > ZipPackageStream::getSupportedServiceNames()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
@ -917,7 +892,7 @@ Sequence< OUString > ZipPackageStream::getSupportedServiceNames()
aNames[0] = "com.sun.star.packages.PackageStream"; aNames[0] = "com.sun.star.packages.PackageStream";
return aNames; return aNames;
} }
//--------------------------------------------------------------------------
sal_Bool SAL_CALL ZipPackageStream::supportsService( OUString const & rServiceName ) sal_Bool SAL_CALL ZipPackageStream::supportsService( OUString const & rServiceName )
throw ( RuntimeException ) throw ( RuntimeException )
{ {

View File

@ -23,7 +23,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream >& xInStream, WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream >& xInStream,
const SotMutexHolderRef& rMutexRef ) const SotMutexHolderRef& rMutexRef )
: m_rMutexRef( rMutexRef ) : m_rMutexRef( rMutexRef )

View File

@ -53,7 +53,6 @@ public:
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); throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
//XSeekable //XSeekable
virtual void SAL_CALL seek( sal_Int64 location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL seek( sal_Int64 location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int64 SAL_CALL getPosition() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual sal_Int64 SAL_CALL getPosition() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);

View File

@ -34,10 +34,8 @@
#include <memory> #include <memory>
using namespace ::com::sun::star; using namespace ::com::sun::star;
// ----------------------------------------------------------------
OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >& rxContext ) OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >& rxContext )
: m_aMutexHolder( new SotMutexHolder ) : m_aMutexHolder( new SotMutexHolder )
, m_xContext( rxContext ) , m_xContext( rxContext )
@ -49,7 +47,6 @@ OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >&
throw uno::RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); throw uno::RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
// ----------------------------------------------------------------
OZipFileAccess::~OZipFileAccess() OZipFileAccess::~OZipFileAccess()
{ {
{ {
@ -65,7 +62,6 @@ OZipFileAccess::~OZipFileAccess()
} }
} }
// ----------------------------------------------------------------
uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUString& aString ) uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUString& aString )
{ {
if ( aString.isEmpty() ) if ( aString.isEmpty() )
@ -112,7 +108,6 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
return aPattern; return aPattern;
} }
// ----------------------------------------------------------------
sal_Bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString, sal_Bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString,
const uno::Sequence< OUString >& aPattern ) const uno::Sequence< OUString >& aPattern )
{ {
@ -161,7 +156,6 @@ sal_Bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString,
} }
// XInitialization // XInitialization
// ----------------------------------------------------------------
void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArguments ) void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArguments )
throw ( uno::Exception, throw ( uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
@ -226,7 +220,6 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
} }
// XNameAccess // XNameAccess
// ----------------------------------------------------------------
uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
lang::WrappedTargetException, lang::WrappedTargetException,
@ -255,7 +248,6 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
return uno::makeAny ( xEntryStream ); return uno::makeAny ( xEntryStream );
} }
// ----------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames() uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -290,7 +282,6 @@ uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames()
return aNames; return aNames;
} }
// ----------------------------------------------------------------
sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName ) sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@ -307,7 +298,6 @@ sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName )
return ( aIter != m_pZipFile->GetEntryHash().end() ); return ( aIter != m_pZipFile->GetEntryHash().end() );
} }
// ----------------------------------------------------------------
uno::Type SAL_CALL OZipFileAccess::getElementType() uno::Type SAL_CALL OZipFileAccess::getElementType()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -322,7 +312,6 @@ uno::Type SAL_CALL OZipFileAccess::getElementType()
return getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ); return getCppuType( ( const uno::Reference< io::XInputStream >* )NULL );
} }
// ----------------------------------------------------------------
sal_Bool SAL_CALL OZipFileAccess::hasElements() sal_Bool SAL_CALL OZipFileAccess::hasElements()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -338,7 +327,6 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
} }
// XZipFileAccess // XZipFileAccess
// ----------------------------------------------------------------
uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern( const OUString& aPatternString ) uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern( const OUString& aPatternString )
throw ( container::NoSuchElementException, throw ( container::NoSuchElementException,
io::IOException, io::IOException,
@ -374,7 +362,6 @@ uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern(
} }
// XComponent // XComponent
// ----------------------------------------------------------------
void SAL_CALL OZipFileAccess::dispose() void SAL_CALL OZipFileAccess::dispose()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -406,7 +393,6 @@ void SAL_CALL OZipFileAccess::dispose()
m_bDisposed = sal_True; m_bDisposed = sal_True;
} }
// ----------------------------------------------------------------
void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -420,7 +406,6 @@ void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEve
m_pListenersContainer->addInterface( xListener ); m_pListenersContainer->addInterface( xListener );
} }
// ----------------------------------------------------------------
void SAL_CALL OZipFileAccess::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) void SAL_CALL OZipFileAccess::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -433,7 +418,6 @@ void SAL_CALL OZipFileAccess::removeEventListener( const uno::Reference< lang::X
m_pListenersContainer->removeInterface( xListener ); m_pListenersContainer->removeInterface( xListener );
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OZipFileAccess::impl_staticGetSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OZipFileAccess::impl_staticGetSupportedServiceNames()
{ {
uno::Sequence< OUString > aRet(2); uno::Sequence< OUString > aRet(2);
@ -442,27 +426,23 @@ uno::Sequence< OUString > SAL_CALL OZipFileAccess::impl_staticGetSupportedServic
return aRet; return aRet;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OZipFileAccess::impl_staticGetImplementationName() OUString SAL_CALL OZipFileAccess::impl_staticGetImplementationName()
{ {
return OUString("com.sun.star.comp.package.zip.ZipFileAccess"); return OUString("com.sun.star.comp.package.zip.ZipFileAccess");
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OZipFileAccess::impl_staticCreateSelfInstance( uno::Reference< uno::XInterface > SAL_CALL OZipFileAccess::impl_staticCreateSelfInstance(
const uno::Reference< lang::XMultiServiceFactory >& rxMSF ) const uno::Reference< lang::XMultiServiceFactory >& rxMSF )
{ {
return uno::Reference< uno::XInterface >( *new OZipFileAccess( comphelper::getComponentContext(rxMSF) ) ); return uno::Reference< uno::XInterface >( *new OZipFileAccess( comphelper::getComponentContext(rxMSF) ) );
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OZipFileAccess::getImplementationName() OUString SAL_CALL OZipFileAccess::getImplementationName()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
return impl_staticGetImplementationName(); return impl_staticGetImplementationName();
} }
//-------------------------------------------------------------------------
sal_Bool SAL_CALL OZipFileAccess::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL OZipFileAccess::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
@ -475,7 +455,6 @@ sal_Bool SAL_CALL OZipFileAccess::supportsService( const OUString& ServiceName )
return sal_False; return sal_False;
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OZipFileAccess::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OZipFileAccess::getSupportedServiceNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {