LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
sfx2::sidebar::ContextChangeBroadcaster Class Reference

This class is a helper for broadcasting context changes that are tied to shells being activated or deactivated. More...

#include <ContextChangeBroadcaster.hxx>

Public Member Functions

 ContextChangeBroadcaster ()
 ~ContextChangeBroadcaster ()
void Initialize (const OUString &rsContextName)
void Activate (const css::uno::Reference< css::frame::XFrame > &rxFrame)
void Deactivate (const css::uno::Reference< css::frame::XFrame > &rxFrame)
bool SetBroadcasterEnabled (const bool bIsEnabled)
 Enable or disable the broadcaster. More...

Private Member Functions

void BroadcastContextChange (const css::uno::Reference< css::frame::XFrame > &rxFrame, const OUString &rsModuleName, const OUString &rsContextName)

Static Private Member Functions

static OUString GetModuleName (const css::uno::Reference< css::frame::XFrame > &rxFrame)

Private Attributes

OUString msContextName
bool mbIsBroadcasterEnabled

Detailed Description

This class is a helper for broadcasting context changes that are tied to shells being activated or deactivated.

Definition at line 30 of file ContextChangeBroadcaster.hxx.

Constructor & Destructor Documentation

◆ ContextChangeBroadcaster()

sfx2::sidebar::ContextChangeBroadcaster::ContextChangeBroadcaster ( )

Definition at line 36 of file ContextChangeBroadcaster.cxx.

◆ ~ContextChangeBroadcaster()

sfx2::sidebar::ContextChangeBroadcaster::~ContextChangeBroadcaster ( )

Definition at line 41 of file ContextChangeBroadcaster.cxx.

Member Function Documentation

◆ Activate()

void sfx2::sidebar::ContextChangeBroadcaster::Activate ( const css::uno::Reference< css::frame::XFrame > &  rxFrame)

◆ BroadcastContextChange()

void sfx2::sidebar::ContextChangeBroadcaster::BroadcastContextChange ( const css::uno::Reference< css::frame::XFrame > &  rxFrame,
const OUString &  rsModuleName,
const OUString &  rsContextName 

◆ Deactivate()

void sfx2::sidebar::ContextChangeBroadcaster::Deactivate ( const css::uno::Reference< css::frame::XFrame > &  rxFrame)

◆ GetModuleName()

OUString sfx2::sidebar::ContextChangeBroadcaster::GetModuleName ( const css::uno::Reference< css::frame::XFrame > &  rxFrame)

Definition at line 108 of file ContextChangeBroadcaster.cxx.

References Exception, and TOOLS_WARN_EXCEPTION.

Referenced by Activate(), and Deactivate().

◆ Initialize()

void sfx2::sidebar::ContextChangeBroadcaster::Initialize ( const OUString &  rsContextName)

Definition at line 45 of file ContextChangeBroadcaster.cxx.

References msContextName.

◆ SetBroadcasterEnabled()

bool sfx2::sidebar::ContextChangeBroadcaster::SetBroadcasterEnabled ( const bool  bIsEnabled)

Enable or disable the broadcaster.

bIsEnabledThe new value of the "enabled" state.
The old value of the "enabled" state is returned.

Definition at line 65 of file ContextChangeBroadcaster.cxx.

References bIsEnabled, and mbIsBroadcasterEnabled.

Member Data Documentation

◆ mbIsBroadcasterEnabled

bool sfx2::sidebar::ContextChangeBroadcaster::mbIsBroadcasterEnabled

Definition at line 51 of file ContextChangeBroadcaster.hxx.

Referenced by BroadcastContextChange(), and SetBroadcasterEnabled().

◆ msContextName

OUString sfx2::sidebar::ContextChangeBroadcaster::msContextName

Definition at line 50 of file ContextChangeBroadcaster.hxx.

Referenced by Activate(), Deactivate(), and Initialize().

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