diff options
Diffstat (limited to 'offapi/com/sun/star/form')
172 files changed, 12270 insertions, 0 deletions
diff --git a/offapi/com/sun/star/form/ControlFontDialog.idl b/offapi/com/sun/star/form/ControlFontDialog.idl new file mode 100644 index 000000000..7936f6110 --- /dev/null +++ b/offapi/com/sun/star/form/ControlFontDialog.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_ControlFontDialog_idl__ +#define __com_sun_star_form_ControlFontDialog_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> + + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.1 + */ +published service ControlFontDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createWithGridModel([in] com::sun::star::beans::XPropertySet GridModel); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/DataAwareControlModel.idl b/offapi/com/sun/star/form/DataAwareControlModel.idl new file mode 100644 index 000000000..d2d40017f --- /dev/null +++ b/offapi/com/sun/star/form/DataAwareControlModel.idl @@ -0,0 +1,173 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_DataAwareControlModel_idl__ +#define __com_sun_star_form_DataAwareControlModel_idl__ + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XBoundComponent.idl> + +#include <com/sun/star/form/XLoadListener.idl> + +#include <com/sun/star/form/XReset.idl> + +#include <com/sun/star/beans/XPropertySet.idl> + + + + module com { module sun { module star { module form { + + +/** is an abstract service for specialized FormControlModels + which are data aware and thus can be bound to a data source. + + <p>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.</p> + */ +published service DataAwareControlModel +{ + service com::sun::star::form::FormControlModel; + + /** makes it possible to transfer the data of the model to the connected data field. + <p> + 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). + </p> + */ + [optional] interface com::sun::star::form::XBoundComponent; + + + /** must be implemented in order to recognize when the containing form of the model connects + to its data source (loads its data). After loading the form, the model may bind to its + related field source.<br/> + This interface will seldom be used directly from outside. + */ + interface com::sun::star::form::XLoadListener; + + + /** Each DataAwareControlModel should be resettable for setting default values. + + <p>In the context of a control model which is data-aware, the semantics of <em>default value</em> + (see XReset) is as follows:<br/> + 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.<br/> + In all other cases, the model is reset to the default value as specified by the respective property.</p> + + <p>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. + </p> + + <p>In the context of a com::sun::star::form::component::DataForm, controls are + automatically reset when one of the following applies + <ul><li>The form is reset by invoking its XReset interface.</li> + <li>The form moves to a new record.</li> + <li>The changes in the current record of the form are undone</li> + </ul> + </p> + */ + interface com::sun::star::form::XReset; + + + /** specifies the name of the bound database field. + + <p>This property makes sense in the <em>context</em> 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.<br/> + This member here describes the column of this result set which the control should act for.</p> + + <p>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.</p> + + @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. + + <p>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 <code>InputRequired</code> property.</p> + + @since OOo 3.1 + */ + [optional, property] boolean InputRequired; + + + /** references to the cursor field to which the control is bound. + <p>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. + </p> + @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. + <p>Any user interface action which needs to refer to the control is assumed to use this + property. <br/> + 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.<br/> + 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. + </p> + <p>When setting the property, a number of constraints apply: + <ul> + <li>The object which is to be set has to support the following interfaces + <ul><li>com::sun::star::awt::XControlModel</li> + <li>com::sun::star::lang::XServiceInfo</li> + <li>com::sun::star::beans::XPropertySet</li> + <li>com::sun::star::container::XChild</li> + </ul> + </li> + <li>It has to be a part of the same document as the model who's property is to be modified.</li> + <li>Additionally, the support of a special service, indicating that the model is of the right type, + is required. Which kind of service is in the request depends on the type of the control model.<br/> + + For instance, text fields (com::sun::star::form::component::TextField) can be + labeled by label controls only (com::sun::star::form::component::FixedText), + and radio buttons (com::sun::star::form::component::RadioButton) can be labeled + by group boxes (com::sun::star::form::component::GroupBox) only. + </li> + </ul> + </p> + */ + [property] com::sun::star::beans::XPropertySet LabelControl; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/DataSelectionType.idl b/offapi/com/sun/star/form/DataSelectionType.idl new file mode 100644 index 000000000..ab8acb907 --- /dev/null +++ b/offapi/com/sun/star/form/DataSelectionType.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 . + */ +#ifndef __com_sun_star_form_DataSelectionType_idl__ +#define __com_sun_star_form_DataSelectionType_idl__ + + + + module com { module sun { module star { module form { + +/** describes the type of datasource used for a form. + <p>Please do <em><b>not</b></em> use anymore, this enum is deprecated. + @deprecated + */ +published enum DataSelectionType +{ + TABLE, + QUERY, + SQL, + SQLPASSTHROUGH + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..cbcdbd8b1 --- /dev/null +++ b/offapi/com/sun/star/form/DatabaseDeleteEvent.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 . + */ +#ifndef __com_sun_star_form_DatabaseDeleteEvent_idl__ +#define __com_sun_star_form_DatabaseDeleteEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** is fired if a database record is going to be deleted. + <p>Please do <em><b>not</b></em> use anymore, this struct is deprecated. + @deprecated + */ +published struct DatabaseDeleteEvent: com::sun::star::lang::EventObject +{ + sequence<any> Bookmarks; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/DatabaseParameterEvent.idl b/offapi/com/sun/star/form/DatabaseParameterEvent.idl new file mode 100644 index 000000000..344fa2543 --- /dev/null +++ b/offapi/com/sun/star/form/DatabaseParameterEvent.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 . + */ +#ifndef __com_sun_star_form_DatabaseParameterEvent_idl__ +#define __com_sun_star_form_DatabaseParameterEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + +#include <com/sun/star/container/XIndexAccess.idl> + + + + module com { module sun { module star { module form { + + +/** is fired if values for parameters are needed. + */ +published struct DatabaseParameterEvent: com::sun::star::lang::EventObject +{ + /** specifies the list of parameters which are required for opening a result set. + + <p>Usually, a com::sun::star::form::component::DataForm fires this + event when loading the form requires parameters to be filled in.</p> + + <p>Every parameter object supports the com::sun::star::beans::XPropertySet + interface, and at least the properties <em>Name</em> and <em>Value</em></p> + + @see com::sun::star::sdb::RowSet + @see com::sun::star::form::component::DataForm + */ + com::sun::star::container::XIndexAccess Parameters; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/ErrorEvent.idl b/offapi/com/sun/star/form/ErrorEvent.idl new file mode 100644 index 000000000..757591e0e --- /dev/null +++ b/offapi/com/sun/star/form/ErrorEvent.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 . + */ +#ifndef __com_sun_star_form_ErrorEvent_idl__ +#define __com_sun_star_form_ErrorEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + +/** occurs in case of fired database exceptions triggered by + a database form. + <p>Please do <em><b>not</b></em> use anymore, this struct is deprecated. + @deprecated + */ +published struct ErrorEvent: com::sun::star::lang::EventObject +{ + any Reason; + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..33ad392c8 --- /dev/null +++ b/offapi/com/sun/star/form/FormButtonType.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 . + */ +#ifndef __com_sun_star_form_FormButtonType_idl__ +#define __com_sun_star_form_FormButtonType_idl__ + + + + 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 + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..e6abc2e04 --- /dev/null +++ b/offapi/com/sun/star/form/FormComponent.idl @@ -0,0 +1,104 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_FormComponent_idl__ +#define __com_sun_star_form_FormComponent_idl__ + +#include <com/sun/star/form/XFormComponent.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/container/XNamed.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/io/XPersistObject.idl> +#include <com/sun/star/beans/XPropertyBag.idl> + + + + 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. + <p>This interface also provides the access to the component's parent.</p> + */ + interface com::sun::star::form::XFormComponent; + + + /** allows life-time control of form components. + */ + interface com::sun::star::lang::XComponent; + + + /** Each FormComponent must supply a name for identification. + */ + interface com::sun::star::container::XNamed; + + /** gives access to the properties. + */ + interface com::sun::star::beans::XPropertySet; + + + /** Each FormComponent must be able to be stored into and read from a stream. + */ + interface com::sun::star::io::XPersistObject; + + /** allows to associate arbitrary properties with the form component + + <p>Every concrete form component - i.e. every service which includes + the <code>FormComponent</code> service - has a set of properties which + are available as long as the component lives - the so-called <em>static + properties</em>.</p> + + <p>Additionally, you can add more properties to the component as needed, + using the com::sun::star::beans::XPropertyContainer interface. + Those properties are called <em>dynamic properties</em>.</p> + + <p>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.</p> + + <p>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.</p> + + @since OOo 2.3 + */ + [optional] interface com::sun::star::beans::XPropertyBag; + + + /** the name of the component. + + <p>Note that the name accessed here is the same as when using the + com::sun::star::container::XNamed interface.</p> + */ + [property] string Name; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormComponentType.idl b/offapi/com/sun/star/form/FormComponentType.idl new file mode 100644 index 000000000..cc5b361f8 --- /dev/null +++ b/offapi/com/sun/star/form/FormComponentType.idl @@ -0,0 +1,131 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_FormComponentType_idl__ +#define __com_sun_star_form_FormComponentType_idl__ + + + + module com { module sun { module star { module form { + + +/** These constants specify the class types used to identify a component. + */ +published constants FormComponentType +{ + + /** This generic identifier is for controls which cannot be identified by + another specific identifier. + */ + const short CONTROL = 1; + + /** specifies a control that is used to begin, interrupt, or end a process. + */ + const short COMMANDBUTTON = 2; + + /** specifies a control that acts like a radio button. Grouped together, such radio buttons + present a set of two or more mutually exclusive choices to the user. + */ + const short RADIOBUTTON = 3; + + /** specifies a control that displays an image that responds to mouse clicks. + */ + const short IMAGEBUTTON = 4; + + /** specifies a control that is used to check or uncheck to turn an option on or off. + */ + const short CHECKBOX = 5; + + /** specifies a control that displays a list from which the user can select one or more items. + */ + const short LISTBOX = 6; + + /** specifies a control that is used when a list box combined with a static text control or an edit + control is needed. + */ + const short COMBOBOX = 7; + + /** specifies a control that displays a frame around a group of controls with or without a caption. + */ + const short GROUPBOX = 8; + + /** specifies a control that is a text component that allows for the editing of a single line of text. + */ + const short TEXTFIELD = 9; + + /** specifies a control to display a fixed text, usually used to label other controls. + */ + const short FIXEDTEXT = 10; + + /** is a table like control to display database data. + */ + const short GRIDCONTROL = 11; + + /** specifies a control which can be used to enter text, extended by an (user-startable) file dialog + to browse for files. + */ + const short FILECONTROL = 12; + + /** specifies a control that should not be visible. + */ + const short HIDDENCONTROL = 13; + + /** specifies a control to display an image. + */ + const short IMAGECONTROL = 14; + + /** specifies a control to display and edit a date value. + */ + const short DATEFIELD = 15; + + /** specifies a control to display and edit a time value. + */ + const short TIMEFIELD = 16; + + /** specifies a field to display and edit a numeric value. + */ + const short NUMERICFIELD = 17; + + /** specifies a field to display and edit a currency value. + */ + const short CURRENCYFIELD = 18; + + /** specifies a control to display and edit a string according to a pattern. + */ + const short PATTERNFIELD = 19; + + /** specifies a control to display and edit, in the form of a scrollbar, a value from a continuous value range + */ + const short SCROLLBAR = 20; + + /** specifies a control to edit, in the form of a spin field, a value from a continuous range of values + */ + const short SPINBUTTON = 21; + + /** specifies a control which provides controller functionality for the com::sun::star::form::component::DataForm + it belongs to, such as functionality to navigate or filter this form. + */ + const short NAVIGATIONBAR = 22; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormComponents.idl b/offapi/com/sun/star/form/FormComponents.idl new file mode 100644 index 000000000..cb1189957 --- /dev/null +++ b/offapi/com/sun/star/form/FormComponents.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 . + */ +#ifndef __com_sun_star_form_FormComponents_idl__ +#define __com_sun_star_form_FormComponents_idl__ + +#include <com/sun/star/container/XNameContainer.idl> +#include <com/sun/star/container/XIndexContainer.idl> +#include <com/sun/star/container/XEnumerationAccess.idl> +#include <com/sun/star/container/XContainer.idl> +#include <com/sun/star/script/XEventAttacherManager.idl> + + + module com { module sun { module star { module form { + + +/** specifies the capabilities of a collection of FormComponents. + + <p>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.</p> + + @see FormComponent + */ +published service FormComponents +{ + /** 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; + + /** gives access to the elements by index. + */ + interface com::sun::star::container::XIndexContainer; + + /** creates an enumeration of the elements. + */ + interface com::sun::star::container::XEnumerationAccess; + + /** This interface has to be implemented to supply the scripting environment + for the contained components. + + <p>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.</p> + + <p>For instance, at any time you can obtain the events associated with + the <code>n</code><sup>th</sup> + element in the form components by calling + com::sun::star::script::XEventAttacherManager::getScriptEvents() + with parameter <code>n</code>. In particular, this invariant is always met, even after you + inserted/removed elements into/from the container.</p> + */ + interface com::sun::star::script::XEventAttacherManager; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormControlModel.idl b/offapi/com/sun/star/form/FormControlModel.idl new file mode 100644 index 000000000..edb04ed68 --- /dev/null +++ b/offapi/com/sun/star/form/FormControlModel.idl @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_FormControlModel_idl__ +#define __com_sun_star_form_FormControlModel_idl__ + +#include <com/sun/star/awt/UnoControlModel.idl> + +#include <com/sun/star/form/FormComponent.idl> + +#include <com/sun/star/beans/XFastPropertySet.idl> + +#include <com/sun/star/beans/XPropertyState.idl> + + + + module com { module sun { module star { module form { + + +/** specifies a control model within a form. + + <p>Note that the model-view-paradigm is used for form controls, too.</p> + */ +published service FormControlModel +{ + service com::sun::star::awt::UnoControlModel; + + service com::sun::star::form::FormComponent; + + /** This optional interface gives an efficient access to all + properties at once or an ability to set more than one property at once. + */ + [optional] interface com::sun::star::beans::XFastPropertySet; + + + /** This optional interface gives access to the state of the + properties, e.g. whether a default value + is to be used or not for a certain property. + */ + [optional] interface com::sun::star::beans::XPropertyState; + + + /** specifies the ID for classification of the component. + @see FormComponentType + */ + [readonly, property] short ClassId; + + + /** determines the relative taborder of the control associated with the model. + + <p>The default -1 is used to indicate that the tab-order of this control should be + determined automatically.</p> + + <p>Each component which supports a tabstop must provide a + FormControlModel::TabIndex property.</p> + + <p>Normally, a FormController instance is evaluating this property.</p> + */ + [optional, property] short TabIndex; + + + /** used for additional information. + <p>No semantics is given for this property, it will usually be used by the creator of a document + containing form controls.</p> + */ + [property] string Tag; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormController.idl b/offapi/com/sun/star/form/FormController.idl new file mode 100644 index 000000000..c49dc71f3 --- /dev/null +++ b/offapi/com/sun/star/form/FormController.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 . + */ +#ifndef __com_sun_star_form_FormController_idl__ +#define __com_sun_star_form_FormController_idl__ + +#include <com/sun/star/form/XFormController.idl> + +#include <com/sun/star/awt/XTabController.idl> + +#include <com/sun/star/container/XChild.idl> + +#include <com/sun/star/lang/XComponent.idl> + +#include <com/sun/star/container/XEnumerationAccess.idl> + +#include <com/sun/star/util/XModifyBroadcaster.idl> +#include <com/sun/star/form/XConfirmDeleteBroadcaster.idl> +#include <com/sun/star/sdb/XSQLErrorBroadcaster.idl> +#include <com/sun/star/sdb/XRowSetApproveBroadcaster.idl> + +#include <com/sun/star/form/XDatabaseParameterBroadcaster.idl> +#include <com/sun/star/form/FormControllerDispatcher.idl> + + + module com { module sun { module star { module form { + +/** is superseded by com::sun::star::form::runtime::FormController. + @deprecated +*/ +published service FormController +{ + [optional] service FormControllerDispatcher; + // [optional, property] ::com::sun::star::form::runtime::XFormOperations FormOperations; is not published + + /** is used for notifying the (de)activation of the controller. + */ + interface com::sun::star::form::XFormController; + + interface com::sun::star::awt::XTabController; + interface com::sun::star::container::XChild; + interface com::sun::star::lang::XComponent; + interface com::sun::star::container::XEnumerationAccess; + interface com::sun::star::util::XModifyBroadcaster; + interface com::sun::star::form::XConfirmDeleteBroadcaster; + interface com::sun::star::sdb::XSQLErrorBroadcaster; + interface com::sun::star::sdb::XRowSetApproveBroadcaster; + interface com::sun::star::form::XDatabaseParameterBroadcaster; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormControllerDispatcher.idl b/offapi/com/sun/star/form/FormControllerDispatcher.idl new file mode 100644 index 000000000..159d787da --- /dev/null +++ b/offapi/com/sun/star/form/FormControllerDispatcher.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 . + */ +#ifndef __com_sun_star_form_FormControllerDispatcher_idl__ +#define __com_sun_star_form_FormControllerDispatcher_idl__ + +#include <com/sun/star/frame/XDispatchProvider.idl> + + +module com { module sun { module star { module form { + + +/** is not used anymore, and superseded by com::sun::star::form::runtime::FormController and + com::sun::star::form::runtime::FormOperations. + + @deprecated + */ +published service FormControllerDispatcher +{ + [optional] interface com::sun::star::frame::XDispatchProvider; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormSubmitEncoding.idl b/offapi/com/sun/star/form/FormSubmitEncoding.idl new file mode 100644 index 000000000..eab682723 --- /dev/null +++ b/offapi/com/sun/star/form/FormSubmitEncoding.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_FormSubmitEncoding_idl__ +#define __com_sun_star_form_FormSubmitEncoding_idl__ + + + + module com { module sun { module star { module form { + + +/** specify the MIME encoding to be used when form data is submitted. + */ +published enum FormSubmitEncoding +{ + /** Specifies to use "application/x-www-form-urlencoded" as submit encoding. + <p>Usually used if the FormSubmitMethod attribute has the value POST. + </p> + */ + URL, + + + /** Specifies to use "multipart/form-data" as submit encoding. + <p>Usually used when the form contains a file upload element.</p> + */ + MULTIPART, + + + /** specifies to use "text/plain" + <p>Usually used if the FormSubmitMethod attribute has the value POST and + the content should be reviewed as full text.</p> + */ + TEXT +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormSubmitMethod.idl b/offapi/com/sun/star/form/FormSubmitMethod.idl new file mode 100644 index 000000000..6c339ab43 --- /dev/null +++ b/offapi/com/sun/star/form/FormSubmitMethod.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 . + */ +#ifndef __com_sun_star_form_FormSubmitMethod_idl__ +#define __com_sun_star_form_FormSubmitMethod_idl__ + + + + module com { module sun { module star { module form { + + +/** specifies how information is sent to a program invoked by submitting a form. + */ +published enum FormSubmitMethod +{ + + /** specifies to append the input information of a form to the target + URL as parameters. + */ + GET, + + + /** specifies to send the input information in a data body. + */ + POST + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/Forms.idl b/offapi/com/sun/star/form/Forms.idl new file mode 100644 index 000000000..4619f3f36 --- /dev/null +++ b/offapi/com/sun/star/form/Forms.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 . + */ +#ifndef __com_sun_star_form_Forms_idl__ +#define __com_sun_star_form_Forms_idl__ + +#include <com/sun/star/form/XForms.idl> + + + module com { module sun { module star { module form { + + +/** specifies the capabilities of a collection of forms. + + <p>Basically, a Forms is a FormComponents, + with the additional restriction that the contained elements support the + com::sun::star::form::component::Form service.</p> + + @see com::sun::star::form::component::Form + */ +published service Forms : XForms; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/ListSourceType.idl b/offapi/com/sun/star/form/ListSourceType.idl new file mode 100644 index 000000000..5d4a00b76 --- /dev/null +++ b/offapi/com/sun/star/form/ListSourceType.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 . + */ +#ifndef __com_sun_star_form_ListSourceType_idl__ +#define __com_sun_star_form_ListSourceType_idl__ + + + + module com { module sun { module star { module form { + + +/** describes the kind of data source used to fill the list data of a listbox or a combobox control. + @see com::sun::star::form::component::ListBox + @see com::sun::star::form::component::ComboBox + */ +published enum ListSourceType +{ + + /** The control should be filled with a list of string values. + */ + VALUELIST, + + + /** The control should be filled with the data of a table. + */ + TABLE, + + + /** The control should be filled with the results of a database query. + */ + QUERY, + + + /** The control should be filled with the results of a database statement. + */ + SQL, + + + /** The control should be filled with the results of a database statement, + which is not evaluated by the database engine. + */ + SQLPASSTHROUGH, + + + /** The control should be filled with the field names of a database table. + */ + TABLEFIELDS + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/NavigationBarMode.idl b/offapi/com/sun/star/form/NavigationBarMode.idl new file mode 100644 index 000000000..5056f11ca --- /dev/null +++ b/offapi/com/sun/star/form/NavigationBarMode.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 . + */ +#ifndef __com_sun_star_form_NavigationBarMode_idl__ +#define __com_sun_star_form_NavigationBarMode_idl__ + + + + module com { module sun { module star { module form { + + +/** describes in which way the navigation of the records of a database form is performed. + */ +published enum NavigationBarMode +{ + + /** no navigation bar is provided and navigation on the current + form is only possible with the keyboard (TAB/SHIFT TAB). + + <p>Note that when this mode is set, a simultaneous TabulatorCycle + value of TabulatorCycle::CURRENT means that you cannot travel + between records anymore.</p> + + @see TabulatorCycle + */ + NONE, + + + /** a navigation bar is provided and navigation will be performed + on the current/active form. + <p>This is the default and most often encountered mode.</p> + */ + CURRENT, + + + /** a navigation bar is provided and navigation will be performed + on the parent of the current/active form. + + <p>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. + </p> + */ + PARENT + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/PropertyBrowserController.idl b/offapi/com/sun/star/form/PropertyBrowserController.idl new file mode 100644 index 000000000..4e9c3d894 --- /dev/null +++ b/offapi/com/sun/star/form/PropertyBrowserController.idl @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_PropertyBrowserController_idl__ +#define __com_sun_star_form_PropertyBrowserController_idl__ + +#include <com/sun/star/frame/XController.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/beans/XFastPropertySet.idl> +#include <com/sun/star/beans/XMultiPropertySet.idl> + + + module com { module sun { module star { module form { + + +/** describes a controller which can be used to browse and modify properties of form controls. + + <p>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</p> + + <p>For using a PropertyBrowserController, you need to + <ul><li>instantiate it at a service factory of your choice</li> + <li>attach it to an empty frame of your choice</li> + <li>set the IntrospectedObject property to the control model which you wish to analyze</li> + </ul> + </p> + + @code{.java} + XFrame xFrame = getNewEmptyFrame(); + XMultiServiceFactory xORB = getORB(); + XPropertySet xControlModel = getMyControlModel(); + + // instantiate the controller + XController xController = (XController)UnoRuntime.queryInterface( XController.class, + xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) ); + + // marry the controller and the frame. This will cause the controller + // to create a visual component within the frame to inspect our object + xController.attachFrame( xFrame ) + + // tell the controller which object to inspect + XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface( + XPropertySet.class, xController ); + + xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel ); + @endcode + + @see com::sun::star::frame::XController + + @deprecated + <p>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.</p> + +*/ +published service PropertyBrowserController +{ + /** contains the object to inspect. + + <p>Changing this property from outside causes the controller to update its view + with the data of the new object</p> + */ + [property] com::sun::star::beans::XPropertySet IntrospectedObject; + + /** controls the actually visible page. + + <p>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.<br> + 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).<br/> + With this property, it can be controller which page is currently active.</p> + + <p>Valid values are (this list may be extended in the future): + <ul><li>Generic</li> + <li>Data</li> + <li>Events</li> + </ul></p> + */ + [property] string CurrentPage; + + /** ensures the basic functionality for a controller. + + <p>With supporting this interface, the component is able to operate in (and provide content + for) a com::sun::star::frame::XFrame.</p> + */ + 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; +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..bbe960071 --- /dev/null +++ b/offapi/com/sun/star/form/TabOrderDialog.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 . + */ +#ifndef __com_sun_star_form_TabOrderDialog_idl__ +#define __com_sun_star_form_TabOrderDialog_idl__ + +#include <com/sun/star/awt/XTabControllerModel.idl> +#include <com/sun/star/awt/XControlContainer.idl> +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> + + + +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); +}; + +}; }; }; }; + +#endif + +/* 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 000000000..f6ab1e94a --- /dev/null +++ b/offapi/com/sun/star/form/TabulatorCycle.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 . + */ +#ifndef __com_sun_star_form_TabulatorCycle_idl__ +#define __com_sun_star_form_TabulatorCycle_idl__ + + + + module com { module sun { module star { module form { + + +/** specifies how the TAB key should be used in a form. + + <p>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.</p> + + <p>Note that the TabulatorCycle determines what happens when SHIFT-TAB + is pressed on the <em>first</em> control of a form, as well as when TAB is pressed on the + <em>last</em> control.</p> + + <p><em>First</em> and <em>last</em> refers to the tabbing order of controls.</p> + + @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 + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..5ea712382 --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionBroadcaster.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XApproveActionBroadcaster_idl__ +#define __com_sun_star_form_XApproveActionBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XApproveActionListener.idl> + + + + module com { module sun { module star { module form { + + +/** allows to probably veto actions to be performed on components. + + <p> Usually, a component which supports the + XApproveActionBroadcaster interface implements + com::sun::star::awt::XActionListener as well.</p> + */ +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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..4814f58dd --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionListener.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 . + */ +#ifndef __com_sun_star_form_XApproveActionListener_idl__ +#define __com_sun_star_form_XApproveActionListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** can be implemented to listen and probably veto actions to be performed on components. + + <p>An example for an action would be the click of a + CommandButton.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..9789ede3a --- /dev/null +++ b/offapi/com/sun/star/form/XBoundComponent.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 . + */ +#ifndef __com_sun_star_form_XBoundComponent_idl__ +#define __com_sun_star_form_XBoundComponent_idl__ + +#include <com/sun/star/form/XUpdateBroadcaster.idl> + + + + module com { module sun { module star { module form { + + +/** specifies a (form) component which is bound to a data source. + + <p>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).<br/> + 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.</p> + + <p>A commit may fail if an XUpdateListener vetoes the it.</p> + + @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(); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..e92a82cb3 --- /dev/null +++ b/offapi/com/sun/star/form/XBoundControl.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XBoundControl_idl__ +#define __com_sun_star_form_XBoundControl_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + + + 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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..23f2d3165 --- /dev/null +++ b/offapi/com/sun/star/form/XChangeBroadcaster.idl @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XChangeBroadcaster_idl__ +#define __com_sun_star_form_XChangeBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XChangeListener.idl> + + + + module com { module sun { module star { module form { + + +/** provides functionality to notify listeners of data changes. + + <p>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.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..72b009e90 --- /dev/null +++ b/offapi/com/sun/star/form/XChangeListener.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XChangeListener_idl__ +#define __com_sun_star_form_XChangeListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** is the listener interface for receiving notifications about data changes. + + <p>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.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..123bfb77d --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.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 . + */ +#ifndef __com_sun_star_form_XConfirmDeleteBroadcaster_idl__ +#define __com_sun_star_form_XConfirmDeleteBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XConfirmDeleteListener.idl> + + + + 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 + + <p>XConfirmDeleteListener::confirmDelete() is called before a + deletion is performed. You may use the event to write your own confirmation messages.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..c5364bdff --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteListener.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 . + */ +#ifndef __com_sun_star_form_XConfirmDeleteListener_idl__ +#define __com_sun_star_form_XConfirmDeleteListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/sdb/RowChangeEvent.idl> + + + 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 ); +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..eec7b9c4b --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XDatabaseParameterBroadcaster_idl__ +#define __com_sun_star_form_XDatabaseParameterBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XDatabaseParameterListener.idl> + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. + <p>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.</p> + */ +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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..660dd03cb --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XDatabaseParameterBroadcaster2_idl__ +#define __com_sun_star_form_XDatabaseParameterBroadcaster2_idl__ + +#include <com/sun/star/form/XDatabaseParameterBroadcaster.idl> + + +module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. + + <p>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.</p> + + @see XDatabaseParameterBroadcaster + @see com::sun::star::script::XEventAttacher +*/ +interface XDatabaseParameterBroadcaster2: XDatabaseParameterBroadcaster +{ + /** registers an XDatabaseParameterListener + + <p>This method behaves exactly as the XDatabaseParameterBroadcaster::addParameterListener() + method inherited from the base interface.</p> + */ + void addDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + + + /** revokes an XDatabaseParameterListener + + <p>This method behaves exactly as the XDatabaseParameterBroadcaster::removeParameterListener() + method inherited from the base interface.</p> + */ + void removeDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..c536f6d0e --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterListener.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XDatabaseParameterListener_idl__ +#define __com_sun_star_form_XDatabaseParameterListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/form/DatabaseParameterEvent.idl> + + + + 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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..ec4cc7049 --- /dev/null +++ b/offapi/com/sun/star/form/XDeleteListener.idl @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XDeleteListener_idl__ +#define __com_sun_star_form_XDeleteListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** This is the listener interface for receiving "approveDelete" and + "deleted" events posted by a database form. + + <p> "approveDelete" may be used to abort a deletion of the current data + record.</p> + + <p>Please do <em><b>not</b></em> use anymore, this interface is superseded + by com::sun::star::form::XConfirmDeleteListener.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..cf8212bd4 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorBroadcaster.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XErrorBroadcaster_idl__ +#define __com_sun_star_form_XErrorBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XErrorListener.idl> + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving database error events. + + <p>Please do <em><b>not</b></em> use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorBroadcaster.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..ca1497723 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorListener.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XErrorListener_idl__ +#define __com_sun_star_form_XErrorListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/form/ErrorEvent.idl> + + + + module com { module sun { module star { module form { + + +/** used to be notified when errors in a database form happen. + + <p>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.</p> + + <p>Please do <em><b>not</b></em> use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorListener.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..4964ab1cd --- /dev/null +++ b/offapi/com/sun/star/form/XForm.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 . + */ +#ifndef __com_sun_star_form_XForm_idl__ +#define __com_sun_star_form_XForm_idl__ + +#include <com/sun/star/form/XFormComponent.idl> + + + + module com { module sun { module star { module form { + + +/** identifies a FormComponent as being a (sub-) form. + + <p>This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.</p> + + @see XFormComponent + */ +published interface XForm: com::sun::star::form::XFormComponent +{ +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..14c6a8a0f --- /dev/null +++ b/offapi/com/sun/star/form/XFormComponent.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 . + */ +#ifndef __com_sun_star_form_XFormComponent_idl__ +#define __com_sun_star_form_XFormComponent_idl__ + +#include <com/sun/star/container/XChild.idl> + + + + module com { module sun { module star { module form { + + +/** describes a component which may be part of a form. + + <p>This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.</p> + + @see XForm + */ +published interface XFormComponent: com::sun::star::container::XChild +{ +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..43c3fb708 --- /dev/null +++ b/offapi/com/sun/star/form/XFormController.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 . + */ +#ifndef __com_sun_star_form_XFormController_idl__ +#define __com_sun_star_form_XFormController_idl__ + +#include <com/sun/star/awt/XTabController.idl> + +#include <com/sun/star/awt/XControl.idl> + +#include <com/sun/star/form/XFormControllerListener.idl> + + + + 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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..2d4262747 --- /dev/null +++ b/offapi/com/sun/star/form/XFormControllerListener.idl @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XFormControllerListener_idl__ +#define __com_sun_star_form_XFormControllerListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** allows to be notified when the activation status of a FormController changes. + + <p> A form controller is activated if a form control gains the + focus and none of its controls currently owned the focus before.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..276127e1b --- /dev/null +++ b/offapi/com/sun/star/form/XForms.idl @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XForms_idl__ +#define __com_sun_star_form_XForms_idl__ + +#include <com/sun/star/container/XNameContainer.idl> +#include <com/sun/star/container/XIndexContainer.idl> +#include <com/sun/star/container/XEnumerationAccess.idl> +#include <com/sun/star/container/XContainer.idl> +#include <com/sun/star/container/XChild.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/script/XEventAttacherManager.idl> +#include <com/sun/star/util/XCloneable.idl> + + +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. + + <p>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.</p> + + <p>For instance, at any time you can obtain the events associated with + the <code>n</code><sup>th</sup> + element in the form components by calling + com::sun::star::script::XEventAttacherManager::getScriptEvents() + with parameter <code>n</code>. In particular, this invariant is always met, even after you + inserted/removed elements into/from the container.</p> + */ + interface com::sun::star::script::XEventAttacherManager; // ->XInterface + + interface com::sun::star::container::XChild; + + interface com::sun::star::util::XCloneable; + + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormsSupplier.idl b/offapi/com/sun/star/form/XFormsSupplier.idl new file mode 100644 index 000000000..11ba114f5 --- /dev/null +++ b/offapi/com/sun/star/form/XFormsSupplier.idl @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XFormsSupplier_idl__ +#define __com_sun_star_form_XFormsSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameContainer.idl> + + + + module com { module sun { module star { module form { + + +/** provides the access to a collection of forms. + */ +published interface XFormsSupplier: com::sun::star::uno::XInterface +{ + + /** accesses the forms. + + @code{.bas} + REM ***** BASIC ***** + + Sub createColorSelectionBox + ' create a new shape + xShape = thisComponent.createInstance( "com.sun.star.drawing.ControlShape" ) + Dim aPos as new com.sun.star.awt.Point + aPos.X = 200 + aPos.Y = 100 + xShape.Position = aPos + Erase aPos + Dim aSize as new com.sun.star.awt.Size + aSize.Width = 2500 + aSize.Height = 5000 + xShape.Size = aSize + Erase aSize + + ' create a combo box model + xControlModel = thisComponent.createInstance( "com.sun.star.form.component.ComboBox" ) + xControlModel.Name = "ColorSelection" + xControlModel.Text = "red" + + ' marry the shape and the model + xShape.Control = xControlModel + + if ( 0 = thisComponent.DrawPage.Forms.getCount() ) Then + xForm = thisComponent.createInstance( "com.sun.star.form.component.DataForm" ) + xForm.Name = "SampleForm" + thisComponent.DrawPage.Forms.insertByIndex( 0, xForm ) + End If + ' insert the control model into the first form of the forms collection of the + ' draw page of the document + thisComponent.DrawPage.Forms.getByIndex(0).insertByIndex( 0, xControlModel ) + thisComponent.DrawPage.add( xShape ) + End Sub + @endcode + + @returns + the container of all the top-level forms belonging to the component. + */ + com::sun::star::container::XNameContainer getForms(); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormsSupplier2.idl b/offapi/com/sun/star/form/XFormsSupplier2.idl new file mode 100644 index 000000000..034a3d084 --- /dev/null +++ b/offapi/com/sun/star/form/XFormsSupplier2.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 . + */ + +#ifndef __com_sun_star_form_XFormsSupplier2_idl__ +#define __com_sun_star_form_XFormsSupplier2_idl__ + +#include <com/sun/star/form/XFormsSupplier.idl> + + +module com { module sun { module star { module form { + + +/** extends the XFormsSupplier with convenience methods +*/ +interface XFormsSupplier2: XFormsSupplier +{ + /** determines whether there are currently forms available at all + + <p>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.</p> + + <p>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.</p> + */ + boolean hasForms(); +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..1d35cde51 --- /dev/null +++ b/offapi/com/sun/star/form/XGrid.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XGrid_idl__ +#define __com_sun_star_form_XGrid_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + + + 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. + + <p>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 <em>current + row</em> 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.<br/> + The current column of a grid control, whoever, can be freely controlled.</p> + + @see com::sun::star::form::component::GridControl + @see com::sun::star::form::control::GridControl + @deprecated + */ +published interface XGrid: com::sun::star::uno::XInterface +{ + + /** retrieves the current column position. + */ + short getCurrentColumnPosition(); + + + /** sets the current column position. + */ + void setCurrentColumnPosition( [in] short nPos ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGridColumnFactory.idl b/offapi/com/sun/star/form/XGridColumnFactory.idl new file mode 100644 index 000000000..1341cab16 --- /dev/null +++ b/offapi/com/sun/star/form/XGridColumnFactory.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 . + */ +#ifndef __com_sun_star_form_XGridColumnFactory_idl__ +#define __com_sun_star_form_XGridColumnFactory_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/lang/IllegalArgumentException.idl> + + + + module com { module sun { module star { module form { + + +/** allows to create columns to be added into a grid control model. + + <p>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.</p> + + @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. + */ + sequence<string> getColumnTypes(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGridControl.idl b/offapi/com/sun/star/form/XGridControl.idl new file mode 100644 index 000000000..64429682e --- /dev/null +++ b/offapi/com/sun/star/form/XGridControl.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 . + */ + +#ifndef __com_sun_star_form_XGridControl_idl__ +#define __com_sun_star_form_XGridControl_idl__ + +#include <com/sun/star/form/XGrid.idl> +#include <com/sun/star/form/XGridControlListener.idl> +#include <com/sun/star/form/XGridFieldDataSupplier.idl> + + +module com { module sun { module star { module form { + + +/** specifies (some) functionality provided by a grid control (aka table control) + + @since OOo 3.1 + */ +interface XGridControl +{ + /** allows access to the current column position within the grid control + */ + interface XGrid; + + /** registers a listener which is to be notified about state changes in + the grid control + */ + void addGridControlListener( [in] XGridControlListener listener ); + + /** revokes a previously registered grid control listener + */ + void removeGridControlListener( [in] XGridControlListener listener ); + + /// provides access to the data in the control, even in non-current rows + interface XGridFieldDataSupplier; +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGridControlListener.idl b/offapi/com/sun/star/form/XGridControlListener.idl new file mode 100644 index 000000000..faced1471 --- /dev/null +++ b/offapi/com/sun/star/form/XGridControlListener.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 . + */ + +#ifndef __com_sun_star_form_XGridControlListener_idl__ +#define __com_sun_star_form_XGridControlListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + + +module com { module sun { module star { module form { + + +/** specifies a listener which is to be notified about state changes in a grid control + + @see XGridControl + @since OOo 3.1 + */ +interface XGridControlListener : ::com::sun::star::lang::XEventListener +{ + /** called when the current column in a grid control changed + @see XGrid::getCurrentColumnPosition + */ + void columnChanged( [in] ::com::sun::star::lang::EventObject event ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGridFieldDataSupplier.idl b/offapi/com/sun/star/form/XGridFieldDataSupplier.idl new file mode 100644 index 000000000..7a26b1a13 --- /dev/null +++ b/offapi/com/sun/star/form/XGridFieldDataSupplier.idl @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XGridFieldDataSupplier_idl__ +#define __com_sun_star_form_XGridFieldDataSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/reflection/XIdlClass.idl> + + + + module com { module sun { module star { module form { + + +/** provides access to the data of a GridControl + + <p>You can retrieve the data type information and the data in a row.</p> + + <p>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.</p> + + @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. + + <p>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.<br/> + To check if the type you need is supported by the columns, use this method.</p> + + @return + A sequence of boolean flags. Each flag corresponds to the respective column, and `TRUE` indicates + that the column content can be retrieved in the requested format, `FALSE` denies this. + + @see XGridColumnFactory + @see DataAwareControlModel + @see XGridFieldDataSupplier::queryFieldData + */ + sequence<boolean> queryFieldDataType( [in] type xType ); + + /** retrieves the actual column data for the given row + + <p>If a column does not support the requested type, `NULL` is returned at the respective + position.</p> + + @see XGridFieldDataSupplier::queryFieldDataType + */ + sequence<any> queryFieldData( [in] long nRow, + [in] type xType ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGridPeer.idl b/offapi/com/sun/star/form/XGridPeer.idl new file mode 100644 index 000000000..0cede6e57 --- /dev/null +++ b/offapi/com/sun/star/form/XGridPeer.idl @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XGridPeer_idl__ +#define __com_sun_star_form_XGridPeer_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XIndexContainer.idl> + + + + module com { module sun { module star { module form { + + +/** represents the window peer of a GridControl and allows you to set + and retrieve the model data. + + <p>Usually, the columns used are the columns as supplied by the grid control model.</p> + + <p>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...</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..15bfc298a --- /dev/null +++ b/offapi/com/sun/star/form/XImageProducerSupplier.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 . + */ +#ifndef __com_sun_star_form_XImageProducerSupplier_idl__ +#define __com_sun_star_form_XImageProducerSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/awt/XImageProducer.idl> + + + + 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(); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..4965895d8 --- /dev/null +++ b/offapi/com/sun/star/form/XInsertListener.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XInsertListener_idl__ +#define __com_sun_star_form_XInsertListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about insertions into a database form. + + <p>Please do <em><b>not</b></em> 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.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..1ee89d5d5 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadListener.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 . + */ +#ifndef __com_sun_star_form_XLoadListener_idl__ +#define __com_sun_star_form_XLoadListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** receives load-related events from a loadable object. + + <p>The interface is typically implemented by data-bound components, + which want to listen to the data source that contains their database + form.</p> + + @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. + <p>Components may use this to stop any other event processing related to + the event source before the object is unloaded.</p> + + @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. + + <p>Components may use this to stop any other event processing related + to the event source until they get the reloaded event.</p> + + @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 ); +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..1edf9d086 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadable.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XLoadable_idl__ +#define __com_sun_star_form_XLoadable_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XLoadListener.idl> + + + module com { module sun { module star { module form { + + +/** provides functionality to implement objects which may be loaded. + + <p>The object is typically implemented by high-level objects which can connect to a data source.</p> + + @see XLoadListener + */ +published interface XLoadable: com::sun::star::uno::XInterface +{ + + /** loads the data. + + <p>If the data is already loaded (->isLoaded), then the method returns silently. + In this case, you should use ->reload.</p> + */ + void load(); + + + /** unloads the data. + */ + void unload(); + + + /** does a smart refresh of the object. + + <p>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.</p> + */ + 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 ); +}; + +}; }; }; }; + +#endif + +/* 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 000000000..c8d81aed0 --- /dev/null +++ b/offapi/com/sun/star/form/XPositioningListener.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 . + */ +#ifndef __com_sun_star_form_XPositioningListener_idl__ +#define __com_sun_star_form_XPositioningListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about cursor movements into a database form. + + <p>Please do <em><b>not</b></em> 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.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..5dceab73b --- /dev/null +++ b/offapi/com/sun/star/form/XReset.idl @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XReset_idl__ +#define __com_sun_star_form_XReset_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XResetListener.idl> + + + + module com { module sun { module star { module form { + + +/** provides functionality to reset components to some default values. + + <p>The semantics of <em>default value</em> depends on the providing service.</p> + */ +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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..2d5b242cb --- /dev/null +++ b/offapi/com/sun/star/form/XResetListener.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 . + */ +#ifndef __com_sun_star_form_XResetListener_idl__ +#define __com_sun_star_form_XResetListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** is the interface for receiving notifications about reset events. + + <p>The listener is called if a component implementing the + XReset interface performs a reset.<br> + Order of events: + <ul><li>a reset is triggered on a component</li> + <li>the component calls XReset::approveReset() on all its listeners</li> + <li>if all listeners approve the reset operation, the data is reset</li> + <li>the component calls XReset::resetted() on all its listeners</li> + </ul> + </p> + + @see XReset + */ +published interface XResetListener: com::sun::star::lang::XEventListener +{ + + /** is invoked before a component is reset. + + @param rEvent + the event happened. + + @returns + `TRUE` when reset was approved, `FALSE` when the reset operation should be canceled. + */ + boolean approveReset( [in] com::sun::star::lang::EventObject rEvent ); + + + /** is invoked when a component has been reset. + + @param rEvent + the event happened. + */ + void resetted( [in] com::sun::star::lang::EventObject rEvent ); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XRestoreListener.idl b/offapi/com/sun/star/form/XRestoreListener.idl new file mode 100644 index 000000000..cfd40d25f --- /dev/null +++ b/offapi/com/sun/star/form/XRestoreListener.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XRestoreListener_idl__ +#define __com_sun_star_form_XRestoreListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** receives notifications about data being restored. + + <p>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.</p> + + <p>Please do <em><b>not</b></em> 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</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..acb935bd1 --- /dev/null +++ b/offapi/com/sun/star/form/XSubmit.idl @@ -0,0 +1,83 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XSubmit_idl__ +#define __com_sun_star_form_XSubmit_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/awt/XControl.idl> + +#include <com/sun/star/awt/MouseEvent.idl> + +#include <com/sun/star/form/XSubmitListener.idl> + + + + module com { module sun { module star { module form { + + +/** provides functionality to submit data from a component. + + <p>Usually, this is used by com::sun::star::form::component::HTMLForms. + + <p>See the <A href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.13">HTML specification</A> + to learn about submitting forms.</p> + */ +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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..b22183ed3 --- /dev/null +++ b/offapi/com/sun/star/form/XSubmitListener.idl @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XSubmitListener_idl__ +#define __com_sun_star_form_XSubmitListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** receives notifications about data being submitted. + + <p>The submission may be canceled, so the listener has the possibility + of verifying the data before submission.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..ddb83f21c --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateBroadcaster.idl @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_XUpdateBroadcaster_idl__ +#define __com_sun_star_form_XUpdateBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/form/XUpdateListener.idl> + + + + module com { module sun { module star { module form { + + +/** is the broadcaster interface for sending "approveUpdate" and "updated" events. + + <p>The component supporting this interface must do approval calls + (XUpdateListener::approveUpdate()) immediately + before the data is updated, and notification calls + (XUpdateListener::updated()) immediately afterwards.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..c991603e3 --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateListener.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 . + */ +#ifndef __com_sun_star_form_XUpdateListener_idl__ +#define __com_sun_star_form_XUpdateListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/lang/EventObject.idl> + + + + module com { module sun { module star { module form { + + +/** used to listen on objects which allow updating their data. + <p>In addition to just get notified when a data update happened, the listener + has a chance to veto updates <em>before</em> they happen.</p> + + @see XUpdateBroadcaster + */ +published interface XUpdateListener: com::sun::star::lang::XEventListener +{ + + /** is invoked to check the current data. + + <p>For a given update process, if one of the XUpdateListeners + vetoes the change, the update is canceled, and no further notification happens.</p> + + @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 ); + +}; + + +}; }; }; }; + +#endif + +/* 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 000000000..809c8a64c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableControlModel.idl @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableControlModel_idl__ +#define __com_sun_star_form_binding_BindableControlModel_idl__ + +#include <com/sun/star/form/binding/XBindableValue.idl> +#include <com/sun/star/form/FormControlModel.idl> + + +module com { module sun { module star { module form { module binding { + +/** specifies the model of a form control which supports binding to an external + value supplier. +*/ +service BindableControlModel +{ + /** specifies the basic functionality for a form control model + + <p>Via this service, bindable control models inherit the + com::sun::star::util::XCloneable interface.<br/> + If a bindable control model, at which a binding has been established (via + XBindableValue::setValueBinding()), is being cloned, then the + binding is also established at the clone. Effectively, this means that + both control model instances share the same binding instance.</p> + */ + service com::sun::star::form::FormControlModel; + + /** specifies support for being bound to an external value + + <p>When a BindableControlModel is bound to an external value, + then every change in the control model's value is <em>immediately</em> reflected + in the external binding.</p> + + <p>If the binding set via this interface supports the ValueBinding::ReadOnly + and ValueBinding::Relevant properties, they're respected by the control model: + <ul><li>The control model's own <code>ReadOnly</code> property (if present) is kept in sync with the + binding's <code>ReadOnly</code> property. That is, any control using the value + binding is read-only as long as the binding is.</li> + <li>The control model's own <code>Enabled</code> property (if present) is kept in sync + with the binding's <code>Relevant</code> property. That is, any control using + the value binding is disabled as long as the binding is not relevant.</li> + </ul> + </p> + + <p>In both cases, explicit changes of the model's property are ignored if they would relax + the restriction imposed by the binding.<br/> + For instance, if the binding declares its value to + be read-only (indicated by ValueBinding::ReadOnly being `TRUE`), then + any attempt to set the <code>ReadOnly</code> property of the control model to `FALSE` will + fail. However, if the binding's value is not read-only, then the <code>ReadOnly</code> + property at the control model can be freely set.<br/> + The very same holds for the binding's ValueBinding::Relevant and the control + model's <code>Enabled</code> properties.</p> + */ + interface XBindableValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl b/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl new file mode 100644 index 000000000..4c16e55c1 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl @@ -0,0 +1,118 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDataAwareControlModel_idl__ +#define __com_sun_star_form_binding_BindableDataAwareControlModel_idl__ + +#include <com/sun/star/form/DataAwareControlModel.idl> +#include <com/sun/star/form/binding/BindableControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** is a specialization of the com::sun::star::form::DataAwareControlModel + which additionally supports binding to external value suppliers. + + <p>Control models usually have some kind of value property, which reflects the very current + content of the controls associated with this model. For instance, for an + com::sun::star::form::component::TextField, this would be the + com::sun::star::awt::UnoControlEditModel::Text property of the base + service. Similarly, a com::sun::star::form::component::CheckBox has + a property com::sun::star::awt::UnoControlCheckBoxModel::State, which + reflects the current check state.</p> + + <p>Usual com::sun::star::form::DataAwareControlModels can be bound to + a column of a com::sun::star::form::component::DataForm, and exchange + their content with such a column.<br/> + In particular, when the com::sun::star::form::component::DataForm + is moved to a different record, then the bound control model is updated with the value of + it's column in this particular row.<br/> + On the other hand, when any change in the control model (e.g. resulting from a user entering + data in a control associated with the control model) is committed + (com::sun::star::form::XBoundComponent::commit()), then the actual + data of the control model is written into the associated + com::sun::star::form::component::DataForm column.</p> + + <p>BindableDataAwareControlModel's additionally support an alternative value + binding, which forces them to exchange their value with another foreign instance. + In some sense, they are an abstraction of the data aware control models, which only + support a specialized, hard-coded value binding (namely the binding to a + com::sun::star::form::component::DataForm column).</p> + + <p>For this, they provide the XBindableValue interface which allows to + set an external component to exchange the value with.</p> + + <p>The following rules apply when a data aware control model is bound to an external value binding: + <ul><li><b>Priority</b><br/> + External value bindings overrule any active SQL-column binding. If an external + component is bound to a control model which currently has an active SQL binding, + this SQL binding is suspended, until the external binding is revoked. + </li> + <li><b>Activation</b><br/> + An external value binding becomes effective as soon as it is set. This is a + difference to SQL bindings, which only are effective when the parent form + of the control model is loaded (com::sun::star::form::XLoadable). + </li> + <li><b>Immediacy</b><br/> + When a BindableDataAwareControlModel is bound to an external value, + then every change in the control model's value is <em>immediately</em> reflected + in the external binding. This is a difference to SQL bindings of most + com::sun::star::form::DataAwareControlModel's, where changes + in the control model's value are only propagated to the bound column upon explicit + request via com::sun::star::form::XBoundComponent::commit().<br/> + Note that this restriction is inherited from the BindableControlModel. + </li> + <li><b>Cloning</b><br/> + com::sun::star::form::FormControlModels support cloning themselves + via the com::sun::star::util::XCloneable interface which they + inherit from the com::sun::star::awt::UnoControlModel service.<br> + When a BindableDataAwareControlModel is cloned while it has an active + external value binding, then the clone is also bound to the same binding instance.<br/> + Note that this restriction is inherited from the BindableControlModel. + </li> + </ul> + </p> + + <p>When a BindableDataAwareControlModel is being bound to an external value, + using XBindableValue::setValueBinding(), + then the control model (its value property, respectively) and the external value are + initially synchronized by setting the external value (XValueBinding::getValue()) + at the control model.</p> + +*/ +service BindableDataAwareControlModel +{ + /** specifies the functionality for binding the control model to a + column of an SQL com::sun::star::form::component::DataForm. + */ + service com::sun::star::form::DataAwareControlModel; + + /** specifies the functionality for <em>alternatively</em> binding the control model + to an external value. + */ + service BindableControlModel; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl new file mode 100644 index 000000000..a043e6214 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseCheckBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseCheckBox_idl__ + +#include <com/sun/star/form/component/DatabaseCheckBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a check box which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseCheckBox must support exchanging + boolean values. The following mapping between external values and control states apply: + <ul><li>`TRUE` will be mapped to the box being checked, and vice versa</li> + <li>`FALSE` will be mapped to it being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state, if the box currently supports + this, or being unchecked else. The undetermined of the check box will always be + mapped to `NULL` when writing the external value.</li> + </ul></p> + + <p>If the value binding associated with a BindableDatabaseCheckBox + supports exchanging string values, <em>and</em> the com::sun::star::form::component::CheckBox::RefValue + is <em>not</em> empty, then the radio button will exchange its value as string: + <ul><li>A string equal to the reference value will be mapped to the button being checked, and vice versa</li> + <li>A string not equal to the reference value will be mapped to the button being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlCheckBoxModel::State + @see com::sun::star::awt::UnoControlCheckBoxModel::TriState + @see com::sun::star::form::component::CheckBox::RefValue + */ +service BindableDatabaseCheckBox +{ + service com::sun::star::form::component::DatabaseCheckBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's <em>not</em> + checked. + + <p>com::sun::star::form::component::CheckBox::RefValue is transferred to + possible external value bindings as soon as the check box is checked. With the member + #SecondaryRefValue, clients of the check box can also associate a value with + the <em>not checked</em> state of the control.</p> + */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl new file mode 100644 index 000000000..8742e053c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseComboBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseComboBox_idl__ + +#include <com/sun/star/form/component/DatabaseComboBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a model of a combo box (a list box combined with a text + input field) which is data-aware and thus can be bound to a database field, + and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as <em>string</em>, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlComboBoxModel::Text + */ +service BindableDatabaseComboBox +{ + service com::sun::star::form::component::DatabaseComboBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl new file mode 100644 index 000000000..3623f35bb --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseDateField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseDateField_idl__ + +#include <com/sun/star/form/component/DatabaseDateField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Date. + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlDateFieldModel::Date + */ +service BindableDatabaseDateField +{ + service com::sun::star::form::component::DatabaseDateField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl new file mode 100644 index 000000000..b463892f3 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseFormattedField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseFormattedField_idl__ + +#include <com/sun/star/form/component/DatabaseFormattedField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a formatted input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseFormattedField must support exchanging + values of type <em>double</em>.</p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseFormattedField +{ + service com::sun::star::form::component::DatabaseFormattedField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl new file mode 100644 index 000000000..3b02e46f5 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseListBox_idl__ +#define __com_sun_star_form_binding_BindableDatabaseListBox_idl__ + +#include <com/sun/star/form/component/DatabaseListBox.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + +/** This service specifies a list box model which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>There are six possible ways that a BindableDatabaseListBox exchanges + values with an external binding. If a new binding + is set at a BindableDatabaseListBox, the types from the following list are + tried in descending order: The first type supported by the binding is used for data exchange. + <ol> + <li><em>sequences of `any`s</em>: + The elements in the sequence will represent + the values the selected entries of the list box + (taken from ValueList or read from BoundColumn). + In other words, the SelectedValues property.</li> + <li><em>`any` value</em>: + The value will represent the value of the selected entry + (taken from ValueList or read from BoundColumn). + If more than one entry is selected, + `NULL` will be transferred. + In other words, the SelectedValue property.</li> + <li><em>sequences of long integers</em>: When used, the integers in the sequence will represent + the indexes of the selected entries of the list box.</li> + <li><em>long integer value</em>: When used, the value will represent the index of the selected entry. + If no entry is selected, -1 will be transferred. If more than one entry is selected, `NULL` + will be transferred.</li> + <li><em>sequences of strings</em>: When used, the strings in the sequence present the texts + of the selected entries of the list box.</li> + <li><em>string values</em>: When used. the value will represent the text of the selected entry. + If no entry is selected, an empty string will be transferred. If more than one entry is selected, + `NULL` will be transferred.</li> + </ol></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseListBox +{ + service com::sun::star::form::component::DatabaseListBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl new file mode 100644 index 000000000..f8c0eb96f --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseNumericField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseNumericField_idl__ + +#include <com/sun/star/form/component/DatabaseNumericField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a numeric input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseNumericField must support exchanging + values of type <em>double</em>.</p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseNumericField +{ + service com::sun::star::form::component::DatabaseNumericField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl new file mode 100644 index 000000000..49801caca --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseRadioButton_idl__ +#define __com_sun_star_form_binding_BindableDatabaseRadioButton_idl__ + +#include <com/sun/star/form/component/DatabaseRadioButton.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a radio button which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseRadioButton must support exchanging + boolean values. The following mapping between external values and control states apply: + <ul><li>`TRUE` will be mapped to the button being checked, and vice versa</li> + <li>`FALSE` will be mapped to it being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + <p>If the value binding associated with a BindableDatabaseRadioButton + supports exchanging string values, <em>and</em> the com::sun::star::form::component::RadioButton::RefValue + is <em>not</em> empty, then the radio button will exchange its value as string: + <ul><li>A string equal to the reference value will be mapped to the button being checked, and vice versa</li> + <li>A string not equal to the reference value will be mapped to the button being unchecked, and vice versa</li> + <li>`NULL` will be mapped to it being in undetermined state</li> + </ul></p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlRadioButtonModel::State + @see com::sun::star::form::component::RadioButton::RefValue + */ +service BindableDatabaseRadioButton +{ + service com::sun::star::form::component::DatabaseRadioButton; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's <em>not</em> + selected. + + <p>com::sun::star::form::component::RadioButton::RefValue is transferred to + possible external value bindings as soon as the radio button is selected. With the member + #SecondaryRefValue, clients of the radio button can also associate a value with + the <em>not selected</em> state of the control.</p> + */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl new file mode 100644 index 000000000..d321c808a --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseTextField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseTextField_idl__ + +#include <com/sun/star/form/component/DatabaseTextField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a text input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as <em>string</em>, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlEditModel::Text + */ +service BindableDatabaseTextField +{ + service com::sun::star::form::component::DatabaseTextField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl new file mode 100644 index 000000000..955070aea --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableDatabaseTimeField_idl__ +#define __com_sun_star_form_binding_BindableDatabaseTimeField_idl__ + +#include <com/sun/star/form/component/DatabaseTimeField.idl> +#include <com/sun/star/form/binding/BindableDataAwareControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + + <p>If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Time. + </p> + + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + */ +service BindableDatabaseTimeField +{ + service com::sun::star::form::component::DatabaseTimeField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.</p> + */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl new file mode 100644 index 000000000..11f235a7c --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_BindableIntegerValueRange_idl__ +#define __com_sun_star_form_binding_BindableIntegerValueRange_idl__ + +#include <com/sun/star/form/binding/BindableControlModel.idl> + + +module com { module sun { module star { module form { module binding { + + +/** this service specifies a BindableControlModel which reflects + an integer value, out of a range of permitted integer values. + + <p>BindableIntegerValueRanges have a value property, a minimum, and a maximum, + all of type integer.</p> +*/ +service BindableIntegerValueRange +{ + /** specifies that the control can be bound to external values + + <p>Any binding used with the control model (see XBindableValue::setValueBinding()) + must support exchanging double values.</p> + + <p>When the (integer) value reflected by the control model is changed, it's converted + into a double value and propagated to the binding.</p> + + <p>When the external (double) value changes, it's converted as follows to an integer + value: + <ul><li>If the external value is `NULL`, the current value of the control model + will be set to its minimum.</li> + <li>If the external value is the <em>infinite</em> value, the control value will + be set to its maximum or minimum, depending on the sign of the external value.</li> + <li>If none of the aforementioned conditions is met, the external value will be simply + rounded.</li> + </ul> + */ + service com::sun::star::form::binding::BindableControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl b/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl new file mode 100644 index 000000000..93a57e44c --- /dev/null +++ b/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_binding_IncompatibleTypesException_idl__ +#define __com_sun_star_form_binding_IncompatibleTypesException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + +module com { module sun { module star { module form { module binding { + + +/** thrown to indicate that the types of an XValueBinding and + an XBindableValue are incompatible +*/ +exception IncompatibleTypesException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl b/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl new file mode 100644 index 000000000..18bda6070 --- /dev/null +++ b/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_binding_InvalidBindingStateException_idl__ +#define __com_sun_star_form_binding_InvalidBindingStateException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + + +module com { module sun { module star { module form { module binding { + + +/** thrown when an XValueBinding cannot perform a requested + operation due to an invalid state. +*/ +exception InvalidBindingStateException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ListEntryEvent.idl b/offapi/com/sun/star/form/binding/ListEntryEvent.idl new file mode 100644 index 000000000..68a41ecc4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntryEvent.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ListEntryEvent_idl__ +#define __com_sun_star_form_binding_ListEntryEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies the event which is notified when a change in a string entry + list occurred + + @see XListEntrySource + @see XListEntryListener +*/ +struct ListEntryEvent : com::sun::star::lang::EventObject +{ + /** denotes the position where a change occurred. + + <p>The concrete semantics of the value depends on the concrete + event being notified.</p> + */ + long Position; + + /** denotes the number of changed entries, in case a change of + an entry <em>range</em> is being notified. + */ + long Count; + + /** denotes the changed entries + + <p>The concrete semantics of the value depends on the concrete + event being notified.</p> + */ + sequence< string > + Entries; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ListEntrySource.idl b/offapi/com/sun/star/form/binding/ListEntrySource.idl new file mode 100644 index 000000000..0779cfa97 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntrySource.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ListEntrySource_idl__ +#define __com_sun_star_form_binding_ListEntrySource_idl__ + +#include <com/sun/star/form/binding/XListEntrySource.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which provides a list of string entries +*/ +service ListEntrySource +{ + /** allows read access to the entries represented by this component + */ + interface XListEntrySource; + + /** allows life time control for the component + + <p>An ListEntrySource will be known to one ore more components + supporting the XListEntrySink interface, which all work with + this source. However, they will not <em>own</em> the ListEntrySource. + The ownership is with another instance, which may also decide to obsolete + the ListEntrySource for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ListEntrySource + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XListEntrySinks.</p> + */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ValueBinding.idl b/offapi/com/sun/star/form/binding/ValueBinding.idl new file mode 100644 index 000000000..9ab7a20bf --- /dev/null +++ b/offapi/com/sun/star/form/binding/ValueBinding.idl @@ -0,0 +1,105 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_ValueBinding_idl__ +#define __com_sun_star_form_binding_ValueBinding_idl__ + +#include <com/sun/star/form/binding/XValueBinding.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which allows access to a single value + + <p>Read/Write access to the value represented by this component is supported, + as well as (optionally) active broadcasting of value changes</p> +*/ +service ValueBinding +{ + /** determines whether the value is currently readonly + + <p>For instance, you could imagine a ValueBinding which + represents a cell in a spreadsheet document, and whose value is readonly + as long as the spreadsheet is locked.</p> + + <p>As long as this property is `TRUE`, the value binding should throw + an InvalidBindingStateException when its + XValueBinding::setValue() method is invoked.</p> + */ + [optional, property, bound, readonly] boolean ReadOnly; + + /** determines the relevance of the value represented by the binding + + <p>In a more complex scenario, where different form controls are bound to different + values, which all are part of a larger data structure, some of the items in this + data structure may not be relevant currently. This is indicated by the + #Relevant property being `FALSE`.</p> + + <p>XBindableValues which are bound to this binding may or may not + react in certain ways on the (ir)relevance of their bound value.</p> + + <p>One possible reaction could be that user interface elements which are associated + with the XBindableValue are disabled as long as #Relevant + is `FALSE`.</p> + */ + [optional, property, bound, readonly] boolean Relevant; + + /** allows access to the properties of the binding + */ + [optional] interface com::sun::star::beans::XPropertySet; + + /** allows read and write access to the value represented by this binding + */ + interface XValueBinding; + + /** allows other components to be notified when the value represented + by the ValueBinding instance changes. + + <p>This interface is optional, since a binding may not support + actively notifying changes in its value. Note, however, that in case + this interface is not supported, the bound component cannot react + on value changes, and will thus override any values which are + set by an instance other than itself.</p> + */ + [optional] interface com::sun::star::util::XModifyBroadcaster; + + /** allows life time control for the component + + <p>An ValueBinding may be known to one ore more components + supporting the XBindableValue interface, which all work with + this binding. However, they will not <em>own</em> the ValueBinding. + The ownership is with another instance, which may also decide to obsolete + the ValueBinding for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ValueBinding + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XBindableValues.</p> + */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XBindableValue.idl b/offapi/com/sun/star/form/binding/XBindableValue.idl new file mode 100644 index 000000000..0659bdace --- /dev/null +++ b/offapi/com/sun/star/form/binding/XBindableValue.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XBindableValue_idl__ +#define __com_sun_star_form_binding_XBindableValue_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/form/binding/IncompatibleTypesException.idl> + + +module com { module sun { module star { module form { module binding { + +interface XValueBinding; + + +/** specifies support for being bound to an external value + + @see XValueBinding +*/ +interface XBindableValue : com::sun::star::uno::XInterface +{ + /** sets an external instance which controls the value of the component + + <p>Any previously active binding will be revoked. There can be only one!</p> + + @param aBinding + the new binding which is to be used by the component. May be `NULL`, + in this case only the current binding is revoked. + + @throws IncompatibleTypesException + if the new binding (provided it's not `NULL`) supports only types + which are incompatible with the types of the bindable component. + */ + void setValueBinding( [in] XValueBinding aBinding ) + raises ( IncompatibleTypesException ); + + /** retrieves the external instance which currently controls the value of the + component + */ + XValueBinding + getValueBinding( ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntryListener.idl b/offapi/com/sun/star/form/binding/XListEntryListener.idl new file mode 100644 index 000000000..b14a4a081 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryListener.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntryListener_idl__ +#define __com_sun_star_form_binding_XListEntryListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/form/binding/ListEntryEvent.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies a listener for changes in a string entry list +*/ +interface XListEntryListener : com::sun::star::lang::XEventListener +{ + /** notifies the listener that a single entry in the list has change + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the changed entry, the first (and only) element + of the ListEntryEvent::Entries member denotes the new string + */ + void entryChanged( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been inserted into the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first inserted entry, the + ListEntryEvent::Entries member contains the strings which have + been inserted. + */ + void entryRangeInserted( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been removed from the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first removed entry, the + ListEntryEvent::Count member the number of removed entries. + */ + void entryRangeRemoved( [in] ListEntryEvent Source ); + + /** notifies the listener that all entries of the list have changed. + + <p>The listener should retrieve the complete new list by calling the + XListEntrySource::getAllListEntries() method of the event source + (which is denoted by com::sun::star::lang::EventObject::Source). + */ + void allEntriesChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySink.idl b/offapi/com/sun/star/form/binding/XListEntrySink.idl new file mode 100644 index 000000000..ed5926b1a --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySink.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntrySink_idl__ +#define __com_sun_star_form_binding_XListEntrySink_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module form { module binding { + +interface XListEntrySource; + + +/** specifies support for indirect manipulation of a string list +*/ +interface XListEntrySink : com::sun::star::uno::XInterface +{ + /** sets the new source for the list entries of the component + + <p>The list represented by this component will be cleared, and initially + filled with the entries from the new list source.</p> + + @param Source + the new source for the list entries. May be `NULL`, in this + case, the current source is revoked. + */ + void setListEntrySource( [in] XListEntrySource Source ); + + /** retrieves the current source for the list entries of the component. + */ + XListEntrySource + getListEntrySource( ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySource.idl b/offapi/com/sun/star/form/binding/XListEntrySource.idl new file mode 100644 index 000000000..81236a0ff --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySource.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XListEntrySource_idl__ +#define __com_sun_star_form_binding_XListEntrySource_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NullPointerException.idl> +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> + + +module com { module sun { module star { module form { module binding { + +interface XListEntryListener; + + +/** specifies a source of string list entries + + <p>The interface supports foreign components which actively retrieve list entries, + as well as components which want to passively being notified of changes in the list.</p> + + @see XListEntrySink +*/ +interface XListEntrySource : com::sun::star::uno::XInterface +{ + /** retrieves the number of entries in the list + */ + long getListEntryCount( ); + + /** provides access to a single list entry + + @throws com::sun::star::lang::IndexOutOfBoundsException + if the given position does not denote a valid index in the list + + @see getListEntryCount + */ + string getListEntry( [in] long Position ) + raises( com::sun::star::lang::IndexOutOfBoundsException ); + + /** provides access to the entirety of all list entries + */ + sequence< string > + getAllListEntries( ); + + /** adds a listener which will be notified about changes in the list + reflected by the component. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void addListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** revokes the given listener from the list of components which will + be notified about changes in the entry list. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void removeListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl new file mode 100644 index 000000000..8f8003deb --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_form_binding_XListEntryTypedSource_idl__ +#define __com_sun_star_form_binding_XListEntryTypedSource_idl__ + +#include <com/sun/star/form/binding/XListEntrySource.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies a source of string list entries with corresponding underlying data values + + @see XListEntrySource + + @since LibreOffice 5.4 +*/ +interface XListEntryTypedSource : com::sun::star::form::binding::XListEntrySource +{ + /** provides access to the entirety of all list entries, along with + the corresponding underlying data values. + + @param DataValues + The sequence is used by + com::sun::star::form::component::ListBox for external + sources such as spreadsheets to return the resulting + data value if a listbox entry was selected, e.g. set it + at the specified bound cell using + com::sun::star::form::binding::XValueBinding::setValue(). + */ + sequence< string > getAllListEntriesTyped( [out] sequence< any > DataValues ); + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XValueBinding.idl b/offapi/com/sun/star/form/binding/XValueBinding.idl new file mode 100644 index 000000000..2a6a4d1b6 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XValueBinding.idl @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_binding_XValueBinding_idl__ +#define __com_sun_star_form_binding_XValueBinding_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NoSupportException.idl> +#include <com/sun/star/form/binding/IncompatibleTypesException.idl> +#include <com/sun/star/form/binding/InvalidBindingStateException.idl> + + +module com { module sun { module star { module form { module binding { + + +/** specifies a binding to a value which can be read and written. +*/ +interface XValueBinding : com::sun::star::uno::XInterface +{ + /** determines the types which are supported by this binding for value exchange + + @see supportsType + */ + sequence< type > + getSupportedValueTypes( ); + + /** determines whether a given type is supported by this binding for value exchange + + <p>Calling this method is equal to calling getSupportedValueTypes(), + and looking up the given type in the resulting type sequence.</p> + + @see getSupportedValueTypes + */ + boolean supportsType( [in] type aType ); + + /** retrieves the current value + + @throws IncompatibleTypesException + if the requested value type is not supported by the binding + @see getSupportedValueTypes + @see supportsType + */ + any getValue( [in] type aType ) + raises( IncompatibleTypesException ); + + /** sets the current value + + @throws IncompatibleTypesException + if the given value type is not supported by the binding + @throws InvalidBindingStateException + if the value currently cannot be changed, since the binding is not + fully operational. Possible reasons for this include the binding being + readonly, or the target of the binding not being present. + @throws com::sun::star::lang::NoSupportException + if the binding in general does not support write access to its binding + + @see getSupportedValueTypes + @see supportsType + @see ValueBinding + */ + void setValue( [in] any aValue ) + raises( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..b793bc4f0 --- /dev/null +++ b/offapi/com/sun/star/form/component/CheckBox.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 . + */ +#ifndef __com_sun_star_form_component_CheckBox_idl__ +#define __com_sun_star_form_component_CheckBox_idl__ + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/awt/UnoControlCheckBoxModel.idl> +#include <com/sun/star/form/XReset.idl> + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a check box control + + <p>The model supports the properties required for HTML, thus you can build up + HTMLForms with it</p> + */ +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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @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 + + <p>When submitting a HTMLForm which contains a check box, + which is checked, the RefValue is used for submission. + */ + [property] string RefValue; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..33c4e5e9d --- /dev/null +++ b/offapi/com/sun/star/form/component/ComboBox.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_ComboBox_idl__ +#define __com_sun_star_form_component_ComboBox_idl__ + +#include <com/sun/star/awt/UnoControlComboBoxModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlComboBoxModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..451326ce6 --- /dev/null +++ b/offapi/com/sun/star/form/component/CommandButton.idl @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_CommandButton_idl__ +#define __com_sun_star_form_component_CommandButton_idl__ + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/awt/UnoControlButtonModel.idl> +#include <com/sun/star/form/XImageProducerSupplier.idl> +#include <com/sun/star/form/XApproveActionBroadcaster.idl> +#include <com/sun/star/form/FormButtonType.idl> +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>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.</p> + + <p>Usually, a control belonging to the model will use this interface to obtain the + image to be painted</p> + */ + 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. + + <p>This property is evaluated if the button is of type URL.</p> + + <p>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.</p> + */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + + <p>This property is evaluated if the button is of type URL.</p> + + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; + + /** specifies the default toggle state for the button, used when it is reset. + + <p>This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle + is `TRUE`. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will + be reset.</p> + + <p>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.</p> + */ + [optional, property] boolean DefaultState; + + /** allows resetting the button + + <p>This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle + is `TRUE`. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will + be reset, when com::sun::star::form::XReset::reset() is invoked.</p> + + <p>For a given implementation of the interface, if this (optional) interface is present, then also the optional + property #DefaultState must be present.</p> + */ + [optional] interface ::com::sun::star::form::XReset; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..a5c35ae09 --- /dev/null +++ b/offapi/com/sun/star/form/component/CurrencyField.idl @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_CurrencyField_idl__ +#define __com_sun_star_form_component_CurrencyField_idl__ + +#include <com/sun/star/awt/UnoControlCurrencyFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..23ad3f15b --- /dev/null +++ b/offapi/com/sun/star/form/component/DataForm.idl @@ -0,0 +1,196 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DataForm_idl__ +#define __com_sun_star_form_component_DataForm_idl__ + +#include <com/sun/star/form/component/Form.idl> +#include <com/sun/star/sdb/RowSet.idl> +#include <com/sun/star/form/TabulatorCycle.idl> +#include <com/sun/star/form/NavigationBarMode.idl> +#include <com/sun/star/form/XLoadable.idl> +#include <com/sun/star/sdb/XCompletedExecution.idl> +#include <com/sun/star/awt/TabControllerModel.idl> + + +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. + + <p>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.</p> + +*/ +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 + + <p>A DataForm is reset either on explicit request, or after it is moved + to the insertion row.</p> + + <p>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: + <ul><li>After all notifications as defined in the com::sun::star::sdb::RowSet + service have been sent, the DataForm resets itself, if all + com::sun::star::form::XResetListeners approve this.</li> + <li>After the reset happened, the com::sun::star::sdb::RowSet::IsModified + property is reset to `FALSE`. This property might have been switched to `TRUE` during listener + notifications, since listeners are allowed to change field values. Also, the + com::sun::star::form::XReset::reset() implementations of bound control + models might have modified the fields they're bound to (by filling them with default values).</li> + <li>The reset listeners are notified of the completed reset operation.</li> + </ul></p> + */ + interface com::sun::star::form::XReset; + + /** used to load/unload the form + <p>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.</p> + + <p>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 <em>before</em> the it.</p> + */ + interface com::sun::star::form::XLoadable; + + /** can be used to allow an interaction handler to supply missing data during a load process. + + <p>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.</p> + <p>However, if you use this method, you can pass an interaction handler which should supply these + additional data.</p> + + @see com::sun::star::sdb::InteractionHandler + */ + interface com::sun::star::sdb::XCompletedExecution; + + /** can be used for filling parameters. + + <p>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<br/> + 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.</p> + + <p>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</p> + + @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. + + <p> 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.</p> + + <p>If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.</p> + */ + [property] sequence<string> MasterFields; + + /** is used for subforms and contains the names of the columns of the subform + which are related to the master fields of the parent form. + + <p>Entries in this sequence can either denote column names in the sub form, + or parameter names.<br/> + For instance, you could base the form on the SQL statement + <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code> + to the DetailFields property. In this case, the parameter will be filled from + the corresponding master field.<br/> + Alternatively, you could simply base your form on the table <code>invoices</code>, + and add the column name <code>cust_ref</code> to the DetailFields. In this case, + and implicit filter clause <code>WHERE cust_ref = :<new_param_name></code> will + be created, and the artificial parameter will be filled from the corresponding + master field.<br/> + 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. + </p> + + <p>The columns specified herein typically represent a part of the primary key + fields or their aliases of the detail form.</p> + + <p>If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.</p> + */ + [property] sequence<string> DetailFields; + + /** returns the kind of tabulator controlling. + */ + [property] com::sun::star::form::TabulatorCycle Cycle; + + /** determines how a navigation bar for this form should act. + */ + [property] com::sun::star::form::NavigationBarMode NavigationBarMode; + + /** determines if insertions into the form's row set are allowed. + + <p>Note 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.</p> + */ + [property] boolean AllowInserts; + + /** determines if modifications of the current record of the form are allowed. + + <p>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.</p> + */ + [property] boolean AllowUpdates; + + /** determines if deletions of records of the form are allowed. + + <p>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.</p> + */ + [property] boolean AllowDeletes; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..cdf1e2347 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCheckBox.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseCheckBox_idl__ +#define __com_sun_star_form_component_DatabaseCheckBox_idl__ + +#include <com/sun/star/form/component/CheckBox.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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. + + <p>Mostly, you will create data-aware checkboxes as tristate checkboxes, because this + is a requirement to correctly handle `NULL` values in databases.</p> + + @see ::com::sun::star::awt::UnoControlCheckBoxModel::TriState + */ +published service DatabaseCheckBox +{ + service com::sun::star::form::component::CheckBox; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..64711a452 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseComboBox.idl @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DatabaseComboBox_idl__ +#define __com_sun_star_form_component_DatabaseComboBox_idl__ + +#include <com/sun/star/form/component/ComboBox.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + +#include <com/sun/star/form/ListSourceType.idl> + + + + 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. + + <p>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.</p> + */ +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. + + <p>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.<br/> + This is controlled by #ConvertEmptyToNull.</p> + + <p>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.</p> + */ + [property] boolean ConvertEmptyToNull; + + /** describes the source of items in the combo box's list. + + <p>The concrete meaning of this property depends on the value of #ListSourceType</p> + */ + [property] string ListSource; + + /** specifies the kind of list source. + + <p>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.</p> + */ + [property] com::sun::star::form::ListSourceType ListSourceType; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..c6afae618 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCurrencyField.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseCurrencyField_idl__ +#define __com_sun_star_form_component_DatabaseCurrencyField_idl__ + +#include <com/sun/star/form/component/CurrencyField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..c09e8a9fd --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseDateField.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseDateField_idl__ +#define __com_sun_star_form_component_DatabaseDateField_idl__ + +#include <com/sun/star/form/component/DateField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..42b6d5be7 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseFormattedField.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DatabaseFormattedField_idl__ +#define __com_sun_star_form_component_DatabaseFormattedField_idl__ + +#include <com/sun/star/form/component/FormattedField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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. + + <p>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.<br/> + This is controlled by #ConvertEmptyToNull.</p> + + <p>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.</p> + */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..11c90358b --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseImageControl.idl @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DatabaseImageControl_idl__ +#define __com_sun_star_form_component_DatabaseImageControl_idl__ + +#include <com/sun/star/awt/UnoControlImageControlModel.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + +#include <com/sun/star/form/XImageProducerSupplier.idl> + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a control used for displaying images stored in a database. + + <p>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.<br> + 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()).</p> + + <p>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</p> + + </p> + + <p>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.</p> + + <p>In a usual data form, the scenario will be as follows: + <ul><li>There is a DatabaseImageControl as part of the document model, which acts as + control model for a com::sun::star::form::control::ImageControl.</li> + + <li>The control is a com::sun::star::awt::XImageConsumer for the + com::sun::star::awt::XImageProducer supplied by the model.</li> + + <li>Whenever the form's cursor is positioned on a new record, the column the control + model is bound to is examined for a binary data stream. This stream is set as source + at the image producer, which notifies it's consumers, which leads to the control + displaying the image.</li> + + <li>When the user by some interaction tells the control to contain a new image, this is + exchanged by URL. For example, implementations of the control service may allow the user + to browse for image. After this, the URL of the image is set as + com::sun::star::awt::UnoControlImageControlModel::ImageURL + property at the model.<br> + Now the control loads the image determined by the property value, and starts producing + a new data stream, which is displayed by the control (which is a consumer for this stream).<br> + From now on, the control and thus the database record counts as modified. If the cursor of the + form is moved further, the modified record is saved, means the content of the image pointed to + by com::sun::star::awt::UnoControlImageControlModel::ImageURL + is saved into the column.</li> + </ul> + </p> + */ +published service DatabaseImageControl +{ + service com::sun::star::awt::UnoControlImageControlModel; + + service com::sun::star::form::DataAwareControlModel; + + /** supplies the caller with a com::sun::star::awt::XImageProducer. + + <p>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.</p> + */ + interface com::sun::star::form::XImageProducerSupplier; + + + /** indicates if it is possible to change the image being displayed. + */ + [property] boolean ReadOnly; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..0b8f95210 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseListBox.idl @@ -0,0 +1,157 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DatabaseListBox_idl__ +#define __com_sun_star_form_component_DatabaseListBox_idl__ + +#include <com/sun/star/form/component/ListBox.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + +#include <com/sun/star/form/ListSourceType.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware list box control model. + + <p>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.</p> + + <p>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.</p> + + <p>For instance, you may have a form which is bound to a table <em>invoice</em>, and you use it + to enter invoices for your customers. Probably, you will have a second table (say <em>customer</em>), + 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.<br/> + 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 <em>customer</em> table, and fill its list with entries + from this result set.<br/> + 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 + <em>invoice</em>, thus allowing the user to transparently work with human-readable strings instead of + pure numbers.<br/> + Let's call this result set the list is filled from the <em>list result set</em> here ...</p> + + <p>The display strings are always taken from the first column of that result set, + and the corresponding value as per the BoundColumn property.</p> + */ +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. + + <p>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. + + <dl> + <dt>-1</dt> + <dd>The index (starting at 0) of the selected list box entry + is stored in the current database field.</dd> + + <dt>0 or greater</dt> + <dd>The column value of the result set at the position + (0-indexed) is stored in the current database field. + In particular, for value 0, the selected (displayed) + list box string is stored.</dd> + </dl></p> + + <p>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.</p> + */ + [property] short BoundColumn; + + + /** describes the kind of list source used. + + <p>Depending on the value of this property, the way the value of ListBox::ListSource + is evaluated varies. + <dl> + <dt>com::sun::star::form::ListSourceType::VALUELIST</dt> + <dd>The elements in the string sequence in ListBox::ListSource + build up the entry list.</dd> + + <dt>com::sun::star::form::ListSourceType::TABLE</dt> + <dd>The first element of the string sequence in ListBox::ListSource + determines the table which the list result set should be based on.</dd> + + <dt>com::sun::star::form::ListSourceType::QUERY</dt> + <dd>The first element of the string sequence in ListBox::ListSource + determines the query which the list result set should be based on.<br/> + For retrieving the query, the connection which the data form is working with + (com::sun::star::sdb::RowSet::ActiveConnection) is queried for + the com::sun::star::sdb::XQueriesSupplier interface.</dd> + + <dt>com::sun::star::form::ListSourceType::SQL</dt> + <dd>The first element of the string sequence in ListBox::ListSource + contains the SQL statement which the list result set should be based on.</p> + + <dt>com::sun::star::form::ListSourceType::SQLPASSTHROUGH</dt> + <dd>The first element of the string sequence in ListBox::ListSource + contains the SQL statement which the list result set should be based on.<br/> + The statement is not analyzed by the parser. This means that you can use database specific + SQL features here, but, on the other hand, lose features like parameter value substitution.</dd> + + <dt>com::sun::star::form::ListSourceType::TABLEFIELDS</dt> + <dd>The first element of the string sequence in ListBox::ListSource + determines the table whose column names should fill the list.</dd> + </dl> + </p> + + */ + [property] com::sun::star::form::ListSourceType ListSourceType; + + /** The selected values. + */ + [property, transient, optional] sequence< any > SelectedValues; + + /** The selected value, if there is at most one. + */ + [property, transient, optional] any SelectedValue; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseNumericField.idl b/offapi/com/sun/star/form/component/DatabaseNumericField.idl new file mode 100644 index 000000000..244f31c1a --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseNumericField.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseNumericField_idl__ +#define __com_sun_star_form_component_DatabaseNumericField_idl__ + +#include <com/sun/star/form/component/NumericField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a numeric field which is data-aware, and can be bound to a database field. + */ +published service DatabaseNumericField +{ + service com::sun::star::form::component::NumericField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabasePatternField.idl b/offapi/com/sun/star/form/component/DatabasePatternField.idl new file mode 100644 index 000000000..d0ce8a475 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabasePatternField.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 . + */ +#ifndef __com_sun_star_form_component_DatabasePatternField_idl__ +#define __com_sun_star_form_component_DatabasePatternField_idl__ + +#include <com/sun/star/form/component/PatternField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware control model for entering text which matches a specific + pattern. + */ +published service DatabasePatternField +{ + service com::sun::star::form::component::PatternField; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + + <p>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.<br/> + This is controlled by this property.</p> + + <p>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.</p> + */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..0455dc02e --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseRadioButton.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseRadioButton_idl__ +#define __com_sun_star_form_component_DatabaseRadioButton_idl__ + +#include <com/sun/star/form/component/RadioButton.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..573407fde --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTextField.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DatabaseTextField_idl__ +#define __com_sun_star_form_component_DatabaseTextField_idl__ + +#include <com/sun/star/form/component/TextField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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. + + <p>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.<br/> + This is controlled by this property.</p> + + <p>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.</p> + */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..08d305e12 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTimeField.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 . + */ +#ifndef __com_sun_star_form_component_DatabaseTimeField_idl__ +#define __com_sun_star_form_component_DatabaseTimeField_idl__ + +#include <com/sun/star/form/component/TimeField.idl> + +#include <com/sun/star/form/DataAwareControlModel.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..099a7cb40 --- /dev/null +++ b/offapi/com/sun/star/form/component/DateField.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_DateField_idl__ +#define __com_sun_star_form_component_DateField_idl__ + +#include <com/sun/star/awt/UnoControlDateFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>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.</p> + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlDateFieldModel::Date + @see com::sun::star::form::XReset + */ + [property] long DefaultDate; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..0e5c977f8 --- /dev/null +++ b/offapi/com/sun/star/form/component/FileControl.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_FileControl_idl__ +#define __com_sun_star_form_component_FileControl_idl__ + +#include <com/sun/star/awt/UnoControlFileControlModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + 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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlFileControlModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..5cdc4e4a5 --- /dev/null +++ b/offapi/com/sun/star/form/component/FixedText.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 . + */ +#ifndef __com_sun_star_form_component_FixedText_idl__ +#define __com_sun_star_form_component_FixedText_idl__ + +#include <com/sun/star/awt/UnoControlFixedTextModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + + + + 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. + + <p>These kind of controls is usually used to label other controls.</p> + + @see com::sun::star::form::DataAwareControlModel::LabelControl + */ +published service FixedText +{ + service com::sun::star::awt::UnoControlFixedTextModel; + + service com::sun::star::form::FormControlModel; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..43ba74c36 --- /dev/null +++ b/offapi/com/sun/star/form/component/Form.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 . + */ +#ifndef __com_sun_star_form_component_Form_idl__ +#define __com_sun_star_form_component_Form_idl__ + +#include <com/sun/star/form/FormComponent.idl> +#include <com/sun/star/form/FormComponents.idl> +#include <com/sun/star/form/XForm.idl> +#include <com/sun/star/awt/XTabControllerModel.idl> +#include <com/sun/star/script/XEventAttacherManager.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a form which is a group of FormComponents. + + <p>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.</p> + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..fd9817667 --- /dev/null +++ b/offapi/com/sun/star/form/component/FormattedField.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_FormattedField_idl__ +#define __com_sun_star_form_component_FormattedField_idl__ + +#include <com/sun/star/awt/UnoControlFormattedFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..0a8db09f2 --- /dev/null +++ b/offapi/com/sun/star/form/component/GridControl.idl @@ -0,0 +1,168 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_GridControl_idl__ +#define __com_sun_star_form_component_GridControl_idl__ + +#include <com/sun/star/util/Color.idl> +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XGridColumnFactory.idl> + +#include <com/sun/star/form/FormComponents.idl> +#include <com/sun/star/container/XContainer.idl> + +#include <com/sun/star/view/XSelectionSupplier.idl> + +#include <com/sun/star/container/XNameContainer.idl> + +#include <com/sun/star/container/XIndexContainer.idl> + +#include <com/sun/star/container/XEnumerationAccess.idl> + +#include <com/sun/star/script/XEventAttacherManager.idl> + +#include <com/sun/star/form/XReset.idl> + +#include <com/sun/star/awt/FontDescriptor.idl> + + + + 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. + + <p>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).</p> + + <p>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.</p> + + <p>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.</p> + */ +published service GridControl +{ + service com::sun::star::form::FormControlModel; + + /** provides basic functionality of a container of com::sun::star::form::FormComponents. + + <p>All the container-related methods of this service related to control models, + this is what are the container elements for a GridControl.</p> + + <p>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.</p> + */ + service com::sun::star::form::FormComponents; + + /** allows to create column models to be inserted into the control model. + + <p>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.</p> + + <p>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.</p> + */ + interface com::sun::star::form::XGridColumnFactory; + + /** gives access to the currently selection. + + <p>In a grid control, single columns can be selected (at most one at a time).<br/> + For various unfortunate reasons, this selection is an aspect of the model, not of the + control as you would expect.</p> + + <p>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.</p> + + @deprecated + */ + interface com::sun::star::view::XSelectionSupplier; + + /** resets the control. + + <p>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. + + <pre> + 0: No border + 1: 3D border + 2: simple border + </pre> + */ + [property] short Border; + + + /** specifies the color of the border, if present + + <p>Not every border style (see #Border) may support coloring. + For instance, usually a border with 3D effect will ignore the BorderColor setting.</p> + + @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. + + <p>If the value is set to `NULL`, the height is determined automatically according + to the current font used.</p> + + @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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..ba23f276a --- /dev/null +++ b/offapi/com/sun/star/form/component/GroupBox.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 . + */ +#ifndef __com_sun_star_form_component_GroupBox_idl__ +#define __com_sun_star_form_component_GroupBox_idl__ + +#include <com/sun/star/awt/UnoControlGroupBoxModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + + + + 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; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..acb40e5df --- /dev/null +++ b/offapi/com/sun/star/form/component/HTMLForm.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 . + */ +#ifndef __com_sun_star_form_component_HTMLForm_idl__ +#define __com_sun_star_form_component_HTMLForm_idl__ + +#include <com/sun/star/form/component/Form.idl> + +#include <com/sun/star/form/XReset.idl> + +#include <com/sun/star/form/XSubmit.idl> + +#include <com/sun/star/form/FormSubmitMethod.idl> + +#include <com/sun/star/form/FormSubmitEncoding.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the special kind of Forms for HTML documents. + + <p>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.</p> + */ +published service HTMLForm +{ + service com::sun::star::form::component::Form; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + /** allows to submit changes. + + <p>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.</p> + */ + 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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..3994b54e4 --- /dev/null +++ b/offapi/com/sun/star/form/component/HiddenControl.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 . + */ +#ifndef __com_sun_star_form_component_HiddenControl_idl__ +#define __com_sun_star_form_component_HiddenControl_idl__ + +#include <com/sun/star/form/FormComponent.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the model of a hidden control. + + <p>The only sense of a hidden control is to store data in the form which is + not visible to the user.</p> + + <p>Usually, hidden controls are used in com::sun::star::form::component::HTMLForms, + where they contain data which is to be submitted.<br/> + Nevertheless, you can use them in your own forms for storing any data, for instance + to evaluate it in some scripting macro.</p> + */ +published service HiddenControl +{ + service com::sun::star::form::FormComponent; + + /** specifies the value of the component. + */ + [property] string HiddenValue; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ImageButton.idl b/offapi/com/sun/star/form/component/ImageButton.idl new file mode 100644 index 000000000..932efe1ef --- /dev/null +++ b/offapi/com/sun/star/form/component/ImageButton.idl @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_ImageButton_idl__ +#define __com_sun_star_form_component_ImageButton_idl__ + +#include <com/sun/star/awt/UnoControlImageControlModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XApproveActionBroadcaster.idl> + +#include <com/sun/star/form/XImageProducerSupplier.idl> + +#include <com/sun/star/form/FormButtonType.idl> + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model for a clickable button which + is represented by an image. + + <p>The image to be displayed is determined by com::sun::star::awt::UnoControlImageControlModel::ImageURL + property specifies the URL of an image to be displayed.</p> + + @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. + + <p>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.</p> + + <p>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.<br/> + Usually, controls acting for an ImageButton model are consumers, and use the + data stream to display the image</p> + */ + 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. + + <p>This property is evaluated if the button is of type URL.</p> + + <p>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.</p> + */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + + <p>This property is evaluated if the button is of type URL.</p> + + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..48f754435 --- /dev/null +++ b/offapi/com/sun/star/form/component/ListBox.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 . + */ +#ifndef __com_sun_star_form_component_ListBox_idl__ +#define __com_sun_star_form_component_ListBox_idl__ + +#include <com/sun/star/awt/UnoControlListBoxModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>This selection is used initially or for a reset.</p> + + @see com::sun::star::awt::UnoControlListBoxModel::SelectedItems + @see com::sun::star::form::XReset + */ + [property] sequence<short> DefaultSelection; + + + /** contains the values associated to the strings to be displayed + (which are specified by com::sun::star::awt::UnoControlListBoxModel::StringItemList) + */ + [property] sequence<string> ListSource; + +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/NavigationToolBar.idl b/offapi/com/sun/star/form/component/NavigationToolBar.idl new file mode 100644 index 000000000..165f2f4db --- /dev/null +++ b/offapi/com/sun/star/form/component/NavigationToolBar.idl @@ -0,0 +1,124 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_NavigationToolBar_idl__ +#define __com_sun_star_form_component_NavigationToolBar_idl__ + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/awt/FontDescriptor.idl> + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the model for control which provides controller + functionality for a DataForm, such as navigating or filtering + the form. + */ +service NavigationToolBar +{ + service com::sun::star::form::FormControlModel; + + /** denotes the border style of the control. + + Allowed values are + <ul><li><b>0</b>: no border at all</li> + <li><b>1</b>: 3D border</li> + <li><b>2</b>: simple flat</li> + </ul> + */ + [property] short Border; + + /** determines whether the control is enabled or disabled. + */ + [property] boolean Enabled; + + /** contains the font attributes for the text in the control + */ + [property] com::sun::star::awt::FontDescriptor FontDescriptor; + + /** specifies the text color (as RGB value) of the control. + */ + [property] long TextColor; + + /** specifies the text line color (as RGB value) of the control. + + <p>This color is used if the #FontDescriptor defines + that the text in the control should be underlined or stroke out.</p> + */ + [property] long TextLineColor; + + /** specifies the relief for the font described in #FontDescriptor + + <p>The value must be one of the com::sun::star::text::FontRelief + constants.</p> + */ + [property] long FontRelief; + + /** specifies the emphasis mark for the font described in #FontDescriptor + + <p>The value must be one of the com::sun::star::text::FontEmphasis + constants.</p> + */ + [property] long FontEmphasisMark; + + /** specifies the size of the icons in the control + + <p>At least the following values are to be supported: + <ul><li>0: small icons (16x16)</li> + <li>1: medium size icons (26x26)</li> + </ul> + */ + [property] short IconSize; + + /** determines whether the control should provide functionality for positioning the + parent form + */ + [property] boolean ShowPosition; + + /** determines whether the control should provide functionality for navigating the + parent form + */ + [property] boolean ShowNavigation; + + /** determines whether the control should provide functionality for acting on the current record + of the parent form + */ + [property] boolean ShowRecordActions; + + /** determines whether the control should provide functionality for filtering and sorting the + parent form + */ + [property] boolean ShowFilterSort; + + /** specifies a repeat delay for the control + + <p>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.<br/> + The delay between two such triggers (in milliseconds) is specified with this property. + </p> + */ + [property] long RepeatDelay; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/NumericField.idl b/offapi/com/sun/star/form/component/NumericField.idl new file mode 100644 index 000000000..dac2ae6a6 --- /dev/null +++ b/offapi/com/sun/star/form/component/NumericField.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_NumericField_idl__ +#define __com_sun_star_form_component_NumericField_idl__ + +#include <com/sun/star/awt/UnoControlNumericFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of a numeric value. + */ +published service NumericField +{ + service com::sun::star::awt::UnoControlNumericFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default value. + + @see NumericField::DefaultValue + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlNumericFieldModel::Value + @see com::sun::star::form::XReset + */ + [property] double DefaultValue; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..b9083c552 --- /dev/null +++ b/offapi/com/sun/star/form/component/PatternField.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_PatternField_idl__ +#define __com_sun_star_form_component_PatternField_idl__ + +#include <com/sun/star/awt/UnoControlPatternFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlPatternFieldModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..4c1f6c861 --- /dev/null +++ b/offapi/com/sun/star/form/component/RadioButton.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 . + */ +#ifndef __com_sun_star_form_component_RadioButton_idl__ +#define __com_sun_star_form_component_RadioButton_idl__ + +#include <com/sun/star/awt/UnoControlRadioButtonModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which acts as a radio button as needed in HTMLForms. + + <p>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</p> + + <p>Like in HTML, radio buttons are grouped together if and only if they have the + same name (see com::sun::star::form::FormComponent::Name).</p> + */ +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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + <p> In a group of radio buttons only one button should be checked + by default.</p> + + @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. + + <p>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.</p> + */ + [property] string RefValue; + + + /** specifies a value which is to be associated with the control when it's <em>not</em> + selected. + + <p>In various situations, the #RefValue is associated with the control + if and only if it is selected.<br/> + #UncheckedRefValue provides an extension of this concept: If present, + the value should be associated with the control when it is <em>not</em> selected.</p> + */ + [optional, property] string UncheckedRefValue; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/RichTextControl.idl b/offapi/com/sun/star/form/component/RichTextControl.idl new file mode 100644 index 000000000..180da4270 --- /dev/null +++ b/offapi/com/sun/star/form/component/RichTextControl.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 . + */ + +#ifndef __com_sun_star_form_component_RichTextControl_idl__ +#define __com_sun_star_form_component_RichTextControl_idl__ + +#include <com/sun/star/awt/UnoControlEditModel.idl> +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/text/TextRange.idl> + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which extends the com::sun::star::awt::UnoControlEditModel + with capabilities to display and input formatted text. +*/ +published service RichTextControl +{ + service com::sun::star::awt::UnoControlEditModel; + + service com::sun::star::form::FormControlModel; + + /** specifies capabilities to provide rich text, as opposed to the simple text provided by the + com::sun::star::awt::UnoControlEditModel + */ + service com::sun::star::text::TextRange; + + /** specifies whether text should be automatically wrapped to fit into the control. + + <p>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.</p> + */ + [property] boolean HardLineBreaks; + + /** specifies whether the control should display the text including all its formatting. + + <p>If this is set to `FALSE`, the control will act as ordinary + com::sun::star::awt::UnoControlEditModel.</p> + + <p>If the property is set to `TRUE`, the control will ignore the following properties: + <ul> + <li>com::sun::star::awt::UnoControlEditModel::EchoChar</li> + <li>com::sun::star::awt::UnoControlEditModel::MaxTextLen</li> + <li>com::sun::star::awt::UnoControlEditModel::MultiLine</li> + <li>com::sun::star::awt::UnoControlEditModel::Align</li> + </ul> + </p> + */ + [property] boolean RichText; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ScrollBar.idl b/offapi/com/sun/star/form/component/ScrollBar.idl new file mode 100644 index 000000000..2f67b4659 --- /dev/null +++ b/offapi/com/sun/star/form/component/ScrollBar.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 . + */ +#ifndef __com_sun_star_form_component_ScrollBar_idl__ +#define __com_sun_star_form_component_ScrollBar_idl__ + +#include <com/sun/star/awt/UnoControlScrollBarModel.idl> +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/form/XReset.idl> + + + +module com { module sun { module star { module form { module component { + + +/** specifies the model of a scroll bar control. +*/ +service ScrollBar +{ + service com::sun::star::awt::UnoControlScrollBarModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlScrollBarModel::ScrollValue + @see com::sun::star::form::XReset + */ + [property] long DefaultScrollValue; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..7feb1459d --- /dev/null +++ b/offapi/com/sun/star/form/component/SpinButton.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 . + */ +#ifndef __com_sun_star_form_component_SpinButton_idl__ +#define __com_sun_star_form_component_SpinButton_idl__ + +#include <com/sun/star/awt/UnoControlSpinButtonModel.idl> +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/form/XReset.idl> + + + +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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlSpinButtonModel::SpinValue + @see com::sun::star::form::XReset + */ + [property] long DefaultSpinValue; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..3a0cf89b1 --- /dev/null +++ b/offapi/com/sun/star/form/component/SubmitButton.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_SubmitButton_idl__ +#define __com_sun_star_form_component_SubmitButton_idl__ + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/awt/UnoControlButtonModel.idl> +#include <com/sun/star/form/submission/XSubmissionSupplier.idl> + + +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 + + <p>Note that the control model itself will not make any use of the submission. + Instead, submissions are triggered by a control (not a control <em>model</em>). + Thus, the com::sun::star::form::control::SubmitButton + control associated with a SubmitButton model is responsible for + using the submission supplied at this model.</p> + */ + interface com::sun::star::form::submission::XSubmissionSupplier; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..733edc45d --- /dev/null +++ b/offapi/com/sun/star/form/component/TextField.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 . + */ +#ifndef __com_sun_star_form_component_TextField_idl__ +#define __com_sun_star_form_component_TextField_idl__ + +#include <com/sun/star/awt/UnoControlEditModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/form/component/RichTextControl.idl> +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>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.</p> + */ + [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. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlEditModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..79d937ac4 --- /dev/null +++ b/offapi/com/sun/star/form/component/TimeField.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_component_TimeField_idl__ +#define __com_sun_star_form_component_TimeField_idl__ + +#include <com/sun/star/awt/UnoControlTimeFieldModel.idl> + +#include <com/sun/star/form/FormControlModel.idl> + +#include <com/sun/star/form/XReset.idl> + + + + 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. + + <p>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.</p> + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + + <p>This value is used when the control is initially displayed, and for resetting it.</p> + + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + @see com::sun::star::form::XReset + */ + [property] long DefaultTime; + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..e745c8acb --- /dev/null +++ b/offapi/com/sun/star/form/control/CheckBox.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 . + */ + +#ifndef __com_sun_star_form_control_checkbox_idl__ +#define __com_sun_star_form_control_checkbox_idl__ + +#include <com/sun/star/awt/UnoControlCheckBox.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::CheckBox + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..91a7b9e4d --- /dev/null +++ b/offapi/com/sun/star/form/control/ComboBox.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 . + */ + +#ifndef __com_sun_star_form_control_ComboBox_idl__ +#define __com_sun_star_form_control_ComboBox_idl__ + +#include <com/sun/star/awt/UnoControlComboBox.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a combo box control. + + <p>The model of the control has to support the com::sun::star::form::component::ComboBox + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..8596226bb --- /dev/null +++ b/offapi/com/sun/star/form/control/CommandButton.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 . + */ + +#ifndef __com_sun_star_form_control_CommandButton_idl__ +#define __com_sun_star_form_control_CommandButton_idl__ + +#include <com/sun/star/awt/UnoControlButton.idl> +#include <com/sun/star/form/XApproveActionBroadcaster.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a button control. + + <p>The model of the control has to support the com::sun::star::form::component::CommandButton + service.</p> + + <p>The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.</p> + + @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. + + <p>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<br/> + This may be interesting for e.g. forms which want to provide input validation before submitting + data.<br/> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..6a44c7e47 --- /dev/null +++ b/offapi/com/sun/star/form/control/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 . + */ + +#ifndef __com_sun_star_form_control_CurrencyField_idl__ +#define __com_sun_star_form_control_CurrencyField_idl__ + +#include <com/sun/star/awt/UnoControlCurrencyField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::CurrencyField + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..90ced2c58 --- /dev/null +++ b/offapi/com/sun/star/form/control/DateField.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 . + */ + +#ifndef __com_sun_star_form_control_DateField_idl__ +#define __com_sun_star_form_control_DateField_idl__ + +#include <com/sun/star/awt/UnoControlDateField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::DateField + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..e42a05c2e --- /dev/null +++ b/offapi/com/sun/star/form/control/FilterControl.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 . + */ + +#ifndef __com_sun_star_form_control_FilterControl_idl__ +#define __com_sun_star_form_control_FilterControl_idl__ + +#include <com/sun/star/awt/XControl.idl> +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/util/XNumberFormatter.idl> +#include <com/sun/star/beans/XPropertySet.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::CheckBox + service.</p> + + @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); +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..c5270f705 --- /dev/null +++ b/offapi/com/sun/star/form/control/FormattedField.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_control_FormattedField_idl__ +#define __com_sun_star_form_control_FormattedField_idl__ + +#include <com/sun/star/awt/UnoControlFormattedField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::FormattedField + service.</p> + + <p>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 <em>enter</em> key is pressed while it has the focus.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..5150f3de7 --- /dev/null +++ b/offapi/com/sun/star/form/control/GridControl.idl @@ -0,0 +1,131 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_control_GridControl_idl__ +#define __com_sun_star_form_control_GridControl_idl__ + +#include <com/sun/star/awt/UnoControl.idl> +#include <com/sun/star/form/XGrid.idl> +#include <com/sun/star/form/XBoundComponent.idl> +#include <com/sun/star/form/XGridFieldDataSupplier.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> +#include <com/sun/star/util/XModeSelector.idl> +#include <com/sun/star/container/XIndexAccess.idl> +#include <com/sun/star/container/XEnumerationAccess.idl> +#include <com/sun/star/container/XContainer.idl> +#include <com/sun/star/frame/XDispatchProviderInterception.idl> +#include <com/sun/star/view/XSelectionSupplier.idl> + + +module com { module sun { module star { module form { + +published interface XGridControl; + +module control { + + +/** describes a table-like control for displaying data. + + <p>The model of the control has to support the com::sun::star::form::component::GridControl + service.</p> + + @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. + + <p>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).</p> + */ + 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. + + <p>Besides the normal operation mode (which is used to display the database form's data) the control may + for instance support a filter mode.</p> + */ + [optional] interface com::sun::star::util::XModeSelector; + + /** used to control the selection of rows in the grid control. + + <p>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.<br/> + Here the elements of the Sequence are the bookmarks (in the com::sun::star::sdb::RowSet) + of the (to-be-) selected rows.</p> + */ + [optional] interface com::sun::star::view::XSelectionSupplier; + + /** allows external components to register dispatchers for some common form actions. + + <p>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.)<br/> + With the help of this interface, external components which wish to handle such travelings themselves can + register interceptors for the actions in question.</p> + + <p>Usual URLs to use include + <dl> + <dt>.uno:FormSlots/moveToFirst</dt><dd> move the cursor to the first record</dd> + <dt>.uno:FormSlots/moveToPrev</dt><dd> move the cursor to the previous record</dd> + <dt>.uno:FormSlots/moveToNext</dt><dd> move the cursor to the next record</dd> + <dt>.uno:FormSlots/moveToLast</dt><dd> move the cursor to the last record</dd> + <dt>.uno:FormSlots/moveToNew</dt><dd> move the cursor to the (one and only) <em>new</em> record</dd> + <dt>.uno:FormSlots/undoRecord</dt><dd> undo the changes done so far in the current record</dd> + </dl> + </p> + + <p>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.</p> + */ + [optional] interface com::sun::star::frame::XDispatchProviderInterception; +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..b99e93536 --- /dev/null +++ b/offapi/com/sun/star/form/control/GroupBox.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 . + */ + +#ifndef __com_sun_star_form_control_GroupBox_idl__ +#define __com_sun_star_form_control_GroupBox_idl__ + +#include <com/sun/star/awt/UnoControlGroupBox.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for visually grouping controls + + <p>The model of the control has to support the com::sun::star::form::component::GroupBox + service.</p> + + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service GroupBox +{ + service com::sun::star::awt::UnoControlGroupBox; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..4645d2596 --- /dev/null +++ b/offapi/com/sun/star/form/control/ImageButton.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 . + */ + +#ifndef __com_sun_star_form_control_ImageButton_idl__ +#define __com_sun_star_form_control_ImageButton_idl__ + +#include <com/sun/star/awt/UnoControlImageControl.idl> +#include <com/sun/star/form/XApproveActionBroadcaster.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::ImageButton + service.</p> + + <p>The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.</p> + + @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. + + <p>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<br/> + This may be interesting for e.g. forms which want to provide input validation before submitting + data.<br/> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..9c2f5f519 --- /dev/null +++ b/offapi/com/sun/star/form/control/ImageControl.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_control_ImageControl_idl__ +#define __com_sun_star_form_control_ImageControl_idl__ + +#include <com/sun/star/awt/UnoControlImageControl.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a control used for displaying images stored in a database. + + <p>The model of the control has to support the com::sun::star::form::component::DatabaseImageControl + service.</p> + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..8b56d5990 --- /dev/null +++ b/offapi/com/sun/star/form/control/InteractionGridControl.idl @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_control_InteractionGridControl_idl__ +#define __com_sun_star_form_control_InteractionGridControl_idl__ + +#include <com/sun/star/form/control/GridControl.idl> +#include <com/sun/star/frame/XDispatch.idl> + + + 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 + + <p>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: + <dl> + <dt>.uno:GridSlots/BrowserAttribs</dt><dd> (interactively) customize the overall appearance of the grid (font etc.)</dd> + <dt>.uno:GridSlots/RowHeight</dt><dd> (interactively) customize the row height appearance of the grid</dd> + <dt>.uno:GridSlots/ColumnAttribs</dt><dd> (interactively) customize the format of a given column</dd> + <dt>.uno:GridSlots/ColumnWidth</dt><dd> (interactively) customize the width of a given column</dd> + </dl> + </p> + + <p>The following parameters may be passed when dispatching the commands above (as before, concrete implementations + may extend this list): + <dl> + <dt>ColumnId</dt><dd> the id of the column in question, if the command is executed for a column</dd> + <dt>ColumnModelPos</dt><dd> the model position of the column in question, if the command is executed for a column</dd> + <dt>ColumnViewPos</dt><dd> the view position of the column in question, if the command is executed for a column. The + view position may differ from the model position, as in a grid control, columns can be hidden.</dd> + </dl> + </p> + */ + interface com::sun::star::frame::XDispatch; +}; + + +}; }; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ListBox.idl b/offapi/com/sun/star/form/control/ListBox.idl new file mode 100644 index 000000000..3e542f748 --- /dev/null +++ b/offapi/com/sun/star/form/control/ListBox.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_control_ListBox_idl__ +#define __com_sun_star_form_control_ListBox_idl__ + +#include <com/sun/star/awt/UnoControlListBox.idl> +#include <com/sun/star/form/XBoundControl.idl> +#include <com/sun/star/form/XChangeBroadcaster.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a list box control which can (but not necessarily has to) be bound to a database field. + + <p>The model of the control has to support the com::sun::star::form::component::ListBox + service.</p> + + @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. + + <p>HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. + <ul> + <li>the control loses the focus</li> + <li>the content of the control has changed, compared to the moment where it got the focus.</li> + </ul> + </p> + */ + interface com::sun::star::form::XChangeBroadcaster; +}; + + +}; }; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/NavigationToolBar.idl b/offapi/com/sun/star/form/control/NavigationToolBar.idl new file mode 100644 index 000000000..3b5562749 --- /dev/null +++ b/offapi/com/sun/star/form/control/NavigationToolBar.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 . + */ + +#ifndef __com_sun_star_form_control_NavigationToolBar_idl__ +#define __com_sun_star_form_control_NavigationToolBar_idl__ + +#include <com/sun/star/awt/UnoControl.idl> + + +module com { module sun { module star { module form { module control { + + +/** This service specifies the model for control which provides controller + functionality for a com::sun::star::form::component::DataForm, such as navigating or filtering + the form. + + @see com::sun::star::form::component::NavigationToolBar +*/ +service NavigationToolBar +{ + service com::sun::star::awt::UnoControl; +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/NumericField.idl b/offapi/com/sun/star/form/control/NumericField.idl new file mode 100644 index 000000000..1b1114bfc --- /dev/null +++ b/offapi/com/sun/star/form/control/NumericField.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 . + */ + +#ifndef __com_sun_star_form_control_NumericField_idl__ +#define __com_sun_star_form_control_NumericField_idl__ + +#include <com/sun/star/awt/UnoControlNumericField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting numeric values and which can (but not necessarily has to) + be bound to a database field. + + <p>The model of the control has to support the com::sun::star::form::component::NumericField + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..1492362e6 --- /dev/null +++ b/offapi/com/sun/star/form/control/PatternField.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 . + */ + +#ifndef __com_sun_star_form_control_PatternField_idl__ +#define __com_sun_star_form_control_PatternField_idl__ + +#include <com/sun/star/awt/UnoControlPatternField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::PatternField + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..33409ecec --- /dev/null +++ b/offapi/com/sun/star/form/control/RadioButton.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 . + */ + +#ifndef __com_sun_star_form_control_RadioButton_idl__ +#define __com_sun_star_form_control_RadioButton_idl__ + +#include <com/sun/star/awt/UnoControlRadioButton.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + 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. + + <p>The model of the control has to support the com::sun::star::form::component::RadioButton + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..d84716627 --- /dev/null +++ b/offapi/com/sun/star/form/control/SubmitButton.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 . + */ + +#ifndef __com_sun_star_form_control_SubmitButton_idl__ +#define __com_sun_star_form_control_SubmitButton_idl__ + +#include <com/sun/star/awt/UnoControlButton.idl> +#include <com/sun/star/form/submission/XSubmission.idl> + + +module com { module sun { module star { module form { module control { + + +/** specifies a button control which can execute external submissions + + <p>The model of the control has to support the com::sun::star::form::component::SubmitButton + service.</p> + + <p>The control is clickable. When clicked (by mouse or keyboard, or programmatically), + the following happens: + <ol><li>Any com::sun::star::form::submission::XSubmissionVetoListeners registered + at the component are given the chance to veto the submission. + </li> + <li>The model of the control is examined for an external submission object. That is, + com::sun::star::form::submission::XSubmissionSupplier::getSubmission() + is called at the model.<br/> + If there is such a submission object, its + com::sun::star::form::submission::XSubmission::submit() method is invoked. + </li> + <li>If there is no external submission, the parent object of the model is examined + for the presence of the com::sun::star::form::XSubmit interface. If it + is present, it's com::sun::star::form::XSubmit::submit() method is + invoked.<br/> + Since the parent object of a submit button can only be a com::sun::star::form::component::Form, + this means that SubmitButtons are also able to submit com::sun::star::form::component::HTMLForms. + </li> + </ol> + </p> +*/ +service SubmitButton +{ + /** allows interception (and vetoing) of submissions triggered by the control. + */ + interface com::sun::star::form::submission::XSubmission; +}; + + +}; }; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/TextField.idl b/offapi/com/sun/star/form/control/TextField.idl new file mode 100644 index 000000000..1d88cecdf --- /dev/null +++ b/offapi/com/sun/star/form/control/TextField.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 . + */ + +#ifndef __com_sun_star_form_control_TextField_idl__ +#define __com_sun_star_form_control_TextField_idl__ + +#include <com/sun/star/awt/UnoControlEdit.idl> +#include <com/sun/star/form/XBoundControl.idl> +#include <com/sun/star/form/XChangeBroadcaster.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a control for entering arbitrary text which can (but not necessarily has to) be bound + to a database field. + + <p>The model of the control has to support the com::sun::star::form::component::TextField + service.</p> + + <p>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 <em>enter</em> is pressed while it has the focus.</p> + + @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. + + <p>HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. + <ul> + <li>the control loses the focus</li> + <li>the content of the control has changed, compared to the moment where it got the focus.</li> + </ul> + </p> + */ + interface com::sun::star::form::XChangeBroadcaster; +}; + + +}; }; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/TimeField.idl b/offapi/com/sun/star/form/control/TimeField.idl new file mode 100644 index 000000000..aede8244f --- /dev/null +++ b/offapi/com/sun/star/form/control/TimeField.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 . + */ + +#ifndef __com_sun_star_form_control_TimeField_idl__ +#define __com_sun_star_form_control_TimeField_idl__ + +#include <com/sun/star/awt/UnoControlTimeField.idl> +#include <com/sun/star/form/XBoundControl.idl> + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting time values which can (but not necessarily has to) be bound + to a database field. + + <p>The model of the control has to support the com::sun::star::form::component::TimeField + service.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + + +/* 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 000000000..66c3b8569 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.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 . + */ + +#ifndef __com_sun_star_form_inspection_ButtonNavigationHandler_idl__ +#define __com_sun_star_form_inspection_ButtonNavigationHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::component::CommandButton +*/ +service ButtonNavigationHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..3109b5439 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_inspection_CellBindingPropertyHandler_idl__ +#define __com_sun_star_form_inspection_CellBindingPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..b9deb1f74 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_form_inspection_DefaultFormComponentInspectorModel_idl__ +#define __com_sun_star_form_inspection_DefaultFormComponentInspectorModel_idl__ + +#include <com/sun/star/inspection/XObjectInspectorModel.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + +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. + + <p>A DefaultFormComponentInspectorModel provides the following handlers by default: + <ul><li>ButtonNavigationHandler</li> + <li>CellBindingPropertyHandler</li> + <li>EditPropertyHandler</li> + <li>EventHandler</li> + <li>FormComponentPropertyHandler</li> + <li>SubmissionPropertyHandler</li> + <li>XMLFormsPropertyHandler</li> + <li>XSDValidationPropertyHandler</li> + </ul></p> + + @see com::sun::star::inspection::XObjectInspectorModel::HandlerFactories +*/ +service DefaultFormComponentInspectorModel : com::sun::star::inspection::XObjectInspectorModel +{ + /** creates a default DefaultFormComponentInspectorModel, providing factories for all + handlers listed above. + + @since OOo 2.2 + */ + createDefault(); + + /** creates a default DefaultFormComponentInspectorModel, providing factories for all + handlers listed above, and describing an ObjectInspector which has a help section. + + @param minHelpTextLines + denotes the minimum number of lines of text to be reserved for the help + section. + + @param maxHelpTextLines + denotes the maximum number of lines of text to be reserved for the help + section. + + @throws ::com::sun::star::lang::IllegalArgumentException + if minHelpTextLines or maxHelpTextLines are negative, + or if minHelpTextLines is greater than maxHelpTextLines. + + @see XObjectInspectorModel::HasHelpSection + @see XObjectInspectorModel::MinHelpTextLines + @see XObjectInspectorModel::MaxHelpTextLines + + @since OOo 2.2 + */ + createWithHelpSection( + [in] long minHelpTextLines, + [in] long maxHelpTextLines + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/EditPropertyHandler.idl b/offapi/com/sun/star/form/inspection/EditPropertyHandler.idl new file mode 100644 index 000000000..81f6c6e45 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/EditPropertyHandler.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_inspection_EditPropertyHandler_idl__ +#define __com_sun_star_form_inspection_EditPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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 convenience wrappers for some properties existing at a form component + derived from com::sun::star::awt::UnoControlEditModel. + + <p>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.<p> + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..121990779 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/EventHandler.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 . + */ + +#ifndef __com_sun_star_form_inspection_EventHandler_idl__ +#define __com_sun_star_form_inspection_EventHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..1208373e5 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.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 . + */ + +#ifndef __com_sun_star_form_inspection_FormComponentPropertyHandler_idl__ +#define __com_sun_star_form_inspection_FormComponentPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..74bebe7c9 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_inspection_SubmissionPropertyHandler_idl__ +#define __com_sun_star_form_inspection_SubmissionPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..6718d2323 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.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 . + */ + +#ifndef __com_sun_star_form_inspection_XMLFormsPropertyHandler_idl__ +#define __com_sun_star_form_inspection_XMLFormsPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..e1100d20f --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_inspection_XSDValidationPropertyHandler_idl__ +#define __com_sun_star_form_inspection_XSDValidationPropertyHandler_idl__ + +#include <com/sun/star/inspection/XPropertyHandler.idl> + + +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. + + <p>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.</p> + + <p>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.</p> + + @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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..43e8a6ec5 --- /dev/null +++ b/offapi/com/sun/star/form/modules.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 . + */ +#ifndef __com_sun_star_modules_form_idl__ +#define __com_sun_star_modules_form_idl__ + +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 { }; + +}; }; }; }; + +#endif + +/* 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 000000000..246258109 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FeatureState.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 . + */ +#ifndef __com_sun_star_form_runtime_FeatureState_idl__ +#define __com_sun_star_form_runtime_FeatureState_idl__ + + +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; +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..9c4c33b06 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FilterEvent.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_FilterEvent_idl__ +#define __com_sun_star_form_runtime_FilterEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + +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 <em>disjunctive term</em> to which the event applies, if any. + */ + long DisjunctiveTerm; + + /** denotes the index of the <em>filter component</em> to which the event applies, if any. + */ + long FilterComponent; + + /** denotes the <em>predicate expression</em> associated with the event. + */ + string PredicateExpression; +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..48eaa6fed --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormController.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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_FormController_idl__ +#define __com_sun_star_form_runtime_FormController_idl__ + +#include <com/sun/star/form/runtime/XFormController.idl> + + +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; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..1d3fb50b4 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormFeature.idl @@ -0,0 +1,145 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_FormFeature_idl__ +#define __com_sun_star_form_runtime_FormFeature_idl__ + + +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. + + <p>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 <em>Position</em> of type <code>long</code>, which + denotes the position to move the form to.</p> + */ + const short MoveAbsolute = 1; + + /** determines the number of total records in the form, + including the potentially active insertion row. + + <p>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.</p> + + <p>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 (<code>*</code>) besides + the record count.</p> + */ + const short TotalRecords = 2; + + /// moves the form to the first record + const short MoveToFirst = 3; + + /// moves the form to the record before the current record, if there is any + const short MoveToPrevious = 4; + + /// moves the form to the record after the current record, if there is any + const short MoveToNext = 5; + + /// moves the form to the last record + const short MoveToLast = 6; + + /// moves the form to the insertion row, if privileges allow + const short MoveToInsertRow = 7; + + /** saves all changes in the form's current record, including changes in the current + control which had not yet been committed to the form + */ + const short SaveRecordChanges = 8; + + /** reverts all changes in the form's current record, including changes in the current + control which had not yet been committed to the form + */ + const short UndoRecordChanges = 9; + + /** deletes the current record, while honoring any registered + com::sun::star::form::XConfirmDeleteListeners + */ + const short DeleteRecord = 10; + + /// reloads the form content + const short ReloadForm = 11; + + /// sorts the form ascending by the field which the active form control is bound to. + const short SortAscending = 12; + + /// sorts the form descending by the field which the active form control is bound to. + const short SortDescending = 13; + + /// opens a dialog which allows the user to interactively specify a form sorting order + const short InteractiveSort = 14; + + /** adds a filter to the form, which is defined by the active form control and its + current value + + <p>For instance, if the currently active form control is bound to a table field + named <code>Price</code>, and currently has a value of <code>100</code>, then invoking + the <code>AutoFilter</code> operation will put an additional filter <code>Price = 100</code> + on the form.</p> + */ + const short AutoFilter = 15; + + /// opens a dialog which allows the user to interactively specify a form filter + const short InteractiveFilter = 16; + + /** toggles the com::sun::star::sdb::RowSet::ApplyFilter property + of the form. + */ + const short ToggleApplyFilter = 17; + + /** removes all filter and sort criteria put on the form. + + <p>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 <code>SELECT * FROM + Articles WHERE Price > 100</code>, then the <code>Price > 100</code> filter + will not be removed.</p> + + <p>Effectively, this operation resets the com::sun::star::sdb::RowSet::Filter + and com::sun::star::sdb::RowSet::Order properties of the form.</p> + */ + const short RemoveFilterAndSort = 18; + + /** refreshes the current control + + <p>Basically, this means calling XRefreshable::refresh on the current control, if it supports + this interface.</p> + + @since OOo 3.1 + */ + const short RefreshCurrentControl = 19; +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..032042d4b --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormOperations.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 . + */ + +#ifndef __com_sun_star_form_runtime_FormOperations_idl__ +#define __com_sun_star_form_runtime_FormOperations_idl__ + +#include <com/sun/star/form/runtime/XFormOperations.idl> +#include <com/sun/star/form/runtime/XFormController.idl> +#include <com/sun/star/form/XForm.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + + +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 a <code>FormOperations</code> 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 <code>FormOperations</code> 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 + ); +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..49a36594f --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_XFeatureInvalidation_idl__ +#define __com_sun_star_form_runtime_XFeatureInvalidation_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +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 + + <p>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.</p> + + @param Features + The set of features whose state might have changed. + */ + void invalidateFeatures( [in] sequence< short > Features ); + + /** invalidates all features + + <p>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.</p> + */ + void invalidateAllFeatures(); +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..6a2234bb8 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterController.idl @@ -0,0 +1,172 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_XFilterController_idl__ +#define __com_sun_star_form_runtime_XFilterController_idl__ + +#include <com/sun/star/awt/XControl.idl> +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> + + +module com { module sun { module star { module form { module runtime { + + +interface XFilterControllerListener; + +/** provides access to a form based filter for a database form + + <p>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 <em>predicate expression</em> is basically a part of an + SQL <code>WHERE</code> clause, but without the part denoting the database column. For instance, if you + have a form control bound to a table column named <code>Name</code>, then entering the string + <code>LIKE '%Smith%'</code> effectively constitutes a SQL <code>WHERE</code> clause <code>"Name" LIKE '%Smith%'</code>.</p> + + <p>In the actual document view, there are usually some relaxations to this. For instance, keywords such as + <code>LIKE</code> might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion, + the equality sign <code>=</code> is usually omitted. However, this interface here provides programmatic access + to the form based filter, so those relaxations are not considered here.</p> + + <p>The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL <code>WHERE</code> + class. That is, it is a disjunction of <em>m</em> terms, where each term is a conjunction of <em>n</em> clauses + of the form <code><column> <predicate> <literal></code> or of the form <code><em><column> + IS [NOT] NULL</em></code>.</p> + + <p><em>n</em> 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, <em>m</em>, the number of disjunctive + terms, is dynamic.</p> + + <a name="active_term"></a> + <p>With the above, there are potentially <em>m * n</em> <em>predicate expressions</em> (though usually only a fraction + of those will actually exist). Since in a form based filter, there are only <em>n</em> filter controls, and each + filter control displays exactly one <em>predicate expression</em>, this means that only a part of the complete + filter can be displayed, in particular, only one <em>disjunctive term</em> can be displayed at a time. Thus, + the filter controller knows the concept of an <em>active term</em>, denoted by the #ActiveTerm + attribute, controls which of the terms is currently displayed in the form controls.</p> + + @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. + + <p>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 <em>filter components</em>, or filter controls, which the filter controller is responsible + for. + + <p>This number is constant during one session of the form based filter.</p> + */ + [attribute, readonly] long FilterComponents; + + /** is the number of <em>disjunctive terms</em> of the filter expression represented by the form based filter. + */ + [attribute, readonly] long DisjunctiveTerms; + + /** denotes the <a href="#active_term"><em>active term</em></a> of the filter controller. + */ + [attribute] long ActiveTerm + { + set raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + }; + + /** sets a given <em>predicate expression</em> + + @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 <em>disjunctive term</em> in which the expression is to be set. Must be greater than or equal to 0, + and smaller than #DisjunctiveTerms. + + @param PredicateExpression + denotes the <em>predicate expression</em> 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. + + <p>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 <code>BoundField</code> + property.</p> + + @param Component + denotes the index of the filter component whose control should be obtained. Must be greater than or equal to 0, + and smaller than #FilterComponents. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Component is out of the allowed range. + + @see ::com::sun::star::form::DataAwareControlModel::BoundField + */ + ::com::sun::star::awt::XControl + getFilterComponent( [in] long Component ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the entirety of the <em>predicate expressions</em> represented by the filter controller. + + <p>Each element of the returned sequence is a <em>disjunctive term</em>, having exactly #FilterComponents + elements, which denote the single <em>predicate expressions</em> of this term.</p> + */ + sequence< sequence< string > > + getPredicateExpressions(); + + /** removes a given <em>disjunctive term</em> + + @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(); +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..448aa0b0c --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_XFilterControllerListener_idl__ +#define __com_sun_star_form_runtime_XFilterControllerListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/form/runtime/FilterEvent.idl> + + +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 <em>predicate expression</em> of the filter represented by the filter + controller changed. + + <p>FilterEvent::DisjunctiveTerm is the index of the <em>disjunctive term</em> in which the + expression changed. This usually equals XFilterController::ActiveTerm.</p> + + <p>FilterEvent::FilterComponent denotes the index of the filter component whose + <em>predicate expression</em> changed.</p> + + <p>FilterEvent::PredicateExpression is the new <em>predicate expressions</em>.</p> + */ + void predicateExpressionChanged( [in] FilterEvent Event ); + + /** is fired when a <em>disjunctive term</em> was removed from the filter of the filter controller. + + <p>FilterEvent::DisjunctiveTerm is the index of the <em>disjunctive term</em> which was + removed.</p> + + <p>FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.</p> + */ + void disjunctiveTermRemoved( [in] FilterEvent Event ); + + /** is fired when a <em>disjunctive term</em> was added to the filter of the filter controller. + + <p>FilterEvent::DisjunctiveTerm is the index of the <em>disjunctive term</em> which was + added.</p> + + <p>FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.</p> + */ + void disjunctiveTermAdded( [in] FilterEvent Event ); +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..20fc00b4a --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -0,0 +1,364 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_XFormController_idl__ +#define __com_sun_star_form_runtime_XFormController_idl__ + +#include <com/sun/star/awt/XTabController.idl> +#include <com/sun/star/container/XChild.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/container/XIndexAccess.idl> +#include <com/sun/star/container/XEnumerationAccess.idl> +#include <com/sun/star/util/XModifyBroadcaster.idl> +#include <com/sun/star/util/XModeSelector.idl> +#include <com/sun/star/form/XConfirmDeleteBroadcaster.idl> +#include <com/sun/star/sdb/XSQLErrorBroadcaster.idl> +#include <com/sun/star/sdb/XRowSetApproveBroadcaster.idl> +#include <com/sun/star/form/XDatabaseParameterBroadcaster2.idl> +#include <com/sun/star/form/XFormControllerListener.idl> +#include <com/sun/star/task/XInteractionHandler.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/form/runtime/XFilterController.idl> + + +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. + + <p>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.<br/> + Such a <code>FormController</code> is responsible for dialog processing, + like controlling the tab order and the grouping of controls.</p> + + <p>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 <code>n</code><sup>th</sup> child of + a controller gives you the same object as retrieving the <code>n</code><sup>th</sup> child of + the model of the controller.</p> + + <p>A controller is called <em>active</em> 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.</p> + + <p>This interface supersedes the com::sun::star::form::FormController.</p> + + <h3>Responsibilities</h3> + <p>A FormController is responsible for a com::sun::star::awt::UnoControlContainer, + and all controls therein.</p> + + <p>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.</p> + + <p>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.</p> + + <p>Second, the controls are examined for NULL values. If a control is bound to a database field which + is declared to be <code>NOT NULL</code>, 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.</p> + + <p>Note that you can present the second check - for database fields containing `NULL` values - on + a per-form and a per-database basis.<br/> + For the former, you need to add a boolean property <code>FormsCheckRequiredFields</code> to the form + (aka the <code>FormController</code>'s model), using its + com::sun::star::beans::XPropertyContainer::addProperty() method, with a value + of `FALSE`.<br/> + For the latter, you need to set the respective property of the data source's <code>Settings</code> + (also named <code>FormsCheckRequiredFields</code>) to `FALSE`.</p> + + <p>Alternatively, you can prevent the check on a per-control basis, using the + DataAwareControlModel::InputRequired property of a single control model.</p> + + <p>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.</p> + + <p>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.</p> + + <p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is + appended which describes the requested functionality.<br/> + Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for + requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p> + + <p>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.</p> + + <p>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.<br/> + For instance, the URL with the suffix <em>moveToFirst</em> 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.</p> + + <table style="width:100%;" border="0" cellpadding="2" cellspacing="2"> + + <tr style="vertical-align: top;"> + <td><b>URL suffix</b></td> + <td><b>functionality</b></td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>positionForm</em></td> + <td>positions the form on a record given by absolute number.<br/> + There's one parameter for this functionality, named <em>Position</em>, which must be a long + value specifying the absolute position to which the form should be moved</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>RecordCount</em></td> + <td>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.<br/> + 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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>moveToFirst</em></td> + <td>moves the form to the first record</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>moveToPrev</em></td> + <td>moves the form to the record preceding the current one</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>moveToNext</em></td> + <td>moves the form to the record after the current one</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>moveToLast</em></td> + <td>moves the form to the last record</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>moveToNew</em></td> + <td>moves the form to the virtual "insert row", where new records can be inserted</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>saveRecord</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>undoRecord</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>deleteRecord</em></td> + <td>deletes the current record, after asking the user for confirmation.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>refreshForm</em></td> + <td>reloads the complete form. After this, the form is positioned on the first record</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>sortUp</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>sortDown</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>sort</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>autoFilter</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>filter</em></td> + <td>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.</td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>applyFilter</em></td> + <td><p>Toggles the com::sun::star::sdb::RowSet::ApplyFilter property + of the form.</p> + <p>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.</p></td> + </tr> + + <tr style="vertical-align: top;"> + <td><em>removeFilterOrder</em></td> + <td>completely removes any filter and sorting order from the form, and reloads it.</td> + </tr> + </table> + + @see ::com::sun::star::form::component:Form + @see ::com::sun::star::form::binding::BindableControlModel + @see ::com::sun::star::sdb::DataSource::Settings + + @since OOo 3.3 + */ +interface XFormController +{ + /** is used for tab controlling and grouping of the controls. + + <p>The model obtained via com::sun::star::awt::XTabController::getModel() is the form for which the + controller is responsible.</p> + */ + 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. + + <p>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.</p> + */ + interface ::com::sun::star::form::XConfirmDeleteBroadcaster; + + /** is used to notify errors which happen in the form the controller is responsible for. + + <p>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.</p> + + */ + 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. + + <p>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.</p> + */ + interface ::com::sun::star::form::XDatabaseParameterBroadcaster2; + + /** allows switching the form controller to different operation modes. + + <a name="mode_selector"></a> + <p>The two modes usually (but not necessarily) supported by a form controller are the <code>DataMode</code> + and the <code>FilterMode</code>, 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.</p> + */ + interface ::com::sun::star::util::XModeSelector; + + /** allows controlling the filter mode. + + <p>If the form controller supports a <a href="#mode_selector">form based filter mode</a>, then it shall also + support the XFilterController interface, which allows controlling this mode.</p> + */ + [optional] interface XFilterController; + + /** denotes the instance which is used to implement operations on the form which the controller + works for. + + <p>This instance can be used, for instance, to determine the current state of certain form features.</p> + */ + [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 ); +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..73e467b4e --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormControllerContext.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 . + */ + +#ifndef __com_sun_star_form_runtime_XFormControllerContext_idl__ +#define __com_sun_star_form_runtime_XFormControllerContext_idl__ + +#include <com/sun/star/awt/XControl.idl> + + +module com { module sun { module star { module form { module runtime { + + +/** provides a context for a FormController + +<p>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 <code>XFormControllerContext</code>.</p> + */ +interface XFormControllerContext +{ + /** ensures the given control is visible, by scrolling the view if necessary. + */ + void makeVisible( [in] ::com::sun::star::awt::XControl Control ); +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFormOperations.idl b/offapi/com/sun/star/form/runtime/XFormOperations.idl new file mode 100644 index 000000000..a3c4f9e04 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormOperations.idl @@ -0,0 +1,257 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_runtime_XFormOperations_idl__ +#define __com_sun_star_form_runtime_XFormOperations_idl__ + +#include <com/sun/star/form/runtime/FeatureState.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/sdbc/XRowSet.idl> +#include <com/sun/star/sdbc/XResultSetUpdate.idl> +#include <com/sun/star/form/runtime/XFormController.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> +#include <com/sun/star/beans/NamedValue.idl> + + +module com { module sun { module star { module form { module runtime { + +interface XFeatureInvalidation; + + +/** encapsulates operations on a database form. + + <p>This instance allows for operations on a user interface form, by saving its clients + from various tedious and error-prone operations.</p> + + <p>As an example, imagine you have a database form, displayed in some user + interface, which you want to move to the next record.<br/> + 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.<br/> + But then you're done, right? Wrong, again.<br/> + 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.<br/> + <em>Now</em> you're done ...</p> + + <p>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.</p> + + <p>If you agree that this is ugly to do and maintain, then <code>XFormOperations</code> + 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.</p> + + @see FormFeature + + @since OOo 2.2 + */ +interface XFormOperations : ::com::sun::star::lang::XComponent +{ + /** provides access to the cursor of the form the instance is operating on. + */ + [attribute, readonly] ::com::sun::star::sdbc::XRowSet Cursor; + + /** provides access to the update cursor of the form the instance is operating on. + */ + [attribute, readonly] ::com::sun::star::sdbc::XResultSetUpdate UpdateCursor; + + /** provides access to the form controller which the instance is operating on. + + <p>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.</p> + */ + [attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller; + + /** retrieves the current state of the given feature + + <p>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 <code>boolean</code> + evaluating to `TRUE`.<p> + + @param Feature + the feature whose state is to be determined. Must be one of the FormFeature + constants.<br/> + An invalid value here will be silently ignored, and simply return a FeatureState + indicating <em>disabled</em> with a `NULL` state.</p> + */ + FeatureState getState( + [in] short Feature + ); + + /** determines whether a feature is currently enabled. + + <p>Calling this is equivalent to calling getState(), and evaluating the + FeatureState::Enabled member.</p> + + @param Feature + the feature whose state is to be determined. Must be one of the FormFeature + constants.<br/> + An invalid value here will be silently ignored, and simply return `FALSE`. + */ + boolean isEnabled( + [in] short Feature + ); + + /** executes the operation associated with the given feature + + @param Feature + the feature which is to be executed. Must be one of the FormFeature + constants. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given Feature is unknown, not executable, or strictly requires arguments + to be executed. + + @throws ::com::sun::star::sdbc::SQLException + if a database access error occurs + + @throws ::com::sun::star::lang::WrappedTargetException + if an exception is caught which is no com::sun::star::uno::RuntimeException + and no com::sun::star::sdbc::SQLException. + + @see executeWithArguments + */ + void execute( + [in] short Feature + ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::sdbc::SQLException + , ::com::sun::star::lang::WrappedTargetException + ); + + /** executes the operation associated with the given feature, with passing arguments for execution + + @param Feature + the feature which is to be executed. Must be one of the FormFeature + constants. + + @param Arguments + the named arguments for the feature to execute. See the FormFeature list + for features which require arguments. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given feature is unknown, or not executable + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given arguments are not sufficient to execute the feature + + @throws ::com::sun::star::sdbc::SQLException + if a database access error occurs + + @throws ::com::sun::star::lang::WrappedTargetException + if an exception is caught which is no com::sun::star::uno::RuntimeException + and no com::sun::star::sdbc::SQLException. + */ + void executeWithArguments( + [in] short Feature, + [in] sequence< ::com::sun::star::beans::NamedValue > Arguments + ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::sdbc::SQLException + , ::com::sun::star::lang::WrappedTargetException + ); + + /** commits the current record of the form + + @param RecordInserted + will be `TRUE` if a record has been inserted, i.e. the form was positioned + on the insertion row. + + @return + `TRUE` if and only if the current record needed being committed. That's the + case if the record or the active control of the form were modified. + + @throws ::com::sun::star::sdbc::SQLException + if a database access error occurs + */ + boolean commitCurrentRecord( + [out] boolean RecordInserted + ) + raises ( ::com::sun::star::sdbc::SQLException ); + + /** commits the current control of our controller + + @throws ::com::sun::star::sdbc::SQLException + if a database access error occurs + */ + boolean commitCurrentControl( + ) + raises ( ::com::sun::star::sdbc::SQLException ); + + /** determines whether the form is currently positioned on the insertion row + + <p>This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsNew property of the form.</p> + + @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 + + <p>This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsModified property of the form.</p> + + @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. + + <p>If this attribute is not `NULL`, the instance which it denotes will be notified + whenever the state of any supported feature might have changed.</p> + + <p>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.</p> + + <p>Note that the instance does not actually notify changes in the feature states, but only + <em>potential</em> 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.</p> + + @see FormFeature + */ + [attribute] XFeatureInvalidation FeatureInvalidation; +}; + + +}; }; }; }; }; + + +#endif + +/* 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 000000000..92f955a3b --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmission.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 . + */ + +#ifndef __com_sun_star_form_submission_XSubmission_idl__ +#define __com_sun_star_form_submission_XSubmission_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/util/VetoException.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> +#include <com/sun/star/lang/NoSupportException.idl> +#include <com/sun/star/task/XInteractionHandler.idl> + + +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 ); +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..61ef2d8ee --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionSupplier.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 . + */ + +#ifndef __com_sun_star_form_submission_XSubmissionSupplier_idl__ +#define __com_sun_star_form_submission_XSubmissionSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +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; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..8c4b46b01 --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_submission_XSubmissionVetoListener_idl__ +#define __com_sun_star_form_submission_XSubmissionVetoListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/util/VetoException.idl> + + +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 ); + +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..33a94d2c6 --- /dev/null +++ b/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ +#define __com_sun_star_form_validation_ValidatableBindableControlModel_idl__ + +#include <com/sun/star/form/validation/ValidatableControlModel.idl> +#include <com/sun/star/form/binding/BindableControlModel.idl> + +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. + + <p>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): + <ul><li>binding the value to an external component via com::sun::star::form::binding::XBindableValue</li> + <li>validating the current value by an external component, via XValidatable and XValidator</li> + </ul></p> + + <p>The ValidatableBindableControlModel services describes the interaction of these concepts + for control models which support both of them.</p> +*/ +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 + + <p>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().<br/> + 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().</p> + */ + service com::sun::star::form::binding::BindableControlModel; +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/ValidatableControlModel.idl b/offapi/com/sun/star/form/validation/ValidatableControlModel.idl new file mode 100644 index 000000000..cf5591e09 --- /dev/null +++ b/offapi/com/sun/star/form/validation/ValidatableControlModel.idl @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_validation_ValidatableControlModel_idl__ +#define __com_sun_star_form_validation_ValidatableControlModel_idl__ + +#include <com/sun/star/form/FormControlModel.idl> +#include <com/sun/star/form/validation/XValidatableFormComponent.idl> +#include <com/sun/star/form/validation/XValidityConstraintListener.idl> + + +module com { module sun { module star { module form { module validation { + +/** specifies the model of a form control which supports live validation of its + input. + + <p>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.</p> +*/ +service ValidatableControlModel +{ + /** specifies the basic functionality for a form control model + + <p>Via this service, validatable control models inherit the + com::sun::star::util::XCloneable interface.<br/> + 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.</p> + */ + service com::sun::star::form::FormControlModel; + + /** enables support for validating the value of the control model + + <p>Setting and retrieving the current validator of the control model is + possible via the XValidatable interface (which + XValidatableFormComponent is derived from).</p> + + <p>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().</p> + + <p>Note that the type of the value provided by XValidatableFormComponent::getCurrentValue() + is not specified here, but depends on the concrete control type.</p> + */ + interface XValidatableFormComponent; + + /** enables support for validators with dynamic validity constraints. + + <p>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.</p> + */ + interface XValidityConstraintListener; +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..381ae0df4 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XFormComponentValidityListener.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 . + */ + +#ifndef __com_sun_star_form_validation_XFormComponentValidityListener_idl__ +#define __com_sun_star_form_validation_XFormComponentValidityListener_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/XEventListener.idl> + + +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 ); +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..5aa5aee25 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatable.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_validation_XValidatable_idl__ +#define __com_sun_star_form_validation_XValidatable_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/util/VetoException.idl> + + +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 + + <p>Any previously active validator will be revoked - there can be only one!</p> + + @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( ); +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..f15bfc535 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl @@ -0,0 +1,109 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_form_validation_XValidatableFormComponent_idl__ +#define __com_sun_star_form_validation_XValidatableFormComponent_idl__ + +#include <com/sun/star/form/validation/XValidatable.idl> +#include <com/sun/star/lang/NoSupportException.idl> +#include <com/sun/star/lang/NullPointerException.idl> + + +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. + + <p>A validatable form component has two aspects which other parties might + be interested in: + <ul> + <li>The pure validity flag: Whatever the user enters in the component, this is + either valid (relative to the active validator), or invalid.</li> + <li>The current value: Even if the validity flag does not change with the user + input (e.g. because the user replaces one invalid value with another invalid + value), observers might be interested in the current value, for example to + include it in a feedback message to the user.</li> + </ul> + </p> + + <p>An XValidatableFormComponent allows to easily access both of these aspects.</p> + + <p>Note that all of the information provided at this interface can also obtained by other means, + but much more inconveniently.</p> + + @see XValidatable + @see XValidator +*/ +interface XValidatableFormComponent : XValidatable +{ + /** determines whether the current value of the component passed the validity test + at the validator. + + <p>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().</p> + + <p>If no validator has been set (XValidatable::setValidator()), this method + returns true.</p> + */ + boolean isValid(); + + /** retrieves the current value of the component. + + <p>The type of the current value, as well as it's semantics, depend on the service + implementing this interface.</p> + + <p>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.</p> + + <p>If no validator has been set (XValidatable::setValidator()), the value returned + here is defined by the service implementing this interface.</p> + */ + any getCurrentValue(); + + /** registers the given listener. + + <p>XFormComponentValidityListeners are called whenever <em>any</em> of the aspects + of the validatable form component (the validity flag, or the value) changed.</p> + + @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 ); +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..bacca7703 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidator.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 . + */ + +#ifndef __com_sun_star_form_validation_XValidator_idl__ +#define __com_sun_star_form_validation_XValidator_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/NullPointerException.idl> + + +module com { module sun { module star { module form { module validation { + +interface XValidityConstraintListener; + + +/** specifies a component able to validate (the content of) other components + + <p>Validators support simple validity checks and retrieving justifications for + invalidity.</p> + + <p>Validators may additionally support dynamic validity constraints. In such a case, + the validity of a given value may change, without the value changing itself.<br/> + 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. + + <p>Usually, an XValidatable instance will also add itself as validity listener, + as soon as the validator is introduced to it.</p> + + <p>Implementations which do not support dynamic validity constraints should simply ignore this + call.</p> + + @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 ); +}; + + +}; }; }; }; }; + +#endif + +/* 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 000000000..5d6136b0c --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidityConstraintListener.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 . + */ + +#ifndef __com_sun_star_form_validation_XValidityConstraintListener_idl__ +#define __com_sun_star_form_validation_XValidityConstraintListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + + +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 ); +}; + + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |