LibreOffice Module svx (master) 1
|
#include <fmtextcontrolshell.hxx>
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< FmFocusListenerAdapter > | FocusListenerAdapter |
typedef ::std::vector< FocusListenerAdapter > | FocusListenerAdapters |
typedef rtl::Reference< FmMouseListenerAdapter > | MouseListenerAdapter |
typedef rtl::Reference< FmTextControlFeature > | ControlFeature |
typedef ::std::map< SfxSlotId, ControlFeature > | ControlFeatures |
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< FmTextControlFeature > | implGetFeatureDispatcher (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 |
SfxViewFrame * | m_pViewFrame |
SfxBindings & | m_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 () | |
Definition at line 74 of file fmtextcontrolshell.hxx.
|
private |
Definition at line 101 of file fmtextcontrolshell.hxx.
|
private |
Definition at line 102 of file fmtextcontrolshell.hxx.
|
private |
Definition at line 93 of file fmtextcontrolshell.hxx.
|
private |
Definition at line 94 of file fmtextcontrolshell.hxx.
|
private |
Definition at line 97 of file fmtextcontrolshell.hxx.
|
private |
Enumerator | |
---|---|
eCharAttribs | |
eParaAttribs |
Definition at line 146 of file fmtextcontrolshell.hxx.
svx::FmTextControlShell::FmTextControlShell | ( | SfxViewFrame * | _pFrame | ) |
Definition at line 515 of file fmtextcontrolshell.cxx.
References GetBindings(), LINK, m_aClipboardInvalidation, Timer::SetInvokeHandler(), and Timer::SetTimeout().
|
virtual |
Definition at line 529 of file fmtextcontrolshell.cxx.
References dispose().
|
overrideprivatevirtual |
Implements svx::IContextRequestObserver.
Definition at line 1300 of file fmtextcontrolshell.cxx.
References SfxDispatcher::ExecutePopup(), SfxBindings::GetDispatcher(), and m_rBindings.
|
private |
to be called when a control has been activated
Definition at line 1137 of file fmtextcontrolshell.cxx.
References Link< typename Arg, typename Ret >::Call(), DBG_ASSERT, fillFeatureDispatchers(), implClearActiveControlRef(), SfxBindings::Invalidate(), m_aClipboardInvalidation, m_aContextMenuObserver, m_aControlActivationHandler, m_aControlFeatures, m_bActiveControl, m_bActiveControlIsReadOnly, m_bActiveControlIsRichText, m_bNeedClipboardInvalidation, m_pViewFrame, m_rBindings, m_xActiveControl, m_xActiveController, m_xActiveTextComponent, svx::pTextControlSlots, SAL_INFO, Timer::Start(), and SfxShell::UIFeatureChanged().
Referenced by focusGained(), and formActivated().
|
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().
|
private |
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.
void svx::FmTextControlShell::dispose | ( | void | ) |
Definition at line 999 of file fmtextcontrolshell.cxx.
References controlDeactivated(), IsActiveControl(), isControllerListening(), and stopControllerListening().
Referenced by ~FmTextControlShell().
|
private |
Definition at line 613 of file fmtextcontrolshell.cxx.
References EditEngine::CreatePool(), DBG_ASSERT, SfxRequest::Done(), eCharAttribs, fillFeatureDispatchers(), SfxRequest::GetFrameWeld(), SfxShell::GetItem(), SfxItemSet::GetItem(), SfxItemSet::GetItemState(), SfxViewFrame::GetObjectShell(), SfxBoolItem::GetValue(), m_aControlFeatures, m_pViewFrame, m_xActiveControl, comphelper::makePropertyValue(), svx::pDialogSlots, RET_OK, SAL_WARN, transferFeatureStatesToItemSet(), and TransformItems().
Referenced by ExecuteTextAttribute().
|
private |
Definition at line 741 of file fmtextcontrolshell.cxx.
References svt::OStringTransfer::CopyString(), DBG_UNHANDLED_EXCEPTION, Exception, m_xActiveControl, m_xActiveTextComponent, and svt::OStringTransfer::PasteString().
Referenced by ExecuteTextAttribute().
|
private |
Definition at line 724 of file fmtextcontrolshell.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_xActiveTextComponent.
Referenced by ExecuteTextAttribute().
void svx::FmTextControlShell::ExecuteTextAttribute | ( | SfxRequest & | _rReq | ) |
Definition at line 781 of file fmtextcontrolshell.cxx.
References aArguments, DBG_ASSERT, SfxRequest::Done(), eCharAttribs, eParaAttribs, executeAttributeDialog(), executeClipboardSlot(), executeSelectAll(), SfxRequest::GetArgs(), SfxItemSet::GetItem(), SvxTextLineItem::GetLineStyle(), SfxItemSet::GetPool(), SfxRequest::GetSlot(), SvxCrossedOutItem::GetStrikeout(), SfxItemPool::GetWhich(), LINESTYLE_NONE, LINESTYLE_SINGLE, m_aControlFeatures, SfxItemSet::Put(), STRIKEOUT_NONE, STRIKEOUT_SINGLE, and TransformItems().
|
private |
Definition at line 1213 of file fmtextcontrolshell.cxx.
References DBG_ASSERT, implGetFeatureDispatcher(), and SfxGetpApp().
Referenced by controlActivated(), and executeAttributeDialog().
|
overrideprivatevirtual |
Implements svx::IFocusObserver.
Definition at line 1268 of file fmtextcontrolshell.cxx.
References controlActivated(), DBG_ASSERT, and SAL_INFO.
|
overrideprivatevirtual |
Implements svx::IFocusObserver.
Definition at line 1282 of file fmtextcontrolshell.cxx.
References m_bActiveControl, and SAL_INFO.
void svx::FmTextControlShell::ForgetActiveControl | ( | ) |
Definition at line 1294 of file fmtextcontrolshell.cxx.
References implClearActiveControlRef().
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().
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().
void svx::FmTextControlShell::GetTextAttributeState | ( | SfxItemSet & | _rSet | ) |
Definition at line 887 of file fmtextcontrolshell.cxx.
References TransferableDataHelper::CreateFromSystemClipboard(), SfxItemSet::DisableItem(), SfxWhichIter::FirstWhich(), TransferableDataHelper::HasFormat(), IsActiveControl(), SvtCTLOptions::IsCTLFontEnabled(), m_aControlFeatures, m_bActiveControlIsReadOnly, m_bNeedClipboardInvalidation, m_xActiveControl, m_xActiveTextComponent, SfxWhichIter::NextWhich(), SAL_INFO, and SAL_WARN_IF.
|
private |
Definition at line 1097 of file fmtextcontrolshell.cxx.
References m_aClipboardInvalidation, m_aContextMenuObserver, m_aControlFeatures, m_bActiveControl, m_bActiveControlIsReadOnly, m_bActiveControlIsRichText, m_xActiveControl, m_xActiveTextComponent, SAL_INFO, and Task::Stop().
Referenced by controlActivated(), and ForgetActiveControl().
|
private |
Definition at line 1234 of file fmtextcontrolshell.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_xURLTransformer, and URL.
Referenced by fillFeatureDispatchers().
void svx::FmTextControlShell::Invalidate | ( | SfxSlotId | _nSlot | ) |
Definition at line 1259 of file fmtextcontrolshell.cxx.
References SfxBindings::Invalidate(), m_rBindings, and SfxBindings::Update().
Referenced by svx::FmTextControlFeature::statusChanged().
bool svx::FmTextControlShell::IsActiveControl | ( | bool | _bCountRichTextOnly = false | ) | const |
Definition at line 990 of file fmtextcontrolshell.cxx.
References m_bActiveControl, and m_bActiveControlIsRichText.
Referenced by controlDeactivated(), dispose(), formDeactivated(), and GetTextAttributeState().
|
inlineprivate |
Definition at line 151 of file fmtextcontrolshell.hxx.
References m_aControlObservers.
Referenced by dispose(), formDeactivated(), startControllerListening(), and stopControllerListening().
|
inline |
Definition at line 123 of file fmtextcontrolshell.hxx.
References m_aControlActivationHandler.
|
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().
|
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().
|
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().
|
private |
Definition at line 109 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), FmTextControlShell(), and implClearActiveControlRef().
|
private |
Definition at line 98 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), and implClearActiveControlRef().
|
private |
Definition at line 108 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), and SetControlActivationHandler().
|
private |
Definition at line 103 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), executeAttributeDialog(), ExecuteTextAttribute(), GetTextAttributeState(), and implClearActiveControlRef().
|
private |
Definition at line 95 of file fmtextcontrolshell.hxx.
Referenced by isControllerListening(), startControllerListening(), and stopControllerListening().
|
private |
Definition at line 85 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), controlDeactivated(), focusLost(), implClearActiveControlRef(), and IsActiveControl().
|
private |
Definition at line 89 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), GetTextAttributeState(), and implClearActiveControlRef().
|
private |
Definition at line 90 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), implClearActiveControlRef(), and IsActiveControl().
|
private |
Definition at line 110 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), and GetTextAttributeState().
|
private |
Definition at line 105 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), and executeAttributeDialog().
|
private |
Definition at line 107 of file fmtextcontrolshell.hxx.
Referenced by contextMenuRequested(), controlActivated(), controlDeactivated(), designModeChanged(), and Invalidate().
|
private |
Definition at line 79 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), executeAttributeDialog(), executeClipboardSlot(), GetTextAttributeState(), and implClearActiveControlRef().
|
private |
Definition at line 81 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), formActivated(), startControllerListening(), and stopControllerListening().
|
private |
Definition at line 80 of file fmtextcontrolshell.hxx.
Referenced by controlActivated(), executeClipboardSlot(), executeSelectAll(), GetTextAttributeState(), and implClearActiveControlRef().
|
private |
Definition at line 78 of file fmtextcontrolshell.hxx.
Referenced by implGetFeatureDispatcher().