LibreOffice Module reportdesign (master)  1
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
rptui::OXUndoEnvironment Class Reference

#include <UndoEnv.hxx>

Inheritance diagram for rptui::OXUndoEnvironment:
[legend]
Collaboration diagram for rptui::OXUndoEnvironment:
[legend]

Classes

struct  Accessor
 
class  OUndoEnvLock
 Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope, no undo is possible for manipulated object. More...
 
class  OUndoMode
 This is near the same as OUndoEnvLock but it is also possible to ask for the current mode. More...
 

Public Member Functions

 OXUndoEnvironment (OReportModel &_rModel)
 
void Lock ()
 
void UnLock ()
 
bool IsLocked () const
 
bool IsUndoMode () const
 
void Clear (const Accessor &_r)
 
void AddElement (const css::uno::Reference< css::uno::XInterface > &Element)
 
void RemoveElement (const css::uno::Reference< css::uno::XInterface > &Element)
 
void AddSection (const css::uno::Reference< css::report::XSection > &_xSection)
 
void RemoveSection (const css::uno::Reference< css::report::XSection > &_xSection)
 
void RemoveSection (OReportPage const *_pPage)
 removes the section from the page out of the undo env More...
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 

Protected Member Functions

virtual ~OXUndoEnvironment () override
 
void SetUndoMode (bool _bUndo)
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual void SAL_CALL elementInserted (const css::container::ContainerEvent &rEvent) override
 
virtual void SAL_CALL elementReplaced (const css::container::ContainerEvent &rEvent) override
 
virtual void SAL_CALL elementRemoved (const css::container::ContainerEvent &rEvent) override
 
virtual void SAL_CALL modified (const css::lang::EventObject &aEvent) override
 
void ModeChanged ()
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 

Private Member Functions

 OXUndoEnvironment (const OXUndoEnvironment &)=delete
 
OXUndoEnvironmentoperator= (const OXUndoEnvironment &)=delete
 
void implSetModified ()
 
void switchListening (const css::uno::Reference< css::container::XIndexAccess > &_rxContainer, bool _bStartListening)
 
void switchListening (const css::uno::Reference< css::uno::XInterface > &_rxObject, bool _bStartListening)
 
::std::vector< css::uno::Reference< css::container::XChild > >::const_iterator getSection (const css::uno::Reference< css::container::XChild > &_xContainer) const
 

Private Attributes

const ::std::unique_ptr< OXUndoEnvironmentImplm_pImpl
 

Detailed Description

Definition at line 39 of file UndoEnv.hxx.

Constructor & Destructor Documentation

rptui::OXUndoEnvironment::OXUndoEnvironment ( const OXUndoEnvironment )
privatedelete
rptui::OXUndoEnvironment::~OXUndoEnvironment ( )
overrideprotectedvirtual

Definition at line 126 of file UndoEnv.cxx.

rptui::OXUndoEnvironment::OXUndoEnvironment ( OReportModel _rModel)

Definition at line 119 of file UndoEnv.cxx.

References m_pImpl, m_pImpl, and SfxListener::StartListening().

Member Function Documentation

void rptui::OXUndoEnvironment::AddElement ( const css::uno::Reference< css::uno::XInterface > &  Element)
void rptui::OXUndoEnvironment::AddSection ( const css::uno::Reference< css::report::XSection > &  _xSection)

Definition at line 481 of file UndoEnv.cxx.

References AddElement(), aLock, DBG_UNHANDLED_EXCEPTION, and m_pImpl.

void rptui::OXUndoEnvironment::Clear ( const Accessor _r)
void SAL_CALL rptui::OXUndoEnvironment::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

Definition at line 200 of file UndoEnv.cxx.

References RemoveElement(), and RemoveSection().

void SAL_CALL rptui::OXUndoEnvironment::elementInserted ( const css::container::ContainerEvent &  rEvent)
overrideprotectedvirtual
void SAL_CALL rptui::OXUndoEnvironment::elementRemoved ( const css::container::ContainerEvent &  rEvent)
overrideprotectedvirtual
void SAL_CALL rptui::OXUndoEnvironment::elementReplaced ( const css::container::ContainerEvent &  rEvent)
overrideprotectedvirtual

Definition at line 414 of file UndoEnv.cxx.

References AddElement(), implSetModified(), m_pImpl, and RemoveElement().

std::vector< uno::Reference< container::XChild > >::const_iterator rptui::OXUndoEnvironment::getSection ( const css::uno::Reference< css::container::XChild > &  _xContainer) const
private

Definition at line 340 of file UndoEnv.cxx.

References m_pImpl.

Referenced by elementInserted(), and elementRemoved().

void rptui::OXUndoEnvironment::implSetModified ( )
private

Definition at line 408 of file UndoEnv.cxx.

References m_pImpl.

Referenced by elementInserted(), elementRemoved(), elementReplaced(), modified(), and propertyChange().

bool rptui::OXUndoEnvironment::IsLocked ( ) const

Definition at line 141 of file UndoEnv.cxx.

References m_pImpl.

Referenced by AddElement(), elementInserted(), elementRemoved(), and propertyChange().

bool rptui::OXUndoEnvironment::IsUndoMode ( ) const

Definition at line 614 of file UndoEnv.cxx.

References m_pImpl.

Referenced by rptui::OOle2Obj::NbcMove(), and rptui::OUnoObject::NbcMove().

void rptui::OXUndoEnvironment::Lock ( )
void rptui::OXUndoEnvironment::ModeChanged ( )
protected

Definition at line 181 of file UndoEnv.cxx.

References SfxListener::EndListening(), m_pImpl, and SfxListener::StartListening().

Referenced by Notify().

void SAL_CALL rptui::OXUndoEnvironment::modified ( const css::lang::EventObject &  aEvent)
overrideprotectedvirtual

Definition at line 475 of file UndoEnv.cxx.

References implSetModified().

void rptui::OXUndoEnvironment::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overrideprotectedvirtual

Reimplemented from SfxListener.

Definition at line 192 of file UndoEnv.cxx.

References SfxHint::GetId(), and ModeChanged().

OXUndoEnvironment& rptui::OXUndoEnvironment::operator= ( const OXUndoEnvironment )
privatedelete
void SAL_CALL rptui::OXUndoEnvironment::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overrideprotectedvirtual
void rptui::OXUndoEnvironment::RemoveElement ( const css::uno::Reference< css::uno::XInterface > &  Element)
void rptui::OXUndoEnvironment::RemoveSection ( const css::uno::Reference< css::report::XSection > &  _xSection)

Referenced by Clear(), and disposing().

void rptui::OXUndoEnvironment::RemoveSection ( OReportPage const *  _pPage)

removes the section from the page out of the undo env

Parameters
_pPage

Definition at line 143 of file UndoEnv.cxx.

References rptui::OReportPage::getSection(), and RemoveElement().

void rptui::OXUndoEnvironment::SetUndoMode ( bool  _bUndo)
protected
void rptui::OXUndoEnvironment::switchListening ( const css::uno::Reference< css::container::XIndexAccess > &  _rxContainer,
bool  _bStartListening 
)
private

Referenced by AddElement(), and RemoveElement().

void rptui::OXUndoEnvironment::switchListening ( const css::uno::Reference< css::uno::XInterface > &  _rxObject,
bool  _bStartListening 
)
private
void rptui::OXUndoEnvironment::UnLock ( )

Member Data Documentation

const ::std::unique_ptr<OXUndoEnvironmentImpl> rptui::OXUndoEnvironment::m_pImpl
private

The documentation for this class was generated from the following files: