From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001
From: Daniel Baumann The connection between a data-aware control model and a form whose data the
+ control should display is made by parentship relations. The parent of a data-aware
+ control model (see com::sun::star::container::XChild, inherited
+ via the FormControlModel and FormComponent services) has
+ always to be a com::sun::star::form::component::DataForm.
+ This interface is optional, if a component doesn't support it, it has to forward
+ the changes of its value to the field it is connected to immediately (means whenever a user
+ interaction changes it's content).
+ In the context of a control model which is data-aware, the semantics of default value
+ (see XReset) is as follows: For an example, have a look at the com::sun::star::form::component::TextField. It inherits
+ the com::sun::star::awt::UnoControlEditModel::Text property from the underlying
+ service, and additionally specifies the com::sun::star::form::component::TextField::DefaultText.
+ In the context of a com::sun::star::form::component::DataForm, controls are
+ automatically reset when one of the following applies
+
+ This interface will seldom be used directly from outside.
+ */
+ interface com::sun::star::form::XLoadListener;
+
+
+ /** Each DataAwareControlModel should be resettable for setting default values.
+
+
+ If (and only if) the control is valid bound to a column of its com::sun::star::form::component::DataForm, and the form
+ is not positioned on a new record (see com::sun::star::sdb::RowSet::IsNew), then
+ XReset::reset() does not reset the model's value to its default value, but uses the
+ underlying column value.
+ In all other cases, the model is reset to the default value as specified by the respective property.
+
This property makes sense in the context of the control model only. Normally, a control model
+ is a child of a com::sun::star::form::component::DataForm, which is bound
+ to a higher level object such as a table or query - more general, a result set.
+ This member here describes the column of this result set which the control should act for.
Not every control model can be bound to every database column. Usually, super services of the + DataAwareControlModel restrict the column types they can be used with.
+ + @see DataAwareControlModel::BoundField + */ + [property] string DataField; + + /** determines whether or not input into this field is required, when it is actually bound to a database field. + +If this property is set to `FALSE`, then the form runtime will not check the control/model for
+ `NULL` values before submitting data to the database. Usually, if a control model is bound to
+ a database field which cannot be `NULL`, and the model itself does not have a value, then the database
+ update is prevented, showing an error message to the user. To disable this behavior on a per-control
+ basis, use the InputRequired
property.
Applies only if the form the control model belongs to is loaded and the control is valid bound. + The referenced field supports the com::sun::star::sdb::Column service. +
+ @see DataAwareControlModel::DataField + */ + [readonly, property] com::sun::star::beans::XPropertySet BoundField; + + + /** references to a control model within the same document which should be used as a label. +Any user interface action which needs to refer to the control is assumed to use this
+ property.
+ A very common design method for forms is to group a data aware control with a label control,
+ with the latter describing the content of the former. For instance, you may have a
+ com::sun::star::form::component::TextField, which is bound to the e-mail
+ column of your data source. Then you will probably add a
+ com::sun::star::form::component::FixedText whose label is "E-Mail",
+ and associate it with the TextField by setting it as #LabelControl.
+ Now if you imagine a component offering data search in a form, this component will examine
+ the #LabelControl property, find the com::sun::star::form::component::FixedText,
+ examine it's label, and use this label to refer to the com::sun::star::form::component::TextField.
+
When setting the property, a number of constraints apply: +
Please do not use anymore, this enum is deprecated. + @deprecated + */ +published enum DataSelectionType +{ + TABLE, + QUERY, + SQL, + SQLPASSTHROUGH + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/DatabaseDeleteEvent.idl b/offapi/com/sun/star/form/DatabaseDeleteEvent.idl new file mode 100644 index 0000000000..4a5ef76a42 --- /dev/null +++ b/offapi/com/sun/star/form/DatabaseDeleteEvent.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** is fired if a database record is going to be deleted. +
Please do not use anymore, this struct is deprecated.
+ @deprecated
+ */
+published struct DatabaseDeleteEvent: com::sun::star::lang::EventObject
+{
+ sequence Usually, a com::sun::star::form::component::DataForm fires this
+ event when loading the form requires parameters to be filled in. Every parameter object supports the com::sun::star::beans::XPropertySet
+ interface, and at least the properties Name and Value Please do not use anymore, this struct is deprecated.
+ @deprecated
+ */
+published struct ErrorEvent: com::sun::star::lang::EventObject
+{
+ any Reason;
+
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/form/FormButtonType.idl b/offapi/com/sun/star/form/FormButtonType.idl
new file mode 100644
index 0000000000..8938b0503c
--- /dev/null
+++ b/offapi/com/sun/star/form/FormButtonType.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 .
+ */
+
+
+
+ module com { module sun { module star { module form {
+
+
+/** specifies the action to execute when a button is pressed.
+ @see com::sun::star::form::component::CommandButton
+ */
+published enum FormButtonType
+{
+
+ /** requires the button to act like a common push button, means no special action is triggered.
+ */
+ PUSH,
+
+
+ /** When the button is clicked, it performs a submit on its containing form.
+ */
+ SUBMIT,
+
+
+ /** When the button is clicked, it performs a reset on its containing form.
+ */
+ RESET,
+
+
+ /** When the button is clicked, a URL set for the button is opened.
+ @see com::sun::star::form::component::CommandButton::TargetURL
+ @see com::sun::star::form::component::CommandButton::TargetFrame
+ */
+ URL
+
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/form/FormComponent.idl b/offapi/com/sun/star/form/FormComponent.idl
new file mode 100644
index 0000000000..ceabcb1568
--- /dev/null
+++ b/offapi/com/sun/star/form/FormComponent.idl
@@ -0,0 +1,93 @@
+/* -*- 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 .
+ */
+
+
+
+ module com { module sun { module star { module form {
+
+
+/** specifies a component which can be part of a form.
+
+ @see FormControlModel
+ @see com::sun::star::form::component::Form
+ */
+published service FormComponent
+{
+ /** identifies the component as a candidate for being part of a form.
+ This interface also provides the access to the component's parent. Every concrete form component - i.e. every service which includes
+ the Additionally, you can add more properties to the component as needed,
+ using the com::sun::star::beans::XPropertyContainer interface.
+ Those properties are called dynamic properties. Dynamic properties are not evaluated by the component itself,
+ nor by the form's runtime environment. They're only remembered and available for
+ use by other instances. Note that dynamic properties added to a form component are, by definition,
+ removable. That is, the com::sun::star::beans::PropertyAttribute::REMOVABLE
+ will always be set, even if you do not specify it in the
+ com::sun::star::beans::XPropertyContainer::addProperty() call. Note that the name accessed here is the same as when using the
+ com::sun::star::container::XNamed interface. The collection must provide the possibility of adding and removing
+ components by name and by index. The name of a component is not
+ necessarily unique, so the collection must be able to handle duplicate
+ entry names. The interface allows managing of scripts associated with dependent components, accessed by index.
+ However, as a client of the FormComponents service, there's no need to bother with
+ the container aspect of the com::sun::star::script::XEventAttacherManager
+ directly. A FormComponents container will automatically synchronize the elements
+ you put into it with the scripting information obtained at the
+ com::sun::star::script::XEventAttacherManager interface. For instance, at any time you can obtain the events associated with
+ the Note that the model-view-paradigm is used for form controls, too. The default -1 is used to indicate that the tab-order of this control should be
+ determined automatically. Each component which supports a tabstop must provide a
+ FormControlModel::TabIndex property. Normally, a FormController instance is evaluating this property. No semantics is given for this property, it will usually be used by the creator of a document
+ containing form controls. Usually used if the FormSubmitMethod attribute has the value POST.
+ Usually used when the form contains a file upload element. Usually used if the FormSubmitMethod attribute has the value POST and
+ the content should be reviewed as full text. Basically, a Forms is a FormComponents,
+ with the additional restriction that the contained elements support the
+ com::sun::star::form::component::Form service. Note that when this mode is set, a simultaneous TabulatorCycle
+ value of TabulatorCycle::CURRENT means that you cannot travel
+ between records anymore. This is the default and most often encountered mode. This option is usually used for forms containing a grid control only.
+ In such a form, the control has its own navigation elements, so there is
+ no need to use the navigation bar for the form, but rather for its parent.
+ The controller can be plugged into a com::sun::star::frame::XFrame, and will
+ provide a visual component for inspecting control properties. This means it allows to interactively control
+ several aspects of a FormControlModel or DataAwareControlModel, such as it's
+ data binding, it's layout, and it's event binding For using a PropertyBrowserController, you need to
+ FormComponent
service - has a set of properties which
+ are available as long as the component lives - the so-called static
+ properties.n
th
+ element in the form components by calling
+ com::sun::star::script::XEventAttacherManager::getScriptEvents()
+ with parameter n
. In particular, this invariant is always met, even after you
+ inserted/removed elements into/from the container.
+
Note that nowadays, this service is only a legacy wrapper using the + com::sun::star::inspection::ObjectInspector and the + com::sun::star::form::inspection::DefaultFormComponentInspectorModel services, and knitting them together.
+ +*/ +published service PropertyBrowserController +{ + /** contains the object to inspect. + +Changing this property from outside causes the controller to update its view + with the data of the new object
+ */ + [property] com::sun::star::beans::XPropertySet IntrospectedObject; + + /** controls the actually visible page. + +The aspects of a DataAwareControlModel which can be browsed and modified
+ using this controller can be separated into 3 groups: common aspects, data-awareness
+ related aspects, and bound events.
+ The appearance of the visual component created by the controller is that 3 tab pages, one for
+ each group, are displayed (of course if the control does not support any aspects of a given group,
+ the group is omitted).
+ With this property, it can be controller which page is currently active.
Valid values are (this list may be extended in the future): +
With supporting this interface, the component is able to operate in (and provide content + for) a com::sun::star::frame::XFrame.
+ */ + interface com::sun::star::frame::XController; + + /** allows to access the properties of the object + */ + interface com::sun::star::beans::XPropertySet; + + /** allows to access the properties via indices + */ + interface com::sun::star::beans::XFastPropertySet; + + /** allows to access more than one property of the object at the same time + */ + interface com::sun::star::beans::XMultiPropertySet; +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/TabOrderDialog.idl b/offapi/com/sun/star/form/TabOrderDialog.idl new file mode 100644 index 0000000000..b7e9eee22f --- /dev/null +++ b/offapi/com/sun/star/form/TabOrderDialog.idl @@ -0,0 +1,37 @@ +/* -*- 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 . + */ + + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.2 + */ +published service TabOrderDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createWithModel([in] com::sun::star::awt::XTabControllerModel TabbingModel, + [in] com::sun::star::awt::XControlContainer ControlContext, + [in] com::sun::star::awt::XWindow ParentWindow); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/TabulatorCycle.idl b/offapi/com/sun/star/form/TabulatorCycle.idl new file mode 100644 index 0000000000..75a3b50165 --- /dev/null +++ b/offapi/com/sun/star/form/TabulatorCycle.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 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies how the TAB key should be used in a form. + +If the last control of a form is focused, and the user pressed the TAB key, there are + several possibilities how a FormController should handle this. + TabulatorCycle specifies these possibilities.
+ +Note that the TabulatorCycle determines what happens when SHIFT-TAB + is pressed on the first control of a form, as well as when TAB is pressed on the + last control.
+ +First and last refers to the tabbing order of controls.
+ + @see FormControlModel::TabIndex + @see FormController + */ +published enum TabulatorCycle +{ + + /** pressing the TAB key from the last control moves the focus to + the first control in the tab order of the next record. + */ + RECORDS, + + + /** pressing the TAB key from the last control moves the focus to + the first control in the tab order of the same record. + */ + CURRENT, + + + /** pressing the TAB key from the last control of a form moves + the focus to the first control of the next form in the tab order. + */ + PAGE + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XApproveActionBroadcaster.idl b/offapi/com/sun/star/form/XApproveActionBroadcaster.idl new file mode 100644 index 0000000000..b17be2b069 --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionBroadcaster.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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to probably veto actions to be performed on components. + +Usually, a component which supports the + XApproveActionBroadcaster interface implements + com::sun::star::awt::XActionListener as well.
+ */ +published interface XApproveActionBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the XApproveActionListener::approveAction() + event. + + @param aListener + the listener to be added + */ + void addApproveActionListener( [in] com::sun::star::form::XApproveActionListener aListener ); + + + /** removes the specified listener + + @param aListener + the listener to be removed + */ + void removeApproveActionListener( [in] com::sun::star::form::XApproveActionListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XApproveActionListener.idl b/offapi/com/sun/star/form/XApproveActionListener.idl new file mode 100644 index 0000000000..238a738fde --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionListener.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** can be implemented to listen and probably veto actions to be performed on components. + +An example for an action would be the click of a + CommandButton.
+ + @see XApproveActionBroadcaster + @see com::sun::star::form::component::CommandButton + @see com::sun::star::form::control::CommandButton + */ +published interface XApproveActionListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when an action is performed. + + @param aEvent + A descriptor specifying the source of the event. + + @returns + `TRUE` when the action is permitted, otherwise `FALSE`. + */ + boolean approveAction( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XBoundComponent.idl b/offapi/com/sun/star/form/XBoundComponent.idl new file mode 100644 index 0000000000..3ea14ce213 --- /dev/null +++ b/offapi/com/sun/star/form/XBoundComponent.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies a (form) component which is bound to a data source. + +The interface provides the possibility of committing its respective
+ data to a data source it is bound to. A commit() will be
+ performed by the environment (usually, a FormController).
+ For example, suppose you have a data-bound control that is connected
+ to a database field. Each time the control loses its focus, the
+ model (component) of the control is triggered by the environment
+ to store its value in the database field.
A commit may fail if an XUpdateListener vetoes the it.
+ + @see com::sun::star::form::XUpdateListener + */ +published interface XBoundComponent: com::sun::star::form::XUpdateBroadcaster +{ + + /** commits the content of the component into the data source it is bound to. + + @returns + `TRUE` when the commitment was successful, otherwise `FALSE`. + */ + boolean commit(); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XBoundControl.idl b/offapi/com/sun/star/form/XBoundControl.idl new file mode 100644 index 0000000000..e408ae547b --- /dev/null +++ b/offapi/com/sun/star/form/XBoundControl.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows locking the input on components. + */ + +published interface XBoundControl: com::sun::star::uno::XInterface +{ + + /** determines whether the input is currently locked or not. + + @returns + `TRUE` when it is currently locked, otherwise `FALSE`. + */ + boolean getLock(); + + + /** is used for altering the current lock state of the + component. + + @param bLock + the new lock state. + */ + void setLock( [in] boolean bLock ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XChangeBroadcaster.idl b/offapi/com/sun/star/form/XChangeBroadcaster.idl new file mode 100644 index 0000000000..a7f184137c --- /dev/null +++ b/offapi/com/sun/star/form/XChangeBroadcaster.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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to notify listeners of data changes. + +The concrete semantics of a change (i.e. the conditions for when a change event + is fired) must be specified in the service description of the providing service.
+ + @see XChangeListener + */ +published interface XChangeBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the "changed" event. + + @param aListener + the listener to add. + + @see com::sun::star::form::XChangeListener + */ + void addChangeListener( [in] com::sun::star::form::XChangeListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + + @see com::sun::star::form::XChangeListener + */ + void removeChangeListener( [in] com::sun::star::form::XChangeListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XChangeListener.idl b/offapi/com/sun/star/form/XChangeListener.idl new file mode 100644 index 0000000000..35aa2e987a --- /dev/null +++ b/offapi/com/sun/star/form/XChangeListener.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** is the listener interface for receiving notifications about data changes. + +The concrete semantics of a change (i.e. the conditions for when a change event + is fired) must be specified in the description of the service broadcasting the + change.
+ + @see XChangeBroadcaster + */ +published interface XChangeListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the data of a component has been changed. + + @param rEvent + A descriptor specifying the source of the event. + */ + void changed( [in] com::sun::star::lang::EventObject rEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl b/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl new file mode 100644 index 0000000000..5a08415144 --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for confirming deletions of + rows in a com::sun::star::form::component::DataForm. + + @see XConfirmDeleteListener + */ +published interface XConfirmDeleteBroadcaster: com::sun::star::uno::XInterface +{ + + /** remembers the specified listener to receive an event for confirming deletions + +XConfirmDeleteListener::confirmDelete() is called before a + deletion is performed. You may use the event to write your own confirmation messages.
+ + @param aListener + the listener to add. + + @see com::sun::star::form::XConfirmDeleteListener + */ + void addConfirmDeleteListener( [in] com::sun::star::form::XConfirmDeleteListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + + @see com::sun::star::form::XConfirmDeleteListener + */ + void removeConfirmDeleteListener( [in] com::sun::star::form::XConfirmDeleteListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XConfirmDeleteListener.idl b/offapi/com/sun/star/form/XConfirmDeleteListener.idl new file mode 100644 index 0000000000..2a38999b80 --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteListener.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { + + +/** allows to register a component for confirming deletions of + rows in a com::sun::star::form::component::DataForm. + + @see XConfirmDeleteBroadcaster + */ +published interface XConfirmDeleteListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the current record of a database form will be deleted. + + @param aEvent + A descriptor specifying the deletion request. + + @returns + `TRUE` when the row can be deleted, otherwise `FALSE`. + */ + boolean confirmDelete( [in] com::sun::star::sdb::RowChangeEvent aEvent ); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl new file mode 100644 index 0000000000..285bdc641b --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. +This interface is usually implemented by components which are to execute a statement, + and may need parameter information. For example, the + com::sun::star::form::component::DataForm is such a component. When it is + bound to a statement which contains parameters, or to a query which is based upon a parametrized + statement, it needs values to fill in the parameters with actual values when it is being loaded. + One method to gather these values is calling the XDatabaseParameterListener listeners, which + can fill them in.
+ */ +published interface XDatabaseParameterBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener, to allow it to fill in necessary parameter values. + @param aListener + the listener to add. + @see com::sun::star::form::XDatabaseParameterListener + */ + void addParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XDatabaseParameterListener + */ + void removeParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl new file mode 100644 index 0000000000..4f0665acf3 --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.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 . + */ + + +module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. + +Note that this interface provides exactly the same functionality as the + XDatabaseParameterBroadcaster interface. It exists purely for compatibility + with the com::sun::star::script::XEventAttacher::attachSingleEventListener(): + It expects the methods for adding and removing listeners to follow a certain naming scheme, + respective to the name of the listener which is being added/removed.
+ + @see XDatabaseParameterBroadcaster + @see com::sun::star::script::XEventAttacher +*/ +interface XDatabaseParameterBroadcaster2: XDatabaseParameterBroadcaster +{ + /** registers an XDatabaseParameterListener + +This method behaves exactly as the XDatabaseParameterBroadcaster::addParameterListener() + method inherited from the base interface.
+ */ + void addDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + + + /** revokes an XDatabaseParameterListener + +This method behaves exactly as the XDatabaseParameterBroadcaster::removeParameterListener() + method inherited from the base interface.
+ */ + void removeDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterListener.idl b/offapi/com/sun/star/form/XDatabaseParameterListener.idl new file mode 100644 index 0000000000..9d6e2a620d --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterListener.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/. + * + * 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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to intercept value request for parametrized SQL statements. + */ +published interface XDatabaseParameterListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when there is a need for parameter values + + @param aEvent + the event describing the parameter value request. + + @returns + `TRUE` when the execution of the parametrized statement should continue, `FALSE` otherwise. + + @see com::sun::star::form::DatabaseParameterEvent + */ + boolean approveParameter( [in] com::sun::star::form::DatabaseParameterEvent aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDeleteListener.idl b/offapi/com/sun/star/form/XDeleteListener.idl new file mode 100644 index 0000000000..54b0d2ceb2 --- /dev/null +++ b/offapi/com/sun/star/form/XDeleteListener.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** This is the listener interface for receiving "approveDelete" and + "deleted" events posted by a database form. + +"approveDelete" may be used to abort a deletion of the current data + record.
+ +Please do not use anymore, this interface is superseded + by com::sun::star::form::XConfirmDeleteListener.
+ + @deprecated + */ +published interface XDeleteListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the current record of the database form will be deleted. + */ + boolean approveDelete( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when a database form has finished the delete processing and + the data has been successfully deleted from the datasource. + */ + void deleted( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XErrorBroadcaster.idl b/offapi/com/sun/star/form/XErrorBroadcaster.idl new file mode 100644 index 0000000000..aca0b1be36 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorBroadcaster.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving database error events. + +Please do not use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorBroadcaster.
+ + @deprecated + */ +published interface XErrorBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to be notified of errors. + */ + void addErrorListener( [in] com::sun::star::form::XErrorListener aListener ); + + + /** removes the specified listener. + */ + void removeErrorListener( [in] com::sun::star::form::XErrorListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XErrorListener.idl b/offapi/com/sun/star/form/XErrorListener.idl new file mode 100644 index 0000000000..d355ce73e6 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorListener.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** used to be notified when errors in a database form happen. + +Each time an exception is triggered by a database form, the error + event is posted to the error listeners. This event may be used to + configure the error handling of a database form.
+ +Please do not use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorListener.
+ + @deprecated + */ +published interface XErrorListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a database action performed by a database form raises + an exception. + */ + void errorOccured( [in] com::sun::star::form::ErrorEvent aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XForm.idl b/offapi/com/sun/star/form/XForm.idl new file mode 100644 index 0000000000..eecf7329fe --- /dev/null +++ b/offapi/com/sun/star/form/XForm.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** identifies a FormComponent as being a (sub-) form. + +This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.
+ + @see XFormComponent + */ +published interface XForm: com::sun::star::form::XFormComponent +{ +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormComponent.idl b/offapi/com/sun/star/form/XFormComponent.idl new file mode 100644 index 0000000000..ccec6ae6e3 --- /dev/null +++ b/offapi/com/sun/star/form/XFormComponent.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** describes a component which may be part of a form. + +This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.
+ + @see XForm + */ +published interface XFormComponent: com::sun::star::container::XChild +{ +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormController.idl b/offapi/com/sun/star/form/XFormController.idl new file mode 100644 index 0000000000..cd72c7ce26 --- /dev/null +++ b/offapi/com/sun/star/form/XFormController.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** is superseded by com::sun::star::form::runtime::XFormController. + @deprecated + */ +published interface XFormController: com::sun::star::awt::XTabController +{ + ::com::sun::star::awt::XControl getCurrentControl(); + void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); + void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormControllerListener.idl b/offapi/com/sun/star/form/XFormControllerListener.idl new file mode 100644 index 0000000000..c98e39f861 --- /dev/null +++ b/offapi/com/sun/star/form/XFormControllerListener.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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to be notified when the activation status of a FormController changes. + +A form controller is activated if a form control gains the + focus and none of its controls currently owned the focus before.
+ + @see XFormController + */ +published interface XFormControllerListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a control of the controller gained the focus and + the controller was not previously activated. + + @param rEvent + the event happened. + */ + void formActivated( [in] com::sun::star::lang::EventObject rEvent ); + + + /** is invoked when a control of the "XFormController" lost the focus + and no control of the controller received the focus. In other + words, no control of the controller owns the focus. + + @param rEvent + the event happened. + */ + void formDeactivated( [in] com::sun::star::lang::EventObject rEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XForms.idl b/offapi/com/sun/star/form/XForms.idl new file mode 100644 index 0000000000..4bb091f728 --- /dev/null +++ b/offapi/com/sun/star/form/XForms.idl @@ -0,0 +1,74 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.1 + */ +published interface XForms +{ + /** allows to register listeners to be notified of changes in the container. + */ + interface com::sun::star::container::XContainer; + + /** allows to add/remove elements by name. + */ + interface com::sun::star::container::XNameContainer; // ->XNameReplace->XNameAccess->XElementAccess->XInterface + + /** gives access to the elements by index. + */ + interface com::sun::star::container::XIndexContainer; // ->XIndexReplace->XIndexAccess->XElementAccess->XInterface + + /** creates an enumeration of the elements. + */ + interface com::sun::star::container::XEnumerationAccess; // ->XElementAccess->XInterface + + /** This interface has to be implemented to supply the scripting environment + for the contained components. + +The interface allows managing of scripts associated with dependent components, accessed by index. + However, as a client of the FormComponents service, there's no need to bother with + the container aspect of the com::sun::star::script::XEventAttacherManager + directly. A FormComponents container will automatically synchronize the elements + you put into it with the scripting information obtained at the + com::sun::star::script::XEventAttacherManager interface.
+ +For instance, at any time you can obtain the events associated with
+ the n
th
+ element in the form components by calling
+ com::sun::star::script::XEventAttacherManager::getScriptEvents()
+ with parameter n
. In particular, this invariant is always met, even after you
+ inserted/removed elements into/from the container.
If you need read access to the forms collection, then you might check + the existence of forms using hasForms(), and if it returns + `FALSE`, you can do as if XFormsSupplier::getForms() would + have returned an empty container.
+ +Semantically, hasForms() is equivalent to calling + XElementAccess::hasElements() on the container returned by + XFormsSupplier::getForms(). But when using the latter, the + implementation is forced to create an empty container, which might be potentially + expensive.
+ */ + boolean hasForms(); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGrid.idl b/offapi/com/sun/star/form/XGrid.idl new file mode 100644 index 0000000000..72f729f17f --- /dev/null +++ b/offapi/com/sun/star/form/XGrid.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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of setting and retrieving the position + of the current cell in a grid control. + +Note that a grid control does not allow free control over the current row:
+ In such a control, every line represents a row of data of the underlying
+ com::sun::star::form::component::DataForm. Thus, the current
+ row of the grid control always equals the current row of the
+ com::sun::star::form::component::DataForm, and can be affected only
+ by changing the latter.
+ The current column of a grid control, whoever, can be freely controlled.
Grid columns (more precise: models of grid columns) are direct children of + the grid control model they belong to. Grid columns can't be created on a global + service factory, instead, you need to create them on the grid, where you want to + insert them later on.
+ + @see com::sun::star::form::component::GridControl + */ +published interface XGridColumnFactory: com::sun::star::uno::XInterface +{ + + /** creates a new column object + + @param aColumnType + the type of column to be created + + @returns + the new column object + + @throws com::sun::star::lang::IllegalArgumentException + if aColumnType is not available. + */ + com::sun::star::beans::XPropertySet createColumn( [in] string aColumnType ) + raises( com::sun::star::lang::IllegalArgumentException ); + + + /** returns a list of available column types. + + @returns + a list of column types. + */ + sequenceYou can retrieve the data type information and the data in a row.
+ +This interface allows to retrieve data even for rows which are not current, which is quite useful, + as normally, you can't affect the current row in a grid control without moving the cursor of the underlying + com::sun::star::form::component::DataForm.
+ + @see XGrid + @see com::sun::star::form::control::GridControl + @see com::sun::star::form::component::GridControl + + @deprecated + */ +published interface XGridFieldDataSupplier: com::sun::star::uno::XInterface +{ + /** checks whether or not the content of the grid's columns can be retrieved in the requested format. + +Not every cell content can be retrieved in every representation. For example, in a text column,
+ you usually won't be able to retrieve the content as double.
+ To check if the type you need is supported by the columns, use this method.
If a column does not support the requested type, `NULL` is returned at the respective + position.
+ + @see XGridFieldDataSupplier::queryFieldDataType + */ + sequenceUsually, the columns used are the columns as supplied by the grid control model.
+ +You should use this interface only if you know exactly what you are doing. Tampering + with the columns of a grid control which is part of a complex form can really hurt...
+ + @deprecated + @see com::sun::star::awt::XWindowPeer + @see com::sun::star::form::component::GridControl + */ +published interface XGridPeer: com::sun::star::uno::XInterface +{ + + /** retrieves the currently used column definitions of the peer. + */ + com::sun::star::container::XIndexContainer getColumns(); + + + /** sets the column definition for the peer. + */ + void setColumns( [in] com::sun::star::container::XIndexContainer aColumns ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XImageProducerSupplier.idl b/offapi/com/sun/star/form/XImageProducerSupplier.idl new file mode 100644 index 0000000000..eb3787ea2e --- /dev/null +++ b/offapi/com/sun/star/form/XImageProducerSupplier.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the access to an image producer. + + @see com::sun::star::awt::XImageProducer + */ +published interface XImageProducerSupplier: com::sun::star::uno::XInterface +{ + + /** accesses the image producer. + + @returns + the image producer. + */ + com::sun::star::awt::XImageProducer getImageProducer(); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XInsertListener.idl b/offapi/com/sun/star/form/XInsertListener.idl new file mode 100644 index 0000000000..908fcc8af0 --- /dev/null +++ b/offapi/com/sun/star/form/XInsertListener.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about insertions into a database form. + +Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + service, as well as the com::sun::star::sdbc::XRowSetListener and + com::sun::star::sdb::XRowSetApproveListener interfaces.
+ + @deprecated + */ +published interface XInsertListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a database form starts inserting a record. + */ + void inserting( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked after a database form has inserted a record to a data source. + */ + void inserted( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XLoadListener.idl b/offapi/com/sun/star/form/XLoadListener.idl new file mode 100644 index 0000000000..fad9dbb053 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadListener.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 . + */ + + + + module com { module sun { module star { module form { + + +/** receives load-related events from a loadable object. + +The interface is typically implemented by data-bound components, + which want to listen to the data source that contains their database + form.
+ + @see com::sun::star::form::XLoadable + @see DataAwareControlModel + */ +published interface XLoadListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the object has successfully connected to a datasource. + + @param aEvent + the event happened. + */ + void loaded( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object is about to be unloaded. +Components may use this to stop any other event processing related to + the event source before the object is unloaded.
+ + @param aEvent + the event happened. + */ + void unloading( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked after the object has disconnected from a datasource. + + @param aEvent + the event happened. + */ + void unloaded( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object is about to be reloaded. + +Components may use this to stop any other event processing related + to the event source until they get the reloaded event.
+ + @param aEvent + the event happened. + */ + void reloading( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object has been reloaded. + + @param aEvent + the event happened. + */ + void reloaded( [in] com::sun::star::lang::EventObject aEvent ); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XLoadable.idl b/offapi/com/sun/star/form/XLoadable.idl new file mode 100644 index 0000000000..cab059c102 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadable.idl @@ -0,0 +1,77 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { + + +/** provides functionality to implement objects which may be loaded. + +The object is typically implemented by high-level objects which can connect to a data source.
+ + @see XLoadListener + */ +published interface XLoadable: com::sun::star::uno::XInterface +{ + + /** loads the data. + +If the data is already loaded (->isLoaded), then the method returns silently. + In this case, you should use ->reload.
+ */ + void load(); + + + /** unloads the data. + */ + void unload(); + + + /** does a smart refresh of the object. + +The final state will be the same as if unload and load were called, but reload + is the more efficient way to do the same. If the object isn't loaded, nothing happens.
+ */ + void reload(); + + + /** returns if the object is in loaded state. + */ + boolean isLoaded(); + + + /** adds the specified listener to receive load-related events + + @param aListener + the listener to add. + */ + void addLoadListener( [in] com::sun::star::form::XLoadListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + */ + void removeLoadListener( [in] com::sun::star::form::XLoadListener aListener ); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XPositioningListener.idl b/offapi/com/sun/star/form/XPositioningListener.idl new file mode 100644 index 0000000000..bb3f006e2f --- /dev/null +++ b/offapi/com/sun/star/form/XPositioningListener.idl @@ -0,0 +1,45 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about cursor movements into a database form. + +Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + service, as well as the com::sun::star::sdbc::XRowSetListener.
+ + @deprecated + */ +published interface XPositioningListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the database form has been positioned on a data record. + */ + void positioned( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XReset.idl b/offapi/com/sun/star/form/XReset.idl new file mode 100644 index 0000000000..948f26ff0d --- /dev/null +++ b/offapi/com/sun/star/form/XReset.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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to reset components to some default values. + +The semantics of default value depends on the providing service.
+ */ +published interface XReset: com::sun::star::uno::XInterface +{ + + /** resets a component to some default value. + */ + void reset(); + + + /** adds the specified listener to receive events related to resetting the + component. + + @param aListener + the listener to add. + */ + void addResetListener( [in] com::sun::star::form::XResetListener aListener ); + + + /** removes the specified listener + + @param aListener + the listener to remove + */ + void removeResetListener( [in] com::sun::star::form::XResetListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XResetListener.idl b/offapi/com/sun/star/form/XResetListener.idl new file mode 100644 index 0000000000..19b97918f5 --- /dev/null +++ b/offapi/com/sun/star/form/XResetListener.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 . + */ + + + + module com { module sun { module star { module form { + + +/** is the interface for receiving notifications about reset events. + +The listener is called if a component implementing the
+ XReset interface performs a reset.
+ Order of events:
+
Such a notification is typically sent when the user cancels updating the + current record of a database form + without saving the data. After restoring, the user operates on the original data.
+ +Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + and com::sun::star::sdb::RowSet services
+ + @deprecated + */ +published interface XRestoreListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a modified record has been restored + */ + void restored( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XSubmit.idl b/offapi/com/sun/star/form/XSubmit.idl new file mode 100644 index 0000000000..53d88bf35d --- /dev/null +++ b/offapi/com/sun/star/form/XSubmit.idl @@ -0,0 +1,71 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to submit data from a component. + +Usually, this is used by com::sun::star::form::component::HTMLForms. + +
See the HTML specification + to learn about submitting forms.
+ */ +published interface XSubmit: com::sun::star::uno::XInterface +{ + + /** submits the component's data to a specified target. + + @param aControl + the control whose data is to be submitted + + @param aMouseEvt + the event which triggered the submit, if it was a mouse event + + @see com::sun::star::awt::MouseEvent + */ + void submit( [in] com::sun::star::awt::XControl aControl, + [in] com::sun::star::awt::MouseEvent aMouseEvt ); + + + /** adds the specified listener to receive the "approveSubmit" event. + + @param aListener + the listener to add. + + @see com::sun::star::form::XSubmitListener + */ + void addSubmitListener( [in] com::sun::star::form::XSubmitListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XSubmitListener + */ + void removeSubmitListener( [in] com::sun::star::form::XSubmitListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XSubmitListener.idl b/offapi/com/sun/star/form/XSubmitListener.idl new file mode 100644 index 0000000000..44ae39b818 --- /dev/null +++ b/offapi/com/sun/star/form/XSubmitListener.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** receives notifications about data being submitted. + +The submission may be canceled, so the listener has the possibility + of verifying the data before submission.
+ + @see XSubmit + + @deprecated + This interface is superseded by the com::sun::star::form::submission::XSubmissionVetoListener + interface. New implementations should use the latter, if possible. + */ +published interface XSubmitListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a component is about to submit it's data. + + @param Event + the event happened + + @returns + `TRUE` when submitting was approved, otherwise `FALSE`. + */ + boolean approveSubmit( [in] com::sun::star::lang::EventObject Event ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XUpdateBroadcaster.idl b/offapi/com/sun/star/form/XUpdateBroadcaster.idl new file mode 100644 index 0000000000..374432565e --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateBroadcaster.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 . + */ + + + + module com { module sun { module star { module form { + + +/** is the broadcaster interface for sending "approveUpdate" and "updated" events. + +The component supporting this interface must do approval calls + (XUpdateListener::approveUpdate()) immediately + before the data is updated, and notification calls + (XUpdateListener::updated()) immediately afterwards.
+ + @see XUpdateListener + */ +published interface XUpdateBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the events "approveUpdate" + and "updated". + @param aListener + the listener to add. + @see com::sun::star::form::XUpdateListener + */ + void addUpdateListener( [in] com::sun::star::form::XUpdateListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XUpdateListener + */ + void removeUpdateListener( [in] com::sun::star::form::XUpdateListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XUpdateListener.idl b/offapi/com/sun/star/form/XUpdateListener.idl new file mode 100644 index 0000000000..b5ac224cb0 --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateListener.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { + + +/** used to listen on objects which allow updating their data. +In addition to just get notified when a data update happened, the listener + has a chance to veto updates before they happen.
+ + @see XUpdateBroadcaster + */ +published interface XUpdateListener: com::sun::star::lang::XEventListener +{ + + /** is invoked to check the current data. + +For a given update process, if one of the XUpdateListeners + vetoes the change, the update is canceled, and no further notification happens.
+ + @param aEvent + An event descriptor specifying the broadcaster of the change. + + @returns + `TRUE` when the update was approved, otherwise `FALSE`. + */ + boolean approveUpdate( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when an object has finished processing the updates and + the data has been successfully written. + + @param aEvent + A event descriptor specifying the broadcaster of the change. + */ + void updated( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 0000000000..d667cab686 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableControlModel.idl @@ -0,0 +1,72 @@ +/* -*- 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 . + */ + + +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 + +Via this service, bindable control models inherit the
+ com::sun::star::util::XCloneable interface.
+ 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.
When a BindableControlModel is bound to an external value, + then every change in the control model's value is immediately reflected + in the external binding.
+ +If the binding set via this interface supports the ValueBinding::ReadOnly + and ValueBinding::Relevant properties, they're respected by the control model: +
ReadOnly
property (if present) is kept in sync with the
+ binding's ReadOnly
property. That is, any control using the value
+ binding is read-only as long as the binding is.Enabled
property (if present) is kept in sync
+ with the binding's Relevant
property. That is, any control using
+ the value binding is disabled as long as the binding is not relevant.In both cases, explicit changes of the model's property are ignored if they would relax
+ the restriction imposed by the binding.
+ For instance, if the binding declares its value to
+ be read-only (indicated by ValueBinding::ReadOnly being `TRUE`), then
+ any attempt to set the ReadOnly
property of the control model to `FALSE` will
+ fail. However, if the binding's value is not read-only, then the ReadOnly
+ property at the control model can be freely set.
+ The very same holds for the binding's ValueBinding::Relevant and the control
+ model's Enabled
properties.
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.
+ +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.
+ 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.
+ 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.
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).
+ +For this, they provide the XBindableValue interface which allows to + set an external component to exchange the value with.
+ +The following rules apply when a data aware control model is bound to an external value binding: +
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.
+ +*/ +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 alternatively binding the control model + to an external value. + */ + service BindableControlModel; +}; + + +}; }; }; }; }; + +/* 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 0000000000..b53a685834 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl @@ -0,0 +1,73 @@ +/* -*- 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 . + */ + + +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. + +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: +
If the value binding associated with a BindableDatabaseCheckBox + supports exchanging string values, and the com::sun::star::form::component::CheckBox::RefValue + is not empty, then the radio button will exchange its value as string: +
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 not checked state of the control.
+ */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +/* 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 0000000000..773f8239c9 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + + +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. + +If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as string, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). +
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..dd54580722 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + + +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. + +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. +
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..22648dcc2a --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.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/. + * + * 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 . + */ + + +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. + +The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseFormattedField must support exchanging + values of type double.
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..9c61d79725 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl @@ -0,0 +1,70 @@ +/* -*- 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 . + */ + + +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. + +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. +
The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseNumericField must support exchanging + values of type double.
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..83c59e517d --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl @@ -0,0 +1,70 @@ +/* -*- 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 . + */ + + +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. + +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: +
If the value binding associated with a BindableDatabaseRadioButton + supports exchanging string values, and the com::sun::star::form::component::RadioButton::RefValue + is not empty, then the radio button will exchange its value as string: +
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 not selected state of the control.
+ */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +/* 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 0000000000..729cdc5dc7 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ + + +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. + +If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as string, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). +
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..edd84e2395 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + + +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. + +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. +
+ + @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. + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..f47ac63ac4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.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 . + */ + + +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. + +BindableIntegerValueRanges have a value property, a minimum, and a maximum, + all of type integer.
+*/ +service BindableIntegerValueRange +{ + /** specifies that the control can be bound to external values + +Any binding used with the control model (see XBindableValue::setValueBinding()) + must support exchanging double values.
+ +When the (integer) value reflected by the control model is changed, it's converted + into a double value and propagated to the binding.
+ +When the external (double) value changes, it's converted as follows to an integer + value: +
The concrete semantics of the value depends on the concrete + event being notified.
+ */ + long Position; + + /** denotes the number of changed entries, in case a change of + an entry range is being notified. + */ + long Count; + + /** denotes the changed entries + +The concrete semantics of the value depends on the concrete + event being notified.
+ */ + sequence< string > + Entries; +}; + + +}; }; }; }; }; + +/* 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 0000000000..4da8e751ef --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntrySource.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + +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 + +An ListEntrySource will be known to one or more components + supporting the XListEntrySink interface, which all work with + this source. However, they will not own 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.
+ */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +/* 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 0000000000..3562e6d232 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ValueBinding.idl @@ -0,0 +1,95 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which allows access to a single value + +Read/Write access to the value represented by this component is supported, + as well as (optionally) active broadcasting of value changes
+*/ +service ValueBinding +{ + /** determines whether the value is currently readonly + +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.
+ +As long as this property is `TRUE`, the value binding should throw + an InvalidBindingStateException when its + XValueBinding::setValue() method is invoked.
+ */ + [optional, property, bound, readonly] boolean ReadOnly; + + /** determines the relevance of the value represented by the binding + +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`.
+ +XBindableValues which are bound to this binding may or may not + react in certain ways on the (ir)relevance of their bound value.
+ +One possible reaction could be that user interface elements which are associated + with the XBindableValue are disabled as long as #Relevant + is `FALSE`.
+ */ + [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. + +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.
+ */ + [optional] interface com::sun::star::util::XModifyBroadcaster; + + /** allows life time control for the component + +A ValueBinding may be known to one or more components + supporting the XBindableValue interface, which all work with + this binding. However, they will not own 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.
+ */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +/* 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 0000000000..96d8da5746 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XBindableValue.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 . + */ + + +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 + +Any previously active binding will be revoked. There can be only one!
+ + @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( ); +}; + + +}; }; }; }; }; + +/* 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 0000000000..71ebe81fc4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryListener.idl @@ -0,0 +1,68 @@ +/* -*- 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 . + */ + + +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. + +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 ); +}; + + +}; }; }; }; }; + +/* 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 0000000000..8aac0bd431 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySink.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ + + +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 + +
The list represented by this component will be cleared, and initially + filled with the entries from the new list source.
+ + @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( ); +}; + + +}; }; }; }; }; + +/* 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 0000000000..e9af214d97 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySource.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 . + */ + + +module com { module sun { module star { module form { module binding { + +interface XListEntryListener; + + +/** specifies a source of string list entries + +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.
+ + @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 ); +}; + + +}; }; }; }; }; + +/* 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 0000000000..895f2665c2 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl @@ -0,0 +1,40 @@ +/* -*- 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/. + */ + + +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 ); + +}; + + +}; }; }; }; }; + +/* 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 0000000000..17e6fac33c --- /dev/null +++ b/offapi/com/sun/star/form/binding/XValueBinding.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 . + */ + + +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 + +Calling this method is equal to calling getSupportedValueTypes(), + and looking up the given type in the resulting type sequence.
+ + @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 ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CheckBox.idl b/offapi/com/sun/star/form/component/CheckBox.idl new file mode 100644 index 0000000000..1f669824fc --- /dev/null +++ b/offapi/com/sun/star/form/component/CheckBox.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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a check box control + +The model supports the properties required for HTML, thus you can build up + HTMLForms with it
+ */ +published service CheckBox +{ + service com::sun::star::awt::UnoControlCheckBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see CheckBox::DefaultState + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlCheckBoxModel::State + @see com::sun::star::form::XReset + */ + [property] short DefaultState; + + + /** contains a reference value which is used for submission in a HTML + form + +When submitting a HTMLForm which contains a check box, + which is checked, the RefValue is used for submission. + */ + [property] string RefValue; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ComboBox.idl b/offapi/com/sun/star/form/component/ComboBox.idl new file mode 100644 index 0000000000..b92412311a --- /dev/null +++ b/offapi/com/sun/star/form/component/ComboBox.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text or selection + of text from a list of text values. + */ +published service ComboBox +{ + service com::sun::star::awt::UnoControlComboBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see ComboBox::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +
This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlComboBoxModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CommandButton.idl b/offapi/com/sun/star/form/component/CommandButton.idl new file mode 100644 index 0000000000..7fa1d94dbc --- /dev/null +++ b/offapi/com/sun/star/form/component/CommandButton.idl @@ -0,0 +1,95 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the control model for a clickable button which is part of a form + component hierarchy. + + @see ImageButton + */ +published service CommandButton +{ + service com::sun::star::awt::UnoControlButtonModel; + + service com::sun::star::form::FormControlModel; + + /** supplies the image producer when the button is to display an image. + +If the com::sun::star::awt::UnoControlButtonModel::ImageURL points to the location of an + image to be displayed on the button, this interface can be used to retrieve an image + producer, which itself will supply the image.
+ +Usually, a control belonging to the model will use this interface to obtain the + image to be painted
+ */ + interface com::sun::star::form::XImageProducerSupplier; + + + /** describes the action to be executed by the button when pressed. + */ + [property] com::sun::star::form::FormButtonType ButtonType; + + /** describes the frame, where to open the document specified by the TargetURL. + +This property is evaluated if the button is of type URL.
+ +As always, there is a number of target names which have a special meaning, and force + a special com::sun::star::frame::Frame to be used.
+ */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + +This property is evaluated if the button is of type URL.
+ + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; + + /** specifies the default toggle state for the button, used when it is reset. + +This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle
+ is `TRUE`. In this case, the DefaultState
controls to which State
the button will
+ be reset.
For a given implementation of the interface, if this (optional) property is present, then also the optional + interface com::sun::star::form::XReset must be present.
+ */ + [optional, property] boolean DefaultState; + + /** allows resetting the button + +This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle
+ is `TRUE`. In this case, the DefaultState
controls to which State
the button will
+ be reset, when com::sun::star::form::XReset::reset() is invoked.
For a given implementation of the interface, if this (optional) interface is present, then also the optional + property #DefaultState must be present.
+ */ + [optional] interface ::com::sun::star::form::XReset; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CurrencyField.idl b/offapi/com/sun/star/form/component/CurrencyField.idl new file mode 100644 index 0000000000..2ccacf8f55 --- /dev/null +++ b/offapi/com/sun/star/form/component/CurrencyField.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the ControlModel for an edit field which + contains a currency value. + */ +published service CurrencyField +{ + service com::sun::star::awt::UnoControlCurrencyFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see CurrencyField::DefaultValue + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + + @see com::sun::star::awt::UnoControlCurrencyFieldModel::Value + @see com::sun::star::form::XReset + */ + [property] double DefaultValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DataForm.idl b/offapi/com/sun/star/form/component/DataForm.idl new file mode 100644 index 0000000000..ed0ff3eb7d --- /dev/null +++ b/offapi/com/sun/star/form/component/DataForm.idl @@ -0,0 +1,184 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { + + published interface XReset; + published interface XDatabaseParameterBroadcaster; + +module component { +/** This service specifies a form which is connected to a database and + displays the results of SQL queries. It provides the possibility of + adding new data records, modifying existing ones, or deleting them. + +A database form is a special kind of enhanced database row set + which provides all information for displaying the data and has more + possibilities for configuring the data manipulation.
+ +*/ +published service DataForm +{ + service com::sun::star::sdb::RowSet; + service com::sun::star::form::component::Form; + + /** is used to reset controls belonging to the form, and to reset database fields to which the + controls are bound + +A DataForm is reset either on explicit request, or after it is moved + to the insertion row.
+ +The insertion row is a virtual row which is used to insert new records. It is reached + by calling com::sun::star::sdbc::XResultSetUpdate::moveToInsertRow(). + The com::sun::star::sdb::RowSet service specifies exactly which notifications + happen in which order when calling com::sun::star::sdbc::XResultSetUpdate::moveToInsertRow(), + and a DataForm implementation extends this with the following contract: +
Loading a form is basically the same as executing the underlying row set. In fact, all the + functionality of this interface could be simulated by using setting some properties manually, + com::sun::star::sdbc::XRowSet::execute(), moving the row set cursor and so on.
+ +One main difference between XLoadable::load() and com::sun::star::sdbc::XRowSet::execute() + is that if you use the former, the row set is positioned on the first record, while in the latter case + it is position before the it.
+ */ + interface com::sun::star::form::XLoadable; + + /** can be used to allow an interaction handler to supply missing data during a load process. + +If data is needed during loading a form, then this is usually obtained via broadcaster-listener + mechanisms. An example for this (and currently the only one) are parameter values.
+However, if you use this method, you can pass an interaction handler which should supply these + additional data.
+ + @see com::sun::star::sdb::InteractionHandler + */ + interface com::sun::star::sdb::XCompletedExecution; + + /** can be used for filling parameters. + +You can add your component as
+ com::sun::star::form::XDatabaseParameterListener
+ to a form to get notified whenever the form needs parameter values to be filled in
+ In a first approach, the form tries to fill any parameters from its master-detail relation
+ (if any). All values which can't be filled are then passed to all listeners, which can
+ fill them by their own choice.
This is slightly changed if the form is loaded using the + com::sun::star::sdb::XCompletedExecution::connectWithCompletion() method. In this case, the parameters + are obtained from the interaction handler, not from the listeners
+ + @see XCompletedExecution + @see MasterFields + @see DetailFields + */ + interface com::sun::star::form::XDatabaseParameterBroadcaster; + + /** is used for subforms and contains the names of columns of the parent form. + +These columns are typically the foreign key fields of the parent form. + The values of these columns are used to identify the data for the subform. + Each time the parent form changes its current row, the subform requeries + it's data based on the values of the master fields.
+ +If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.
+ */ + [property] sequenceEntries in this sequence can either denote column names in the sub form,
+ or parameter names.
+ For instance, you could base the form on the SQL statement
+ SELECT * FROM invoices WHERE cust_ref = :cid
, and add cid
+ to the DetailFields property. In this case, the parameter will be filled from
+ the corresponding master field.
+ Alternatively, you could simply base your form on the table invoices
,
+ and add the column name cust_ref
to the DetailFields. In this case,
+ and implicit filter clause WHERE cust_ref = :<new_param_name>
will
+ be created, and the artificial parameter will be filled from the corresponding
+ master field.
+ If a string in this property denotes both a column name and a parameter name, it
+ is undefined which way it is interpreted, but implementations of the service are required
+ to either decide for the parameter or the column, and proceed as usual.
+
The columns specified herein typically represent a part of the primary key + fields or their aliases of the detail form.
+ +If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.
+ */ + [property] sequenceNote that this is a recommendation for user interface components displaying the + form. Form implementations may decide to allow for insertions done via the API, even + if the property is set to `FALSE`, but the user interface should respect the property + value.
+ */ + [property] boolean AllowInserts; + + /** determines if modifications of the current record of the form are allowed. + +Note that this is a recommendation for user interface components displaying the + form. Form implementations may decide to allow for updates done via the API, even + if the property is set to `FALSE`, but the user interface should respect the property + value.
+ */ + [property] boolean AllowUpdates; + + /** determines if deletions of records of the form are allowed. + +Note that this is a recommendation for user interface components displaying the + form. Form implementations may decide to allow for deletions done via the API, even + if the property is set to `FALSE`, but the user interface should respect the property + value.
+ */ + [property] boolean AllowDeletes; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseCheckBox.idl b/offapi/com/sun/star/form/component/DatabaseCheckBox.idl new file mode 100644 index 0000000000..5d7db13cf5 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCheckBox.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a check box which is data-aware, and can be bound to a database field. + +Mostly, you will create data-aware checkboxes as tristate checkboxes, because this + is a requirement to correctly handle `NULL` values in databases.
+ + @see ::com::sun::star::awt::UnoControlCheckBoxModel::TriState + */ +published service DatabaseCheckBox +{ + service com::sun::star::form::component::CheckBox; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseComboBox.idl b/offapi/com/sun/star/form/component/DatabaseComboBox.idl new file mode 100644 index 0000000000..5591e435ab --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseComboBox.idl @@ -0,0 +1,69 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a combo box which is data-aware, and can be bound to a database field. + +Like most other data aware controls, such a combo box will display the actual content + of the field it is bound to. In addition, as a combo box contains a list where the user + can choose items to fill into the control, this list can be filled with different data from + a database, too.
+ */ +published service DatabaseComboBox +{ + service com::sun::star::form::component::ComboBox; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +When the user enters text into a combo box, and after this, the control
+ content is to be committed into the database field the control is bound to,
+ a decision must be made how to deal with empty strings.
+ This is controlled by #ConvertEmptyToNull.
If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.
+ */ + [property] boolean ConvertEmptyToNull; + + /** describes the source of items in the combo box's list. + +The concrete meaning of this property depends on the value of #ListSourceType
+ */ + [property] string ListSource; + + /** specifies the kind of list source. + +Note: A value of com::sun::star::form::ListSourceType::VALUELIST + is not valid for a combo box. It won't be rejected when setting it, but controls will usually ignore it + and leave the list empty.
+ */ + [property] com::sun::star::form::ListSourceType ListSourceType; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl b/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl new file mode 100644 index 0000000000..7cd1ccfc16 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a currency field which is data-aware, and can be bound to a database field. + */ +published service DatabaseCurrencyField +{ + service com::sun::star::form::component::CurrencyField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseDateField.idl b/offapi/com/sun/star/form/component/DatabaseDateField.idl new file mode 100644 index 0000000000..d805965c27 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseDateField.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a date field which is data-aware, and can be bound to a database field. + */ +published service DatabaseDateField +{ + service com::sun::star::form::component::DateField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseFormattedField.idl b/offapi/com/sun/star/form/component/DatabaseFormattedField.idl new file mode 100644 index 0000000000..0504474048 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseFormattedField.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a formatted field model which is data-aware, and can be bound to a database field. + */ +published service DatabaseFormattedField +{ + service com::sun::star::form::component::FormattedField; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +When the user enters text into a formatted field control, and after this, the control
+ content is to be committed into the database field the control is bound to,
+ a decision must be made how to deal with empty strings.
+ This is controlled by #ConvertEmptyToNull.
If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.
+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseImageControl.idl b/offapi/com/sun/star/form/component/DatabaseImageControl.idl new file mode 100644 index 0000000000..3c7f493a06 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseImageControl.idl @@ -0,0 +1,96 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a control used for displaying images stored in a database. + +As every com::sun::star::form::DataAwareControlModel, an image control
+ can be bound to a database field. This means that for instance with every record change, the content
+ of the database field is taken, interpreted as image, and displayed in the control.
+ Unlike other more text-based controls, it does not interpret the content of the field as text or double,
+ but as binary stream (see com::sun::star::sdb::XColumn::getBinaryStream()).
Usually, an image control model can be bound to binary columns only, namely + com::sun::star::sdbc::DataType::BINARY, + com::sun::star::sdbc::DataType::VARBINARY, + com::sun::star::sdbc::DataType::LONGVARBINARY, + com::sun::star::sdbc::DataType::OTHER, + com::sun::star::sdbc::DataType::LONGVARCHAR
+ + + +Note that besides taking the image to be displayed from the bound field, there is another option. The + com::sun::star::awt::UnoControlImageControlModel::ImageURL property specifies + the URL of an image to be displayed. If this property is changed from outside, the respective file + is loaded and set as image source.
+ +In a usual data form, the scenario will be as follows: +
Other components can register as com::sun::star::awt::XImageConsumer + at this producer. Then they will be notified of any change in the image to be displayed.
+ */ + interface com::sun::star::form::XImageProducerSupplier; + + + /** indicates if it is possible to change the image being displayed. + */ + [property] boolean ReadOnly; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseListBox.idl b/offapi/com/sun/star/form/component/DatabaseListBox.idl new file mode 100644 index 0000000000..4bc5ca7fa5 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseListBox.idl @@ -0,0 +1,147 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware list box control model. + +The base service for list boxes (ListBox) offers only + one possibility to specify the list entries: + The display strings in the + com::sun::star::awt::UnoControlListBoxModel::StringItemList + property and the corresponding values in the ListBox::ListSource + property.
+ +This service here extends this mimic. It allows to fill the list from a data source. + This means that a second result set is opened, which works on the same connection as the + form which the list box belongs to, but can be based on an arbitrary table or SQL statement.
+ +For instance, you may have a form which is bound to a table invoice, and you use it
+ to enter invoices for your customers. Probably, you will have a second table (say customer),
+ which (among other data) contains a unique key for identifying customers. In your invoice table, you will
+ have a foreign key referring to these customers.
+ Now, besides the result set the form is based on (all your invoices), the list box can be instructed
+ to open a second result set, this time for the customer table, and fill its list with entries
+ from this result set.
+ Additionally, it allows to model the relation between the two tables: When the user selects a customer from
+ the list, this customer has the unique id we just talked about (which is not necessarily visible to the
+ user in any way). The list box then automatically transfers this id into the foreign key column of
+ invoice, thus allowing the user to transparently work with human-readable strings instead of
+ pure numbers.
+ Let's call this result set the list is filled from the list result set here ...
The display strings are always taken from the first column of that result set, + and the corresponding value as per the BoundColumn property.
+ */ +published service DatabaseListBox +{ + service com::sun::star::form::component::ListBox; + + service com::sun::star::form::DataAwareControlModel; + + + /** specifies which column of the list result set should be used for data exchange. + +When you make a selection from a list box, the "BoundColumn" + property reflects which column value of a result set should + be used as the value of the component. If the control is bound + to a database field, the column value is stored in the + database field identified by the property + com::sun::star::form::DataAwareControlModel::DataField. + +
The bound column property is only used if a list source is defined + and the list source matches with the types + com::sun::star::form::ListSourceType::TABLE, + com::sun::star::form::ListSourceType::QUERY, + com::sun::star::form::ListSourceType::SQL or + com::sun::star::form::ListSourceType::SQLPASSTHROUGH. + Otherwise the property is ignored, as there is no result set from which to + get the column values.
+ */ + [property] short BoundColumn; + + + /** describes the kind of list source used. + +Depending on the value of this property, the way the value of ListBox::ListSource + is evaluated varies. +
When the user enters text into a pattern field, and after this, the control
+ content is to be committed into the database field the control is bound to,
+ a decision must be made how to deal with empty strings.
+ This is controlled by this property.
If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.
+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseRadioButton.idl b/offapi/com/sun/star/form/component/DatabaseRadioButton.idl new file mode 100644 index 0000000000..67fa79abbd --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseRadioButton.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a radio button which is data-aware, and can be bound to a database field. + */ +published service DatabaseRadioButton +{ + service com::sun::star::form::component::RadioButton; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseTextField.idl b/offapi/com/sun/star/form/component/DatabaseTextField.idl new file mode 100644 index 0000000000..2019db0ad3 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTextField.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a text field which is data-aware, and can be bound to a database field. + */ +published service DatabaseTextField +{ + service com::sun::star::form::component::TextField; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +When the user enters text into a text field, and after this, the control
+ content is to be committed into the database field the control is bound to,
+ a decision must be made how to deal with empty strings.
+ This is controlled by this property.
If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.
+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseTimeField.idl b/offapi/com/sun/star/form/component/DatabaseTimeField.idl new file mode 100644 index 0000000000..60692109d0 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTimeField.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware field for inputting a time value. + */ +published service DatabaseTimeField +{ + service com::sun::star::form::component::TimeField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DateField.idl b/offapi/com/sun/star/form/component/DateField.idl new file mode 100644 index 0000000000..e33316f30a --- /dev/null +++ b/offapi/com/sun/star/form/component/DateField.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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a date field control, which is an edit field used to enter a date. +*/ +published service DateField +{ + service com::sun::star::awt::UnoControlDateFieldModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + +If you do not set a value for the #DefaultDate, then resetting the control + will result in setting to the current system date. This is for HTML compatibility.
+ */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlDateFieldModel::Date + @see com::sun::star::form::XReset + */ + [property] long DefaultDate; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FileControl.idl b/offapi/com/sun/star/form/component/FileControl.idl new file mode 100644 index 0000000000..81f8215a3e --- /dev/null +++ b/offapi/com/sun/star/form/component/FileControl.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model of an edit field for a + file name. + */ +published service FileControl +{ + service com::sun::star::awt::UnoControlFileControlModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see FileControl::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlFileControlModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FixedText.idl b/offapi/com/sun/star/form/component/FixedText.idl new file mode 100644 index 0000000000..a9d354fa54 --- /dev/null +++ b/offapi/com/sun/star/form/component/FixedText.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model for a text which can be + displayed, but not edited by the user. + +These kind of controls is usually used to label other controls.
+ + @see com::sun::star::form::DataAwareControlModel::LabelControl + */ +published service FixedText +{ + service com::sun::star::awt::UnoControlFixedTextModel; + + service com::sun::star::form::FormControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/Form.idl b/offapi/com/sun/star/form/component/Form.idl new file mode 100644 index 0000000000..bd1c1c7814 --- /dev/null +++ b/offapi/com/sun/star/form/component/Form.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a form which is a group of FormComponents. + +A form fulfills several tasks, like storing the structure of its + form components, storing the information concerning tab ordering + and control grouping, and last but not least, it provides the + event environment for its contained elements.
+ +A form acts on the one hand like a container of FormComponents + and on the other hand like a FormComponent. This generic + construction allows the definition of hierarchies of forms and their + dependent subforms.
+ + @see com::sun::star::form::FormControlModel + */ +published service Form +{ + service com::sun::star::form::FormComponent; + + service com::sun::star::form::FormComponents; + + /** identifies a component as form. + */ + interface com::sun::star::form::XForm; + + + /** This interface has to be implemented to supply the information for tab ordering and component grouping. + + @see com::sun::star::form::FormControlModel::TabIndex + */ + interface com::sun::star::awt::XTabControllerModel; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FormattedField.idl b/offapi/com/sun/star/form/component/FormattedField.idl new file mode 100644 index 0000000000..00750d32ec --- /dev/null +++ b/offapi/com/sun/star/form/component/FormattedField.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/. + * + * 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model of an edit field for entering text which can be + (nearly) arbitrarily formatted. + + @see com::sun::star::util::XNumberFormatsSupplier + */ +published service FormattedField +{ + service com::sun::star::awt::UnoControlFormattedFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveValue + @see com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveDefault + */ + interface com::sun::star::form::XReset; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/GridControl.idl b/offapi/com/sun/star/form/component/GridControl.idl new file mode 100644 index 0000000000..dd0a8358be --- /dev/null +++ b/offapi/com/sun/star/form/component/GridControl.idl @@ -0,0 +1,142 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a model for a control which can display form data in a table-like way. + +In opposite to other form controls, grid controls do not only + display the single current value of a column they are bound to. Moreover, they do + display not only the current row of the form, but all rows (at least potentially, limited + by the control size, of course).
+ +The table rows in a grid control correspond to the rows in the DataForm + the control belongs to, and the columns correspond to single columns of the form's row set.
+ +Columns of a grid control are modeled by own objects, too. They are very similar to usual + com::sun::star::form::DataAwareControlModels modeling other "single-value" controls, but they are not described + as own services. Instead, they need to be created using the com::sun::star::form::XGridColumnFactory interface.
+ */ +published service GridControl +{ + service com::sun::star::form::FormControlModel; + + /** provides basic functionality of a container of com::sun::star::form::FormComponents. + +All the container-related methods of this service related to control models, + this is what are the container elements for a GridControl.
+ +As the com::sun::star::form::FormComponents service also specifies + the com::sun::star::script::XEventAttacherManager service, grid control + models also provide a scripting environment for their columns.
+ */ + service com::sun::star::form::FormComponents; + + /** allows to create column models to be inserted into the control model. + +Note that the object returned by the com::sun::star::form::XGridColumnFactory::createColumn() + method is not part of the grid control, yet. It needs to be inserted using any of the + container interfaces.
+ +You always need to use this interface for creating columns for the grid control. + Column models not created this way will not be accepted when inserted later on.
+ */ + interface com::sun::star::form::XGridColumnFactory; + + /** gives access to the currently selection. + +In a grid control, single columns can be selected (at most one at a time).
+ For various unfortunate reasons, this selection is an aspect of the model, not of the
+ control as you would expect.
This interface is deprecated, new implementations should not use it anymore, as it is to + be superseded by a solution which is bound to the control, not the model.
+ + @deprecated + */ + interface com::sun::star::view::XSelectionSupplier; + + /** resets the control. + +The reset of the control is forwarded to all its elements, means to all the column models. + As grid columns are very much like data-aware stand-alone controls, you can find a description + of the reset functionality in com::sun::star::form::DataAwareControlModel::XReset. + */ + interface com::sun::star::form::XReset; + + + /** returns the border style of the control. + +
+ 0: No border + 1: 3D border + 2: simple border ++ */ + [property] short Border; + + + /** specifies the color of the border, if present + +
Not every border style (see #Border) may support coloring. + For instance, usually a border with 3D effect will ignore the BorderColor setting.
+ + @since OOo 2.0 + */ + [optional, property] long BorderColor; + + + /** determines whether the control is enabled or disabled. + */ + [property] boolean Enabled; + + + /** contains the font attributes of the text in the control. + */ + [property] com::sun::star::awt::FontDescriptor FontDescriptor; + + + /** specifies the height of a row of the grid. + +If the value is set to `NULL`, the height is determined automatically according + to the current font used.
+ + @see GridControl::FontDescriptor + */ + [property] long RowHeight; + + + /** determines whether the control can be reached by the tabulator key. + */ + [property] boolean Tabstop; + + + /** specifies the text color (RGB) of the control. + */ + [property] com::sun::star::util::Color TextColor; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/GroupBox.idl b/offapi/com/sun/star/form/component/GroupBox.idl new file mode 100644 index 0000000000..bf26ad473b --- /dev/null +++ b/offapi/com/sun/star/form/component/GroupBox.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a model for a control which can be used to visually + group controls. + */ +published service GroupBox +{ + service com::sun::star::awt::UnoControlGroupBoxModel; + + service com::sun::star::form::FormControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/HTMLForm.idl b/offapi/com/sun/star/form/component/HTMLForm.idl new file mode 100644 index 0000000000..9d577321af --- /dev/null +++ b/offapi/com/sun/star/form/component/HTMLForm.idl @@ -0,0 +1,70 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the special kind of Forms for HTML documents. + +An HTMLForm fulfills the specification of forms in HTML. It supplies + the possibility of submitting or resetting the contents of a form. + For more information on HTML forms, please see the documentation of HTML.
+ */ +published service HTMLForm +{ + service com::sun::star::form::component::Form; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + /** allows to submit changes. + +When a form is submitted, the data contained in the form is sent + to the target URL as a series of name/value pairs. The name portion + of each pair is the name of a form component as specified by its NAME + attribute. In most cases the value portion is the value displayed + by the element, for example, the text displayed in a text field.
+ */ + interface com::sun::star::form::XSubmit; + + /** describes the frame, where to open the document specified by the TargetURL. + */ + [property] string TargetFrame; + + + /** specifies the URL, which should be used for submission. + */ + [property] string TargetURL; + + /** specifies the kind of submission. + */ + [property] com::sun::star::form::FormSubmitMethod SubmitMethod; + + /** specifies the kind of encoding for submission. + */ + [property] com::sun::star::form::FormSubmitEncoding SubmitEncoding; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/HiddenControl.idl b/offapi/com/sun/star/form/component/HiddenControl.idl new file mode 100644 index 0000000000..5c1cc21a87 --- /dev/null +++ b/offapi/com/sun/star/form/component/HiddenControl.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the model of a hidden control. + +The only sense of a hidden control is to store data in the form which is + not visible to the user.
+ +Usually, hidden controls are used in com::sun::star::form::component::HTMLForms,
+ where they contain data which is to be submitted.
+ Nevertheless, you can use them in your own forms for storing any data, for instance
+ to evaluate it in some scripting macro.
The image to be displayed is determined by com::sun::star::awt::UnoControlImageControlModel::ImageURL + property specifies the URL of an image to be displayed.
+ + @see CommandButton +*/ +published service ImageButton +{ + service com::sun::star::awt::UnoControlImageControlModel; + + service com::sun::star::form::FormControlModel; + + + /** supplies the caller with a com::sun::star::awt::XImageProducer. + +Other components can register as com::sun::star::awt::XImageConsumer + at this producer. Then they will be notified of any change in the image to be displayed.
+ +Whenever the com::sun::star::awt::UnoControlImageControlModel::ImageURL
+ property is changed, the model loads the specified image, and sets it as image source
+ at its com::sun::star::awt::XImageProducer. Then, all
+ com::sun::star::awt::XImageConsumers are notified and supplied with
+ the binary data of the image.
+ Usually, controls acting for an ImageButton model are consumers, and use the
+ data stream to display the image
This property is evaluated if the button is of type URL.
+ +As always, there is a number of target names which have a special meaning, and force + a special com::sun::star::frame::Frame to be used.
+ */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + +This property is evaluated if the button is of type URL.
+ + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ListBox.idl b/offapi/com/sun/star/form/component/ListBox.idl new file mode 100644 index 0000000000..513b38a9e9 --- /dev/null +++ b/offapi/com/sun/star/form/component/ListBox.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a model for a control which allows to choose in a list of alternative values. + */ +published service ListBox +{ + service com::sun::star::awt::UnoControlListBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see ListBox::DefaultSelection + */ + interface com::sun::star::form::XReset; + + /** contains the indexes of entries of the listbox, which should selected + by default. + +This selection is used initially or for a reset.
+ + @see com::sun::star::awt::UnoControlListBoxModel::SelectedItems + @see com::sun::star::form::XReset + */ + [property] sequenceThis color is used if the #FontDescriptor defines + that the text in the control should be underlined or stroke out.
+ */ + [property] long TextLineColor; + + /** specifies the relief for the font described in #FontDescriptor + +The value must be one of the com::sun::star::text::FontRelief + constants.
+ */ + [property] long FontRelief; + + /** specifies the emphasis mark for the font described in #FontDescriptor + +The value must be one of the com::sun::star::text::FontEmphasis + constants.
+ */ + [property] long FontEmphasisMark; + + /** specifies the size of the icons in the control + +At least the following values are to be supported: +
Some buttons of a NavigationToolBar may show repeating behavior, e.g. may be
+ repeatedly triggered when the user keeps the mouse pressed over such a button.
+ The delay between two such triggers (in milliseconds) is specified with this property.
+
This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlNumericFieldModel::Value + @see com::sun::star::form::XReset + */ + [property] double DefaultValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/PatternField.idl b/offapi/com/sun/star/form/component/PatternField.idl new file mode 100644 index 0000000000..ec52fd918b --- /dev/null +++ b/offapi/com/sun/star/form/component/PatternField.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text which matches a specific pattern. + */ +published service PatternField +{ + service com::sun::star::awt::UnoControlPatternFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see PatternField::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlPatternFieldModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/RadioButton.idl b/offapi/com/sun/star/form/component/RadioButton.idl new file mode 100644 index 0000000000..754802ac7e --- /dev/null +++ b/offapi/com/sun/star/form/component/RadioButton.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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which acts as a radio button as needed in HTMLForms. + +Radio buttons are controls which can be grouped together, and in every + group, only one of the controls can be check. This means if one of them + is checked by a user interaction, all other controls in the same group + are automatically unchecked
+ +Like in HTML, radio buttons are grouped together if and only if they have the + same name (see com::sun::star::form::FormComponent::Name).
+ */ +published service RadioButton +{ + service com::sun::star::awt::UnoControlRadioButtonModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see RadioButton::DefaultState + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ +In a group of radio buttons only one button should be checked + by default.
+ + @see com::sun::star::awt::UnoControlRadioButtonModel::State + @see com::sun::star::form::XReset + */ + [property] short DefaultState; + + + /** contains a reference value which is used for submission in a HTML + form. + +If the form the control belongs to is to be submitted (see + com::sun::star::form::XSubmit), and the control is checked, this reference + value is used for submission.
+ */ + [property] string RefValue; + + + /** specifies a value which is to be associated with the control when it's not + selected. + +In various situations, the #RefValue is associated with the control
+ if and only if it is selected.
+ #UncheckedRefValue provides an extension of this concept: If present,
+ the value should be associated with the control when it is not selected.
If set to `TRUE`, users need to manually press the enter key to insert a line break. + If set to `FALSE`, text is automatically wrapped at the control border.
+ */ + [property] boolean HardLineBreaks; + + /** specifies whether the control should display the text including all its formatting. + +If this is set to `FALSE`, the control will act as ordinary + com::sun::star::awt::UnoControlEditModel.
+ +If the property is set to `TRUE`, the control will ignore the following properties: +
This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlScrollBarModel::ScrollValue + @see com::sun::star::form::XReset + */ + [property] long DefaultScrollValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/SpinButton.idl b/offapi/com/sun/star/form/component/SpinButton.idl new file mode 100644 index 0000000000..4c619ab278 --- /dev/null +++ b/offapi/com/sun/star/form/component/SpinButton.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + + + +module com { module sun { module star { module form { module component { + + +/** specifies the model of a scroll bar control. +*/ +service SpinButton +{ + service com::sun::star::awt::UnoControlSpinButtonModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlSpinButtonModel::SpinValue + @see com::sun::star::form::XReset + */ + [property] long DefaultSpinValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/SubmitButton.idl b/offapi/com/sun/star/form/component/SubmitButton.idl new file mode 100644 index 0000000000..a6e8142ca3 --- /dev/null +++ b/offapi/com/sun/star/form/component/SubmitButton.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/. + * + * 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 . + */ + + +module com { module sun { module star { module form { module component { + + +/** specifies the control model for a button, part of a form component hierarchy, + which can be bound to external submissions. + + @see CommandButton + */ +service SubmitButton +{ + service com::sun::star::form::FormControlModel; + + /** allows binding external submissions to the control model + +Note that the control model itself will not make any use of the submission. + Instead, submissions are triggered by a control (not a control model). + Thus, the com::sun::star::form::control::SubmitButton + control associated with a SubmitButton model is responsible for + using the submission supplied at this model.
+ */ + interface com::sun::star::form::submission::XSubmissionSupplier; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/TextField.idl b/offapi/com/sun/star/form/component/TextField.idl new file mode 100644 index 0000000000..97c654bf78 --- /dev/null +++ b/offapi/com/sun/star/form/component/TextField.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text, either single- or multi-line. + */ +published service TextField +{ + service com::sun::star::awt::UnoControlEditModel; + + service com::sun::star::form::FormControlModel; + + /** specifies optional capabilities for displaying and inputting formatted text. + +If the RichTextControl::RichText property is set to `TRUE`, + then the TextField component will disable it's reset capabilities. This means + that all calls to com::sun::star::form::XReset::reset() will be ignored.
+ */ + [optional] service RichTextControl; + + /** can be used to reset the control to its default text. + + @see TextField::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlEditModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/TimeField.idl b/offapi/com/sun/star/form/component/TimeField.idl new file mode 100644 index 0000000000..7acdb1c140 --- /dev/null +++ b/offapi/com/sun/star/form/component/TimeField.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 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the control model for a field which can be used to input time values. + */ +published service TimeField +{ + service com::sun::star::awt::UnoControlTimeFieldModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + +If you do not set a value for the #DefaultTime, then resetting the control + will result in setting to the current system time. This is for HTML compatibility.
+ */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +This value is used when the control is initially displayed, and for resetting it.
+ + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + @see com::sun::star::form::XReset + */ + [property] long DefaultTime; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/CheckBox.idl b/offapi/com/sun/star/form/control/CheckBox.idl new file mode 100644 index 0000000000..aeeabaeb06 --- /dev/null +++ b/offapi/com/sun/star/form/control/CheckBox.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a check box control which can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::CheckBox + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service CheckBox +{ + service com::sun::star::awt::UnoControlCheckBox; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ComboBox.idl b/offapi/com/sun/star/form/control/ComboBox.idl new file mode 100644 index 0000000000..fa370188f5 --- /dev/null +++ b/offapi/com/sun/star/form/control/ComboBox.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a combo box control. + +The model of the control has to support the com::sun::star::form::component::ComboBox + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ComboBox +{ + service com::sun::star::awt::UnoControlComboBox; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/CommandButton.idl b/offapi/com/sun/star/form/control/CommandButton.idl new file mode 100644 index 0000000000..e10002a86f --- /dev/null +++ b/offapi/com/sun/star/form/control/CommandButton.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a button control. + +The model of the control has to support the com::sun::star::form::component::CommandButton + service.
+ +The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::form::component::CommandButton::ButtonType +*/ +published service CommandButton +{ + service com::sun::star::awt::UnoControlButton; + + /** allows external instances to register as veto listener for the button's actions. + +A com::sun::star::form::XApproveActionListener returning false on
+ it's approve-method will prevent any action which would usually be triggered - this includes
+ not only submitting or resetting forms, but also calling the
+ com::sun::star::awt::XActionListeners of the super service
+ This may be interesting for e.g. forms which want to provide input validation before submitting
+ data.
+
+ @see com::sun::star::form::component::HTMLForm
+ @see com::sun::star::form::XSubmit
+ @see com::sun::star::form::XReset
+ @see com::sun::star::awt::XButton
+ */
+ interface com::sun::star::form::XApproveActionBroadcaster;
+};
+
+
+}; }; }; }; };
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/form/control/CurrencyField.idl b/offapi/com/sun/star/form/control/CurrencyField.idl
new file mode 100644
index 0000000000..43b4dc1563
--- /dev/null
+++ b/offapi/com/sun/star/form/control/CurrencyField.idl
@@ -0,0 +1,44 @@
+/* -*- 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 .
+ */
+
+
+ module com { module sun { module star { module form { module control {
+
+
+/** describes a control which can be used for inputting currency values, and
+ which can (but not necessarily has to) be bound to a database field.
+
+
The model of the control has to support the com::sun::star::form::component::CurrencyField + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service CurrencyField +{ + service com::sun::star::awt::UnoControlCurrencyField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/DateField.idl b/offapi/com/sun/star/form/control/DateField.idl new file mode 100644 index 0000000000..861ee48bb1 --- /dev/null +++ b/offapi/com/sun/star/form/control/DateField.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for inputting date values, and + which can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::DateField + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service DateField +{ + service com::sun::star::awt::UnoControlDateField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/FilterControl.idl b/offapi/com/sun/star/form/control/FilterControl.idl new file mode 100644 index 0000000000..80a3646dbb --- /dev/null +++ b/offapi/com/sun/star/form/control/FilterControl.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a check box control which can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::CheckBox + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +service FilterControl : com::sun::star::awt::XControl +{ + createWithFormat([in] com::sun::star::awt::XWindow MessageParent, + [in] com::sun::star::util::XNumberFormatter NumberFormatter, + [in] com::sun::star::beans::XPropertySet ControlModel); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/FormattedField.idl b/offapi/com/sun/star/form/control/FormattedField.idl new file mode 100644 index 0000000000..e518530969 --- /dev/null +++ b/offapi/com/sun/star/form/control/FormattedField.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for inputting values with an arbitrary formatting, and + can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::FormattedField + service.
+ +In addition, this control can be used in HTML forms. It triggers the + com::sun::star::form::XSubmit::submit() method of the form it belongs to if + the enter key is pressed while it has the focus.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::util::XNumberFormatsSupplier +*/ +published service FormattedField +{ + service com::sun::star::awt::UnoControlFormattedField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/GridControl.idl b/offapi/com/sun/star/form/control/GridControl.idl new file mode 100644 index 0000000000..024f35be97 --- /dev/null +++ b/offapi/com/sun/star/form/control/GridControl.idl @@ -0,0 +1,114 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { + +published interface XGridControl; + +module control { + + +/** describes a table-like control for displaying data. + +The model of the control has to support the com::sun::star::form::component::GridControl + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service GridControl +{ + service com::sun::star::awt::UnoControl; + + /** allows committing the content of the active cell of the control. + */ + interface com::sun::star::form::XBoundComponent; + + /** allows access to the active cell within the grid. + +Only the column position can be modified using this interface, as the row position within + a table control bound to a data source is given implicitly (by the cursor position of the data source).
+ */ + interface com::sun::star::form::XGrid; + + [optional] interface com::sun::star::form::XGridControl; + + /** used to broadcast modifications made by the user (within the active cell) + */ + interface com::sun::star::util::XModifyBroadcaster; + + /** allows access to the field data of the grid's current row in different formats + */ + [optional] interface com::sun::star::form::XGridFieldDataSupplier; + + /** allows access to objects wrapping a single column + */ + interface com::sun::star::container::XIndexAccess; + + /** allows creation of an enumeration for the column objects + */ + interface com::sun::star::container::XEnumerationAccess; + + /** is used to switch the operating modes of the control. + +Besides the normal operation mode (which is used to display the database form's data) the control may + for instance support a filter mode.
+ */ + [optional] interface com::sun::star::util::XModeSelector; + + /** used to control the selection of rows in the grid control. + +The selection used with the methods com::sun::star::view::XSelectionSupplier::getSelection()
+ and com::sun::star::view::XSelectionSupplier::select() is a sequence of Any's.
+ Here the elements of the Sequence are the bookmarks (in the com::sun::star::sdb::RowSet)
+ of the (to-be-) selected rows.
A grid control can contain own UI elements for traveling within the database form it belongs to (This
+ concept seems to make sense, as a grid control - in opposite to other data aware controls - displays
+ not only one record at a time, but a larger number of records of the database form.)
+ With the help of this interface, external components which wish to handle such travelings themselves can
+ register interceptors for the actions in question.
Usual URLs to use include +
A concrete implementation of this service may offer more or less URLs, but if it offers some of the URLs + above, it must stick to the meanings defined above.
+ */ + [optional] interface com::sun::star::frame::XDispatchProviderInterception; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/GroupBox.idl b/offapi/com/sun/star/form/control/GroupBox.idl new file mode 100644 index 0000000000..d6cb04db50 --- /dev/null +++ b/offapi/com/sun/star/form/control/GroupBox.idl @@ -0,0 +1,41 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for visually grouping controls + +The model of the control has to support the com::sun::star::form::component::GroupBox + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service GroupBox +{ + service com::sun::star::awt::UnoControlGroupBox; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ImageButton.idl b/offapi/com/sun/star/form/control/ImageButton.idl new file mode 100644 index 0000000000..5a56c4fdcb --- /dev/null +++ b/offapi/com/sun/star/form/control/ImageButton.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for displaying images on a control acting like a button. + +The model of the control has to support the com::sun::star::form::component::ImageButton + service.
+ +The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::form::component::ImageButton::ButtonType +*/ +published service ImageButton +{ + service com::sun::star::awt::UnoControlImageControl; + + /** allows external instances to register as veto listener for the button's actions. + +A com::sun::star::form::XApproveActionListener returning false on
+ it's approve-method will prevent any action which would usually be triggered - this includes
+ not only submitting or resetting forms, but also calling the
+ com::sun::star::awt::XActionListeners of the super service
+ This may be interesting for e.g. forms which want to provide input validation before submitting
+ data.
+
+ @see com::sun::star::form::component::HTMLForm
+ @see com::sun::star::form::XSubmit
+ @see com::sun::star::form::XReset
+ @see com::sun::star::awt::XButton
+ */
+ interface com::sun::star::form::XApproveActionBroadcaster;
+};
+
+
+}; }; }; }; };
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/form/control/ImageControl.idl b/offapi/com/sun/star/form/control/ImageControl.idl
new file mode 100644
index 0000000000..5cdd472b2f
--- /dev/null
+++ b/offapi/com/sun/star/form/control/ImageControl.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/.
+ *
+ * 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 .
+ */
+
+
+ module com { module sun { module star { module form { module control {
+
+
+/** describes a control used for displaying images stored in a database.
+
+
The model of the control has to support the com::sun::star::form::component::DatabaseImageControl + service.
+ +If the model of the control is valid bound to a database field, the control allows + to select an image (browsing the file system) upon double clicking into it, + and forwards the URL of the chosen image to the ImageURL property of its model.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ImageControl +{ + service com::sun::star::awt::UnoControlImageControl; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/InteractionGridControl.idl b/offapi/com/sun/star/form/control/InteractionGridControl.idl new file mode 100644 index 0000000000..ea56cda626 --- /dev/null +++ b/offapi/com/sun/star/form/control/InteractionGridControl.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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** is an extended grid control, which allows the user to customize some of its user interface's aspects. +*/ +published service InteractionGridControl +{ + service com::sun::star::form::control::GridControl; + + /** allows access to the UI features of the control + +Though concrete implementations of the service may offer different sets of aspects which can be customized, + the following commands have, if supported, a defined meaning: +
The following parameters may be passed when dispatching the commands above (as before, concrete implementations + may extend this list): +
The model of the control has to support the com::sun::star::form::component::ListBox + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ListBox +{ + service com::sun::star::awt::UnoControlListBox; + + interface com::sun::star::form::XBoundControl; + + /** allows broadcasts of HTML-compatible change events. + +HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. +
The model of the control has to support the com::sun::star::form::component::NumericField + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service NumericField +{ + service com::sun::star::awt::UnoControlNumericField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/PatternField.idl b/offapi/com/sun/star/form/control/PatternField.idl new file mode 100644 index 0000000000..bb8ab8bb93 --- /dev/null +++ b/offapi/com/sun/star/form/control/PatternField.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting text complying to a given pattern, + and which can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::PatternField + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service PatternField +{ + service com::sun::star::awt::UnoControlPatternField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/RadioButton.idl b/offapi/com/sun/star/form/control/RadioButton.idl new file mode 100644 index 0000000000..dbe461b01c --- /dev/null +++ b/offapi/com/sun/star/form/control/RadioButton.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a radio button control which can (but not necessarily has to) be bound to a database field. + +The model of the control has to support the com::sun::star::form::component::RadioButton + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service RadioButton +{ + service com::sun::star::awt::UnoControlRadioButton; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/SubmitButton.idl b/offapi/com/sun/star/form/control/SubmitButton.idl new file mode 100644 index 0000000000..208e611720 --- /dev/null +++ b/offapi/com/sun/star/form/control/SubmitButton.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module control { + + +/** specifies a button control which can execute external submissions + +The model of the control has to support the com::sun::star::form::component::SubmitButton + service.
+ +The control is clickable. When clicked (by mouse or keyboard, or programmatically), + the following happens: +
The model of the control has to support the com::sun::star::form::component::TextField + service.
+ +In addition, this control can be used in HTML forms. It triggers the + com::sun::star::form::XSubmit::submit() method of the form it belongs to if + the enter is pressed while it has the focus.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service TextField +{ + service com::sun::star::awt::UnoControlEdit; + + interface com::sun::star::form::XBoundControl; + + /** allows broadcasts of HTML-compatible change events. + +HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. +
The model of the control has to support the com::sun::star::form::component::TimeField + service.
+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service TimeField +{ + service com::sun::star::awt::UnoControlTimeField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl b/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl new file mode 100644 index 0000000000..83225a614a --- /dev/null +++ b/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which is able to enhance the com::sun::star::form::component::CommandButton::ButtonType + and com::sun::star::form::component::CommandButton::TargetURL properties of a + com::sun::star::form::component::CommandButton. + +For this, the two properties are superseded by new versions, where as button type, additional + possible values are added for navigating the parent form of the button. For instance, in an + com::sun::star::inspection::ObjectInspector using this handler, the user will be able + to choose a button type saying "move to the next record", which, when chosen, well, moves the parent + database form of the button to the next record.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::component::CommandButton +*/ +service ButtonNavigationHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl b/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl new file mode 100644 index 0000000000..cbd4150488 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which is able to provide properties to bind a form component to a spreadsheet cell. + +The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a spreadsheet document (indicated by supporting the com::sun::star::sheet::XSpreadsheetDocument + interface), this document is used to create the com::sun::star::form::binding::ValueBindings + to bind the inspected object to cells in this document.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::table::CellValueBinding + @see com::sun::star::table::ListPositionCellBinding + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service CellBindingPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl b/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl new file mode 100644 index 0000000000..5c82e0e1d2 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a com::sun::star::inspection::XObjectInspectorModel for + inspecting form components, in particular all components implementing the FormComponent + service. + +A DefaultFormComponentInspectorModel provides the following handlers by default: +
First, the handler supersedes the HScroll and the VScroll properties of a com::sun::star::awt::UnoControlEditModel + and puts them into one common property, allowing the user to choose whether she want to + have "no", a "vertical", a "horizontal", or "both" scrollbars.
+ +
Second, if it detects a com::sun::star::form::component::RichTextControl to inspect, + it supersedes the com::sun::star::form::component::RichTextControl::RichText + and the com::sun::star::awt::UnoControlEditModel::MultiLine properties with a new + one which allows choosing the text type with one single action.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::awt::UnoControlEditModel + @see com::sun::star::form::component::RichTextControl + @see com::sun::star::form::component::TextField +*/ +service EditPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/EventHandler.idl b/offapi/com/sun/star/form/inspection/EventHandler.idl new file mode 100644 index 0000000000..f65ab9fae3 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/EventHandler.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which, for a com::sun::star::form::FormComponent, provides the script events + offered by this form component. + +For this, the parent of the form component, which by definition supports the com::sun::star::form::FormComponent + service, is examined for the com::sun::star::script::XEventAttacherManager interface.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::component::CommandButton + @see com::sun::star::form::FormComponents + @see com::sun::star::script::XEventAttacherManager +*/ +service EventHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl new file mode 100644 index 0000000000..88c33ba676 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl @@ -0,0 +1,34 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements the default property handler for all known types of com::sun::star::form::FormComponents. + + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::FormComponents +*/ +service FormComponentPropertyHandler : com::sun::star::inspection::XPropertyHandler; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl b/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl new file mode 100644 index 0000000000..bc8c8936b8 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties for button controls which support submission of XML forms. + +The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to examine the XML submissions which the button can be bound to.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::submission::XSubmission + @see com::sun::star::form::submission::XSubmissionProvider + @see com::sun::star::form::component::SubmitButton + @see com::sun::star::xforms::XSubmission + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service SubmissionPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl b/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl new file mode 100644 index 0000000000..4e10367e60 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties related to binding form control models to XForm bindings. + +The handler introduces new properties to choose a com::sun::star::xforms::XModel + and a com::sun::star::xforms::Binding within this model. Additionally, + it introduces properties which reflect the different facets of the binding (e.g. + com::sun::star::xforms::Binding::BindingExpression), so they can be changed + directly in the com::sun::star::inspection::ObjectInspector as if they were a + property of the form component which is being inspected.
+ +The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to do XML binding related work.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::xforms::Binding + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service XMLFormsPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl b/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl new file mode 100644 index 0000000000..bc6e2e514d --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.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 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties related to binding form control models to XForm bindings and validating + the form control content. + +By using an XMLFormsPropertyHandler, a com::sun::star::inspection::ObjectInspector + can be used to bind form components to com::sun::star::xforms::Binding instances. + Since those instances also support validating form control content (by supporting an + com::sun::star::form::validation::XValidator interface), it seems reasonable to + edit those validate-related properties (like the XSD data type to validate against) in the + com::sun::star::inspection::ObjectInspector, too. This is what an XSDValidationPropertyHandler + is good for.
+ +The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to do XML binding related work.
+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::forms::validation::ValidatableControlModel + @see com::sun::star::xforms::Binding + @see com::sun::star::xsd::XDataType + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service XSDValidationPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/modules.idl b/offapi/com/sun/star/form/modules.idl new file mode 100644 index 0000000000..6a9b556eef --- /dev/null +++ b/offapi/com/sun/star/form/modules.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 . + */ + +module com { module sun { module star { module form { + + /** collects functionality for binding form controls to external + data sources. + */ + module binding { }; + + /** collects form control model descriptions + */ + module component { }; + + /** collects form control descriptions + */ + module control { }; + + /** collects services for inspecting form/components + @see com::sun::star::inspection::ObjectInspector + @see com::sun::star::inspection + */ + module inspection { }; + + /** collects functionality needed during a form's runtime, e.g. + when it is active and interacts with the user. + */ + module runtime { }; + + /** collects functionality for submitting forms to external data sinks + */ + module submission { }; + + /** collects functionality to validate form components by help + of external validator instances + */ + module validation { }; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FeatureState.idl b/offapi/com/sun/star/form/runtime/FeatureState.idl new file mode 100644 index 0000000000..ebc160f0c6 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FeatureState.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/. + * + * 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** encapsulates the state of a FormFeature + + @see XFormOperations + + @since OOo 2.2 + */ +struct FeatureState +{ + /** determines whether the respective feature is enabled (i.e. available) + in the current state of the form. + */ + boolean Enabled; + + /** determines the state of the feature. The concrete semantics depends + on the concrete FormFeature. + */ + any State; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FilterEvent.idl b/offapi/com/sun/star/form/runtime/FilterEvent.idl new file mode 100644 index 0000000000..362bc44538 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FilterEvent.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** is an event fired by a filter controller, when the filter managed by the controller changes. + + @see XFilterController + + @since OOo 3.3 + */ +struct FilterEvent : ::com::sun::star::lang::EventObject +{ + /** denotes the index of the disjunctive term to which the event applies, if any. + */ + long DisjunctiveTerm; + + /** denotes the index of the filter component to which the event applies, if any. + */ + long FilterComponent; + + /** denotes the predicate expression associated with the event. + */ + string PredicateExpression; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormController.idl b/offapi/com/sun/star/form/runtime/FormController.idl new file mode 100644 index 0000000000..7bb44cdf6f --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormController.idl @@ -0,0 +1,33 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** specifies a component controlling the interaction between the user and multiple + form controls belonging to a single form. + */ +service FormController : XFormController; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormFeature.idl b/offapi/com/sun/star/form/runtime/FormFeature.idl new file mode 100644 index 0000000000..6a3ff83c43 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormFeature.idl @@ -0,0 +1,140 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** specifies the operations on a user interface form, as supported by the + XFormOperations interface. + + @since OOo 2.2 +*/ +constants FormFeature +{ + /** moves the form to a record given by absolute position. + +This operation cannot be executed without arguments. When executing it (i.e.
+ when calling com::sun::star::form::runtime::XFormOperations::executeWithArguments()),
+ you need to specify a parameter named Position of type long
, which
+ denotes the position to move the form to.
This is not strictly an operation you can do on a form, but rather a + state you can retrieve (and display to the user) using the XFormOperations's + respective methods.
+ +The state obtained here is a string, not a number. This is because in an UI
+ form, the fact that the current record count is not yet known (since not all
+ records have been visited, yet) is indicated by an asterisk (*
) besides
+ the record count.
For instance, if the currently active form control is bound to a table field
+ named Price
, and currently has a value of 100
, then invoking
+ the AutoFilter
operation will put an additional filter Price = 100
+ on the form.
Note that this does not apply to criteria which are part of the form's
+ data source. That is, if you bind the form to the SQL command SELECT * FROM
+ Articles WHERE Price > 100
, then the Price > 100
filter
+ will not be removed.
Effectively, this operation resets the com::sun::star::sdb::RowSet::Filter + and com::sun::star::sdb::RowSet::Order properties of the form.
+ */ + const short RemoveFilterAndSort = 18; + + /** refreshes the current control + +Basically, this means calling XRefreshable::refresh on the current control, if it supports + this interface.
+ + @since OOo 3.1 + */ + const short RefreshCurrentControl = 19; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormOperations.idl b/offapi/com/sun/star/form/runtime/FormOperations.idl new file mode 100644 index 0000000000..58c185eb30 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormOperations.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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** encapsulates operations on a database form which has a UI representation, + and is interacting with the user. + + @since OOo 2.2 + */ +service FormOperations : XFormOperations +{ + /** creates aFormOperations
instance which works on a com::sun::star::form::FormController
+ instance.
+ @throws IllegalArgumentException
+ if the given form controller is `NULL`, or does not have a model denoting a valid
+ com::sun::star::form::component::DataForm instance.
+ */
+ createWithFormController(
+ [in] XFormController Controller
+ )
+ raises(
+ ::com::sun::star::lang::IllegalArgumentException
+ );
+
+ /** creates a FormOperations
instance which works on a com::sun::star::form::component::DataForm
+ instance.
+
+ @throws IllegalArgumentException
+ if the given form is `NULL`, or does not support the com::sun::star::form::component::DataForm
+ service.
+ */
+ createWithForm(
+ [in] XForm Form
+ )
+ raises(
+ ::com::sun::star::lang::IllegalArgumentException
+ );
+};
+
+
+}; }; }; }; };
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl b/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl
new file mode 100644
index 0000000000..9c7aa43aed
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/XFeatureInvalidation.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 .
+ */
+
+
+module com { module sun { module star { module form { module runtime {
+
+
+/** implements a callback for a XFormOperations instance, which is called
+ when the state of one or more FormFeatures might have changed.
+
+ @see XFormOperations
+
+ @since OOo 2.2
+*/
+interface XFeatureInvalidation
+{
+ /** invalidates the given FormFeatures
+
+ Invalidation means that any user interface representation (such as toolbox buttons), or + any dispatches associated with the features in question are potentially out-of-date, and + need to be updated.
+ + @param Features + The set of features whose state might have changed. + */ + void invalidateFeatures( [in] sequence< short > Features ); + + /** invalidates all features + +This method is used of it cannot be exactly and reliably determined + which features might actually have changed their state. In this case, the callee + should assume all features it is interested in must be required.
+ */ + void invalidateAllFeatures(); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFilterController.idl b/offapi/com/sun/star/form/runtime/XFilterController.idl new file mode 100644 index 0000000000..477ff8cf1d --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterController.idl @@ -0,0 +1,164 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +interface XFilterControllerListener; + +/** provides access to a form based filter for a database form + +In a form based filter, form controls bound to a searchable database field are replaced with a control
+ which allows entering a search expression. This so-called predicate expression is basically a part of an
+ SQL WHERE
clause, but without the part denoting the database column. For instance, if you
+ have a form control bound to a table column named Name
, then entering the string
+ LIKE '%Smith%'
effectively constitutes a SQL WHERE
clause "Name" LIKE '%Smith%'
.
In the actual document view, there are usually some relaxations to this. For instance, keywords such as
+ LIKE
might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion,
+ the equality sign =
is usually omitted. However, this interface here provides programmatic access
+ to the form based filter, so those relaxations are not considered here.
The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL WHERE
+ class. That is, it is a disjunction of m terms, where each term is a conjunction of n clauses
+ of the form <column> <predicate> <literal>
or of the form <column>
+ IS [NOT] NULL
.
n equals the number of filter controls which the filter controller is responsible for. This number + doesn't change during one session of the form based filter. On the other hand, m, the number of disjunctive + terms, is dynamic.
+ + +With the above, there are potentially m * n predicate expressions (though usually only a fraction + of those will actually exist). Since in a form based filter, there are only n filter controls, and each + filter control displays exactly one predicate expression, this means that only a part of the complete + filter can be displayed, in particular, only one disjunctive term can be displayed at a time. Thus, + the filter controller knows the concept of an active term, denoted by the #ActiveTerm + attribute, controls which of the terms is currently displayed in the form controls.
+ + @see XFormController + @see com::sun::star::sdbc::XResultSetMetaData::isSearchable + @see com::sun::star::sdb::XSingleSelectQueryAnalyzer::getStructuredFilter + @see com::sun::star::sdb::SQLFilterOperator + + @since OOo 3.3 + */ +interface XFilterController +{ + /** registers a listener to be notified of certain changes in the form based filter. + +Registering the same listener multiple times results in multiple notifications of the same event, + and also requires multiple revocations of the listener. + */ + void addFilterControllerListener( [in] XFilterControllerListener Listener ); + + /** revokes a listener which was previously registered to be notified of certain changes in the form based filter. + */ + void removeFilterControllerListener( [in] XFilterControllerListener Listener ); + + /** is the number of filter components, or filter controls, which the filter controller is responsible + for. + +
This number is constant during one session of the form based filter.
+ */ + [attribute, readonly] long FilterComponents; + + /** is the number of disjunctive terms of the filter expression represented by the form based filter. + */ + [attribute, readonly] long DisjunctiveTerms; + + /** denotes the active term of the filter controller. + */ + [attribute] long ActiveTerm + { + set raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + }; + + /** sets a given predicate expression + + @param Component + denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than + #FilterComponents. + + @param Term + denotes the disjunctive term in which the expression is to be set. Must be greater than or equal to 0, + and smaller than #DisjunctiveTerms. + + @param PredicateExpression + denotes the predicate expression to set for the given filter component in the given term. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if one of the indexes is out of the allowed range + */ + void + setPredicateExpression( [in] long Component, [in] long Term, [in] string PredicateExpression ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the filter component with the given index. + +The filter control has the same control model as the control which it stands in for. Consequently, you can use this method
+ to obtain the database column which the filter control works on, by examining the control model's BoundField
+ property.
Each element of the returned sequence is a disjunctive term, having exactly #FilterComponents + elements, which denote the single predicate expressions of this term.
+ */ + sequence< sequence< string > > + getPredicateExpressions(); + + /** removes a given disjunctive term + + @param Term + the index of the term to remove. Must be greater than or equal to 0, and smaller than + #DisjunctiveTerms. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Term is out of the allowed range. + */ + void + removeDisjunctiveTerm( [in] long Term ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** appends an empty disjunctive term to the list of terms. + */ + void + appendEmptyDisjunctiveTerm(); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl new file mode 100644 index 0000000000..2931a0cfcb --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl @@ -0,0 +1,68 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** is implemented by components listening for events fired by an XFilterController. + + @since OOo 3.3 +*/ +interface XFilterControllerListener : ::com::sun::star::lang::XEventListener +{ + /** is fired when a single predicate expression of the filter represented by the filter + controller changed. + +FilterEvent::DisjunctiveTerm is the index of the disjunctive term in which the + expression changed. This usually equals XFilterController::ActiveTerm.
+ +FilterEvent::FilterComponent denotes the index of the filter component whose + predicate expression changed.
+ +FilterEvent::PredicateExpression is the new predicate expressions.
+ */ + void predicateExpressionChanged( [in] FilterEvent Event ); + + /** is fired when a disjunctive term was removed from the filter of the filter controller. + +FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + removed.
+ +FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.
+ */ + void disjunctiveTermRemoved( [in] FilterEvent Event ); + + /** is fired when a disjunctive term was added to the filter of the filter controller. + +FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + added.
+ +FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.
+ */ + void disjunctiveTermAdded( [in] FilterEvent Event ); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl new file mode 100644 index 0000000000..cc7e6e6956 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -0,0 +1,343 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module runtime { + +interface XFormOperations; +interface XFormControllerContext; + + +/** specifies a component controlling the interaction between the user and form functionality. + +As soon as a form (containing controls) is to be presented to the user,
+ there is a need for an instance controlling the user interaction.
+ Such a FormController
is responsible for dialog processing,
+ like controlling the tab order and the grouping of controls.
As a form may contain one or many subforms, a FormController may
+ contain one or more other FormControllers, so the form model structure or hierarchy
+ is reflected in the structure of FormControllers. That is, retrieving the parent of
+ the model of a controller will give you the same object as retrieving the model of the parent of
+ the controller. Similarly, retrieving the model of the n
th child of
+ a controller gives you the same object as retrieving the n
th child of
+ the model of the controller.
A controller is called active if one of the controls it is responsible for has the focus, + else inactive. To be notified whenever this activation state of a given controller changes, you can + add listeners.
+ +This interface supersedes the com::sun::star::form::FormController.
+ +A FormController is responsible for a com::sun::star::awt::UnoControlContainer, + and all controls therein.
+ +Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form + contains controls bound to a database, or to an external validator, then the form controller will + check their current value when the current record is to be saved to the database.
+ +First, it will check whether any controls with an external validator exist. If so, those validators + will be asked to validate the current control content. If this fails, the message provided by the validator + is displayed to the user, the control is focused, and the update of the record is vetoed.
+ +Second, the controls are examined for NULL values. If a control is bound to a database field which
+ is declared to be NOT NULL
, no auto-increment field, but still `NULL`, then an error
+ message is shown to the user saying that input is required, the respective control is focused, and
+ the update of the record is vetoed.
Note that you can present the second check - for database fields containing `NULL` values - on
+ a per-form and a per-database basis.
+ For the former, you need to add a boolean property FormsCheckRequiredFields
to the form
+ (aka the FormController
's model), using its
+ com::sun::star::beans::XPropertyContainer::addProperty() method, with a value
+ of `FALSE`.
+ For the latter, you need to set the respective property of the data source's Settings
+ (also named FormsCheckRequiredFields
) to `FALSE`.
Alternatively, you can prevent the check on a per-control basis, using the + DataAwareControlModel::InputRequired property of a single control model.
+ +If a control which the controller is responsible for supports the com::sun::star::frame::XDispatchProviderInterception + interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its + functionality to the controller by querying the dispatch interceptor for it.
+ +Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them, + there must be a guaranteed semantics. However, concrete implementations may support an arbitrary sub or super + set of these URLs.
+ +In general, all URLs start with the same prefix, namely .uno:FormController/. To this, a suffix is
+ appended which describes the requested functionality.
+ Example: The URL suffix for deleting the current record is deleteRecord, so the complete URL for
+ requesting a dispatcher for this functionality is .uno:FormController/deleteRecord.
Some URLs may require parameters. For this, the sequence of com::sun::star::beans::PropertyValues + passed to the com::sun::star::frame::XDispatch::dispatch() call is used - every property value is + used as one named parameter.
+ +For all URLs, interested parties can register as status listeners (com::sun::star::frame::XStatusListener)
+ at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or
+ disabled.
+ For instance, the URL with the suffix moveToFirst is associated with moving the form to the first
+ record, and it will be disabled in case the form is already positioned on the first record.
URL suffix | +functionality | +
positionForm | +positions the form on a record given by absolute number. + There's one parameter for this functionality, named Position, which must be a long + value specifying the absolute position to which the form should be moved |
+
RecordCount | +This is a passive functionality: It cannot be dispatched, instead, interested parties may
+ use the dispatcher to add as com::sun::star::frame::XStatusListener, and be
+ notified when the record count changes. + The status value which is being notified (com::sun::star::frame::FeatureStateEvent::State) + is a string which can be used to display the record count. In particular, if the record count is not yet known + (com::sun::star::sdb::RowSet::IsRowCountFinal is `FALSE`), this is indicated in the + string, too. |
+
moveToFirst | +moves the form to the first record | +
moveToPrev | +moves the form to the record preceding the current one | +
moveToNext | +moves the form to the record after the current one | +
moveToLast | +moves the form to the last record | +
moveToNew | +moves the form to the virtual "insert row", where new records can be inserted | +
saveRecord | +Commits any potentially pending changes in the current control, and saves the current record to + the database, or inserts a new record if the form is currently positioned on the virtual insertion row. | +
undoRecord | +reverts the changes done to the current record. Basically, this means refreshing the + current row from the database, and updating all controls with the new content. | +
deleteRecord | +deletes the current record, after asking the user for confirmation. | +
refreshForm | +reloads the complete form. After this, the form is positioned on the first record | +
sortUp | +Adds an order clause to the form, to sort it ascending by the field which the current control is bound to, + and then reloads the form. | +
sortDown | +Adds an order clause to the form, to sort it descending by the field which the current control is bound to, + and then reloads the form. | +
sort | +opens a dialog, which allows the user to manipulate the current sorting order of the form. If the dialog + is closed with OK, the form is reloaded after setting the new sorting order. | +
autoFilter | +creates, from the current control, a filter for the form. This is, if the current control is bound to + the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'" + is created and set at the form. After this, the form is reloaded. | +
filter | +opens a dialog, which allows the user to manipulate the current filter of the form. If the dialog + is closed with OK, the form is reloaded after setting the new filter. | +
applyFilter | +Toggles the com::sun::star::sdb::RowSet::ApplyFilter property + of the form. +Additionally, status listeners will be provided with the current (boolean) state of this property + in the com::sun::star::frame::FeatureStateEvent::State member of the event + notified by the dispatcher. |
+
removeFilterOrder | +completely removes any filter and sorting order from the form, and reloads it. | +
The model obtained via com::sun::star::awt::XTabController::getModel() is the form for which the + controller is responsible.
+ */ + interface ::com::sun::star::awt::XTabController; + + /** allows access to the parent controller. + */ + interface ::com::sun::star::container::XChild; + + /** allows access to the sub controllers. + */ + interface ::com::sun::star::container::XIndexAccess; + + /** allows enumerating sub controllers + */ + interface ::com::sun::star::container::XEnumerationAccess; + + /** allows life time control of the controller. + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to register as listener for modifications in the controls which the controller is responsible + for. + */ + interface ::com::sun::star::util::XModifyBroadcaster; + + /** used to notify deletions of data in the form before they happen. + +A form controller listens for deletion events at the form it is responsible for. If and only if no + com::sun::star::form::XConfirmDeleteListener is registered at + the controller, it uses an own dialog to ask the user for confirmation.
+ */ + interface ::com::sun::star::form::XConfirmDeleteBroadcaster; + + /** is used to notify errors which happen in the form the controller is responsible for. + +A form controller listens for error events at the form it is responsible for. If and only if no + com::sun::star::sdb::XSQLErrorListener is registered at the controller, it + uses an own dialog to notify the user of the error.
+ + */ + interface ::com::sun::star::sdb::XSQLErrorBroadcaster; + + /** is used for multiplexing row set events happening on the form which the controller is responsible for. + */ + interface ::com::sun::star::sdb::XRowSetApproveBroadcaster; + + /** is used broadcasting parameter events in the form. + +A form controller listens for parameter events at the form it is responsible for. If and only if no + com::sun::star::form::XDatabaseParameterListener is registered at the controller, it + uses an own dialog to ask the user for parameter values.
+ */ + interface ::com::sun::star::form::XDatabaseParameterBroadcaster2; + + /** allows switching the form controller to different operation modes. + + +The two modes usually (but not necessarily) supported by a form controller are the DataMode
+ and the FilterMode
, where the former is the usual modus operandi for displaying and modifying
+ data, and the latter is a special mode to enter a filter for the database form which the controller is
+ responsible for.
If the form controller supports a form based filter mode, then it shall also + support the XFilterController interface, which allows controlling this mode.
+ */ + [optional] interface XFilterController; + + /** denotes the instance which is used to implement operations on the form which the controller + works for. + +This instance can be used, for instance, to determine the current state of certain form features.
+ */ + [attribute, readonly] XFormOperations FormOperations; + + /** provides access to the currently active control + */ + [attribute, readonly] ::com::sun::star::awt::XControl CurrentControl; + + /** allows to delegate certain tasks to the context of the form controller + */ + [attribute] XFormControllerContext Context; + + /** used (if not `NULL`) for user interactions triggered by the form controller. + */ + [attribute] ::com::sun::star::task::XInteractionHandler InteractionHandler; + + /** adds the specified listener to receive notifications whenever the activation state of + the controller changes. + */ + void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener Listener ); + + /** removes the specified listener from the list of components to receive notifications whenever the activation + state of the controller changes. + */ + void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener Listener ); + + /** adds a controller to the list of child controllers + @throws ::com::sun::star::lang::IllegalArgumentException + if the given controller is `NULL`, or cannot rightfully be a child controller. Since controllers + mirror the hierarchy of the forms the are responsible for, this means that the form of the given + child controller must be a child of the controller at which the method is invoked. + */ + void addChildController( [in] XFormController ChildController ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFormControllerContext.idl b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl new file mode 100644 index 0000000000..d4f439ffeb --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormControllerContext.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 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** provides a context for a FormController + +A FormController knows about the controls it is responsible
+ for, and about the control container which those controls live in. However, it doesn't know
+ about a possible larger context, like a scrollable view which the controls are embedded into.
+ To compensate this, it can be provided a XFormControllerContext
.
This instance allows for operations on a user interface form, by saving its clients + from various tedious and error-prone operations.
+ +As an example, imagine you have a database form, displayed in some user
+ interface, which you want to move to the next record.
+ It is as easy as calling com::sun::star::sdbc::XResultSet::next()
+ on this form, right? Wrong. First, you need to care for saving the current
+ record, so the user doesn't lose her input. So you need to call
+ com::sun::star::sdbc::XResultSetUpdate::updateRow() or
+ com::sun::star::sdbc::XResultSetUpdate::insertRow(), depending
+ on the form's com::sun::star::sdb::RowSet::IsNew property.
+ But then you're done, right? Wrong, again.
+ When the user just entered some data into one of the form fields, but did not yet
+ leave this field, then the data is not yet committed to the form, not to talk
+ about being committed to the underlying database. So, before everything else,
+ you would need to obtain the active control of the form, and commit it.
+ Now you're done ...
As another example, consider that you want to delete the current record from the + form. You have to take into account any com::sun::star::form::XConfirmDeleteListeners + registered at the com::sun::star::form::FormController or the + com::sun::star::form::component::DataForm.
+ +If you agree that this is ugly to do and maintain, then XFormOperations
+ is for you. It provides an execute() method, which will do all of the above
+ for you; plus some similar convenient wrappers for similar functionality.
Note that it is possible to operate on a user interface form without + actually having access to the form controller instance. However, in this + case some functionality will not be available. In particular, every feature + which relies on the active control of the controller might be of limited use.
+ */ + [attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller; + + /** retrieves the current state of the given feature + +You would usually use this to update some user interface to reflect this state.
+ For instance, you could imagine a toolbar button which is associated with a given feature.
+ This button would be enabled if and only if the respective feature is currently
+ available, and be checked if and only if the feature state is a boolean
+ evaluating to `TRUE`.
+
+ @param Feature
+ the feature whose state is to be determined. Must be one of the FormFeature
+ constants.
+ An invalid value here will be silently ignored, and simply return a FeatureState
+ indicating disabled with a `NULL` state.
Calling this is equivalent to calling getState(), and evaluating the + FeatureState::Enabled member.
+ + @param Feature + the feature whose state is to be determined. Must be one of the FormFeature + constants.This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsNew property of the form.
+ + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs obtaining the form property + */ + boolean isInsertionRow( + ) + raises ( ::com::sun::star::lang::WrappedTargetException ); + + /** determines whether the current row of the form is modified + +This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsModified property of the form.
+ + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs obtaining the form property + */ + boolean isModifiedRow( + ) + raises ( ::com::sun::star::lang::WrappedTargetException ); + + /** denotes the instance which should be notified about features whose state might have changed. + +If this attribute is not `NULL`, the instance which it denotes will be notified + whenever the state of any supported feature might have changed.
+ +For instance, imagine a form whose current row has just been moved to another + record, using the execute() method. This means that potentially, the state + of all movement-related features might have changed.
+ +Note that the instance does not actually notify changes in the feature states, but only + potential changes: It's up to the callee to react on this appropriately. This is + since OpenOffice.org's application framework features own mechanisms to cache and invalidate + feature states, so we do not burden this implementation here with such mechanisms.
+ + @see FormFeature + */ + [attribute] XFeatureInvalidation FeatureInvalidation; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmission.idl b/offapi/com/sun/star/form/submission/XSubmission.idl new file mode 100644 index 0000000000..d4ddd35f2b --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmission.idl @@ -0,0 +1,84 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module submission { + +interface XSubmissionVetoListener; + + +/** is implemented by components which support submitting data. +*/ +interface XSubmission : com::sun::star::uno::XInterface +{ + /** tells the component to submit data + + @throws com::sun::star::util::VetoException + if the submission has been vetoed. Usually, this indicates that not all + requirements for the submission, e.g. data consistency, are fulfilled. + + @throws com::sun::star::lang::WrappedTargetException + if an error occurred during invoking the submission target + */ + void submit( ) + raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); + + /** tells the component to submit data + + @param aHandler + This handler allows additional user interaction, which may be necessary before + the submission can be performed. + + @throws com::sun::star::util::VetoException + if the submission has been vetoed. Usually, this indicates that not all + requirements for the submission, e.g. data consistency, are fulfilled. + + @throws com::sun::star::lang::WrappedTargetException + if an error occurred during invoking the submission target + */ + void submitWithInteraction( [in] com::sun::star::task::XInteractionHandler aHandler ) + raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); + + /** registers the given listener to be notified when a submission occurs + + @param listener + the listener to register + + @throws com::sun::star::lang::NoSupportException + when the component does not support external components vetoing the submission + */ + void addSubmissionVetoListener( [in] XSubmissionVetoListener listener ) + raises ( com::sun::star::lang::NoSupportException ); + + /** revokes a listener which has previously been registered to be notified when a submission occurs + + @param listener + the listener to revoke + + @throws com::sun::star::lang::NoSupportException + when the component does not support external components vetoing the submission + */ + void removeSubmissionVetoListener( [in] XSubmissionVetoListener listener ) + raises ( com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmissionSupplier.idl b/offapi/com/sun/star/form/submission/XSubmissionSupplier.idl new file mode 100644 index 0000000000..1776ea7bf3 --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionSupplier.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 . + */ + + +module com { module sun { module star { module form { module submission { + +interface XSubmission; + + +/** is implemented by a component which allows access to a component which can + submit data. + + @see XSubmission +*/ +interface XSubmissionSupplier : com::sun::star::uno::XInterface +{ + /** specifies the XSubmission instance to which the submission + request should be delegated. + */ + [attribute] XSubmission Submission; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl b/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl new file mode 100644 index 0000000000..eab12b96f2 --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module submission { + + +/** is implement by components which want to observe (and probably veto) the + submission of data. + + @see XSubmission +*/ +interface XSubmissionVetoListener : com::sun::star::lang::XEventListener +{ + /** is invoked when a component, at which the listener has been registered, + is about to submit its data. + + @param event + The submission event. The com::sun::star::lang::EventObject::Source + member of the structure describes the component which is about to submit its data. + + @throws com::sun::star::util::VetoException + when the submission is vetoed. com::sun::star::uno::Exception::Message + should contain a justification for the veto then. + */ + void submitting( [in] com::sun::star::lang::EventObject event ) + raises ( com::sun::star::util::VetoException ); + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl b/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl new file mode 100644 index 0000000000..87aa9a9019 --- /dev/null +++ b/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.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 . + */ + +module com { module sun { module star { module form { module validation { + +/** specifies a control model which supports both binding to an external value supplier, + and to an external validator. + +There are two methods how the value which is represented by a control model + can interact with other components (well, except the trivial ones accessible + by using com::sun::star::beans::XPropertySet): +
The ValidatableBindableControlModel services describes the interaction of these concepts + for control models which support both of them.
+*/ +service ValidatableBindableControlModel +{ + /** specifies support for validating the current value of the control + */ + service ValidatableControlModel; + + /** specifies support for binding the control value to an external component + +If a value binding is established at the control model (by using
+ com::sun::star::form::binding::XBindableValue::setValueBinding() with a non-`NULL`
+ binding), this binding is analyzed for validation support. If it is present (read: if the
+ binding also supports the XValidator interface), the binding is also
+ established as validator, as if it has been passed to XValidatable::setValidator().
+ If, while this binding is active (in both its roles as value binding and validator),
+ an attempt is made to establish another validator, this is blocked with raising a
+ com::sun::star::util::VetoException upon calling XValidatable::setValidator().
Validatable control models support setting a validator with dynamic + validity constraints, and broadcasting changes in their value as well as the + validity of their value.
+*/ +service ValidatableControlModel +{ + /** specifies the basic functionality for a form control model + +Via this service, validatable control models inherit the
+ com::sun::star::util::XCloneable interface.
+ If a validatable control model, at which a validator has been set (via
+ XValidatable::setValidator()), is being cloned, then the
+ validator is also set at the clone. Effectively, this means that
+ both control model instances share the same validator instance.
Setting and retrieving the current validator of the control model is + possible via the XValidatable interface (which + XValidatableFormComponent is derived from).
+ +Easy access to the current value of the control, as well as it's validity + (relative to the active validator), is provided by the methods XValidatableFormComponent::isValid() + and XValidatableFormComponent::getCurrentValue().
+ +Note that the type of the value provided by XValidatableFormComponent::getCurrentValue() + is not specified here, but depends on the concrete control type.
+ */ + interface XValidatableFormComponent; + + /** enables support for validators with dynamic validity constraints. + +As soon as a validator is set via XValidatable::setValidator(), the validatable + control model registers itself as listener. If the validity constraint of the validator + changes, the ValidatableControlModel re-validates its current valid, and + broadcasts any resulting changes to all its XFormComponentValidityListener, if + necessary.
+ */ + interface XValidityConstraintListener; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl b/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl new file mode 100644 index 0000000000..5114f337f6 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl @@ -0,0 +1,41 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module validation { + + +/** is the listener interface to be notified of changes of a XValidatableFormComponent +*/ +interface XFormComponentValidityListener : com::sun::star::lang::XEventListener +{ + /** called when the validity and/or the value of the form component at which the listener + is registered changed. + + @param Source + The member com::sun::star::lang::EventObject::Source + represents the XValidatableFormComponent whose validity, value, or text changed. + */ + void componentValidityChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidatable.idl b/offapi/com/sun/star/form/validation/XValidatable.idl new file mode 100644 index 0000000000..be7d27f7a6 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatable.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 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XValidator; + + +/** specifies support for validating a component + + @see XValidator +*/ +interface XValidatable : com::sun::star::uno::XInterface +{ + /** sets an external instance which is able to validate the component + +Any previously active validator will be revoked - there can be only one!
+ + @param Validator + the new validator which is to be used by the component. May be `NULL`, + in this case only the current validator is revoked. + + @throws com::sun::star::util::VetoException + if changing the validator is not allowed in the current component state + */ + void setValidator( [in] XValidator Validator ) + raises ( com::sun::star::util::VetoException ); + + /** retrieves the external instance which is currently used to validate the component + */ + XValidator + getValidator( ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl b/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl new file mode 100644 index 0000000000..f797ef2521 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl @@ -0,0 +1,100 @@ +/* -*- 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 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XFormComponentValidityListener; + + +/** is a convenience interface for accessing several aspects of a form component + which supports validation. + +A validatable form component has two aspects which other parties might + be interested in: +
An XValidatableFormComponent allows to easily access both of these aspects.
+ +Note that all of the information provided at this interface can also obtained by other means, + but much more inconveniently.
+ + @see XValidatable + @see XValidator +*/ +interface XValidatableFormComponent : XValidatable +{ + /** determines whether the current value of the component passed the validity test + at the validator. + +Calling this is equal to calling XValidator::isValid() with + the current value (see getCurrentValue()) of the component, where + the validator is obtained via XValidatable::getValidator().
+ +If no validator has been set (XValidatable::setValidator()), this method + returns true.
+ */ + boolean isValid(); + + /** retrieves the current value of the component. + +The type of the current value, as well as it's semantics, depend on the service + implementing this interface.
+ +Again, this is a convenience method. For example, for a com::sun::star::form::component::FormattedField, + calling this method is equivalent to retrieving the + com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveValue.
+ +If no validator has been set (XValidatable::setValidator()), the value returned + here is defined by the service implementing this interface.
+ */ + any getCurrentValue(); + + /** registers the given listener. + +XFormComponentValidityListeners are called whenever any of the aspects + of the validatable form component (the validity flag, or the value) changed.
+ + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void addFormComponentValidityListener( [in] XFormComponentValidityListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** registers the given listener. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void removeFormComponentValidityListener( [in] XFormComponentValidityListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidator.idl b/offapi/com/sun/star/form/validation/XValidator.idl new file mode 100644 index 0000000000..a46db60045 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidator.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 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XValidityConstraintListener; + + +/** specifies a component able to validate (the content of) other components + +Validators support simple validity checks and retrieving justifications for + invalidity.
+ +Validators may additionally support dynamic validity constraints. In such a case,
+ the validity of a given value may change, without the value changing itself.
+ To be notified about this, interested components should register as XValidityConstraintListener.
+
+ @see XValidatable
+*/
+interface XValidator : com::sun::star::uno::XInterface
+{
+ /** determines whether the given value is valid
+
+ @param Value
+ the value to check for validity
+ @return
+ `TRUE` if and only if the value is considered valid.
+ */
+ boolean isValid( [in] any Value );
+
+ /** retrieves a justification for the invalidity of the given value
+
+ @param Value
+ the value which has been recognized as being invalid
+ @return
+ a human-readable string, which explains why the given value is considered invalid.
+ */
+ string explainInvalid( [in] any Value );
+
+ /** registers the given validity listener.
+
+
Usually, an XValidatable instance will also add itself as validity listener, + as soon as the validator is introduced to it.
+ +Implementations which do not support dynamic validity constraints should simply ignore this + call.
+ + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + @see XValidityConstraintListener + */ + void addValidityConstraintListener( [in] XValidityConstraintListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** revokes the given validity listener + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + @see XValidityConstraintListener + */ + void removeValidityConstraintListener( [in] XValidityConstraintListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidityConstraintListener.idl b/offapi/com/sun/star/form/validation/XValidityConstraintListener.idl new file mode 100644 index 0000000000..dad86ef2eb --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidityConstraintListener.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 . + */ + + +module com { module sun { module star { module form { module validation { + + +/** specifies an interface for listening for changes in the validity constraints + represented by an XValidator. +*/ +interface XValidityConstraintListener : com::sun::star::lang::XEventListener +{ + /** called when the validity constraint represented by an XValidator, + at which the listener is registered, changed. + + @param Source + The event source. The member com::sun::star::lang::EventObject::Source + represents the validator component whose validity constraint changed. + */ + void validityConstraintChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3