19#ifndef INCLUDED_REPORTDESIGN_INC_UNDOENV_HXX
20#define INCLUDED_REPORTDESIGN_INC_UNDOENV_HXX
22#include <com/sun/star/beans/XPropertyChangeListener.hpp>
23#include <com/sun/star/beans/PropertyChangeEvent.hpp>
24#include <com/sun/star/container/XContainerListener.hpp>
25#include <com/sun/star/container/XIndexAccess.hpp>
26#include <com/sun/star/util/XModifyListener.hpp>
27#include <com/sun/star/report/XSection.hpp>
37 class OXUndoEnvironmentImpl;
41 :
public ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener
42 , css::container::XContainerListener
43 , css::util::XModifyListener
47 const ::std::unique_ptr<OXUndoEnvironmentImpl>
m_pImpl;
54 void SetUndoMode(
bool _bUndo);
80 :m_rUndoEnv(_rUndoEnv)
94 bool IsLocked()
const;
97 bool IsUndoMode()
const;
103 void AddElement(
const css::uno::Reference< css::uno::XInterface>& Element);
104 void RemoveElement(
const css::uno::Reference< css::uno::XInterface>& Element);
106 void AddSection(
const css::uno::Reference< css::report::XSection>& _xSection);
107 void RemoveSection(
const css::uno::Reference< css::report::XSection>& _xSection );
116 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source)
override;
119 virtual void SAL_CALL propertyChange(
const css::beans::PropertyChangeEvent& evt)
override;
122 virtual void SAL_CALL
elementInserted(
const css::container::ContainerEvent& rEvent)
override;
123 virtual void SAL_CALL
elementReplaced(
const css::container::ContainerEvent& rEvent)
override;
124 virtual void SAL_CALL
elementRemoved(
const css::container::ContainerEvent& rEvent)
override;
127 virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent )
override;
134 void implSetModified();
136 void switchListening(
const css::uno::Reference< css::container::XIndexAccess >& _rxContainer,
bool _bStartListening );
137 void switchListening(
const css::uno::Reference< css::uno::XInterface >& _rxObject,
bool _bStartListening );
139 ::std::vector< css::uno::Reference< css::container::XChild> >::const_iterator
140 getSection(
const css::uno::Reference< css::container::XChild>& _xContainer)
const;
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
OXUndoEnvironment & m_rUndoEnv
OUndoEnvLock(OXUndoEnvironment &_rUndoEnv)
This is near the same as OUndoEnvLock but it is also possible to ask for the current mode.
OUndoMode(OXUndoEnvironment &_rUndoEnv)
OXUndoEnvironment & m_rUndoEnv
void switchListening(const css::uno::Reference< css::uno::XInterface > &_rxObject, bool _bStartListening)
void switchListening(const css::uno::Reference< css::container::XIndexAccess > &_rxContainer, bool _bStartListening)
void SetUndoMode(bool _bUndo)
void RemoveSection(const css::uno::Reference< css::report::XSection > &_xSection)
OXUndoEnvironment(const OXUndoEnvironment &)=delete
const ::std::unique_ptr< OXUndoEnvironmentImpl > m_pImpl
OXUndoEnvironment & operator=(const OXUndoEnvironment &)=delete
#define REPORTDESIGN_DLLPUBLIC
void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
DECL_LISTENERMULTIPLEXER_END void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
void Clear(EHistoryType eHistory)