22#include <com/sun/star/beans/Property.hpp>
23#include <com/sun/star/uno/XComponentContext.hpp>
24#include <com/sun/star/script/XTypeConverter.hpp>
25#include <com/sun/star/inspection/XPropertyControlFactory.hpp>
26#include <com/sun/star/beans/PropertyAttribute.hpp>
27#include <com/sun/star/beans/Optional.hpp>
35 namespace inspection {
36 struct LineDescriptor;
52 const css::beans::Property& _rProperty,
53 css::inspection::LineDescriptor& _out_rDescriptor,
54 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory
60 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
61 const css::uno::Reference< css::script::XTypeConverter >& _rxTypeConverter,
62 const css::beans::Property& _rProperty,
63 const css::uno::Any& _rControlValue
68 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
69 const css::uno::Reference< css::script::XTypeConverter >& _rxTypeConverter,
70 const css::uno::Any& _rPropertyValue,
71 const css::uno::Type& _rControlValueType
92 static css::uno::Reference< css::inspection::XPropertyControl >
94 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
95 std::vector< OUString >&& _rInitialListEntries,
96 bool _bReadOnlyControl,
118 static css::uno::Reference< css::inspection::XPropertyControl >
120 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
122 bool _bReadOnlyControl
140 static css::uno::Reference< css::inspection::XPropertyControl >
142 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
143 std::vector< OUString >&& _rInitialListEntries,
165 static css::uno::Reference< css::inspection::XPropertyControl >
167 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
169 const css::beans::Optional< double >& _rMinValue,
170 const css::beans::Optional< double >& _rMaxValue
184 const css::uno::Reference< css::uno::XComponentContext > & _rContext
187 static css::uno::Reference< css::uno::XInterface >
getContextDocument(
const css::uno::Reference<css::uno::XComponentContext> & _rContext );
190 static css::uno::Reference< css::uno::XInterface >
getContextDocument_throw(
const css::uno::Reference<css::uno::XComponentContext> & _rContext );
213 return ( _nPropertyAttributes & css::beans::PropertyAttribute::READONLY ) != 0;
216 static std::unique_ptr<weld::Builder>
makeBuilder(
const OUString& rUIFile,
const css::uno::Reference<css::uno::XComponentContext>& rContext);
220 static void clearBuilderParent(
const css::uno::Reference<css::uno::XComponentContext>& rContext);
static css::uno::Reference< css::uno::XInterface > getContextDocument(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
static css::uno::Reference< css::inspection::XPropertyControl > createComboBoxControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, std::vector< OUString > &&_rInitialListEntries, bool _bSorted)
creates an <member scope="css::inspection">PropertyControlType::ComboBox</member>-type control and fi...
static css::uno::Reference< css::uno::XInterface > getContextDocument_throw(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
static css::uno::Reference< css::inspection::XPropertyControl > createListBoxControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, std::vector< OUString > &&_rInitialListEntries, bool _bReadOnlyControl, bool _bSorted)
creates an <member scope="css::inspection">PropertyControlType::ListBox</member>-type control and fil...
PropertyHandlerHelper(const PropertyHandlerHelper &)=delete
static css::uno::Any convertToPropertyValue(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::script::XTypeConverter > &_rxTypeConverter, const css::beans::Property &_rProperty, const css::uno::Any &_rControlValue)
helper for implementing XPropertyHandler::convertToPropertyValue
static void setBuilderParent(const css::uno::Reference< css::uno::XComponentContext > &rContext, weld::Widget *pParent)
static weld::Window * getDialogParentFrame(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
gets the window of the ObjectInspector in which a property handler lives
PropertyHandlerHelper & operator=(const PropertyHandlerHelper &)=delete
static void clearBuilderParent(const css::uno::Reference< css::uno::XComponentContext > &rContext)
static bool requiresReadOnlyControl(sal_Int16 _nPropertyAttributes)
determines whether given PropertyAttributes require a to-be-created <type scope="css::inspection">XPr...
static std::unique_ptr< weld::Builder > makeBuilder(const OUString &rUIFile, const css::uno::Reference< css::uno::XComponentContext > &rContext)
static void setContextDocumentModified(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
marks the document passed in our UNO context as modified
static css::uno::Reference< css::inspection::XPropertyControl > createListBoxControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, const TranslateId *pTransIds, size_t nElements, bool _bReadOnlyControl)
creates an <member scope="css::inspection">PropertyControlType::ListBox</member>-type control and fil...
static css::uno::Any convertToControlValue(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::script::XTypeConverter > &_rxTypeConverter, const css::uno::Any &_rPropertyValue, const css::uno::Type &_rControlValueType)
helper for implementing XPropertyHandler::convertToControlValue
static void describePropertyLine(const css::beans::Property &_rProperty, css::inspection::LineDescriptor &_out_rDescriptor, const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory)
helper for implementing XPropertyHandler::describePropertyLine in a generic way
static css::uno::Reference< css::inspection::XPropertyControl > createNumericControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, sal_Int16 _nDigits, const css::beans::Optional< double > &_rMinValue, const css::beans::Optional< double > &_rMaxValue)
creates an <member scope="css::inspection">PropertyControlType::NumericField</member>-type control an...
a property handler for any virtual string properties