LibreOffice Module svtools (master) 1
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
svt::ToolboxController Class Referenceabstract

#include <toolboxcontroller.hxx>

Inheritance diagram for svt::ToolboxController:
[legend]
Collaboration diagram for svt::ToolboxController:
[legend]

Classes

struct  DispatchInfo
 
struct  Listener
 

Public Member Functions

 ToolboxController (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XFrame > &xFrame, OUString aCommandURL)
 
 ToolboxController ()
 
virtual ~ToolboxController () override
 
css::uno::Reference< css::frame::XFrame > getFrameInterface () const
 
const css::uno::Reference< css::uno::XComponentContext > & getContext () const
 
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager () const
 
void updateStatus (const OUString &aCommandURL)
 
void updateStatus ()
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual void SAL_CALL update () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL statusChanged (const css::frame::FeatureStateEvent &Event) override=0
 
virtual void SAL_CALL execute (sal_Int16 KeyModifier) override
 
virtual void SAL_CALL click () override
 
virtual void SAL_CALL doubleClick () override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow () override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow (const css::uno::Reference< css::awt::XWindow > &Parent) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const override
 
const OUString & getCommandURL () const
 
const OUString & getModuleName () const
 
void dispatchCommand (const OUString &sCommandURL, const css::uno::Sequence< css::beans::PropertyValue > &rArgs, const OUString &rTarget=OUString())
 
void enable (bool bEnable)
 
bool IsInSidebar () const
 
- Public Member Functions inherited from comphelper::OMutexAndBroadcastHelper
 OMutexAndBroadcastHelper ()
 
::osl::Mutex & GetMutex ()
 
::cppu::OBroadcastHelperGetBroadcastHelper ()
 
const ::cppu::OBroadcastHelperGetBroadcastHelper () const
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 
- Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ToolboxController >
 OPropertyArrayUsageHelper ()
 
virtual ~OPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper ()
 

Protected Types

typedef std::unordered_map< OUString, css::uno::Reference< css::frame::XDispatch > > URLToDispatchMap
 

Protected Member Functions

bool getToolboxId (ToolBoxItemId &rItemId, ToolBox **ppToolBox)
 
 DECL_DLLPRIVATE_STATIC_LINK (ToolboxController, ExecuteHdl_Impl, void *, void)
 
void addStatusListener (const OUString &aCommandURL)
 
void removeStatusListener (const OUString &aCommandURL)
 
void bindListener ()
 
void unbindListener ()
 
const css::uno::Reference< css::util::XURLTransformer > & getURLTransformer () const
 
const css::uno::Reference< css::awt::XWindow > & getParent () const
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const =0
 

Protected Attributes

bool m_bInitialized
 
bool m_bDisposed
 
bool m_bSidebar
 
ToolBoxItemId m_nToolBoxId
 
css::uno::Reference< css::frame::XFrame > m_xFrame
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
OUString m_aCommandURL
 
URLToDispatchMap m_aListenerMap
 
comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer
 
css::uno::Reference< css::awt::XWindow > m_xParentWindow
 container for ALL Listener More...
 
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer
 
OUString m_sModuleName
 
weld::Toolbarm_pToolbar
 
weld::Builderm_pBuilder
 
- Protected Attributes inherited from comphelper::OMutexAndBroadcastHelper
::osl::Mutex m_aMutex
 
::cppu::OBroadcastHelper m_aBHelper
 

Private Attributes

bool m_bSupportVisible
 

Additional Inherited Members

- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Static Protected Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ToolboxController >
static std::mutextheMutex ()
 
- Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< ToolboxController >
static sal_Int32 s_nRefCount
 
::cppu::IPropertyArrayHelpers_pProps
 

Detailed Description

Definition at line 64 of file toolboxcontroller.hxx.

Member Typedef Documentation

◆ URLToDispatchMap

typedef std::unordered_map< OUString, css::uno::Reference< css::frame::XDispatch > > svt::ToolboxController::URLToDispatchMap
protected

Definition at line 164 of file toolboxcontroller.hxx.

Constructor & Destructor Documentation

◆ ToolboxController() [1/2]

svt::ToolboxController::ToolboxController ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::frame::XFrame > &  xFrame,
OUString  aCommandURL 
)

References queryInterface().

◆ ToolboxController() [2/2]

svt::ToolboxController::ToolboxController ( )

◆ ~ToolboxController()

svt::ToolboxController::~ToolboxController ( )
overridevirtual

Definition at line 102 of file toolboxcontroller.cxx.

Member Function Documentation

◆ acquire()

void SAL_CALL svt::ToolboxController::acquire ( )
overridevirtualnoexcept

Definition at line 148 of file toolboxcontroller.cxx.

◆ addEventListener()

void SAL_CALL svt::ToolboxController::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

◆ addStatusListener()

void svt::ToolboxController::addStatusListener ( const OUString &  aCommandURL)
protected

◆ bindListener()

void svt::ToolboxController::bindListener ( )
protected

◆ click()

void SAL_CALL svt::ToolboxController::click ( )
overridevirtual

Definition at line 359 of file toolboxcontroller.cxx.

Referenced by svt::PopupWindowController::click().

◆ convertFastPropertyValue()

sal_Bool SAL_CALL svt::ToolboxController::convertFastPropertyValue ( css::uno::Any &  rConvertedValue,
css::uno::Any &  rOldValue,
sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

◆ createArrayHelper()

cppu::IPropertyArrayHelper * svt::ToolboxController::createArrayHelper ( ) const
overridevirtual

◆ createItemWindow()

Reference< XWindow > SAL_CALL svt::ToolboxController::createItemWindow ( const css::uno::Reference< css::awt::XWindow > &  Parent)
overridevirtual

Definition at line 372 of file toolboxcontroller.cxx.

◆ createPopupWindow()

Reference< XWindow > SAL_CALL svt::ToolboxController::createPopupWindow ( )
overridevirtual

Definition at line 367 of file toolboxcontroller.cxx.

◆ DECL_DLLPRIVATE_STATIC_LINK()

svt::ToolboxController::DECL_DLLPRIVATE_STATIC_LINK ( ToolboxController  ,
ExecuteHdl_Impl  ,
void *  ,
void   
)
protected

◆ dispatchCommand()

void svt::ToolboxController::dispatchCommand ( const OUString &  sCommandURL,
const css::uno::Sequence< css::beans::PropertyValue > &  rArgs,
const OUString &  rTarget = OUString() 
)

◆ dispose()

void SAL_CALL svt::ToolboxController::dispose ( void  )
overridevirtual

◆ disposing()

void SAL_CALL svt::ToolboxController::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 288 of file toolboxcontroller.cxx.

References m_aListenerMap, m_bDisposed, m_xFrame, and Source.

◆ doubleClick()

void SAL_CALL svt::ToolboxController::doubleClick ( )
overridevirtual

Definition at line 363 of file toolboxcontroller.cxx.

◆ enable()

void svt::ToolboxController::enable ( bool  bEnable)

Definition at line 753 of file toolboxcontroller.cxx.

References ToolBox::EnableItem(), and getToolboxId().

◆ execute()

void SAL_CALL svt::ToolboxController::execute ( sal_Int16  KeyModifier)
overridevirtual

◆ getCommandURL()

const OUString & svt::ToolboxController::getCommandURL ( ) const
inline

Definition at line 126 of file toolboxcontroller.hxx.

◆ getContext()

const Reference< XComponentContext > & svt::ToolboxController::getContext ( ) const

Definition at line 112 of file toolboxcontroller.cxx.

References m_xContext.

◆ getFrameInterface()

Reference< XFrame > svt::ToolboxController::getFrameInterface ( ) const

Definition at line 106 of file toolboxcontroller.cxx.

References m_xFrame.

◆ getInfoHelper()

cppu::IPropertyArrayHelper & svt::ToolboxController::getInfoHelper ( )
override

◆ getLayoutManager()

Reference< XLayoutManager > svt::ToolboxController::getLayoutManager ( ) const

Definition at line 118 of file toolboxcontroller.cxx.

References Exception, and m_xFrame.

◆ getModuleName()

const OUString & svt::ToolboxController::getModuleName ( ) const
inline

Definition at line 127 of file toolboxcontroller.hxx.

◆ getParent()

const css::uno::Reference< css::awt::XWindow > & svt::ToolboxController::getParent ( ) const
inlineprotected

Definition at line 175 of file toolboxcontroller.hxx.

Referenced by getToolboxId(), and initialize().

◆ getPropertySetInfo()

css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL svt::ToolboxController::getPropertySetInfo ( )
overridevirtual

Definition at line 690 of file toolboxcontroller.cxx.

References getInfoHelper().

◆ getToolboxId()

bool svt::ToolboxController::getToolboxId ( ToolBoxItemId rItemId,
ToolBox **  ppToolBox 
)
protected

◆ getTypes()

css::uno::Sequence< css::uno::Type > svt::ToolboxController::getTypes ( )
overridevirtual

◆ getURLTransformer()

const css::uno::Reference< css::util::XURLTransformer > & svt::ToolboxController::getURLTransformer ( ) const
inlineprotected

Definition at line 173 of file toolboxcontroller.hxx.

Referenced by dispatchCommand().

◆ initialize()

void SAL_CALL svt::ToolboxController::initialize ( const css::uno::Sequence< css::uno::Any > &  aArguments)
overridevirtual

◆ IsInSidebar()

bool svt::ToolboxController::IsInSidebar ( ) const
inline

Definition at line 133 of file toolboxcontroller.hxx.

◆ queryInterface()

Any SAL_CALL svt::ToolboxController::queryInterface ( const css::uno::Type &  aType)
overridevirtual

Definition at line 142 of file toolboxcontroller.cxx.

References a, and Any.

◆ release()

void SAL_CALL svt::ToolboxController::release ( )
overridevirtualnoexcept

Definition at line 153 of file toolboxcontroller.cxx.

◆ removeEventListener()

void SAL_CALL svt::ToolboxController::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  aListener)
overridevirtual

◆ removeStatusListener()

void svt::ToolboxController::removeStatusListener ( const OUString &  aCommandURL)
protected

Definition at line 443 of file toolboxcontroller.cxx.

References aTargetURL, Exception, m_aListenerMap, m_xUrlTransformer, and xDispatch.

◆ setFastPropertyValue_NoBroadcast()

void SAL_CALL svt::ToolboxController::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

◆ statusChanged()

void SAL_CALL svt::ToolboxController::statusChanged ( const css::frame::FeatureStateEvent &  Event)
overridepure virtual

Definition at line 311 of file toolboxcontroller.cxx.

◆ unbindListener()

void svt::ToolboxController::unbindListener ( )
protected

◆ update()

void SAL_CALL svt::ToolboxController::update ( )
overridevirtual

Definition at line 226 of file toolboxcontroller.cxx.

References bindListener(), and m_bDisposed.

◆ updateStatus() [1/2]

void svt::ToolboxController::updateStatus ( )

Definition at line 620 of file toolboxcontroller.cxx.

References bindListener().

◆ updateStatus() [2/2]

void svt::ToolboxController::updateStatus ( const OUString &  aCommandURL)

Member Data Documentation

◆ m_aCommandURL

OUString svt::ToolboxController::m_aCommandURL
protected

Definition at line 183 of file toolboxcontroller.hxx.

Referenced by bindListener(), execute(), getToolboxId(), and initialize().

◆ m_aListenerContainer

comphelper::OMultiTypeInterfaceContainerHelper2 svt::ToolboxController::m_aListenerContainer
protected

Definition at line 185 of file toolboxcontroller.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

◆ m_aListenerMap

URLToDispatchMap svt::ToolboxController::m_aListenerMap
protected

◆ m_bDisposed

bool svt::ToolboxController::m_bDisposed
protected

Definition at line 178 of file toolboxcontroller.hxx.

Referenced by dispose(), disposing(), execute(), initialize(), and update().

◆ m_bInitialized

bool svt::ToolboxController::m_bInitialized
protected

◆ m_bSidebar

bool svt::ToolboxController::m_bSidebar
protected

Definition at line 179 of file toolboxcontroller.hxx.

Referenced by initialize().

◆ m_bSupportVisible

bool svt::ToolboxController::m_bSupportVisible
private

◆ m_nToolBoxId

ToolBoxItemId svt::ToolboxController::m_nToolBoxId
protected

Definition at line 180 of file toolboxcontroller.hxx.

Referenced by getToolboxId(), and initialize().

◆ m_pBuilder

weld::Builder* svt::ToolboxController::m_pBuilder
protected

Definition at line 191 of file toolboxcontroller.hxx.

Referenced by initialize().

◆ m_pToolbar

weld::Toolbar* svt::ToolboxController::m_pToolbar
protected

Definition at line 190 of file toolboxcontroller.hxx.

Referenced by initialize().

◆ m_sModuleName

OUString svt::ToolboxController::m_sModuleName
protected

Definition at line 189 of file toolboxcontroller.hxx.

Referenced by initialize().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > svt::ToolboxController::m_xContext
protected

◆ m_xFrame

css::uno::Reference< css::frame::XFrame > svt::ToolboxController::m_xFrame
protected

◆ m_xParentWindow

css::uno::Reference< css::awt::XWindow > svt::ToolboxController::m_xParentWindow
protected

container for ALL Listener

Definition at line 187 of file toolboxcontroller.hxx.

Referenced by initialize().

◆ m_xUrlTransformer

css::uno::Reference< css::util::XURLTransformer > svt::ToolboxController::m_xUrlTransformer
protected

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