1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ocompinstream.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_package.hxx"
34 #include "ocompinstream.hxx"
35 #include <com/sun/star/lang/DisposedException.hpp>
36 #include <osl/diagnose.h>
38 #include "owriteablestream.hxx"
39 #include "xstorage.hxx"
41 using namespace ::com::sun::star
;
43 //-----------------------------------------------
44 OInputCompStream::OInputCompStream( OWriteStream_Impl
& aImpl
,
45 uno::Reference
< io::XInputStream
> xStream
,
46 const uno::Sequence
< beans::PropertyValue
>& aProps
,
47 sal_Int16 nStorageType
)
49 , m_rMutexRef( m_pImpl
->m_rMutexRef
)
50 , m_xStream( xStream
)
51 , m_pInterfaceContainer( NULL
)
52 , m_aProperties( aProps
)
53 , m_bDisposed( sal_False
)
54 , m_nStorageType( nStorageType
)
56 OSL_ENSURE( m_pImpl
->m_rMutexRef
.Is(), "No mutex is provided!\n" );
57 if ( !m_pImpl
->m_rMutexRef
.Is() )
58 throw uno::RuntimeException(); // just a disaster
60 OSL_ENSURE( xStream
.is(), "No stream is provided!\n" );
63 //-----------------------------------------------
64 OInputCompStream::OInputCompStream( uno::Reference
< io::XInputStream
> xStream
,
65 const uno::Sequence
< beans::PropertyValue
>& aProps
,
66 sal_Int16 nStorageType
)
68 , m_rMutexRef( new SotMutexHolder
)
69 , m_xStream( xStream
)
70 , m_pInterfaceContainer( NULL
)
71 , m_aProperties( aProps
)
72 , m_bDisposed( sal_False
)
73 , m_nStorageType( nStorageType
)
75 OSL_ENSURE( xStream
.is(), "No stream is provided!\n" );
78 //-----------------------------------------------
79 OInputCompStream::~OInputCompStream()
82 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
90 if ( m_pInterfaceContainer
)
91 delete m_pInterfaceContainer
;
95 //-----------------------------------------------
96 uno::Any SAL_CALL
OInputCompStream::queryInterface( const uno::Type
& rType
)
97 throw( uno::RuntimeException
)
102 aReturn
<<= ::cppu::queryInterface
104 , static_cast<io::XInputStream
*> ( this )
105 , static_cast<io::XStream
*> ( this )
106 , static_cast<lang::XComponent
*> ( this )
107 , static_cast<beans::XPropertySet
*> ( this )
108 , static_cast<embed::XExtendedStorageStream
*> ( this ) );
110 if ( aReturn
.hasValue() == sal_True
)
113 if ( m_nStorageType
== OFOPXML_STORAGE
)
115 aReturn
<<= ::cppu::queryInterface
117 , static_cast<embed::XRelationshipAccess
*> ( this ) );
119 if ( aReturn
.hasValue() == sal_True
)
123 return OWeakObject::queryInterface( rType
);
126 //-----------------------------------------------
127 sal_Int32 SAL_CALL
OInputCompStream::readBytes( uno::Sequence
< sal_Int8
>& aData
, sal_Int32 nBytesToRead
)
128 throw ( io::NotConnectedException
,
129 io::BufferSizeExceededException
,
131 uno::RuntimeException
)
133 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
136 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
137 throw lang::DisposedException();
140 if ( !m_xStream
.is() )
142 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"No stream!" ) ) );
143 throw uno::RuntimeException();
146 return m_xStream
->readBytes( aData
, nBytesToRead
);
149 //-----------------------------------------------
150 sal_Int32 SAL_CALL
OInputCompStream::readSomeBytes( uno::Sequence
< sal_Int8
>& aData
, sal_Int32 nMaxBytesToRead
)
151 throw ( io::NotConnectedException
,
152 io::BufferSizeExceededException
,
154 uno::RuntimeException
)
156 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
159 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
160 throw lang::DisposedException();
163 if ( !m_xStream
.is() )
165 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"No stream!" ) ) );
166 throw uno::RuntimeException();
169 return m_xStream
->readSomeBytes( aData
, nMaxBytesToRead
);
173 //-----------------------------------------------
174 void SAL_CALL
OInputCompStream::skipBytes( sal_Int32 nBytesToSkip
)
175 throw ( io::NotConnectedException
,
176 io::BufferSizeExceededException
,
178 uno::RuntimeException
)
180 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
183 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
184 throw lang::DisposedException();
187 if ( !m_xStream
.is() )
189 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"No stream!" ) ) );
190 throw uno::RuntimeException();
193 m_xStream
->skipBytes( nBytesToSkip
);
197 //-----------------------------------------------
198 sal_Int32 SAL_CALL
OInputCompStream::available( )
199 throw ( io::NotConnectedException
,
201 uno::RuntimeException
)
203 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
206 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
207 throw lang::DisposedException();
210 if ( !m_xStream
.is() )
212 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"No stream!" ) ) );
213 throw uno::RuntimeException();
216 return m_xStream
->available();
220 //-----------------------------------------------
221 void SAL_CALL
OInputCompStream::closeInput( )
222 throw ( io::NotConnectedException
,
224 uno::RuntimeException
)
229 //-----------------------------------------------
230 uno::Reference
< io::XInputStream
> SAL_CALL
OInputCompStream::getInputStream()
231 throw ( uno::RuntimeException
)
233 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
236 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
237 throw lang::DisposedException();
240 if ( !m_xStream
.is() )
241 return uno::Reference
< io::XInputStream
>();
243 return uno::Reference
< io::XInputStream
>( static_cast< io::XInputStream
* >( this ), uno::UNO_QUERY
);
246 //-----------------------------------------------
247 uno::Reference
< io::XOutputStream
> SAL_CALL
OInputCompStream::getOutputStream()
248 throw ( uno::RuntimeException
)
250 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
253 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
254 throw lang::DisposedException();
257 return uno::Reference
< io::XOutputStream
>();
260 //-----------------------------------------------
261 void OInputCompStream::InternalDispose()
263 // can be called only by OWriteStream_Impl
264 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
267 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
268 throw lang::DisposedException();
271 // the source object is also a kind of locker for the current object
272 // since the listeners could dispose the object while being notified
273 lang::EventObject
aSource( static_cast< ::cppu::OWeakObject
*>( this ) );
275 if ( m_pInterfaceContainer
)
276 m_pInterfaceContainer
->disposeAndClear( aSource
);
280 m_xStream
->closeInput();
282 catch( uno::Exception
& )
286 m_bDisposed
= sal_True
;
289 //-----------------------------------------------
290 void SAL_CALL
OInputCompStream::dispose( )
291 throw ( uno::RuntimeException
)
293 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
296 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
297 throw lang::DisposedException();
300 if ( m_pInterfaceContainer
)
302 lang::EventObject
aSource( static_cast< ::cppu::OWeakObject
*>( this ) );
303 m_pInterfaceContainer
->disposeAndClear( aSource
);
306 m_xStream
->closeInput();
310 m_pImpl
->InputStreamDisposed( this );
314 m_bDisposed
= sal_True
;
317 //-----------------------------------------------
318 void SAL_CALL
OInputCompStream::addEventListener( const uno::Reference
< lang::XEventListener
>& xListener
)
319 throw ( uno::RuntimeException
)
321 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
324 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
325 throw lang::DisposedException();
328 if ( !m_pInterfaceContainer
)
329 m_pInterfaceContainer
= new ::cppu::OInterfaceContainerHelper( m_rMutexRef
->GetMutex() );
331 m_pInterfaceContainer
->addInterface( xListener
);
334 //-----------------------------------------------
335 void SAL_CALL
OInputCompStream::removeEventListener( const uno::Reference
< lang::XEventListener
>& xListener
)
336 throw ( uno::RuntimeException
)
338 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
341 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
342 throw lang::DisposedException();
345 if ( m_pInterfaceContainer
)
346 m_pInterfaceContainer
->removeInterface( xListener
);
349 //-----------------------------------------------
350 sal_Bool SAL_CALL
OInputCompStream::hasByID( const ::rtl::OUString
& sID
)
351 throw ( io::IOException
,
352 uno::RuntimeException
)
354 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
358 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
359 throw lang::DisposedException();
362 if ( m_nStorageType
!= OFOPXML_STORAGE
)
363 throw uno::RuntimeException();
367 getRelationshipByID( sID
);
370 catch( container::NoSuchElementException
& )
376 //-----------------------------------------------
377 ::rtl::OUString SAL_CALL
OInputCompStream::getTargetByID( const ::rtl::OUString
& sID
)
378 throw ( container::NoSuchElementException
,
380 uno::RuntimeException
)
382 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
386 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
387 throw lang::DisposedException();
390 if ( m_nStorageType
!= OFOPXML_STORAGE
)
391 throw uno::RuntimeException();
393 uno::Sequence
< beans::StringPair
> aSeq
= getRelationshipByID( sID
);
394 for ( sal_Int32 nInd
= 0; nInd
< aSeq
.getLength(); nInd
++ )
395 if ( aSeq
[nInd
].First
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) )
396 return aSeq
[nInd
].Second
;
398 return ::rtl::OUString();
401 //-----------------------------------------------
402 ::rtl::OUString SAL_CALL
OInputCompStream::getTypeByID( const ::rtl::OUString
& sID
)
403 throw ( container::NoSuchElementException
,
405 uno::RuntimeException
)
407 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
411 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
412 throw lang::DisposedException();
415 if ( m_nStorageType
!= OFOPXML_STORAGE
)
416 throw uno::RuntimeException();
418 uno::Sequence
< beans::StringPair
> aSeq
= getRelationshipByID( sID
);
419 for ( sal_Int32 nInd
= 0; nInd
< aSeq
.getLength(); nInd
++ )
420 if ( aSeq
[nInd
].First
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) )
421 return aSeq
[nInd
].Second
;
423 return ::rtl::OUString();
426 //-----------------------------------------------
427 uno::Sequence
< beans::StringPair
> SAL_CALL
OInputCompStream::getRelationshipByID( const ::rtl::OUString
& sID
)
428 throw ( container::NoSuchElementException
,
430 uno::RuntimeException
)
432 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
436 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
437 throw lang::DisposedException();
440 if ( m_nStorageType
!= OFOPXML_STORAGE
)
441 throw uno::RuntimeException();
443 // TODO/LATER: in future the unification of the ID could be checked
444 uno::Sequence
< uno::Sequence
< beans::StringPair
> > aSeq
= getAllRelationships();
445 for ( sal_Int32 nInd1
= 0; nInd1
< aSeq
.getLength(); nInd1
++ )
446 for ( sal_Int32 nInd2
= 0; nInd2
< aSeq
[nInd1
].getLength(); nInd2
++ )
447 if ( aSeq
[nInd1
][nInd2
].First
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) )
449 if ( aSeq
[nInd1
][nInd2
].Second
.equals( sID
) )
454 throw container::NoSuchElementException();
457 //-----------------------------------------------
458 uno::Sequence
< uno::Sequence
< beans::StringPair
> > SAL_CALL
OInputCompStream::getRelationshipsByType( const ::rtl::OUString
& sType
)
459 throw ( io::IOException
,
460 uno::RuntimeException
)
462 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
466 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
467 throw lang::DisposedException();
470 if ( m_nStorageType
!= OFOPXML_STORAGE
)
471 throw uno::RuntimeException();
473 uno::Sequence
< uno::Sequence
< beans::StringPair
> > aResult
;
474 sal_Int32 nEntriesNum
= 0;
476 // TODO/LATER: in future the unification of the ID could be checked
477 uno::Sequence
< uno::Sequence
< beans::StringPair
> > aSeq
= getAllRelationships();
478 for ( sal_Int32 nInd1
= 0; nInd1
< aSeq
.getLength(); nInd1
++ )
479 for ( sal_Int32 nInd2
= 0; nInd2
< aSeq
[nInd1
].getLength(); nInd2
++ )
480 if ( aSeq
[nInd1
][nInd2
].First
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) )
482 if ( aSeq
[nInd1
][nInd2
].Second
.equals( sType
) )
484 aResult
.realloc( nEntriesNum
);
485 aResult
[nEntriesNum
-1] = aSeq
[nInd1
];
493 //-----------------------------------------------
494 uno::Sequence
< uno::Sequence
< beans::StringPair
> > SAL_CALL
OInputCompStream::getAllRelationships()
495 throw (io::IOException
, uno::RuntimeException
)
497 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
501 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
502 throw lang::DisposedException();
505 if ( m_nStorageType
!= OFOPXML_STORAGE
)
506 throw uno::RuntimeException();
508 // TODO/LATER: in future the information could be taken directly from m_pImpl when possible
509 uno::Sequence
< uno::Sequence
< beans::StringPair
> > aResult
;
510 for ( sal_Int32 aInd
= 0; aInd
< m_aProperties
.getLength(); aInd
++ )
511 if ( m_aProperties
[aInd
].Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) )
513 if ( m_aProperties
[aInd
].Value
>>= aResult
)
519 throw io::IOException(); // the relations info could not be read
522 //-----------------------------------------------
523 void SAL_CALL
OInputCompStream::insertRelationshipByID( const ::rtl::OUString
& /*sID*/, const uno::Sequence
< beans::StringPair
>& /*aEntry*/, ::sal_Bool
/*bReplace*/ )
524 throw ( container::ElementExistException
,
526 uno::RuntimeException
)
528 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
532 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
533 throw lang::DisposedException();
536 if ( m_nStorageType
!= OFOPXML_STORAGE
)
537 throw uno::RuntimeException();
539 throw io::IOException(); // TODO: Access denied
542 //-----------------------------------------------
543 void SAL_CALL
OInputCompStream::removeRelationshipByID( const ::rtl::OUString
& /*sID*/ )
544 throw ( container::NoSuchElementException
,
546 uno::RuntimeException
)
548 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
552 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
553 throw lang::DisposedException();
556 if ( m_nStorageType
!= OFOPXML_STORAGE
)
557 throw uno::RuntimeException();
559 throw io::IOException(); // TODO: Access denied
562 //-----------------------------------------------
563 void SAL_CALL
OInputCompStream::insertRelationships( const uno::Sequence
< uno::Sequence
< beans::StringPair
> >& /*aEntries*/, ::sal_Bool
/*bReplace*/ )
564 throw ( container::ElementExistException
,
566 uno::RuntimeException
)
568 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
572 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
573 throw lang::DisposedException();
576 if ( m_nStorageType
!= OFOPXML_STORAGE
)
577 throw uno::RuntimeException();
579 throw io::IOException(); // TODO: Access denied
582 //-----------------------------------------------
583 void SAL_CALL
OInputCompStream::clearRelationships()
584 throw ( io::IOException
,
585 uno::RuntimeException
)
587 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
591 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
592 throw lang::DisposedException();
595 if ( m_nStorageType
!= OFOPXML_STORAGE
)
596 throw uno::RuntimeException();
598 throw io::IOException(); // TODO: Access denied
601 //-----------------------------------------------
602 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
OInputCompStream::getPropertySetInfo()
603 throw ( uno::RuntimeException
)
605 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
609 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
610 throw lang::DisposedException();
614 return uno::Reference
< beans::XPropertySetInfo
>();
617 //-----------------------------------------------
618 void SAL_CALL
OInputCompStream::setPropertyValue( const ::rtl::OUString
& aPropertyName
, const uno::Any
& /*aValue*/ )
619 throw ( beans::UnknownPropertyException
,
620 beans::PropertyVetoException
,
621 lang::IllegalArgumentException
,
622 lang::WrappedTargetException
,
623 uno::RuntimeException
)
625 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
629 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
630 throw lang::DisposedException();
633 // all the provided properties are accessible
634 for ( sal_Int32 aInd
= 0; aInd
< m_aProperties
.getLength(); aInd
++ )
636 if ( m_aProperties
[aInd
].Name
.equals( aPropertyName
) )
638 throw beans::PropertyVetoException(); // TODO
642 throw beans::UnknownPropertyException(); // TODO
646 //-----------------------------------------------
647 uno::Any SAL_CALL
OInputCompStream::getPropertyValue( const ::rtl::OUString
& aProp
)
648 throw ( beans::UnknownPropertyException
,
649 lang::WrappedTargetException
,
650 uno::RuntimeException
)
652 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
656 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
657 throw lang::DisposedException();
660 ::rtl::OUString aPropertyName
;
661 if ( aProp
.equalsAscii( "IsEncrypted" ) )
662 aPropertyName
= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) );
664 aPropertyName
= aProp
;
666 if ( aPropertyName
.equalsAscii( "RelationsInfo" ) )
667 throw beans::UnknownPropertyException(); // TODO
669 // all the provided properties are accessible
670 for ( sal_Int32 aInd
= 0; aInd
< m_aProperties
.getLength(); aInd
++ )
672 if ( m_aProperties
[aInd
].Name
.equals( aPropertyName
) )
674 return m_aProperties
[aInd
].Value
;
678 throw beans::UnknownPropertyException(); // TODO
682 //-----------------------------------------------
683 void SAL_CALL
OInputCompStream::addPropertyChangeListener(
684 const ::rtl::OUString
& /*aPropertyName*/,
685 const uno::Reference
< beans::XPropertyChangeListener
>& /*xListener*/ )
686 throw ( beans::UnknownPropertyException
,
687 lang::WrappedTargetException
,
688 uno::RuntimeException
)
690 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
694 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
695 throw lang::DisposedException();
702 //-----------------------------------------------
703 void SAL_CALL
OInputCompStream::removePropertyChangeListener(
704 const ::rtl::OUString
& /*aPropertyName*/,
705 const uno::Reference
< beans::XPropertyChangeListener
>& /*aListener*/ )
706 throw ( beans::UnknownPropertyException
,
707 lang::WrappedTargetException
,
708 uno::RuntimeException
)
710 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
714 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
715 throw lang::DisposedException();
722 //-----------------------------------------------
723 void SAL_CALL
OInputCompStream::addVetoableChangeListener(
724 const ::rtl::OUString
& /*PropertyName*/,
725 const uno::Reference
< beans::XVetoableChangeListener
>& /*aListener*/ )
726 throw ( beans::UnknownPropertyException
,
727 lang::WrappedTargetException
,
728 uno::RuntimeException
)
730 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
734 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
735 throw lang::DisposedException();
742 //-----------------------------------------------
743 void SAL_CALL
OInputCompStream::removeVetoableChangeListener(
744 const ::rtl::OUString
& /*PropertyName*/,
745 const uno::Reference
< beans::XVetoableChangeListener
>& /*aListener*/ )
746 throw ( beans::UnknownPropertyException
,
747 lang::WrappedTargetException
,
748 uno::RuntimeException
)
750 ::osl::MutexGuard
aGuard( m_rMutexRef
->GetMutex() );
754 ::package::StaticAddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX
"Disposed!" ) ) );
755 throw lang::DisposedException();