27#include <com/sun/star/form/ListSourceType.hpp>
28#include <com/sun/star/awt/XItemListener.hpp>
29#include <com/sun/star/awt/XFocusListener.hpp>
30#include <com/sun/star/awt/XListBox.hpp>
31#include <com/sun/star/form/XChangeBroadcaster.hpp>
96typedef ::std::vector< ::connectivity::ORowSetValue >
ValueList;
122 virtual css::uno::Sequence< css::uno::Type>
_getTypes()
override;
126 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
130 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
136 {
return "com.sun.star.form.OListBoxModel"; }
142 virtual css::uno::Any SAL_CALL
queryAggregation(
const css::uno::Type& _rType )
override;
145 virtual void SAL_CALL
disposing()
override;
148 virtual void SAL_CALL
getFastPropertyValue(css::uno::Any& rValue, sal_Int32 nHandle)
const override;
151 css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle,
const css::uno::Any& _rValue )
override;
158 virtual void SAL_CALL
setPropertyValues(
const css::uno::Sequence< OUString >& PropertyNames,
const css::uno::Sequence< css::uno::Any >& Values)
override;
162 virtual void SAL_CALL
163 write(
const css::uno::Reference< css::io::XObjectOutputStream>& _rxOutStream)
override;
164 virtual void SAL_CALL
165 read(
const css::uno::Reference< css::io::XObjectInputStream>& _rxInStream)
override;
169 css::uno::Sequence< css::beans::Property >& _rProps
172 css::uno::Sequence< css::beans::Property >& _rAggregateProps
176 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source)
override;
179 virtual void _propertyChanged(
const css::beans::PropertyChangeEvent& _rEvt )
override;
187 virtual css::uno::Sequence< css::uno::Type >
194 virtual void onConnectedDbColumn(
const css::uno::Reference< css::uno::XInterface >& _rxForm )
override;
206 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL
createClone( )
override;
212 const css::uno::Sequence< const css::uno::Any > &i_aValues)
215 const ::connectivity::ORowSetValue &aValue)
239 , css::awt::XItemListener
241 , css::form::XChangeBroadcaster
255 css::uno::Reference< css::awt::XListBox >
263 virtual css::uno::Sequence< css::uno::Type>
_getTypes()
override;
266 explicit OListBoxControl(
const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
271 virtual css::uno::Any SAL_CALL
queryAggregation(
const css::uno::Type& _rType )
override;
275 {
return "com.sun.star.form.OListBoxControl"; }
280 virtual void SAL_CALL
addChangeListener(
const css::uno::Reference< css::form::XChangeListener>& _rxListener)
override;
281 virtual void SAL_CALL
removeChangeListener(
const css::uno::Reference< css::form::XChangeListener>& _rxListener)
override;
284 virtual void SAL_CALL
focusGained(
const css::awt::FocusEvent& _rEvent)
override;
285 virtual void SAL_CALL
focusLost(
const css::awt::FocusEvent& _rEvent)
override;
288 virtual void SAL_CALL
itemStateChanged(
const css::awt::ItemEvent& _rEvent)
override;
291 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source)
override;
294 virtual void SAL_CALL
disposing()
override;
297 virtual void SAL_CALL
addItemListener(
const css::uno::Reference< css::awt::XItemListener >& l )
override;
298 virtual void SAL_CALL
removeItemListener(
const css::uno::Reference< css::awt::XItemListener >& l )
override;
299 virtual void SAL_CALL
addActionListener(
const css::uno::Reference< css::awt::XActionListener >& l )
override;
300 virtual void SAL_CALL
removeActionListener(
const css::uno::Reference< css::awt::XActionListener >& l )
override;
301 virtual void SAL_CALL
addItem(
const OUString& aItem, ::sal_Int16 nPos )
override;
302 virtual void SAL_CALL
addItems(
const css::uno::Sequence< OUString >& aItems, ::sal_Int16 nPos )
override;
303 virtual void SAL_CALL
removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount )
override;
305 virtual OUString SAL_CALL
getItem( ::sal_Int16 nPos )
override;
306 virtual css::uno::Sequence< OUString > SAL_CALL
getItems( )
override;
310 virtual css::uno::Sequence< OUString > SAL_CALL
getSelectedItems( )
override;
312 virtual void SAL_CALL
selectItemsPos(
const css::uno::Sequence< ::sal_Int16 >& aPositions,
sal_Bool bSelect )
override;
318 virtual void SAL_CALL
makeVisible( ::sal_Int16 nEntry )
override;
322 virtual void processEvent( const ::comphelper::AnyEvent& _rEvent )
override;
caches a result set obtained from a SQL statement
class whose instances lock an OControlModel
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &aProps) override
virtual OUString SAL_CALL getSelectedItem() override
virtual void SAL_CALL setMultipleMode(sal_Bool bMulti) override
virtual void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, ::sal_Int16 nPos) override
OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL focusLost(const css::awt::FocusEvent &_rEvent) override
virtual css::uno::Sequence< OUString > SAL_CALL getItems() override
virtual void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
css::uno::Reference< css::awt::XListBox > m_xAggregateListBox
virtual void SAL_CALL focusGained(const css::awt::FocusEvent &_rEvent) override
virtual void SAL_CALL makeVisible(::sal_Int16 nEntry) override
virtual ~OListBoxControl() override
virtual void SAL_CALL selectItemPos(::sal_Int16 nPos, sal_Bool bSelect) override
virtual css::uno::Sequence< ::sal_Int16 > SAL_CALL getSelectedItemsPos() override
virtual void SAL_CALL itemStateChanged(const css::awt::ItemEvent &_rEvent) override
::comphelper::OInterfaceContainerHelper3< css::form::XChangeListener > m_aChangeListeners
virtual void SAL_CALL removeItems(::sal_Int16 nPos, ::sal_Int16 nCount) override
virtual ::sal_Int16 SAL_CALL getDropDownLineCount() override
virtual void SAL_CALL setDropDownLineCount(::sal_Int16 nLines) override
::rtl::Reference< ::comphelper::AsyncEventNotifier > m_pItemBroadcaster
virtual void SAL_CALL addChangeListener(const css::uno::Reference< css::form::XChangeListener > &_rxListener) override
DECL_LINK(OnTimeout, Timer *, void)
virtual OUString SAL_CALL getItem(::sal_Int16 nPos) override
OListBoxControl(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void processEvent(const ::comphelper::AnyEvent &_rEvent) override
virtual sal_Bool SAL_CALL isMutipleMode() override
virtual void SAL_CALL selectItem(const OUString &aItem, sal_Bool bSelect) override
virtual void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
css::uno::Any m_aCurrentSelection
virtual ::sal_Int16 SAL_CALL getItemCount() override
virtual void SAL_CALL selectItemsPos(const css::uno::Sequence< ::sal_Int16 > &aPositions, sal_Bool bSelect) override
virtual void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
virtual css::uno::Sequence< css::uno::Type > _getTypes() override
virtual void SAL_CALL addItem(const OUString &aItem, ::sal_Int16 nPos) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override
virtual ::sal_Int16 SAL_CALL getSelectedItemPos() override
virtual void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
virtual void SAL_CALL removeChangeListener(const css::uno::Reference< css::form::XChangeListener > &_rxListener) override
::comphelper::OInterfaceContainerHelper3< css::awt::XItemListener > m_aItemListeners
virtual void resetNoBroadcast() override
called to reset the control to some kind of default.
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 css::uno::Any translateControlValueToExternalValue() const override
commits the current control value to our external value binding
ValueList m_aListSourceValues
virtual ~OListBoxModel() override
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &_rEvt) override
CachedRowSet m_aListRowSet
static const ::connectivity::ORowSetValue s_aEmptyStringValue
virtual void onDisconnectedDbColumn() override
called whenever a connection to a database column has been suspended
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, sal_Int32 _nHandle, const css::uno::Any &_rValue) override
ValueList impl_getValues() const
css::form::ListSourceType m_eListSourceType
void setBoundValues(ValueList &&)
::connectivity::ORowSetValue m_aSaveValue
virtual void onConnectedDbColumn(const css::uno::Reference< css::uno::XInterface > &_rxForm) override
called whenever a connection to a database column has been established
sal_Int32 m_nConvertedBoundValuesType
virtual OUString SAL_CALL getServiceName() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
OListBoxModel(const OListBoxModel *_pOriginal, const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
css::uno::Any getCurrentSingleValue() const
::connectivity::ORowSetValue getFirstSelectedValue() const
virtual css::uno::Any getCurrentFormComponentValue() const override
retrieves the current value of the form component
OUString SAL_CALL getImplementationName() override
css::uno::Sequence< css::uno::Any > getCurrentMultiValue() const
virtual css::uno::Any translateExternalValueToControlValue(const css::uno::Any &_rExternalValue) const override
translates the given value, which was obtained from the current external value binding,...
virtual void SAL_CALL disposing() override
ValueList m_aConvertedBoundValues
virtual void refreshInternalEntryList() override
called when XRefreshable::refresh has been called, and we do not have an external list source
static const ::connectivity::ORowSetValue s_aEmptyValue
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual css::uno::Sequence< css::uno::Type > getSupportedBindingTypes() override
returns the data types which the control could use to exchange data with an external value binding
virtual css::uno::Any translateDbColumnToControlValue() override
translates a db column value into a control value.
virtual css::uno::Any getDefaultForReset() const override
returns the default which should be used when resetting the control
css::uno::Any m_aBoundColumn
sal_Int32 getValueType() const
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
css::uno::Sequence< sal_Int16 > m_aDefaultSelectSeq
void impl_refreshDbEntryList(bool _bForce)
refreshes the list boxes list data @precond we don't actually have an external list source
sal_Int32 m_nBoundColumnType
void convertBoundValues(sal_Int32 nType) const
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 stringItemListChanged(ControlModelLock &_rInstanceLock) override
announces that the list of entries has changed.
void loadData(bool _bForce)
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) override
virtual css::uno::Any translateControlValueToValidatableValue() const override
retrieves the current value of the control, in a shape which can be used with our external validator.
virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream) override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual css::uno::Sequence< css::uno::Type > _getTypes() override
virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream) override
OListBoxModel(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
css::uno::Sequence< sal_Int16 > translateBindingValuesToControlValue(const css::uno::Sequence< const css::uno::Any > &i_aValues) const
css::uno::Sequence< sal_Int16 > translateDbValueToControlValue(const ::connectivity::ORowSetValue &aValue) const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void describeAggregateProperties(css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
describes the properties of our aggregate
ListBox is a bit confusing / different from other form components, so here are a few notes:
::std::vector< ::connectivity::ORowSetValue > ValueList
::cppu::ImplHelper4< css::awt::XFocusListener, css::awt::XItemListener, css::awt::XListBox, css::form::XChangeBroadcaster > OListBoxControl_BASE
#define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass)