LibreOffice Module xmloff (master) 1
|
@descr This class lets you get the values from an object that either supports the interface XPropertySet or XMultiPropertySet. More...
#include <MultiPropertySetHandler.hxx>
Public Member Functions | |
MultiPropertySetHandler (css::uno::Reference< css::uno::XInterface > xObject) | |
@descr Create a handler of the property set of the given object. More... | |
template<class T > | |
void | Add (const OUString &sName, T &rValue) |
@descr Add a property to handle. More... | |
bool | GetProperties () |
@descr Try to get the values for all properties added with the Add method. More... | |
Private Member Functions | |
bool | MultiGet (const css::uno::Sequence< OUString > &rNameList) |
@descr Try to use the XMultiPropertySet interface to get the property values. More... | |
bool | SingleGet (const css::uno::Sequence< OUString > &rNameList) |
@descr Try to use the XPropertySet interface to get the property values. More... | |
Private Attributes | |
::std::map< OUString, std::unique_ptr< PropertyWrapperBase >, OUStringComparison > | aPropertyList |
@descr STL map that maps from property names to polymorphic instances of PropertyWrapper. More... | |
css::uno::Reference< css::uno::XInterface > | mxObject |
The object from which to get the property values. More... | |
@descr This class lets you get the values from an object that either supports the interface XPropertySet or XMultiPropertySet.
If it supports both interfaces then XMultiPropertySet is preferred.
Using it works in three steps.
Definition at line 119 of file MultiPropertySetHandler.hxx.
|
explicit |
@descr Create a handler of the property set of the given object.
xObject | A reference to any of the object's interfaces. not necessarily XPropertySet or XMultiPropertySet. It is casted later to one of the two of them. |
Definition at line 180 of file MultiPropertySetHandler.hxx.
|
inline |
@descr Add a property to handle.
The type given implicitly by the reference to a variable is used to create an instance of the PropertyWrapper template class.
sName | Name of the property. |
rValue | Reference to a variable whose value is set by the call to GetProperties to the property's value. |
Definition at line 137 of file MultiPropertySetHandler.hxx.
References aPropertyList, and sName.
Referenced by SchXMLExportHelper_Impl::exportAxes().
|
inline |
@descr Try to get the values for all properties added with the Add method.
If possible it uses the XMultiPropertySet. If that fails (i.e. for an UnknownPropertyExcption) or if the interface is not supported it uses the XPropertySet interface.
Definition at line 186 of file MultiPropertySetHandler.hxx.
References aPropertyList, i, MultiGet(), and SingleGet().
Referenced by SchXMLExportHelper_Impl::exportAxes().
|
inlineprivate |
@descr Try to use the XMultiPropertySet interface to get the property values.
rNameList | A precomputed and sorted sequence of OUStrings containing the properties names. |
Definition at line 199 of file MultiPropertySetHandler.hxx.
References aPropertyList, i, and mxObject.
Referenced by GetProperties().
|
inlineprivate |
@descr Try to use the XPropertySet interface to get the property values.
rNameList | A precomputed and sorted sequence of OUStrings containing the properties names. |
Definition at line 223 of file MultiPropertySetHandler.hxx.
References aPropertyList, i, and mxObject.
Referenced by GetProperties().
|
private |
@descr STL map that maps from property names to polymorphic instances of PropertyWrapper.
It uses OUStringComparison for sorting the property names.
Definition at line 174 of file MultiPropertySetHandler.hxx.
Referenced by Add(), GetProperties(), MultiGet(), and SingleGet().
|
private |
The object from which to get the property values.
Definition at line 177 of file MultiPropertySetHandler.hxx.
Referenced by MultiGet(), and SingleGet().