20#include <com/sun/star/ucb/ContentAction.hpp>
21#include <com/sun/star/beans/PropertySetInfoChange.hpp>
34ContentEventNotifier::ContentEventNotifier(
TaskManager* pMyShell,
35 const uno::Reference< XContent >& xCreatorContent,
36 const uno::Reference< XContentIdentifier >& xCreatorId,
37 std::vector< uno::Reference< ucb::XContentEventListener > >&& sListeners )
38 : m_pMyShell( pMyShell ),
39 m_xCreatorContent( xCreatorContent ),
40 m_xCreatorId( xCreatorId ),
41 m_sListeners(
std::move(sListeners) )
46ContentEventNotifier::ContentEventNotifier(
TaskManager* pMyShell,
47 const uno::Reference< XContent >& xCreatorContent,
48 const uno::Reference< XContentIdentifier >& xCreatorId,
49 const uno::Reference< XContentIdentifier >& xOldId,
50 std::vector< uno::Reference< ucb::XContentEventListener > >&& sListeners )
51 : m_pMyShell( pMyShell ),
52 m_xCreatorContent( xCreatorContent ),
53 m_xCreatorId( xCreatorId ),
55 m_sListeners(
std::move(sListeners) )
60void ContentEventNotifier::notifyChildInserted(
const OUString& aChildName )
const
67 ContentAction::INSERTED,
72 ref->contentEvent( aEvt );
78 ContentAction::DELETED,
84 ref->contentEvent( aEvt );
94 std::unique_lock aGuard( pp->m_aMutex );
99 ContentAction::REMOVED,
104 ref->contentEvent( aEvt );
110 ContentAction::EXCHANGED,
115 ref->contentEvent( aEvt );
126 const uno::Reference< XContent >& xCreatorContent,
127 std::vector< uno::Reference< beans::XPropertySetInfoChangeListener > >&& sListeners )
128 : m_xCreatorContent( xCreatorContent ),
129 m_sListeners(
std::move(sListeners) )
141 beans::PropertySetInfoChange::PROPERTY_INSERTED );
144 ref->propertySetInfoChange( aEvt );
154 beans::PropertySetInfoChange::PROPERTY_REMOVED );
157 ref->propertySetInfoChange( aEvt );
169 const css::uno::Reference< XContent >& xCreatorContent,
171 : m_xCreatorContent( xCreatorContent ),
178 const uno::Sequence< beans::PropertyChangeEvent >& seqChanged )
const
180 uno::Sequence< beans::PropertyChangeEvent > Changes = seqChanged;
182 for(
auto& rChange : asNonConstRange(Changes) )
190 const std::vector< uno::Reference< beans::XPropertiesChangeListener > >& seqList = it->second;
191 for(
const auto& rListener : seqList )
192 rListener->propertiesChange( Changes );
195 for(
const auto& rChange : std::as_const(Changes) )
197 uno::Sequence< beans::PropertyChangeEvent > seq{ rChange };
201 const std::vector< uno::Reference< beans::XPropertiesChangeListener > >& seqList = it->second;
202 for(
const auto& rListener : seqList )
203 rListener->propertiesChange( seq );
css::uno::Reference< css::ucb::XContentIdentifier > m_xCreatorId
void notifyRemoved(const OUString &aChildName) const
std::vector< css::uno::Reference< css::ucb::XContentEventListener > > m_sListeners
css::uno::Reference< css::ucb::XContent > m_xCreatorContent
void notifyExchanged() const
css::uno::Reference< css::ucb::XContentIdentifier > m_xOldId
void notifyDeleted() const
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
css::uno::Reference< css::ucb::XContent > m_xCreatorContent
void notifyPropertyChanged(const css::uno::Sequence< css::beans::PropertyChangeEvent > &seqChanged) const
PropertyChangeNotifier(const css::uno::Reference< css::ucb::XContent > &xCreatorContent, ListenerMap &&pListeners)
std::vector< css::uno::Reference< css::beans::XPropertySetInfoChangeListener > > m_sListeners
PropertySetInfoChangeNotifier(const css::uno::Reference< css::ucb::XContent > &xCreatorContent, std::vector< css::uno::Reference< css::beans::XPropertySetInfoChangeListener > > &&sListeners)
void notifyPropertyAdded(const OUString &aPropertyName) const
css::uno::Reference< css::ucb::XContent > m_xCreatorContent
void notifyPropertyRemoved(const OUString &aPropertyName) const
FileProvider * m_pProvider
std::vector< Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners
std::unordered_map< OUString, std::vector< css::uno::Reference< css::beans::XPropertiesChangeListener > > > ListenerMap