LibreOffice Module extensions (master) 1
Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
pcr::PropertyHandler Class Referenceabstract

the base class for property handlers More...

#include <propertyhandler.hxx>

Inheritance diagram for pcr::PropertyHandler:
[legend]
Collaboration diagram for pcr::PropertyHandler:
[legend]

Protected Member Functions

 PropertyHandler (const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
virtual ~PropertyHandler () override
 
virtual void SAL_CALL inspect (const css::uno::Reference< css::uno::XInterface > &_rxIntrospectee) 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::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 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 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 sal_Bool SAL_CALL suspend (sal_Bool _bSuspend) override
 
virtual void SAL_CALL disposing () override
 
virtual css::uno::Sequence< css::beans::Property > doDescribeSupportedProperties () const =0
 
virtual void onNewComponent ()
 called when XPropertyHandler::inspect has been called, and we thus have a new component to inspect More...
 
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) More...
 
weld::Windowimpl_getDefaultDialogFrame_nothrow () const
 retrieves a window which can be used as parent for dialogs More...
 
PropertyId impl_getPropertyId_throwUnknownProperty (const OUString &_rPropertyName) const
 retrieves the property id for a given property name More...
 
PropertyId impl_getPropertyId_throwRuntime (const OUString &_rPropertyName) const
 retrieves the property id for a given property name More...
 
PropertyId impl_getPropertyId_nothrow (const OUString &_rPropertyName) const
 retrieves the property id for a given property name More...
 
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 called from within getSupportedProperties More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
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 More...
 
const css::beans::Property * impl_getPropertyFromId_nothrow (PropertyId _nPropId) const
 retrieves a property given by handle More...
 
const css::beans::Property & impl_getPropertyFromId_throw (PropertyId _nPropId) const
 retrieves a property given by handle More...
 
bool impl_isSupportedProperty_nothrow (PropertyId _nPropId) const
 determines whether a given property id is part of our supported properties More...
 
const css::beans::Property & impl_getPropertyFromName_throw (const OUString &_rPropertyName) const
 retrieves a property given by name More...
 
OUString impl_getPropertyNameFromId_nothrow (PropertyId _nPropId) const
 get the name of a property given by handle More...
 
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 this handler. More...
 
void impl_setContextDocumentModified_nothrow () const
 marks the context document as modified More...
 
bool impl_componentHasProperty_throw (const OUString &_rPropName) const
 determines whether our component has a given property More...
 
sal_Int16 impl_getDocumentMeasurementUnit_throw () const
 determines the default measure unit for the document in which our component lives More...
 

Protected Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 the context in which the instance was created More...
 
css::uno::Reference< css::beans::XPropertySetm_xComponent
 the component we're inspecting More...
 
css::uno::Reference< css::beans::XPropertySetInfo > m_xComponentPropertyInfo
 info about our component's properties More...
 
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
 type converter, needed on various occasions More...
 
std::unique_ptr< OPropertyInfoServicem_pInfoService
 access to property meta data More...
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Private Member Functions

 PropertyHandler (const PropertyHandler &)=delete
 
PropertyHandleroperator= (const PropertyHandler &)=delete
 

Private Attributes

StlSyntaxSequence< css::beans::Property > m_aSupportedProperties
 cache for getSupportedProperties More...
 
bool m_bSupportedPropertiesAreKnown
 
PropertyChangeListeners m_aPropertyListeners
 the property listener which has been registered More...
 

Detailed Description

the base class for property handlers

Definition at line 68 of file propertyhandler.hxx.

Constructor & Destructor Documentation

◆ PropertyHandler() [1/2]

pcr::PropertyHandler::PropertyHandler ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext)
explicitprotected

◆ ~PropertyHandler()

pcr::PropertyHandler::~PropertyHandler ( )
overrideprotectedvirtual

Definition at line 66 of file propertyhandler.cxx.

◆ PropertyHandler() [2/2]

pcr::PropertyHandler::PropertyHandler ( const PropertyHandler )
privatedelete

Member Function Documentation

◆ actuatingPropertyChanged()

