24#include <com/sun/star/uno/XComponentContext.hpp>
25#include <com/sun/star/beans/PropertyState.hpp>
26#include <com/sun/star/beans/XPropertySet.hpp>
27#include <com/sun/star/beans/Property.hpp>
28#include <com/sun/star/script/XTypeConverter.hpp>
29#include <com/sun/star/frame/XModel.hpp>
30#include <com/sun/star/uno/Sequence.hxx>
31#include <com/sun/star/uno/Any.hxx>
32#include <com/sun/star/util/Date.hpp>
33#include <com/sun/star/util/Time.hpp>
34#include <com/sun/star/util/DateTime.hpp>
35#include <com/sun/star/inspection/XPropertyHandler.hpp>
36#include <com/sun/star/lang/XServiceInfo.hpp>
46 namespace inspection {
47 struct LineDescriptor;
48 class XPropertyControlFactory;
64 typedef ::cppu::WeakComponentImplHelper < css::inspection::XPropertyHandler
83 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
95 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
100 virtual void SAL_CALL
inspect(
const css::uno::Reference< css::uno::XInterface >& _rxIntrospectee )
override;
104 virtual css::uno::Any SAL_CALL
convertToPropertyValue(
const OUString& _rPropertyName,
const css::uno::Any& _rControlValue )
override;
105 virtual css::uno::Any SAL_CALL
convertToControlValue(
const OUString& _rPropertyName,
const css::uno::Any& _rPropertyValue,
const css::uno::Type& _rControlValueType )
override;
106 virtual css::beans::PropertyState SAL_CALL
getPropertyState(
const OUString& _rPropertyName )
override;
107 virtual css::inspection::LineDescriptor SAL_CALL
describePropertyLine(
const OUString& _rPropertyName,
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory )
override;
109 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;
110 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;
111 virtual void SAL_CALL
addPropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener )
override;
112 virtual void SAL_CALL
removePropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener )
override;
117 virtual
void SAL_CALL
disposing() override;
120 virtual css::uno::Sequence< css::
beans::Property >
131 const css::uno::Any& _rOldValue, const css::uno::Any& _rNewValue );
161 std::vector< css::
beans::Property >& _rProperties,
162 const OUString& _rPropertyName
168 std::vector< css::
beans::Property >& _rProperties,
169 const OUString& _rPropertyName,
170 sal_Int16 _nAttribs = 0
176 std::vector< css::
beans::Property >& _rProperties,
177 const OUString& _rPropertyName,
178 sal_Int16 _nAttribs = 0
184 std::vector< css::
beans::Property >& _rProperties,
185 const OUString& _rPropertyName,
192 std::vector< css::
beans::Property >& _rProperties,
193 const OUString& _rPropertyName,
200 std::vector< css::
beans::Property >& _rProperties,
201 const OUString& _rPropertyName,
208 std::vector< css::
beans::Property >& _rProperties,
209 const OUString& _rPropertyName,
215 std::vector< css::
beans::Property >& _rProperties,
216 const OUString& _rPropertyName,
217 const css::uno::
Type& _rType,
218 sal_Int16 _nAttribs = 0
233 const css::
beans::Property*
244 const css::
beans::Property&
263 const css::beans::Property&
274 css::uno::Reference< css::frame::XModel >
277 return css::uno::Reference< css::frame::XModel >(
278 m_xContext->getValueByName(
"ContextDocument" ), css::uno::UNO_QUERY );
338 return pProp ? pProp->Name : OUString();
353 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
PropertyHandler implementation which additionally supports XServiceInfo.
virtual OUString SAL_CALL getImplementationName() override=0
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) final override
PropertyHandlerComponent(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override=0
the base class for property handlers
void addInt16PropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs=0) const
adds a description for the given int16 property to the given property vector
virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override
std::unique_ptr< OPropertyInfoService > m_pInfoService
access to property meta data
PropertyHandler & operator=(const PropertyHandler &)=delete
PropertyId impl_getPropertyId_nothrow(const OUString &_rPropertyName) const
retrieves the property id for a given property name
void addDoublePropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs) const
adds a description for the given double property to the given property vector
css::uno::Reference< css::uno::XComponentContext > m_xContext
the context in which the instance was created
PropertyHandler(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
void addDatePropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs) const
adds a description for the given date property to the given property vector
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
const css::beans::Property * impl_getPropertyFromId_nothrow(PropertyId _nPropId) const
retrieves a property given by handle
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
type converter, needed on various occasions
virtual void onNewComponent()
called when XPropertyHandler::inspect has been called, and we thus have a new component to inspect
virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
virtual css::uno::Sequence< css::beans::Property > doDescribeSupportedProperties() const =0
bool impl_isSupportedProperty_nothrow(PropertyId _nPropId) const
determines whether a given property id is part of our supported properties
void addTimePropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs) const
adds a description for the given time property to the given property vector
StlSyntaxSequence< css::beans::Property > m_aSupportedProperties
cache for getSupportedProperties
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &_rPropertyName, const css::uno::Any &_rControlValue) override
void addStringPropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName) const
adds a description for the given string property to the given property vector Most probably to be cal...
css::uno::Reference< css::beans::XPropertySetInfo > m_xComponentPropertyInfo
info about our component's properties
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
void firePropertyChange(const OUString &_rPropName, PropertyId _nPropId, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
fires the change in a property value to our listener (if any)
bool impl_componentHasProperty_throw(const OUString &_rPropName) const
determines whether our component has a given property
virtual void SAL_CALL disposing() override
const css::beans::Property & impl_getPropertyFromName_throw(const OUString &_rPropertyName) const
retrieves a property given by name
virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > &_rxIntrospectee) override
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &_rPropertyName, const css::uno::Any &_rPropertyValue, const css::uno::Type &_rControlValueType) override
PropertyId impl_getPropertyId_throwUnknownProperty(const OUString &_rPropertyName) const
retrieves the property id for a given property name
virtual sal_Bool SAL_CALL suspend(sal_Bool _bSuspend) override
weld::Window * impl_getDefaultDialogFrame_nothrow() const
retrieves a window which can be used as parent for dialogs
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &_rPropertyName) override
void addDateTimePropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs) const
adds a description for the given DateTime property to the given property vector
virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) 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
void addInt32PropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, sal_Int16 _nAttribs=0) const
adds a description for the given int32 property to the given property vector
sal_Int16 impl_getDocumentMeasurementUnit_throw() const
determines the default measure unit for the document in which our component lives
virtual ~PropertyHandler() override
css::uno::Reference< css::beans::XPropertySet > m_xComponent
the component we're inspecting
OUString impl_getPropertyNameFromId_nothrow(PropertyId _nPropId) const
get the name of a property given by handle
PropertyId impl_getPropertyId_throwRuntime(const OUString &_rPropertyName) const
retrieves the property id for a given property name
virtual sal_Bool SAL_CALL isComposable(const OUString &_rPropertyName) override
void impl_setContextDocumentModified_nothrow() const
marks the context document as modified
PropertyHandler(const PropertyHandler &)=delete
css::uno::Reference< css::frame::XModel > impl_getContextDocument_nothrow() const
returns the value of the ContextDocument property in the ComponentContext which was used to create th...
const css::beans::Property & impl_getPropertyFromId_throw(PropertyId _nPropId) const
retrieves a property given by handle
void implAddPropertyDescription(std::vector< css::beans::Property > &_rProperties, const OUString &_rPropertyName, const css::uno::Type &_rType, sal_Int16 _nAttribs=0) const
adds a Property, given by name only, to a given vector of Properties
PropertyChangeListeners m_aPropertyListeners
the property listener which has been registered
bool m_bSupportedPropertiesAreKnown
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory) 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
a property handler for any virtual string properties
::cppu::ImplHelper1< css::lang::XServiceInfo > PropertyHandlerComponent_Base
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler > PropertyHandler_Base
#define DECLARE_XCOMPONENT()
#define DECLARE_XTYPEPROVIDER()
#define DECLARE_XINTERFACE()