LibreOffice Module svx (master) 1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
svx::FmTextControlShell Class Referencefinal

#include <fmtextcontrolshell.hxx>

Inheritance diagram for svx::FmTextControlShell:
[legend]
Collaboration diagram for svx::FmTextControlShell:
[legend]

Public Member Functions

 FmTextControlShell (SfxViewFrame *_pFrame)
 
virtual ~FmTextControlShell ()
 
void dispose ()
 
void ExecuteTextAttribute (SfxRequest &_rReq)
 
void GetTextAttributeState (SfxItemSet &_rSet)
 
bool IsActiveControl (bool _bCountRichTextOnly=false) const
 
void ForgetActiveControl ()
 
void SetControlActivationHandler (const Link< LinkParamNone *, void > &_rHdl)
 
void formActivated (const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
 to be called when a form in our document has been activated More...
 
void formDeactivated (const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
 to be called when a form in our document has been deactivated More...
 
void designModeChanged ()
 notifies the instance that the design mode has changed More...
 
void Invalidate (SfxSlotId _nSlot)
 
virtual void focusGained (const css::awt::FocusEvent &_rEvent)=0
 
virtual void focusLost (const css::awt::FocusEvent &_rEvent)=0
 
virtual void contextMenuRequested ()=0
 

Private Types

enum  AttributeSet {
  eCharAttribs ,
  eParaAttribs
}
 
typedef rtl::Reference< FmFocusListenerAdapterFocusListenerAdapter
 
typedef ::std::vector< FocusListenerAdapterFocusListenerAdapters
 
typedef rtl::Reference< FmMouseListenerAdapterMouseListenerAdapter
 
typedef rtl::Reference< FmTextControlFeatureControlFeature
 
typedef ::std::map< SfxSlotId, ControlFeatureControlFeatures
 

Private Member Functions

virtual void focusGained (const css::awt::FocusEvent &_rEvent) override
 
virtual void focusLost (const css::awt::FocusEvent &_rEvent) override
 
virtual void contextMenuRequested () override
 
void executeAttributeDialog (AttributeSet _eSet, SfxRequest &_rReq)
 
void executeSelectAll ()
 
void executeClipboardSlot (SfxSlotId _nSlot)
 
bool isControllerListening () const
 
rtl::Reference< FmTextControlFeatureimplGetFeatureDispatcher (const css::uno::Reference< css::frame::XDispatchProvider > &_rxProvider, SfxApplication const *_pApplication, SfxSlotId _nSlot)
 
void fillFeatureDispatchers (const css::uno::Reference< css::awt::XControl > &_rxControl, SfxSlotId *_pZeroTerminatedSlots, ControlFeatures &_rDispatchers)
 
void controlActivated (const css::uno::Reference< css::awt::XControl > &_rxControl)
 to be called when a control has been activated More...
 
void controlDeactivated ()
 to be called when the currently active control has been deactivated More...
 
void implClearActiveControlRef ()
 
void startControllerListening (const css::uno::Reference< css::form::runtime::XFormController > &_rxController)
 starts listening at all controls of the given controller for focus events @precond we don't have an active controller currently More...
 
void stopControllerListening ()
 stops listening at the active controller @precond we have an active controller currently More...
 
 DECL_LINK (OnInvalidateClipboard, Timer *, void)
 

Static Private Member Functions

static void transferFeatureStatesToItemSet (ControlFeatures &_rDispatchers, SfxAllItemSet &_rSet, bool _bTranslateLatin)
 creates SfxPoolItes for all features in the given set, and puts them into the given SfxAllItemSet More...
 

Private Attributes

css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer
 
css::uno::Reference< css::awt::XControl > m_xActiveControl
 
css::uno::Reference< css::awt::XTextComponent > m_xActiveTextComponent
 
css::uno::Reference< css::form::runtime::XFormController > m_xActiveController
 
bool m_bActiveControl
 
bool m_bActiveControlIsReadOnly
 
bool m_bActiveControlIsRichText
 
FocusListenerAdapters m_aControlObservers
 
MouseListenerAdapter m_aContextMenuObserver
 
ControlFeatures m_aControlFeatures
 
SfxViewFramem_pViewFrame
 
SfxBindingsm_rBindings
 
Link< LinkParamNone *, void > m_aControlActivationHandler
 
AutoTimer m_aClipboardInvalidation
 
bool m_bNeedClipboardInvalidation
 

Additional Inherited Members

- Protected Member Functions inherited from svx::IFocusObserver
 ~IFocusObserver ()
 
- Protected Member Functions inherited from svx::IContextRequestObserver
 ~IContextRequestObserver ()
 

Detailed Description

Definition at line 74 of file fmtextcontrolshell.hxx.

Member Typedef Documentation

◆ ControlFeature

Definition at line 101 of file fmtextcontrolshell.hxx.

◆ ControlFeatures

Definition at line 102 of file fmtextcontrolshell.hxx.

◆ FocusListenerAdapter

Definition at line 93 of file fmtextcontrolshell.hxx.

◆ FocusListenerAdapters

Definition at line 94 of file fmtextcontrolshell.hxx.

◆ MouseListenerAdapter

Definition at line 97 of file fmtextcontrolshell.hxx.

Member Enumeration Documentation

◆ AttributeSet

Enumerator
eCharAttribs 
eParaAttribs 

Definition at line 146 of file fmtextcontrolshell.hxx.

Constructor & Destructor Documentation

◆ FmTextControlShell()

svx::FmTextControlShell::FmTextControlShell ( SfxViewFrame _pFrame)

◆ ~FmTextControlShell()

svx::FmTextControlShell::~FmTextControlShell ( )
virtual

Definition at line 529 of file fmtextcontrolshell.cxx.

References dispose().

Member Function Documentation

◆ contextMenuRequested()

void svx::FmTextControlShell::contextMenuRequested ( )
overrideprivatevirtual

◆ controlActivated()

void svx::FmTextControlShell::controlActivated ( const css::uno::Reference< css::awt::XControl > &  _rxControl)
private

◆ controlDeactivated()

void svx::FmTextControlShell::controlDeactivated ( )
private

to be called when the currently active control has been deactivated

Definition at line 1127 of file fmtextcontrolshell.cxx.

References DBG_ASSERT, SfxBindings::Invalidate(), IsActiveControl(), m_bActiveControl, m_rBindings, and svx::pTextControlSlots.

Referenced by dispose(), and formDeactivated().

◆ DECL_LINK()

svx::FmTextControlShell::DECL_LINK ( OnInvalidateClipboard  ,
Timer ,
void   
)
private

◆ designModeChanged()

void svx::FmTextControlShell::designModeChanged ( )

notifies the instance that the design mode has changed

Definition at line 1008 of file fmtextcontrolshell.cxx.

References SfxBindings::Invalidate(), m_rBindings, and svx::pTextControlSlots.

◆ dispose()

void svx::FmTextControlShell::dispose ( void  )

◆ executeAttributeDialog()

void svx::FmTextControlShell::executeAttributeDialog ( AttributeSet  _eSet,
SfxRequest _rReq 
)
private

◆ executeClipboardSlot()

void svx::FmTextControlShell::executeClipboardSlot ( SfxSlotId  _nSlot)
private

◆ executeSelectAll()

void svx::FmTextControlShell::executeSelectAll ( )
private

Definition at line 724 of file fmtextcontrolshell.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_xActiveTextComponent.

Referenced by ExecuteTextAttribute().

◆ ExecuteTextAttribute()

void svx::FmTextControlShell::ExecuteTextAttribute ( SfxRequest _rReq)

◆ fillFeatureDispatchers()

void svx::FmTextControlShell::fillFeatureDispatchers ( const css::uno::Reference< css::awt::XControl > &  _rxControl,
SfxSlotId _pZeroTerminatedSlots,
ControlFeatures _rDispatchers 
)
private

◆ focusGained()

void svx::FmTextControlShell::focusGained ( const css::awt::FocusEvent &  _rEvent)
overrideprivatevirtual

Implements svx::IFocusObserver.

Definition at line 1268 of file fmtextcontrolshell.cxx.

References controlActivated(), DBG_ASSERT, and SAL_INFO.

◆ focusLost()

void svx::FmTextControlShell::focusLost ( const css::awt::FocusEvent &  _rEvent)
overrideprivatevirtual

Implements svx::IFocusObserver.

Definition at line 1282 of file fmtextcontrolshell.cxx.

References m_bActiveControl, and SAL_INFO.

◆ ForgetActiveControl()

void svx::FmTextControlShell::ForgetActiveControl ( )

Definition at line 1294 of file fmtextcontrolshell.cxx.

References implClearActiveControlRef().

◆ formActivated()

void svx::FmTextControlShell::formActivated ( const css::uno::Reference< css::form::runtime::XFormController > &  _rxController)

to be called when a form in our document has been activated

Definition at line 1014 of file fmtextcontrolshell.cxx.

References controlActivated(), DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, Exception, m_xActiveController, SAL_INFO, and startControllerListening().

◆ formDeactivated()

void svx::FmTextControlShell::formDeactivated ( const css::uno::Reference< css::form::runtime::XFormController > &  _rxController)

to be called when a form in our document has been deactivated

Definition at line 1040 of file fmtextcontrolshell.cxx.

References controlDeactivated(), IsActiveControl(), isControllerListening(), SAL_INFO, and stopControllerListening().

◆ GetTextAttributeState()

void svx::FmTextControlShell::GetTextAttributeState ( SfxItemSet _rSet)

◆ implClearActiveControlRef()

void svx::FmTextControlShell::implClearActiveControlRef ( )
private

◆ implGetFeatureDispatcher()

rtl::Reference< FmTextControlFeature > svx::FmTextControlShell::implGetFeatureDispatcher ( const css::uno::Reference< css::frame::XDispatchProvider > &  _rxProvider,
SfxApplication const *  _pApplication,
SfxSlotId  _nSlot 
)
private

Definition at line 1234 of file fmtextcontrolshell.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_xURLTransformer, and URL.

Referenced by fillFeatureDispatchers().

◆ Invalidate()

void svx::FmTextControlShell::Invalidate ( SfxSlotId  _nSlot)

◆ IsActiveControl()

bool svx::FmTextControlShell::IsActiveControl ( bool  _bCountRichTextOnly = false) const

◆ isControllerListening()

bool svx::FmTextControlShell::isControllerListening ( ) const
inlineprivate

◆ SetControlActivationHandler()

void svx::FmTextControlShell::SetControlActivationHandler ( const Link< LinkParamNone *, void > &  _rHdl)
inline

Definition at line 123 of file fmtextcontrolshell.hxx.

References m_aControlActivationHandler.

◆ startControllerListening()

void svx::FmTextControlShell::startControllerListening ( const css::uno::Reference< css::form::runtime::XFormController > &  _rxController)
private

starts listening at all controls of the given controller for focus events @precond we don't have an active controller currently

Definition at line 1051 of file fmtextcontrolshell.cxx.

References DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, Exception, isControllerListening(), m_aControlObservers, m_xActiveController, and stopControllerListening().

Referenced by formActivated().

◆ stopControllerListening()

void svx::FmTextControlShell::stopControllerListening ( )
private

stops listening at the active controller @precond we have an active controller currently

Definition at line 1081 of file fmtextcontrolshell.cxx.

References isControllerListening(), m_aControlObservers, and m_xActiveController.

Referenced by dispose(), formDeactivated(), and startControllerListening().

◆ transferFeatureStatesToItemSet()

void svx::FmTextControlShell::transferFeatureStatesToItemSet ( ControlFeatures _rDispatchers,
SfxAllItemSet _rSet,
bool  _bTranslateLatin 
)
staticprivate

creates SfxPoolItes for all features in the given set, and puts them into the given SfxAllItemSet

Definition at line 548 of file fmtextcontrolshell.cxx.

References SfxItemSet::GetPool(), SfxItemPool::GetWhich(), SfxItemPool::IsInRange(), OUStringToOString(), SAL_INFO, SAL_WARN, SfxGetpApp(), and sMessage.

Referenced by executeAttributeDialog().

Member Data Documentation

◆ m_aClipboardInvalidation

AutoTimer svx::FmTextControlShell::m_aClipboardInvalidation
private

◆ m_aContextMenuObserver

MouseListenerAdapter svx::FmTextControlShell::m_aContextMenuObserver
private

Definition at line 98 of file fmtextcontrolshell.hxx.

Referenced by controlActivated(), and implClearActiveControlRef().

◆ m_aControlActivationHandler

Link<LinkParamNone*,void> svx::FmTextControlShell::m_aControlActivationHandler
private

Definition at line 108 of file fmtextcontrolshell.hxx.

Referenced by controlActivated(), and SetControlActivationHandler().

◆ m_aControlFeatures

ControlFeatures svx::FmTextControlShell::m_aControlFeatures
private

◆ m_aControlObservers

FocusListenerAdapters svx::FmTextControlShell::m_aControlObservers
private

◆ m_bActiveControl

bool svx::FmTextControlShell::m_bActiveControl
private

◆ m_bActiveControlIsReadOnly

bool svx::FmTextControlShell::m_bActiveControlIsReadOnly
private

◆ m_bActiveControlIsRichText

bool svx::FmTextControlShell::m_bActiveControlIsRichText
private

◆ m_bNeedClipboardInvalidation

bool svx::FmTextControlShell::m_bNeedClipboardInvalidation
private

Definition at line 110 of file fmtextcontrolshell.hxx.

Referenced by controlActivated(), and GetTextAttributeState().

◆ m_pViewFrame

SfxViewFrame* svx::FmTextControlShell::m_pViewFrame
private

Definition at line 105 of file fmtextcontrolshell.hxx.

Referenced by controlActivated(), and executeAttributeDialog().

◆ m_rBindings

SfxBindings& svx::FmTextControlShell::m_rBindings
private

◆ m_xActiveControl

css::uno::Reference< css::awt::XControl > svx::FmTextControlShell::m_xActiveControl
private

◆ m_xActiveController

css::uno::Reference< css::form::runtime::XFormController > svx::FmTextControlShell::m_xActiveController
private

◆ m_xActiveTextComponent

css::uno::Reference< css::awt::XTextComponent > svx::FmTextControlShell::m_xActiveTextComponent
private

◆ m_xURLTransformer

css::uno::Reference< css::util::XURLTransformer > svx::FmTextControlShell::m_xURLTransformer
private

Definition at line 78 of file fmtextcontrolshell.hxx.

Referenced by implGetFeatureDispatcher().


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