void SAL_CALL pcr::PropertyHandler::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 
)
overrideprotectedvirtual

◆ addDatePropertyDescription()

void pcr::PropertyHandler::addDatePropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs 
) const
inlineprotected

adds a description for the given date property to the given property vector

Definition at line 320 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addDateTimePropertyDescription()

void pcr::PropertyHandler::addDateTimePropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs 
) const
inlineprotected

adds a description for the given DateTime property to the given property vector

Definition at line 330 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addDoublePropertyDescription()

void pcr::PropertyHandler::addDoublePropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs 
) const
inlineprotected

adds a description for the given double property to the given property vector

Definition at line 315 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addInt16PropertyDescription()

void pcr::PropertyHandler::addInt16PropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs = 0 
) const
inlineprotected

adds a description for the given int16 property to the given property vector

Definition at line 310 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addInt32PropertyDescription()

void pcr::PropertyHandler::addInt32PropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs = 0 
) const
inlineprotected

adds a description for the given int32 property to the given property vector

Definition at line 305 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::EditPropertyHandler::doDescribeSupportedProperties(), and pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addPropertyChangeListener()

void SAL_CALL pcr::PropertyHandler::addPropertyChangeListener ( const css::uno::Reference< css::beans::XPropertyChangeListener > &  _rxListener)
overrideprotectedvirtual

◆ addStringPropertyDescription()

void pcr::PropertyHandler::addStringPropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName 
) const
inlineprotected

adds a description for the given string property to the given property vector Most probably to be called from within getSupportedProperties

Definition at line 300 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::ButtonNavigationHandler::doDescribeSupportedProperties(), pcr::EFormsPropertyHandler::doDescribeSupportedProperties(), and pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ addTimePropertyDescription()

void pcr::PropertyHandler::addTimePropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
sal_Int16  _nAttribs 
) const
inlineprotected

adds a description for the given time property to the given property vector

Definition at line 325 of file propertyhandler.hxx.

References implAddPropertyDescription().

Referenced by pcr::XSDValidationPropertyHandler::doDescribeSupportedProperties().

◆ convertToControlValue()

Any SAL_CALL pcr::PropertyHandler::convertToControlValue ( const OUString &  _rPropertyName,
const css::uno::Any &  _rPropertyValue,
const css::uno::Type &  _rControlValueType 
)
overrideprotectedvirtual

◆ convertToPropertyValue()

Any SAL_CALL pcr::PropertyHandler::convertToPropertyValue ( const OUString &  _rPropertyName,
const css::uno::Any &  _rControlValue 
)
overrideprotectedvirtual

◆ describePropertyLine()

LineDescriptor SAL_CALL pcr::PropertyHandler::describePropertyLine ( const OUString &  _rPropertyName,
const css::uno::Reference< css::inspection::XPropertyControlFactory > &  _rxControlFactory 
)
overrideprotectedvirtual

◆ disposing()

void SAL_CALL pcr::PropertyHandler::disposing ( )
overrideprotectedvirtual

Reimplemented in pcr::FormComponentPropertyHandler.

Definition at line 247 of file propertyhandler.cxx.

◆ doDescribeSupportedProperties()

virtual css::uno::Sequence< css::beans::Property > pcr::PropertyHandler::doDescribeSupportedProperties ( ) const
protectedpure virtual

◆ firePropertyChange()

void pcr::PropertyHandler::firePropertyChange ( const OUString &  _rPropName,
PropertyId  _nPropId,
const css::uno::Any &  _rOldValue,
const css::uno::Any &  _rNewValue 
)
protected

fires the change in a property value to our listener (if any)

See also
addPropertyChangeListener

Definition at line 255 of file propertyhandler.cxx.

References aEvent.

Referenced by pcr::SubmissionPropertyHandler::_propertyChanged(), pcr::CellBindingPropertyHandler::setPropertyValue(), and pcr::EFormsPropertyHandler::setPropertyValue().

◆ getActuatingProperties()

Sequence< OUString > SAL_CALL pcr::PropertyHandler::getActuatingProperties ( )
overrideprotectedvirtual

◆ getPropertyState()

PropertyState SAL_CALL pcr::PropertyHandler::getPropertyState ( const OUString &  _rPropertyName)
overrideprotectedvirtual

Reimplemented in pcr::ButtonNavigationHandler, and pcr::FormComponentPropertyHandler.

Definition at line 174 of file propertyhandler.cxx.

◆ getSupersededProperties()

Sequence< OUString > SAL_CALL pcr::PropertyHandler::getSupersededProperties ( )
overrideprotectedvirtual

◆ getSupportedProperties()

Sequence< Property > SAL_CALL pcr::PropertyHandler::getSupportedProperties ( )
overrideprotectedvirtual

Definition at line 108 of file propertyhandler.cxx.

References m_aMutex.

◆ impl_componentHasProperty_throw()

bool pcr::PropertyHandler::impl_componentHasProperty_throw ( const OUString &  _rPropName) const
protected

determines whether our component has a given property

Definition at line 341 of file propertyhandler.cxx.

Referenced by pcr::CellBindingPropertyHandler::actuatingPropertyChanged().

◆ impl_getContextDocument_nothrow()

css::uno::Reference< css::frame::XModel > pcr::PropertyHandler::impl_getContextDocument_nothrow ( ) const
inlineprotected

◆ impl_getDefaultDialogFrame_nothrow()

weld::Window * pcr::PropertyHandler::impl_getDefaultDialogFrame_nothrow ( ) const
protected

retrieves a window which can be used as parent for dialogs

Definition at line 308 of file propertyhandler.cxx.

References m_xContext.

◆ impl_getDocumentMeasurementUnit_throw()

sal_Int16 pcr::PropertyHandler::impl_getDocumentMeasurementUnit_throw ( ) const
protected

◆ impl_getPropertyFromId_nothrow()

const Property * pcr::PropertyHandler::impl_getPropertyFromId_nothrow ( PropertyId  _nPropId) const
protected

retrieves a property given by handle

Returns
a pointer to the descriptor for the given properties, if it is one of our supported properties, <NULL> else.
See also
doDescribeSupportedProperties
impl_getPropertyFromId_throw

Definition at line 266 of file propertyhandler.cxx.

References Property.

Referenced by impl_getPropertyNameFromId_nothrow(), and impl_isSupportedProperty_nothrow().

◆ impl_getPropertyFromId_throw()

const Property & pcr::PropertyHandler::impl_getPropertyFromId_throw ( PropertyId  _nPropId) const
protected

retrieves a property given by handle

Exceptions
UnknownPropertyExceptionif the handler does not support a property with the given handle

@seealso doDescribeSupportedProperties

See also
impl_getPropertyFromId_nothrow

Definition at line 277 of file propertyhandler.cxx.

References Property.

◆ impl_getPropertyFromName_throw()

const Property & pcr::PropertyHandler::impl_getPropertyFromName_throw ( const OUString &  _rPropertyName) const
protected

retrieves a property given by name

Exceptions
UnknownPropertyExceptionif the handler does not support a property with the given name

@seealso doDescribeSupportedProperties

Definition at line 286 of file propertyhandler.cxx.

References pcr::StlSyntaxSequence< ELEMENT >::end(), and Property.

◆ impl_getPropertyId_nothrow()

PropertyId pcr::PropertyHandler::impl_getPropertyId_nothrow ( const OUString &  _rPropertyName) const
protected

retrieves the property id for a given property name

Returns
-1 if the property name is not known to our ->m_pInfoService

Definition at line 329 of file propertyhandler.cxx.

◆ impl_getPropertyId_throwRuntime()

PropertyId pcr::PropertyHandler::impl_getPropertyId_throwRuntime ( const OUString &  _rPropertyName) const
protected

◆ impl_getPropertyId_throwUnknownProperty()

PropertyId pcr::PropertyHandler::impl_getPropertyId_throwUnknownProperty ( const OUString &  _rPropertyName) const
protected

◆ impl_getPropertyNameFromId_nothrow()

