LibreOffice Module extensions (master) 1
|
#include <eventhandler.hxx>
Public Member Functions | |
EventHandler (const css::uno::Reference< css::uno::XComponentContext > &_rxContext) | |
virtual | ~EventHandler () override |
Private Member Functions | |
virtual void SAL_CALL | inspect (const css::uno::Reference< css::uno::XInterface > &_rxIntrospectee) override |
virtual css::uno::Any SAL_CALL | getPropertyValue (const OUString &_rPropertyName) override |
virtual void SAL_CALL | setPropertyValue (const OUString &_rPropertyName, const css::uno::Any &_rValue) override |
virtual css::uno::Any SAL_CALL | convertToPropertyValue (const OUString &_rPropertyName, const css::uno::Any &_rControlValue) override |
virtual css::uno::Any SAL_CALL | convertToControlValue (const OUString &_rPropertyName, const css::uno::Any &_rPropertyValue, const css::uno::Type &_rControlValueType) override |
virtual css::beans::PropertyState SAL_CALL | getPropertyState (const OUString &_rPropertyName) override |
virtual void SAL_CALL | addPropertyChangeListener (const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override |
virtual void SAL_CALL | removePropertyChangeListener (const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override |
virtual css::uno::Sequence< css::beans::Property > SAL_CALL | getSupportedProperties () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupersededProperties () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getActuatingProperties () override |
virtual css::inspection::LineDescriptor SAL_CALL | describePropertyLine (const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory) override |
virtual sal_Bool SAL_CALL | isComposable (const OUString &_rPropertyName) override |
virtual css::inspection::InteractiveSelectionResult SAL_CALL | onInteractivePropertySelection (const OUString &_rPropertyName, sal_Bool _bPrimary, css::uno::Any &_rData, const css::uno::Reference< css::inspection::XObjectInspectorUI > &_rxInspectorUI) override |
virtual void SAL_CALL | actuatingPropertyChanged (const OUString &_rActuatingPropertyName, const css::uno::Any &_rNewValue, const css::uno::Any &_rOldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI > &_rxInspectorUI, sal_Bool _bFirstTimeInit) override |
virtual sal_Bool SAL_CALL | suspend (sal_Bool _bSuspend) override |
virtual void SAL_CALL | disposing () override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
void | impl_getFormComponentScriptEvents_nothrow (std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const |
returns the script events associated with our introspectee More... | |
void | impl_getDialogElementScriptEvents_nothrow (std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const |
returns the script events associated with our introspectee More... | |
void | impl_getComponentScriptEvents_nothrow (std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const |
returns the script events associated with our introspectee More... | |
void | impl_getComponentListenerTypes_nothrow (std::vector< css::uno::Type > &_out_rTypes) const |
returns the types of the listeners which can be registered at our introspectee More... | |
css::uno::Reference< css::uno::XInterface > | impl_getSecondaryComponentForEventInspection_throw () const |
returns a secondary component to be used for event inspection More... | |
const EventDescription & | impl_getEventForName_throw (const OUString &_rPropertyName) const |
returns the event description for the given (programmatic) property name More... | |
sal_Int32 | impl_getComponentIndexInParent_throw () const |
returns the index of our component within its parent, if this parent can be obtained (XChild::getParent) and supports an ->XIndexAccess interface More... | |
void | impl_setFormComponentScriptEvent_nothrow (const css::script::ScriptEventDescriptor &_rScriptEvent) |
sets a given script event as event handler at a form component More... | |
void | impl_setDialogElementScriptEvent_nothrow (const css::script::ScriptEventDescriptor &_rScriptEvent) |
sets a given script event as event handler at a dialog component More... | |
css::uno::Reference< css::frame::XFrame > | impl_getContextFrame_nothrow () const |
returns the frame associated with our context document More... | |
bool | impl_filterMethod_nothrow (const EventDescription &_rEvent) const |
approves or denies a certain method to be included in the UI More... | |
EventHandler (const EventHandler &)=delete | |
EventHandler & | operator= (const EventHandler &)=delete |
Private Attributes | |
mutable::osl::Mutex | m_aMutex |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
the context in which the instance was created More... | |
css::uno::Reference< css::beans::XPropertySet > | m_xComponent |
the properties of the object we're handling More... | |
PropertyChangeListeners | m_aPropertyListeners |
our XPropertyChangeListener(s) More... | |
EventMap | m_aEvents |
cache of the events we found at our introspectee More... | |
bool | m_bEventsMapInitialized |
has m_aEvents been initialized? More... | |
bool | m_bIsDialogElement |
is our introspectee a dialog element? More... | |
sal_Int16 | m_nGridColumnType |
(FormComponent) type of the grid column being inspected, or -1 if we're not inspecting a grid column More... | |
Definition at line 74 of file eventhandler.hxx.
|
explicit |
|
overridevirtual |
Definition at line 430 of file eventhandler.cxx.
|
privatedelete |
|
overrideprivatevirtual |
Definition at line 810 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 633 of file eventhandler.cxx.
References m_aMutex.
|
overrideprivatevirtual |
Definition at line 568 of file eventhandler.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, m_aMutex, m_xContext, and sScript.
|
overrideprivatevirtual |
Definition at line 541 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 717 of file eventhandler.cxx.
References m_aMutex, pcr::EventDescription::sDisplayName, pcr::EventDescription::sHelpId, and pcr::EventDescription::sUniqueBrowseId.
|
overrideprivatevirtual |
Definition at line 817 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 711 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 434 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 628 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 487 of file eventhandler.cxx.
References Any, m_aMutex, pcr::EventDescription::sListenerClassName, and pcr::EventDescription::sListenerMethodName.
|
overrideprivatevirtual |
Definition at line 705 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 647 of file eventhandler.cxx.
References aEvent, aListeners, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::getEventMethodsForType(), m_aMutex, comphelper::mapValuesToSequence(), and Property.
|
overrideprivatevirtual |
Definition at line 444 of file eventhandler.cxx.
|
private |
approves or denies a certain method to be included in the UI
Definition at line 1075 of file eventhandler.cxx.
References pcr::EventDescription::sUniqueBrowseId, UID_BRWEVT_ACTIONPERFORMED, and UID_BRWEVT_CHANGED.
|
private |
returns the index of our component within its parent, if this parent can be obtained (XChild::getParent) and supports an ->XIndexAccess interface
Definition at line 846 of file eventhandler.cxx.
|
private |
returns the types of the listeners which can be registered at our introspectee
_out_rTypes | Takes, upon successful return, the types of possible listeners at the introspectee |
Definition at line 884 of file eventhandler.cxx.
References aListeners, DBG_UNHANDLED_EXCEPTION, Exception, m_xContext, and xIntrospection.
|
inlineprivate |
returns the script events associated with our introspectee
_out_rEvents | Takes, the events currently associated with the introspectee |
Definition at line 154 of file eventhandler.hxx.
References impl_getDialogElementScriptEvents_nothrow(), impl_getFormComponentScriptEvents_nothrow(), and m_bIsDialogElement.
|
private |
returns the frame associated with our context document
Definition at line 828 of file eventhandler.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, m_xContext, and xController.
|
private |
returns the script events associated with our introspectee
_out_rEvents | Takes, upon successful return, the events currently associated with the introspectee @precond Our introspectee is a dialog element |
Definition at line 914 of file eventhandler.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and i.
Referenced by impl_getComponentScriptEvents_nothrow().
|
private |
returns the event description for the given (programmatic) property name
_rPropertyName | the name whose event description should be looked up |
css::beans::UnknownPropertyException | if our introspectee does not have an event with the given logical name (see ->getSupportedProperties) |
Definition at line 959 of file eventhandler.cxx.
References pos.
|
private |
returns the script events associated with our introspectee
_out_rEvents | Takes, upon successful return, the events currently associated with the introspectee @precond Our introspectee is a form component |
Definition at line 862 of file eventhandler.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and comphelper::sequenceToContainer().
Referenced by impl_getComponentScriptEvents_nothrow().
|
private |
returns a secondary component to be used for event inspection
In the UI, we want to mix events for the control model with events for the control. Since our introspectee is a model, this method creates a control for it (if possible).
if | an unexpected error occurs during creation of the secondary component. A <NULL> component to be returned is not unexpected, but allowed |
@precond ->m_xComponent is not <NULL>
Definition at line 935 of file eventhandler.cxx.
References m_xContext, PROPERTY_DEFAULTCONTROL, and xController.
|
private |
sets a given script event as event handler at a dialog component
_rScriptEvent | the script event to set |
Definition at line 1037 of file eventhandler.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, and Exception.
|
private |
sets a given script event as event handler at a form component
_rScriptEvent | the script event to set |
Definition at line 980 of file eventhandler.cxx.
References comphelper::containerToSequence(), DBG_UNHANDLED_EXCEPTION, Exception, m_xContext, and comphelper::sequenceToContainer().
|
overrideprivatevirtual |
Definition at line 449 of file eventhandler.cxx.
References pcr::classifyComponent(), DBG_UNHANDLED_EXCEPTION, Exception, m_aMutex, PROPERTY_HEIGHT, PROPERTY_POSITIONX, PROPERTY_POSITIONY, and PROPERTY_WIDTH.
|
overrideprivatevirtual |
Definition at line 739 of file eventhandler.cxx.
|
overrideprivatevirtual |
Definition at line 744 of file eventhandler.cxx.
References Any, SvxAbstractDialogFactory::Create(), SvxAbstractDialogFactory::CreateSvxMacroAssignDlg(), DBG_UNHANDLED_EXCEPTION, Exception, m_aMutex, m_xContext, RET_CANCEL, setPropertyValue(), and pcr::EventDescription::sListenerMethodName.
|
privatedelete |
|
overrideprivatevirtual |
Definition at line 641 of file eventhandler.cxx.
References m_aMutex.
|
overrideprivatevirtual |
Definition at line 511 of file eventhandler.cxx.
References aEvent, getPropertyValue(), m_aMutex, m_xContext, and pcr::EventDescription::nId.
|
overrideprivatevirtual |
Definition at line 439 of file eventhandler.cxx.
References ServiceName, and cppu::supportsService().
Definition at line 823 of file eventhandler.cxx.
|
private |
cache of the events we found at our introspectee
Definition at line 86 of file eventhandler.hxx.
|
private |
Definition at line 77 of file eventhandler.hxx.
|
private |
our XPropertyChangeListener(s)
Definition at line 84 of file eventhandler.hxx.
|
private |
has m_aEvents been initialized?
Definition at line 88 of file eventhandler.hxx.
|
private |
is our introspectee a dialog element?
Definition at line 90 of file eventhandler.hxx.
Referenced by impl_getComponentScriptEvents_nothrow().
|
private |
(FormComponent) type of the grid column being inspected, or -1 if we're not inspecting a grid column
Definition at line 93 of file eventhandler.hxx.
|
private |
the properties of the object we're handling
Definition at line 82 of file eventhandler.hxx.
|
private |
the context in which the instance was created
Definition at line 80 of file eventhandler.hxx.