46 ,m_aFormattedFieldBeautifier(_rController)
47 ,m_aFixedTextColor(_rController)
63 if (nEvent != VclEventId::ApplicationDataChanged )
67 if ( !(
pData && (((
pData->GetType() == DataChangedEventType::SETTINGS ) ||
68 (
pData->GetType() == DataChangedEventType::DISPLAY )) &&
69 (
pData->GetFlags() & AllSettingsFlags::STYLE ))))
72 OEnvLock aLock(*
this);
76 for (
const uno::Reference<container::XChild>& xChild : m_aSections)
80 uno::Reference<report::XSection> xSection(xChild, uno::UNO_QUERY);
83 const sal_Int32
nCount = xSection->getCount();
86 const uno::Any aObj = xSection->getByIndex(
i);
87 uno::Reference < report::XReportComponent > xReportComponent(aObj, uno::UNO_QUERY);
88 if (xReportComponent.is())
90 m_aFormattedFieldBeautifier.handle(xReportComponent);
91 m_aFixedTextColor.handle(xReportComponent);
103 uno::Reference< beans::XPropertySet > xSourceSet(e.Source, uno::UNO_QUERY);
104 if ( xSourceSet.is() )
106 uno::Reference< report::XSection> xSection(xSourceSet,uno::UNO_QUERY);
135 OSL_ENSURE(
m_refCount,
"Illegal call to dead object!");
141 OSL_ENSURE(
m_refCount,
"Illegal call to dead object!");
151 uno::Reference<container::XChild> xChild = _xSection;
153 uno::Reference< uno::XInterface > xInt(_xSection);
156 catch(
const uno::Exception&)
168 uno::Reference<container::XChild> xChild(_xSection);
171 uno::Reference< uno::XInterface > xInt(_xSection);
174 catch(uno::Exception&)
183 OSL_PRECOND( _rxContainer.is(),
"OXReportControllerObserver::switchListening: invalid container!" );
184 if ( !_rxContainer.is() )
190 uno::Reference< uno::XInterface > xInterface;
191 sal_Int32
nCount = _rxContainer->getCount();
192 for(sal_Int32 i = 0;
i !=
nCount;++
i)
194 xInterface.set(_rxContainer->getByIndex( i ),uno::UNO_QUERY);
195 if ( _bStartListening )
202 uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY );
203 if ( xSimpleContainer.is() )
205 if ( _bStartListening )
206 xSimpleContainer->addContainerListener(
this );
208 xSimpleContainer->removeContainerListener(
this );
211 catch(
const uno::Exception& )
220 OSL_PRECOND( _rxObject.is(),
"OXReportControllerObserver::switchListening: how should I listen at a NULL object?" );
224 uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
227 if ( _bStartListening )
228 xProps->addPropertyChangeListener( OUString(),
this );
230 xProps->removePropertyChangeListener( OUString(),
this );
233 uno::Reference< util::XModifyBroadcaster > xBroadcaster( _rxObject, uno::UNO_QUERY );
234 if ( xBroadcaster.is() )
236 if ( _bStartListening )
237 xBroadcaster->addModifyListener(
this );
239 xBroadcaster->removeModifyListener(
this );
242 catch(
const uno::Exception& )
260 uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY );
261 if ( xContainer.is() )
272 uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY );
273 if ( xContainer.is() )
283 ::osl::MutexGuard aGuard(
m_aMutex );
286 uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );
297 ::osl::MutexGuard aGuard(
m_aMutex );
299 uno::Reference< uno::XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
300 OSL_ENSURE(xIface.is(),
"OXReportControllerObserver::elementReplaced: invalid container notification!");
303 xIface.set(evt.Element,uno::UNO_QUERY);
311 ::osl::MutexGuard aGuard(
m_aMutex );
313 uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );
static void AddEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
static void RemoveEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
void notifyPropertyChange(const css::beans::PropertyChangeEvent &_rEvent) override
void notifyElementInserted(const css::uno::Reference< css::uno::XInterface > &_rxElement) override
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
::std::vector< css::uno::Reference< css::container::XChild > > m_aSections
OXReportControllerObserver(const OXReportControllerObserver &)=delete
void AddSection(const css::uno::Reference< css::report::XSection > &_xSection)
FixedTextColor m_aFixedTextColor
void RemoveSection(const css::uno::Reference< css::report::XSection > &_xSection)
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &rEvent) override
oslInterlockedCount m_nLocks
void AddElement(const css::uno::Reference< css::uno::XInterface > &Element)
FormattedFieldBeautifier m_aFormattedFieldBeautifier
void switchListening(const css::uno::Reference< css::container::XIndexAccess > &_rxContainer, bool _bStartListening)
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &rEvent) override
virtual ~OXReportControllerObserver() override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
void RemoveElement(const css::uno::Reference< css::uno::XInterface > &Element)
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &rEvent) override
#define DBG_UNHANDLED_EXCEPTION(...)
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
std::map< OUString, bool > AllProperties
::std::map< Reference< XPropertySet >, ObjectInfo > PropertySetInfoCache
IMPL_LINK(OAddFieldWindow, DragBeginHdl, bool &, rUnsetDragIcon, bool)