OUString pcr::PropertyHandler::impl_getPropertyNameFromId_nothrow ( PropertyId  _nPropId) const
inlineprotected

get the name of a property given by handle

Definition at line 335 of file propertyhandler.hxx.

References impl_getPropertyFromId_nothrow().

Referenced by pcr::FormComponentPropertyHandler::impl_doDesignSQLCommand_nothrow().

◆ impl_isSupportedProperty_nothrow()

bool pcr::PropertyHandler::impl_isSupportedProperty_nothrow ( PropertyId  _nPropId) const
inlineprotected

◆ impl_setContextDocumentModified_nothrow()

void pcr::PropertyHandler::impl_setContextDocumentModified_nothrow ( ) const
protected

◆ implAddPropertyDescription()

void pcr::PropertyHandler::implAddPropertyDescription ( std::vector< css::beans::Property > &  _rProperties,
const OUString &  _rPropertyName,
const css::uno::Type &  _rType,
sal_Int16  _nAttribs = 0 
) const
protected

◆ inspect()

void SAL_CALL pcr::PropertyHandler::inspect ( const css::uno::Reference< css::uno::XInterface > &  _rxIntrospectee)
overrideprotectedvirtual

◆ isComposable()

sal_Bool SAL_CALL pcr::PropertyHandler::isComposable ( const OUString &  _rPropertyName)
overrideprotectedvirtual

Definition at line 209 of file propertyhandler.cxx.

References m_aMutex.

◆ onInteractivePropertySelection()

InteractiveSelectionResult SAL_CALL pcr::PropertyHandler::onInteractivePropertySelection ( const OUString &  _rPropertyName,
sal_Bool  _bPrimary,
css::uno::Any &  _rData,
const css::uno::Reference< css::inspection::XObjectInspectorUI > &  _rxInspectorUI 
)
overrideprotectedvirtual

◆ onNewComponent()

void pcr::PropertyHandler::onNewComponent ( )
protectedvirtual

◆ operator=()

PropertyHandler & pcr::PropertyHandler::operator= ( const PropertyHandler )
privatedelete

◆ removePropertyChangeListener()

void SAL_CALL pcr::PropertyHandler::removePropertyChangeListener ( const css::uno::Reference< css::beans::XPropertyChangeListener > &  _rxListener)
overrideprotectedvirtual

◆ suspend()

sal_Bool SAL_CALL pcr::PropertyHandler::suspend ( sal_Bool  _bSuspend)
overrideprotectedvirtual

Reimplemented in pcr::FormComponentPropertyHandler.

Definition at line 240 of file propertyhandler.cxx.

Member Data Documentation

◆ m_aPropertyListeners

PropertyChangeListeners pcr::PropertyHandler::m_aPropertyListeners
private

the property listener which has been registered

Definition at line 79 of file propertyhandler.hxx.

◆ m_aSupportedProperties

StlSyntaxSequence< css::beans::Property > pcr::PropertyHandler::m_aSupportedProperties
mutableprivate

cache for getSupportedProperties

Definition at line 74 of file propertyhandler.hxx.

◆ m_bSupportedPropertiesAreKnown

bool pcr::PropertyHandler::m_bSupportedPropertiesAreKnown
mutableprivate

Definition at line 75 of file propertyhandler.hxx.

◆ m_pInfoService

std::unique_ptr< OPropertyInfoService > pcr::PropertyHandler::m_pInfoService
protected

◆ m_xComponent

css::uno::Reference< css::beans::XPropertySet > pcr::PropertyHandler::m_xComponent
protected

◆ m_xComponentPropertyInfo

css::uno::Reference< css::beans::XPropertySetInfo > pcr::PropertyHandler::m_xComponentPropertyInfo
protected

info about our component's properties

Definition at line 87 of file propertyhandler.hxx.

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > pcr::PropertyHandler::m_xContext
protected

◆ m_xTypeConverter

css::uno::Reference< css::script::XTypeConverter > pcr::PropertyHandler::m_xTypeConverter
protected

type converter, needed on various occasions

Definition at line 89 of file propertyhandler.hxx.


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