/src/libreoffice/package/source/xstor/xstorage.hxx
Line | Count | Source |
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_PACKAGE_SOURCE_XSTOR_XSTORAGE_HXX |
21 | | #define INCLUDED_PACKAGE_SOURCE_XSTOR_XSTORAGE_HXX |
22 | | |
23 | | #include <com/sun/star/uno/Sequence.hxx> |
24 | | #include <com/sun/star/embed/XStorage2.hpp> |
25 | | #include <com/sun/star/embed/XOptimizedStorage.hpp> |
26 | | #include <com/sun/star/embed/XHierarchicalStorageAccess2.hpp> |
27 | | #include <com/sun/star/embed/XStorageRawAccess.hpp> |
28 | | #include <com/sun/star/embed/XTransactedObject.hpp> |
29 | | #include <com/sun/star/embed/XTransactionBroadcaster.hpp> |
30 | | #include <com/sun/star/embed/XEncryptionProtectedStorage.hpp> |
31 | | #include <com/sun/star/embed/XRelationshipAccess.hpp> |
32 | | #include <com/sun/star/util/XModifiable.hpp> |
33 | | #include <com/sun/star/container/XNameContainer.hpp> |
34 | | #include <com/sun/star/beans/XPropertySet.hpp> |
35 | | #include <com/sun/star/beans/PropertyValue.hpp> |
36 | | #include <com/sun/star/beans/StringPair.hpp> |
37 | | #include <com/sun/star/io/XStream.hpp> |
38 | | #include <com/sun/star/lang/XSingleServiceFactory.hpp> |
39 | | #include <com/sun/star/lang/XTypeProvider.hpp> |
40 | | #include <com/sun/star/lang/XComponent.hpp> |
41 | | |
42 | | #include <cppuhelper/typeprovider.hxx> |
43 | | #include <cppuhelper/weak.hxx> |
44 | | #include <cppuhelper/weakref.hxx> |
45 | | #include <comphelper/multicontainer2.hxx> |
46 | | #include <comphelper/refcountedmutex.hxx> |
47 | | #include <comphelper/sequenceashashmap.hxx> |
48 | | #include <o3tl/deleter.hxx> |
49 | | #include <rtl/ref.hxx> |
50 | | |
51 | | #include "ohierarchyholder.hxx" |
52 | | #include "disposelistener.hxx" |
53 | | |
54 | | #include <vector> |
55 | | #include <memory> |
56 | | #include <optional> |
57 | | #include <string_view> |
58 | | |
59 | | namespace com::sun::star::uno { |
60 | | class XComponentContext; |
61 | | } |
62 | | |
63 | 517k | #define RELINFO_NO_INIT 1 |
64 | 230k | #define RELINFO_READ 2 |
65 | 28 | #define RELINFO_CHANGED 3 |
66 | 95.0k | #define RELINFO_CHANGED_STREAM 4 |
67 | 62.7k | #define RELINFO_CHANGED_STREAM_READ 5 |
68 | 0 | #define RELINFO_BROKEN 6 |
69 | 0 | #define RELINFO_CHANGED_BROKEN 7 |
70 | | |
71 | 0 | #define STOR_MESS_PRECOMMIT 1 |
72 | 0 | #define STOR_MESS_COMMITTED 2 |
73 | 0 | #define STOR_MESS_PREREVERT 3 |
74 | 0 | #define STOR_MESS_REVERTED 4 |
75 | | |
76 | | // a common implementation for an entry |
77 | | |
78 | | struct OStorage_Impl; |
79 | | struct OWriteStream_Impl; |
80 | | |
81 | | struct SotElement_Impl |
82 | | { |
83 | | OUString m_aOriginalName; |
84 | | bool m_bIsRemoved; |
85 | | bool m_bIsInserted; |
86 | | bool m_bIsStorage; |
87 | | |
88 | | std::unique_ptr<OStorage_Impl> m_xStorage; |
89 | | std::unique_ptr<OWriteStream_Impl, o3tl::default_delete<OWriteStream_Impl>> m_xStream; |
90 | | |
91 | | public: |
92 | | SotElement_Impl(OUString aName, bool bStor, bool bNew); |
93 | | }; |
94 | | |
95 | | // Main storage implementation |
96 | | |
97 | | class OStorage; |
98 | | |
99 | | class SwitchablePersistenceStream; |
100 | | struct OStorage_Impl |
101 | | { |
102 | | typedef std::vector<unotools::WeakReference< OStorage >> StorageHoldersType; |
103 | | |
104 | | rtl::Reference<comphelper::RefCountedMutex> m_xMutex; |
105 | | |
106 | | OStorage* m_pAntiImpl; // only valid if external references exists |
107 | | StorageHoldersType m_aReadOnlyWrapVector; // only valid if readonly external reference exists |
108 | | |
109 | | sal_Int32 m_nStorageMode; // open mode ( read/write/trunc/nocreate ) |
110 | | bool m_bIsModified; // only modified elements will be sent to the original content |
111 | | bool m_bBroadcastModified; // will be set if notification is required |
112 | | |
113 | | bool m_bCommited; // sending the streams is coordinated by the root storage of the package |
114 | | |
115 | | bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts |
116 | | bool m_bListCreated; |
117 | | bool m_bRepairPackage = false; |
118 | | |
119 | | /// Count of registered modification listeners |
120 | | oslInterlockedCount m_nModifiedListenerCount; |
121 | | bool HasModifiedListener() const |
122 | 606 | { |
123 | 606 | return m_nModifiedListenerCount > 0 && m_pAntiImpl != nullptr; |
124 | 606 | } |
125 | | |
126 | | std::unordered_map<OUString, std::vector<SotElement_Impl*>> m_aChildrenMap; |
127 | | std::vector< SotElement_Impl* > m_aDeletedVector; |
128 | | |
129 | | css::uno::Reference< css::container::XNameContainer > m_xPackageFolder; |
130 | | |
131 | | css::uno::Reference< css::lang::XSingleServiceFactory > m_xPackage; |
132 | | css::uno::Reference< css::uno::XComponentContext > m_xContext; |
133 | | |
134 | | // valid only for root storage |
135 | | css::uno::Reference< css::io::XInputStream > m_xInputStream; // ??? may be stored in properties |
136 | | rtl::Reference< SwitchablePersistenceStream > m_xStream; // ??? may be stored in properties |
137 | | css::uno::Sequence< css::beans::PropertyValue > m_xProperties; |
138 | | bool m_bHasCommonEncryptionData; |
139 | | ::comphelper::SequenceAsHashMap m_aCommonEncryptionData; |
140 | | |
141 | | // must be empty in case of root storage |
142 | | OStorage_Impl* m_pParent; |
143 | | |
144 | | bool m_bControlMediaType; |
145 | | OUString m_aMediaType; |
146 | | bool m_bMTFallbackUsed; |
147 | | |
148 | | bool m_bControlVersion; |
149 | | OUString m_aVersion; |
150 | | |
151 | | rtl::Reference<SwitchablePersistenceStream> m_pSwitchStream; |
152 | | |
153 | | sal_Int32 m_nStorageType; // the mode in which the storage is used |
154 | | |
155 | | // the _rels substorage that is handled in a special way in embed::StorageFormats::OFOPXML |
156 | | SotElement_Impl* m_pRelStorElement; |
157 | | rtl::Reference< OStorage > m_xRelStorage; |
158 | | css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > m_aRelInfo; |
159 | | css::uno::Reference< css::io::XInputStream > m_xNewRelInfoStream; |
160 | | sal_Int16 m_nRelInfoStatus; |
161 | | |
162 | | // Constructors |
163 | | OStorage_Impl( css::uno::Reference< css::io::XInputStream > const & xInputStream, |
164 | | sal_Int32 nMode, |
165 | | const css::uno::Sequence< css::beans::PropertyValue >& xProperties, |
166 | | css::uno::Reference< css::uno::XComponentContext > const & xContext, |
167 | | sal_Int32 nStorageType ); |
168 | | |
169 | | OStorage_Impl( css::uno::Reference< css::io::XStream > const & xStream, |
170 | | sal_Int32 nMode, |
171 | | const css::uno::Sequence< css::beans::PropertyValue >& xProperties, |
172 | | css::uno::Reference< css::uno::XComponentContext > const & xContext, |
173 | | sal_Int32 nStorageType ); |
174 | | |
175 | | // constructor for a substorage |
176 | | OStorage_Impl( OStorage_Impl* pParent, |
177 | | sal_Int32 nMode, |
178 | | css::uno::Reference< css::container::XNameContainer > const & xPackageFolder, |
179 | | css::uno::Reference< css::lang::XSingleServiceFactory > xPackage, |
180 | | css::uno::Reference< css::uno::XComponentContext > const & xContext, |
181 | | sal_Int32 nStorageType ); |
182 | | |
183 | | ~OStorage_Impl(); |
184 | | |
185 | | void SetReadOnlyWrap( OStorage& aStorage ); |
186 | | void RemoveReadOnlyWrap( const OStorage& aStorage ); |
187 | | |
188 | | void OpenOwnPackage(); |
189 | | void ReadContents(); |
190 | | void ReadRelInfoIfNecessary(); |
191 | | |
192 | | bool HasChildren(); |
193 | | void GetStorageProperties(); |
194 | | |
195 | | css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > GetAllRelationshipsIfAny(); |
196 | | void CopyLastCommitTo( const css::uno::Reference< css::embed::XStorage >& xNewStor ); |
197 | | |
198 | | void InsertIntoPackageFolder( |
199 | | const OUString& aName, |
200 | | const css::uno::Reference< css::container::XNameContainer >& xParentPackageFolder ); |
201 | | |
202 | | void Commit(); |
203 | | void Revert(); |
204 | | |
205 | | /// @throws css::packages::NoEncryptionException |
206 | | ::comphelper::SequenceAsHashMap GetCommonRootEncryptionData(); |
207 | | |
208 | | void CopyToStorage( const css::uno::Reference< css::embed::XStorage >& xDest, |
209 | | bool bDirect ); |
210 | | void CopyStorageElement( SotElement_Impl* pElement, |
211 | | const css::uno::Reference< css::embed::XStorage >& xDest, |
212 | | const OUString& aName, |
213 | | bool bDirect ); |
214 | | |
215 | | SotElement_Impl* FindElement( const OUString& rName ); |
216 | | |
217 | | SotElement_Impl* InsertStream( const OUString& aName, bool bEncr ); |
218 | | void InsertRawStream( const OUString& aName, const css::uno::Reference< css::io::XInputStream >& xInStream ); |
219 | | |
220 | | std::unique_ptr<OStorage_Impl> CreateNewStorageImpl( sal_Int32 nStorageMode ); |
221 | | SotElement_Impl* InsertStorage( const OUString& aName, sal_Int32 nStorageMode ); |
222 | | SotElement_Impl* InsertElement( const OUString& aName, bool bIsStorage ); |
223 | | |
224 | | void OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode ); |
225 | | void OpenSubStream( SotElement_Impl* pElement ); |
226 | | |
227 | | css::uno::Sequence< OUString > GetElementNames(); |
228 | | |
229 | | void RemoveElement( OUString const & rName, SotElement_Impl* pElement ); |
230 | | static void ClearElement( SotElement_Impl* pElement ); |
231 | | |
232 | | /// @throws css::embed::InvalidStorageException |
233 | | /// @throws css::lang::IllegalArgumentException |
234 | | /// @throws css::packages::WrongPasswordException |
235 | | /// @throws css::packages::NoEncryptionException |
236 | | /// @throws css::container::NoSuchElementException |
237 | | /// @throws css::io::IOException |
238 | | /// @throws css::embed::StorageWrappedTargetException |
239 | | /// @throws css::uno::RuntimeException |
240 | | void CloneStreamElement( |
241 | | const OUString& aStreamName, |
242 | | bool bPassProvided, |
243 | | const ::comphelper::SequenceAsHashMap& aEncryptionData, |
244 | | css::uno::Reference< css::io::XStream >& xTargetStream ); |
245 | | |
246 | | void RemoveStreamRelInfo( std::u16string_view aOriginalName ); |
247 | | void CreateRelStorage(); |
248 | | void CommitStreamRelInfo( std::u16string_view rName, SotElement_Impl const * pStreamElement ); |
249 | | css::uno::Reference< css::io::XInputStream > GetRelInfoStreamForName( |
250 | | std::u16string_view aName ); |
251 | | void CommitRelInfo( const css::uno::Reference< css::container::XNameContainer >& xNewPackageFolder ); |
252 | | |
253 | | static void completeStorageStreamCopy_Impl( |
254 | | const css::uno::Reference< css::io::XStream >& xSource, |
255 | | const css::uno::Reference< css::io::XStream >& xDest, |
256 | | sal_Int32 nStorageType, |
257 | | const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >& aRelInfo ); |
258 | | |
259 | | }; |
260 | | |
261 | | class OStorage final : public css::lang::XTypeProvider |
262 | | , public css::embed::XStorage2 |
263 | | , public css::embed::XStorageRawAccess |
264 | | , public css::embed::XTransactedObject |
265 | | , public css::embed::XTransactionBroadcaster |
266 | | , public css::util::XModifiable |
267 | | , public css::embed::XEncryptionProtectedStorage |
268 | | , public css::beans::XPropertySet |
269 | | , public css::embed::XOptimizedStorage |
270 | | , public css::embed::XRelationshipAccess |
271 | | , public css::embed::XHierarchicalStorageAccess2 |
272 | | , public ::cppu::OWeakObject |
273 | | { |
274 | | OStorage_Impl* m_pImpl; |
275 | | rtl::Reference<comphelper::RefCountedMutex> m_xSharedMutex; |
276 | | comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenersContainer; // list of listeners |
277 | | ::std::optional< ::cppu::OTypeCollection> m_oTypeCollection; |
278 | | // m_nStorageType is both here, and in m_pImpl->m_nStorageType because |
279 | | // sometimes we need the value when m_pImpl is nullptr. |
280 | | sal_Int32 m_nStorageType; // the mode in which the storage is used |
281 | | bool m_bReadOnlyWrap; |
282 | | ::rtl::Reference<OChildDispListener_Impl> m_pSubElDispListener; |
283 | | ::std::vector< css::uno::WeakReference< css::lang::XComponent > > m_aOpenSubComponentsVector; |
284 | | std::unique_ptr<OHierarchyHolder_Impl> m_pHierarchyHolder; |
285 | | |
286 | | SotElement_Impl* OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, bool bEncr ); |
287 | | |
288 | | void BroadcastModifiedIfNecessary(); |
289 | | |
290 | | void BroadcastTransaction( sal_Int8 nMessage ); |
291 | | |
292 | | void MakeLinkToSubComponent_Impl( |
293 | | const css::uno::Reference< css::lang::XComponent >& xComponent ); |
294 | | |
295 | | public: |
296 | | |
297 | | OStorage( css::uno::Reference< css::io::XInputStream > const & xInputStream, |
298 | | sal_Int32 nMode, |
299 | | const css::uno::Sequence< css::beans::PropertyValue >& xProperties, |
300 | | css::uno::Reference< css::uno::XComponentContext > const & xContext, |
301 | | sal_Int32 nStorageType ); |
302 | | |
303 | | OStorage( css::uno::Reference< css::io::XStream > const & xStream, |
304 | | sal_Int32 nMode, |
305 | | const css::uno::Sequence< css::beans::PropertyValue >& xProperties, |
306 | | css::uno::Reference< css::uno::XComponentContext > const & xContext, |
307 | | sal_Int32 nStorageType ); |
308 | | |
309 | | OStorage( OStorage_Impl* pImpl, bool bReadOnlyWrap ); |
310 | | |
311 | | virtual ~OStorage() override; |
312 | | |
313 | | void InternalDispose( bool bNotifyImpl ); |
314 | | |
315 | | void ChildIsDisposed( const css::uno::Reference< css::uno::XInterface >& xChild ); |
316 | | |
317 | 0 | sal_Int32 GetRefCount_Impl() const { return m_refCount; } |
318 | | |
319 | | // XInterface |
320 | | |
321 | | virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override; |
322 | | |
323 | | virtual void SAL_CALL acquire() noexcept override; |
324 | | |
325 | | virtual void SAL_CALL release() noexcept override; |
326 | | |
327 | | // XTypeProvider |
328 | | |
329 | | virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; |
330 | | |
331 | | virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; |
332 | | |
333 | | // XStorage |
334 | | |
335 | | virtual void SAL_CALL copyToStorage( const css::uno::Reference< css::embed::XStorage >& xDest ) override; |
336 | | |
337 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL openStreamElement( |
338 | | const OUString& aStreamName, sal_Int32 nOpenMode ) override; |
339 | | |
340 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL openEncryptedStreamElement( |
341 | | const OUString& aStreamName, sal_Int32 nOpenMode, const OUString& aPass ) override; |
342 | | |
343 | | virtual css::uno::Reference< css::embed::XStorage > SAL_CALL openStorageElement( |
344 | | const OUString& aStorName, sal_Int32 nStorageMode ) override final; |
345 | | |
346 | | rtl::Reference< OStorage > openStorageElement2( |
347 | | const OUString& aStorName, sal_Int32 nStorageMode ); |
348 | | |
349 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL cloneStreamElement( |
350 | | const OUString& aStreamName ) override; |
351 | | |
352 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL cloneEncryptedStreamElement( |
353 | | const OUString& aStreamName, const OUString& aPass ) override; |
354 | | |
355 | | virtual void SAL_CALL copyLastCommitTo( |
356 | | const css::uno::Reference< css::embed::XStorage >& xTargetStorage ) override; |
357 | | |
358 | | virtual void SAL_CALL copyStorageElementLastCommitTo( |
359 | | const OUString& aStorName, |
360 | | const css::uno::Reference< css::embed::XStorage >& xTargetStorage ) override; |
361 | | |
362 | | virtual sal_Bool SAL_CALL isStreamElement( const OUString& aElementName ) override; |
363 | | |
364 | | virtual sal_Bool SAL_CALL isStorageElement( const OUString& aElementName ) override; |
365 | | |
366 | | virtual void SAL_CALL removeElement( const OUString& aElementName ) override; |
367 | | |
368 | | virtual void SAL_CALL renameElement( const OUString& rEleName, const OUString& rNewName ) override; |
369 | | |
370 | | virtual void SAL_CALL copyElementTo( const OUString& aElementName, |
371 | | const css::uno::Reference< css::embed::XStorage >& xDest, |
372 | | const OUString& aNewName ) override; |
373 | | |
374 | | virtual void SAL_CALL moveElementTo( const OUString& aElementName, |
375 | | const css::uno::Reference< css::embed::XStorage >& xDest, |
376 | | const OUString& rNewName ) override; |
377 | | |
378 | | // XStorage2 |
379 | | |
380 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL openEncryptedStream( const OUString& sStreamName, ::sal_Int32 nOpenMode, const css::uno::Sequence< css::beans::NamedValue >& aEncryptionData ) override; |
381 | | |
382 | | virtual css::uno::Reference< css::io::XStream > SAL_CALL cloneEncryptedStream( const OUString& sStreamName, const css::uno::Sequence< css::beans::NamedValue >& aEncryptionData ) override; |
383 | | |
384 | | // XStorageRawAccess |
385 | | |
386 | | virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getPlainRawStreamElement( |
387 | | const OUString& sStreamName ) override; |
388 | | |
389 | | virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getRawEncrStreamElement( |
390 | | const OUString& sStreamName ) override; |
391 | | |
392 | | virtual void SAL_CALL insertRawEncrStreamElement( const OUString& aStreamName, |
393 | | const css::uno::Reference< css::io::XInputStream >& xInStream ) override; |
394 | | |
395 | | // XTransactedObject |
396 | | virtual void SAL_CALL commit() override; |
397 | | |
398 | | virtual void SAL_CALL revert() override; |
399 | | |
400 | | // XTransactionBroadcaster |
401 | | virtual void SAL_CALL addTransactionListener( |
402 | | const css::uno::Reference< css::embed::XTransactionListener >& aListener ) override; |
403 | | |
404 | | virtual void SAL_CALL removeTransactionListener( |
405 | | const css::uno::Reference< css::embed::XTransactionListener >& aListener ) override; |
406 | | |
407 | | // XModifiable |
408 | | |
409 | | virtual sal_Bool SAL_CALL isModified() override; |
410 | | |
411 | | virtual void SAL_CALL setModified( sal_Bool bModified ) override; |
412 | | |
413 | | virtual void SAL_CALL addModifyListener( |
414 | | const css::uno::Reference< css::util::XModifyListener >& aListener ) override; |
415 | | |
416 | | virtual void SAL_CALL removeModifyListener( |
417 | | const css::uno::Reference< css::util::XModifyListener >& aListener ) override; |
418 | | |
419 | | // XNameAccess |
420 | | |
421 | | virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; |
422 | | |
423 | | virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; |
424 | | |
425 | | virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; |
426 | | |
427 | | virtual css::uno::Type SAL_CALL getElementType() override; |
428 | | |
429 | | virtual sal_Bool SAL_CALL hasElements() override; |
430 | | |
431 | | // XComponent |
432 | | |
433 | | virtual void SAL_CALL dispose() override; |
434 | | |
435 | | virtual void SAL_CALL addEventListener( |
436 | | const css::uno::Reference< css::lang::XEventListener >& xListener ) override; |
437 | | |
438 | | virtual void SAL_CALL removeEventListener( |
439 | | const css::uno::Reference< css::lang::XEventListener >& xListener ) override; |
440 | | |
441 | | // XEncryptionProtectedSource |
442 | | |
443 | | virtual void SAL_CALL setEncryptionPassword( const OUString& aPass ) override; |
444 | | |
445 | | virtual void SAL_CALL removeEncryption() override; |
446 | | |
447 | | // XEncryptionProtectedSource2 |
448 | | |
449 | | virtual void SAL_CALL setEncryptionData( |
450 | | const css::uno::Sequence< css::beans::NamedValue >& aEncryptionData ) override; |
451 | | |
452 | | virtual sal_Bool SAL_CALL hasEncryptionData() override; |
453 | | |
454 | | // XEncryptionProtectedStorage |
455 | | |
456 | | virtual void SAL_CALL setEncryptionAlgorithms( const css::uno::Sequence< css::beans::NamedValue >& aAlgorithms ) override; |
457 | | virtual void SAL_CALL setGpgProperties( const css::uno::Sequence< css::uno::Sequence< css::beans::NamedValue > >& aCryptProps ) override; |
458 | | |
459 | | virtual css::uno::Sequence< css::beans::NamedValue > SAL_CALL getEncryptionAlgorithms() override; |
460 | | |
461 | | // XPropertySet |
462 | | |
463 | | virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; |
464 | | |
465 | | virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; |
466 | | |
467 | | virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; |
468 | | |
469 | | virtual void SAL_CALL addPropertyChangeListener( |
470 | | const OUString& aPropertyName, |
471 | | const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; |
472 | | |
473 | | virtual void SAL_CALL removePropertyChangeListener( |
474 | | const OUString& aPropertyName, |
475 | | const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; |
476 | | |
477 | | virtual void SAL_CALL addVetoableChangeListener( |
478 | | const OUString& PropertyName, |
479 | | const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; |
480 | | |
481 | | virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; |
482 | | |
483 | | // XOptimizedStorage |
484 | | virtual void SAL_CALL insertRawNonEncrStreamElementDirect( const OUString& sStreamName, const css::uno::Reference< css::io::XInputStream >& xInStream ) override; |
485 | | |
486 | | virtual void SAL_CALL insertStreamElementDirect( const OUString& sStreamName, const css::uno::Reference< css::io::XInputStream >& xInStream, const css::uno::Sequence< css::beans::PropertyValue >& aProps ) override; |
487 | | |
488 | | virtual void SAL_CALL copyElementDirectlyTo( const OUString& sSourceName, const css::uno::Reference< css::embed::XOptimizedStorage >& xTargetStorage, const OUString& sTargetName ) override; |
489 | | |
490 | | virtual void SAL_CALL writeAndAttachToStream( const css::uno::Reference< css::io::XStream >& xStream ) override; |
491 | | |
492 | | virtual void SAL_CALL attachToURL( const OUString& sURL, sal_Bool bReadOnly ) override; |
493 | | |
494 | | virtual css::uno::Any SAL_CALL getElementPropertyValue( const OUString& sElementName, const OUString& sPropertyName ) override; |
495 | | |
496 | | virtual void SAL_CALL copyStreamElementData( const OUString& sStreamName, const css::uno::Reference< css::io::XStream >& xTargetStream ) override; |
497 | | |
498 | | // XRelationshipAccess |
499 | | virtual sal_Bool SAL_CALL hasByID( const OUString& sID ) override; |
500 | | |
501 | | virtual OUString SAL_CALL getTargetByID( const OUString& sID ) override; |
502 | | |
503 | | virtual OUString SAL_CALL getTypeByID( const OUString& sID ) override; |
504 | | |
505 | | virtual css::uno::Sequence< css::beans::StringPair > SAL_CALL getRelationshipByID( const OUString& sID ) override; |
506 | | |
507 | | virtual css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > SAL_CALL getRelationshipsByType( const OUString& sType ) override; |
508 | | |
509 | | virtual css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > SAL_CALL getAllRelationships( ) override; |
510 | | |
511 | | virtual void SAL_CALL insertRelationshipByID( const OUString& sID, const css::uno::Sequence< css::beans::StringPair >& aEntry, sal_Bool bReplace ) override; |
512 | | |
513 | | virtual void SAL_CALL removeRelationshipByID( const OUString& sID ) override; |
514 | | |
515 | | virtual void SAL_CALL insertRelationships( const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >& aEntries, sal_Bool bReplace ) override; |
516 | | |
517 | | virtual void SAL_CALL clearRelationships( ) override; |
518 | | |
519 | | // XHierarchicalStorageAccess |
520 | | virtual css::uno::Reference< css::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const OUString& sStreamPath, ::sal_Int32 nOpenMode ) override; |
521 | | |
522 | | virtual css::uno::Reference< css::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamElementByHierarchicalName( const OUString& sStreamName, ::sal_Int32 nOpenMode, const OUString& sPassword ) override; |
523 | | |
524 | | virtual void SAL_CALL removeStreamElementByHierarchicalName( const OUString& sElementPath ) override; |
525 | | |
526 | | // XHierarchicalStorageAccess2 |
527 | | virtual css::uno::Reference< css::embed::XExtendedStorageStream > SAL_CALL openEncryptedStreamByHierarchicalName( const OUString& sStreamName, ::sal_Int32 nOpenMode, const css::uno::Sequence< css::beans::NamedValue >& aEncryptionData ) override; |
528 | | }; |
529 | | |
530 | | #endif |
531 | | |
532 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |