Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef _WRITESTREAM_HXX_
21 : : #define _WRITESTREAM_HXX_
22 : :
23 : : #include <com/sun/star/io/XInputStream.hpp>
24 : : #include <com/sun/star/io/XOutputStream.hpp>
25 : : #include <com/sun/star/io/XStream.hpp>
26 : : #include <com/sun/star/io/XSeekable.hpp>
27 : : #include <com/sun/star/io/XTruncate.hpp>
28 : : #include <com/sun/star/packages/XDataSinkEncrSupport.hpp>
29 : : #include <com/sun/star/packages/NoEncryptionException.hpp>
30 : : #include <com/sun/star/lang/XEventListener.hpp>
31 : : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
32 : : #include <com/sun/star/lang/XComponent.hpp>
33 : : #include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
34 : : #include <com/sun/star/embed/XStorage.hpp>
35 : : #include <com/sun/star/embed/XRelationshipAccess.hpp>
36 : : #include <com/sun/star/embed/XExtendedStorageStream.hpp>
37 : : #include <com/sun/star/embed/XTransactedObject.hpp>
38 : : #include <com/sun/star/embed/XTransactionBroadcaster.hpp>
39 : : #include <com/sun/star/container/XNameContainer.hpp>
40 : : #include <com/sun/star/beans/StringPair.hpp>
41 : : #include <com/sun/star/logging/XSimpleLogRing.hpp>
42 : :
43 : :
44 : : #include <cppuhelper/implbase1.hxx>
45 : : #include <cppuhelper/weak.hxx>
46 : : #include <cppuhelper/interfacecontainer.h>
47 : :
48 : : #include <comphelper/sequenceashashmap.hxx>
49 : :
50 : : #include <list>
51 : :
52 : : #include "ocompinstream.hxx"
53 : : #include "mutexholder.hxx"
54 : :
55 : :
56 : 7969 : struct PreCreationStruct
57 : : {
58 : : SotMutexHolderRef m_rMutexRef;
59 : :
60 : 8324 : PreCreationStruct()
61 [ + - ]: 8324 : : m_rMutexRef( new SotMutexHolder )
62 : 8324 : {}
63 : :
64 : : };
65 : :
66 : : namespace cppu {
67 : : class OTypeCollection;
68 : : }
69 : :
70 : : namespace package {
71 : : void StaticAddLog( const ::rtl::OUString& aMessage );
72 : : bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 );
73 : : }
74 : :
75 [ + - ]: 4556 : struct WSInternalData_Impl
76 : : {
77 : : SotMutexHolderRef m_rSharedMutexRef;
78 : : ::cppu::OTypeCollection* m_pTypeCollection;
79 : : ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners
80 : : sal_Int32 m_nStorageType;
81 : :
82 : : // the mutex reference MUST NOT be empty
83 : 4556 : WSInternalData_Impl( const SotMutexHolderRef rMutexRef, sal_Int32 nStorageType )
84 : : : m_rSharedMutexRef( rMutexRef )
85 : : , m_pTypeCollection( NULL )
86 : 4556 : , m_aListenersContainer( rMutexRef->GetMutex() )
87 [ + - ]: 9112 : , m_nStorageType( nStorageType )
88 : 4556 : {}
89 : : };
90 : :
91 : : typedef ::std::list< OInputCompStream* > InputStreamsList_Impl;
92 : :
93 : : struct OStorage_Impl;
94 : : class OWriteStream;
95 : :
96 : : struct OWriteStream_Impl : public PreCreationStruct
97 : : {
98 : : friend struct OStorage_Impl;
99 : : friend class OWriteStream;
100 : : friend class OInputCompStream;
101 : :
102 : : OWriteStream* m_pAntiImpl;
103 : : ::rtl::OUString m_aTempURL;
104 : :
105 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xCacheStream;
106 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xCacheSeek;
107 : :
108 : : InputStreamsList_Impl m_aInputStreamsList;
109 : :
110 : : sal_Bool m_bHasDataToFlush; // only modified elements will be sent to the original content
111 : : sal_Bool m_bFlushed; // sending the streams is coordinated by the root storage of the package
112 : :
113 : : ::com::sun::star::uno::Reference< ::com::sun::star::packages::XDataSinkEncrSupport > m_xPackageStream;
114 : : ::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
115 : :
116 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
117 : :
118 : : OStorage_Impl* m_pParent;
119 : :
120 : : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aProps;
121 : :
122 : : sal_Bool m_bForceEncrypted;
123 : :
124 : : sal_Bool m_bUseCommonEncryption;
125 : : sal_Bool m_bHasCachedEncryptionData;
126 : : ::comphelper::SequenceAsHashMap m_aEncryptionData;
127 : :
128 : : sal_Bool m_bCompressedSetExplicit;
129 : :
130 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > m_xPackage;
131 : :
132 : : sal_Bool m_bHasInsertedStreamOptimization;
133 : :
134 : : sal_Int32 m_nStorageType;
135 : :
136 : : // Relations info related data, stored in *.rels file in OFOPXML format
137 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xOrigRelInfoStream;
138 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aOrigRelInfo;
139 : : sal_Bool m_bOrigRelInfoBroken;
140 : :
141 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aNewRelInfo;
142 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream;
143 : : sal_Int16 m_nRelInfoStatus;
144 : : sal_Int32 m_nRelId;
145 : :
146 : :
147 : : private:
148 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory();
149 : :
150 : : ::rtl::OUString GetFilledTempFileIfNo( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream );
151 : : ::rtl::OUString FillTempGetFileName();
152 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetTempFileAsStream();
153 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetTempFileAsInputStream();
154 : :
155 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream_Impl( sal_Int32 nStreamMode,
156 : : sal_Bool bHierarchyAccess );
157 : :
158 : : ::comphelper::SequenceAsHashMap GetCommonRootEncryptionData() throw ( ::com::sun::star::packages::NoEncryptionException );
159 : :
160 : : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > ReadPackageStreamProperties();
161 : : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > InsertOwnProps(
162 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps,
163 : : sal_Bool bUseCommonEncryption );
164 : :
165 : : public:
166 : : OWriteStream_Impl(
167 : : OStorage_Impl* pParent,
168 : : const ::com::sun::star::uno::Reference< ::com::sun::star::packages::XDataSinkEncrSupport >& xPackageStream,
169 : : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >& xPackage,
170 : : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
171 : : sal_Bool bForceEncrypted,
172 : : sal_Int32 nStorageType,
173 : : sal_Bool bDefaultCompress,
174 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xRelInfoStream =
175 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >() );
176 : :
177 : : ~OWriteStream_Impl();
178 : :
179 : : void CleanCacheStream();
180 : :
181 : : void AddLog( const ::rtl::OUString& aMessage );
182 : :
183 : 0 : sal_Bool UsesCommonEncryption_Impl() { return m_bUseCommonEncryption; }
184 : 0 : sal_Bool HasTempFile_Impl() const { return ( m_aTempURL.getLength() != 0 ); }
185 : : sal_Bool IsTransacted();
186 : :
187 : 0 : sal_Bool HasWriteOwner_Impl() const { return ( m_pAntiImpl != NULL ); }
188 : :
189 : : void InsertIntoPackageFolder(
190 : : const ::rtl::OUString& aName,
191 : : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xParentPackageFolder );
192 : :
193 : 0 : void SetToBeCommited() { m_bFlushed = sal_True; }
194 : :
195 : 0 : sal_Bool HasCachedEncryptionData() { return m_bHasCachedEncryptionData; }
196 : 0 : ::comphelper::SequenceAsHashMap& GetCachedEncryptionData() { return m_aEncryptionData; }
197 : :
198 [ # # ][ # # ]: 0 : sal_Bool IsModified() { return m_bHasDataToFlush || m_bFlushed; }
199 : :
200 : : sal_Bool IsEncrypted();
201 : : void SetDecrypted();
202 : : void SetEncrypted( const ::comphelper::SequenceAsHashMap& aEncryptionData );
203 : :
204 : : void DisposeWrappers();
205 : :
206 : : void InsertStreamDirectly(
207 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream,
208 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps );
209 : :
210 : : void Commit();
211 : : void Revert();
212 : :
213 : : void Free( sal_Bool bMust ); // allows to try to disconnect from the temporary stream
214 : : // in case bMust is set to sal_True the method
215 : : // will throw exception in case the file is still busy
216 : :
217 : : void SetModified(); // can be done only by parent storage after renaming
218 : :
219 : : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetStreamProperties();
220 : :
221 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > GetAllRelationshipsIfAny();
222 : :
223 : : void CopyInternallyTo_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xDestStream,
224 : : const ::comphelper::SequenceAsHashMap& aEncryptionData );
225 : : void CopyInternallyTo_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xDestStream );
226 : :
227 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream(
228 : : sal_Int32 nStreamMode,
229 : : const ::comphelper::SequenceAsHashMap& aEncryptionData,
230 : : sal_Bool bHierarchyAccess );
231 : :
232 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream(
233 : : sal_Int32 nStreamMode,
234 : : sal_Bool bHierarchyAccess );
235 : :
236 : :
237 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRawInStream();
238 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetPlainRawInStream();
239 : :
240 : : void InputStreamDisposed( OInputCompStream* pStream );
241 : :
242 : : void CreateReadonlyCopyBasedOnData(
243 : : const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xDataToCopy,
244 : : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps,
245 : : sal_Bool bUseCommonEncryption,
246 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream );
247 : :
248 : : void GetCopyOfLastCommit( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream );
249 : : void GetCopyOfLastCommit(
250 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream,
251 : : const ::comphelper::SequenceAsHashMap& aEncryptionData );
252 : :
253 : :
254 : : void CommitStreamRelInfo(
255 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xRelStorage,
256 : : const ::rtl::OUString& aOrigStreamName,
257 : : const ::rtl::OUString& aNewStreamName );
258 : :
259 : : void ReadRelInfoIfNecessary();
260 : :
261 : 174 : sal_Int32 GetNewRelId() { return m_nRelId ++; }
262 : : };
263 : :
264 : : class OWriteStream : ::com::sun::star::lang::XTypeProvider
265 : : , public ::com::sun::star::io::XInputStream
266 : : , public ::com::sun::star::io::XOutputStream
267 : : , public ::com::sun::star::embed::XExtendedStorageStream
268 : : , public ::com::sun::star::io::XSeekable
269 : : , public ::com::sun::star::io::XTruncate
270 : : , public ::com::sun::star::embed::XEncryptionProtectedSource2
271 : : , public ::com::sun::star::embed::XRelationshipAccess
272 : : , public ::com::sun::star::embed::XTransactedObject
273 : : , public ::com::sun::star::embed::XTransactionBroadcaster
274 : : , public ::com::sun::star::beans::XPropertySet
275 : : , public ::cppu::OWeakObject
276 : : {
277 : : friend struct OWriteStream_Impl;
278 : :
279 : : protected:
280 : : ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xInStream;
281 : : ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > m_xOutStream;
282 : : ::com::sun::star::uno::Reference < ::com::sun::star::io::XSeekable > m_xSeekable;
283 : :
284 : : OWriteStream_Impl* m_pImpl;
285 : : WSInternalData_Impl* m_pData;
286 : :
287 : : sal_Bool m_bInStreamDisconnected;
288 : : sal_Bool m_bInitOnDemand;
289 : : sal_Int64 m_nInitPosition;
290 : :
291 : : sal_Bool m_bTransacted;
292 : :
293 : : OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted );
294 : : OWriteStream( OWriteStream_Impl* pImpl, ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, sal_Bool bTransacted );
295 : :
296 : : void CloseOutput_Impl();
297 : :
298 : : void CopyToStreamInternally_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
299 : :
300 : : void ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aGuard );
301 : :
302 : : void BroadcastTransaction( sal_Int8 nMessage );
303 : :
304 : : public:
305 : :
306 : : virtual ~OWriteStream();
307 : :
308 : : void CheckInitOnDemand();
309 : : void DeInit();
310 : :
311 : : // XInterface
312 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
313 : : throw( ::com::sun::star::uno::RuntimeException );
314 : : virtual void SAL_CALL acquire() throw();
315 : : virtual void SAL_CALL release() throw();
316 : :
317 : : // XTypeProvider
318 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
319 : : throw( ::com::sun::star::uno::RuntimeException );
320 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
321 : : throw( ::com::sun::star::uno::RuntimeException );
322 : :
323 : : // XInputStream
324 : : virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
325 : : throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
326 : : virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
327 : : virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip )
328 : : throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
329 : : virtual sal_Int32 SAL_CALL available( )
330 : : throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
331 : : virtual void SAL_CALL closeInput( )
332 : : throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
333 : :
334 : : // XOutputStream
335 : : virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& aData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
336 : : virtual void SAL_CALL flush( ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
337 : : virtual void SAL_CALL closeOutput( ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
338 : :
339 : : //XSeekable
340 : : virtual void SAL_CALL seek( sal_Int64 location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
341 : : virtual sal_Int64 SAL_CALL getPosition() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
342 : : virtual sal_Int64 SAL_CALL getLength() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
343 : :
344 : : //XStream
345 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( ) throw (::com::sun::star::uno::RuntimeException);
346 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL getOutputStream( ) throw (::com::sun::star::uno::RuntimeException);
347 : :
348 : : // XTruncate
349 : : virtual void SAL_CALL truncate() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
350 : :
351 : : //XComponent
352 : : virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
353 : : virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
354 : : virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
355 : :
356 : : //XEncryptionProtectedSource
357 : : virtual void SAL_CALL setEncryptionPassword( const ::rtl::OUString& aPass )
358 : : throw ( ::com::sun::star::uno::RuntimeException,
359 : : ::com::sun::star::io::IOException );
360 : : virtual void SAL_CALL removeEncryption()
361 : : throw ( ::com::sun::star::uno::RuntimeException,
362 : : ::com::sun::star::io::IOException );
363 : :
364 : : //XEncryptionProtectedSource2
365 : : virtual void SAL_CALL setEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
366 : : virtual sal_Bool SAL_CALL hasEncryptionData() throw (::com::sun::star::uno::RuntimeException);
367 : :
368 : : //XRelationshipAccess
369 : : virtual ::sal_Bool SAL_CALL hasByID( const ::rtl::OUString& sID ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
370 : : virtual ::rtl::OUString SAL_CALL getTargetByID( const ::rtl::OUString& sID ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
371 : : virtual ::rtl::OUString SAL_CALL getTypeByID( const ::rtl::OUString& sID ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
372 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > SAL_CALL getRelationshipByID( const ::rtl::OUString& sID ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
373 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL getRelationshipsByType( const ::rtl::OUString& sType ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
374 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > SAL_CALL getAllRelationships( ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
375 : : virtual void SAL_CALL insertRelationshipByID( const ::rtl::OUString& sID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aEntry, ::sal_Bool bReplace ) throw (::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
376 : : virtual void SAL_CALL removeRelationshipByID( const ::rtl::OUString& sID ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
377 : : 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 ) throw (::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
378 : : virtual void SAL_CALL clearRelationships( ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
379 : :
380 : : //XPropertySet
381 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw ( ::com::sun::star::uno::RuntimeException );
382 : : virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
383 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
384 : : virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
385 : : virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
386 : : virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
387 : : virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
388 : :
389 : : // XTransactedObject
390 : : virtual void SAL_CALL commit()
391 : : throw ( ::com::sun::star::io::IOException,
392 : : ::com::sun::star::embed::StorageWrappedTargetException,
393 : : ::com::sun::star::uno::RuntimeException );
394 : : virtual void SAL_CALL revert()
395 : : throw ( ::com::sun::star::io::IOException,
396 : : ::com::sun::star::embed::StorageWrappedTargetException,
397 : : ::com::sun::star::uno::RuntimeException );
398 : :
399 : : // XTransactionBroadcaster
400 : : virtual void SAL_CALL addTransactionListener(
401 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
402 : : throw ( ::com::sun::star::uno::RuntimeException );
403 : : virtual void SAL_CALL removeTransactionListener(
404 : : const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XTransactionListener >& aListener )
405 : : throw ( ::com::sun::star::uno::RuntimeException );
406 : :
407 : : };
408 : :
409 : : #endif
410 : :
411 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|