21#include <property.hxx>
24#include <com/sun/star/beans/PropertyAttribute.hpp>
25#include <com/sun/star/form/FormComponentType.hpp>
27using ::com::sun::star::uno::Reference;
28using ::com::sun::star::uno::Sequence;
29using ::com::sun::star::uno::XComponentContext;
30using ::com::sun::star::beans::Property;
31using ::com::sun::star::uno::XInterface;
32using ::com::sun::star::uno::Any;
33using ::com::sun::star::sdbc::XRowSet;
34using ::com::sun::star::uno::UNO_QUERY;
36namespace FormComponentType = ::com::sun::star::form::FormComponentType;
49 aSupported.realloc(aSupported.getLength() + 2);
51 OUString*pArray = aSupported.getArray();
66 m_nClassId = FormComponentType::PATTERNFIELD;
72 :OEditBaseModel( _pOriginal, _rxFactory )
86 pClone->clonedFrom(
this);
95 aSupported.realloc(aSupported.getLength() + 3);
97 OUString*pArray = aSupported.getArray();
108 sal_Int32 nOldCount = _rProps.getLength();
109 _rProps.realloc( nOldCount + 4);
110 css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
113 css::beans::PropertyAttribute::BOUND);
116 DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(),
"<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
134 aNewValue >>= sNewValue;
136 if ( !aNewValue.hasValue()
137 || ( sNewValue.isEmpty()
147 "OPatternModel::commitControlValueToDbColumn: no value helper!");
165 Reference< XPropertySet > xField(
getField() );
169 m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue(
getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
184 "OPatternModel::translateDbColumnToControlValue: no value helper!");
189 if ( sValue.isEmpty()
223extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
225 css::uno::Sequence<css::uno::Any>
const &)
230extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
232 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_form_OPatternControl_get_implementation(css::uno::XComponentContext *component, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_form_OPatternModel_get_implementation(css::uno::XComponentContext *component, css::uno::Sequence< css::uno::Any > const &)
sal_Int32 getValuePropertyAggHandle() const
virtual void onConnectedDbColumn(const css::uno::Reference< css::uno::XInterface > &_rxForm)
called whenever a connection to a database column has been established
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void describeFixedProperties(css::uno::Sequence< css::beans::Property > &_rProps) const override
describes the properties provided by this class, or its respective derived class
virtual void resetNoBroadcast()
called to reset the control to some kind of default.
const css::uno::Reference< css::beans::XPropertySet > & getField() const
css::uno::Reference< css::sdb::XColumnUpdate > m_xColumnUpdate
virtual void onDisconnectedDbColumn()
called whenever a connection to a database column has been suspended
const css::uno::Reference< css::uno::XComponentContext > & getContext() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
OPatternControl(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual bool commitControlValueToDbColumn(bool _bPostReset) override
commits the current control value to the database column we're bound to @precond we're properly bound...
virtual void onConnectedDbColumn(const css::uno::Reference< css::uno::XInterface > &_rxForm) override
called whenever a connection to a database column has been established
virtual void resetNoBroadcast() override
called to reset the control to some kind of default.
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pFormattedValue
virtual css::uno::Any translateDbColumnToControlValue() override
translates a db column value into a control value.
virtual void onDisconnectedDbColumn() override
called whenever a connection to a database column has been suspended
virtual ~OPatternModel() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
css::uno::Any m_aLastKnownValue
OPatternModel(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Any getDefaultForReset() const override
returns the default which should be used when resetting the control
virtual void describeFixedProperties(css::uno::Sequence< css::beans::Property > &_rProps) const override
describes the properties provided by this class, or its respective derived class
virtual OUString SAL_CALL getServiceName() override
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral PROPERTY_TABINDEX
constexpr OUStringLiteral PROPERTY_FILTERPROPOSAL
constexpr OUStringLiteral PROPERTY_DEFAULT_TEXT
constexpr OUStringLiteral PROPERTY_TEXT
constexpr OUStringLiteral PROPERTY_EMPTY_IS_NULL
ListBox is a bit confusing / different from other form components, so here are a few notes:
#define PROPERTY_ID_FILTERPROPOSAL
#define PROPERTY_ID_EMPTY_IS_NULL
#define PROPERTY_ID_DEFAULT_TEXT
#define PROPERTY_ID_TABINDEX
constexpr OUStringLiteral FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD
constexpr OUStringLiteral STARDIV_ONE_FORM_CONTROL_PATTERNFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_PATTERNFIELD
constexpr OUStringLiteral VCL_CONTROL_PATTERNFIELD
constexpr OUStringLiteral FRM_COMPONENT_PATTERNFIELD
constexpr OUStringLiteral FRM_SUN_CONTROL_PATTERNFIELD
constexpr OUStringLiteral VCL_CONTROLMODEL_PATTERNFIELD