1*a3872823SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*a3872823SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*a3872823SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*a3872823SAndrew Rist * distributed with this work for additional information
6*a3872823SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*a3872823SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*a3872823SAndrew Rist * "License"); you may not use this file except in compliance
9*a3872823SAndrew Rist * with the License. You may obtain a copy of the License at
10*a3872823SAndrew Rist *
11*a3872823SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*a3872823SAndrew Rist *
13*a3872823SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*a3872823SAndrew Rist * software distributed under the License is distributed on an
15*a3872823SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*a3872823SAndrew Rist * KIND, either express or implied. See the License for the
17*a3872823SAndrew Rist * specific language governing permissions and limitations
18*a3872823SAndrew Rist * under the License.
19*a3872823SAndrew Rist *
20*a3872823SAndrew Rist *************************************************************/
21*a3872823SAndrew Rist
22*a3872823SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_package.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include "ocompinstream.hxx"
28cdf0e10cSrcweir #include <com/sun/star/embed/StorageFormats.hpp>
29cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
30cdf0e10cSrcweir #include <osl/diagnose.h>
31cdf0e10cSrcweir
32cdf0e10cSrcweir #include "owriteablestream.hxx"
33cdf0e10cSrcweir #include "xstorage.hxx"
34cdf0e10cSrcweir
35cdf0e10cSrcweir using namespace ::com::sun::star;
36cdf0e10cSrcweir
37cdf0e10cSrcweir //-----------------------------------------------
OInputCompStream(OWriteStream_Impl & aImpl,uno::Reference<io::XInputStream> xStream,const uno::Sequence<beans::PropertyValue> & aProps,sal_Int32 nStorageType)38cdf0e10cSrcweir OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
39cdf0e10cSrcweir uno::Reference < io::XInputStream > xStream,
40cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& aProps,
41cdf0e10cSrcweir sal_Int32 nStorageType )
42cdf0e10cSrcweir : m_pImpl( &aImpl )
43cdf0e10cSrcweir , m_rMutexRef( m_pImpl->m_rMutexRef )
44cdf0e10cSrcweir , m_xStream( xStream )
45cdf0e10cSrcweir , m_pInterfaceContainer( NULL )
46cdf0e10cSrcweir , m_aProperties( aProps )
47cdf0e10cSrcweir , m_bDisposed( sal_False )
48cdf0e10cSrcweir , m_nStorageType( nStorageType )
49cdf0e10cSrcweir {
50cdf0e10cSrcweir OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex is provided!\n" );
51cdf0e10cSrcweir if ( !m_pImpl->m_rMutexRef.Is() )
52cdf0e10cSrcweir throw uno::RuntimeException(); // just a disaster
53cdf0e10cSrcweir
54cdf0e10cSrcweir OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
55cdf0e10cSrcweir }
56cdf0e10cSrcweir
57cdf0e10cSrcweir //-----------------------------------------------
OInputCompStream(uno::Reference<io::XInputStream> xStream,const uno::Sequence<beans::PropertyValue> & aProps,sal_Int32 nStorageType)58cdf0e10cSrcweir OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
59cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& aProps,
60cdf0e10cSrcweir sal_Int32 nStorageType )
61cdf0e10cSrcweir : m_pImpl( NULL )
62cdf0e10cSrcweir , m_rMutexRef( new SotMutexHolder )
63cdf0e10cSrcweir , m_xStream( xStream )
64cdf0e10cSrcweir , m_pInterfaceContainer( NULL )
65cdf0e10cSrcweir , m_aProperties( aProps )
66cdf0e10cSrcweir , m_bDisposed( sal_False )
67cdf0e10cSrcweir , m_nStorageType( nStorageType )
68cdf0e10cSrcweir {
69cdf0e10cSrcweir OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
70cdf0e10cSrcweir }
71cdf0e10cSrcweir
72cdf0e10cSrcweir //-----------------------------------------------
~OInputCompStream()73cdf0e10cSrcweir OInputCompStream::~OInputCompStream()
74cdf0e10cSrcweir {
75cdf0e10cSrcweir {
76cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
77cdf0e10cSrcweir
78cdf0e10cSrcweir if ( !m_bDisposed )
79cdf0e10cSrcweir {
80cdf0e10cSrcweir m_refCount++;
81cdf0e10cSrcweir dispose();
82cdf0e10cSrcweir }
83cdf0e10cSrcweir
84cdf0e10cSrcweir if ( m_pInterfaceContainer )
85cdf0e10cSrcweir delete m_pInterfaceContainer;
86cdf0e10cSrcweir }
87cdf0e10cSrcweir }
88cdf0e10cSrcweir
89cdf0e10cSrcweir //-----------------------------------------------
queryInterface(const uno::Type & rType)90cdf0e10cSrcweir uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
91cdf0e10cSrcweir throw( uno::RuntimeException )
92cdf0e10cSrcweir {
93cdf0e10cSrcweir uno::Any aReturn;
94cdf0e10cSrcweir
95cdf0e10cSrcweir // common interfaces
96cdf0e10cSrcweir aReturn <<= ::cppu::queryInterface
97cdf0e10cSrcweir ( rType
98cdf0e10cSrcweir , static_cast<io::XInputStream*> ( this )
99cdf0e10cSrcweir , static_cast<io::XStream*> ( this )
100cdf0e10cSrcweir , static_cast<lang::XComponent*> ( this )
101cdf0e10cSrcweir , static_cast<beans::XPropertySet*> ( this )
102cdf0e10cSrcweir , static_cast<embed::XExtendedStorageStream*> ( this ) );
103cdf0e10cSrcweir
104cdf0e10cSrcweir if ( aReturn.hasValue() == sal_True )
105cdf0e10cSrcweir return aReturn ;
106cdf0e10cSrcweir
107cdf0e10cSrcweir if ( m_nStorageType == embed::StorageFormats::OFOPXML )
108cdf0e10cSrcweir {
109cdf0e10cSrcweir aReturn <<= ::cppu::queryInterface
110cdf0e10cSrcweir ( rType
111cdf0e10cSrcweir , static_cast<embed::XRelationshipAccess*> ( this ) );
112cdf0e10cSrcweir
113cdf0e10cSrcweir if ( aReturn.hasValue() == sal_True )
114cdf0e10cSrcweir return aReturn ;
115cdf0e10cSrcweir }
116cdf0e10cSrcweir
117cdf0e10cSrcweir return OWeakObject::queryInterface( rType );
118cdf0e10cSrcweir }
119cdf0e10cSrcweir
120cdf0e10cSrcweir //-----------------------------------------------
readBytes(uno::Sequence<sal_Int8> & aData,sal_Int32 nBytesToRead)121cdf0e10cSrcweir sal_Int32 SAL_CALL OInputCompStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
122cdf0e10cSrcweir throw ( io::NotConnectedException,
123cdf0e10cSrcweir io::BufferSizeExceededException,
124cdf0e10cSrcweir io::IOException,
125cdf0e10cSrcweir uno::RuntimeException )
126cdf0e10cSrcweir {
127cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
128cdf0e10cSrcweir if ( m_bDisposed )
129cdf0e10cSrcweir {
130cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
131cdf0e10cSrcweir throw lang::DisposedException();
132cdf0e10cSrcweir }
133cdf0e10cSrcweir
134cdf0e10cSrcweir if ( !m_xStream.is() )
135cdf0e10cSrcweir {
136cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No stream!" ) ) );
137cdf0e10cSrcweir throw uno::RuntimeException();
138cdf0e10cSrcweir }
139cdf0e10cSrcweir
140cdf0e10cSrcweir return m_xStream->readBytes( aData, nBytesToRead );
141cdf0e10cSrcweir }
142cdf0e10cSrcweir
143cdf0e10cSrcweir //-----------------------------------------------
readSomeBytes(uno::Sequence<sal_Int8> & aData,sal_Int32 nMaxBytesToRead)144cdf0e10cSrcweir sal_Int32 SAL_CALL OInputCompStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead )
145cdf0e10cSrcweir throw ( io::NotConnectedException,
146cdf0e10cSrcweir io::BufferSizeExceededException,
147cdf0e10cSrcweir io::IOException,
148cdf0e10cSrcweir uno::RuntimeException )
149cdf0e10cSrcweir {
150cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
151cdf0e10cSrcweir if ( m_bDisposed )
152cdf0e10cSrcweir {
153cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
154cdf0e10cSrcweir throw lang::DisposedException();
155cdf0e10cSrcweir }
156cdf0e10cSrcweir
157cdf0e10cSrcweir if ( !m_xStream.is() )
158cdf0e10cSrcweir {
159cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No stream!" ) ) );
160cdf0e10cSrcweir throw uno::RuntimeException();
161cdf0e10cSrcweir }
162cdf0e10cSrcweir
163cdf0e10cSrcweir return m_xStream->readSomeBytes( aData, nMaxBytesToRead );
164cdf0e10cSrcweir
165cdf0e10cSrcweir }
166cdf0e10cSrcweir
167cdf0e10cSrcweir //-----------------------------------------------
skipBytes(sal_Int32 nBytesToSkip)168cdf0e10cSrcweir void SAL_CALL OInputCompStream::skipBytes( sal_Int32 nBytesToSkip )
169cdf0e10cSrcweir throw ( io::NotConnectedException,
170cdf0e10cSrcweir io::BufferSizeExceededException,
171cdf0e10cSrcweir io::IOException,
172cdf0e10cSrcweir uno::RuntimeException )
173cdf0e10cSrcweir {
174cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
175cdf0e10cSrcweir if ( m_bDisposed )
176cdf0e10cSrcweir {
177cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
178cdf0e10cSrcweir throw lang::DisposedException();
179cdf0e10cSrcweir }
180cdf0e10cSrcweir
181cdf0e10cSrcweir if ( !m_xStream.is() )
182cdf0e10cSrcweir {
183cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No stream!" ) ) );
184cdf0e10cSrcweir throw uno::RuntimeException();
185cdf0e10cSrcweir }
186cdf0e10cSrcweir
187cdf0e10cSrcweir m_xStream->skipBytes( nBytesToSkip );
188cdf0e10cSrcweir
189cdf0e10cSrcweir }
190cdf0e10cSrcweir
191cdf0e10cSrcweir //-----------------------------------------------
available()192cdf0e10cSrcweir sal_Int32 SAL_CALL OInputCompStream::available( )
193cdf0e10cSrcweir throw ( io::NotConnectedException,
194cdf0e10cSrcweir io::IOException,
195cdf0e10cSrcweir uno::RuntimeException )
196cdf0e10cSrcweir {
197cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
198cdf0e10cSrcweir if ( m_bDisposed )
199cdf0e10cSrcweir {
200cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
201cdf0e10cSrcweir throw lang::DisposedException();
202cdf0e10cSrcweir }
203cdf0e10cSrcweir
204cdf0e10cSrcweir if ( !m_xStream.is() )
205cdf0e10cSrcweir {
206cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No stream!" ) ) );
207cdf0e10cSrcweir throw uno::RuntimeException();
208cdf0e10cSrcweir }
209cdf0e10cSrcweir
210cdf0e10cSrcweir return m_xStream->available();
211cdf0e10cSrcweir
212cdf0e10cSrcweir }
213cdf0e10cSrcweir
214cdf0e10cSrcweir //-----------------------------------------------
closeInput()215cdf0e10cSrcweir void SAL_CALL OInputCompStream::closeInput( )
216cdf0e10cSrcweir throw ( io::NotConnectedException,
217cdf0e10cSrcweir io::IOException,
218cdf0e10cSrcweir uno::RuntimeException )
219cdf0e10cSrcweir {
220cdf0e10cSrcweir dispose();
221cdf0e10cSrcweir }
222cdf0e10cSrcweir
223cdf0e10cSrcweir //-----------------------------------------------
getInputStream()224cdf0e10cSrcweir uno::Reference< io::XInputStream > SAL_CALL OInputCompStream::getInputStream()
225cdf0e10cSrcweir throw ( uno::RuntimeException )
226cdf0e10cSrcweir {
227cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
228cdf0e10cSrcweir if ( m_bDisposed )
229cdf0e10cSrcweir {
230cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
231cdf0e10cSrcweir throw lang::DisposedException();
232cdf0e10cSrcweir }
233cdf0e10cSrcweir
234cdf0e10cSrcweir if ( !m_xStream.is() )
235cdf0e10cSrcweir return uno::Reference< io::XInputStream >();
236cdf0e10cSrcweir
237cdf0e10cSrcweir return uno::Reference< io::XInputStream >( static_cast< io::XInputStream* >( this ), uno::UNO_QUERY );
238cdf0e10cSrcweir }
239cdf0e10cSrcweir
240cdf0e10cSrcweir //-----------------------------------------------
getOutputStream()241cdf0e10cSrcweir uno::Reference< io::XOutputStream > SAL_CALL OInputCompStream::getOutputStream()
242cdf0e10cSrcweir throw ( uno::RuntimeException )
243cdf0e10cSrcweir {
244cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
245cdf0e10cSrcweir if ( m_bDisposed )
246cdf0e10cSrcweir {
247cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
248cdf0e10cSrcweir throw lang::DisposedException();
249cdf0e10cSrcweir }
250cdf0e10cSrcweir
251cdf0e10cSrcweir return uno::Reference< io::XOutputStream >();
252cdf0e10cSrcweir }
253cdf0e10cSrcweir
254cdf0e10cSrcweir //-----------------------------------------------
InternalDispose()255cdf0e10cSrcweir void OInputCompStream::InternalDispose()
256cdf0e10cSrcweir {
257cdf0e10cSrcweir // can be called only by OWriteStream_Impl
258cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
259cdf0e10cSrcweir if ( m_bDisposed )
260cdf0e10cSrcweir {
261cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
262cdf0e10cSrcweir throw lang::DisposedException();
263cdf0e10cSrcweir }
264cdf0e10cSrcweir
265cdf0e10cSrcweir // the source object is also a kind of locker for the current object
266cdf0e10cSrcweir // since the listeners could dispose the object while being notified
267cdf0e10cSrcweir lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
268cdf0e10cSrcweir
269cdf0e10cSrcweir if ( m_pInterfaceContainer )
270cdf0e10cSrcweir m_pInterfaceContainer->disposeAndClear( aSource );
271cdf0e10cSrcweir
272cdf0e10cSrcweir try
273cdf0e10cSrcweir {
274cdf0e10cSrcweir m_xStream->closeInput();
275cdf0e10cSrcweir }
276cdf0e10cSrcweir catch( uno::Exception& )
277cdf0e10cSrcweir {}
278cdf0e10cSrcweir
279cdf0e10cSrcweir m_pImpl = NULL;
280cdf0e10cSrcweir m_bDisposed = sal_True;
281cdf0e10cSrcweir }
282cdf0e10cSrcweir
283cdf0e10cSrcweir //-----------------------------------------------
dispose()284cdf0e10cSrcweir void SAL_CALL OInputCompStream::dispose( )
285cdf0e10cSrcweir throw ( uno::RuntimeException )
286cdf0e10cSrcweir {
287cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
288cdf0e10cSrcweir if ( m_bDisposed )
289cdf0e10cSrcweir {
290cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
291cdf0e10cSrcweir throw lang::DisposedException();
292cdf0e10cSrcweir }
293cdf0e10cSrcweir
294cdf0e10cSrcweir if ( m_pInterfaceContainer )
295cdf0e10cSrcweir {
296cdf0e10cSrcweir lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
297cdf0e10cSrcweir m_pInterfaceContainer->disposeAndClear( aSource );
298cdf0e10cSrcweir }
299cdf0e10cSrcweir
300cdf0e10cSrcweir m_xStream->closeInput();
301cdf0e10cSrcweir
302cdf0e10cSrcweir if ( m_pImpl )
303cdf0e10cSrcweir {
304cdf0e10cSrcweir m_pImpl->InputStreamDisposed( this );
305cdf0e10cSrcweir m_pImpl = NULL;
306cdf0e10cSrcweir }
307cdf0e10cSrcweir
308cdf0e10cSrcweir m_bDisposed = sal_True;
309cdf0e10cSrcweir }
310cdf0e10cSrcweir
311cdf0e10cSrcweir //-----------------------------------------------
addEventListener(const uno::Reference<lang::XEventListener> & xListener)312cdf0e10cSrcweir void SAL_CALL OInputCompStream::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
313cdf0e10cSrcweir throw ( uno::RuntimeException )
314cdf0e10cSrcweir {
315cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
316cdf0e10cSrcweir if ( m_bDisposed )
317cdf0e10cSrcweir {
318cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
319cdf0e10cSrcweir throw lang::DisposedException();
320cdf0e10cSrcweir }
321cdf0e10cSrcweir
322cdf0e10cSrcweir if ( !m_pInterfaceContainer )
323cdf0e10cSrcweir m_pInterfaceContainer = new ::cppu::OInterfaceContainerHelper( m_rMutexRef->GetMutex() );
324cdf0e10cSrcweir
325cdf0e10cSrcweir m_pInterfaceContainer->addInterface( xListener );
326cdf0e10cSrcweir }
327cdf0e10cSrcweir
328cdf0e10cSrcweir //-----------------------------------------------
removeEventListener(const uno::Reference<lang::XEventListener> & xListener)329cdf0e10cSrcweir void SAL_CALL OInputCompStream::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
330cdf0e10cSrcweir throw ( uno::RuntimeException )
331cdf0e10cSrcweir {
332cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
333cdf0e10cSrcweir if ( m_bDisposed )
334cdf0e10cSrcweir {
335cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
336cdf0e10cSrcweir throw lang::DisposedException();
337cdf0e10cSrcweir }
338cdf0e10cSrcweir
339cdf0e10cSrcweir if ( m_pInterfaceContainer )
340cdf0e10cSrcweir m_pInterfaceContainer->removeInterface( xListener );
341cdf0e10cSrcweir }
342cdf0e10cSrcweir
343cdf0e10cSrcweir //-----------------------------------------------
hasByID(const::rtl::OUString & sID)344cdf0e10cSrcweir sal_Bool SAL_CALL OInputCompStream::hasByID( const ::rtl::OUString& sID )
345cdf0e10cSrcweir throw ( io::IOException,
346cdf0e10cSrcweir uno::RuntimeException )
347cdf0e10cSrcweir {
348cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
349cdf0e10cSrcweir
350cdf0e10cSrcweir if ( m_bDisposed )
351cdf0e10cSrcweir {
352cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
353cdf0e10cSrcweir throw lang::DisposedException();
354cdf0e10cSrcweir }
355cdf0e10cSrcweir
356cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
357cdf0e10cSrcweir throw uno::RuntimeException();
358cdf0e10cSrcweir
359cdf0e10cSrcweir try
360cdf0e10cSrcweir {
361cdf0e10cSrcweir getRelationshipByID( sID );
362cdf0e10cSrcweir return sal_True;
363cdf0e10cSrcweir }
364cdf0e10cSrcweir catch( container::NoSuchElementException& )
365cdf0e10cSrcweir {}
366cdf0e10cSrcweir
367cdf0e10cSrcweir return sal_False;
368cdf0e10cSrcweir }
369cdf0e10cSrcweir
370cdf0e10cSrcweir //-----------------------------------------------
getTargetByID(const::rtl::OUString & sID)371cdf0e10cSrcweir ::rtl::OUString SAL_CALL OInputCompStream::getTargetByID( const ::rtl::OUString& sID )
372cdf0e10cSrcweir throw ( container::NoSuchElementException,
373cdf0e10cSrcweir io::IOException,
374cdf0e10cSrcweir uno::RuntimeException )
375cdf0e10cSrcweir {
376cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
377cdf0e10cSrcweir
378cdf0e10cSrcweir if ( m_bDisposed )
379cdf0e10cSrcweir {
380cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
381cdf0e10cSrcweir throw lang::DisposedException();
382cdf0e10cSrcweir }
383cdf0e10cSrcweir
384cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
385cdf0e10cSrcweir throw uno::RuntimeException();
386cdf0e10cSrcweir
387cdf0e10cSrcweir uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
388cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
389cdf0e10cSrcweir if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) )
390cdf0e10cSrcweir return aSeq[nInd].Second;
391cdf0e10cSrcweir
392cdf0e10cSrcweir return ::rtl::OUString();
393cdf0e10cSrcweir }
394cdf0e10cSrcweir
395cdf0e10cSrcweir //-----------------------------------------------
getTypeByID(const::rtl::OUString & sID)396cdf0e10cSrcweir ::rtl::OUString SAL_CALL OInputCompStream::getTypeByID( const ::rtl::OUString& sID )
397cdf0e10cSrcweir throw ( container::NoSuchElementException,
398cdf0e10cSrcweir io::IOException,
399cdf0e10cSrcweir uno::RuntimeException )
400cdf0e10cSrcweir {
401cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
402cdf0e10cSrcweir
403cdf0e10cSrcweir if ( m_bDisposed )
404cdf0e10cSrcweir {
405cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
406cdf0e10cSrcweir throw lang::DisposedException();
407cdf0e10cSrcweir }
408cdf0e10cSrcweir
409cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
410cdf0e10cSrcweir throw uno::RuntimeException();
411cdf0e10cSrcweir
412cdf0e10cSrcweir uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
413cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
414cdf0e10cSrcweir if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) )
415cdf0e10cSrcweir return aSeq[nInd].Second;
416cdf0e10cSrcweir
417cdf0e10cSrcweir return ::rtl::OUString();
418cdf0e10cSrcweir }
419cdf0e10cSrcweir
420cdf0e10cSrcweir //-----------------------------------------------
getRelationshipByID(const::rtl::OUString & sID)421cdf0e10cSrcweir uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByID( const ::rtl::OUString& sID )
422cdf0e10cSrcweir throw ( container::NoSuchElementException,
423cdf0e10cSrcweir io::IOException,
424cdf0e10cSrcweir uno::RuntimeException )
425cdf0e10cSrcweir {
426cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
427cdf0e10cSrcweir
428cdf0e10cSrcweir if ( m_bDisposed )
429cdf0e10cSrcweir {
430cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
431cdf0e10cSrcweir throw lang::DisposedException();
432cdf0e10cSrcweir }
433cdf0e10cSrcweir
434cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
435cdf0e10cSrcweir throw uno::RuntimeException();
436cdf0e10cSrcweir
437cdf0e10cSrcweir // TODO/LATER: in future the unification of the ID could be checked
438cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
439cdf0e10cSrcweir for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ )
440cdf0e10cSrcweir for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ )
441cdf0e10cSrcweir if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) )
442cdf0e10cSrcweir {
443cdf0e10cSrcweir if ( aSeq[nInd1][nInd2].Second.equals( sID ) )
444cdf0e10cSrcweir return aSeq[nInd1];
445cdf0e10cSrcweir break;
446cdf0e10cSrcweir }
447cdf0e10cSrcweir
448cdf0e10cSrcweir throw container::NoSuchElementException();
449cdf0e10cSrcweir }
450cdf0e10cSrcweir
451cdf0e10cSrcweir //-----------------------------------------------
getRelationshipsByType(const::rtl::OUString & sType)452cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getRelationshipsByType( const ::rtl::OUString& sType )
453cdf0e10cSrcweir throw ( io::IOException,
454cdf0e10cSrcweir uno::RuntimeException )
455cdf0e10cSrcweir {
456cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
457cdf0e10cSrcweir
458cdf0e10cSrcweir if ( m_bDisposed )
459cdf0e10cSrcweir {
460cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
461cdf0e10cSrcweir throw lang::DisposedException();
462cdf0e10cSrcweir }
463cdf0e10cSrcweir
464cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
465cdf0e10cSrcweir throw uno::RuntimeException();
466cdf0e10cSrcweir
467cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > aResult;
468cdf0e10cSrcweir sal_Int32 nEntriesNum = 0;
469cdf0e10cSrcweir
470cdf0e10cSrcweir // TODO/LATER: in future the unification of the ID could be checked
471cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
472cdf0e10cSrcweir for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ )
473cdf0e10cSrcweir for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ )
474cdf0e10cSrcweir if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) )
475cdf0e10cSrcweir {
476cdf0e10cSrcweir if ( aSeq[nInd1][nInd2].Second.equals( sType ) )
477cdf0e10cSrcweir {
478cdf0e10cSrcweir aResult.realloc( nEntriesNum );
479cdf0e10cSrcweir aResult[nEntriesNum-1] = aSeq[nInd1];
480cdf0e10cSrcweir }
481cdf0e10cSrcweir break;
482cdf0e10cSrcweir }
483cdf0e10cSrcweir
484cdf0e10cSrcweir return aResult;
485cdf0e10cSrcweir }
486cdf0e10cSrcweir
487cdf0e10cSrcweir //-----------------------------------------------
getAllRelationships()488cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::getAllRelationships()
489cdf0e10cSrcweir throw (io::IOException, uno::RuntimeException)
490cdf0e10cSrcweir {
491cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
492cdf0e10cSrcweir
493cdf0e10cSrcweir if ( m_bDisposed )
494cdf0e10cSrcweir {
495cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
496cdf0e10cSrcweir throw lang::DisposedException();
497cdf0e10cSrcweir }
498cdf0e10cSrcweir
499cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
500cdf0e10cSrcweir throw uno::RuntimeException();
501cdf0e10cSrcweir
502cdf0e10cSrcweir // TODO/LATER: in future the information could be taken directly from m_pImpl when possible
503cdf0e10cSrcweir uno::Sequence< uno::Sequence< beans::StringPair > > aResult;
504cdf0e10cSrcweir for ( sal_Int32 aInd = 0; aInd < m_aProperties.getLength(); aInd++ )
505cdf0e10cSrcweir if ( m_aProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) )
506cdf0e10cSrcweir {
507cdf0e10cSrcweir if ( m_aProperties[aInd].Value >>= aResult )
508cdf0e10cSrcweir return aResult;
509cdf0e10cSrcweir
510cdf0e10cSrcweir break;
511cdf0e10cSrcweir }
512cdf0e10cSrcweir
513cdf0e10cSrcweir throw io::IOException(); // the relations info could not be read
514cdf0e10cSrcweir }
515cdf0e10cSrcweir
516cdf0e10cSrcweir //-----------------------------------------------
insertRelationshipByID(const::rtl::OUString &,const uno::Sequence<beans::StringPair> &,::sal_Bool)517cdf0e10cSrcweir void SAL_CALL OInputCompStream::insertRelationshipByID( const ::rtl::OUString& /*sID*/, const uno::Sequence< beans::StringPair >& /*aEntry*/, ::sal_Bool /*bReplace*/ )
518cdf0e10cSrcweir throw ( container::ElementExistException,
519cdf0e10cSrcweir io::IOException,
520cdf0e10cSrcweir uno::RuntimeException )
521cdf0e10cSrcweir {
522cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
523cdf0e10cSrcweir
524cdf0e10cSrcweir if ( m_bDisposed )
525cdf0e10cSrcweir {
526cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
527cdf0e10cSrcweir throw lang::DisposedException();
528cdf0e10cSrcweir }
529cdf0e10cSrcweir
530cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
531cdf0e10cSrcweir throw uno::RuntimeException();
532cdf0e10cSrcweir
533cdf0e10cSrcweir throw io::IOException(); // TODO: Access denied
534cdf0e10cSrcweir }
535cdf0e10cSrcweir
536cdf0e10cSrcweir //-----------------------------------------------
removeRelationshipByID(const::rtl::OUString &)537cdf0e10cSrcweir void SAL_CALL OInputCompStream::removeRelationshipByID( const ::rtl::OUString& /*sID*/ )
538cdf0e10cSrcweir throw ( container::NoSuchElementException,
539cdf0e10cSrcweir io::IOException,
540cdf0e10cSrcweir uno::RuntimeException )
541cdf0e10cSrcweir {
542cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
543cdf0e10cSrcweir
544cdf0e10cSrcweir if ( m_bDisposed )
545cdf0e10cSrcweir {
546cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
547cdf0e10cSrcweir throw lang::DisposedException();
548cdf0e10cSrcweir }
549cdf0e10cSrcweir
550cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
551cdf0e10cSrcweir throw uno::RuntimeException();
552cdf0e10cSrcweir
553cdf0e10cSrcweir throw io::IOException(); // TODO: Access denied
554cdf0e10cSrcweir }
555cdf0e10cSrcweir
556cdf0e10cSrcweir //-----------------------------------------------
insertRelationships(const uno::Sequence<uno::Sequence<beans::StringPair>> &,::sal_Bool)557cdf0e10cSrcweir void SAL_CALL OInputCompStream::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& /*aEntries*/, ::sal_Bool /*bReplace*/ )
558cdf0e10cSrcweir throw ( container::ElementExistException,
559cdf0e10cSrcweir io::IOException,
560cdf0e10cSrcweir uno::RuntimeException )
561cdf0e10cSrcweir {
562cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
563cdf0e10cSrcweir
564cdf0e10cSrcweir if ( m_bDisposed )
565cdf0e10cSrcweir {
566cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
567cdf0e10cSrcweir throw lang::DisposedException();
568cdf0e10cSrcweir }
569cdf0e10cSrcweir
570cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
571cdf0e10cSrcweir throw uno::RuntimeException();
572cdf0e10cSrcweir
573cdf0e10cSrcweir throw io::IOException(); // TODO: Access denied
574cdf0e10cSrcweir }
575cdf0e10cSrcweir
576cdf0e10cSrcweir //-----------------------------------------------
clearRelationships()577cdf0e10cSrcweir void SAL_CALL OInputCompStream::clearRelationships()
578cdf0e10cSrcweir throw ( io::IOException,
579cdf0e10cSrcweir uno::RuntimeException )
580cdf0e10cSrcweir {
581cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
582cdf0e10cSrcweir
583cdf0e10cSrcweir if ( m_bDisposed )
584cdf0e10cSrcweir {
585cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
586cdf0e10cSrcweir throw lang::DisposedException();
587cdf0e10cSrcweir }
588cdf0e10cSrcweir
589cdf0e10cSrcweir if ( m_nStorageType != embed::StorageFormats::OFOPXML )
590cdf0e10cSrcweir throw uno::RuntimeException();
591cdf0e10cSrcweir
592cdf0e10cSrcweir throw io::IOException(); // TODO: Access denied
593cdf0e10cSrcweir }
594cdf0e10cSrcweir
595cdf0e10cSrcweir //-----------------------------------------------
getPropertySetInfo()596cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL OInputCompStream::getPropertySetInfo()
597cdf0e10cSrcweir throw ( uno::RuntimeException )
598cdf0e10cSrcweir {
599cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
600cdf0e10cSrcweir
601cdf0e10cSrcweir if ( m_bDisposed )
602cdf0e10cSrcweir {
603cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
604cdf0e10cSrcweir throw lang::DisposedException();
605cdf0e10cSrcweir }
606cdf0e10cSrcweir
607cdf0e10cSrcweir //TODO:
608cdf0e10cSrcweir return uno::Reference< beans::XPropertySetInfo >();
609cdf0e10cSrcweir }
610cdf0e10cSrcweir
611cdf0e10cSrcweir //-----------------------------------------------
setPropertyValue(const::rtl::OUString & aPropertyName,const uno::Any &)612cdf0e10cSrcweir void SAL_CALL OInputCompStream::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& /*aValue*/ )
613cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
614cdf0e10cSrcweir beans::PropertyVetoException,
615cdf0e10cSrcweir lang::IllegalArgumentException,
616cdf0e10cSrcweir lang::WrappedTargetException,
617cdf0e10cSrcweir uno::RuntimeException )
618cdf0e10cSrcweir {
619cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
620cdf0e10cSrcweir
621cdf0e10cSrcweir if ( m_bDisposed )
622cdf0e10cSrcweir {
623cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
624cdf0e10cSrcweir throw lang::DisposedException();
625cdf0e10cSrcweir }
626cdf0e10cSrcweir
627cdf0e10cSrcweir // all the provided properties are accessible
628cdf0e10cSrcweir for ( sal_Int32 aInd = 0; aInd < m_aProperties.getLength(); aInd++ )
629cdf0e10cSrcweir {
630cdf0e10cSrcweir if ( m_aProperties[aInd].Name.equals( aPropertyName ) )
631cdf0e10cSrcweir {
632cdf0e10cSrcweir throw beans::PropertyVetoException(); // TODO
633cdf0e10cSrcweir }
634cdf0e10cSrcweir }
635cdf0e10cSrcweir
636cdf0e10cSrcweir throw beans::UnknownPropertyException(); // TODO
637cdf0e10cSrcweir }
638cdf0e10cSrcweir
639cdf0e10cSrcweir
640cdf0e10cSrcweir //-----------------------------------------------
getPropertyValue(const::rtl::OUString & aProp)641cdf0e10cSrcweir uno::Any SAL_CALL OInputCompStream::getPropertyValue( const ::rtl::OUString& aProp )
642cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
643cdf0e10cSrcweir lang::WrappedTargetException,
644cdf0e10cSrcweir uno::RuntimeException )
645cdf0e10cSrcweir {
646cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
647cdf0e10cSrcweir
648cdf0e10cSrcweir if ( m_bDisposed )
649cdf0e10cSrcweir {
650cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
651cdf0e10cSrcweir throw lang::DisposedException();
652cdf0e10cSrcweir }
653cdf0e10cSrcweir
654cdf0e10cSrcweir ::rtl::OUString aPropertyName;
655cdf0e10cSrcweir if ( aProp.equalsAscii( "IsEncrypted" ) )
656cdf0e10cSrcweir aPropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) );
657cdf0e10cSrcweir else
658cdf0e10cSrcweir aPropertyName = aProp;
659cdf0e10cSrcweir
660cdf0e10cSrcweir if ( aPropertyName.equalsAscii( "RelationsInfo" ) )
661cdf0e10cSrcweir throw beans::UnknownPropertyException(); // TODO
662cdf0e10cSrcweir
663cdf0e10cSrcweir // all the provided properties are accessible
664cdf0e10cSrcweir for ( sal_Int32 aInd = 0; aInd < m_aProperties.getLength(); aInd++ )
665cdf0e10cSrcweir {
666cdf0e10cSrcweir if ( m_aProperties[aInd].Name.equals( aPropertyName ) )
667cdf0e10cSrcweir {
668cdf0e10cSrcweir return m_aProperties[aInd].Value;
669cdf0e10cSrcweir }
670cdf0e10cSrcweir }
671cdf0e10cSrcweir
672cdf0e10cSrcweir throw beans::UnknownPropertyException(); // TODO
673cdf0e10cSrcweir }
674cdf0e10cSrcweir
675cdf0e10cSrcweir
676cdf0e10cSrcweir //-----------------------------------------------
addPropertyChangeListener(const::rtl::OUString &,const uno::Reference<beans::XPropertyChangeListener> &)677cdf0e10cSrcweir void SAL_CALL OInputCompStream::addPropertyChangeListener(
678cdf0e10cSrcweir const ::rtl::OUString& /*aPropertyName*/,
679cdf0e10cSrcweir const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
680cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
681cdf0e10cSrcweir lang::WrappedTargetException,
682cdf0e10cSrcweir uno::RuntimeException )
683cdf0e10cSrcweir {
684cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
685cdf0e10cSrcweir
686cdf0e10cSrcweir if ( m_bDisposed )
687cdf0e10cSrcweir {
688cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
689cdf0e10cSrcweir throw lang::DisposedException();
690cdf0e10cSrcweir }
691cdf0e10cSrcweir
692cdf0e10cSrcweir //TODO:
693cdf0e10cSrcweir }
694cdf0e10cSrcweir
695cdf0e10cSrcweir
696cdf0e10cSrcweir //-----------------------------------------------
removePropertyChangeListener(const::rtl::OUString &,const uno::Reference<beans::XPropertyChangeListener> &)697cdf0e10cSrcweir void SAL_CALL OInputCompStream::removePropertyChangeListener(
698cdf0e10cSrcweir const ::rtl::OUString& /*aPropertyName*/,
699cdf0e10cSrcweir const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
700cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
701cdf0e10cSrcweir lang::WrappedTargetException,
702cdf0e10cSrcweir uno::RuntimeException )
703cdf0e10cSrcweir {
704cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
705cdf0e10cSrcweir
706cdf0e10cSrcweir if ( m_bDisposed )
707cdf0e10cSrcweir {
708cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
709cdf0e10cSrcweir throw lang::DisposedException();
710cdf0e10cSrcweir }
711cdf0e10cSrcweir
712cdf0e10cSrcweir //TODO:
713cdf0e10cSrcweir }
714cdf0e10cSrcweir
715cdf0e10cSrcweir
716cdf0e10cSrcweir //-----------------------------------------------
addVetoableChangeListener(const::rtl::OUString &,const uno::Reference<beans::XVetoableChangeListener> &)717cdf0e10cSrcweir void SAL_CALL OInputCompStream::addVetoableChangeListener(
718cdf0e10cSrcweir const ::rtl::OUString& /*PropertyName*/,
719cdf0e10cSrcweir const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
720cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
721cdf0e10cSrcweir lang::WrappedTargetException,
722cdf0e10cSrcweir uno::RuntimeException )
723cdf0e10cSrcweir {
724cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
725cdf0e10cSrcweir
726cdf0e10cSrcweir if ( m_bDisposed )
727cdf0e10cSrcweir {
728cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
729cdf0e10cSrcweir throw lang::DisposedException();
730cdf0e10cSrcweir }
731cdf0e10cSrcweir
732cdf0e10cSrcweir //TODO:
733cdf0e10cSrcweir }
734cdf0e10cSrcweir
735cdf0e10cSrcweir
736cdf0e10cSrcweir //-----------------------------------------------
removeVetoableChangeListener(const::rtl::OUString &,const uno::Reference<beans::XVetoableChangeListener> &)737cdf0e10cSrcweir void SAL_CALL OInputCompStream::removeVetoableChangeListener(
738cdf0e10cSrcweir const ::rtl::OUString& /*PropertyName*/,
739cdf0e10cSrcweir const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
740cdf0e10cSrcweir throw ( beans::UnknownPropertyException,
741cdf0e10cSrcweir lang::WrappedTargetException,
742cdf0e10cSrcweir uno::RuntimeException )
743cdf0e10cSrcweir {
744cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
745cdf0e10cSrcweir
746cdf0e10cSrcweir if ( m_bDisposed )
747cdf0e10cSrcweir {
748cdf0e10cSrcweir ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Disposed!" ) ) );
749cdf0e10cSrcweir throw lang::DisposedException();
750cdf0e10cSrcweir }
751cdf0e10cSrcweir
752cdf0e10cSrcweir //TODO:
753cdf0e10cSrcweir }
754cdf0e10cSrcweir
755cdf0e10cSrcweir
756