24#include <com/sun/star/script/ScriptEventDescriptor.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/inspection/XPropertyHandler.hpp>
27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/frame/XFrame.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
33#include <unordered_map>
59 std::u16string_view listenerClassName,
60 std::u16string_view listenerMethodName,
63 OString _sUniqueBrowseId );
66 typedef std::unordered_map< OUString, EventDescription >
EventMap;
71 typedef ::cppu::WeakComponentImplHelper < css::inspection::XPropertyHandler
72 , css::lang::XServiceInfo
80 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
97 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
104 virtual void SAL_CALL
inspect(
const css::uno::Reference< css::uno::XInterface >& _rxIntrospectee )
override;
105 virtual css::uno::Any SAL_CALL
getPropertyValue(
const OUString& _rPropertyName )
override;
106 virtual void SAL_CALL
setPropertyValue(
const OUString& _rPropertyName,
const css::uno::Any& _rValue )
override;
107 virtual css::uno::Any SAL_CALL
convertToPropertyValue(
const OUString& _rPropertyName,
const css::uno::Any& _rControlValue )
override;
108 virtual css::uno::Any SAL_CALL
convertToControlValue(
const OUString& _rPropertyName,
const css::uno::Any& _rPropertyValue,
const css::uno::Type& _rControlValueType )
override;
109 virtual css::beans::PropertyState SAL_CALL
getPropertyState(
const OUString& _rPropertyName )
override;
110 virtual void SAL_CALL
addPropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener )
override;
111 virtual void SAL_CALL
removePropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener )
override;
115 virtual css::inspection::LineDescriptor SAL_CALL
describePropertyLine(
const OUString& _rPropertyName,
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory )
override;
117 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;
118 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;
123 virtual
void SAL_CALL
disposing() override;
137 std::vector< css::script::ScriptEventDescriptor >& _out_rEvents
147 std::vector< css::script::ScriptEventDescriptor >& _out_rEvents
155 std::vector< css::script::ScriptEventDescriptor >& _out_rEvents
169 std::vector< css::uno::Type >& _out_rTypes
188 css::uno::Reference< css::uno::XInterface >
223 css::uno::Reference< css::frame::XFrame >
void impl_getFormComponentScriptEvents_nothrow(std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const
returns the script events associated with our introspectee
EventMap m_aEvents
cache of the events we found at our introspectee
virtual sal_Bool SAL_CALL isComposable(const OUString &_rPropertyName) override
bool m_bEventsMapInitialized
has m_aEvents been initialized?
bool m_bIsDialogElement
is our introspectee a dialog element?
EventHandler(const EventHandler &)=delete
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::uno::XInterface > impl_getSecondaryComponentForEventInspection_throw() const
returns a secondary component to be used for event inspection
void impl_getComponentScriptEvents_nothrow(std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const
returns the script events associated with our introspectee
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &_rPropertyName, const css::uno::Any &_rPropertyValue, const css::uno::Type &_rControlValueType) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
css::uno::Reference< css::beans::XPropertySet > m_xComponent
the properties of the object we're handling
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
virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
EventHandler & operator=(const EventHandler &)=delete
css::uno::Reference< css::frame::XFrame > impl_getContextFrame_nothrow() const
returns the frame associated with our context document
virtual ~EventHandler() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void impl_setFormComponentScriptEvent_nothrow(const css::script::ScriptEventDescriptor &_rScriptEvent)
sets a given script event as event handler at a form component
bool impl_filterMethod_nothrow(const EventDescription &_rEvent) const
approves or denies a certain method to be included in the UI
virtual sal_Bool SAL_CALL suspend(sal_Bool _bSuspend) override
const EventDescription & impl_getEventForName_throw(const OUString &_rPropertyName) const
returns the event description for the given (programmatic) property name
virtual void SAL_CALL setPropertyValue(const OUString &_rPropertyName, const css::uno::Any &_rValue) 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 void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &_rPropertyName) override
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &_rPropertyName, const css::uno::Any &_rControlValue) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &_rPropertyName) override
PropertyChangeListeners m_aPropertyListeners
our XPropertyChangeListener(s)
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
EventHandler(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
css::uno::Reference< css::uno::XComponentContext > m_xContext
the context in which the instance was created
void impl_setDialogElementScriptEvent_nothrow(const css::script::ScriptEventDescriptor &_rScriptEvent)
sets a given script event as event handler at a dialog component
virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > &_rxIntrospectee) override
virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory) override
void impl_getDialogElementScriptEvents_nothrow(std::vector< css::script::ScriptEventDescriptor > &_out_rEvents) const
returns the script events associated with our introspectee
mutable::osl::Mutex m_aMutex
sal_Int32 impl_getComponentIndexInParent_throw() const
returns the index of our component within its parent, if this parent can be obtained (XChild::getPare...
sal_Int16 m_nGridColumnType
(FormComponent) type of the grid column being inspected, or -1 if we're not inspecting a grid column
a property handler for any virtual string properties
std::unordered_map< OUString, EventDescription > EventMap
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler, css::lang::XServiceInfo > EventHandler_Base
#define DECLARE_XCOMPONENT()
OUString sListenerClassName
OUString sListenerMethodName