1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
33 #include "filrset.hxx"
34 #include <com/sun/star/ucb/OpenMode.hpp>
36 #include <com/sun/star/uno/Reference.h>
38 #include <com/sun/star/beans/PropertyAttribute.hpp>
39 #include <com/sun/star/ucb/ListActionType.hpp>
40 #include <com/sun/star/ucb/XSourceInitialization.hpp>
41 #include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
42 #include <ucbhelper/resultsetmetadata.hxx>
44 using namespace fileaccess
;
45 using namespace com::sun::star
;
47 XResultSet_impl::XResultSet_impl(
49 const rtl::OUString
& aUnqPath
,
51 const uno::Sequence
< beans::Property
>& seq
,
52 const uno::Sequence
< ucb::NumberedSortingInfo
>& seqSort
)
53 : m_pMyShell( pMyShell
),
54 m_xProvider( pMyShell
->m_pProvider
),
56 m_nOpenMode( OpenMode
),
57 m_bRowCountFinal( false ),
58 m_aBaseDirectory( aUnqPath
),
59 m_aFolder( aUnqPath
),
61 m_sSortingInfo( seqSort
),
62 m_pDisposeEventListeners( 0 ),
63 m_pRowCountListeners( 0 ),
64 m_pIsFinalListeners( 0 ),
66 m_nErrorCode( TASKHANDLER_NO_ERROR
),
67 m_nMinorErrorCode( TASKHANDLER_NO_ERROR
)
69 osl::FileBase::RC err
= m_aFolder
.open();
70 if( err
!= osl::FileBase::E_None
)
75 m_nErrorCode
= TASKHANDLING_OPEN_FOR_DIRECTORYLISTING
;
76 m_nMinorErrorCode
= err
;
81 m_pMyShell
->registerNotifier( m_aBaseDirectory
,this );
85 XResultSet_impl::~XResultSet_impl()
87 m_pMyShell
->deregisterNotifier( m_aBaseDirectory
,this );
92 delete m_pDisposeEventListeners
;
93 delete m_pRowCountListeners
;
94 delete m_pIsFinalListeners
;
99 sal_Int32 SAL_CALL
XResultSet_impl::CtorSuccess()
106 sal_Int32 SAL_CALL
XResultSet_impl::getMinorError()
108 return m_nMinorErrorCode
;
113 XResultSet_impl::acquire(
117 OWeakObject::acquire();
122 XResultSet_impl::release(
126 OWeakObject::release();
132 XResultSet_impl::queryInterface(
133 const uno::Type
& rType
)
134 throw( uno::RuntimeException
)
136 uno::Any aRet
= cppu::queryInterface(
138 (static_cast< lang::XComponent
* >(this)),
139 (static_cast< lang::XTypeProvider
* >(this)),
140 (static_cast< lang::XEventListener
* >(this)),
141 (static_cast< sdbc::XRow
* >(this)),
142 (static_cast< sdbc::XResultSet
* >(this)),
143 (static_cast< sdbc::XCloseable
* >(this)),
144 (static_cast< sdbc::XResultSetMetaDataSupplier
* >(this)),
145 (static_cast< beans::XPropertySet
* >(this)),
146 (static_cast< ucb::XContentAccess
* >(this)),
147 (static_cast< ucb::XDynamicResultSet
* >(this)) );
148 return aRet
.hasValue() ? aRet
: OWeakObject::queryInterface( rType
);
153 XResultSet_impl::disposing( const lang::EventObject
& )
154 throw( uno::RuntimeException
)
160 XTYPEPROVIDER_IMPL_10( XResultSet_impl
,
163 lang::XEventListener
,
168 sdbc::XResultSetMetaDataSupplier
,
170 ucb::XContentAccess
)
174 XResultSet_impl::addEventListener(
175 const uno::Reference
< lang::XEventListener
>& Listener
)
176 throw( uno::RuntimeException
)
178 osl::MutexGuard
aGuard( m_aMutex
);
180 if ( ! m_pDisposeEventListeners
)
181 m_pDisposeEventListeners
=
182 new cppu::OInterfaceContainerHelper( m_aEventListenerMutex
);
184 m_pDisposeEventListeners
->addInterface( Listener
);
189 XResultSet_impl::removeEventListener(
190 const uno::Reference
< lang::XEventListener
>& Listener
)
191 throw( uno::RuntimeException
)
193 osl::MutexGuard
aGuard( m_aMutex
);
195 if ( m_pDisposeEventListeners
)
196 m_pDisposeEventListeners
->removeInterface( Listener
);
202 XResultSet_impl::dispose()
203 throw( uno::RuntimeException
)
205 osl::MutexGuard
aGuard( m_aMutex
);
207 lang::EventObject aEvt
;
208 aEvt
.Source
= static_cast< lang::XComponent
* >( this );
210 if ( m_pDisposeEventListeners
&& m_pDisposeEventListeners
->getLength() )
212 m_pDisposeEventListeners
->disposeAndClear( aEvt
);
214 if( m_pRowCountListeners
&& m_pRowCountListeners
->getLength() )
216 m_pRowCountListeners
->disposeAndClear( aEvt
);
218 if( m_pIsFinalListeners
&& m_pIsFinalListeners
->getLength() )
220 m_pIsFinalListeners
->disposeAndClear( aEvt
);
226 void XResultSet_impl::rowCountChanged()
228 sal_Int32 aOldValue
,aNewValue
;
229 uno::Sequence
< uno::Reference
< uno::XInterface
> > seq
;
231 osl::MutexGuard
aGuard( m_aMutex
);
232 if( m_pRowCountListeners
)
233 seq
= m_pRowCountListeners
->getElements();
234 aNewValue
= m_aItems
.size();
235 aOldValue
= aNewValue
-1;
237 beans::PropertyChangeEvent aEv
;
238 aEv
.PropertyName
= rtl::OUString("RowCount");
240 aEv
.PropertyHandle
= -1;
241 aEv
.OldValue
<<= aOldValue
;
242 aEv
.NewValue
<<= aNewValue
;
243 for( sal_Int32 i
= 0; i
< seq
.getLength(); ++i
)
245 uno::Reference
< beans::XPropertyChangeListener
> listener(
246 seq
[i
], uno::UNO_QUERY
);
248 listener
->propertyChange( aEv
);
253 void XResultSet_impl::isFinalChanged()
255 uno::Sequence
< uno::Reference
< XInterface
> > seq
;
257 osl::MutexGuard
aGuard( m_aMutex
);
258 if( m_pIsFinalListeners
)
259 seq
= m_pIsFinalListeners
->getElements();
260 m_bRowCountFinal
= true;
262 beans::PropertyChangeEvent aEv
;
263 aEv
.PropertyName
= rtl::OUString("IsRowCountFinal");
265 aEv
.PropertyHandle
= -1;
266 sal_Bool fval
= false;
267 sal_Bool tval
= true;
268 aEv
.OldValue
<<= fval
;
269 aEv
.NewValue
<<= tval
;
270 for( sal_Int32 i
= 0; i
< seq
.getLength(); ++i
)
272 uno::Reference
< beans::XPropertyChangeListener
> listener(
273 seq
[i
], uno::UNO_QUERY
);
275 listener
->propertyChange( aEv
);
281 XResultSet_impl::OneMore(
283 throw( sdbc::SQLException
,
284 uno::RuntimeException
)
289 osl::FileBase::RC err
;
291 rtl::OUString aUnqPath
;
292 osl::DirectoryItem m_aDirIte
;
293 uno::Reference
< sdbc::XRow
> aRow
;
297 err
= m_aFolder
.getNextItem( m_aDirIte
);
299 if( err
== osl::FileBase::E_NOENT
|| err
== osl::FileBase::E_INVAL
)
303 return ( m_nIsOpen
= false );
305 else if( err
== osl::FileBase::E_None
)
307 aRow
= m_pMyShell
->getv(
308 this, m_sProperty
, m_aDirIte
, aUnqPath
, IsRegular
);
310 if( m_nOpenMode
== ucb::OpenMode::DOCUMENTS
&& IsRegular
)
312 osl::MutexGuard
aGuard( m_aMutex
);
313 m_aItems
.push_back( aRow
);
315 uno::Reference
< ucb::XContentIdentifier
>() );
316 m_aUnqPath
.push_back( aUnqPath
);
321 else if( m_nOpenMode
== ucb::OpenMode::DOCUMENTS
&& ! IsRegular
)
325 else if( m_nOpenMode
== ucb::OpenMode::FOLDERS
&& ! IsRegular
)
327 osl::MutexGuard
aGuard( m_aMutex
);
328 m_aItems
.push_back( aRow
);
330 uno::Reference
< ucb::XContentIdentifier
>() );
331 m_aUnqPath
.push_back( aUnqPath
);
335 else if( m_nOpenMode
== ucb::OpenMode::FOLDERS
&& IsRegular
)
341 osl::MutexGuard
aGuard( m_aMutex
);
342 m_aItems
.push_back( aRow
);
344 uno::Reference
< ucb::XContentIdentifier
>() );
345 m_aUnqPath
.push_back( aUnqPath
);
350 else // error fetching anything
352 throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>(), ::rtl::OUString(), 0, uno::Any() );
362 XResultSet_impl::next(
364 throw( sdbc::SQLException
,
365 uno::RuntimeException
)
368 if( ++m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) ) test
= true;
376 XResultSet_impl::isBeforeFirst(
378 throw( sdbc::SQLException
,
379 uno::RuntimeException
)
386 XResultSet_impl::isAfterLast(
388 throw( sdbc::SQLException
,
389 uno::RuntimeException
)
391 return m_nRow
>= sal::static_int_cast
<sal_Int32
>(m_aItems
.size()); // Cannot happen, if m_aFolder.isOpen()
396 XResultSet_impl::isFirst(
398 throw( sdbc::SQLException
,
399 uno::RuntimeException
)
406 XResultSet_impl::isLast(
408 throw( sdbc::SQLException
,
409 uno::RuntimeException
)
411 if( m_nRow
== sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) - 1 )
419 XResultSet_impl::beforeFirst(
421 throw( sdbc::SQLException
,
422 uno::RuntimeException
)
429 XResultSet_impl::afterLast(
431 throw( sdbc::SQLException
,
432 uno::RuntimeException
)
434 m_nRow
= sal::static_int_cast
<sal_Int32
>(m_aItems
.size());
441 XResultSet_impl::first(
443 throw( sdbc::SQLException
,
444 uno::RuntimeException
)
452 XResultSet_impl::last(
454 throw( sdbc::SQLException
,
455 uno::RuntimeException
)
457 m_nRow
= sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) - 1;
465 XResultSet_impl::getRow(
467 throw( sdbc::SQLException
,
468 uno::RuntimeException
)
470 // Test, whether behind last row
471 if( -1 == m_nRow
|| m_nRow
>= sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) )
479 sal_Bool SAL_CALL
XResultSet_impl::absolute( sal_Int32 row
)
480 throw( sdbc::SQLException
, uno::RuntimeException
)
485 if( row
>= sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) )
486 while( row
-- && OneMore() )
492 m_nRow
+= ( row
+ 1 );
497 return 0<= m_nRow
&& m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size());
504 XResultSet_impl::relative(
506 throw( sdbc::SQLException
,
507 uno::RuntimeException
)
509 if( isAfterLast() || isBeforeFirst() )
510 throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>(), ::rtl::OUString(), 0, uno::Any() );
512 while( row
-- ) next();
514 while( row
++ && m_nRow
> - 1 ) previous();
516 return 0 <= m_nRow
&& m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size());
522 XResultSet_impl::previous(
524 throw( sdbc::SQLException
,
525 uno::RuntimeException
)
527 if( m_nRow
> sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) )
528 m_nRow
= sal::static_int_cast
<sal_Int32
>(m_aItems
.size()); // Correct Handling of afterLast
529 if( 0 <= m_nRow
) -- m_nRow
;
531 return 0 <= m_nRow
&& m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size());
536 XResultSet_impl::refreshRow(
538 throw( sdbc::SQLException
,
539 uno::RuntimeException
)
541 // get the row from the filesystem
547 XResultSet_impl::rowUpdated(
549 throw( sdbc::SQLException
,
550 uno::RuntimeException
)
556 XResultSet_impl::rowInserted(
558 throw( sdbc::SQLException
,
559 uno::RuntimeException
)
565 XResultSet_impl::rowDeleted(
567 throw( sdbc::SQLException
,
568 uno::RuntimeException
)
574 uno::Reference
< uno::XInterface
> SAL_CALL
575 XResultSet_impl::getStatement(
577 throw( sdbc::SQLException
,
578 uno::RuntimeException
)
580 return uno::Reference
< uno::XInterface
>();
587 XResultSet_impl::close(
589 throw( sdbc::SQLException
,
590 uno::RuntimeException
)
596 osl::MutexGuard
aGuard( m_aMutex
);
603 rtl::OUString SAL_CALL
604 XResultSet_impl::queryContentIdentifierString(
606 throw( uno::RuntimeException
)
608 uno::Reference
< ucb::XContentIdentifier
> xContentId
609 = queryContentIdentifier();
611 if( xContentId
.is() )
612 return xContentId
->getContentIdentifier();
614 return rtl::OUString();
618 uno::Reference
< ucb::XContentIdentifier
> SAL_CALL
619 XResultSet_impl::queryContentIdentifier(
621 throw( uno::RuntimeException
)
623 if( 0 <= m_nRow
&& m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) )
625 if( ! m_aIdents
[m_nRow
].is() )
627 FileContentIdentifier
* p
628 = new FileContentIdentifier( m_pMyShell
,
629 m_aUnqPath
[ m_nRow
] );
630 m_aIdents
[m_nRow
] = uno::Reference
< ucb::XContentIdentifier
>(p
);
632 return m_aIdents
[m_nRow
];
634 return uno::Reference
< ucb::XContentIdentifier
>();
638 uno::Reference
< ucb::XContent
> SAL_CALL
639 XResultSet_impl::queryContent(
641 throw( uno::RuntimeException
)
643 if( 0 <= m_nRow
&& m_nRow
< sal::static_int_cast
<sal_Int32
>(m_aItems
.size()) )
644 return m_pMyShell
->m_pProvider
->queryContent( queryContentIdentifier() );
646 return uno::Reference
< ucb::XContent
>();
654 uno::Reference
< sdbc::XResultSet
> SAL_CALL
655 XResultSet_impl::getStaticResultSet()
656 throw( ucb::ListenerAlreadySetException
,
657 uno::RuntimeException
)
659 osl::MutexGuard
aGuard( m_aMutex
);
661 if ( m_xListener
.is() )
662 throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
664 return uno::Reference
< sdbc::XResultSet
>( this );
667 //=========================================================================
670 XResultSet_impl::setListener(
671 const uno::Reference
< ucb::XDynamicResultSetListener
>& Listener
)
672 throw( ucb::ListenerAlreadySetException
,
673 uno::RuntimeException
)
675 osl::ClearableMutexGuard
aGuard( m_aMutex
);
677 if ( m_xListener
.is() )
678 throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
680 m_xListener
= Listener
;
682 //////////////////////////////////////////////////////////////////////
683 // Create "welcome event" and send it to listener.
684 //////////////////////////////////////////////////////////////////////
686 // Note: We only have the implementation for a static result set at the
687 // moment (src590). The dynamic result sets passed to the listener
688 // are a fake. This implementation will never call "notify" at the
689 // listener to propagate any changes!!!
692 aInfo
<<= ucb::WelcomeDynamicResultSetStruct( this, /* "old" */
695 uno::Sequence
< ucb::ListAction
> aActions( 1 );
696 aActions
.getArray()[ 0 ] = ucb::ListAction( 0, // Position; not used
697 0, // Count; not used
698 ucb::ListActionType::WELCOME
,
704 static_cast< cppu::OWeakObject
* >( this ), aActions
) );
707 //=========================================================================
710 XResultSet_impl::connectToCache(
711 const uno::Reference
< ucb::XDynamicResultSet
> & xCache
)
712 throw( ucb::ListenerAlreadySetException
,
713 ucb::AlreadyInitializedException
,
714 ucb::ServiceNotFoundException
,
715 uno::RuntimeException
)
717 uno::Reference
< lang::XMultiServiceFactory
> mxSMgr
718 = m_pMyShell
->m_xMultiServiceFactory
;
720 if( m_xListener
.is() )
721 throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
723 throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
725 uno::Reference
< ucb::XSourceInitialization
> xTarget(
726 xCache
, uno::UNO_QUERY
);
727 if( xTarget
.is() && mxSMgr
.is() )
729 uno::Reference
< ucb::XCachedDynamicResultSetStubFactory
> xStubFactory
;
733 = uno::Reference
< ucb::XCachedDynamicResultSetStubFactory
>(
734 mxSMgr
->createInstance(
736 "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ),
739 catch ( uno::Exception
const & )
743 if( xStubFactory
.is() )
745 xStubFactory
->connectToCache(
746 this, xCache
,m_sSortingInfo
, NULL
);
750 throw ucb::ServiceNotFoundException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
753 //=========================================================================
756 XResultSet_impl::getCapabilities()
757 throw( uno::RuntimeException
)
759 // Never set ucb::ContentResultSetCapability::SORTED
760 // - Underlying content cannot provide sorted data...
764 // XResultSetMetaDataSupplier
765 uno::Reference
< sdbc::XResultSetMetaData
> SAL_CALL
766 XResultSet_impl::getMetaData(
768 throw( sdbc::SQLException
,
769 uno::RuntimeException
)
771 for ( sal_Int32 n
= 0; n
< m_sProperty
.getLength(); ++n
)
773 if ( m_sProperty
.getConstArray()[ n
].Name
.compareToAscii( "Title" )
776 // @@@ #82177# - Determine correct value!
777 sal_Bool bCaseSensitiveChildren
= sal_False
;
779 std::vector
< ::ucbhelper::ResultSetColumnData
>
780 aColumnData( m_sProperty
.getLength() );
781 aColumnData
[ n
].isCaseSensitive
= bCaseSensitiveChildren
;
783 ::ucbhelper::ResultSetMetaData
* p
=
784 new ::ucbhelper::ResultSetMetaData(
785 m_pMyShell
->m_xMultiServiceFactory
,
788 return uno::Reference
< sdbc::XResultSetMetaData
>( p
);
792 ::ucbhelper::ResultSetMetaData
* p
=
793 new ::ucbhelper::ResultSetMetaData(
794 m_pMyShell
->m_xMultiServiceFactory
, m_sProperty
);
795 return uno::Reference
< sdbc::XResultSetMetaData
>( p
);
801 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
802 XResultSet_impl::getPropertySetInfo()
803 throw( uno::RuntimeException
)
806 uno::Sequence
< beans::Property
> seq(2);
807 seq
[0].Name
= rtl::OUString("RowCount");
809 seq
[0].Type
= getCppuType( static_cast< sal_Int32
* >(0) );
810 seq
[0].Attributes
= beans::PropertyAttribute::READONLY
;
812 seq
[0].Name
= rtl::OUString("IsRowCountFinal");
814 seq
[0].Type
= getCppuType( static_cast< sal_Bool
* >(0) );
815 seq
[0].Attributes
= beans::PropertyAttribute::READONLY
;
817 XPropertySetInfo_impl
* p
= new XPropertySetInfo_impl( m_pMyShell
,
819 return uno::Reference
< beans::XPropertySetInfo
> ( p
);
824 void SAL_CALL
XResultSet_impl::setPropertyValue(
825 const rtl::OUString
& aPropertyName
, const uno::Any
& )
826 throw( beans::UnknownPropertyException
,
827 beans::PropertyVetoException
,
828 lang::IllegalArgumentException
,
829 lang::WrappedTargetException
,
830 uno::RuntimeException
)
832 if( aPropertyName
== rtl::OUString("IsRowCountFinal") ||
833 aPropertyName
== rtl::OUString("RowCount") )
835 throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
839 uno::Any SAL_CALL
XResultSet_impl::getPropertyValue(
840 const rtl::OUString
& PropertyName
)
841 throw( beans::UnknownPropertyException
,
842 lang::WrappedTargetException
,
843 uno::RuntimeException
)
845 if( PropertyName
== rtl::OUString("IsRowCountFinal") )
848 aAny
<<= m_bRowCountFinal
;
851 else if ( PropertyName
== rtl::OUString("RowCount") )
854 sal_Int32 count
= sal::static_int_cast
<sal_Int32
>(m_aItems
.size());
859 throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
863 void SAL_CALL
XResultSet_impl::addPropertyChangeListener(
864 const rtl::OUString
& aPropertyName
,
865 const uno::Reference
< beans::XPropertyChangeListener
>& xListener
)
866 throw( beans::UnknownPropertyException
,
867 lang::WrappedTargetException
,
868 uno::RuntimeException
)
870 if( aPropertyName
== rtl::OUString("IsRowCountFinal") )
872 osl::MutexGuard
aGuard( m_aMutex
);
873 if ( ! m_pIsFinalListeners
)
874 m_pIsFinalListeners
=
875 new cppu::OInterfaceContainerHelper( m_aEventListenerMutex
);
877 m_pIsFinalListeners
->addInterface( xListener
);
879 else if ( aPropertyName
== rtl::OUString("RowCount") )
881 osl::MutexGuard
aGuard( m_aMutex
);
882 if ( ! m_pRowCountListeners
)
883 m_pRowCountListeners
=
884 new cppu::OInterfaceContainerHelper( m_aEventListenerMutex
);
885 m_pRowCountListeners
->addInterface( xListener
);
888 throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
892 void SAL_CALL
XResultSet_impl::removePropertyChangeListener(
893 const rtl::OUString
& aPropertyName
,
894 const uno::Reference
< beans::XPropertyChangeListener
>& aListener
)
895 throw( beans::UnknownPropertyException
,
896 lang::WrappedTargetException
,
897 uno::RuntimeException
)
899 if( aPropertyName
== rtl::OUString("IsRowCountFinal") &&
900 m_pIsFinalListeners
)
902 osl::MutexGuard
aGuard( m_aMutex
);
903 m_pIsFinalListeners
->removeInterface( aListener
);
905 else if ( aPropertyName
== rtl::OUString("RowCount") &&
906 m_pRowCountListeners
)
908 osl::MutexGuard
aGuard( m_aMutex
);
910 m_pRowCountListeners
->removeInterface( aListener
);
913 throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX
), uno::Reference
< uno::XInterface
>() );
916 void SAL_CALL
XResultSet_impl::addVetoableChangeListener(
917 const rtl::OUString
&,
918 const uno::Reference
< beans::XVetoableChangeListener
>& )
919 throw( beans::UnknownPropertyException
,
920 lang::WrappedTargetException
,
921 uno::RuntimeException
)
926 void SAL_CALL
XResultSet_impl::removeVetoableChangeListener(
927 const rtl::OUString
&,
928 const uno::Reference
< beans::XVetoableChangeListener
>& )
929 throw( beans::UnknownPropertyException
,
930 lang::WrappedTargetException
,
931 uno::RuntimeException
)
935 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */