From 838fab822c8052dd9471e28a70b1907dfde111af Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 10 Feb 2017 18:27:14 +0100 Subject: Resolves: tdf#79250 add typed list to form control listbox ... so numeric and text data can be distinguished input. Change-Id: I63280a93c272ccc6f5e7ca06a1a1fcbfb3db8455 --- offapi/UnoApi_offapi.mk | 1 + .../com/sun/star/awt/UnoControlComboBoxModel.idl | 13 ++++++ offapi/com/sun/star/awt/UnoControlListBoxModel.idl | 10 +++++ .../star/form/binding/XListEntryTypedSource.idl | 47 ++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 offapi/com/sun/star/form/binding/XListEntryTypedSource.idl (limited to 'offapi') diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 064a84752e40..49602b9555e7 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -2526,6 +2526,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/form/binding,\ XListEntryListener \ XListEntrySink \ XListEntrySource \ + XListEntryTypedSource \ XValueBinding \ )) $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/form/runtime,\ diff --git a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl index 2ee9d691906e..3a359eb393cc 100644 --- a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl +++ b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl @@ -192,6 +192,19 @@ published service UnoControlComboBoxModel #StringItemList property. */ [optional] interface XItemList; + + /** specifies the list of raw typed (not stringized) items. + +

This list corresponds with the StringItemList and if given + has to be of the same length, the elements' positions matching + those of their string representation in StringItemList.

+ +

If a new value is entered via the ComboBox edit then this + list will be invalidated.

+ + @since LibreOffice 5.4 + */ + [optional, property] sequence TypedItemList; }; diff --git a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl index 8e577f838407..05a102b0591f 100644 --- a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl +++ b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl @@ -186,6 +186,16 @@ published service UnoControlListBoxModel @since OOo 3.3 */ [optional, property, maybevoid] short ItemSeparatorPos; + + /** specifies the list of raw typed (not stringized) items. + +

This list corresponds with the StringItemList and if given + has to be of the same length, the elements' positions matching + those of their string representation in StringItemList.

+ + @since LibreOffice 5.4 + */ + [optional, property] sequence TypedItemList; }; diff --git a/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl new file mode 100644 index 000000000000..8f8003deb0f2 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_form_binding_XListEntryTypedSource_idl__ +#define __com_sun_star_form_binding_XListEntryTypedSource_idl__ + +#include + + +module com { module sun { module star { module form { module binding { + + +/** specifies a source of string list entries with corresponding underlying data values + + @see XListEntrySource + + @since LibreOffice 5.4 +*/ +interface XListEntryTypedSource : com::sun::star::form::binding::XListEntrySource +{ + /** provides access to the entirety of all list entries, along with + the corresponding underlying data values. + + @param DataValues + The sequence is used by + com::sun::star::form::component::ListBox for external + sources such as spreadsheets to return the resulting + data value if a listbox entry was selected, e.g. set it + at the specified bound cell using + com::sun::star::form::binding::XValueBinding::setValue(). + */ + sequence< string > getAllListEntriesTyped( [out] sequence< any > DataValues ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit