20#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_GEOMETRYHANDLER_HXX
21#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_GEOMETRYHANDLER_HXX
24#include <com/sun/star/uno/XComponentContext.hpp>
27#include <com/sun/star/awt/Point.hpp>
28#include <com/sun/star/awt/Size.hpp>
29#include <com/sun/star/inspection/XPropertyHandler.hpp>
30#include <com/sun/star/script/XTypeConverter.hpp>
31#include <com/sun/star/beans/XPropertySet.hpp>
32#include <com/sun/star/lang/XServiceInfo.hpp>
33#include <com/sun/star/report/XFunctionsSupplier.hpp>
34#include <com/sun/star/beans/XPropertyChangeListener.hpp>
35#include <com/sun/star/sdbc/XRowSet.hpp>
60 class OPropertyInfoService;
61 typedef ::std::pair< css::uno::Reference< css::report::XFunction>, css::uno::Reference< css::report::XFunctionsSupplier> >
TFunctionPair;
62 typedef ::std::multimap< OUString,TFunctionPair, ::comphelper::UStringMixLess >
TFunctions;
64 typedef ::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler
65 , css::beans::XPropertyChangeListener
94 css::uno::Any
getConstantValue(
bool bToControlValue,
const TranslateId* pResId,
const css::uno::Any& _aValue,
const OUString& _sConstantName,
const OUString & PropertyName );
95 css::beans::Property
getProperty(
const OUString & PropertyName);
97 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory
98 ,css::inspection::LineDescriptor & out_Descriptor
100 ,
bool _bReadOnlyControl
101 ,
bool _bTrueIfListBoxFalseIfComboBox
104 const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory
105 ,css::inspection::LineDescriptor & out_Descriptor
106 ,const ::std::vector< OUString>& _aEntries
107 ,
bool _bReadOnlyControl
108 ,
bool _bTrueIfListBoxFalseIfComboBox
111 const css::awt::Size& _aSize);
140 void resetOwnProperties(::osl::ResettableMutexGuard& _aGuard,
const OUString& _sOldFunctionName,
const OUString& _sOldScope,
const sal_uInt32 _nOldDataFieldType);
184 css::uno::Reference< css::report::XFunctionsSupplier>
fillScope_throw(OUString& _rsNamePostfix);
195 ,OUString& Out_rDataField
196 ,
const css::uno::Reference< css::report::XFunctionsSupplier>& _xFunctionsSupplier = css::uno::Reference< css::report::XFunctionsSupplier>()
197 ,
bool _bSet =
false)
const;
207 ,OUString& _rDataField
208 ,OUString& _rsDefaultFunctionName)
const;
222 void createDefaultFunction(::osl::ResettableMutexGuard& _aGuard ,
const OUString& _sFunction,std::u16string_view _sDataField);
236 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source)
override;
238 virtual void SAL_CALL
propertyChange(
const css::beans::PropertyChangeEvent& evt)
override;
241 explicit GeometryHandler(css::uno::Reference< css::uno::XComponentContext >
const & context);
249 virtual void SAL_CALL
addEventListener(
const css::uno::Reference< css::lang::XEventListener > & xListener)
override;
250 virtual void SAL_CALL
removeEventListener(
const css::uno::Reference< css::lang::XEventListener > & aListener)
override;
253 virtual void SAL_CALL
inspect(
const css::uno::Reference< css::uno::XInterface > &
Component)
override;
254 virtual css::uno::Any SAL_CALL
getPropertyValue(
const OUString & PropertyName)
override;
255 virtual void SAL_CALL
setPropertyValue(
const OUString & PropertyName,
const css::uno::Any & Value)
override;
256 virtual css::beans::PropertyState SAL_CALL
getPropertyState(
const OUString & PropertyName)
override;
257 virtual css::inspection::LineDescriptor SAL_CALL
describePropertyLine(
const OUString& PropertyName,
const css::uno::Reference< css::inspection::XPropertyControlFactory >& ControlFactory )
override;
258 virtual css::uno::Any SAL_CALL
convertToPropertyValue(
const OUString & PropertyName,
const css::uno::Any & ControlValue)
override;
259 virtual css::uno::Any SAL_CALL
convertToControlValue(
const OUString & PropertyName,
const css::uno::Any & PropertyValue,
const css::uno::Type & ControlValueType)
override;
260 virtual void SAL_CALL
addPropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener > & Listener)
override;
261 virtual void SAL_CALL
removePropertyChangeListener(
const css::uno::Reference< css::beans::XPropertyChangeListener > & _rxListener)
override;
266 virtual css::inspection::InteractiveSelectionResult SAL_CALL
onInteractivePropertySelection(
const OUString & PropertyName,
sal_Bool Primary, css::uno::Any & out_Data,
const css::uno::Reference< css::inspection::XObjectInspectorUI > & InspectorUI)
override;
267 virtual void SAL_CALL
actuatingPropertyChanged(
const OUString & ActuatingPropertyName,
const css::uno::Any & NewValue,
const css::uno::Any & OldValue,
const css::uno::Reference< css::inspection::XObjectInspectorUI > & InspectorUI,
sal_Bool FirstTimeInit)
override;
280 virtual void SAL_CALL
disposing()
override;
288 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
292 mutable css::uno::Reference< css::sdbc::XRowSet >
m_xRowSet;
void impl_initFieldList_nothrow(css::uno::Sequence< OUString > &_rFieldNames) const
void createDefaultFunction(::osl::ResettableMutexGuard &_aGuard, const OUString &_sFunction, std::u16string_view _sDataField)
creates a default function of the _sFunction for the data field _sDataField The new function will onl...
bool impl_isDataField(const OUString &_sName) const
checks whether the name is a field or a parameter
void impl_fillFormulaList_nothrow(::std::vector< OUString > &_out_rList) const
return all formula in a semicolon separated list
virtual void SAL_CALL disposing() override
bool isDefaultFunction(const OUString &_sQuotedFunction, OUString &Out_rDataField, const css::uno::Reference< css::report::XFunctionsSupplier > &_xFunctionsSupplier=css::uno::Reference< css::report::XFunctionsSupplier >(), bool _bSet=false) const
checks if the given function is a default function we know.
css::uno::Sequence< OUString > m_aParamNames
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void loadDefaultFunctions()
fills the member m_aDefaultFunctions
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
css::uno::Reference< css::report::XFunctionsSupplier > fillScope_throw(OUString &_rsNamePostfix)
get the functions supplier for the set scope, default is the surrounding group.
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
bool impl_isCounterFunction_throw(const OUString &_sQuotedFunctionName, OUString &Out_sScope) const
check whether the given function name is a counter function.
sal_uInt32 m_nDataFieldType
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
bool impl_dialogFilter_nothrow(OUString &_out_rSelectedClause, ::osl::ClearableMutexGuard &_rClearBeforeDialog) const
executes a dialog for choosing a filter criterion for a database report
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override
TFunctions m_aFunctionNames
virtual void SAL_CALL setPropertyValue(const OUString &PropertyName, const css::uno::Any &Value) override
virtual ~GeometryHandler() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
void operator=(GeometryHandler const &)=delete
virtual css::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const OUString &PropertyName, sal_Bool Primary, css::uno::Any &out_Data, const css::uno::Reference< css::inspection::XObjectInspectorUI > &InspectorUI) override
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &ControlFactory) override
bool impl_isDefaultFunction_nothrow(const css::uno::Reference< css::report::XFunction > &_xFunction, OUString &_rDataField, OUString &_rsDefaultFunctionName) const
checks if the given function is a default function we know.
css::uno::Reference< css::sdbc::XRowSet > m_xRowSet
inspectee
void impl_createFunction(const OUString &_sFunctionName, std::u16string_view _sDataField, const DefaultFunction &_aFunction)
Creates the function defined by the function template.
static void implCreateListLikeControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, css::inspection::LineDescriptor &out_Descriptor, const ::std::vector< OUString > &_aEntries, bool _bReadOnlyControl, bool _bTrueIfListBoxFalseIfComboBox)
PropertyChangeListeners m_aPropertyListeners
void resetOwnProperties(::osl::ResettableMutexGuard &_aGuard, const OUString &_sOldFunctionName, const OUString &_sOldScope, const sal_uInt32 _nOldDataFieldType)
clear the own properties like function and scope and send a notification
::std::vector< DefaultFunction > m_aDefaultFunctions
css::beans::Property getProperty(const OUString &PropertyName)
css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
OUString m_sDefaultFunction
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
OUString impl_ConvertUIToMimeType_nothrow(const OUString &_sUIName) const
return the MimeType for the given UI Name
virtual sal_Bool SAL_CALL isComposable(const OUString &PropertyName) override
void impl_fillMimeTypes_nothrow(::std::vector< OUString > &_out_rList) const
return all supported output formats of the report definition
GeometryHandler(css::uno::Reference< css::uno::XComponentContext > const &context)
void impl_fillScopeList_nothrow(::std::vector< OUString > &_out_rList) const
return all group names in a semicolon separated list starting with the group where this control is co...
virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > &Component) override
GeometryHandler(GeometryHandler const &)=delete
virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
static void implCreateListLikeControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, css::inspection::LineDescriptor &out_Descriptor, const TranslateId *pResId, bool _bReadOnlyControl, bool _bTrueIfListBoxFalseIfComboBox)
css::uno::Reference< css::beans::XPropertySet > m_xReportComponent
delegatee
virtual void SAL_CALL actuatingPropertyChanged(const OUString &ActuatingPropertyName, const css::uno::Any &NewValue, const css::uno::Any &OldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI > &InspectorUI, sal_Bool FirstTimeInit) override
OUString impl_convertToFormula(const css::uno::Any &_rControlValue)
css::uno::Sequence< OUString > m_aFieldNames
DefaultFunction m_aCounterFunction
OUString impl_ConvertMimeTypeToUI_nothrow(const OUString &_sMimetype) const
return the one supported output formats of the report definition
css::uno::Reference< css::report::XFunction > m_xFunction
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
type converter, needed on various occasions
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &PropertyName, const css::uno::Any &PropertyValue, const css::uno::Type &ControlValueType) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &Listener) override
virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
sal_uInt32 impl_getDataFieldType_throw(const OUString &_sDataField=OUString()) const
returns the data field type depending on the data field of the report control
void impl_setCounterFunction_throw()
sets the counter function at the data field.
void checkPosAndSize(const css::awt::Point &_aNewPos, const css::awt::Size &_aSize)
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &PropertyName, const css::uno::Any &ControlValue) override
css::uno::Any getConstantValue(bool bToControlValue, const TranslateId *pResId, const css::uno::Any &_aValue, const OUString &_sConstantName, const OUString &PropertyName)
::std::multimap< OUString, TFunctionPair, ::comphelper::UStringMixLess > TFunctions
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler, css::beans::XPropertyChangeListener, css::lang::XServiceInfo > GeometryHandler_Base
::std::pair< css::uno::Reference< css::report::XFunction >, css::uno::Reference< css::report::XFunctionsSupplier > > TFunctionPair
::comphelper::OInterfaceContainerHelper3< css::beans::XPropertyChangeListener > PropertyChangeListeners
css::beans::Optional< OUString > m_sInitialFormula
const OUString & getName() const
::std::pair< MetaAction *, int > Component