diff options
Diffstat (limited to 'offapi/com/sun/star/form/binding')
23 files changed, 1564 insertions, 0 deletions
diff --git a/offapi/com/sun/star/form/binding/BindableControlModel.idl b/offapi/com/sun/star/form/binding/BindableControlModel.idl new file mode 100644 index 000000000..809c8a64c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableControlModel.idl @@ -0,0 +1,80 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableControlModel_idl__ +#define __com_sun_star_form_binding_BindableControlModel_idl__ + +#include <com/sun/star/form/binding/XBindableValue.idl> +#include <com/sun/star/form/FormControlModel.idl> + + +module com { module sun { module star { module form { module binding { + +/** specifies the model of a form control which supports binding to an external + value supplier. +*/ +service BindableControlModel +{ + /** specifies the basic functionality for a form control model + + <p>Via this service, bindable control models inherit the + com::sun::star::util::XCloneable interface.<br/> + If a bindable control model, at which a binding has been established (via + XBindableValue::setValueBinding()), is being cloned, then the + binding is also established at the clone. Effectively, this means that + both control model instances share the same binding instance.</p> + */ + service com::sun::star::form::FormControlModel; + + /** specifies support for being bound to an external value + + <p>When a BindableControlModel is bound to an external value, + then every change in the control model's value is <em>immediately</em> reflected + in the external binding.</p> + + <p>If the binding set via this interface supports the ValueBinding::ReadOnly + and ValueBinding::Relevant properties, they're respected by the control model: + <ul><li>The control model's own <code>ReadOnly</code> property (if present) is kept in sync with the + binding's <code>ReadOnly</code> property. That is, any control using the value + binding is read-only as long as the binding is.</li> + <li>The control model's own <code>Enabled</code> property (if present) is kept in sync + with the binding's <code>Relevant</code> property. That is, any control using + the value binding is disabled as long as the binding is not relevant.</li> + </ul> + </p> + + <p>In both cases, explicit changes of the model's property are ignored if they would relax + the restriction imposed by the binding.<br/> + For instance, if the binding declares its value to + be read-only (indicated by ValueBinding::ReadOnly being `TRUE`), then + any attempt to set the <code>ReadOnly</code> property of the control model to `FALSE` will + fail. However, if the binding's value is not read-only, then the <code>ReadOnly</code> + property at the control model can be freely set.<br/> + The very same holds for the binding's ValueBinding::Relevant and the control + model's <code>Enabled</code> properties.</p> + */ + interface XBindableValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl b/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl new file mode 100644 index 000000000..4c16e55c1 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl @@ -0,0 +1,118 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDataAwareControlModel_idl__ +#define __com_sun_star_form_binding_BindableDataAwareControlModel_idl__ + +#include <com/sun/star/form/DataAwareControlModel.idl> +#include <com/sun/star/form/binding/BindableControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** is a specialization of the com::sun::star::form::DataAwareControlModel + which additionally supports binding to external value suppliers. + + <p>Control models usually have some kind of value property, which reflects the very current + content of the controls associated with this model. For instance, for an + com::sun::star::form::component::TextField, this would be the + com::sun::star::awt::UnoControlEditModel::Text property of the base + service. Similarly, a com::sun::star::form::component::CheckBox has + a property com::sun::star::awt::UnoControlCheckBoxModel::State, which + reflects the current check state.</p> + + <p>Usual com::sun::star::form::DataAwareControlModels can be bound to + a column of a com::sun::star::form::component::DataForm, and exchange + their content with such a column.<br/> + In particular, when the com::sun::star::form::component::DataForm + is moved to a different record, then the bound control model is updated with the value of + it's column in this particular row.<br/> + On the other hand, when any change in the control model (e.g. resulting from a user entering + data in a control associated with the control model) is committed + (com::sun::star::form::XBoundComponent::commit()), then the actual + data of the control model is written into the associated + com::sun::star::form::component::DataForm column.</p> + + <p>BindableDataAwareControlModel's additionally support an alternative value + binding, which forces them to exchange their value with another foreign instance. + In some sense, they are an abstraction of the data aware control models, which only + support a specialized, hard-coded value binding (namely the binding to a + com::sun::star::form::component::DataForm column).</p> + + <p>For this, they provide the XBindableValue interface which allows to + set an external component to exchange the value with.</p> + + <p>The following rules apply when a data aware control model is bound to an external value binding: + <ul><li><b>Priority</b><br/> + External value bindings overrule any active SQL-column binding. If an external + component is bound to a control model which currently has an active SQL binding, + this SQL binding is suspended, until the external binding is revoked. + </li> + <li><b>Activation</b><br/> + An external value binding becomes effective as soon as it is set. This is a + difference to SQL bindings, which only are effective when the parent form + of the control model is loaded (com::sun::star::form::XLoadable). + </li> + <li><b>Immediacy</b><br/> + When a BindableDataAwareControlModel is bound to an external value, + then every change in the control model's value is <em>immediately</em> reflected + in the external binding. This is a difference to SQL bindings of most + com::sun::star::form::DataAwareControlModel's, where changes + in the control model's value are only propagated to the bound column upon explicit + request via com::sun::star::form::XBoundComponent::commit().<br/> + Note that this restriction is inherited from the BindableControlModel. + </li> + <li><b>Cloning</b><br/> + com::sun::star::form::FormControlModels support cloning themselves + via the com::sun::star::util::XCloneable interface which they + inherit from the com::sun::star::awt::UnoControlModel service.<br> + When a BindableDataAwareControlModel is cloned while it has an active + external value binding, then the clone is also bound to the same binding instance.<br/> + Note that this restriction is inherited from the BindableControlModel. + </li> + </ul> + </p> + + <p>When a BindableDataAwareControlModel is being bound to an external value, + using XBindableValue::setValueBinding(), + then the control model (its value property, respectively) and the external value are + initially synchronized by setting the external value (XValueBinding::getValue()) + at the control model.</p> + +*/ +service BindableDataAwareControlModel +{ + /** specifies the functionality for binding the control model to a + column of an SQL com::sun::star::form::component::DataForm. + */ + service com::sun::star::form::DataAwareControlModel; + + /** specifies the functionality for <em>alternatively</em> binding the control model + to an external value. + */ + service BindableControlModel; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl new file mode 100644 index 000000000..a043e6214 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl @@ -0,0 +1,81 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseCheckBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseCheckBox_idl__ + +#include <com/sun/star/form/component/DatabaseCheckBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a check box which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseCheckBox must support exchanging + boolean values. The following mapping between external values and control states apply: + <ul><li>`TRUE` will be mapped to the box being checked, and vice versa</li> + <li>`FALSE` will be mapped to it being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state, if the box currently supports + this, or being unchecked else. The undetermined of the check box will always be + mapped to `NULL` when writing the external value.</li> + </ul></p> + + <p>If the value binding associated with a BindableDatabaseCheckBox + supports exchanging string values, <em>and</em> the com::sun::star::form::component::CheckBox::RefValue + is <em>not</em> empty, then the radio button will exchange its value as string: + <ul><li>A string equal to the reference value will be mapped to the button being checked, and vice versa</li> + <li>A string not equal to the reference value will be mapped to the button being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlCheckBoxModel::State + @see com::sun::star::awt::UnoControlCheckBoxModel::TriState + @see com::sun::star::form::component::CheckBox::RefValue + */ +service BindableDatabaseCheckBox +{ + service com::sun::star::form::component::DatabaseCheckBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's <em>not</em> + checked. + + <p>com::sun::star::form::component::CheckBox::RefValue is transferred to + possible external value bindings as soon as the check box is checked. With the member + #SecondaryRefValue, clients of the check box can also associate a value with + the <em>not checked</em> state of the control.</p> + */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl new file mode 100644 index 000000000..8742e053c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl @@ -0,0 +1,59 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseComboBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseComboBox_idl__ + +#include <com/sun/star/form/component/DatabaseComboBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a model of a combo box (a list box combined with a text + input field) which is data-aware and thus can be bound to a database field, + and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as <em>string</em>, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlComboBoxModel::Text + */ +service BindableDatabaseComboBox +{ + service com::sun::star::form::component::DatabaseComboBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl new file mode 100644 index 000000000..3623f35bb --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl @@ -0,0 +1,56 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseDateField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseDateField_idl__ + +#include <com/sun/star/form/component/DatabaseDateField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Date. + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlDateFieldModel::Date + */ +service BindableDatabaseDateField +{ + service com::sun::star::form::component::DatabaseDateField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl new file mode 100644 index 000000000..b463892f3 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl @@ -0,0 +1,55 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseFormattedField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseFormattedField_idl__ + +#include <com/sun/star/form/component/DatabaseFormattedField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a formatted input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseFormattedField must support exchanging + values of type <em>double</em>.</p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseFormattedField +{ + service com::sun::star::form::component::DatabaseFormattedField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl new file mode 100644 index 000000000..3b02e46f5 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl @@ -0,0 +1,78 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseListBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseListBox_idl__ + +#include <com/sun/star/form/component/DatabaseListBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + +/** This service specifies a list box model which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>There are six possible ways that a BindableDatabaseListBox exchanges + values with an external binding. If a new binding + is set at a BindableDatabaseListBox, the types from the following list are + tried in descending order: The first type supported by the binding is used for data exchange. + <ol> + <li><em>sequences of `any`s</em>: + The elements in the sequence will represent + the values the selected entries of the list box + (taken from ValueList or read from BoundColumn). + In other words, the SelectedValues property.</li> + <li><em>`any` value</em>: + The value will represent the value of the selected entry + (taken from ValueList or read from BoundColumn). + If more than one entry is selected, + `NULL` will be transferred. + In other words, the SelectedValue property.</li> + <li><em>sequences of long integers</em>: When used, the integers in the sequence will represent + the indexes of the selected entries of the list box.</li> + <li><em>long integer value</em>: When used, the value will represent the index of the selected entry. + If no entry is selected, -1 will be transferred. If more than one entry is selected, `NULL` + will be transferred.</li> + <li><em>sequences of strings</em>: When used, the strings in the sequence present the texts + of the selected entries of the list box.</li> + <li><em>string values</em>: When used. the value will represent the text of the selected entry. + If no entry is selected, an empty string will be transferred. If more than one entry is selected, + `NULL` will be transferred.</li> + </ol></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseListBox +{ + service com::sun::star::form::component::DatabaseListBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl new file mode 100644 index 000000000..f8c0eb96f --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl @@ -0,0 +1,55 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseNumericField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseNumericField_idl__ + +#include <com/sun/star/form/component/DatabaseNumericField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a numeric input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseNumericField must support exchanging + values of type <em>double</em>.</p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseNumericField +{ + service com::sun::star::form::component::DatabaseNumericField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl new file mode 100644 index 000000000..49801caca --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl @@ -0,0 +1,78 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseRadioButton_idl__ +#define __com_sun_star_form_binding_BindableDatabaseRadioButton_idl__ + +#include <com/sun/star/form/component/DatabaseRadioButton.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a radio button which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseRadioButton must support exchanging + boolean values. The following mapping between external values and control states apply: + <ul><li>`TRUE` will be mapped to the button being checked, and vice versa</li> + <li>`FALSE` will be mapped to it being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + <p>If the value binding associated with a BindableDatabaseRadioButton + supports exchanging string values, <em>and</em> the com::sun::star::form::component::RadioButton::RefValue + is <em>not</em> empty, then the radio button will exchange its value as string: + <ul><li>A string equal to the reference value will be mapped to the button being checked, and vice versa</li> + <li>A string not equal to the reference value will be mapped to the button being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlRadioButtonModel::State + @see com::sun::star::form::component::RadioButton::RefValue + */ +service BindableDatabaseRadioButton +{ + service com::sun::star::form::component::DatabaseRadioButton; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's <em>not</em> + selected. + + <p>com::sun::star::form::component::RadioButton::RefValue is transferred to + possible external value bindings as soon as the radio button is selected. With the member + #SecondaryRefValue, clients of the radio button can also associate a value with + the <em>not selected</em> state of the control.</p> + */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl new file mode 100644 index 000000000..d321c808a --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl @@ -0,0 +1,58 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseTextField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseTextField_idl__ + +#include <com/sun/star/form/component/DatabaseTextField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a text input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as <em>string</em>, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlEditModel::Text + */ +service BindableDatabaseTextField +{ + service com::sun::star::form::component::DatabaseTextField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl new file mode 100644 index 000000000..955070aea --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl @@ -0,0 +1,56 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseTimeField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseTimeField_idl__ + +#include <com/sun/star/form/component/DatabaseTimeField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Time. + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + */ +service BindableDatabaseTimeField +{ + service com::sun::star::form::component::DatabaseTimeField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl new file mode 100644 index 000000000..11f235a7c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl @@ -0,0 +1,64 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableIntegerValueRange_idl__ +#define __com_sun_star_form_binding_BindableIntegerValueRange_idl__ + +#include <com/sun/star/form/binding/BindableControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** this service specifies a BindableControlModel which reflects + an integer value, out of a range of permitted integer values. + + <p>BindableIntegerValueRanges have a value property, a minimum, and a maximum, + all of type integer.</p> +*/ +service BindableIntegerValueRange +{ + /** specifies that the control can be bound to external values + + <p>Any binding used with the control model (see XBindableValue::setValueBinding()) + must support exchanging double values.</p> + + <p>When the (integer) value reflected by the control model is changed, it's converted + into a double value and propagated to the binding.</p> + + <p>When the external (double) value changes, it's converted as follows to an integer + value: + <ul><li>If the external value is `NULL`, the current value of the control model + will be set to its minimum.</li> + <li>If the external value is the <em>infinite</em> value, the control value will + be set to its maximum or minimum, depending on the sign of the external value.</li> + <li>If none of the aforementioned conditions is met, the external value will be simply + rounded.</li> + </ul> + */ + service com::sun::star::form::binding::BindableControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl b/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl new file mode 100644 index 000000000..93a57e44c --- /dev/null +++ b/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl @@ -0,0 +1,42 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_binding_IncompatibleTypesException_idl__ +#define __com_sun_star_form_binding_IncompatibleTypesException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + +module com { module sun { module star { module form { module binding { + + +/** thrown to indicate that the types of an XValueBinding and + an XBindableValue are incompatible +*/ +exception IncompatibleTypesException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl b/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl new file mode 100644 index 000000000..18bda6070 --- /dev/null +++ b/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl @@ -0,0 +1,42 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_binding_InvalidBindingStateException_idl__ +#define __com_sun_star_form_binding_InvalidBindingStateException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + +module com { module sun { module star { module form { module binding { + + +/** thrown when an XValueBinding cannot perform a requested + operation due to an invalid state. +*/ +exception InvalidBindingStateException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ListEntryEvent.idl b/offapi/com/sun/star/form/binding/ListEntryEvent.idl new file mode 100644 index 000000000..68a41ecc4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntryEvent.idl @@ -0,0 +1,63 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ListEntryEvent_idl__ +#define __com_sun_star_form_binding_ListEntryEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies the event which is notified when a change in a string entry + list occurred + + @see XListEntrySource + @see XListEntryListener +*/ +struct ListEntryEvent : com::sun::star::lang::EventObject +{ + /** denotes the position where a change occurred. + + <p>The concrete semantics of the value depends on the concrete + event being notified.</p> + */ + long Position; + + /** denotes the number of changed entries, in case a change of + an entry <em>range</em> is being notified. + */ + long Count; + + /** denotes the changed entries + + <p>The concrete semantics of the value depends on the concrete + event being notified.</p> + */ + sequence< string > + Entries; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ListEntrySource.idl b/offapi/com/sun/star/form/binding/ListEntrySource.idl new file mode 100644 index 000000000..0779cfa97 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntrySource.idl @@ -0,0 +1,58 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ListEntrySource_idl__ +#define __com_sun_star_form_binding_ListEntrySource_idl__ + +#include <com/sun/star/form/binding/XListEntrySource.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which provides a list of string entries +*/ +service ListEntrySource +{ + /** allows read access to the entries represented by this component + */ + interface XListEntrySource; + + /** allows life time control for the component + + <p>An ListEntrySource will be known to one ore more components + supporting the XListEntrySink interface, which all work with + this source. However, they will not <em>own</em> the ListEntrySource. + The ownership is with another instance, which may also decide to obsolete + the ListEntrySource for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ListEntrySource + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XListEntrySinks.</p> + */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ValueBinding.idl b/offapi/com/sun/star/form/binding/ValueBinding.idl new file mode 100644 index 000000000..9ab7a20bf --- /dev/null +++ b/offapi/com/sun/star/form/binding/ValueBinding.idl @@ -0,0 +1,105 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ValueBinding_idl__ +#define __com_sun_star_form_binding_ValueBinding_idl__ + +#include <com/sun/star/form/binding/XValueBinding.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which allows access to a single value + + <p>Read/Write access to the value represented by this component is supported, + as well as (optionally) active broadcasting of value changes</p> +*/ +service ValueBinding +{ + /** determines whether the value is currently readonly + + <p>For instance, you could imagine a ValueBinding which + represents a cell in a spreadsheet document, and whose value is readonly + as long as the spreadsheet is locked.</p> + + <p>As long as this property is `TRUE`, the value binding should throw + an InvalidBindingStateException when its + XValueBinding::setValue() method is invoked.</p> + */ + [optional, property, bound, readonly] boolean ReadOnly; + + /** determines the relevance of the value represented by the binding + + <p>In a more complex scenario, where different form controls are bound to different + values, which all are part of a larger data structure, some of the items in this + data structure may not be relevant currently. This is indicated by the + #Relevant property being `FALSE`.</p> + + <p>XBindableValues which are bound to this binding may or may not + react in certain ways on the (ir)relevance of their bound value.</p> + + <p>One possible reaction could be that user interface elements which are associated + with the XBindableValue are disabled as long as #Relevant + is `FALSE`.</p> + */ + [optional, property, bound, readonly] boolean Relevant; + + /** allows access to the properties of the binding + */ + [optional] interface com::sun::star::beans::XPropertySet; + + /** allows read and write access to the value represented by this binding + */ + interface XValueBinding; + + /** allows other components to be notified when the value represented + by the ValueBinding instance changes. + + <p>This interface is optional, since a binding may not support + actively notifying changes in its value. Note, however, that in case + this interface is not supported, the bound component cannot react + on value changes, and will thus override any values which are + set by an instance other than itself.</p> + */ + [optional] interface com::sun::star::util::XModifyBroadcaster; + + /** allows life time control for the component + + <p>An ValueBinding may be known to one ore more components + supporting the XBindableValue interface, which all work with + this binding. However, they will not <em>own</em> the ValueBinding. + The ownership is with another instance, which may also decide to obsolete + the ValueBinding for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ValueBinding + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XBindableValues.</p> + */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XBindableValue.idl b/offapi/com/sun/star/form/binding/XBindableValue.idl new file mode 100644 index 000000000..0659bdace --- /dev/null +++ b/offapi/com/sun/star/form/binding/XBindableValue.idl @@ -0,0 +1,65 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XBindableValue_idl__ +#define __com_sun_star_form_binding_XBindableValue_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/form/binding/IncompatibleTypesException.idl> + + +module com { module sun { module star { module form { module binding { + +interface XValueBinding; + + +/** specifies support for being bound to an external value + + @see XValueBinding +*/ +interface XBindableValue : com::sun::star::uno::XInterface +{ + /** sets an external instance which controls the value of the component + + <p>Any previously active binding will be revoked. There can be only one!</p> + + @param aBinding + the new binding which is to be used by the component. May be `NULL`, + in this case only the current binding is revoked. + + @throws IncompatibleTypesException + if the new binding (provided it's not `NULL`) supports only types + which are incompatible with the types of the bindable component. + */ + void setValueBinding( [in] XValueBinding aBinding ) + raises ( IncompatibleTypesException ); + + /** retrieves the external instance which currently controls the value of the + component + */ + XValueBinding + getValueBinding( ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntryListener.idl b/offapi/com/sun/star/form/binding/XListEntryListener.idl new file mode 100644 index 000000000..b14a4a081 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryListener.idl @@ -0,0 +1,76 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntryListener_idl__ +#define __com_sun_star_form_binding_XListEntryListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/form/binding/ListEntryEvent.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies a listener for changes in a string entry list +*/ +interface XListEntryListener : com::sun::star::lang::XEventListener +{ + /** notifies the listener that a single entry in the list has change + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the changed entry, the first (and only) element + of the ListEntryEvent::Entries member denotes the new string + */ + void entryChanged( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been inserted into the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first inserted entry, the + ListEntryEvent::Entries member contains the strings which have + been inserted. + */ + void entryRangeInserted( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been removed from the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first removed entry, the + ListEntryEvent::Count member the number of removed entries. + */ + void entryRangeRemoved( [in] ListEntryEvent Source ); + + /** notifies the listener that all entries of the list have changed. + + <p>The listener should retrieve the complete new list by calling the + XListEntrySource::getAllListEntries() method of the event source + (which is denoted by com::sun::star::lang::EventObject::Source). + */ + void allEntriesChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySink.idl b/offapi/com/sun/star/form/binding/XListEntrySink.idl new file mode 100644 index 000000000..ed5926b1a --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySink.idl @@ -0,0 +1,57 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntrySink_idl__ +#define __com_sun_star_form_binding_XListEntrySink_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module form { module binding { + +interface XListEntrySource; + + +/** specifies support for indirect manipulation of a string list +*/ +interface XListEntrySink : com::sun::star::uno::XInterface +{ + /** sets the new source for the list entries of the component + + <p>The list represented by this component will be cleared, and initially + filled with the entries from the new list source.</p> + + @param Source + the new source for the list entries. May be `NULL`, in this + case, the current source is revoked. + */ + void setListEntrySource( [in] XListEntrySource Source ); + + /** retrieves the current source for the list entries of the component. + */ + XListEntrySource + getListEntrySource( ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySource.idl b/offapi/com/sun/star/form/binding/XListEntrySource.idl new file mode 100644 index 000000000..81236a0ff --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySource.idl @@ -0,0 +1,85 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntrySource_idl__ +#define __com_sun_star_form_binding_XListEntrySource_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NullPointerException.idl> +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> + + +module com { module sun { module star { module form { module binding { + +interface XListEntryListener; + + +/** specifies a source of string list entries + + <p>The interface supports foreign components which actively retrieve list entries, + as well as components which want to passively being notified of changes in the list.</p> + + @see XListEntrySink +*/ +interface XListEntrySource : com::sun::star::uno::XInterface +{ + /** retrieves the number of entries in the list + */ + long getListEntryCount( ); + + /** provides access to a single list entry + + @throws com::sun::star::lang::IndexOutOfBoundsException + if the given position does not denote a valid index in the list + + @see getListEntryCount + */ + string getListEntry( [in] long Position ) + raises( com::sun::star::lang::IndexOutOfBoundsException ); + + /** provides access to the entirety of all list entries + */ + sequence< string > + getAllListEntries( ); + + /** adds a listener which will be notified about changes in the list + reflected by the component. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void addListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** revokes the given listener from the list of components which will + be notified about changes in the entry list. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void removeListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..8f8003deb --- /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 <com/sun/star/form/binding/XListEntrySource.idl> + + +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: */ diff --git a/offapi/com/sun/star/form/binding/XValueBinding.idl b/offapi/com/sun/star/form/binding/XValueBinding.idl new file mode 100644 index 000000000..2a6a4d1b6 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XValueBinding.idl @@ -0,0 +1,86 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XValueBinding_idl__ +#define __com_sun_star_form_binding_XValueBinding_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NoSupportException.idl> +#include <com/sun/star/form/binding/IncompatibleTypesException.idl> +#include <com/sun/star/form/binding/InvalidBindingStateException.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies a binding to a value which can be read and written. +*/ +interface XValueBinding : com::sun::star::uno::XInterface +{ + /** determines the types which are supported by this binding for value exchange + + @see supportsType + */ + sequence< type > + getSupportedValueTypes( ); + + /** determines whether a given type is supported by this binding for value exchange + + <p>Calling this method is equal to calling getSupportedValueTypes(), + and looking up the given type in the resulting type sequence.</p> + + @see getSupportedValueTypes + */ + boolean supportsType( [in] type aType ); + + /** retrieves the current value + + @throws IncompatibleTypesException + if the requested value type is not supported by the binding + @see getSupportedValueTypes + @see supportsType + */ + any getValue( [in] type aType ) + raises( IncompatibleTypesException ); + + /** sets the current value + + @throws IncompatibleTypesException + if the given value type is not supported by the binding + @throws InvalidBindingStateException + if the value currently cannot be changed, since the binding is not + fully operational. Possible reasons for this include the binding being + readonly, or the target of the binding not being present. + @throws com::sun::star::lang::NoSupportException + if the binding in general does not support write access to its binding + + @see getSupportedValueTypes + @see supportsType + @see ValueBinding + */ + void setValue( [in] any aValue ) + raises( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |