22#include <com/sun/star/lang/DisposedException.hpp>
23#include <rtl/ustring.hxx>
24#include <osl/diagnose.h>
41 : m_xResultSetOrigin( xOrigin )
44 , m_bInDispose( false )
61 OSL_ENSURE(
m_xRowOrigin.is(),
"interface XRow is required" );
94 OSL_ENSURE( xComponentOrigin.is(),
"interface XComponent is required" );
95 xComponentOrigin->addEventListener(
static_cast< XPropertyChangeListener *
>(
m_xMyListenerImpl.get() ) );
129 throw DisposedException();
139 pContainer->
notifyEach( rGuard, &XPropertyChangeListener::propertyChange, rEvt );
146 pContainer->
notifyEach( rGuard, &XPropertyChangeListener::propertyChange, rEvt );
157 pContainer->
notifyEach( rGuard, &XVetoableChangeListener::vetoableChange, rEvt );
164 pContainer->
notifyEach( rGuard, &XVetoableChangeListener::vetoableChange, rEvt );
225 static_cast< XComponent*
>(
this),
226 static_cast< XCloseable*
>(
this),
227 static_cast< XResultSetMetaDataSupplier*
>(
this),
229 static_cast< XContentAccess*
>(
this),
230 static_cast< XResultSet*
>(
this),
231 static_cast< XRow*
>(
this)
233 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
244 bool isCleared =
false;
256 OUString(),
static_cast< XPropertyChangeListener *
>(
m_xMyListenerImpl.get() ) );
260 OSL_FAIL(
"could not remove PropertyChangeListener" );
265 OUString(),
static_cast< XVetoableChangeListener *
>(
m_xMyListenerImpl.get() ) );
269 OSL_FAIL(
"could not remove VetoableChangeListener" );
273 OSL_ENSURE( xComponentOrigin.is(),
"interface XComponent is required" );
274 xComponentOrigin->removeEventListener(
static_cast< XPropertyChangeListener *
>(
m_xMyListenerImpl.get() ) );
282 aEvt.Source =
static_cast< XComponent *
>( this );
308 std::unique_lock aGuard(
m_aMutex );
318 std::unique_lock aGuard(
m_aMutex );
330 std::unique_lock aGuard(
m_aMutex );
350 if( xMetaDataSupplier.is() )
355 = xMetaDataSupplier->getMetaData();
370 std::unique_lock aGuard(
m_aMutex );
387 std::unique_lock aGuard(
m_aMutex );
398 OSL_FAIL(
"broadcaster was disposed already" );
399 throw UnknownPropertyException();
408 std::unique_lock aGuard(
m_aMutex );
413 OSL_FAIL(
"broadcaster was disposed already" );
414 throw UnknownPropertyException();
423 std::unique_lock aGuard(
m_aMutex );
428 OSL_FAIL(
"broadcaster was disposed already" );
429 throw UnknownPropertyException();
432 if( !aPropertyName.isEmpty() )
446 OSL_FAIL(
"broadcaster was disposed already" );
452 OUString(),
static_cast< XPropertyChangeListener *
>(
m_xMyListenerImpl.get() ) );
465 std::unique_lock aGuard(
m_aMutex );
470 OSL_FAIL(
"broadcaster was disposed already" );
471 throw UnknownPropertyException();
473 if( !rPropertyName.isEmpty() )
488 OSL_FAIL(
"broadcaster was disposed already" );
495 OUString(),
static_cast< XVetoableChangeListener *
>(
m_xMyListenerImpl.get() ) );
508 std::unique_lock aGuard(
m_aMutex );
520 if( !rPropertyName.isEmpty() )
523 throw UnknownPropertyException();
539 OSL_FAIL(
"broadcaster was disposed already" );
545 OUString(),
static_cast< XPropertyChangeListener *
>(
m_xMyListenerImpl.get() ) );
549 OSL_FAIL(
"could not remove PropertyChangeListener" );
557 std::unique_lock aGuard(
m_aMutex );
568 if( !rPropertyName.isEmpty() )
571 throw UnknownPropertyException(rPropertyName);
587 OSL_FAIL(
"broadcaster was disposed already" );
593 OUString(),
static_cast< XVetoableChangeListener *
>(
m_xMyListenerImpl.get() ) );
597 OSL_FAIL(
"could not remove VetoableChangeListener" );
635 PropertyChangeEvent aEvt( rEvt );
637 aEvt.Further =
false;
647 PropertyChangeEvent aEvt( rEvt );
649 aEvt.Further =
false;
671 OSL_FAIL(
"broadcaster was disposed already" );
686 OSL_FAIL(
"broadcaster was disposed already" );
701 OSL_FAIL(
"broadcaster was disposed already" );
719 OSL_FAIL(
"broadcaster was disposed already" );
733 OSL_FAIL(
"broadcaster was disposed already" );
747 OSL_FAIL(
"broadcaster was disposed already" );
761 OSL_FAIL(
"broadcaster was disposed already" );
776 OSL_FAIL(
"broadcaster was disposed already" );
790 OSL_FAIL(
"broadcaster was disposed already" );
804 OSL_FAIL(
"broadcaster was disposed already" );
818 OSL_FAIL(
"broadcaster was disposed already" );
832 OSL_FAIL(
"broadcaster was disposed already" );
846 OSL_FAIL(
"broadcaster was disposed already" );
860 OSL_FAIL(
"broadcaster was disposed already" );
874 OSL_FAIL(
"broadcaster was disposed already" );
889 OSL_FAIL(
"broadcaster was disposed already" );
903 OSL_FAIL(
"broadcaster was disposed already" );
917 OSL_FAIL(
"broadcaster was disposed already" );
931 OSL_FAIL(
"broadcaster was disposed already" );
945 OSL_FAIL(
"broadcaster was disposed already" );
971 OSL_FAIL(
"broadcaster was disposed already" );
984 OSL_FAIL(
"broadcaster was disposed already" );
1085 return m_xRowOrigin->getCharacterStream( columnIndex );
1099 OSL_FAIL(
"broadcaster was disposed already" );
1102 return m_xRowOrigin->getObject( columnIndex, typeMap );
1151 OWeakObject::acquire();
1157 OWeakObject::release();
1164 static_cast< XEventListener *
>(
1165 static_cast< XPropertyChangeListener *
>(
this)),
1166 static_cast< XPropertyChangeListener*
>(
this),
1167 static_cast< XVetoableChangeListener*
>(
this)
1169 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
ContentResultSetWrapperListener(ContentResultSetWrapper *pOwner)
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
ContentResultSetWrapper * m_pOwner
virtual void SAL_CALL vetoableChange(const css::beans::PropertyChangeEvent &aEvent) override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
virtual ~ContentResultSetWrapperListener() override
virtual void impl_disposing(const css::lang::EventObject &Source)
virtual sal_Bool SAL_CALL first() override
virtual sal_Bool SAL_CALL isLast() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
ContentResultSetWrapper(css::uno::Reference< css::sdbc::XResultSet > const &xOrigin)
virtual void SAL_CALL dispose() override final
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XResultSet > m_xResultSetOrigin
void impl_notifyVetoableChangeListeners(std::unique_lock< std::mutex > &rGuard, const css::beans::PropertyChangeEvent &rEvt)
VetoableChangeListenerContainer_Impl m_aVetoableChangeListeners
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) final override
void impl_EnsureNotDisposed(std::unique_lock< std::mutex > &rGuard)
virtual void SAL_CALL afterLast() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aDisposeEventListeners
In dispose call.
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XResultSetMetaData > m_xMetaDataFromOrigin
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual OUString SAL_CALL queryContentIdentifierString() override final
virtual sal_Bool SAL_CALL rowDeleted() override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent() override
css::uno::Reference< css::beans::XPropertySetInfo > m_xPropertySetInfo
! call impl_init_xPropertySetOrigin() bevor you access this member
virtual sal_Bool SAL_CALL rowInserted() override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
virtual ~ContentResultSetWrapper() override
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
virtual OUString queryContentIdentifierStringImpl(std::unique_lock< std::mutex > &rGuard)
virtual sal_Bool SAL_CALL isAfterLast() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void setPropertyValueImpl(std::unique_lock< std::mutex > &rGuard, const OUString &aPropertyName, const css::uno::Any &aValue)
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
virtual void SAL_CALL refreshRow() override
virtual sal_Bool SAL_CALL next() override
virtual sal_Bool SAL_CALL isBeforeFirst() override
rtl::Reference< ContentResultSetWrapperListener > m_xMyListenerImpl
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL queryContentIdentifier() override
virtual sal_Bool SAL_CALL wasNull() override
virtual void impl_propertyChange(const css::beans::PropertyChangeEvent &evt)
css::uno::Reference< css::beans::XPropertySet > m_xPropertySetOrigin
! call impl_init_xContentAccessOrigin() bevor you access this member
virtual void SAL_CALL close() override
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
css::uno::Reference< css::sdbc::XRow > m_xRowOrigin
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
PropertyChangeListenerContainer_Impl m_aPropertyChangeListeners
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL last() override
virtual sal_Bool SAL_CALL rowUpdated() override
void impl_init_xPropertySetOrigin(std::unique_lock< std::mutex > &)
css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfoImpl(std::unique_lock< std::mutex > &rGuard)
bool impl_isForwardOnly(std::unique_lock< std::mutex > &rGuard)
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
void impl_init_xRowOrigin(std::unique_lock< std::mutex > &)
void impl_notifyPropertyChangeListeners(std::unique_lock< std::mutex > &rGuard, const css::beans::PropertyChangeEvent &rEvt)
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
void impl_init_xContentAccessOrigin(std::unique_lock< std::mutex > &)
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual void impl_vetoableChange(const css::beans::PropertyChangeEvent &aEvent)
css::uno::Reference< css::ucb::XContentAccess > m_xContentAccessOrigin
! call impl_init_xRowOrigin() bevor you access this member
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override final
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
virtual sal_Bool SAL_CALL previous() override
bool m_bInDispose
Dispose call ready.
virtual sal_Int32 SAL_CALL getRow() override
virtual sal_Bool SAL_CALL isFirst() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual void SAL_CALL beforeFirst() override
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void impl_initPropertySetInfo(std::unique_lock< std::mutex > &rGuard)
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(std::unique_lock< std::mutex > &rGuard, void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event) const
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
sal_Int32 removeInterface(::std::unique_lock<::std::mutex > &rGuard, const key &rKey, const css::uno::Reference< listener > &rListener)
bool hasContainedTypes(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 addInterface(::std::unique_lock<::std::mutex > &rGuard, const key &rKey, const css::uno::Reference< listener > &rListener)
void disposeAndClear(std::unique_lock< std::mutex > &rGuard, const css::lang::EventObject &rEvt)
OInterfaceContainerHelper4< listener > * getContainer(std::unique_lock< std::mutex > &rGuard, const key &rKey) const
class SAL_NO_VTABLE XPropertySet
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
ContentProvider * m_pOwner