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 INCLUDED_TDOC_STGELEMS_HXX
21 : : #define INCLUDED_TDOC_STGELEMS_HXX
22 : :
23 : : #include <memory>
24 : :
25 : : #include "osl/mutex.hxx"
26 : : #include "rtl/ref.hxx"
27 : :
28 : : #include "cppuhelper/implbase2.hxx"
29 : : #include "cppuhelper/implbase5.hxx"
30 : :
31 : : #include "com/sun/star/embed/XStorage.hpp"
32 : : #include "com/sun/star/embed/XTransactedObject.hpp"
33 : : #include "com/sun/star/io/XOutputStream.hpp"
34 : : #include "com/sun/star/io/XStream.hpp"
35 : : #include "com/sun/star/io/XTruncate.hpp"
36 : : #include "com/sun/star/lang/XComponent.hpp"
37 : :
38 : : #include "tdoc_storage.hxx"
39 : :
40 : : namespace tdoc_ucp {
41 : :
42 : 190 : struct MutexHolder
43 : : {
44 : : osl::Mutex m_aMutex;
45 : : };
46 : :
47 : : //=======================================================================
48 : :
49 : 95 : class ParentStorageHolder : public MutexHolder
50 : : {
51 : : public:
52 : : ParentStorageHolder(
53 : : const com::sun::star::uno::Reference<
54 : : com::sun::star::embed::XStorage > & xParentStorage,
55 : : const rtl::OUString & rUri );
56 : :
57 : 0 : bool isParentARootStorage() const
58 : 0 : { return m_bParentIsRootStorage; }
59 : : com::sun::star::uno::Reference< com::sun::star::embed::XStorage >
60 : 0 : getParentStorage() const
61 : 0 : { return m_xParentStorage; }
62 : 0 : void setParentStorage( const com::sun::star::uno::Reference<
63 : : com::sun::star::embed::XStorage > & xStg )
64 [ # # ][ # # ]: 0 : { osl::MutexGuard aGuard( m_aMutex ); m_xParentStorage = xStg; }
[ # # ]
65 : :
66 : : private:
67 : : com::sun::star::uno::Reference<
68 : : com::sun::star::embed::XStorage > m_xParentStorage;
69 : : bool m_bParentIsRootStorage;
70 : : };
71 : :
72 : : //=======================================================================
73 : :
74 : : typedef
75 : : cppu::WeakImplHelper2<
76 : : com::sun::star::embed::XStorage,
77 : : com::sun::star::embed::XTransactedObject > StorageUNOBase;
78 : :
79 : : class Storage : public StorageUNOBase, public ParentStorageHolder
80 : : {
81 : : public:
82 : : Storage(
83 : : const com::sun::star::uno::Reference<
84 : : com::sun::star::lang::XMultiServiceFactory > & xSMgr,
85 : : const rtl::Reference< StorageElementFactory > & xFactory,
86 : : const rtl::OUString & rUri,
87 : : const com::sun::star::uno::Reference<
88 : : com::sun::star::embed::XStorage > & xParentStorage,
89 : : const com::sun::star::uno::Reference<
90 : : com::sun::star::embed::XStorage > & xStorageToWrap );
91 : : virtual ~Storage();
92 : :
93 : 95 : bool isDocumentStorage() const { return m_bIsDocumentStorage; }
94 : :
95 : : // XInterface
96 : : virtual com::sun::star::uno::Any SAL_CALL queryInterface(
97 : : const com::sun::star::uno::Type& aType )
98 : : throw ( com::sun::star::uno::RuntimeException );
99 : : virtual void SAL_CALL acquire()
100 : : throw ();
101 : : virtual void SAL_CALL release()
102 : : throw ();
103 : :
104 : : // XTypeProvider (implemnented by base, but needs to be overridden for
105 : : // delegating to aggregate)
106 : : virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
107 : : getTypes()
108 : : throw ( com::sun::star::uno::RuntimeException );
109 : : virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
110 : : getImplementationId()
111 : : throw ( com::sun::star::uno::RuntimeException );
112 : :
113 : : // XComponent ( one of XStorage bases )
114 : : virtual void SAL_CALL
115 : : dispose()
116 : : throw ( com::sun::star::uno::RuntimeException );
117 : : virtual void SAL_CALL
118 : : addEventListener( const com::sun::star::uno::Reference<
119 : : com::sun::star::lang::XEventListener > & xListener )
120 : : throw ( com::sun::star::uno::RuntimeException );
121 : : virtual void SAL_CALL
122 : : removeEventListener( const com::sun::star::uno::Reference<
123 : : com::sun::star::lang::XEventListener >& aListener )
124 : : throw ( com::sun::star::uno::RuntimeException );
125 : :
126 : : // XNameAccess ( one of XStorage bases )
127 : : virtual com::sun::star::uno::Any SAL_CALL
128 : : getByName( const rtl::OUString& aName )
129 : : throw ( com::sun::star::container::NoSuchElementException,
130 : : com::sun::star::lang::WrappedTargetException,
131 : : com::sun::star::uno::RuntimeException );
132 : : virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
133 : : getElementNames()
134 : : throw ( com::sun::star::uno::RuntimeException );
135 : : virtual sal_Bool SAL_CALL
136 : : hasByName( const rtl::OUString& aName )
137 : : throw ( com::sun::star::uno::RuntimeException );
138 : :
139 : : // XElementAccess (base of XNameAccess)
140 : : virtual com::sun::star::uno::Type SAL_CALL
141 : : getElementType()
142 : : throw ( com::sun::star::uno::RuntimeException );
143 : : virtual sal_Bool SAL_CALL
144 : : hasElements()
145 : : throw ( com::sun::star::uno::RuntimeException );
146 : :
147 : : // XStorage
148 : : virtual void SAL_CALL
149 : : copyToStorage( const com::sun::star::uno::Reference<
150 : : com::sun::star::embed::XStorage >& xDest )
151 : : throw ( com::sun::star::embed::InvalidStorageException,
152 : : com::sun::star::lang::IllegalArgumentException,
153 : : com::sun::star::io::IOException,
154 : : com::sun::star::embed::StorageWrappedTargetException,
155 : : com::sun::star::uno::RuntimeException );
156 : : virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL
157 : : openStreamElement( const ::rtl::OUString& aStreamName,
158 : : sal_Int32 nOpenMode )
159 : : throw ( com::sun::star::embed::InvalidStorageException,
160 : : com::sun::star::lang::IllegalArgumentException,
161 : : com::sun::star::packages::WrongPasswordException,
162 : : com::sun::star::io::IOException,
163 : : com::sun::star::embed::StorageWrappedTargetException,
164 : : com::sun::star::uno::RuntimeException );
165 : : virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL
166 : : openEncryptedStreamElement( const ::rtl::OUString& aStreamName,
167 : : sal_Int32 nOpenMode,
168 : : const ::rtl::OUString& aPassword )
169 : : throw ( com::sun::star::embed::InvalidStorageException,
170 : : com::sun::star::lang::IllegalArgumentException,
171 : : com::sun::star::packages::NoEncryptionException,
172 : : com::sun::star::packages::WrongPasswordException,
173 : : com::sun::star::io::IOException,
174 : : com::sun::star::embed::StorageWrappedTargetException,
175 : : com::sun::star::uno::RuntimeException );
176 : : virtual com::sun::star::uno::Reference< com::sun::star::embed::XStorage > SAL_CALL
177 : : openStorageElement( const ::rtl::OUString& aStorName,
178 : : sal_Int32 nOpenMode )
179 : : throw ( com::sun::star::embed::InvalidStorageException,
180 : : com::sun::star::lang::IllegalArgumentException,
181 : : com::sun::star::io::IOException,
182 : : com::sun::star::embed::StorageWrappedTargetException,
183 : : com::sun::star::uno::RuntimeException );
184 : : virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL
185 : : cloneStreamElement( const ::rtl::OUString& aStreamName )
186 : : throw ( com::sun::star::embed::InvalidStorageException,
187 : : com::sun::star::lang::IllegalArgumentException,
188 : : com::sun::star::packages::WrongPasswordException,
189 : : com::sun::star::io::IOException,
190 : : com::sun::star::embed::StorageWrappedTargetException,
191 : : com::sun::star::uno::RuntimeException );
192 : : virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL
193 : : cloneEncryptedStreamElement( const ::rtl::OUString& aStreamName,
194 : : const ::rtl::OUString& aPassword )
195 : : throw ( com::sun::star::embed::InvalidStorageException,
196 : : com::sun::star::lang::IllegalArgumentException,
197 : : com::sun::star::packages::NoEncryptionException,
198 : : com::sun::star::packages::WrongPasswordException,
199 : : com::sun::star::io::IOException,
200 : : com::sun::star::embed::StorageWrappedTargetException,
201 : : com::sun::star::uno::RuntimeException );
202 : : virtual void SAL_CALL
203 : : copyLastCommitTo( const com::sun::star::uno::Reference<
204 : : com::sun::star::embed::XStorage >& xTargetStorage )
205 : : throw ( com::sun::star::embed::InvalidStorageException,
206 : : com::sun::star::lang::IllegalArgumentException,
207 : : com::sun::star::io::IOException,
208 : : com::sun::star::embed::StorageWrappedTargetException,
209 : : com::sun::star::uno::RuntimeException );
210 : : virtual void SAL_CALL
211 : : copyStorageElementLastCommitTo( const ::rtl::OUString& aStorName,
212 : : const com::sun::star::uno::Reference<
213 : : com::sun::star::embed::XStorage > &
214 : : xTargetStorage )
215 : : throw ( com::sun::star::embed::InvalidStorageException,
216 : : com::sun::star::lang::IllegalArgumentException,
217 : : com::sun::star::io::IOException,
218 : : com::sun::star::embed::StorageWrappedTargetException,
219 : : com::sun::star::uno::RuntimeException );
220 : : virtual sal_Bool SAL_CALL
221 : : isStreamElement( const ::rtl::OUString& aElementName )
222 : : throw ( com::sun::star::container::NoSuchElementException,
223 : : com::sun::star::lang::IllegalArgumentException,
224 : : com::sun::star::embed::InvalidStorageException,
225 : : com::sun::star::uno::RuntimeException );
226 : : virtual sal_Bool SAL_CALL
227 : : isStorageElement( const ::rtl::OUString& aElementName )
228 : : throw ( com::sun::star::container::NoSuchElementException,
229 : : com::sun::star::lang::IllegalArgumentException,
230 : : com::sun::star::embed::InvalidStorageException,
231 : : com::sun::star::uno::RuntimeException );
232 : : virtual void SAL_CALL
233 : : removeElement( const ::rtl::OUString& aElementName )
234 : : throw ( com::sun::star::embed::InvalidStorageException,
235 : : com::sun::star::lang::IllegalArgumentException,
236 : : com::sun::star::container::NoSuchElementException,
237 : : com::sun::star::io::IOException,
238 : : com::sun::star::embed::StorageWrappedTargetException,
239 : : com::sun::star::uno::RuntimeException );
240 : : virtual void SAL_CALL
241 : : renameElement( const ::rtl::OUString& aEleName,
242 : : const ::rtl::OUString& aNewName )
243 : : throw ( com::sun::star::embed::InvalidStorageException,
244 : : com::sun::star::lang::IllegalArgumentException,
245 : : com::sun::star::container::NoSuchElementException,
246 : : com::sun::star::container::ElementExistException,
247 : : com::sun::star::io::IOException,
248 : : com::sun::star::embed::StorageWrappedTargetException,
249 : : com::sun::star::uno::RuntimeException );
250 : : virtual void SAL_CALL
251 : : copyElementTo( const ::rtl::OUString& aElementName,
252 : : const com::sun::star::uno::Reference<
253 : : com::sun::star::embed::XStorage >& xDest,
254 : : const ::rtl::OUString& aNewName )
255 : : throw ( com::sun::star::embed::InvalidStorageException,
256 : : com::sun::star::lang::IllegalArgumentException,
257 : : com::sun::star::container::NoSuchElementException,
258 : : com::sun::star::container::ElementExistException,
259 : : com::sun::star::io::IOException,
260 : : com::sun::star::embed::StorageWrappedTargetException,
261 : : com::sun::star::uno::RuntimeException );
262 : : virtual void SAL_CALL
263 : : moveElementTo( const ::rtl::OUString& aElementName,
264 : : const com::sun::star::uno::Reference<
265 : : com::sun::star::embed::XStorage >& xDest,
266 : : const ::rtl::OUString& rNewName )
267 : : throw ( com::sun::star::embed::InvalidStorageException,
268 : : com::sun::star::lang::IllegalArgumentException,
269 : : com::sun::star::container::NoSuchElementException,
270 : : com::sun::star::container::ElementExistException,
271 : : com::sun::star::io::IOException,
272 : : com::sun::star::embed::StorageWrappedTargetException,
273 : : com::sun::star::uno::RuntimeException );
274 : :
275 : : // XTransactedObject
276 : : virtual void SAL_CALL commit()
277 : : throw ( com::sun::star::io::IOException,
278 : : com::sun::star::lang::WrappedTargetException,
279 : : com::sun::star::uno::RuntimeException );
280 : : virtual void SAL_CALL revert()
281 : : throw ( com::sun::star::io::IOException,
282 : : com::sun::star::lang::WrappedTargetException,
283 : : com::sun::star::uno::RuntimeException );
284 : :
285 : : private:
286 : : Storage( const rtl::Reference< Storage > & rFactory ); // n.i.
287 : :
288 : : rtl::Reference< StorageElementFactory > m_xFactory;
289 : : com::sun::star::uno::Reference<
290 : : com::sun::star::uno::XAggregation > m_xAggProxy;
291 : : com::sun::star::uno::Reference<
292 : : com::sun::star::embed::XStorage > m_xWrappedStorage;
293 : : com::sun::star::uno::Reference<
294 : : com::sun::star::embed::XTransactedObject > m_xWrappedTransObj;
295 : : com::sun::star::uno::Reference<
296 : : com::sun::star::lang::XComponent > m_xWrappedComponent;
297 : : com::sun::star::uno::Reference<
298 : : com::sun::star::lang::XTypeProvider > m_xWrappedTypeProv;
299 : : bool m_bIsDocumentStorage;
300 : :
301 : : StorageElementFactory::StorageMap::iterator m_aContainerIt;
302 : :
303 : : friend class StorageElementFactory;
304 : : friend class std::auto_ptr< Storage >;
305 : : };
306 : :
307 : : //=======================================================================
308 : :
309 : : typedef
310 : : cppu::WeakImplHelper2<
311 : : com::sun::star::io::XOutputStream,
312 : : com::sun::star::lang::XComponent > OutputStreamUNOBase;
313 : :
314 : : class OutputStream : public OutputStreamUNOBase, public ParentStorageHolder
315 : : {
316 : : public:
317 : : OutputStream(
318 : : const com::sun::star::uno::Reference<
319 : : com::sun::star::lang::XMultiServiceFactory > & xSMgr,
320 : : const rtl::OUString & rUri,
321 : : const com::sun::star::uno::Reference<
322 : : com::sun::star::embed::XStorage > & xParentStorage,
323 : : const com::sun::star::uno::Reference<
324 : : com::sun::star::io::XOutputStream > & xStreamToWrap );
325 : : virtual ~OutputStream();
326 : :
327 : : // XInterface
328 : : virtual com::sun::star::uno::Any SAL_CALL
329 : : queryInterface( const com::sun::star::uno::Type& aType )
330 : : throw ( com::sun::star::uno::RuntimeException );
331 : :
332 : : // XTypeProvider (implemnented by base, but needs to be overridden for
333 : : // delegating to aggregate)
334 : : virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
335 : : getTypes()
336 : : throw ( com::sun::star::uno::RuntimeException );
337 : : virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
338 : : getImplementationId()
339 : : throw ( com::sun::star::uno::RuntimeException );
340 : :
341 : : // XOutputStream
342 : : virtual void SAL_CALL
343 : : writeBytes( const com::sun::star::uno::Sequence< sal_Int8 >& aData )
344 : : throw ( com::sun::star::io::NotConnectedException,
345 : : com::sun::star::io::BufferSizeExceededException,
346 : : com::sun::star::io::IOException,
347 : : com::sun::star::uno::RuntimeException );
348 : : virtual void SAL_CALL
349 : : flush( )
350 : : throw ( com::sun::star::io::NotConnectedException,
351 : : com::sun::star::io::BufferSizeExceededException,
352 : : com::sun::star::io::IOException,
353 : : com::sun::star::uno::RuntimeException );
354 : : // Note: We need to intercept this one.
355 : : virtual void SAL_CALL
356 : : closeOutput( )
357 : : throw ( com::sun::star::io::NotConnectedException,
358 : : com::sun::star::io::BufferSizeExceededException,
359 : : com::sun::star::io::IOException,
360 : : com::sun::star::uno::RuntimeException );
361 : :
362 : : // XComponent
363 : : // Note: We need to intercept this one.
364 : : virtual void SAL_CALL
365 : : dispose()
366 : : throw ( com::sun::star::uno::RuntimeException );
367 : : virtual void SAL_CALL
368 : : addEventListener( const com::sun::star::uno::Reference<
369 : : com::sun::star::lang::XEventListener >& xListener )
370 : : throw ( com::sun::star::uno::RuntimeException );
371 : : virtual void SAL_CALL
372 : : removeEventListener( const com::sun::star::uno::Reference<
373 : : com::sun::star::lang::XEventListener >& aListener )
374 : : throw ( com::sun::star::uno::RuntimeException );
375 : :
376 : : private:
377 : : com::sun::star::uno::Reference<
378 : : com::sun::star::uno::XAggregation > m_xAggProxy;
379 : : com::sun::star::uno::Reference<
380 : : com::sun::star::io::XOutputStream > m_xWrappedStream;
381 : : com::sun::star::uno::Reference<
382 : : com::sun::star::lang::XComponent > m_xWrappedComponent;
383 : : com::sun::star::uno::Reference<
384 : : com::sun::star::lang::XTypeProvider > m_xWrappedTypeProv;
385 : : };
386 : :
387 : : //=======================================================================
388 : :
389 : : typedef cppu::WeakImplHelper5< com::sun::star::io::XStream,
390 : : com::sun::star::io::XOutputStream,
391 : : com::sun::star::io::XTruncate,
392 : : com::sun::star::io::XInputStream,
393 : : com::sun::star::lang::XComponent >
394 : : StreamUNOBase;
395 : :
396 : : class Stream : public StreamUNOBase, public ParentStorageHolder
397 : : {
398 : : public:
399 : : Stream(
400 : : const com::sun::star::uno::Reference<
401 : : com::sun::star::lang::XMultiServiceFactory > & xSMgr,
402 : : const rtl::OUString & rUri,
403 : : const com::sun::star::uno::Reference<
404 : : com::sun::star::embed::XStorage > & xParentStorage,
405 : : const com::sun::star::uno::Reference<
406 : : com::sun::star::io::XStream > & xStreamToWrap );
407 : :
408 : : virtual ~Stream();
409 : :
410 : : // XInterface
411 : : virtual com::sun::star::uno::Any SAL_CALL
412 : : queryInterface( const com::sun::star::uno::Type& aType )
413 : : throw ( com::sun::star::uno::RuntimeException );
414 : :
415 : : // XTypeProvider (implemnented by base, but needs to be overridden for
416 : : // delegating to aggregate)
417 : : virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
418 : : getTypes()
419 : : throw ( com::sun::star::uno::RuntimeException );
420 : : virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
421 : : getImplementationId()
422 : : throw ( com::sun::star::uno::RuntimeException );
423 : :
424 : : // XStream
425 : : virtual com::sun::star::uno::Reference<
426 : : com::sun::star::io::XInputStream > SAL_CALL
427 : : getInputStream()
428 : : throw( com::sun::star::uno::RuntimeException );
429 : :
430 : : virtual com::sun::star::uno::Reference<
431 : : com::sun::star::io::XOutputStream > SAL_CALL
432 : : getOutputStream()
433 : : throw( com::sun::star::uno::RuntimeException );
434 : :
435 : : // XOutputStream
436 : : virtual void SAL_CALL
437 : : writeBytes( const com::sun::star::uno::Sequence< sal_Int8 >& aData )
438 : : throw( com::sun::star::io::NotConnectedException,
439 : : com::sun::star::io::BufferSizeExceededException,
440 : : com::sun::star::io::IOException,
441 : : com::sun::star::uno::RuntimeException );
442 : :
443 : : virtual void SAL_CALL
444 : : flush()
445 : : throw( com::sun::star::io::NotConnectedException,
446 : : com::sun::star::io::BufferSizeExceededException,
447 : : com::sun::star::io::IOException,
448 : : com::sun::star::uno::RuntimeException );
449 : :
450 : : virtual void SAL_CALL
451 : : closeOutput()
452 : : throw( com::sun::star::io::NotConnectedException,
453 : : com::sun::star::io::IOException,
454 : : com::sun::star::uno::RuntimeException );
455 : :
456 : : // XTruncate
457 : : virtual void SAL_CALL
458 : : truncate()
459 : : throw( com::sun::star::io::IOException,
460 : : com::sun::star::uno::RuntimeException );
461 : :
462 : : // XInputStream
463 : : virtual sal_Int32 SAL_CALL
464 : : readBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData,
465 : : sal_Int32 nBytesToRead )
466 : : throw( com::sun::star::io::NotConnectedException,
467 : : com::sun::star::io::BufferSizeExceededException,
468 : : com::sun::star::io::IOException,
469 : : com::sun::star::uno::RuntimeException );
470 : :
471 : : virtual sal_Int32 SAL_CALL
472 : : readSomeBytes( com::sun::star::uno::Sequence< sal_Int8 >& aData,
473 : : sal_Int32 nMaxBytesToRead )
474 : : throw( com::sun::star::io::NotConnectedException,
475 : : com::sun::star::io::BufferSizeExceededException,
476 : : com::sun::star::io::IOException,
477 : : com::sun::star::uno::RuntimeException);
478 : :
479 : : virtual void SAL_CALL
480 : : skipBytes( sal_Int32 nBytesToSkip )
481 : : throw( com::sun::star::io::NotConnectedException,
482 : : com::sun::star::io::BufferSizeExceededException,
483 : : com::sun::star::io::IOException,
484 : : com::sun::star::uno::RuntimeException );
485 : :
486 : : virtual sal_Int32 SAL_CALL
487 : : available()
488 : : throw( com::sun::star::io::NotConnectedException,
489 : : com::sun::star::io::IOException,
490 : : com::sun::star::uno::RuntimeException );
491 : :
492 : : virtual void SAL_CALL
493 : : closeInput()
494 : : throw( com::sun::star::io::NotConnectedException,
495 : : com::sun::star::io::IOException,
496 : : com::sun::star::uno::RuntimeException );
497 : :
498 : : // XComponent
499 : : // Note: We need to intercept this one.
500 : : virtual void SAL_CALL
501 : : dispose()
502 : : throw ( com::sun::star::uno::RuntimeException );
503 : : virtual void SAL_CALL
504 : : addEventListener( const com::sun::star::uno::Reference<
505 : : com::sun::star::lang::XEventListener >& xListener )
506 : : throw ( com::sun::star::uno::RuntimeException );
507 : : virtual void SAL_CALL
508 : : removeEventListener( const com::sun::star::uno::Reference<
509 : : com::sun::star::lang::XEventListener >& aListener )
510 : : throw ( com::sun::star::uno::RuntimeException );
511 : :
512 : : private:
513 : : void commitChanges()
514 : : throw( com::sun::star::io::IOException );
515 : :
516 : : com::sun::star::uno::Reference<
517 : : com::sun::star::uno::XAggregation > m_xAggProxy;
518 : : com::sun::star::uno::Reference<
519 : : com::sun::star::io::XStream > m_xWrappedStream;
520 : : com::sun::star::uno::Reference<
521 : : com::sun::star::io::XOutputStream > m_xWrappedOutputStream;
522 : : com::sun::star::uno::Reference<
523 : : com::sun::star::io::XTruncate > m_xWrappedTruncate;
524 : : com::sun::star::uno::Reference<
525 : : com::sun::star::io::XInputStream > m_xWrappedInputStream;
526 : : com::sun::star::uno::Reference<
527 : : com::sun::star::lang::XComponent > m_xWrappedComponent;
528 : : com::sun::star::uno::Reference<
529 : : com::sun::star::lang::XTypeProvider > m_xWrappedTypeProv;
530 : : };
531 : :
532 : : } // namespace tdoc_ucp
533 : :
534 : : #endif /* !INCLUDED_TDOC_STGELEMS_HXX */
535 : :
536 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|