xref: /AOO41X/main/package/source/xstor/xstorage.hxx (revision f319bb99b6b251a37b98027a84e8048ce3778b1f)
1*f319bb99SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f319bb99SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f319bb99SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f319bb99SAndrew Rist  * distributed with this work for additional information
6*f319bb99SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f319bb99SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f319bb99SAndrew Rist  * "License"); you may not use this file except in compliance
9*f319bb99SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*f319bb99SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*f319bb99SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f319bb99SAndrew Rist  * software distributed under the License is distributed on an
15*f319bb99SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f319bb99SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f319bb99SAndrew Rist  * specific language governing permissions and limitations
18*f319bb99SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*f319bb99SAndrew Rist  *************************************************************/
21*f319bb99SAndrew Rist 
22*f319bb99SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef __XSTORAGE_HXX_
25cdf0e10cSrcweir #define __XSTORAGE_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
28cdf0e10cSrcweir #include <com/sun/star/embed/XStorage2.hpp>
29cdf0e10cSrcweir #include <com/sun/star/embed/XOptimizedStorage.hpp>
30cdf0e10cSrcweir #include <com/sun/star/embed/XHierarchicalStorageAccess2.hpp>
31cdf0e10cSrcweir #include <com/sun/star/embed/XStorageRawAccess.hpp>
32cdf0e10cSrcweir #include <com/sun/star/embed/XTransactedObject.hpp>
33cdf0e10cSrcweir #include <com/sun/star/embed/XTransactionBroadcaster.hpp>
34cdf0e10cSrcweir #include <com/sun/star/embed/XClassifiedObject.hpp>
35cdf0e10cSrcweir #include <com/sun/star/embed/XEncryptionProtectedStorage.hpp>
36cdf0e10cSrcweir #include <com/sun/star/embed/XRelationshipAccess.hpp>
37cdf0e10cSrcweir #include <com/sun/star/util/XModifiable.hpp>
38cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
39cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
40cdf0e10cSrcweir #include <com/sun/star/util/XCloseable.hpp>
41cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
42cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
43cdf0e10cSrcweir #include <com/sun/star/beans/StringPair.hpp>
44cdf0e10cSrcweir #include <com/sun/star/io/XStream.hpp>
45cdf0e10cSrcweir #include <com/sun/star/lang/XSingleServiceFactory.hpp>
46cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
47cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
48cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
49cdf0e10cSrcweir #include <com/sun/star/packages/NoEncryptionException.hpp>
50cdf0e10cSrcweir #include <com/sun/star/logging/XSimpleLogRing.hpp>
51cdf0e10cSrcweir 
52cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
53cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.h>
54cdf0e10cSrcweir #include <comphelper/sequenceashashmap.hxx>
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #include "mutexholder.hxx"
57cdf0e10cSrcweir 
58cdf0e10cSrcweir #define RELINFO_NO_INIT				1
59cdf0e10cSrcweir #define RELINFO_READ				2
60cdf0e10cSrcweir #define RELINFO_CHANGED				3
61cdf0e10cSrcweir #define RELINFO_CHANGED_STREAM		4
62cdf0e10cSrcweir #define RELINFO_CHANGED_STREAM_READ	5
63cdf0e10cSrcweir #define RELINFO_BROKEN				6
64cdf0e10cSrcweir #define RELINFO_CHANGED_BROKEN		7
65cdf0e10cSrcweir 
66cdf0e10cSrcweir #define STOR_MESS_PRECOMMIT 1
67cdf0e10cSrcweir #define STOR_MESS_COMMITED  2
68cdf0e10cSrcweir #define STOR_MESS_PREREVERT 3
69cdf0e10cSrcweir #define STOR_MESS_REVERTED  4
70cdf0e10cSrcweir 
71cdf0e10cSrcweir namespace cppu
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	class OTypeCollection;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir 
76cdf0e10cSrcweir //================================================
77cdf0e10cSrcweir // a common implementation for an entry
78cdf0e10cSrcweir 
79cdf0e10cSrcweir struct StorInternalData_Impl;
80cdf0e10cSrcweir struct OStorage_Impl;
81cdf0e10cSrcweir struct OWriteStream_Impl;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir struct SotElement_Impl
84cdf0e10cSrcweir {
85cdf0e10cSrcweir     ::rtl::OUString             m_aName;
86cdf0e10cSrcweir     ::rtl::OUString             m_aOriginalName;
87cdf0e10cSrcweir     sal_Bool                    m_bIsRemoved;
88cdf0e10cSrcweir     sal_Bool                    m_bIsInserted;
89cdf0e10cSrcweir 	sal_Bool					m_bIsStorage;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 	OStorage_Impl*				m_pStorage;
92cdf0e10cSrcweir 	OWriteStream_Impl*			m_pStream;
93cdf0e10cSrcweir 
94cdf0e10cSrcweir public:
95cdf0e10cSrcweir                                 SotElement_Impl( const ::rtl::OUString& rName, sal_Bool bStor, sal_Bool bNew );
96cdf0e10cSrcweir 								~SotElement_Impl();
97cdf0e10cSrcweir };
98cdf0e10cSrcweir 
99cdf0e10cSrcweir #include <list>
100cdf0e10cSrcweir typedef ::std::list< SotElement_Impl* > SotElementList_Impl;
101cdf0e10cSrcweir 
102cdf0e10cSrcweir //=========================================================================
103cdf0e10cSrcweir // Main storage implementation
104cdf0e10cSrcweir 
105cdf0e10cSrcweir class OStorage;
106cdf0e10cSrcweir 
107cdf0e10cSrcweir struct StorageHolder_Impl
108cdf0e10cSrcweir {
109cdf0e10cSrcweir 	OStorage* m_pPointer;
110cdf0e10cSrcweir 	::com::sun::star::uno::WeakReference< ::com::sun::star::embed::XStorage > m_xWeakRef;
111cdf0e10cSrcweir 
StorageHolder_ImplStorageHolder_Impl112cdf0e10cSrcweir 	StorageHolder_Impl( OStorage* pStorage )
113cdf0e10cSrcweir 	: m_pPointer( pStorage )
114cdf0e10cSrcweir 	, m_xWeakRef( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >(
115cdf0e10cSrcweir 												(::com::sun::star::embed::XStorage*)pStorage ) )
116cdf0e10cSrcweir 	{
117cdf0e10cSrcweir 	}
118cdf0e10cSrcweir 
StorageHolder_ImplStorageHolder_Impl119cdf0e10cSrcweir 	StorageHolder_Impl( const StorageHolder_Impl& aSH )
120cdf0e10cSrcweir 	: m_pPointer( aSH.m_pPointer )
121cdf0e10cSrcweir 	, m_xWeakRef( aSH.m_xWeakRef )
122cdf0e10cSrcweir 	{
123cdf0e10cSrcweir 	}
124cdf0e10cSrcweir };
125cdf0e10cSrcweir 
126cdf0e10cSrcweir typedef ::std::list< StorageHolder_Impl > OStorageList_Impl;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir class SwitchablePersistenceStream;
129cdf0e10cSrcweir struct OStorage_Impl
130cdf0e10cSrcweir {
131cdf0e10cSrcweir 	SotMutexHolderRef			m_rMutexRef;
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     OStorage*					m_pAntiImpl;    	 // only valid if external references exists
134cdf0e10cSrcweir 	OStorageList_Impl			m_aReadOnlyWrapList; // only valid if readonly external reference exists
135cdf0e10cSrcweir 
136cdf0e10cSrcweir     sal_Int32					m_nStorageMode; // open mode ( read/write/trunc/nocreate )
137cdf0e10cSrcweir     sal_Bool                    m_bIsModified;  // only modified elements will be sent to the original content
138cdf0e10cSrcweir     sal_Bool                    m_bBroadcastModified;  // will be set if notification is required
139cdf0e10cSrcweir     sal_Bool                    m_bCommited;    // sending the streams is coordinated by the root storage of the package
140cdf0e10cSrcweir 
141cdf0e10cSrcweir     sal_Bool                    m_bIsRoot;      // marks this storage as root storages that manages all commits and reverts
142cdf0e10cSrcweir     sal_Bool                    m_bListCreated;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 
145cdf0e10cSrcweir 	SotElementList_Impl							m_aChildrenList;
146cdf0e10cSrcweir 	SotElementList_Impl							m_aDeletedList;
147cdf0e10cSrcweir 
148cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xPackageFolder;
149cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing >  m_xLogRing;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > m_xPackage;
152cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >  m_xFactory;
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 	// valid only for root storage
155cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; // ??? may be stored in properties
156cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; // ??? may be stored in properties
157cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_xProperties;
158cdf0e10cSrcweir 	sal_Bool m_bHasCommonEncryptionData;
159cdf0e10cSrcweir 	::comphelper::SequenceAsHashMap m_aCommonEncryptionData;
160cdf0e10cSrcweir 
161cdf0e10cSrcweir 	// must be empty in case of root storage
162cdf0e10cSrcweir 	OStorage_Impl* m_pParent;
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 	sal_Bool		m_bControlMediaType;
165cdf0e10cSrcweir 	::rtl::OUString m_aMediaType;
166cdf0e10cSrcweir 	sal_Bool		m_bMTFallbackUsed;
167cdf0e10cSrcweir 
168cdf0e10cSrcweir 	sal_Bool		m_bControlVersion;
169cdf0e10cSrcweir     ::rtl::OUString m_aVersion;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 	SwitchablePersistenceStream* m_pSwitchStream;
172cdf0e10cSrcweir 
173cdf0e10cSrcweir 	sal_Int32 m_nStorageType; // the mode in wich the storage is used
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 	// the _rels substorage that is handled in a special way in embed::StorageFormats::OFOPXML
176cdf0e10cSrcweir 	SotElement_Impl* m_pRelStorElement;
177cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xRelStorage;
178cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aRelInfo;
179cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream;
180cdf0e10cSrcweir 	sal_Int16 m_nRelInfoStatus;
181cdf0e10cSrcweir 
182cdf0e10cSrcweir 	//////////////////////////////////////////
183cdf0e10cSrcweir 	// Constructors
184cdf0e10cSrcweir 
185cdf0e10cSrcweir 	OStorage_Impl(	::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
186cdf0e10cSrcweir 					sal_Int32 nMode,
187cdf0e10cSrcweir 					::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties,
188cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
189cdf0e10cSrcweir 					sal_Int32 nStorageType );
190cdf0e10cSrcweir 
191cdf0e10cSrcweir 	OStorage_Impl(	::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream,
192cdf0e10cSrcweir 					sal_Int32 nMode,
193cdf0e10cSrcweir 					::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties,
194cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
195cdf0e10cSrcweir 					sal_Int32 nStorageType );
196cdf0e10cSrcweir 
197cdf0e10cSrcweir 	// constructor for a substorage
198cdf0e10cSrcweir 	OStorage_Impl(	OStorage_Impl* pParent,
199cdf0e10cSrcweir 					sal_Int32 nMode,
200cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xPackageFolder,
201cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > xPackage,
202cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
203cdf0e10cSrcweir 					sal_Int32 nStorageType );
204cdf0e10cSrcweir 
205cdf0e10cSrcweir 	~OStorage_Impl();
206cdf0e10cSrcweir 
207cdf0e10cSrcweir     void AddLog( const ::rtl::OUString& aMessage );
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 	void SetReadOnlyWrap( OStorage& aStorage );
210cdf0e10cSrcweir 	void RemoveReadOnlyWrap( OStorage& aStorage );
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 	void OpenOwnPackage();
213cdf0e10cSrcweir 	void ReadContents();
214cdf0e10cSrcweir 	void ReadRelInfoIfNecessary();
215cdf0e10cSrcweir 
216cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
217cdf0e10cSrcweir 	SotElementList_Impl& GetChildrenList();
218cdf0e10cSrcweir 	void GetStorageProperties();
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > GetAllRelationshipsIfAny();
221cdf0e10cSrcweir 	void CopyLastCommitTo( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewStor );
222cdf0e10cSrcweir 	void CopyLastCommitTo( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xNewStor,
223cdf0e10cSrcweir 							const ::rtl::OUString& aPass );
224cdf0e10cSrcweir 
225cdf0e10cSrcweir 	void InsertIntoPackageFolder(
226cdf0e10cSrcweir 			const ::rtl::OUString& aName,
227cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xParentPackageFolder );
228cdf0e10cSrcweir 
229cdf0e10cSrcweir 	void Commit();
230cdf0e10cSrcweir 	void Revert();
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 	::comphelper::SequenceAsHashMap GetCommonRootEncryptionData() throw ( ::com::sun::star::packages::NoEncryptionException );
233cdf0e10cSrcweir 
234cdf0e10cSrcweir 	void CopyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest,
235cdf0e10cSrcweir 						sal_Bool bDirect );
236cdf0e10cSrcweir 	void CopyStorageElement( SotElement_Impl* pElement,
237cdf0e10cSrcweir 							::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xDest,
238cdf0e10cSrcweir 							::rtl::OUString aName,
239cdf0e10cSrcweir 							sal_Bool bDirect );
240cdf0e10cSrcweir 
241cdf0e10cSrcweir 	void SetModified( sal_Bool bModified );
242cdf0e10cSrcweir 
243cdf0e10cSrcweir 	SotElement_Impl* FindElement( const ::rtl::OUString& rName );
244cdf0e10cSrcweir 
245cdf0e10cSrcweir 
246cdf0e10cSrcweir 	SotElement_Impl* InsertStream( ::rtl::OUString aName, sal_Bool bEncr );
247cdf0e10cSrcweir 	SotElement_Impl* InsertRawStream( ::rtl::OUString aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream );
248cdf0e10cSrcweir 
249cdf0e10cSrcweir 	OStorage_Impl* CreateNewStorageImpl( sal_Int32 nStorageMode );
250cdf0e10cSrcweir 	SotElement_Impl* InsertStorage( ::rtl::OUString aName, sal_Int32 nStorageMode );
251cdf0e10cSrcweir 	SotElement_Impl* InsertElement( ::rtl::OUString aName, sal_Bool bIsStorage );
252cdf0e10cSrcweir 
253cdf0e10cSrcweir 	void OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode );
254cdf0e10cSrcweir 	void OpenSubStream( SotElement_Impl* pElement );
255cdf0e10cSrcweir 
256cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::rtl::OUString > GetElementNames();
257cdf0e10cSrcweir 
258cdf0e10cSrcweir 	void RemoveElement( SotElement_Impl* pElement );
259cdf0e10cSrcweir 	void ClearElement( SotElement_Impl* pElement );
260cdf0e10cSrcweir 	void DisposeChildren();
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 	void CloneStreamElement(
263cdf0e10cSrcweir 					const ::rtl::OUString& aStreamName,
264cdf0e10cSrcweir 					sal_Bool bPassProvided,
265cdf0e10cSrcweir 					const ::comphelper::SequenceAsHashMap& aEncryptionData,
266cdf0e10cSrcweir 					::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream )
267cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
268cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
269cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
270cdf0e10cSrcweir 				::com::sun::star::io::IOException,
271cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
272cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
273cdf0e10cSrcweir 
274cdf0e10cSrcweir 	void RemoveStreamRelInfo( const ::rtl::OUString& aOriginalName );
275cdf0e10cSrcweir 	void CreateRelStorage();
276cdf0e10cSrcweir 	void CommitStreamRelInfo( SotElement_Impl* pStreamElement );
277cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRelInfoStreamForName( const ::rtl::OUString& aName );
278cdf0e10cSrcweir 	void CommitRelInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xNewPackageFolder );
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	static void completeStorageStreamCopy_Impl(
281cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xSource,
282cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xDest,
283cdf0e10cSrcweir 		sal_Int32 nStorageType,
284cdf0e10cSrcweir 		const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > >& aRelInfo );
285cdf0e10cSrcweir 
286cdf0e10cSrcweir };
287cdf0e10cSrcweir 
288cdf0e10cSrcweir 
289cdf0e10cSrcweir class OStorage	: public ::com::sun::star::lang::XTypeProvider
290cdf0e10cSrcweir 				, public ::com::sun::star::embed::XStorage2
291cdf0e10cSrcweir 				, public ::com::sun::star::embed::XStorageRawAccess
292cdf0e10cSrcweir 				, public ::com::sun::star::embed::XTransactedObject
293cdf0e10cSrcweir 				, public ::com::sun::star::embed::XTransactionBroadcaster
294cdf0e10cSrcweir 				, public ::com::sun::star::util::XModifiable
295cdf0e10cSrcweir 				// , public ::com::sun::star::container::XNameAccess
296cdf0e10cSrcweir 				// , public ::com::sun::star::lang::XComponent
297cdf0e10cSrcweir 				, public ::com::sun::star::embed::XEncryptionProtectedStorage
298cdf0e10cSrcweir 				, public ::com::sun::star::beans::XPropertySet
299cdf0e10cSrcweir 				, public ::com::sun::star::embed::XOptimizedStorage
300cdf0e10cSrcweir 				, public ::com::sun::star::embed::XRelationshipAccess
301cdf0e10cSrcweir 				, public ::com::sun::star::embed::XHierarchicalStorageAccess2
302cdf0e10cSrcweir 				, public ::cppu::OWeakObject
303cdf0e10cSrcweir {
304cdf0e10cSrcweir 	OStorage_Impl*	m_pImpl;
305cdf0e10cSrcweir 	StorInternalData_Impl* m_pData;
306cdf0e10cSrcweir 
307cdf0e10cSrcweir protected:
308cdf0e10cSrcweir 
309cdf0e10cSrcweir 	void Commit_Impl();
310cdf0e10cSrcweir 
311cdf0e10cSrcweir 	SotElement_Impl* OpenStreamElement_Impl( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode, sal_Bool bEncr );
312cdf0e10cSrcweir 
313cdf0e10cSrcweir 	void BroadcastModifiedIfNecessary();
314cdf0e10cSrcweir 
315cdf0e10cSrcweir 	void BroadcastTransaction( sal_Int8 nMessage );
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 	void MakeLinkToSubComponent_Impl(
318cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xComponent );
319cdf0e10cSrcweir 
320cdf0e10cSrcweir public:
321cdf0e10cSrcweir 
322cdf0e10cSrcweir 	OStorage(	::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
323cdf0e10cSrcweir 				sal_Int32 nMode,
324cdf0e10cSrcweir 				::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties,
325cdf0e10cSrcweir 				::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
326cdf0e10cSrcweir 				sal_Int32 nStorageType );
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 	OStorage(	::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream,
329cdf0e10cSrcweir 				sal_Int32 nMode,
330cdf0e10cSrcweir 				::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties,
331cdf0e10cSrcweir 				::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
332cdf0e10cSrcweir 				sal_Int32 nStorageType );
333cdf0e10cSrcweir 
334cdf0e10cSrcweir 	OStorage(	OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap );
335cdf0e10cSrcweir 
336cdf0e10cSrcweir 	virtual ~OStorage();
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	void SAL_CALL InternalDispose( sal_Bool bNotifyImpl );
339cdf0e10cSrcweir 
340cdf0e10cSrcweir 	void ChildIsDisposed( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChild );
341cdf0e10cSrcweir 
GetRefCount_Impl()342cdf0e10cSrcweir 	sal_Int32 GetRefCount_Impl() { return m_refCount; }
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	//____________________________________________________________________________________________________
345cdf0e10cSrcweir 	//	XInterface
346cdf0e10cSrcweir 	//____________________________________________________________________________________________________
347cdf0e10cSrcweir 
348cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
349cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
350cdf0e10cSrcweir 
351cdf0e10cSrcweir     virtual void SAL_CALL acquire() throw();
352cdf0e10cSrcweir 
353cdf0e10cSrcweir     virtual void SAL_CALL release() throw();
354cdf0e10cSrcweir 
355cdf0e10cSrcweir 	//____________________________________________________________________________________________________
356cdf0e10cSrcweir 	//	XTypeProvider
357cdf0e10cSrcweir 	//____________________________________________________________________________________________________
358cdf0e10cSrcweir 
359cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
360cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
361cdf0e10cSrcweir 
362cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
363cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
364cdf0e10cSrcweir 
365cdf0e10cSrcweir 	//____________________________________________________________________________________________________
366cdf0e10cSrcweir 	//	XStorage
367cdf0e10cSrcweir 	//____________________________________________________________________________________________________
368cdf0e10cSrcweir 
369cdf0e10cSrcweir     virtual void SAL_CALL copyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest )
370cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
371cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
372cdf0e10cSrcweir 				::com::sun::star::io::IOException,
373cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
374cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
375cdf0e10cSrcweir 
376cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openStreamElement(
377cdf0e10cSrcweir 			const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode )
378cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
379cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
380cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
381cdf0e10cSrcweir 				::com::sun::star::io::IOException,
382cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
383cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
384cdf0e10cSrcweir 
385cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStreamElement(
386cdf0e10cSrcweir 			const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode, const ::rtl::OUString& aPass )
387cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
388cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
389cdf0e10cSrcweir 				::com::sun::star::packages::NoEncryptionException,
390cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
391cdf0e10cSrcweir 				::com::sun::star::io::IOException,
392cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
393cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
394cdf0e10cSrcweir 
395cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > SAL_CALL openStorageElement(
396cdf0e10cSrcweir 			const ::rtl::OUString& aStorName, sal_Int32 nStorageMode )
397cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
398cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
399cdf0e10cSrcweir 				::com::sun::star::io::IOException,
400cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
401cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
402cdf0e10cSrcweir 
403cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneStreamElement(
404cdf0e10cSrcweir 			const ::rtl::OUString& aStreamName )
405cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
406cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
407cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
408cdf0e10cSrcweir 				::com::sun::star::io::IOException,
409cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
410cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
411cdf0e10cSrcweir 
412cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStreamElement(
413cdf0e10cSrcweir 			const ::rtl::OUString& aStreamName, const ::rtl::OUString& aPass )
414cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
415cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
416cdf0e10cSrcweir 				::com::sun::star::packages::NoEncryptionException,
417cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
418cdf0e10cSrcweir 				::com::sun::star::io::IOException,
419cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
420cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
421cdf0e10cSrcweir 
422cdf0e10cSrcweir     virtual void SAL_CALL copyLastCommitTo(
423cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xTargetStorage )
424cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
425cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
426cdf0e10cSrcweir 				::com::sun::star::io::IOException,
427cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
428cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
429cdf0e10cSrcweir 
430cdf0e10cSrcweir     virtual void SAL_CALL copyStorageElementLastCommitTo(
431cdf0e10cSrcweir 			const ::rtl::OUString& aStorName,
432cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xTargetStorage )
433cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
434cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
435cdf0e10cSrcweir 				::com::sun::star::io::IOException,
436cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
437cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
438cdf0e10cSrcweir 
439cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isStreamElement( const ::rtl::OUString& aElementName )
440cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
441cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
442cdf0e10cSrcweir 				::com::sun::star::embed::InvalidStorageException,
443cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
444cdf0e10cSrcweir 
445cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isStorageElement( const ::rtl::OUString& aElementName )
446cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
447cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
448cdf0e10cSrcweir 				::com::sun::star::embed::InvalidStorageException,
449cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
450cdf0e10cSrcweir 
451cdf0e10cSrcweir     virtual void SAL_CALL removeElement( const ::rtl::OUString& aElementName )
452cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
453cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
454cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
455cdf0e10cSrcweir 				::com::sun::star::io::IOException,
456cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
457cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
458cdf0e10cSrcweir 
459cdf0e10cSrcweir     virtual void SAL_CALL renameElement( const ::rtl::OUString& rEleName, const ::rtl::OUString& rNewName )
460cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
461cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
462cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
463cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
464cdf0e10cSrcweir 				::com::sun::star::io::IOException,
465cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
466cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
467cdf0e10cSrcweir 
468cdf0e10cSrcweir     virtual void SAL_CALL copyElementTo(	const ::rtl::OUString& aElementName,
469cdf0e10cSrcweir 										const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest,
470cdf0e10cSrcweir 										const ::rtl::OUString& aNewName )
471cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
472cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
473cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
474cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
475cdf0e10cSrcweir 				::com::sun::star::io::IOException,
476cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
477cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
478cdf0e10cSrcweir 
479cdf0e10cSrcweir     virtual void SAL_CALL moveElementTo(	const ::rtl::OUString& aElementName,
480cdf0e10cSrcweir 										const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest,
481cdf0e10cSrcweir 										const ::rtl::OUString& rNewName )
482cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
483cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
484cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
485cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
486cdf0e10cSrcweir 				::com::sun::star::io::IOException,
487cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
488cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
489cdf0e10cSrcweir 
490cdf0e10cSrcweir 	//____________________________________________________________________________________________________
491cdf0e10cSrcweir 	//	XStorage2
492cdf0e10cSrcweir 	//____________________________________________________________________________________________________
493cdf0e10cSrcweir 
494cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStream( const ::rtl::OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
495cdf0e10cSrcweir         throw ( ::com::sun::star::embed::InvalidStorageException,
496cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
497cdf0e10cSrcweir                 ::com::sun::star::packages::NoEncryptionException,
498cdf0e10cSrcweir                 ::com::sun::star::packages::WrongPasswordException,
499cdf0e10cSrcweir                 ::com::sun::star::io::IOException,
500cdf0e10cSrcweir                 ::com::sun::star::embed::StorageWrappedTargetException,
501cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
502cdf0e10cSrcweir 
503cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStream( const ::rtl::OUString& sStreamName, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
504cdf0e10cSrcweir         throw ( ::com::sun::star::embed::InvalidStorageException,
505cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
506cdf0e10cSrcweir                 ::com::sun::star::packages::NoEncryptionException,
507cdf0e10cSrcweir                 ::com::sun::star::packages::WrongPasswordException,
508cdf0e10cSrcweir                 ::com::sun::star::io::IOException,
509cdf0e10cSrcweir                 ::com::sun::star::embed::StorageWrappedTargetException,
510cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException);
511cdf0e10cSrcweir 
512cdf0e10cSrcweir 	//____________________________________________________________________________________________________
513cdf0e10cSrcweir 	//	XStorageRawAccess
514cdf0e10cSrcweir 	//____________________________________________________________________________________________________
515cdf0e10cSrcweir 
516cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getPlainRawStreamElement(
517cdf0e10cSrcweir 			const ::rtl::OUString& sStreamName )
518cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
519cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
520cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
521cdf0e10cSrcweir 				::com::sun::star::io::IOException,
522cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
523cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
524cdf0e10cSrcweir 
525cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawEncrStreamElement(
526cdf0e10cSrcweir 			const ::rtl::OUString& sStreamName )
527cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
528cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
529cdf0e10cSrcweir 				::com::sun::star::packages::NoEncryptionException,
530cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
531cdf0e10cSrcweir 				::com::sun::star::io::IOException,
532cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
533cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
534cdf0e10cSrcweir 
535cdf0e10cSrcweir 	virtual void SAL_CALL insertRawEncrStreamElement( const ::rtl::OUString& aStreamName,
536cdf0e10cSrcweir 								const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream )
537cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
538cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
539cdf0e10cSrcweir 				::com::sun::star::packages::NoRawFormatException,
540cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
541cdf0e10cSrcweir 				::com::sun::star::io::IOException,
542cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
543cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
544cdf0e10cSrcweir 
545cdf0e10cSrcweir 	//____________________________________________________________________________________________________
546cdf0e10cSrcweir 	// XTransactedObject
547cdf0e10cSrcweir 	//____________________________________________________________________________________________________
548cdf0e10cSrcweir 
549cdf0e10cSrcweir     virtual void SAL_CALL commit()
550cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
551cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
552cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
553cdf0e10cSrcweir 
554cdf0e10cSrcweir     virtual void SAL_CALL revert()
555cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
556cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
557cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
558cdf0e10cSrcweir 
559cdf0e10cSrcweir 	//____________________________________________________________________________________________________
560cdf0e10cSrcweir 	// XTransactionBroadcaster
561cdf0e10cSrcweir 	//____________________________________________________________________________________________________
562cdf0e10cSrcweir 
563cdf0e10cSrcweir     virtual void SAL_CALL addTransactionListener(
564cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
565cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
566cdf0e10cSrcweir 
567cdf0e10cSrcweir     virtual void SAL_CALL removeTransactionListener(
568cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
569cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
570cdf0e10cSrcweir 
571cdf0e10cSrcweir 	//____________________________________________________________________________________________________
572cdf0e10cSrcweir 	//	XModifiable
573cdf0e10cSrcweir 	//____________________________________________________________________________________________________
574cdf0e10cSrcweir 
575cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isModified()
576cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
577cdf0e10cSrcweir 
578cdf0e10cSrcweir     virtual void SAL_CALL setModified( sal_Bool bModified )
579cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::PropertyVetoException,
580cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
581cdf0e10cSrcweir 
582cdf0e10cSrcweir     virtual void SAL_CALL addModifyListener(
583cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
584cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
585cdf0e10cSrcweir 
586cdf0e10cSrcweir     virtual void SAL_CALL removeModifyListener(
587cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
588cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
589cdf0e10cSrcweir 
590cdf0e10cSrcweir 	//____________________________________________________________________________________________________
591cdf0e10cSrcweir 	//	XNameAccess
592cdf0e10cSrcweir 	//____________________________________________________________________________________________________
593cdf0e10cSrcweir 
594cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
595cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
596cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
597cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
598cdf0e10cSrcweir 
599cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
600cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
601cdf0e10cSrcweir 
602cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
603cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
604cdf0e10cSrcweir 
605cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
606cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
607cdf0e10cSrcweir 
608cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements()
609cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
610cdf0e10cSrcweir 
611cdf0e10cSrcweir 	//____________________________________________________________________________________________________
612cdf0e10cSrcweir 	//	XComponent
613cdf0e10cSrcweir 	//____________________________________________________________________________________________________
614cdf0e10cSrcweir 
615cdf0e10cSrcweir     virtual void SAL_CALL dispose()
616cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
617cdf0e10cSrcweir 
618cdf0e10cSrcweir     virtual void SAL_CALL addEventListener(
619cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
620cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
621cdf0e10cSrcweir 
622cdf0e10cSrcweir     virtual void SAL_CALL removeEventListener(
623cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
624cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
625cdf0e10cSrcweir 
626cdf0e10cSrcweir 	//____________________________________________________________________________________________________
627cdf0e10cSrcweir 	//	XEncryptionProtectedSource
628cdf0e10cSrcweir 	//____________________________________________________________________________________________________
629cdf0e10cSrcweir 
630cdf0e10cSrcweir 	virtual void SAL_CALL setEncryptionPassword( const ::rtl::OUString& aPass )
631cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException,
632cdf0e10cSrcweir 				::com::sun::star::io::IOException );
633cdf0e10cSrcweir 
634cdf0e10cSrcweir     virtual void SAL_CALL removeEncryption()
635cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException,
636cdf0e10cSrcweir 				::com::sun::star::io::IOException );
637cdf0e10cSrcweir 
638cdf0e10cSrcweir 	//____________________________________________________________________________________________________
639cdf0e10cSrcweir 	//  XEncryptionProtectedSource2
640cdf0e10cSrcweir 	//____________________________________________________________________________________________________
641cdf0e10cSrcweir 
642cdf0e10cSrcweir     virtual void SAL_CALL setEncryptionData(
643cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
644cdf0e10cSrcweir         throw ( ::com::sun::star::io::IOException,
645cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException );
646cdf0e10cSrcweir 
647cdf0e10cSrcweir 	//____________________________________________________________________________________________________
648cdf0e10cSrcweir 	//  XEncryptionProtectedStorage
649cdf0e10cSrcweir 	//____________________________________________________________________________________________________
650cdf0e10cSrcweir 
651cdf0e10cSrcweir     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);
652cdf0e10cSrcweir 
653cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getEncryptionAlgorithms() throw (::com::sun::star::uno::RuntimeException);
654cdf0e10cSrcweir 
655cdf0e10cSrcweir 	//____________________________________________________________________________________________________
656cdf0e10cSrcweir 	//	XPropertySet
657cdf0e10cSrcweir 	//____________________________________________________________________________________________________
658cdf0e10cSrcweir 
659cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
660cdf0e10cSrcweir 		throw ( ::com::sun::star::uno::RuntimeException );
661cdf0e10cSrcweir 
662cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
663cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
664cdf0e10cSrcweir 				::com::sun::star::beans::PropertyVetoException,
665cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
666cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
667cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
668cdf0e10cSrcweir 
669cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName )
670cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
671cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
672cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
673cdf0e10cSrcweir 
674cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener(
675cdf0e10cSrcweir 			const ::rtl::OUString& aPropertyName,
676cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
677cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
678cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
679cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
680cdf0e10cSrcweir 
681cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener(
682cdf0e10cSrcweir 			const ::rtl::OUString& aPropertyName,
683cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
684cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
685cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
686cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
687cdf0e10cSrcweir 
688cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener(
689cdf0e10cSrcweir 			const ::rtl::OUString& PropertyName,
690cdf0e10cSrcweir 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
691cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
692cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
693cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
694cdf0e10cSrcweir 
695cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
696cdf0e10cSrcweir 		throw ( ::com::sun::star::beans::UnknownPropertyException,
697cdf0e10cSrcweir 				::com::sun::star::lang::WrappedTargetException,
698cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
699cdf0e10cSrcweir 
700cdf0e10cSrcweir 	//____________________________________________________________________________________________________
701cdf0e10cSrcweir 	//	XOptimizedStorage
702cdf0e10cSrcweir 	//____________________________________________________________________________________________________
703cdf0e10cSrcweir     virtual void SAL_CALL insertRawNonEncrStreamElementDirect( const ::rtl::OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream )
704cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
705cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
706cdf0e10cSrcweir 				::com::sun::star::packages::NoRawFormatException,
707cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
708cdf0e10cSrcweir 				::com::sun::star::io::IOException,
709cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
710cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
711cdf0e10cSrcweir 
712cdf0e10cSrcweir     virtual void SAL_CALL insertStreamElementDirect( const ::rtl::OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps )
713cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
714cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
715cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
716cdf0e10cSrcweir 				::com::sun::star::io::IOException,
717cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
718cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
719cdf0e10cSrcweir 
720cdf0e10cSrcweir     virtual void SAL_CALL copyElementDirectlyTo( const ::rtl::OUString& sSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOptimizedStorage >& xTargetStorage, const ::rtl::OUString& sTargetName )
721cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
722cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
723cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
724cdf0e10cSrcweir 				::com::sun::star::container::ElementExistException,
725cdf0e10cSrcweir 				::com::sun::star::io::IOException,
726cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
727cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
728cdf0e10cSrcweir 
729cdf0e10cSrcweir     virtual void SAL_CALL writeAndAttachToStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream )
730cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
731cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
732cdf0e10cSrcweir 				::com::sun::star::io::IOException,
733cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
734cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
735cdf0e10cSrcweir 
736cdf0e10cSrcweir     virtual void SAL_CALL attachToURL( const ::rtl::OUString& sURL, sal_Bool bReadOnly )
737cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
738cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
739cdf0e10cSrcweir 				::com::sun::star::io::IOException,
740cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
741cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
742cdf0e10cSrcweir 
743cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getElementPropertyValue( const ::rtl::OUString& sElementName, const ::rtl::OUString& sPropertyName )
744cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
745cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
746cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
747cdf0e10cSrcweir 				::com::sun::star::io::IOException,
748cdf0e10cSrcweir 				::com::sun::star::beans::UnknownPropertyException,
749cdf0e10cSrcweir 				::com::sun::star::beans::PropertyVetoException,
750cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
751cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
752cdf0e10cSrcweir 
753cdf0e10cSrcweir     virtual void SAL_CALL copyStreamElementData( const ::rtl::OUString& sStreamName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream )
754cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
755cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
756cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
757cdf0e10cSrcweir 				::com::sun::star::io::IOException,
758cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
759cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
760cdf0e10cSrcweir 
761cdf0e10cSrcweir 	//____________________________________________________________________________________________________
762cdf0e10cSrcweir 	// XRelationshipAccess
763cdf0e10cSrcweir 	//____________________________________________________________________________________________________
764cdf0e10cSrcweir 
765cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL hasByID( const ::rtl::OUString& sID )
766cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
767cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
768cdf0e10cSrcweir 
769cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getTargetByID( const ::rtl::OUString& sID )
770cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
771cdf0e10cSrcweir 				::com::sun::star::io::IOException,
772cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
773cdf0e10cSrcweir 
774cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getTypeByID( const ::rtl::OUString& sID )
775cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
776cdf0e10cSrcweir 				::com::sun::star::io::IOException,
777cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
778cdf0e10cSrcweir 
779cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > SAL_CALL getRelationshipByID( const ::rtl::OUString& sID )
780cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
781cdf0e10cSrcweir 				::com::sun::star::io::IOException,
782cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
783cdf0e10cSrcweir 
784cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL getRelationshipsByType( const ::rtl::OUString& sType )
785cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
786cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
787cdf0e10cSrcweir 
788cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL getAllRelationships(  )
789cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
790cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
791cdf0e10cSrcweir 
792cdf0e10cSrcweir     virtual void SAL_CALL insertRelationshipByID( const ::rtl::OUString& sID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aEntry, ::sal_Bool bReplace )
793cdf0e10cSrcweir 		throw ( ::com::sun::star::container::ElementExistException,
794cdf0e10cSrcweir 				::com::sun::star::io::IOException,
795cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
796cdf0e10cSrcweir 
797cdf0e10cSrcweir     virtual void SAL_CALL removeRelationshipByID( const ::rtl::OUString& sID )
798cdf0e10cSrcweir 		throw ( ::com::sun::star::container::NoSuchElementException,
799cdf0e10cSrcweir 				::com::sun::star::io::IOException,
800cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
801cdf0e10cSrcweir 
802cdf0e10cSrcweir     virtual void SAL_CALL insertRelationships( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > >& aEntries, ::sal_Bool bReplace )
803cdf0e10cSrcweir 		throw ( ::com::sun::star::container::ElementExistException,
804cdf0e10cSrcweir 				::com::sun::star::io::IOException,
805cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
806cdf0e10cSrcweir 
807cdf0e10cSrcweir     virtual void SAL_CALL clearRelationships(  )
808cdf0e10cSrcweir 		throw ( ::com::sun::star::io::IOException,
809cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
810cdf0e10cSrcweir 
811cdf0e10cSrcweir 	//____________________________________________________________________________________________________
812cdf0e10cSrcweir 	// XHierarchicalStorageAccess
813cdf0e10cSrcweir 	//____________________________________________________________________________________________________
814cdf0e10cSrcweir 
815cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const ::rtl::OUString& sStreamPath, ::sal_Int32 nOpenMode )
816cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
817cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
818cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
819cdf0e10cSrcweir 				::com::sun::star::io::IOException,
820cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
821cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
822cdf0e10cSrcweir 
823cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamElementByHierarchicalName( const ::rtl::OUString& sStreamName, ::sal_Int32 nOpenMode, const ::rtl::OUString& sPassword )
824cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
825cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
826cdf0e10cSrcweir 				::com::sun::star::packages::NoEncryptionException,
827cdf0e10cSrcweir 				::com::sun::star::packages::WrongPasswordException,
828cdf0e10cSrcweir 				::com::sun::star::io::IOException,
829cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
830cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
831cdf0e10cSrcweir 
832cdf0e10cSrcweir     virtual void SAL_CALL removeStreamElementByHierarchicalName( const ::rtl::OUString& sElementPath )
833cdf0e10cSrcweir 		throw ( ::com::sun::star::embed::InvalidStorageException,
834cdf0e10cSrcweir 				::com::sun::star::lang::IllegalArgumentException,
835cdf0e10cSrcweir 				::com::sun::star::container::NoSuchElementException,
836cdf0e10cSrcweir 				::com::sun::star::io::IOException,
837cdf0e10cSrcweir 				::com::sun::star::embed::StorageWrappedTargetException,
838cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException);
839cdf0e10cSrcweir 
840cdf0e10cSrcweir 	//____________________________________________________________________________________________________
841cdf0e10cSrcweir 	// XHierarchicalStorageAccess2
842cdf0e10cSrcweir 	//____________________________________________________________________________________________________
843cdf0e10cSrcweir 
844cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamByHierarchicalName( const ::rtl::OUString& sStreamName, ::sal_Int32 nOpenMode, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData )
845cdf0e10cSrcweir         throw ( ::com::sun::star::embed::InvalidStorageException,
846cdf0e10cSrcweir                 ::com::sun::star::lang::IllegalArgumentException,
847cdf0e10cSrcweir                 ::com::sun::star::packages::NoEncryptionException,
848cdf0e10cSrcweir                 ::com::sun::star::packages::WrongPasswordException,
849cdf0e10cSrcweir                 ::com::sun::star::io::IOException,
850cdf0e10cSrcweir                 ::com::sun::star::embed::StorageWrappedTargetException,
851cdf0e10cSrcweir                 ::com::sun::star::uno::RuntimeException );
852cdf0e10cSrcweir };
853cdf0e10cSrcweir 
854cdf0e10cSrcweir 
855cdf0e10cSrcweir #endif
856cdf0e10cSrcweir 
857