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