From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- offapi/com/sun/star/form/ControlFontDialog.idl | 35 +++ offapi/com/sun/star/form/DataAwareControlModel.idl | 159 ++++++++++ offapi/com/sun/star/form/DataSelectionType.idl | 40 +++ offapi/com/sun/star/form/DatabaseDeleteEvent.idl | 38 +++ .../com/sun/star/form/DatabaseParameterEvent.idl | 46 +++ offapi/com/sun/star/form/ErrorEvent.idl | 38 +++ offapi/com/sun/star/form/FormButtonType.idl | 57 ++++ offapi/com/sun/star/form/FormComponent.idl | 93 ++++++ offapi/com/sun/star/form/FormComponentType.idl | 127 ++++++++ offapi/com/sun/star/form/FormComponents.idl | 74 +++++ offapi/com/sun/star/form/FormControlModel.idl | 78 +++++ offapi/com/sun/star/form/FormController.idl | 49 +++ .../com/sun/star/form/FormControllerDispatcher.idl | 37 +++ offapi/com/sun/star/form/FormSubmitEncoding.idl | 52 ++++ offapi/com/sun/star/form/FormSubmitMethod.idl | 45 +++ offapi/com/sun/star/form/Forms.idl | 37 +++ offapi/com/sun/star/form/ListSourceType.idl | 67 ++++ offapi/com/sun/star/form/NavigationBarMode.idl | 64 ++++ .../sun/star/form/PropertyBrowserController.idl | 116 +++++++ offapi/com/sun/star/form/TabOrderDialog.idl | 37 +++ offapi/com/sun/star/form/TabulatorCycle.idl | 65 ++++ .../sun/star/form/XApproveActionBroadcaster.idl | 55 ++++ .../com/sun/star/form/XApproveActionListener.idl | 52 ++++ offapi/com/sun/star/form/XBoundComponent.idl | 54 ++++ offapi/com/sun/star/form/XBoundControl.idl | 52 ++++ offapi/com/sun/star/form/XChangeBroadcaster.idl | 59 ++++ offapi/com/sun/star/form/XChangeListener.idl | 48 +++ .../sun/star/form/XConfirmDeleteBroadcaster.idl | 60 ++++ .../com/sun/star/form/XConfirmDeleteListener.idl | 46 +++ .../star/form/XDatabaseParameterBroadcaster.idl | 57 ++++ .../star/form/XDatabaseParameterBroadcaster2.idl | 57 ++++ .../sun/star/form/XDatabaseParameterListener.idl | 47 +++ offapi/com/sun/star/form/XDeleteListener.idl | 54 ++++ offapi/com/sun/star/form/XErrorBroadcaster.idl | 49 +++ offapi/com/sun/star/form/XErrorListener.idl | 49 +++ offapi/com/sun/star/form/XForm.idl | 39 +++ offapi/com/sun/star/form/XFormComponent.idl | 39 +++ offapi/com/sun/star/form/XFormController.idl | 39 +++ .../com/sun/star/form/XFormControllerListener.idl | 58 ++++ offapi/com/sun/star/form/XForms.idl | 74 +++++ offapi/com/sun/star/form/XFormsSupplier.idl | 79 +++++ offapi/com/sun/star/form/XFormsSupplier2.idl | 47 +++ offapi/com/sun/star/form/XGrid.idl | 57 ++++ offapi/com/sun/star/form/XGridColumnFactory.idl | 63 ++++ offapi/com/sun/star/form/XGridControl.idl | 51 +++ offapi/com/sun/star/form/XGridControlListener.idl | 41 +++ .../com/sun/star/form/XGridFieldDataSupplier.idl | 71 +++++ offapi/com/sun/star/form/XGridPeer.idl | 54 ++++ .../com/sun/star/form/XImageProducerSupplier.idl | 44 +++ offapi/com/sun/star/form/XInsertListener.idl | 51 +++ offapi/com/sun/star/form/XLoadListener.idl | 85 +++++ offapi/com/sun/star/form/XLoadable.idl | 77 +++++ offapi/com/sun/star/form/XPositioningListener.idl | 45 +++ offapi/com/sun/star/form/XReset.idl | 58 ++++ offapi/com/sun/star/form/XResetListener.idl | 65 ++++ offapi/com/sun/star/form/XRestoreListener.idl | 49 +++ offapi/com/sun/star/form/XSubmit.idl | 71 +++++ offapi/com/sun/star/form/XSubmitListener.idl | 54 ++++ offapi/com/sun/star/form/XUpdateBroadcaster.idl | 58 ++++ offapi/com/sun/star/form/XUpdateListener.idl | 61 ++++ .../sun/star/form/binding/BindableControlModel.idl | 72 +++++ .../form/binding/BindableDataAwareControlModel.idl | 110 +++++++ .../star/form/binding/BindableDatabaseCheckBox.idl | 73 +++++ .../star/form/binding/BindableDatabaseComboBox.idl | 51 +++ .../form/binding/BindableDatabaseDateField.idl | 48 +++ .../binding/BindableDatabaseFormattedField.idl | 47 +++ .../star/form/binding/BindableDatabaseListBox.idl | 70 +++++ .../form/binding/BindableDatabaseNumericField.idl | 47 +++ .../form/binding/BindableDatabaseRadioButton.idl | 70 +++++ .../form/binding/BindableDatabaseTextField.idl | 50 +++ .../form/binding/BindableDatabaseTimeField.idl | 48 +++ .../form/binding/BindableIntegerValueRange.idl | 57 ++++ .../form/binding/IncompatibleTypesException.idl | 36 +++ .../form/binding/InvalidBindingStateException.idl | 36 +++ .../com/sun/star/form/binding/ListEntryEvent.idl | 56 ++++ .../com/sun/star/form/binding/ListEntrySource.idl | 49 +++ offapi/com/sun/star/form/binding/ValueBinding.idl | 95 ++++++ .../com/sun/star/form/binding/XBindableValue.idl | 57 ++++ .../sun/star/form/binding/XListEntryListener.idl | 68 ++++ .../com/sun/star/form/binding/XListEntrySink.idl | 50 +++ .../com/sun/star/form/binding/XListEntrySource.idl | 76 +++++ .../star/form/binding/XListEntryTypedSource.idl | 40 +++ offapi/com/sun/star/form/binding/XValueBinding.idl | 76 +++++ offapi/com/sun/star/form/component/CheckBox.idl | 65 ++++ offapi/com/sun/star/form/component/ComboBox.idl | 53 ++++ .../com/sun/star/form/component/CommandButton.idl | 95 ++++++ .../com/sun/star/form/component/CurrencyField.idl | 52 ++++ offapi/com/sun/star/form/component/DataForm.idl | 184 +++++++++++ .../sun/star/form/component/DatabaseCheckBox.idl | 43 +++ .../sun/star/form/component/DatabaseComboBox.idl | 69 +++++ .../star/form/component/DatabaseCurrencyField.idl | 38 +++ .../sun/star/form/component/DatabaseDateField.idl | 38 +++ .../star/form/component/DatabaseFormattedField.idl | 51 +++ .../star/form/component/DatabaseImageControl.idl | 96 ++++++ .../sun/star/form/component/DatabaseListBox.idl | 147 +++++++++ .../star/form/component/DatabaseNumericField.idl | 38 +++ .../star/form/component/DatabasePatternField.idl | 52 ++++ .../star/form/component/DatabaseRadioButton.idl | 38 +++ .../sun/star/form/component/DatabaseTextField.idl | 51 +++ .../sun/star/form/component/DatabaseTimeField.idl | 38 +++ offapi/com/sun/star/form/component/DateField.idl | 55 ++++ offapi/com/sun/star/form/component/FileControl.idl | 53 ++++ offapi/com/sun/star/form/component/FixedText.idl | 43 +++ offapi/com/sun/star/form/component/Form.idl | 60 ++++ .../com/sun/star/form/component/FormattedField.idl | 47 +++ offapi/com/sun/star/form/component/GridControl.idl | 142 +++++++++ offapi/com/sun/star/form/component/GroupBox.idl | 39 +++ offapi/com/sun/star/form/component/HTMLForm.idl | 70 +++++ .../com/sun/star/form/component/HiddenControl.idl | 48 +++ offapi/com/sun/star/form/component/ImageButton.idl | 80 +++++ offapi/com/sun/star/form/component/ListBox.idl | 60 ++++ .../sun/star/form/component/NavigationToolBar.idl | 117 +++++++ .../com/sun/star/form/component/NumericField.idl | 54 ++++ .../com/sun/star/form/component/PatternField.idl | 53 ++++ offapi/com/sun/star/form/component/RadioButton.idl | 85 +++++ .../sun/star/form/component/RichTextControl.idl | 65 ++++ offapi/com/sun/star/form/component/ScrollBar.idl | 52 ++++ offapi/com/sun/star/form/component/SpinButton.idl | 52 ++++ .../com/sun/star/form/component/SubmitButton.idl | 47 +++ offapi/com/sun/star/form/component/TextField.idl | 60 ++++ offapi/com/sun/star/form/component/TimeField.idl | 55 ++++ offapi/com/sun/star/form/control/CheckBox.idl | 43 +++ offapi/com/sun/star/form/control/ComboBox.idl | 43 +++ offapi/com/sun/star/form/control/CommandButton.idl | 61 ++++ offapi/com/sun/star/form/control/CurrencyField.idl | 44 +++ offapi/com/sun/star/form/control/DateField.idl | 44 +++ offapi/com/sun/star/form/control/FilterControl.idl | 43 +++ .../com/sun/star/form/control/FormattedField.idl | 49 +++ offapi/com/sun/star/form/control/GridControl.idl | 114 +++++++ offapi/com/sun/star/form/control/GroupBox.idl | 41 +++ offapi/com/sun/star/form/control/ImageButton.idl | 61 ++++ offapi/com/sun/star/form/control/ImageControl.idl | 47 +++ .../star/form/control/InteractionGridControl.idl | 59 ++++ offapi/com/sun/star/form/control/ListBox.idl | 55 ++++ .../sun/star/form/control/NavigationToolBar.idl | 39 +++ offapi/com/sun/star/form/control/NumericField.idl | 44 +++ offapi/com/sun/star/form/control/PatternField.idl | 44 +++ offapi/com/sun/star/form/control/RadioButton.idl | 43 +++ offapi/com/sun/star/form/control/SubmitButton.idl | 61 ++++ offapi/com/sun/star/form/control/TextField.idl | 60 ++++ offapi/com/sun/star/form/control/TimeField.idl | 44 +++ .../form/inspection/ButtonNavigationHandler.idl | 46 +++ .../form/inspection/CellBindingPropertyHandler.idl | 49 +++ .../DefaultFormComponentInspectorModel.idl | 81 +++++ .../star/form/inspection/EditPropertyHandler.idl | 50 +++ .../com/sun/star/form/inspection/EventHandler.idl | 44 +++ .../inspection/FormComponentPropertyHandler.idl | 34 ++ .../form/inspection/SubmissionPropertyHandler.idl | 48 +++ .../form/inspection/XMLFormsPropertyHandler.idl | 54 ++++ .../inspection/XSDValidationPropertyHandler.idl | 58 ++++ offapi/com/sun/star/form/modules.idl | 57 ++++ offapi/com/sun/star/form/runtime/FeatureState.idl | 47 +++ offapi/com/sun/star/form/runtime/FilterEvent.idl | 49 +++ .../com/sun/star/form/runtime/FormController.idl | 33 ++ offapi/com/sun/star/form/runtime/FormFeature.idl | 140 +++++++++ .../com/sun/star/form/runtime/FormOperations.idl | 63 ++++ .../sun/star/form/runtime/XFeatureInvalidation.idl | 57 ++++ .../sun/star/form/runtime/XFilterController.idl | 164 ++++++++++ .../form/runtime/XFilterControllerListener.idl | 68 ++++ .../com/sun/star/form/runtime/XFormController.idl | 343 +++++++++++++++++++++ .../star/form/runtime/XFormControllerContext.idl | 42 +++ .../com/sun/star/form/runtime/XFormOperations.idl | 243 +++++++++++++++ .../com/sun/star/form/submission/XSubmission.idl | 84 +++++ .../star/form/submission/XSubmissionSupplier.idl | 42 +++ .../form/submission/XSubmissionVetoListener.idl | 50 +++ .../validation/ValidatableBindableControlModel.idl | 58 ++++ .../form/validation/ValidatableControlModel.idl | 72 +++++ .../validation/XFormComponentValidityListener.idl | 41 +++ .../com/sun/star/form/validation/XValidatable.idl | 55 ++++ .../form/validation/XValidatableFormComponent.idl | 100 ++++++ offapi/com/sun/star/form/validation/XValidator.idl | 85 +++++ .../validation/XValidityConstraintListener.idl | 42 +++ 172 files changed, 10828 insertions(+) create mode 100644 offapi/com/sun/star/form/ControlFontDialog.idl create mode 100644 offapi/com/sun/star/form/DataAwareControlModel.idl create mode 100644 offapi/com/sun/star/form/DataSelectionType.idl create mode 100644 offapi/com/sun/star/form/DatabaseDeleteEvent.idl create mode 100644 offapi/com/sun/star/form/DatabaseParameterEvent.idl create mode 100644 offapi/com/sun/star/form/ErrorEvent.idl create mode 100644 offapi/com/sun/star/form/FormButtonType.idl create mode 100644 offapi/com/sun/star/form/FormComponent.idl create mode 100644 offapi/com/sun/star/form/FormComponentType.idl create mode 100644 offapi/com/sun/star/form/FormComponents.idl create mode 100644 offapi/com/sun/star/form/FormControlModel.idl create mode 100644 offapi/com/sun/star/form/FormController.idl create mode 100644 offapi/com/sun/star/form/FormControllerDispatcher.idl create mode 100644 offapi/com/sun/star/form/FormSubmitEncoding.idl create mode 100644 offapi/com/sun/star/form/FormSubmitMethod.idl create mode 100644 offapi/com/sun/star/form/Forms.idl create mode 100644 offapi/com/sun/star/form/ListSourceType.idl create mode 100644 offapi/com/sun/star/form/NavigationBarMode.idl create mode 100644 offapi/com/sun/star/form/PropertyBrowserController.idl create mode 100644 offapi/com/sun/star/form/TabOrderDialog.idl create mode 100644 offapi/com/sun/star/form/TabulatorCycle.idl create mode 100644 offapi/com/sun/star/form/XApproveActionBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XApproveActionListener.idl create mode 100644 offapi/com/sun/star/form/XBoundComponent.idl create mode 100644 offapi/com/sun/star/form/XBoundControl.idl create mode 100644 offapi/com/sun/star/form/XChangeBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XChangeListener.idl create mode 100644 offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XConfirmDeleteListener.idl create mode 100644 offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl create mode 100644 offapi/com/sun/star/form/XDatabaseParameterListener.idl create mode 100644 offapi/com/sun/star/form/XDeleteListener.idl create mode 100644 offapi/com/sun/star/form/XErrorBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XErrorListener.idl create mode 100644 offapi/com/sun/star/form/XForm.idl create mode 100644 offapi/com/sun/star/form/XFormComponent.idl create mode 100644 offapi/com/sun/star/form/XFormController.idl create mode 100644 offapi/com/sun/star/form/XFormControllerListener.idl create mode 100644 offapi/com/sun/star/form/XForms.idl create mode 100644 offapi/com/sun/star/form/XFormsSupplier.idl create mode 100644 offapi/com/sun/star/form/XFormsSupplier2.idl create mode 100644 offapi/com/sun/star/form/XGrid.idl create mode 100644 offapi/com/sun/star/form/XGridColumnFactory.idl create mode 100644 offapi/com/sun/star/form/XGridControl.idl create mode 100644 offapi/com/sun/star/form/XGridControlListener.idl create mode 100644 offapi/com/sun/star/form/XGridFieldDataSupplier.idl create mode 100644 offapi/com/sun/star/form/XGridPeer.idl create mode 100644 offapi/com/sun/star/form/XImageProducerSupplier.idl create mode 100644 offapi/com/sun/star/form/XInsertListener.idl create mode 100644 offapi/com/sun/star/form/XLoadListener.idl create mode 100644 offapi/com/sun/star/form/XLoadable.idl create mode 100644 offapi/com/sun/star/form/XPositioningListener.idl create mode 100644 offapi/com/sun/star/form/XReset.idl create mode 100644 offapi/com/sun/star/form/XResetListener.idl create mode 100644 offapi/com/sun/star/form/XRestoreListener.idl create mode 100644 offapi/com/sun/star/form/XSubmit.idl create mode 100644 offapi/com/sun/star/form/XSubmitListener.idl create mode 100644 offapi/com/sun/star/form/XUpdateBroadcaster.idl create mode 100644 offapi/com/sun/star/form/XUpdateListener.idl create mode 100644 offapi/com/sun/star/form/binding/BindableControlModel.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl create mode 100644 offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl create mode 100644 offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl create mode 100644 offapi/com/sun/star/form/binding/IncompatibleTypesException.idl create mode 100644 offapi/com/sun/star/form/binding/InvalidBindingStateException.idl create mode 100644 offapi/com/sun/star/form/binding/ListEntryEvent.idl create mode 100644 offapi/com/sun/star/form/binding/ListEntrySource.idl create mode 100644 offapi/com/sun/star/form/binding/ValueBinding.idl create mode 100644 offapi/com/sun/star/form/binding/XBindableValue.idl create mode 100644 offapi/com/sun/star/form/binding/XListEntryListener.idl create mode 100644 offapi/com/sun/star/form/binding/XListEntrySink.idl create mode 100644 offapi/com/sun/star/form/binding/XListEntrySource.idl create mode 100644 offapi/com/sun/star/form/binding/XListEntryTypedSource.idl create mode 100644 offapi/com/sun/star/form/binding/XValueBinding.idl create mode 100644 offapi/com/sun/star/form/component/CheckBox.idl create mode 100644 offapi/com/sun/star/form/component/ComboBox.idl create mode 100644 offapi/com/sun/star/form/component/CommandButton.idl create mode 100644 offapi/com/sun/star/form/component/CurrencyField.idl create mode 100644 offapi/com/sun/star/form/component/DataForm.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseCheckBox.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseComboBox.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseCurrencyField.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseDateField.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseFormattedField.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseImageControl.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseListBox.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseNumericField.idl create mode 100644 offapi/com/sun/star/form/component/DatabasePatternField.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseRadioButton.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseTextField.idl create mode 100644 offapi/com/sun/star/form/component/DatabaseTimeField.idl create mode 100644 offapi/com/sun/star/form/component/DateField.idl create mode 100644 offapi/com/sun/star/form/component/FileControl.idl create mode 100644 offapi/com/sun/star/form/component/FixedText.idl create mode 100644 offapi/com/sun/star/form/component/Form.idl create mode 100644 offapi/com/sun/star/form/component/FormattedField.idl create mode 100644 offapi/com/sun/star/form/component/GridControl.idl create mode 100644 offapi/com/sun/star/form/component/GroupBox.idl create mode 100644 offapi/com/sun/star/form/component/HTMLForm.idl create mode 100644 offapi/com/sun/star/form/component/HiddenControl.idl create mode 100644 offapi/com/sun/star/form/component/ImageButton.idl create mode 100644 offapi/com/sun/star/form/component/ListBox.idl create mode 100644 offapi/com/sun/star/form/component/NavigationToolBar.idl create mode 100644 offapi/com/sun/star/form/component/NumericField.idl create mode 100644 offapi/com/sun/star/form/component/PatternField.idl create mode 100644 offapi/com/sun/star/form/component/RadioButton.idl create mode 100644 offapi/com/sun/star/form/component/RichTextControl.idl create mode 100644 offapi/com/sun/star/form/component/ScrollBar.idl create mode 100644 offapi/com/sun/star/form/component/SpinButton.idl create mode 100644 offapi/com/sun/star/form/component/SubmitButton.idl create mode 100644 offapi/com/sun/star/form/component/TextField.idl create mode 100644 offapi/com/sun/star/form/component/TimeField.idl create mode 100644 offapi/com/sun/star/form/control/CheckBox.idl create mode 100644 offapi/com/sun/star/form/control/ComboBox.idl create mode 100644 offapi/com/sun/star/form/control/CommandButton.idl create mode 100644 offapi/com/sun/star/form/control/CurrencyField.idl create mode 100644 offapi/com/sun/star/form/control/DateField.idl create mode 100644 offapi/com/sun/star/form/control/FilterControl.idl create mode 100644 offapi/com/sun/star/form/control/FormattedField.idl create mode 100644 offapi/com/sun/star/form/control/GridControl.idl create mode 100644 offapi/com/sun/star/form/control/GroupBox.idl create mode 100644 offapi/com/sun/star/form/control/ImageButton.idl create mode 100644 offapi/com/sun/star/form/control/ImageControl.idl create mode 100644 offapi/com/sun/star/form/control/InteractionGridControl.idl create mode 100644 offapi/com/sun/star/form/control/ListBox.idl create mode 100644 offapi/com/sun/star/form/control/NavigationToolBar.idl create mode 100644 offapi/com/sun/star/form/control/NumericField.idl create mode 100644 offapi/com/sun/star/form/control/PatternField.idl create mode 100644 offapi/com/sun/star/form/control/RadioButton.idl create mode 100644 offapi/com/sun/star/form/control/SubmitButton.idl create mode 100644 offapi/com/sun/star/form/control/TextField.idl create mode 100644 offapi/com/sun/star/form/control/TimeField.idl create mode 100644 offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl create mode 100644 offapi/com/sun/star/form/inspection/EditPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/EventHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl create mode 100644 offapi/com/sun/star/form/modules.idl create mode 100644 offapi/com/sun/star/form/runtime/FeatureState.idl create mode 100644 offapi/com/sun/star/form/runtime/FilterEvent.idl create mode 100644 offapi/com/sun/star/form/runtime/FormController.idl create mode 100644 offapi/com/sun/star/form/runtime/FormFeature.idl create mode 100644 offapi/com/sun/star/form/runtime/FormOperations.idl create mode 100644 offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl create mode 100644 offapi/com/sun/star/form/runtime/XFilterController.idl create mode 100644 offapi/com/sun/star/form/runtime/XFilterControllerListener.idl create mode 100644 offapi/com/sun/star/form/runtime/XFormController.idl create mode 100644 offapi/com/sun/star/form/runtime/XFormControllerContext.idl create mode 100644 offapi/com/sun/star/form/runtime/XFormOperations.idl create mode 100644 offapi/com/sun/star/form/submission/XSubmission.idl create mode 100644 offapi/com/sun/star/form/submission/XSubmissionSupplier.idl create mode 100644 offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl create mode 100644 offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl create mode 100644 offapi/com/sun/star/form/validation/ValidatableControlModel.idl create mode 100644 offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl create mode 100644 offapi/com/sun/star/form/validation/XValidatable.idl create mode 100644 offapi/com/sun/star/form/validation/XValidatableFormComponent.idl create mode 100644 offapi/com/sun/star/form/validation/XValidator.idl create mode 100644 offapi/com/sun/star/form/validation/XValidityConstraintListener.idl (limited to 'offapi/com/sun/star/form') diff --git a/offapi/com/sun/star/form/ControlFontDialog.idl b/offapi/com/sun/star/form/ControlFontDialog.idl new file mode 100644 index 0000000000..a2f15bf405 --- /dev/null +++ b/offapi/com/sun/star/form/ControlFontDialog.idl @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.1 + */ +published service ControlFontDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createWithGridModel([in] com::sun::star::beans::XPropertySet GridModel); +}; + +}; }; }; }; + +/* 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 0000000000..4b4e1994a9 --- /dev/null +++ b/offapi/com/sun/star/form/DataAwareControlModel.idl @@ -0,0 +1,159 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is an abstract service for specialized FormControlModels + which are data aware and thus can be bound to a data source. + +

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.

+ */ +published service DataAwareControlModel +{ + service com::sun::star::form::FormControlModel; + + /** makes it possible to transfer the data of the model to the connected data field. +

+ 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). +

+ */ + [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.
+ This interface will seldom be used directly from outside. + */ + interface com::sun::star::form::XLoadListener; + + + /** Each DataAwareControlModel should be resettable for setting default values. + +

In the context of a control model which is data-aware, the semantics of default value + (see XReset) is as follows:
+ If (and only if) the control is valid bound to a column of its com::sun::star::form::component::DataForm, and the form + is not positioned on a new record (see com::sun::star::sdb::RowSet::IsNew), then + XReset::reset() does not reset the model's value to its default value, but uses the + underlying column value.
+ In all other cases, the model is reset to the default value as specified by the respective property.

+ +

For an example, have a look at the com::sun::star::form::component::TextField. It inherits + the com::sun::star::awt::UnoControlEditModel::Text property from the underlying + service, and additionally specifies the com::sun::star::form::component::TextField::DefaultText. +

+ +

In the context of a com::sun::star::form::component::DataForm, controls are + automatically reset when one of the following applies +

+

+ */ + interface com::sun::star::form::XReset; + + + /** specifies the name of the bound database field. + +

This property makes sense in the context of the control model only. Normally, a control model + is a child of a com::sun::star::form::component::DataForm, which is bound + to a higher level object such as a table or query - more general, a result set.
+ This member here describes the column of this result set which the control should act for.

+ +

Not every control model can be bound to every database column. Usually, super services of the + DataAwareControlModel restrict the column types they can be used with.

+ + @see DataAwareControlModel::BoundField + */ + [property] string DataField; + + /** determines whether or not input into this field is required, when it is actually bound to a database field. + +

If this property is set to `FALSE`, then the form runtime will not check the control/model for + `NULL` values before submitting data to the database. Usually, if a control model is bound to + a database field which cannot be `NULL`, and the model itself does not have a value, then the database + update is prevented, showing an error message to the user. To disable this behavior on a per-control + basis, use the InputRequired property.

+ + @since OOo 3.1 + */ + [optional, property] boolean InputRequired; + + + /** references to the cursor field to which the control is bound. +

Applies only if the form the control model belongs to is loaded and the control is valid bound. + The referenced field supports the com::sun::star::sdb::Column service. +

+ @see DataAwareControlModel::DataField + */ + [readonly, property] com::sun::star::beans::XPropertySet BoundField; + + + /** references to a control model within the same document which should be used as a label. +

Any user interface action which needs to refer to the control is assumed to use this + property.
+ A very common design method for forms is to group a data aware control with a label control, + with the latter describing the content of the former. For instance, you may have a + com::sun::star::form::component::TextField, which is bound to the e-mail + column of your data source. Then you will probably add a + com::sun::star::form::component::FixedText whose label is "E-Mail", + and associate it with the TextField by setting it as #LabelControl.
+ Now if you imagine a component offering data search in a form, this component will examine + the #LabelControl property, find the com::sun::star::form::component::FixedText, + examine it's label, and use this label to refer to the com::sun::star::form::component::TextField. +

+

When setting the property, a number of constraints apply: +

+

+ */ + [property] com::sun::star::beans::XPropertySet LabelControl; + +}; + + +}; }; }; }; + +/* 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 0000000000..5b233e5214 --- /dev/null +++ b/offapi/com/sun/star/form/DataSelectionType.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 . + */ + + + + module com { module sun { module star { module form { + +/** describes the type of datasource used for a form. +

Please do not use anymore, this enum is deprecated. + @deprecated + */ +published enum DataSelectionType +{ + TABLE, + QUERY, + SQL, + SQLPASSTHROUGH + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/DatabaseDeleteEvent.idl b/offapi/com/sun/star/form/DatabaseDeleteEvent.idl new file mode 100644 index 0000000000..4a5ef76a42 --- /dev/null +++ b/offapi/com/sun/star/form/DatabaseDeleteEvent.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is fired if a database record is going to be deleted. +

Please do not use anymore, this struct is deprecated. + @deprecated + */ +published struct DatabaseDeleteEvent: com::sun::star::lang::EventObject +{ + sequence Bookmarks; + +}; + + +}; }; }; }; + +/* 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 0000000000..0b9294f6dc --- /dev/null +++ b/offapi/com/sun/star/form/DatabaseParameterEvent.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** 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. + +

Usually, a com::sun::star::form::component::DataForm fires this + event when loading the form requires parameters to be filled in.

+ +

Every parameter object supports the com::sun::star::beans::XPropertySet + interface, and at least the properties Name and Value

+ + @see com::sun::star::sdb::RowSet + @see com::sun::star::form::component::DataForm + */ + com::sun::star::container::XIndexAccess Parameters; +}; + + +}; }; }; }; + +/* 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 0000000000..83e2fccd46 --- /dev/null +++ b/offapi/com/sun/star/form/ErrorEvent.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + +/** occurs in case of fired database exceptions triggered by + a database form. +

Please do not use anymore, this struct is deprecated. + @deprecated + */ +published struct ErrorEvent: com::sun::star::lang::EventObject +{ + any Reason; + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormButtonType.idl b/offapi/com/sun/star/form/FormButtonType.idl new file mode 100644 index 0000000000..8938b0503c --- /dev/null +++ b/offapi/com/sun/star/form/FormButtonType.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies the action to execute when a button is pressed. + @see com::sun::star::form::component::CommandButton + */ +published enum FormButtonType +{ + + /** requires the button to act like a common push button, means no special action is triggered. + */ + PUSH, + + + /** When the button is clicked, it performs a submit on its containing form. + */ + SUBMIT, + + + /** When the button is clicked, it performs a reset on its containing form. + */ + RESET, + + + /** When the button is clicked, a URL set for the button is opened. + @see com::sun::star::form::component::CommandButton::TargetURL + @see com::sun::star::form::component::CommandButton::TargetFrame + */ + URL + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/FormComponent.idl b/offapi/com/sun/star/form/FormComponent.idl new file mode 100644 index 0000000000..ceabcb1568 --- /dev/null +++ b/offapi/com/sun/star/form/FormComponent.idl @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies a component which can be part of a form. + + @see FormControlModel + @see com::sun::star::form::component::Form + */ +published service FormComponent +{ + /** identifies the component as a candidate for being part of a form. +

This interface also provides the access to the component's parent.

+ */ + 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 + +

Every concrete form component - i.e. every service which includes + the FormComponent service - has a set of properties which + are available as long as the component lives - the so-called static + properties.

+ +

Additionally, you can add more properties to the component as needed, + using the com::sun::star::beans::XPropertyContainer interface. + Those properties are called dynamic properties.

+ +

Dynamic properties are not evaluated by the component itself, + nor by the form's runtime environment. They're only remembered and available for + use by other instances.

+ +

Note that dynamic properties added to a form component are, by definition, + removable. That is, the com::sun::star::beans::PropertyAttribute::REMOVABLE + will always be set, even if you do not specify it in the + com::sun::star::beans::XPropertyContainer::addProperty() call.

+ + @since OOo 2.3 + */ + [optional] interface com::sun::star::beans::XPropertyBag; + + + /** the name of the component. + +

Note that the name accessed here is the same as when using the + com::sun::star::container::XNamed interface.

+ */ + [property] string Name; + +}; + + +}; }; }; }; + +/* 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 0000000000..69ccbfdb9f --- /dev/null +++ b/offapi/com/sun/star/form/FormComponentType.idl @@ -0,0 +1,127 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** 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; +}; + + +}; }; }; }; + +/* 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 0000000000..7b6d31ade6 --- /dev/null +++ b/offapi/com/sun/star/form/FormComponents.idl @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + + +/** specifies the capabilities of a collection of FormComponents. + +

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.

+ + @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. + +

The interface allows managing of scripts associated with dependent components, accessed by index. + However, as a client of the FormComponents service, there's no need to bother with + the container aspect of the com::sun::star::script::XEventAttacherManager + directly. A FormComponents container will automatically synchronize the elements + you put into it with the scripting information obtained at the + com::sun::star::script::XEventAttacherManager interface.

+ +

For instance, at any time you can obtain the events associated with + the nth + element in the form components by calling + com::sun::star::script::XEventAttacherManager::getScriptEvents() + with parameter n. In particular, this invariant is always met, even after you + inserted/removed elements into/from the container.

+ */ + interface com::sun::star::script::XEventAttacherManager; +}; + + +}; }; }; }; + +/* 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 0000000000..a17600c3fd --- /dev/null +++ b/offapi/com/sun/star/form/FormControlModel.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 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies a control model within a form. + +

Note that the model-view-paradigm is used for form controls, too.

+ */ +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. + +

The default -1 is used to indicate that the tab-order of this control should be + determined automatically.

+ +

Each component which supports a tabstop must provide a + FormControlModel::TabIndex property.

+ +

Normally, a FormController instance is evaluating this property.

+ */ + [optional, property] short TabIndex; + + + /** used for additional information. +

No semantics is given for this property, it will usually be used by the creator of a document + containing form controls.

+ */ + [property] string Tag; + +}; + + +}; }; }; }; + +/* 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 0000000000..100d3a512b --- /dev/null +++ b/offapi/com/sun/star/form/FormController.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + +/** 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; +}; + + +}; }; }; }; + +/* 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 0000000000..4cdd20f87c --- /dev/null +++ b/offapi/com/sun/star/form/FormControllerDispatcher.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** 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; +}; + + +}; }; }; }; + +/* 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 0000000000..e31b81cbf2 --- /dev/null +++ b/offapi/com/sun/star/form/FormSubmitEncoding.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** 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. +

Usually used if the FormSubmitMethod attribute has the value POST. +

+ */ + URL, + + + /** Specifies to use "multipart/form-data" as submit encoding. +

Usually used when the form contains a file upload element.

+ */ + MULTIPART, + + + /** specifies to use "text/plain" +

Usually used if the FormSubmitMethod attribute has the value POST and + the content should be reviewed as full text.

+ */ + TEXT +}; + + +}; }; }; }; + +/* 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 0000000000..0133f3c2cf --- /dev/null +++ b/offapi/com/sun/star/form/FormSubmitMethod.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** 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 + +}; + + +}; }; }; }; + +/* 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 0000000000..cfcff30fc3 --- /dev/null +++ b/offapi/com/sun/star/form/Forms.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + + +/** specifies the capabilities of a collection of forms. + +

Basically, a Forms is a FormComponents, + with the additional restriction that the contained elements support the + com::sun::star::form::component::Form service.

+ + @see com::sun::star::form::component::Form + */ +published service Forms : XForms; + + +}; }; }; }; + +/* 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 0000000000..97c043526e --- /dev/null +++ b/offapi/com/sun/star/form/ListSourceType.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 . + */ + + + + 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 + +}; + + +}; }; }; }; + +/* 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 0000000000..e32bbe3400 --- /dev/null +++ b/offapi/com/sun/star/form/NavigationBarMode.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 . + */ + + + + 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). + +

Note that when this mode is set, a simultaneous TabulatorCycle + value of TabulatorCycle::CURRENT means that you cannot travel + between records anymore.

+ + @see TabulatorCycle + */ + NONE, + + + /** a navigation bar is provided and navigation will be performed + on the current/active form. +

This is the default and most often encountered mode.

+ */ + CURRENT, + + + /** a navigation bar is provided and navigation will be performed + on the parent of the current/active form. + +

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. +

+ */ + PARENT + +}; + + +}; }; }; }; + +/* 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 0000000000..5316bcd7e6 --- /dev/null +++ b/offapi/com/sun/star/form/PropertyBrowserController.idl @@ -0,0 +1,116 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + + +/** describes a controller which can be used to browse and modify properties of form controls. + +

The controller can be plugged into a com::sun::star::frame::XFrame, and will + provide a visual component for inspecting control properties. This means it allows to interactively control + several aspects of a FormControlModel or DataAwareControlModel, such as it's + data binding, it's layout, and it's event binding

+ +

For using a PropertyBrowserController, you need to +

+

+ + @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 +

Note that nowadays, this service is only a legacy wrapper using the + com::sun::star::inspection::ObjectInspector and the + com::sun::star::form::inspection::DefaultFormComponentInspectorModel services, and knitting them together.

+ +*/ +published service PropertyBrowserController +{ + /** contains the object to inspect. + +

Changing this property from outside causes the controller to update its view + with the data of the new object

+ */ + [property] com::sun::star::beans::XPropertySet IntrospectedObject; + + /** controls the actually visible page. + +

The aspects of a DataAwareControlModel which can be browsed and modified + using this controller can be separated into 3 groups: common aspects, data-awareness + related aspects, and bound events.
+ The appearance of the visual component created by the controller is that 3 tab pages, one for + each group, are displayed (of course if the control does not support any aspects of a given group, + the group is omitted).
+ With this property, it can be controller which page is currently active.

+ +

Valid values are (this list may be extended in the future): +

+ */ + [property] string CurrentPage; + + /** ensures the basic functionality for a controller. + +

With supporting this interface, the component is able to operate in (and provide content + for) a com::sun::star::frame::XFrame.

+ */ + interface com::sun::star::frame::XController; + + /** allows to access the properties of the object + */ + interface com::sun::star::beans::XPropertySet; + + /** allows to access the properties via indices + */ + interface com::sun::star::beans::XFastPropertySet; + + /** allows to access more than one property of the object at the same time + */ + interface com::sun::star::beans::XMultiPropertySet; +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/TabOrderDialog.idl b/offapi/com/sun/star/form/TabOrderDialog.idl new file mode 100644 index 0000000000..b7e9eee22f --- /dev/null +++ b/offapi/com/sun/star/form/TabOrderDialog.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.2 + */ +published service TabOrderDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createWithModel([in] com::sun::star::awt::XTabControllerModel TabbingModel, + [in] com::sun::star::awt::XControlContainer ControlContext, + [in] com::sun::star::awt::XWindow ParentWindow); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/TabulatorCycle.idl b/offapi/com/sun/star/form/TabulatorCycle.idl new file mode 100644 index 0000000000..75a3b50165 --- /dev/null +++ b/offapi/com/sun/star/form/TabulatorCycle.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies how the TAB key should be used in a form. + +

If the last control of a form is focused, and the user pressed the TAB key, there are + several possibilities how a FormController should handle this. + TabulatorCycle specifies these possibilities.

+ +

Note that the TabulatorCycle determines what happens when SHIFT-TAB + is pressed on the first control of a form, as well as when TAB is pressed on the + last control.

+ +

First and last refers to the tabbing order of controls.

+ + @see FormControlModel::TabIndex + @see FormController + */ +published enum TabulatorCycle +{ + + /** pressing the TAB key from the last control moves the focus to + the first control in the tab order of the next record. + */ + RECORDS, + + + /** pressing the TAB key from the last control moves the focus to + the first control in the tab order of the same record. + */ + CURRENT, + + + /** pressing the TAB key from the last control of a form moves + the focus to the first control of the next form in the tab order. + */ + PAGE + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XApproveActionBroadcaster.idl b/offapi/com/sun/star/form/XApproveActionBroadcaster.idl new file mode 100644 index 0000000000..b17be2b069 --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionBroadcaster.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to probably veto actions to be performed on components. + +

Usually, a component which supports the + XApproveActionBroadcaster interface implements + com::sun::star::awt::XActionListener as well.

+ */ +published interface XApproveActionBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the XApproveActionListener::approveAction() + event. + + @param aListener + the listener to be added + */ + void addApproveActionListener( [in] com::sun::star::form::XApproveActionListener aListener ); + + + /** removes the specified listener + + @param aListener + the listener to be removed + */ + void removeApproveActionListener( [in] com::sun::star::form::XApproveActionListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XApproveActionListener.idl b/offapi/com/sun/star/form/XApproveActionListener.idl new file mode 100644 index 0000000000..238a738fde --- /dev/null +++ b/offapi/com/sun/star/form/XApproveActionListener.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** can be implemented to listen and probably veto actions to be performed on components. + +

An example for an action would be the click of a + CommandButton.

+ + @see XApproveActionBroadcaster + @see com::sun::star::form::component::CommandButton + @see com::sun::star::form::control::CommandButton + */ +published interface XApproveActionListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when an action is performed. + + @param aEvent + A descriptor specifying the source of the event. + + @returns + `TRUE` when the action is permitted, otherwise `FALSE`. + */ + boolean approveAction( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XBoundComponent.idl b/offapi/com/sun/star/form/XBoundComponent.idl new file mode 100644 index 0000000000..3ea14ce213 --- /dev/null +++ b/offapi/com/sun/star/form/XBoundComponent.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** specifies a (form) component which is bound to a data source. + +

The interface provides the possibility of committing its respective + data to a data source it is bound to. A commit() will be + performed by the environment (usually, a FormController).
+ For example, suppose you have a data-bound control that is connected + to a database field. Each time the control loses its focus, the + model (component) of the control is triggered by the environment + to store its value in the database field.

+ +

A commit may fail if an XUpdateListener vetoes the it.

+ + @see com::sun::star::form::XUpdateListener + */ +published interface XBoundComponent: com::sun::star::form::XUpdateBroadcaster +{ + + /** commits the content of the component into the data source it is bound to. + + @returns + `TRUE` when the commitment was successful, otherwise `FALSE`. + */ + boolean commit(); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XBoundControl.idl b/offapi/com/sun/star/form/XBoundControl.idl new file mode 100644 index 0000000000..e408ae547b --- /dev/null +++ b/offapi/com/sun/star/form/XBoundControl.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows locking the input on components. + */ + +published interface XBoundControl: com::sun::star::uno::XInterface +{ + + /** determines whether the input is currently locked or not. + + @returns + `TRUE` when it is currently locked, otherwise `FALSE`. + */ + boolean getLock(); + + + /** is used for altering the current lock state of the + component. + + @param bLock + the new lock state. + */ + void setLock( [in] boolean bLock ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XChangeBroadcaster.idl b/offapi/com/sun/star/form/XChangeBroadcaster.idl new file mode 100644 index 0000000000..a7f184137c --- /dev/null +++ b/offapi/com/sun/star/form/XChangeBroadcaster.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to notify listeners of data changes. + +

The concrete semantics of a change (i.e. the conditions for when a change event + is fired) must be specified in the service description of the providing service.

+ + @see XChangeListener + */ +published interface XChangeBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the "changed" event. + + @param aListener + the listener to add. + + @see com::sun::star::form::XChangeListener + */ + void addChangeListener( [in] com::sun::star::form::XChangeListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + + @see com::sun::star::form::XChangeListener + */ + void removeChangeListener( [in] com::sun::star::form::XChangeListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XChangeListener.idl b/offapi/com/sun/star/form/XChangeListener.idl new file mode 100644 index 0000000000..35aa2e987a --- /dev/null +++ b/offapi/com/sun/star/form/XChangeListener.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is the listener interface for receiving notifications about data changes. + +

The concrete semantics of a change (i.e. the conditions for when a change event + is fired) must be specified in the description of the service broadcasting the + change.

+ + @see XChangeBroadcaster + */ +published interface XChangeListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the data of a component has been changed. + + @param rEvent + A descriptor specifying the source of the event. + */ + void changed( [in] com::sun::star::lang::EventObject rEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl b/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl new file mode 100644 index 0000000000..5a08415144 --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteBroadcaster.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for confirming deletions of + rows in a com::sun::star::form::component::DataForm. + + @see XConfirmDeleteListener + */ +published interface XConfirmDeleteBroadcaster: com::sun::star::uno::XInterface +{ + + /** remembers the specified listener to receive an event for confirming deletions + +

XConfirmDeleteListener::confirmDelete() is called before a + deletion is performed. You may use the event to write your own confirmation messages.

+ + @param aListener + the listener to add. + + @see com::sun::star::form::XConfirmDeleteListener + */ + void addConfirmDeleteListener( [in] com::sun::star::form::XConfirmDeleteListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + + @see com::sun::star::form::XConfirmDeleteListener + */ + void removeConfirmDeleteListener( [in] com::sun::star::form::XConfirmDeleteListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XConfirmDeleteListener.idl b/offapi/com/sun/star/form/XConfirmDeleteListener.idl new file mode 100644 index 0000000000..2a38999b80 --- /dev/null +++ b/offapi/com/sun/star/form/XConfirmDeleteListener.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + + +/** allows to register a component for confirming deletions of + rows in a com::sun::star::form::component::DataForm. + + @see XConfirmDeleteBroadcaster + */ +published interface XConfirmDeleteListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the current record of a database form will be deleted. + + @param aEvent + A descriptor specifying the deletion request. + + @returns + `TRUE` when the row can be deleted, otherwise `FALSE`. + */ + boolean confirmDelete( [in] com::sun::star::sdb::RowChangeEvent aEvent ); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl new file mode 100644 index 0000000000..285bdc641b --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. +

This interface is usually implemented by components which are to execute a statement, + and may need parameter information. For example, the + com::sun::star::form::component::DataForm is such a component. When it is + bound to a statement which contains parameters, or to a query which is based upon a parametrized + statement, it needs values to fill in the parameters with actual values when it is being loaded. + One method to gather these values is calling the XDatabaseParameterListener listeners, which + can fill them in.

+ */ +published interface XDatabaseParameterBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener, to allow it to fill in necessary parameter values. + @param aListener + the listener to add. + @see com::sun::star::form::XDatabaseParameterListener + */ + void addParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XDatabaseParameterListener + */ + void removeParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl new file mode 100644 index 0000000000..4f0665acf3 --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterBroadcaster2.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** provides the possibility of receiving an event for configuration of parameters. + +

Note that this interface provides exactly the same functionality as the + XDatabaseParameterBroadcaster interface. It exists purely for compatibility + with the com::sun::star::script::XEventAttacher::attachSingleEventListener(): + It expects the methods for adding and removing listeners to follow a certain naming scheme, + respective to the name of the listener which is being added/removed.

+ + @see XDatabaseParameterBroadcaster + @see com::sun::star::script::XEventAttacher +*/ +interface XDatabaseParameterBroadcaster2: XDatabaseParameterBroadcaster +{ + /** registers an XDatabaseParameterListener + +

This method behaves exactly as the XDatabaseParameterBroadcaster::addParameterListener() + method inherited from the base interface.

+ */ + void addDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + + + /** revokes an XDatabaseParameterListener + +

This method behaves exactly as the XDatabaseParameterBroadcaster::removeParameterListener() + method inherited from the base interface.

+ */ + void removeDatabaseParameterListener( [in] com::sun::star::form::XDatabaseParameterListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDatabaseParameterListener.idl b/offapi/com/sun/star/form/XDatabaseParameterListener.idl new file mode 100644 index 0000000000..9d6e2a620d --- /dev/null +++ b/offapi/com/sun/star/form/XDatabaseParameterListener.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to intercept value request for parametrized SQL statements. + */ +published interface XDatabaseParameterListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when there is a need for parameter values + + @param aEvent + the event describing the parameter value request. + + @returns + `TRUE` when the execution of the parametrized statement should continue, `FALSE` otherwise. + + @see com::sun::star::form::DatabaseParameterEvent + */ + boolean approveParameter( [in] com::sun::star::form::DatabaseParameterEvent aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XDeleteListener.idl b/offapi/com/sun/star/form/XDeleteListener.idl new file mode 100644 index 0000000000..54b0d2ceb2 --- /dev/null +++ b/offapi/com/sun/star/form/XDeleteListener.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** This is the listener interface for receiving "approveDelete" and + "deleted" events posted by a database form. + +

"approveDelete" may be used to abort a deletion of the current data + record.

+ +

Please do not use anymore, this interface is superseded + by com::sun::star::form::XConfirmDeleteListener.

+ + @deprecated + */ +published interface XDeleteListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the current record of the database form will be deleted. + */ + boolean approveDelete( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when a database form has finished the delete processing and + the data has been successfully deleted from the datasource. + */ + void deleted( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XErrorBroadcaster.idl b/offapi/com/sun/star/form/XErrorBroadcaster.idl new file mode 100644 index 0000000000..aca0b1be36 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorBroadcaster.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of receiving database error events. + +

Please do not use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorBroadcaster.

+ + @deprecated + */ +published interface XErrorBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to be notified of errors. + */ + void addErrorListener( [in] com::sun::star::form::XErrorListener aListener ); + + + /** removes the specified listener. + */ + void removeErrorListener( [in] com::sun::star::form::XErrorListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XErrorListener.idl b/offapi/com/sun/star/form/XErrorListener.idl new file mode 100644 index 0000000000..d355ce73e6 --- /dev/null +++ b/offapi/com/sun/star/form/XErrorListener.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** used to be notified when errors in a database form happen. + +

Each time an exception is triggered by a database form, the error + event is posted to the error listeners. This event may be used to + configure the error handling of a database form.

+ +

Please do not use anymore, this interface is superseded + by com::sun::star::sdb::XSQLErrorListener.

+ + @deprecated + */ +published interface XErrorListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a database action performed by a database form raises + an exception. + */ + void errorOccured( [in] com::sun::star::form::ErrorEvent aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XForm.idl b/offapi/com/sun/star/form/XForm.idl new file mode 100644 index 0000000000..eecf7329fe --- /dev/null +++ b/offapi/com/sun/star/form/XForm.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** identifies a FormComponent as being a (sub-) form. + +

This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.

+ + @see XFormComponent + */ +published interface XForm: com::sun::star::form::XFormComponent +{ +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormComponent.idl b/offapi/com/sun/star/form/XFormComponent.idl new file mode 100644 index 0000000000..ccec6ae6e3 --- /dev/null +++ b/offapi/com/sun/star/form/XFormComponent.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** describes a component which may be part of a form. + +

This interface does not really provide an own functionality, it is only for easier + runtime identification of form components.

+ + @see XForm + */ +published interface XFormComponent: com::sun::star::container::XChild +{ +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormController.idl b/offapi/com/sun/star/form/XFormController.idl new file mode 100644 index 0000000000..cd72c7ce26 --- /dev/null +++ b/offapi/com/sun/star/form/XFormController.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is superseded by com::sun::star::form::runtime::XFormController. + @deprecated + */ +published interface XFormController: com::sun::star::awt::XTabController +{ + ::com::sun::star::awt::XControl getCurrentControl(); + void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); + void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XFormControllerListener.idl b/offapi/com/sun/star/form/XFormControllerListener.idl new file mode 100644 index 0000000000..c98e39f861 --- /dev/null +++ b/offapi/com/sun/star/form/XFormControllerListener.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to be notified when the activation status of a FormController changes. + +

A form controller is activated if a form control gains the + focus and none of its controls currently owned the focus before.

+ + @see XFormController + */ +published interface XFormControllerListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a control of the controller gained the focus and + the controller was not previously activated. + + @param rEvent + the event happened. + */ + void formActivated( [in] com::sun::star::lang::EventObject rEvent ); + + + /** is invoked when a control of the "XFormController" lost the focus + and no control of the controller received the focus. In other + words, no control of the controller owns the focus. + + @param rEvent + the event happened. + */ + void formDeactivated( [in] com::sun::star::lang::EventObject rEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XForms.idl b/offapi/com/sun/star/form/XForms.idl new file mode 100644 index 0000000000..4bb091f728 --- /dev/null +++ b/offapi/com/sun/star/form/XForms.idl @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** + @since LibreOffice 4.1 + */ +published interface XForms +{ + /** allows to register listeners to be notified of changes in the container. + */ + interface com::sun::star::container::XContainer; + + /** allows to add/remove elements by name. + */ + interface com::sun::star::container::XNameContainer; // ->XNameReplace->XNameAccess->XElementAccess->XInterface + + /** gives access to the elements by index. + */ + interface com::sun::star::container::XIndexContainer; // ->XIndexReplace->XIndexAccess->XElementAccess->XInterface + + /** creates an enumeration of the elements. + */ + interface com::sun::star::container::XEnumerationAccess; // ->XElementAccess->XInterface + + /** This interface has to be implemented to supply the scripting environment + for the contained components. + +

The interface allows managing of scripts associated with dependent components, accessed by index. + However, as a client of the FormComponents service, there's no need to bother with + the container aspect of the com::sun::star::script::XEventAttacherManager + directly. A FormComponents container will automatically synchronize the elements + you put into it with the scripting information obtained at the + com::sun::star::script::XEventAttacherManager interface.

+ +

For instance, at any time you can obtain the events associated with + the nth + element in the form components by calling + com::sun::star::script::XEventAttacherManager::getScriptEvents() + with parameter n. In particular, this invariant is always met, even after you + inserted/removed elements into/from the container.

+ */ + 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; +}; + + +}; }; }; }; + +/* 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 0000000000..b8999af51e --- /dev/null +++ b/offapi/com/sun/star/form/XFormsSupplier.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 . + */ + + + + 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(); + +}; + + +}; }; }; }; + +/* 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 0000000000..2830c6870b --- /dev/null +++ b/offapi/com/sun/star/form/XFormsSupplier2.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** extends the XFormsSupplier with convenience methods +*/ +interface XFormsSupplier2: XFormsSupplier +{ + /** determines whether there are currently forms available at all + +

If you need read access to the forms collection, then you might check + the existence of forms using hasForms(), and if it returns + `FALSE`, you can do as if XFormsSupplier::getForms() would + have returned an empty container.

+ +

Semantically, hasForms() is equivalent to calling + XElementAccess::hasElements() on the container returned by + XFormsSupplier::getForms(). But when using the latter, the + implementation is forced to create an empty container, which might be potentially + expensive.

+ */ + boolean hasForms(); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XGrid.idl b/offapi/com/sun/star/form/XGrid.idl new file mode 100644 index 0000000000..72f729f17f --- /dev/null +++ b/offapi/com/sun/star/form/XGrid.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the possibility of setting and retrieving the position + of the current cell in a grid control. + +

Note that a grid control does not allow free control over the current row: + In such a control, every line represents a row of data of the underlying + com::sun::star::form::component::DataForm. Thus, the current + row of the grid control always equals the current row of the + com::sun::star::form::component::DataForm, and can be affected only + by changing the latter.
+ The current column of a grid control, whoever, can be freely controlled.

+ + @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 ); + +}; + + +}; }; }; }; + +/* 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 0000000000..a518cbf734 --- /dev/null +++ b/offapi/com/sun/star/form/XGridColumnFactory.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to create columns to be added into a grid control model. + +

Grid columns (more precise: models of grid columns) are direct children of + the grid control model they belong to. Grid columns can't be created on a global + service factory, instead, you need to create them on the grid, where you want to + insert them later on.

+ + @see com::sun::star::form::component::GridControl + */ +published interface XGridColumnFactory: com::sun::star::uno::XInterface +{ + + /** creates a new column object + + @param aColumnType + the type of column to be created + + @returns + the new column object + + @throws com::sun::star::lang::IllegalArgumentException + if aColumnType is not available. + */ + com::sun::star::beans::XPropertySet createColumn( [in] string aColumnType ) + raises( com::sun::star::lang::IllegalArgumentException ); + + + /** returns a list of available column types. + + @returns + a list of column types. + */ + sequence getColumnTypes(); +}; + + +}; }; }; }; + +/* 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 0000000000..e67a13a8b2 --- /dev/null +++ b/offapi/com/sun/star/form/XGridControl.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** 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; +}; + + +}; }; }; }; + + +/* 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 0000000000..6512f4ca4f --- /dev/null +++ b/offapi/com/sun/star/form/XGridControlListener.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + +/** 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 ); +}; + + +}; }; }; }; + + +/* 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 0000000000..c5a407b791 --- /dev/null +++ b/offapi/com/sun/star/form/XGridFieldDataSupplier.idl @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides access to the data of a GridControl + +

You can retrieve the data type information and the data in a row.

+ +

This interface allows to retrieve data even for rows which are not current, which is quite useful, + as normally, you can't affect the current row in a grid control without moving the cursor of the underlying + com::sun::star::form::component::DataForm.

+ + @see XGrid + @see com::sun::star::form::control::GridControl + @see com::sun::star::form::component::GridControl + + @deprecated + */ +published interface XGridFieldDataSupplier: com::sun::star::uno::XInterface +{ + /** checks whether or not the content of the grid's columns can be retrieved in the requested format. + +

Not every cell content can be retrieved in every representation. For example, in a text column, + you usually won't be able to retrieve the content as double.
+ To check if the type you need is supported by the columns, use this method.

+ + @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 queryFieldDataType( [in] type xType ); + + /** retrieves the actual column data for the given row + +

If a column does not support the requested type, `NULL` is returned at the respective + position.

+ + @see XGridFieldDataSupplier::queryFieldDataType + */ + sequence queryFieldData( [in] long nRow, + [in] type xType ); +}; + + +}; }; }; }; + +/* 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 0000000000..19df011c69 --- /dev/null +++ b/offapi/com/sun/star/form/XGridPeer.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** represents the window peer of a GridControl and allows you to set + and retrieve the model data. + +

Usually, the columns used are the columns as supplied by the grid control model.

+ +

You should use this interface only if you know exactly what you are doing. Tampering + with the columns of a grid control which is part of a complex form can really hurt...

+ + @deprecated + @see com::sun::star::awt::XWindowPeer + @see com::sun::star::form::component::GridControl + */ +published interface XGridPeer: com::sun::star::uno::XInterface +{ + + /** retrieves the currently used column definitions of the peer. + */ + com::sun::star::container::XIndexContainer getColumns(); + + + /** sets the column definition for the peer. + */ + void setColumns( [in] com::sun::star::container::XIndexContainer aColumns ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XImageProducerSupplier.idl b/offapi/com/sun/star/form/XImageProducerSupplier.idl new file mode 100644 index 0000000000..eb3787ea2e --- /dev/null +++ b/offapi/com/sun/star/form/XImageProducerSupplier.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides the access to an image producer. + + @see com::sun::star::awt::XImageProducer + */ +published interface XImageProducerSupplier: com::sun::star::uno::XInterface +{ + + /** accesses the image producer. + + @returns + the image producer. + */ + com::sun::star::awt::XImageProducer getImageProducer(); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XInsertListener.idl b/offapi/com/sun/star/form/XInsertListener.idl new file mode 100644 index 0000000000..908fcc8af0 --- /dev/null +++ b/offapi/com/sun/star/form/XInsertListener.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about insertions into a database form. + +

Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + service, as well as the com::sun::star::sdbc::XRowSetListener and + com::sun::star::sdb::XRowSetApproveListener interfaces.

+ + @deprecated + */ +published interface XInsertListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a database form starts inserting a record. + */ + void inserting( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked after a database form has inserted a record to a data source. + */ + void inserted( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XLoadListener.idl b/offapi/com/sun/star/form/XLoadListener.idl new file mode 100644 index 0000000000..fad9dbb053 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadListener.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** receives load-related events from a loadable object. + +

The interface is typically implemented by data-bound components, + which want to listen to the data source that contains their database + form.

+ + @see com::sun::star::form::XLoadable + @see DataAwareControlModel + */ +published interface XLoadListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the object has successfully connected to a datasource. + + @param aEvent + the event happened. + */ + void loaded( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object is about to be unloaded. +

Components may use this to stop any other event processing related to + the event source before the object is unloaded.

+ + @param aEvent + the event happened. + */ + void unloading( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked after the object has disconnected from a datasource. + + @param aEvent + the event happened. + */ + void unloaded( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object is about to be reloaded. + +

Components may use this to stop any other event processing related + to the event source until they get the reloaded event.

+ + @param aEvent + the event happened. + */ + void reloading( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when the object has been reloaded. + + @param aEvent + the event happened. + */ + void reloaded( [in] com::sun::star::lang::EventObject aEvent ); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XLoadable.idl b/offapi/com/sun/star/form/XLoadable.idl new file mode 100644 index 0000000000..cab059c102 --- /dev/null +++ b/offapi/com/sun/star/form/XLoadable.idl @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { + + +/** provides functionality to implement objects which may be loaded. + +

The object is typically implemented by high-level objects which can connect to a data source.

+ + @see XLoadListener + */ +published interface XLoadable: com::sun::star::uno::XInterface +{ + + /** loads the data. + +

If the data is already loaded (->isLoaded), then the method returns silently. + In this case, you should use ->reload.

+ */ + void load(); + + + /** unloads the data. + */ + void unload(); + + + /** does a smart refresh of the object. + +

The final state will be the same as if unload and load were called, but reload + is the more efficient way to do the same. If the object isn't loaded, nothing happens.

+ */ + void reload(); + + + /** returns if the object is in loaded state. + */ + boolean isLoaded(); + + + /** adds the specified listener to receive load-related events + + @param aListener + the listener to add. + */ + void addLoadListener( [in] com::sun::star::form::XLoadListener aListener ); + + + /** removes the specified listener. + + @param aListener + the listener to remove. + */ + void removeLoadListener( [in] com::sun::star::form::XLoadListener aListener ); +}; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XPositioningListener.idl b/offapi/com/sun/star/form/XPositioningListener.idl new file mode 100644 index 0000000000..bb3f006e2f --- /dev/null +++ b/offapi/com/sun/star/form/XPositioningListener.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** allows to receive notifications about cursor movements into a database form. + +

Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + service, as well as the com::sun::star::sdbc::XRowSetListener.

+ + @deprecated + */ +published interface XPositioningListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when the database form has been positioned on a data record. + */ + void positioned( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XReset.idl b/offapi/com/sun/star/form/XReset.idl new file mode 100644 index 0000000000..948f26ff0d --- /dev/null +++ b/offapi/com/sun/star/form/XReset.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to reset components to some default values. + +

The semantics of default value depends on the providing service.

+ */ +published interface XReset: com::sun::star::uno::XInterface +{ + + /** resets a component to some default value. + */ + void reset(); + + + /** adds the specified listener to receive events related to resetting the + component. + + @param aListener + the listener to add. + */ + void addResetListener( [in] com::sun::star::form::XResetListener aListener ); + + + /** removes the specified listener + + @param aListener + the listener to remove + */ + void removeResetListener( [in] com::sun::star::form::XResetListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XResetListener.idl b/offapi/com/sun/star/form/XResetListener.idl new file mode 100644 index 0000000000..19b97918f5 --- /dev/null +++ b/offapi/com/sun/star/form/XResetListener.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is the interface for receiving notifications about reset events. + +

The listener is called if a component implementing the + XReset interface performs a reset.
+ Order of events: +

  • a reset is triggered on a component
  • +
  • the component calls XReset::approveReset() on all its listeners
  • +
  • if all listeners approve the reset operation, the data is reset
  • +
  • the component calls XReset::resetted() on all its listeners
  • +
+

+ + @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 ); + +}; + + +}; }; }; }; + +/* 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 0000000000..8d8650f999 --- /dev/null +++ b/offapi/com/sun/star/form/XRestoreListener.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** receives notifications about data being restored. + +

Such a notification is typically sent when the user cancels updating the + current record of a database form + without saving the data. After restoring, the user operates on the original data.

+ +

Please do not use anymore, this interface is deprecated, and + superseded by functionality from the com::sun::star::form::component::DataForm + and com::sun::star::sdb::RowSet services

+ + @deprecated + */ +published interface XRestoreListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a modified record has been restored + */ + void restored( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XSubmit.idl b/offapi/com/sun/star/form/XSubmit.idl new file mode 100644 index 0000000000..53d88bf35d --- /dev/null +++ b/offapi/com/sun/star/form/XSubmit.idl @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** provides functionality to submit data from a component. + +

Usually, this is used by com::sun::star::form::component::HTMLForms. + +

See the HTML specification + to learn about submitting forms.

+ */ +published interface XSubmit: com::sun::star::uno::XInterface +{ + + /** submits the component's data to a specified target. + + @param aControl + the control whose data is to be submitted + + @param aMouseEvt + the event which triggered the submit, if it was a mouse event + + @see com::sun::star::awt::MouseEvent + */ + void submit( [in] com::sun::star::awt::XControl aControl, + [in] com::sun::star::awt::MouseEvent aMouseEvt ); + + + /** adds the specified listener to receive the "approveSubmit" event. + + @param aListener + the listener to add. + + @see com::sun::star::form::XSubmitListener + */ + void addSubmitListener( [in] com::sun::star::form::XSubmitListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XSubmitListener + */ + void removeSubmitListener( [in] com::sun::star::form::XSubmitListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XSubmitListener.idl b/offapi/com/sun/star/form/XSubmitListener.idl new file mode 100644 index 0000000000..44ae39b818 --- /dev/null +++ b/offapi/com/sun/star/form/XSubmitListener.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** receives notifications about data being submitted. + +

The submission may be canceled, so the listener has the possibility + of verifying the data before submission.

+ + @see XSubmit + + @deprecated + This interface is superseded by the com::sun::star::form::submission::XSubmissionVetoListener + interface. New implementations should use the latter, if possible. + */ +published interface XSubmitListener: com::sun::star::lang::XEventListener +{ + + /** is invoked when a component is about to submit it's data. + + @param Event + the event happened + + @returns + `TRUE` when submitting was approved, otherwise `FALSE`. + */ + boolean approveSubmit( [in] com::sun::star::lang::EventObject Event ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XUpdateBroadcaster.idl b/offapi/com/sun/star/form/XUpdateBroadcaster.idl new file mode 100644 index 0000000000..374432565e --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateBroadcaster.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** is the broadcaster interface for sending "approveUpdate" and "updated" events. + +

The component supporting this interface must do approval calls + (XUpdateListener::approveUpdate()) immediately + before the data is updated, and notification calls + (XUpdateListener::updated()) immediately afterwards.

+ + @see XUpdateListener + */ +published interface XUpdateBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the events "approveUpdate" + and "updated". + @param aListener + the listener to add. + @see com::sun::star::form::XUpdateListener + */ + void addUpdateListener( [in] com::sun::star::form::XUpdateListener aListener ); + + + /** removes the specified listener. + @param aListener + the listener to remove. + @see com::sun::star::form::XUpdateListener + */ + void removeUpdateListener( [in] com::sun::star::form::XUpdateListener aListener ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/XUpdateListener.idl b/offapi/com/sun/star/form/XUpdateListener.idl new file mode 100644 index 0000000000..b5ac224cb0 --- /dev/null +++ b/offapi/com/sun/star/form/XUpdateListener.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { + + +/** used to listen on objects which allow updating their data. +

In addition to just get notified when a data update happened, the listener + has a chance to veto updates before they happen.

+ + @see XUpdateBroadcaster + */ +published interface XUpdateListener: com::sun::star::lang::XEventListener +{ + + /** is invoked to check the current data. + +

For a given update process, if one of the XUpdateListeners + vetoes the change, the update is canceled, and no further notification happens.

+ + @param aEvent + An event descriptor specifying the broadcaster of the change. + + @returns + `TRUE` when the update was approved, otherwise `FALSE`. + */ + boolean approveUpdate( [in] com::sun::star::lang::EventObject aEvent ); + + + /** is invoked when an object has finished processing the updates and + the data has been successfully written. + + @param aEvent + A event descriptor specifying the broadcaster of the change. + */ + void updated( [in] com::sun::star::lang::EventObject aEvent ); + +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableControlModel.idl b/offapi/com/sun/star/form/binding/BindableControlModel.idl new file mode 100644 index 0000000000..d667cab686 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableControlModel.idl @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + +/** specifies the model of a form control which supports binding to an external + value supplier. +*/ +service BindableControlModel +{ + /** specifies the basic functionality for a form control model + +

Via this service, bindable control models inherit the + com::sun::star::util::XCloneable interface.
+ If a bindable control model, at which a binding has been established (via + XBindableValue::setValueBinding()), is being cloned, then the + binding is also established at the clone. Effectively, this means that + both control model instances share the same binding instance.

+ */ + service com::sun::star::form::FormControlModel; + + /** specifies support for being bound to an external value + +

When a BindableControlModel is bound to an external value, + then every change in the control model's value is immediately reflected + in the external binding.

+ +

If the binding set via this interface supports the ValueBinding::ReadOnly + and ValueBinding::Relevant properties, they're respected by the control model: +

  • The control model's own ReadOnly property (if present) is kept in sync with the + binding's ReadOnly property. That is, any control using the value + binding is read-only as long as the binding is.
  • +
  • The control model's own Enabled property (if present) is kept in sync + with the binding's Relevant property. That is, any control using + the value binding is disabled as long as the binding is not relevant.
  • +
+

+ +

In both cases, explicit changes of the model's property are ignored if they would relax + the restriction imposed by the binding.
+ For instance, if the binding declares its value to + be read-only (indicated by ValueBinding::ReadOnly being `TRUE`), then + any attempt to set the ReadOnly property of the control model to `FALSE` will + fail. However, if the binding's value is not read-only, then the ReadOnly + property at the control model can be freely set.
+ The very same holds for the binding's ValueBinding::Relevant and the control + model's Enabled properties.

+ */ + interface XBindableValue; +}; + + +}; }; }; }; }; + +/* 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 0000000000..1d647d9985 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDataAwareControlModel.idl @@ -0,0 +1,110 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** is a specialization of the com::sun::star::form::DataAwareControlModel + which additionally supports binding to external value suppliers. + +

Control models usually have some kind of value property, which reflects the very current + content of the controls associated with this model. For instance, for an + com::sun::star::form::component::TextField, this would be the + com::sun::star::awt::UnoControlEditModel::Text property of the base + service. Similarly, a com::sun::star::form::component::CheckBox has + a property com::sun::star::awt::UnoControlCheckBoxModel::State, which + reflects the current check state.

+ +

Usual com::sun::star::form::DataAwareControlModels can be bound to + a column of a com::sun::star::form::component::DataForm, and exchange + their content with such a column.
+ In particular, when the com::sun::star::form::component::DataForm + is moved to a different record, then the bound control model is updated with the value of + it's column in this particular row.
+ On the other hand, when any change in the control model (e.g. resulting from a user entering + data in a control associated with the control model) is committed + (com::sun::star::form::XBoundComponent::commit()), then the actual + data of the control model is written into the associated + com::sun::star::form::component::DataForm column.

+ +

BindableDataAwareControlModel's additionally support an alternative value + binding, which forces them to exchange their value with another foreign instance. + In some sense, they are an abstraction of the data aware control models, which only + support a specialized, hard-coded value binding (namely the binding to a + com::sun::star::form::component::DataForm column).

+ +

For this, they provide the XBindableValue interface which allows to + set an external component to exchange the value with.

+ +

The following rules apply when a data aware control model is bound to an external value binding: +

  • Priority
    + 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. +
  • +
  • Activation
    + 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). +
  • +
  • Immediacy
    + When a BindableDataAwareControlModel is bound to an external value, + then every change in the control model's value is immediately 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().
    + Note that this restriction is inherited from the BindableControlModel. +
  • +
  • Cloning
    + 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.
    + When a BindableDataAwareControlModel is cloned while it has an active + external value binding, then the clone is also bound to the same binding instance.
    + Note that this restriction is inherited from the BindableControlModel. +
  • +
+

+ +

When a BindableDataAwareControlModel is being bound to an external value, + using XBindableValue::setValueBinding(), + then the control model (its value property, respectively) and the external value are + initially synchronized by setting the external value (XValueBinding::getValue()) + at the control model.

+ +*/ +service BindableDataAwareControlModel +{ + /** specifies the functionality for binding the control model to a + column of an SQL com::sun::star::form::component::DataForm. + */ + service com::sun::star::form::DataAwareControlModel; + + /** specifies the functionality for alternatively binding the control model + to an external value. + */ + service BindableControlModel; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl new file mode 100644 index 0000000000..b53a685834 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseCheckBox.idl @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a check box which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseCheckBox must support exchanging + boolean values. The following mapping between external values and control states apply: +

  • `TRUE` will be mapped to the box being checked, and vice versa
  • +
  • `FALSE` will be mapped to it being unchecked, and vice versa
  • +
  • `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.
  • +

+ +

If the value binding associated with a BindableDatabaseCheckBox + supports exchanging string values, and the com::sun::star::form::component::CheckBox::RefValue + is not empty, then the radio button will exchange its value as string: +

  • A string equal to the reference value will be mapped to the button being checked, and vice versa
  • +
  • A string not equal to the reference value will be mapped to the button being unchecked, and vice versa
  • +
  • `NULL` will be mapped to it being in undetermined state
  • +

+ + @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.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's not + checked. + +

com::sun::star::form::component::CheckBox::RefValue is transferred to + possible external value bindings as soon as the check box is checked. With the member + #SecondaryRefValue, clients of the check box can also associate a value with + the not checked state of the control.

+ */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl new file mode 100644 index 0000000000..773f8239c9 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseComboBox.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a model of a combo box (a list box combined with a text + input field) which is data-aware and thus can be bound to a database field, + and additionally supports binding to arbitrary external values. + +

If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as string, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). +

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlComboBoxModel::Text + */ +service BindableDatabaseComboBox +{ + service com::sun::star::form::component::DatabaseComboBox; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl new file mode 100644 index 0000000000..dd54580722 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Date. +

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlDateFieldModel::Date + */ +service BindableDatabaseDateField +{ + service com::sun::star::form::component::DatabaseDateField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl new file mode 100644 index 0000000000..22648dcc2a --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseFormattedField.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a formatted input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseFormattedField must support exchanging + values of type double.

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseFormattedField +{ + service com::sun::star::form::component::DatabaseFormattedField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl new file mode 100644 index 0000000000..9c61d79725 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseListBox.idl @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + +/** This service specifies a list box model which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

There are six possible ways that a BindableDatabaseListBox exchanges + values with an external binding. If a new binding + is set at a BindableDatabaseListBox, the types from the following list are + tried in descending order: The first type supported by the binding is used for data exchange. +

    +
  1. sequences of `any`s: + 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.
  2. +
  3. `any` value: + 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.
  4. +
  5. sequences of long integers: When used, the integers in the sequence will represent + the indexes of the selected entries of the list box.
  6. +
  7. long integer value: 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.
  8. +
  9. sequences of strings: When used, the strings in the sequence present the texts + of the selected entries of the list box.
  10. +
  11. string values: 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.
  12. +

+ + @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.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..f5f2bb6200 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseNumericField.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a numeric input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseNumericField must support exchanging + values of type double.

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + */ +service BindableDatabaseNumericField +{ + service com::sun::star::form::component::DatabaseNumericField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl new file mode 100644 index 0000000000..83c59e517d --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseRadioButton.idl @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a radio button which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

The com::sun::star::form::binding::XValueBinding instance which + can be associated with a BindableDatabaseRadioButton must support exchanging + boolean values. The following mapping between external values and control states apply: +

  • `TRUE` will be mapped to the button being checked, and vice versa
  • +
  • `FALSE` will be mapped to it being unchecked, and vice versa
  • +
  • `NULL` will be mapped to it being in undetermined state
  • +

+ +

If the value binding associated with a BindableDatabaseRadioButton + supports exchanging string values, and the com::sun::star::form::component::RadioButton::RefValue + is not empty, then the radio button will exchange its value as string: +

  • A string equal to the reference value will be mapped to the button being checked, and vice versa
  • +
  • A string not equal to the reference value will be mapped to the button being unchecked, and vice versa
  • +
  • `NULL` will be mapped to it being in undetermined state
  • +

+ + @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.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + + /** specifies a value which is to be associated with the control when it's not + selected. + +

com::sun::star::form::component::RadioButton::RefValue is transferred to + possible external value bindings as soon as the radio button is selected. With the member + #SecondaryRefValue, clients of the radio button can also associate a value with + the not selected state of the control.

+ */ + [property] string SecondaryRefValue; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl new file mode 100644 index 0000000000..729cdc5dc7 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTextField.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a text input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's text with the binding as string, thus only + bindings supporting string exchange will be accepted in + com::sun::star::form::binding::XValueBinding::setValueBinding(). +

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlEditModel::Text + */ +service BindableDatabaseTextField +{ + service com::sun::star::form::component::DatabaseTextField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl new file mode 100644 index 0000000000..edd84e2395 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** This service specifies a date input field which is data-aware and thus can be bound to a + database field, and additionally supports binding to arbitrary external values. + +

If a com::sun::star::form::binding::ValueBinding instance is + set at the field, it will exchange it's content with the binding as com::sun::star::util::Time. +

+ + @see com::sun::star::form::binding::XValueBinding::supportsType + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + */ +service BindableDatabaseTimeField +{ + service com::sun::star::form::component::DatabaseTimeField; + + /** specifies the interaction between an internal binding to a database column, + and an external value binding.

+ */ + service com::sun::star::form::binding::BindableDataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl new file mode 100644 index 0000000000..f47ac63ac4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/BindableIntegerValueRange.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** this service specifies a BindableControlModel which reflects + an integer value, out of a range of permitted integer values. + +

BindableIntegerValueRanges have a value property, a minimum, and a maximum, + all of type integer.

+*/ +service BindableIntegerValueRange +{ + /** specifies that the control can be bound to external values + +

Any binding used with the control model (see XBindableValue::setValueBinding()) + must support exchanging double values.

+ +

When the (integer) value reflected by the control model is changed, it's converted + into a double value and propagated to the binding.

+ +

When the external (double) value changes, it's converted as follows to an integer + value: +

  • If the external value is `NULL`, the current value of the control model + will be set to its minimum.
  • +
  • If the external value is the infinite value, the control value will + be set to its maximum or minimum, depending on the sign of the external value.
  • +
  • If none of the aforementioned conditions is met, the external value will be simply + rounded.
  • +
+ */ + service com::sun::star::form::binding::BindableControlModel; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..ac390244c8 --- /dev/null +++ b/offapi/com/sun/star/form/binding/IncompatibleTypesException.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { module binding { + + +/** thrown to indicate that the types of an XValueBinding and + an XBindableValue are incompatible +*/ +exception IncompatibleTypesException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +/* 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 0000000000..9fa40d97b9 --- /dev/null +++ b/offapi/com/sun/star/form/binding/InvalidBindingStateException.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { module binding { + + +/** thrown when an XValueBinding cannot perform a requested + operation due to an invalid state. +*/ +exception InvalidBindingStateException: com::sun::star::uno::Exception +{ +}; + + +}; }; }; }; }; + + +/* 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 0000000000..d0e35dec70 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntryEvent.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 . + */ + + +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. + +

The concrete semantics of the value depends on the concrete + event being notified.

+ */ + long Position; + + /** denotes the number of changed entries, in case a change of + an entry range is being notified. + */ + long Count; + + /** denotes the changed entries + +

The concrete semantics of the value depends on the concrete + event being notified.

+ */ + sequence< string > + Entries; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ListEntrySource.idl b/offapi/com/sun/star/form/binding/ListEntrySource.idl new file mode 100644 index 0000000000..4da8e751ef --- /dev/null +++ b/offapi/com/sun/star/form/binding/ListEntrySource.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which provides a list of string entries +*/ +service ListEntrySource +{ + /** allows read access to the entries represented by this component + */ + interface XListEntrySource; + + /** allows life time control for the component + +

An ListEntrySource will be known to one or more components + supporting the XListEntrySink interface, which all work with + this source. However, they will not own the ListEntrySource. + The ownership is with another instance, which may also decide to obsolete + the ListEntrySource for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ListEntrySource + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XListEntrySinks.

+ */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/ValueBinding.idl b/offapi/com/sun/star/form/binding/ValueBinding.idl new file mode 100644 index 0000000000..3562e6d232 --- /dev/null +++ b/offapi/com/sun/star/form/binding/ValueBinding.idl @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** defines a component which allows access to a single value + +

Read/Write access to the value represented by this component is supported, + as well as (optionally) active broadcasting of value changes

+*/ +service ValueBinding +{ + /** determines whether the value is currently readonly + +

For instance, you could imagine a ValueBinding which + represents a cell in a spreadsheet document, and whose value is readonly + as long as the spreadsheet is locked.

+ +

As long as this property is `TRUE`, the value binding should throw + an InvalidBindingStateException when its + XValueBinding::setValue() method is invoked.

+ */ + [optional, property, bound, readonly] boolean ReadOnly; + + /** determines the relevance of the value represented by the binding + +

In a more complex scenario, where different form controls are bound to different + values, which all are part of a larger data structure, some of the items in this + data structure may not be relevant currently. This is indicated by the + #Relevant property being `FALSE`.

+ +

XBindableValues which are bound to this binding may or may not + react in certain ways on the (ir)relevance of their bound value.

+ +

One possible reaction could be that user interface elements which are associated + with the XBindableValue are disabled as long as #Relevant + is `FALSE`.

+ */ + [optional, property, bound, readonly] boolean Relevant; + + /** allows access to the properties of the binding + */ + [optional] interface com::sun::star::beans::XPropertySet; + + /** allows read and write access to the value represented by this binding + */ + interface XValueBinding; + + /** allows other components to be notified when the value represented + by the ValueBinding instance changes. + +

This interface is optional, since a binding may not support + actively notifying changes in its value. Note, however, that in case + this interface is not supported, the bound component cannot react + on value changes, and will thus override any values which are + set by an instance other than itself.

+ */ + [optional] interface com::sun::star::util::XModifyBroadcaster; + + /** allows life time control for the component + +

A ValueBinding may be known to one or more components + supporting the XBindableValue interface, which all work with + this binding. However, they will not own the ValueBinding. + The ownership is with another instance, which may also decide to obsolete + the ValueBinding for whatever reasons (e.g. because the data model + which the binding reflected died). For this reason, a ValueBinding + must offer a possibility to be obsoleted by its owner, and to notify this + obsoleteness to other interested parties, such as XBindableValues.

+ */ + interface com::sun::star::lang::XComponent; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XBindableValue.idl b/offapi/com/sun/star/form/binding/XBindableValue.idl new file mode 100644 index 0000000000..96d8da5746 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XBindableValue.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + +interface XValueBinding; + + +/** specifies support for being bound to an external value + + @see XValueBinding +*/ +interface XBindableValue : com::sun::star::uno::XInterface +{ + /** sets an external instance which controls the value of the component + +

Any previously active binding will be revoked. There can be only one!

+ + @param aBinding + the new binding which is to be used by the component. May be `NULL`, + in this case only the current binding is revoked. + + @throws IncompatibleTypesException + if the new binding (provided it's not `NULL`) supports only types + which are incompatible with the types of the bindable component. + */ + void setValueBinding( [in] XValueBinding aBinding ) + raises ( IncompatibleTypesException ); + + /** retrieves the external instance which currently controls the value of the + component + */ + XValueBinding + getValueBinding( ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntryListener.idl b/offapi/com/sun/star/form/binding/XListEntryListener.idl new file mode 100644 index 0000000000..71ebe81fc4 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryListener.idl @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** specifies a listener for changes in a string entry list +*/ +interface XListEntryListener : com::sun::star::lang::XEventListener +{ + /** notifies the listener that a single entry in the list has change + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the changed entry, the first (and only) element + of the ListEntryEvent::Entries member denotes the new string + */ + void entryChanged( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been inserted into the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first inserted entry, the + ListEntryEvent::Entries member contains the strings which have + been inserted. + */ + void entryRangeInserted( [in] ListEntryEvent Source ); + + /** notifies the listener that a range of entries has been removed from the list + + @param Source + is the event describing the change. The ListEntryEvent::Position + member denotes the position of the first removed entry, the + ListEntryEvent::Count member the number of removed entries. + */ + void entryRangeRemoved( [in] ListEntryEvent Source ); + + /** notifies the listener that all entries of the list have changed. + +

The listener should retrieve the complete new list by calling the + XListEntrySource::getAllListEntries() method of the event source + (which is denoted by com::sun::star::lang::EventObject::Source). + */ + void allEntriesChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySink.idl b/offapi/com/sun/star/form/binding/XListEntrySink.idl new file mode 100644 index 0000000000..8aac0bd431 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySink.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + +interface XListEntrySource; + + +/** specifies support for indirect manipulation of a string list +*/ +interface XListEntrySink : com::sun::star::uno::XInterface +{ + /** sets the new source for the list entries of the component + +

The list represented by this component will be cleared, and initially + filled with the entries from the new list source.

+ + @param Source + the new source for the list entries. May be `NULL`, in this + case, the current source is revoked. + */ + void setListEntrySource( [in] XListEntrySource Source ); + + /** retrieves the current source for the list entries of the component. + */ + XListEntrySource + getListEntrySource( ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntrySource.idl b/offapi/com/sun/star/form/binding/XListEntrySource.idl new file mode 100644 index 0000000000..e9af214d97 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntrySource.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + +interface XListEntryListener; + + +/** specifies a source of string list entries + +

The interface supports foreign components which actively retrieve list entries, + as well as components which want to passively being notified of changes in the list.

+ + @see XListEntrySink +*/ +interface XListEntrySource : com::sun::star::uno::XInterface +{ + /** retrieves the number of entries in the list + */ + long getListEntryCount( ); + + /** provides access to a single list entry + + @throws com::sun::star::lang::IndexOutOfBoundsException + if the given position does not denote a valid index in the list + + @see getListEntryCount + */ + string getListEntry( [in] long Position ) + raises( com::sun::star::lang::IndexOutOfBoundsException ); + + /** provides access to the entirety of all list entries + */ + sequence< string > + getAllListEntries( ); + + /** adds a listener which will be notified about changes in the list + reflected by the component. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void addListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** revokes the given listener from the list of components which will + be notified about changes in the entry list. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void removeListEntryListener( [in] XListEntryListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl new file mode 100644 index 0000000000..895f2665c2 --- /dev/null +++ b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + + +module com { module sun { module star { module form { module binding { + + +/** specifies a source of string list entries with corresponding underlying data values + + @see XListEntrySource + + @since LibreOffice 5.4 +*/ +interface XListEntryTypedSource : com::sun::star::form::binding::XListEntrySource +{ + /** provides access to the entirety of all list entries, along with + the corresponding underlying data values. + + @param DataValues + The sequence is used by + com::sun::star::form::component::ListBox for external + sources such as spreadsheets to return the resulting + data value if a listbox entry was selected, e.g. set it + at the specified bound cell using + com::sun::star::form::binding::XValueBinding::setValue(). + */ + sequence< string > getAllListEntriesTyped( [out] sequence< any > DataValues ); + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/binding/XValueBinding.idl b/offapi/com/sun/star/form/binding/XValueBinding.idl new file mode 100644 index 0000000000..17e6fac33c --- /dev/null +++ b/offapi/com/sun/star/form/binding/XValueBinding.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module binding { + + +/** specifies a binding to a value which can be read and written. +*/ +interface XValueBinding : com::sun::star::uno::XInterface +{ + /** determines the types which are supported by this binding for value exchange + + @see supportsType + */ + sequence< type > + getSupportedValueTypes( ); + + /** determines whether a given type is supported by this binding for value exchange + +

Calling this method is equal to calling getSupportedValueTypes(), + and looking up the given type in the resulting type sequence.

+ + @see getSupportedValueTypes + */ + boolean supportsType( [in] type aType ); + + /** retrieves the current value + + @throws IncompatibleTypesException + if the requested value type is not supported by the binding + @see getSupportedValueTypes + @see supportsType + */ + any getValue( [in] type aType ) + raises( IncompatibleTypesException ); + + /** sets the current value + + @throws IncompatibleTypesException + if the given value type is not supported by the binding + @throws InvalidBindingStateException + if the value currently cannot be changed, since the binding is not + fully operational. Possible reasons for this include the binding being + readonly, or the target of the binding not being present. + @throws com::sun::star::lang::NoSupportException + if the binding in general does not support write access to its binding + + @see getSupportedValueTypes + @see supportsType + @see ValueBinding + */ + void setValue( [in] any aValue ) + raises( IncompatibleTypesException, InvalidBindingStateException, com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CheckBox.idl b/offapi/com/sun/star/form/component/CheckBox.idl new file mode 100644 index 0000000000..1f669824fc --- /dev/null +++ b/offapi/com/sun/star/form/component/CheckBox.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a check box control + +

The model supports the properties required for HTML, thus you can build up + HTMLForms with it

+ */ +published service CheckBox +{ + service com::sun::star::awt::UnoControlCheckBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see CheckBox::DefaultState + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlCheckBoxModel::State + @see com::sun::star::form::XReset + */ + [property] short DefaultState; + + + /** contains a reference value which is used for submission in a HTML + form + +

When submitting a HTMLForm which contains a check box, + which is checked, the RefValue is used for submission. + */ + [property] string RefValue; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ComboBox.idl b/offapi/com/sun/star/form/component/ComboBox.idl new file mode 100644 index 0000000000..b92412311a --- /dev/null +++ b/offapi/com/sun/star/form/component/ComboBox.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text or selection + of text from a list of text values. + */ +published service ComboBox +{ + service com::sun::star::awt::UnoControlComboBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see ComboBox::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlComboBoxModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CommandButton.idl b/offapi/com/sun/star/form/component/CommandButton.idl new file mode 100644 index 0000000000..7fa1d94dbc --- /dev/null +++ b/offapi/com/sun/star/form/component/CommandButton.idl @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the control model for a clickable button which is part of a form + component hierarchy. + + @see ImageButton + */ +published service CommandButton +{ + service com::sun::star::awt::UnoControlButtonModel; + + service com::sun::star::form::FormControlModel; + + /** supplies the image producer when the button is to display an image. + +

If the com::sun::star::awt::UnoControlButtonModel::ImageURL points to the location of an + image to be displayed on the button, this interface can be used to retrieve an image + producer, which itself will supply the image.

+ +

Usually, a control belonging to the model will use this interface to obtain the + image to be painted

+ */ + interface com::sun::star::form::XImageProducerSupplier; + + + /** describes the action to be executed by the button when pressed. + */ + [property] com::sun::star::form::FormButtonType ButtonType; + + /** describes the frame, where to open the document specified by the TargetURL. + +

This property is evaluated if the button is of type URL.

+ +

As always, there is a number of target names which have a special meaning, and force + a special com::sun::star::frame::Frame to be used.

+ */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + +

This property is evaluated if the button is of type URL.

+ + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; + + /** specifies the default toggle state for the button, used when it is reset. + +

This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle + is `TRUE`. In this case, the DefaultState controls to which State the button will + be reset.

+ +

For a given implementation of the interface, if this (optional) property is present, then also the optional + interface com::sun::star::form::XReset must be present.

+ */ + [optional, property] boolean DefaultState; + + /** allows resetting the button + +

This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle + is `TRUE`. In this case, the DefaultState controls to which State the button will + be reset, when com::sun::star::form::XReset::reset() is invoked.

+ +

For a given implementation of the interface, if this (optional) interface is present, then also the optional + property #DefaultState must be present.

+ */ + [optional] interface ::com::sun::star::form::XReset; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/CurrencyField.idl b/offapi/com/sun/star/form/component/CurrencyField.idl new file mode 100644 index 0000000000..2ccacf8f55 --- /dev/null +++ b/offapi/com/sun/star/form/component/CurrencyField.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the ControlModel for an edit field which + contains a currency value. + */ +published service CurrencyField +{ + service com::sun::star::awt::UnoControlCurrencyFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see CurrencyField::DefaultValue + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + + @see com::sun::star::awt::UnoControlCurrencyFieldModel::Value + @see com::sun::star::form::XReset + */ + [property] double DefaultValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DataForm.idl b/offapi/com/sun/star/form/component/DataForm.idl new file mode 100644 index 0000000000..ed0ff3eb7d --- /dev/null +++ b/offapi/com/sun/star/form/component/DataForm.idl @@ -0,0 +1,184 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + + published interface XReset; + published interface XDatabaseParameterBroadcaster; + +module component { +/** This service specifies a form which is connected to a database and + displays the results of SQL queries. It provides the possibility of + adding new data records, modifying existing ones, or deleting them. + +

A database form is a special kind of enhanced database row set + which provides all information for displaying the data and has more + possibilities for configuring the data manipulation.

+ +*/ +published service DataForm +{ + service com::sun::star::sdb::RowSet; + service com::sun::star::form::component::Form; + + /** is used to reset controls belonging to the form, and to reset database fields to which the + controls are bound + +

A DataForm is reset either on explicit request, or after it is moved + to the insertion row.

+ +

The insertion row is a virtual row which is used to insert new records. It is reached + by calling com::sun::star::sdbc::XResultSetUpdate::moveToInsertRow(). + The com::sun::star::sdb::RowSet service specifies exactly which notifications + happen in which order when calling com::sun::star::sdbc::XResultSetUpdate::moveToInsertRow(), + and a DataForm implementation extends this with the following contract: +

  • 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.
  • +
  • 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).
  • +
  • The reset listeners are notified of the completed reset operation.
  • +

+ */ + interface com::sun::star::form::XReset; + + /** used to load/unload the form +

Loading a form is basically the same as executing the underlying row set. In fact, all the + functionality of this interface could be simulated by using setting some properties manually, + com::sun::star::sdbc::XRowSet::execute(), moving the row set cursor and so on.

+ +

One main difference between XLoadable::load() and com::sun::star::sdbc::XRowSet::execute() + is that if you use the former, the row set is positioned on the first record, while in the latter case + it is position before the it.

+ */ + interface com::sun::star::form::XLoadable; + + /** can be used to allow an interaction handler to supply missing data during a load process. + +

If data is needed during loading a form, then this is usually obtained via broadcaster-listener + mechanisms. An example for this (and currently the only one) are parameter values.

+

However, if you use this method, you can pass an interaction handler which should supply these + additional data.

+ + @see com::sun::star::sdb::InteractionHandler + */ + interface com::sun::star::sdb::XCompletedExecution; + + /** can be used for filling parameters. + +

You can add your component as + com::sun::star::form::XDatabaseParameterListener + to a form to get notified whenever the form needs parameter values to be filled in
+ In a first approach, the form tries to fill any parameters from its master-detail relation + (if any). All values which can't be filled are then passed to all listeners, which can + fill them by their own choice.

+ +

This is slightly changed if the form is loaded using the + com::sun::star::sdb::XCompletedExecution::connectWithCompletion() method. In this case, the parameters + are obtained from the interaction handler, not from the listeners

+ + @see XCompletedExecution + @see MasterFields + @see DetailFields + */ + interface com::sun::star::form::XDatabaseParameterBroadcaster; + + /** is used for subforms and contains the names of columns of the parent form. + +

These columns are typically the foreign key fields of the parent form. + The values of these columns are used to identify the data for the subform. + Each time the parent form changes its current row, the subform requeries + it's data based on the values of the master fields.

+ +

If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.

+ */ + [property] sequence 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. + +

Entries in this sequence can either denote column names in the sub form, + or parameter names.
+ For instance, you could base the form on the SQL statement + SELECT * FROM invoices WHERE cust_ref = :cid, and add cid + to the DetailFields property. In this case, the parameter will be filled from + the corresponding master field.
+ Alternatively, you could simply base your form on the table invoices, + and add the column name cust_ref to the DetailFields. In this case, + and implicit filter clause WHERE cust_ref = :<new_param_name> will + be created, and the artificial parameter will be filled from the corresponding + master field.
+ If a string in this property denotes both a column name and a parameter name, it + is undefined which way it is interpreted, but implementations of the service are required + to either decide for the parameter or the column, and proceed as usual. +

+ +

The columns specified herein typically represent a part of the primary key + fields or their aliases of the detail form.

+ +

If the form is no sub form (e.g. its parent is not a form itself), this + property is not evaluated.

+ */ + [property] sequence 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. + +

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.

+ */ + [property] boolean AllowInserts; + + /** determines if modifications of the current record of the form are allowed. + +

Note that this is a recommendation for user interface components displaying the + form. Form implementations may decide to allow for updates done via the API, even + if the property is set to `FALSE`, but the user interface should respect the property + value.

+ */ + [property] boolean AllowUpdates; + + /** determines if deletions of records of the form are allowed. + +

Note that this is a recommendation for user interface components displaying the + form. Form implementations may decide to allow for deletions done via the API, even + if the property is set to `FALSE`, but the user interface should respect the property + value.

+ */ + [property] boolean AllowDeletes; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseCheckBox.idl b/offapi/com/sun/star/form/component/DatabaseCheckBox.idl new file mode 100644 index 0000000000..5d7db13cf5 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCheckBox.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a check box which is data-aware, and can be bound to a database field. + +

Mostly, you will create data-aware checkboxes as tristate checkboxes, because this + is a requirement to correctly handle `NULL` values in databases.

+ + @see ::com::sun::star::awt::UnoControlCheckBoxModel::TriState + */ +published service DatabaseCheckBox +{ + service com::sun::star::form::component::CheckBox; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseComboBox.idl b/offapi/com/sun/star/form/component/DatabaseComboBox.idl new file mode 100644 index 0000000000..5591e435ab --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseComboBox.idl @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a combo box which is data-aware, and can be bound to a database field. + +

Like most other data aware controls, such a combo box will display the actual content + of the field it is bound to. In addition, as a combo box contains a list where the user + can choose items to fill into the control, this list can be filled with different data from + a database, too.

+ */ +published service DatabaseComboBox +{ + service com::sun::star::form::component::ComboBox; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +

When the user enters text into a combo box, and after this, the control + content is to be committed into the database field the control is bound to, + a decision must be made how to deal with empty strings.
+ This is controlled by #ConvertEmptyToNull.

+ +

If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.

+ */ + [property] boolean ConvertEmptyToNull; + + /** describes the source of items in the combo box's list. + +

The concrete meaning of this property depends on the value of #ListSourceType

+ */ + [property] string ListSource; + + /** specifies the kind of list source. + +

Note: A value of com::sun::star::form::ListSourceType::VALUELIST + is not valid for a combo box. It won't be rejected when setting it, but controls will usually ignore it + and leave the list empty.

+ */ + [property] com::sun::star::form::ListSourceType ListSourceType; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl b/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl new file mode 100644 index 0000000000..7cd1ccfc16 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseCurrencyField.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a currency field which is data-aware, and can be bound to a database field. + */ +published service DatabaseCurrencyField +{ + service com::sun::star::form::component::CurrencyField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseDateField.idl b/offapi/com/sun/star/form/component/DatabaseDateField.idl new file mode 100644 index 0000000000..d805965c27 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseDateField.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a date field which is data-aware, and can be bound to a database field. + */ +published service DatabaseDateField +{ + service com::sun::star::form::component::DateField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseFormattedField.idl b/offapi/com/sun/star/form/component/DatabaseFormattedField.idl new file mode 100644 index 0000000000..0504474048 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseFormattedField.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a formatted field model which is data-aware, and can be bound to a database field. + */ +published service DatabaseFormattedField +{ + service com::sun::star::form::component::FormattedField; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +

When the user enters text into a formatted field control, and after this, the control + content is to be committed into the database field the control is bound to, + a decision must be made how to deal with empty strings.
+ This is controlled by #ConvertEmptyToNull.

+ +

If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.

+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseImageControl.idl b/offapi/com/sun/star/form/component/DatabaseImageControl.idl new file mode 100644 index 0000000000..3c7f493a06 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseImageControl.idl @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a control used for displaying images stored in a database. + +

As every com::sun::star::form::DataAwareControlModel, an image control + can be bound to a database field. This means that for instance with every record change, the content + of the database field is taken, interpreted as image, and displayed in the control.
+ Unlike other more text-based controls, it does not interpret the content of the field as text or double, + but as binary stream (see com::sun::star::sdb::XColumn::getBinaryStream()).

+ +

Usually, an image control model can be bound to binary columns only, namely + com::sun::star::sdbc::DataType::BINARY, + com::sun::star::sdbc::DataType::VARBINARY, + com::sun::star::sdbc::DataType::LONGVARBINARY, + com::sun::star::sdbc::DataType::OTHER, + com::sun::star::sdbc::DataType::LONGVARCHAR

+ +

+ +

Note that besides taking the image to be displayed from the bound field, there is another option. The + com::sun::star::awt::UnoControlImageControlModel::ImageURL property specifies + the URL of an image to be displayed. If this property is changed from outside, the respective file + is loaded and set as image source.

+ +

In a usual data form, the scenario will be as follows: +

  • There is a DatabaseImageControl as part of the document model, which acts as + control model for a com::sun::star::form::control::ImageControl.
  • + +
  • The control is a com::sun::star::awt::XImageConsumer for the + com::sun::star::awt::XImageProducer supplied by the model.
  • + +
  • 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.
  • + +
  • 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.
    + 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).
    + 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.
  • +
+

+ */ +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. + +

Other components can register as com::sun::star::awt::XImageConsumer + at this producer. Then they will be notified of any change in the image to be displayed.

+ */ + interface com::sun::star::form::XImageProducerSupplier; + + + /** indicates if it is possible to change the image being displayed. + */ + [property] boolean ReadOnly; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseListBox.idl b/offapi/com/sun/star/form/component/DatabaseListBox.idl new file mode 100644 index 0000000000..4bc5ca7fa5 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseListBox.idl @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware list box control model. + +

The base service for list boxes (ListBox) offers only + one possibility to specify the list entries: + The display strings in the + com::sun::star::awt::UnoControlListBoxModel::StringItemList + property and the corresponding values in the ListBox::ListSource + property.

+ +

This service here extends this mimic. It allows to fill the list from a data source. + This means that a second result set is opened, which works on the same connection as the + form which the list box belongs to, but can be based on an arbitrary table or SQL statement.

+ +

For instance, you may have a form which is bound to a table invoice, and you use it + to enter invoices for your customers. Probably, you will have a second table (say customer), + which (among other data) contains a unique key for identifying customers. In your invoice table, you will + have a foreign key referring to these customers.
+ Now, besides the result set the form is based on (all your invoices), the list box can be instructed + to open a second result set, this time for the customer table, and fill its list with entries + from this result set.
+ Additionally, it allows to model the relation between the two tables: When the user selects a customer from + the list, this customer has the unique id we just talked about (which is not necessarily visible to the + user in any way). The list box then automatically transfers this id into the foreign key column of + invoice, thus allowing the user to transparently work with human-readable strings instead of + pure numbers.
+ Let's call this result set the list is filled from the list result set here ...

+ +

The display strings are always taken from the first column of that result set, + and the corresponding value as per the BoundColumn property.

+ */ +published service DatabaseListBox +{ + service com::sun::star::form::component::ListBox; + + service com::sun::star::form::DataAwareControlModel; + + + /** specifies which column of the list result set should be used for data exchange. + +

When you make a selection from a list box, the "BoundColumn" + property reflects which column value of a result set should + be used as the value of the component. If the control is bound + to a database field, the column value is stored in the + database field identified by the property + com::sun::star::form::DataAwareControlModel::DataField. + +

+
-1
+
The index (starting at 0) of the selected list box entry + is stored in the current database field.
+ +
0 or greater
+
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.
+

+ +

The bound column property is only used if a list source is defined + and the list source matches with the types + com::sun::star::form::ListSourceType::TABLE, + com::sun::star::form::ListSourceType::QUERY, + com::sun::star::form::ListSourceType::SQL or + com::sun::star::form::ListSourceType::SQLPASSTHROUGH. + Otherwise the property is ignored, as there is no result set from which to + get the column values.

+ */ + [property] short BoundColumn; + + + /** describes the kind of list source used. + +

Depending on the value of this property, the way the value of ListBox::ListSource + is evaluated varies. +

+
com::sun::star::form::ListSourceType::VALUELIST
+
The elements in the string sequence in ListBox::ListSource + build up the entry list.
+ +
com::sun::star::form::ListSourceType::TABLE
+
The first element of the string sequence in ListBox::ListSource + determines the table which the list result set should be based on.
+ +
com::sun::star::form::ListSourceType::QUERY
+
The first element of the string sequence in ListBox::ListSource + determines the query which the list result set should be based on.
+ 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.
+ +
com::sun::star::form::ListSourceType::SQL
+
The first element of the string sequence in ListBox::ListSource + contains the SQL statement which the list result set should be based on.

+ +
com::sun::star::form::ListSourceType::SQLPASSTHROUGH
+
The first element of the string sequence in ListBox::ListSource + contains the SQL statement which the list result set should be based on.
+ 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.
+ +
com::sun::star::form::ListSourceType::TABLEFIELDS
+
The first element of the string sequence in ListBox::ListSource + determines the table whose column names should fill the list.
+
+

+ + */ + [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; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..f36a84884c --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseNumericField.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a 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; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..02958d4c63 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabasePatternField.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies 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. + +

When the user enters text into a pattern field, and after this, the control + content is to be committed into the database field the control is bound to, + a decision must be made how to deal with empty strings.
+ This is controlled by this property.

+ +

If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.

+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseRadioButton.idl b/offapi/com/sun/star/form/component/DatabaseRadioButton.idl new file mode 100644 index 0000000000..67fa79abbd --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseRadioButton.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a radio button which is data-aware, and can be bound to a database field. + */ +published service DatabaseRadioButton +{ + service com::sun::star::form::component::RadioButton; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseTextField.idl b/offapi/com/sun/star/form/component/DatabaseTextField.idl new file mode 100644 index 0000000000..2019db0ad3 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTextField.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a text field which is data-aware, and can be bound to a database field. + */ +published service DatabaseTextField +{ + service com::sun::star::form::component::TextField; + + service com::sun::star::form::DataAwareControlModel; + + + /** determines if an empty text should be treated as a `NULL` value. + +

When the user enters text into a text field, and after this, the control + content is to be committed into the database field the control is bound to, + a decision must be made how to deal with empty strings.
+ This is controlled by this property.

+ +

If the property is set to `TRUE`, and an empty text is to be committed, this is + converted into `NULL`, else it is written as empty string.

+ */ + [property] boolean ConvertEmptyToNull; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DatabaseTimeField.idl b/offapi/com/sun/star/form/component/DatabaseTimeField.idl new file mode 100644 index 0000000000..60692109d0 --- /dev/null +++ b/offapi/com/sun/star/form/component/DatabaseTimeField.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a data-aware field for inputting a time value. + */ +published service DatabaseTimeField +{ + service com::sun::star::form::component::TimeField; + + service com::sun::star::form::DataAwareControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/DateField.idl b/offapi/com/sun/star/form/component/DateField.idl new file mode 100644 index 0000000000..e33316f30a --- /dev/null +++ b/offapi/com/sun/star/form/component/DateField.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the model of a date field control, which is an edit field used to enter a date. +*/ +published service DateField +{ + service com::sun::star::awt::UnoControlDateFieldModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + +

If you do not set a value for the #DefaultDate, then resetting the control + will result in setting to the current system date. This is for HTML compatibility.

+ */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlDateFieldModel::Date + @see com::sun::star::form::XReset + */ + [property] long DefaultDate; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FileControl.idl b/offapi/com/sun/star/form/component/FileControl.idl new file mode 100644 index 0000000000..81f8215a3e --- /dev/null +++ b/offapi/com/sun/star/form/component/FileControl.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model of an edit field for a + file name. + */ +published service FileControl +{ + service com::sun::star::awt::UnoControlFileControlModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see FileControl::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlFileControlModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FixedText.idl b/offapi/com/sun/star/form/component/FixedText.idl new file mode 100644 index 0000000000..a9d354fa54 --- /dev/null +++ b/offapi/com/sun/star/form/component/FixedText.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model for a text which can be + displayed, but not edited by the user. + +

These kind of controls is usually used to label other controls.

+ + @see com::sun::star::form::DataAwareControlModel::LabelControl + */ +published service FixedText +{ + service com::sun::star::awt::UnoControlFixedTextModel; + + service com::sun::star::form::FormControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/Form.idl b/offapi/com/sun/star/form/component/Form.idl new file mode 100644 index 0000000000..bd1c1c7814 --- /dev/null +++ b/offapi/com/sun/star/form/component/Form.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a form which is a group of FormComponents. + +

A form fulfills several tasks, like storing the structure of its + form components, storing the information concerning tab ordering + and control grouping, and last but not least, it provides the + event environment for its contained elements.

+ +

A form acts on the one hand like a container of FormComponents + and on the other hand like a FormComponent. This generic + construction allows the definition of hierarchies of forms and their + dependent subforms.

+ + @see com::sun::star::form::FormControlModel + */ +published service Form +{ + service com::sun::star::form::FormComponent; + + service com::sun::star::form::FormComponents; + + /** identifies a component as form. + */ + interface com::sun::star::form::XForm; + + + /** This interface has to be implemented to supply the information for tab ordering and component grouping. + + @see com::sun::star::form::FormControlModel::TabIndex + */ + interface com::sun::star::awt::XTabControllerModel; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/FormattedField.idl b/offapi/com/sun/star/form/component/FormattedField.idl new file mode 100644 index 0000000000..00750d32ec --- /dev/null +++ b/offapi/com/sun/star/form/component/FormattedField.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the control model of an edit field for entering text which can be + (nearly) arbitrarily formatted. + + @see com::sun::star::util::XNumberFormatsSupplier + */ +published service FormattedField +{ + service com::sun::star::awt::UnoControlFormattedFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveValue + @see com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveDefault + */ + interface com::sun::star::form::XReset; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/GridControl.idl b/offapi/com/sun/star/form/component/GridControl.idl new file mode 100644 index 0000000000..dd0a8358be --- /dev/null +++ b/offapi/com/sun/star/form/component/GridControl.idl @@ -0,0 +1,142 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a model for a control which can display form data in a table-like way. + +

In opposite to other form controls, grid controls do not only + display the single current value of a column they are bound to. Moreover, they do + display not only the current row of the form, but all rows (at least potentially, limited + by the control size, of course).

+ +

The table rows in a grid control correspond to the rows in the DataForm + the control belongs to, and the columns correspond to single columns of the form's row set.

+ +

Columns of a grid control are modeled by own objects, too. They are very similar to usual + com::sun::star::form::DataAwareControlModels modeling other "single-value" controls, but they are not described + as own services. Instead, they need to be created using the com::sun::star::form::XGridColumnFactory interface.

+ */ +published service GridControl +{ + service com::sun::star::form::FormControlModel; + + /** provides basic functionality of a container of com::sun::star::form::FormComponents. + +

All the container-related methods of this service related to control models, + this is what are the container elements for a GridControl.

+ +

As the com::sun::star::form::FormComponents service also specifies + the com::sun::star::script::XEventAttacherManager service, grid control + models also provide a scripting environment for their columns.

+ */ + service com::sun::star::form::FormComponents; + + /** allows to create column models to be inserted into the control model. + +

Note that the object returned by the com::sun::star::form::XGridColumnFactory::createColumn() + method is not part of the grid control, yet. It needs to be inserted using any of the + container interfaces.

+ +

You always need to use this interface for creating columns for the grid control. + Column models not created this way will not be accepted when inserted later on.

+ */ + interface com::sun::star::form::XGridColumnFactory; + + /** gives access to the currently selection. + +

In a grid control, single columns can be selected (at most one at a time).
+ For various unfortunate reasons, this selection is an aspect of the model, not of the + control as you would expect.

+ +

This interface is deprecated, new implementations should not use it anymore, as it is to + be superseded by a solution which is bound to the control, not the model.

+ + @deprecated + */ + interface com::sun::star::view::XSelectionSupplier; + + /** resets the control. + +

The reset of the control is forwarded to all its elements, means to all the column models. + As grid columns are very much like data-aware stand-alone controls, you can find a description + of the reset functionality in com::sun::star::form::DataAwareControlModel::XReset. + */ + interface com::sun::star::form::XReset; + + + /** returns the border style of the control. + +

+        0: No border
+        1: 3D border
+        2: simple border
+        
+ */ + [property] short Border; + + + /** specifies the color of the border, if present + +

Not every border style (see #Border) may support coloring. + For instance, usually a border with 3D effect will ignore the BorderColor setting.

+ + @since OOo 2.0 + */ + [optional, property] long BorderColor; + + + /** determines whether the control is enabled or disabled. + */ + [property] boolean Enabled; + + + /** contains the font attributes of the text in the control. + */ + [property] com::sun::star::awt::FontDescriptor FontDescriptor; + + + /** specifies the height of a row of the grid. + +

If the value is set to `NULL`, the height is determined automatically according + to the current font used.

+ + @see GridControl::FontDescriptor + */ + [property] long RowHeight; + + + /** determines whether the control can be reached by the tabulator key. + */ + [property] boolean Tabstop; + + + /** specifies the text color (RGB) of the control. + */ + [property] com::sun::star::util::Color TextColor; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/GroupBox.idl b/offapi/com/sun/star/form/component/GroupBox.idl new file mode 100644 index 0000000000..bf26ad473b --- /dev/null +++ b/offapi/com/sun/star/form/component/GroupBox.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies a model for a control which can be used to visually + group controls. + */ +published service GroupBox +{ + service com::sun::star::awt::UnoControlGroupBoxModel; + + service com::sun::star::form::FormControlModel; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/HTMLForm.idl b/offapi/com/sun/star/form/component/HTMLForm.idl new file mode 100644 index 0000000000..9d577321af --- /dev/null +++ b/offapi/com/sun/star/form/component/HTMLForm.idl @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the special kind of Forms for HTML documents. + +

An HTMLForm fulfills the specification of forms in HTML. It supplies + the possibility of submitting or resetting the contents of a form. + For more information on HTML forms, please see the documentation of HTML.

+ */ +published service HTMLForm +{ + service com::sun::star::form::component::Form; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + /** allows to submit changes. + +

When a form is submitted, the data contained in the form is sent + to the target URL as a series of name/value pairs. The name portion + of each pair is the name of a form component as specified by its NAME + attribute. In most cases the value portion is the value displayed + by the element, for example, the text displayed in a text field.

+ */ + interface com::sun::star::form::XSubmit; + + /** describes the frame, where to open the document specified by the TargetURL. + */ + [property] string TargetFrame; + + + /** specifies the URL, which should be used for submission. + */ + [property] string TargetURL; + + /** specifies the kind of submission. + */ + [property] com::sun::star::form::FormSubmitMethod SubmitMethod; + + /** specifies the kind of encoding for submission. + */ + [property] com::sun::star::form::FormSubmitEncoding SubmitEncoding; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/HiddenControl.idl b/offapi/com/sun/star/form/component/HiddenControl.idl new file mode 100644 index 0000000000..5c1cc21a87 --- /dev/null +++ b/offapi/com/sun/star/form/component/HiddenControl.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the model of a hidden control. + +

The only sense of a hidden control is to store data in the form which is + not visible to the user.

+ +

Usually, hidden controls are used in com::sun::star::form::component::HTMLForms, + where they contain data which is to be submitted.
+ Nevertheless, you can use them in your own forms for storing any data, for instance + to evaluate it in some scripting macro.

+ */ +published service HiddenControl +{ + service com::sun::star::form::FormComponent; + + /** specifies the value of the component. + */ + [property] string HiddenValue; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..43478286a8 --- /dev/null +++ b/offapi/com/sun/star/form/component/ImageButton.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 . + */ + + + + 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. + +

The image to be displayed is determined by com::sun::star::awt::UnoControlImageControlModel::ImageURL + property specifies the URL of an image to be displayed.

+ + @see CommandButton +*/ +published service ImageButton +{ + service com::sun::star::awt::UnoControlImageControlModel; + + service com::sun::star::form::FormControlModel; + + + /** supplies the caller with a com::sun::star::awt::XImageProducer. + +

Other components can register as com::sun::star::awt::XImageConsumer + at this producer. Then they will be notified of any change in the image to be displayed.

+ +

Whenever the com::sun::star::awt::UnoControlImageControlModel::ImageURL + property is changed, the model loads the specified image, and sets it as image source + at its com::sun::star::awt::XImageProducer. Then, all + com::sun::star::awt::XImageConsumers are notified and supplied with + the binary data of the image.
+ Usually, controls acting for an ImageButton model are consumers, and use the + data stream to display the image

+ */ + interface com::sun::star::form::XImageProducerSupplier; + + /** describes the action to be executed by the button when pressed. + */ + [property] com::sun::star::form::FormButtonType ButtonType; + + /** describes the frame, where to open the document specified by the TargetURL. + +

This property is evaluated if the button is of type URL.

+ +

As always, there is a number of target names which have a special meaning, and force + a special com::sun::star::frame::Frame to be used.

+ */ + [property] string TargetFrame; + + /** specifies the URL, which should be opened if the button was clicked. + +

This property is evaluated if the button is of type URL.

+ + @see com::sun::star::form::FormButtonType + */ + [property] string TargetURL; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/ListBox.idl b/offapi/com/sun/star/form/component/ListBox.idl new file mode 100644 index 0000000000..513b38a9e9 --- /dev/null +++ b/offapi/com/sun/star/form/component/ListBox.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a model for a control which allows to choose in a list of alternative values. + */ +published service ListBox +{ + service com::sun::star::awt::UnoControlListBoxModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default state. + + @see ListBox::DefaultSelection + */ + interface com::sun::star::form::XReset; + + /** contains the indexes of entries of the listbox, which should selected + by default. + +

This selection is used initially or for a reset.

+ + @see com::sun::star::awt::UnoControlListBoxModel::SelectedItems + @see com::sun::star::form::XReset + */ + [property] sequence DefaultSelection; + + + /** contains the values associated to the strings to be displayed + (which are specified by com::sun::star::awt::UnoControlListBoxModel::StringItemList) + */ + [property] sequence ListSource; + +}; + + +}; }; }; }; }; + +/* 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 0000000000..10c3c737f9 --- /dev/null +++ b/offapi/com/sun/star/form/component/NavigationToolBar.idl @@ -0,0 +1,117 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module component { + + +/** This service specifies the model 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 +
  • 0: no border at all
  • +
  • 1: 3D border
  • +
  • 2: simple flat
  • +
+ */ + [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. + +

This color is used if the #FontDescriptor defines + that the text in the control should be underlined or stroke out.

+ */ + [property] long TextLineColor; + + /** specifies the relief for the font described in #FontDescriptor + +

The value must be one of the com::sun::star::text::FontRelief + constants.

+ */ + [property] long FontRelief; + + /** specifies the emphasis mark for the font described in #FontDescriptor + +

The value must be one of the com::sun::star::text::FontEmphasis + constants.

+ */ + [property] long FontEmphasisMark; + + /** specifies the size of the icons in the control + +

At least the following values are to be supported: +

  • 0: small icons (16x16)
  • +
  • 1: medium size icons (26x26)
  • +
+ */ + [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 + +

Some buttons of a NavigationToolBar may show repeating behavior, e.g. may be + repeatedly triggered when the user keeps the mouse pressed over such a button.
+ The delay between two such triggers (in milliseconds) is specified with this property. +

+ */ + [property] long RepeatDelay; +}; + + +}; }; }; }; }; + +/* 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 0000000000..d4980c01cc --- /dev/null +++ b/offapi/com/sun/star/form/component/NumericField.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module 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. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlNumericFieldModel::Value + @see com::sun::star::form::XReset + */ + [property] double DefaultValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/PatternField.idl b/offapi/com/sun/star/form/component/PatternField.idl new file mode 100644 index 0000000000..ec52fd918b --- /dev/null +++ b/offapi/com/sun/star/form/component/PatternField.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text which matches a specific pattern. + */ +published service PatternField +{ + service com::sun::star::awt::UnoControlPatternFieldModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see PatternField::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlPatternFieldModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/RadioButton.idl b/offapi/com/sun/star/form/component/RadioButton.idl new file mode 100644 index 0000000000..754802ac7e --- /dev/null +++ b/offapi/com/sun/star/form/component/RadioButton.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which acts as a radio button as needed in HTMLForms. + +

Radio buttons are controls which can be grouped together, and in every + group, only one of the controls can be check. This means if one of them + is checked by a user interaction, all other controls in the same group + are automatically unchecked

+ +

Like in HTML, radio buttons are grouped together if and only if they have the + same name (see com::sun::star::form::FormComponent::Name).

+ */ +published service RadioButton +{ + service com::sun::star::awt::UnoControlRadioButtonModel; + + service com::sun::star::form::FormControlModel; + + /** can be used to reset the control to its default text. + + @see RadioButton::DefaultState + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ +

In a group of radio buttons only one button should be checked + by default.

+ + @see com::sun::star::awt::UnoControlRadioButtonModel::State + @see com::sun::star::form::XReset + */ + [property] short DefaultState; + + + /** contains a reference value which is used for submission in a HTML + form. + +

If the form the control belongs to is to be submitted (see + com::sun::star::form::XSubmit), and the control is checked, this reference + value is used for submission.

+ */ + [property] string RefValue; + + + /** specifies a value which is to be associated with the control when it's not + selected. + +

In various situations, the #RefValue is associated with the control + if and only if it is selected.
+ #UncheckedRefValue provides an extension of this concept: If present, + the value should be associated with the control when it is not selected.

+ */ + [optional, property] string UncheckedRefValue; +}; + + +}; }; }; }; }; + +/* 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 0000000000..e556c5b9d3 --- /dev/null +++ b/offapi/com/sun/star/form/component/RichTextControl.idl @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module component { + + +/** specifies 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. + +

If set to `TRUE`, users need to manually press the enter key to insert a line break. + If set to `FALSE`, text is automatically wrapped at the control border.

+ */ + [property] boolean HardLineBreaks; + + /** specifies whether the control should display the text including all its formatting. + +

If this is set to `FALSE`, the control will act as ordinary + com::sun::star::awt::UnoControlEditModel.

+ +

If the property is set to `TRUE`, the control will ignore the following properties: +

    +
  • com::sun::star::awt::UnoControlEditModel::EchoChar
  • +
  • com::sun::star::awt::UnoControlEditModel::MaxTextLen
  • +
  • com::sun::star::awt::UnoControlEditModel::MultiLine
  • +
  • com::sun::star::awt::UnoControlEditModel::Align
  • +
+

+ */ + [property] boolean RichText; +}; + + +}; }; }; }; }; + +/* 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 0000000000..b8b13ee546 --- /dev/null +++ b/offapi/com/sun/star/form/component/ScrollBar.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { module component { + + +/** specifies the model of a scroll bar control. +*/ +service 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. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlScrollBarModel::ScrollValue + @see com::sun::star::form::XReset + */ + [property] long DefaultScrollValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/SpinButton.idl b/offapi/com/sun/star/form/component/SpinButton.idl new file mode 100644 index 0000000000..4c619ab278 --- /dev/null +++ b/offapi/com/sun/star/form/component/SpinButton.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +module com { module sun { module star { module form { module component { + + +/** specifies the model of a scroll bar control. +*/ +service SpinButton +{ + service com::sun::star::awt::UnoControlSpinButtonModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlSpinButtonModel::SpinValue + @see com::sun::star::form::XReset + */ + [property] long DefaultSpinValue; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/SubmitButton.idl b/offapi/com/sun/star/form/component/SubmitButton.idl new file mode 100644 index 0000000000..a6e8142ca3 --- /dev/null +++ b/offapi/com/sun/star/form/component/SubmitButton.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module component { + + +/** specifies the control model for a button, part of a form component hierarchy, + which can be bound to external submissions. + + @see CommandButton + */ +service SubmitButton +{ + service com::sun::star::form::FormControlModel; + + /** allows binding external submissions to the control model + +

Note that the control model itself will not make any use of the submission. + Instead, submissions are triggered by a control (not a control model). + Thus, the com::sun::star::form::control::SubmitButton + control associated with a SubmitButton model is responsible for + using the submission supplied at this model.

+ */ + interface com::sun::star::form::submission::XSubmissionSupplier; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/TextField.idl b/offapi/com/sun/star/form/component/TextField.idl new file mode 100644 index 0000000000..97c654bf78 --- /dev/null +++ b/offapi/com/sun/star/form/component/TextField.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies a component which allows the input of text, either single- or multi-line. + */ +published service TextField +{ + service com::sun::star::awt::UnoControlEditModel; + + service com::sun::star::form::FormControlModel; + + /** specifies optional capabilities for displaying and inputting formatted text. + +

If the RichTextControl::RichText property is set to `TRUE`, + then the TextField component will disable it's reset capabilities. This means + that all calls to com::sun::star::form::XReset::reset() will be ignored.

+ */ + [optional] service RichTextControl; + + /** can be used to reset the control to its default text. + + @see TextField::DefaultText + */ + interface com::sun::star::form::XReset; + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlEditModel::Text + @see com::sun::star::form::XReset + */ + [property] string DefaultText; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/component/TimeField.idl b/offapi/com/sun/star/form/component/TimeField.idl new file mode 100644 index 0000000000..7acdb1c140 --- /dev/null +++ b/offapi/com/sun/star/form/component/TimeField.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + + module com { module sun { module star { module form { module component { + + +/** specifies the control model for a field which can be used to input time values. + */ +published service TimeField +{ + service com::sun::star::awt::UnoControlTimeFieldModel; + + service com::sun::star::form::FormControlModel; + + /** resets the control. + +

If you do not set a value for the #DefaultTime, then resetting the control + will result in setting to the current system time. This is for HTML compatibility.

+ */ + interface com::sun::star::form::XReset; + + + /** contains a default value for the control. + +

This value is used when the control is initially displayed, and for resetting it.

+ + @see com::sun::star::awt::UnoControlTimeFieldModel::Time + @see com::sun::star::form::XReset + */ + [property] long DefaultTime; + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/CheckBox.idl b/offapi/com/sun/star/form/control/CheckBox.idl new file mode 100644 index 0000000000..aeeabaeb06 --- /dev/null +++ b/offapi/com/sun/star/form/control/CheckBox.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a check box control which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::CheckBox + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service CheckBox +{ + service com::sun::star::awt::UnoControlCheckBox; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ComboBox.idl b/offapi/com/sun/star/form/control/ComboBox.idl new file mode 100644 index 0000000000..fa370188f5 --- /dev/null +++ b/offapi/com/sun/star/form/control/ComboBox.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a combo box control. + +

The model of the control has to support the com::sun::star::form::component::ComboBox + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ComboBox +{ + service com::sun::star::awt::UnoControlComboBox; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/CommandButton.idl b/offapi/com/sun/star/form/control/CommandButton.idl new file mode 100644 index 0000000000..e10002a86f --- /dev/null +++ b/offapi/com/sun/star/form/control/CommandButton.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a button control. + +

The model of the control has to support the com::sun::star::form::component::CommandButton + service.

+ +

The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::form::component::CommandButton::ButtonType +*/ +published service CommandButton +{ + service com::sun::star::awt::UnoControlButton; + + /** allows external instances to register as veto listener for the button's actions. + +

A com::sun::star::form::XApproveActionListener returning false on + it's approve-method will prevent any action which would usually be triggered - this includes + not only submitting or resetting forms, but also calling the + com::sun::star::awt::XActionListeners of the super service
+ This may be interesting for e.g. forms which want to provide input validation before submitting + data.
+ + @see com::sun::star::form::component::HTMLForm + @see com::sun::star::form::XSubmit + @see com::sun::star::form::XReset + @see com::sun::star::awt::XButton + */ + interface com::sun::star::form::XApproveActionBroadcaster; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/CurrencyField.idl b/offapi/com/sun/star/form/control/CurrencyField.idl new file mode 100644 index 0000000000..43b4dc1563 --- /dev/null +++ b/offapi/com/sun/star/form/control/CurrencyField.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for inputting currency values, and + which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::CurrencyField + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service CurrencyField +{ + service com::sun::star::awt::UnoControlCurrencyField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/DateField.idl b/offapi/com/sun/star/form/control/DateField.idl new file mode 100644 index 0000000000..861ee48bb1 --- /dev/null +++ b/offapi/com/sun/star/form/control/DateField.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for inputting date values, and + which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::DateField + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service DateField +{ + service com::sun::star::awt::UnoControlDateField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/FilterControl.idl b/offapi/com/sun/star/form/control/FilterControl.idl new file mode 100644 index 0000000000..80a3646dbb --- /dev/null +++ b/offapi/com/sun/star/form/control/FilterControl.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a check box control which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::CheckBox + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +service FilterControl : com::sun::star::awt::XControl +{ + createWithFormat([in] com::sun::star::awt::XWindow MessageParent, + [in] com::sun::star::util::XNumberFormatter NumberFormatter, + [in] com::sun::star::beans::XPropertySet ControlModel); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/FormattedField.idl b/offapi/com/sun/star/form/control/FormattedField.idl new file mode 100644 index 0000000000..e518530969 --- /dev/null +++ b/offapi/com/sun/star/form/control/FormattedField.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for inputting values with an arbitrary formatting, and + can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::FormattedField + service.

+ +

In addition, this control can be used in HTML forms. It triggers the + com::sun::star::form::XSubmit::submit() method of the form it belongs to if + the enter key is pressed while it has the focus.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::util::XNumberFormatsSupplier +*/ +published service FormattedField +{ + service com::sun::star::awt::UnoControlFormattedField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/GridControl.idl b/offapi/com/sun/star/form/control/GridControl.idl new file mode 100644 index 0000000000..024f35be97 --- /dev/null +++ b/offapi/com/sun/star/form/control/GridControl.idl @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { + +published interface XGridControl; + +module control { + + +/** describes a table-like control for displaying data. + +

The model of the control has to support the com::sun::star::form::component::GridControl + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service GridControl +{ + service com::sun::star::awt::UnoControl; + + /** allows committing the content of the active cell of the control. + */ + interface com::sun::star::form::XBoundComponent; + + /** allows access to the active cell within the grid. + +

Only the column position can be modified using this interface, as the row position within + a table control bound to a data source is given implicitly (by the cursor position of the data source).

+ */ + interface com::sun::star::form::XGrid; + + [optional] interface com::sun::star::form::XGridControl; + + /** used to broadcast modifications made by the user (within the active cell) + */ + interface com::sun::star::util::XModifyBroadcaster; + + /** allows access to the field data of the grid's current row in different formats + */ + [optional] interface com::sun::star::form::XGridFieldDataSupplier; + + /** allows access to objects wrapping a single column + */ + interface com::sun::star::container::XIndexAccess; + + /** allows creation of an enumeration for the column objects + */ + interface com::sun::star::container::XEnumerationAccess; + + /** is used to switch the operating modes of the control. + +

Besides the normal operation mode (which is used to display the database form's data) the control may + for instance support a filter mode.

+ */ + [optional] interface com::sun::star::util::XModeSelector; + + /** used to control the selection of rows in the grid control. + +

The selection used with the methods com::sun::star::view::XSelectionSupplier::getSelection() + and com::sun::star::view::XSelectionSupplier::select() is a sequence of Any's.
+ Here the elements of the Sequence are the bookmarks (in the com::sun::star::sdb::RowSet) + of the (to-be-) selected rows.

+ */ + [optional] interface com::sun::star::view::XSelectionSupplier; + + /** allows external components to register dispatchers for some common form actions. + +

A grid control can contain own UI elements for traveling within the database form it belongs to (This + concept seems to make sense, as a grid control - in opposite to other data aware controls - displays + not only one record at a time, but a larger number of records of the database form.)
+ With the help of this interface, external components which wish to handle such travelings themselves can + register interceptors for the actions in question.

+ +

Usual URLs to use include +

+
.uno:FormSlots/moveToFirst
move the cursor to the first record
+
.uno:FormSlots/moveToPrev
move the cursor to the previous record
+
.uno:FormSlots/moveToNext
move the cursor to the next record
+
.uno:FormSlots/moveToLast
move the cursor to the last record
+
.uno:FormSlots/moveToNew
move the cursor to the (one and only) new record
+
.uno:FormSlots/undoRecord
undo the changes done so far in the current record
+
+

+ +

A concrete implementation of this service may offer more or less URLs, but if it offers some of the URLs + above, it must stick to the meanings defined above.

+ */ + [optional] interface com::sun::star::frame::XDispatchProviderInterception; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/GroupBox.idl b/offapi/com/sun/star/form/control/GroupBox.idl new file mode 100644 index 0000000000..d6cb04db50 --- /dev/null +++ b/offapi/com/sun/star/form/control/GroupBox.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for visually grouping controls + +

The model of the control has to support the com::sun::star::form::component::GroupBox + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service GroupBox +{ + service com::sun::star::awt::UnoControlGroupBox; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ImageButton.idl b/offapi/com/sun/star/form/control/ImageButton.idl new file mode 100644 index 0000000000..5a56c4fdcb --- /dev/null +++ b/offapi/com/sun/star/form/control/ImageButton.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control which can be used for displaying images on a control acting like a button. + +

The model of the control has to support the com::sun::star::form::component::ImageButton + service.

+ +

The control is clickable, the action taken upon clicking depends on the settings + of the model the control belongs to.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel + @see com::sun::star::form::component::ImageButton::ButtonType +*/ +published service ImageButton +{ + service com::sun::star::awt::UnoControlImageControl; + + /** allows external instances to register as veto listener for the button's actions. + +

A com::sun::star::form::XApproveActionListener returning false on + it's approve-method will prevent any action which would usually be triggered - this includes + not only submitting or resetting forms, but also calling the + com::sun::star::awt::XActionListeners of the super service
+ This may be interesting for e.g. forms which want to provide input validation before submitting + data.
+ + @see com::sun::star::form::component::HTMLForm + @see com::sun::star::form::XSubmit + @see com::sun::star::form::XReset + @see com::sun::star::awt::XButton + */ + interface com::sun::star::form::XApproveActionBroadcaster; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/ImageControl.idl b/offapi/com/sun/star/form/control/ImageControl.idl new file mode 100644 index 0000000000..5cdd472b2f --- /dev/null +++ b/offapi/com/sun/star/form/control/ImageControl.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control used for displaying images stored in a database. + +

The model of the control has to support the com::sun::star::form::component::DatabaseImageControl + service.

+ +

If the model of the control is valid bound to a database field, the control allows + to select an image (browsing the file system) upon double clicking into it, + and forwards the URL of the chosen image to the ImageURL property of its model.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ImageControl +{ + service com::sun::star::awt::UnoControlImageControl; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/InteractionGridControl.idl b/offapi/com/sun/star/form/control/InteractionGridControl.idl new file mode 100644 index 0000000000..ea56cda626 --- /dev/null +++ b/offapi/com/sun/star/form/control/InteractionGridControl.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** is an extended grid control, which allows the user to customize some of its user interface's aspects. +*/ +published service InteractionGridControl +{ + service com::sun::star::form::control::GridControl; + + /** allows access to the UI features of the control + +

Though concrete implementations of the service may offer different sets of aspects which can be customized, + the following commands have, if supported, a defined meaning: +

+
.uno:GridSlots/BrowserAttribs
(interactively) customize the overall appearance of the grid (font etc.)
+
.uno:GridSlots/RowHeight
(interactively) customize the row height appearance of the grid
+
.uno:GridSlots/ColumnAttribs
(interactively) customize the format of a given column
+
.uno:GridSlots/ColumnWidth
(interactively) customize the width of a given column
+
+

+ +

The following parameters may be passed when dispatching the commands above (as before, concrete implementations + may extend this list): +

+
ColumnId
the id of the column in question, if the command is executed for a column
+
ColumnModelPos
the model position of the column in question, if the command is executed for a column
+
ColumnViewPos
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.
+
+

+ */ + interface com::sun::star::frame::XDispatch; +}; + + +}; }; }; }; }; + + +/* 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 0000000000..cb91a4a5a4 --- /dev/null +++ b/offapi/com/sun/star/form/control/ListBox.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a list box control which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::ListBox + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service ListBox +{ + service com::sun::star::awt::UnoControlListBox; + + interface com::sun::star::form::XBoundControl; + + /** allows broadcasts of HTML-compatible change events. + +

HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. +

    +
  • the control loses the focus
  • +
  • the content of the control has changed, compared to the moment where it got the focus.
  • +
+

+ */ + interface com::sun::star::form::XChangeBroadcaster; +}; + + +}; }; }; }; }; + + +/* 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 0000000000..bc62f0a002 --- /dev/null +++ b/offapi/com/sun/star/form/control/NavigationToolBar.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module 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; +}; + + +}; }; }; }; }; + + +/* 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 0000000000..32bae1320a --- /dev/null +++ b/offapi/com/sun/star/form/control/NumericField.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting numeric values and which can (but not necessarily has to) + be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::NumericField + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service NumericField +{ + service com::sun::star::awt::UnoControlNumericField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/PatternField.idl b/offapi/com/sun/star/form/control/PatternField.idl new file mode 100644 index 0000000000..bb8ab8bb93 --- /dev/null +++ b/offapi/com/sun/star/form/control/PatternField.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting text complying to a given pattern, + and which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::PatternField + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service PatternField +{ + service com::sun::star::awt::UnoControlPatternField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/RadioButton.idl b/offapi/com/sun/star/form/control/RadioButton.idl new file mode 100644 index 0000000000..dbe461b01c --- /dev/null +++ b/offapi/com/sun/star/form/control/RadioButton.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a radio button control which can (but not necessarily has to) be bound to a database field. + +

The model of the control has to support the com::sun::star::form::component::RadioButton + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service RadioButton +{ + service com::sun::star::awt::UnoControlRadioButton; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/control/SubmitButton.idl b/offapi/com/sun/star/form/control/SubmitButton.idl new file mode 100644 index 0000000000..208e611720 --- /dev/null +++ b/offapi/com/sun/star/form/control/SubmitButton.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module control { + + +/** specifies a button control which can execute external submissions + +

The model of the control has to support the com::sun::star::form::component::SubmitButton + service.

+ +

The control is clickable. When clicked (by mouse or keyboard, or programmatically), + the following happens: +

  1. Any com::sun::star::form::submission::XSubmissionVetoListeners registered + at the component are given the chance to veto the submission. +
  2. +
  3. 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.
    + If there is such a submission object, its + com::sun::star::form::submission::XSubmission::submit() method is invoked. +
  4. +
  5. 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.
    + 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. +
  6. +
+

+*/ +service SubmitButton +{ + /** allows interception (and vetoing) of submissions triggered by the control. + */ + interface com::sun::star::form::submission::XSubmission; +}; + + +}; }; }; }; }; + + +/* 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 0000000000..82691c9b58 --- /dev/null +++ b/offapi/com/sun/star/form/control/TextField.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control for entering arbitrary text which can (but not necessarily has to) be bound + to a database field. + +

The model of the control has to support the com::sun::star::form::component::TextField + service.

+ +

In addition, this control can be used in HTML forms. It triggers the + com::sun::star::form::XSubmit::submit() method of the form it belongs to if + the enter is pressed while it has the focus.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service TextField +{ + service com::sun::star::awt::UnoControlEdit; + + interface com::sun::star::form::XBoundControl; + + /** allows broadcasts of HTML-compatible change events. + +

HTML-compatible means that a change event is broadcasted if and only if all of + the following applies. +

    +
  • the control loses the focus
  • +
  • the content of the control has changed, compared to the moment where it got the focus.
  • +
+

+ */ + interface com::sun::star::form::XChangeBroadcaster; +}; + + +}; }; }; }; }; + + +/* 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 0000000000..3d8bc71a5c --- /dev/null +++ b/offapi/com/sun/star/form/control/TimeField.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + module com { module sun { module star { module form { module control { + + +/** describes a control for inputting time values which can (but not necessarily has to) be bound + to a database field. + +

The model of the control has to support the com::sun::star::form::component::TimeField + service.

+ + @see com::sun::star::awt::UnoControl + @see com::sun::star::awt::UnoControlModel +*/ +published service TimeField +{ + service com::sun::star::awt::UnoControlTimeField; + + interface com::sun::star::form::XBoundControl; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl b/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl new file mode 100644 index 0000000000..83225a614a --- /dev/null +++ b/offapi/com/sun/star/form/inspection/ButtonNavigationHandler.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which is able to enhance the com::sun::star::form::component::CommandButton::ButtonType + and com::sun::star::form::component::CommandButton::TargetURL properties of a + com::sun::star::form::component::CommandButton. + +

For this, the two properties are superseded by new versions, where as button type, additional + possible values are added for navigating the parent form of the button. For instance, in an + com::sun::star::inspection::ObjectInspector using this handler, the user will be able + to choose a button type saying "move to the next record", which, when chosen, well, moves the parent + database form of the button to the next record.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::component::CommandButton +*/ +service ButtonNavigationHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl b/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl new file mode 100644 index 0000000000..cbd4150488 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/CellBindingPropertyHandler.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which is able to provide properties to bind a form component to a spreadsheet cell. + +

The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a spreadsheet document (indicated by supporting the com::sun::star::sheet::XSpreadsheetDocument + interface), this document is used to create the com::sun::star::form::binding::ValueBindings + to bind the inspected object to cells in this document.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::table::CellValueBinding + @see com::sun::star::table::ListPositionCellBinding + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service CellBindingPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl b/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl new file mode 100644 index 0000000000..5c82e0e1d2 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/DefaultFormComponentInspectorModel.idl @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a com::sun::star::inspection::XObjectInspectorModel for + inspecting form components, in particular all components implementing the FormComponent + service. + +

A DefaultFormComponentInspectorModel provides the following handlers by default: +

  • ButtonNavigationHandler
  • +
  • CellBindingPropertyHandler
  • +
  • EditPropertyHandler
  • +
  • EventHandler
  • +
  • FormComponentPropertyHandler
  • +
  • SubmissionPropertyHandler
  • +
  • XMLFormsPropertyHandler
  • +
  • XSDValidationPropertyHandler
  • +

+ + @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 ); +}; + + +}; }; }; }; }; + +/* 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 0000000000..b9e030a02a --- /dev/null +++ b/offapi/com/sun/star/form/inspection/EditPropertyHandler.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module 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. + +

First, the handler supersedes the HScroll and the VScroll properties of a com::sun::star::awt::UnoControlEditModel + and puts them into one common property, allowing the user to choose whether she want to + have "no", a "vertical", a "horizontal", or "both" scrollbars.

+ +

Second, if it detects a com::sun::star::form::component::RichTextControl to inspect, + it supersedes the com::sun::star::form::component::RichTextControl::RichText + and the com::sun::star::awt::UnoControlEditModel::MultiLine properties with a new + one which allows choosing the text type with one single action.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::awt::UnoControlEditModel + @see com::sun::star::form::component::RichTextControl + @see com::sun::star::form::component::TextField +*/ +service EditPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/EventHandler.idl b/offapi/com/sun/star/form/inspection/EventHandler.idl new file mode 100644 index 0000000000..f65ab9fae3 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/EventHandler.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which, for a com::sun::star::form::FormComponent, provides the script events + offered by this form component. + +

For this, the parent of the form component, which by definition supports the com::sun::star::form::FormComponent + service, is examined for the com::sun::star::script::XEventAttacherManager interface.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::component::CommandButton + @see com::sun::star::form::FormComponents + @see com::sun::star::script::XEventAttacherManager +*/ +service EventHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl new file mode 100644 index 0000000000..88c33ba676 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/FormComponentPropertyHandler.idl @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements the default property handler for all known types of com::sun::star::form::FormComponents. + + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::FormComponents +*/ +service FormComponentPropertyHandler : com::sun::star::inspection::XPropertyHandler; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl b/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl new file mode 100644 index 0000000000..bc8c8936b8 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/SubmissionPropertyHandler.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties for button controls which support submission of XML forms. + +

The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to examine the XML submissions which the button can be bound to.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::submission::XSubmission + @see com::sun::star::form::submission::XSubmissionProvider + @see com::sun::star::form::component::SubmitButton + @see com::sun::star::xforms::XSubmission + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service SubmissionPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl b/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl new file mode 100644 index 0000000000..4e10367e60 --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XMLFormsPropertyHandler.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties related to binding form control models to XForm bindings. + +

The handler introduces new properties to choose a com::sun::star::xforms::XModel + and a com::sun::star::xforms::Binding within this model. Additionally, + it introduces properties which reflect the different facets of the binding (e.g. + com::sun::star::xforms::Binding::BindingExpression), so they can be changed + directly in the com::sun::star::inspection::ObjectInspector as if they were a + property of the form component which is being inspected.

+ +

The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to do XML binding related work.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::xforms::Binding + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service XMLFormsPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl b/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl new file mode 100644 index 0000000000..bc6e2e514d --- /dev/null +++ b/offapi/com/sun/star/form/inspection/XSDValidationPropertyHandler.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module inspection { + + +/** implements a property handler for use with a com::sun::star::inspection::ObjectInspector + which provides properties related to binding form control models to XForm bindings and validating + the form control content. + +

By using an XMLFormsPropertyHandler, a com::sun::star::inspection::ObjectInspector + can be used to bind form components to com::sun::star::xforms::Binding instances. + Since those instances also support validating form control content (by supporting an + com::sun::star::form::validation::XValidator interface), it seems reasonable to + edit those validate-related properties (like the XSD data type to validate against) in the + com::sun::star::inspection::ObjectInspector, too. This is what an XSDValidationPropertyHandler + is good for.

+ +

The handler expects a value named "ContextDocument" in the context in which it is created. + That is, the com::sun::star::uno::XComponentContext used for creating the + CellBindingPropertyHandler is examined for a value with this name. If the object in this + value denotes a XML form document (indicated by supporting the com::sun::star::xforms::XFormsSupplier + interface), this document is used to do XML binding related work.

+ + @see com::sun::star::inspection::XPropertyHandler + @see com::sun::star::form::binding::BindableControlModel + @see com::sun::star::form::binding::ValueBinding + @see com::sun::star::forms::validation::ValidatableControlModel + @see com::sun::star::xforms::Binding + @see com::sun::star::xsd::XDataType + @see com::sun::star::uno::XComponentContext::getValueByName +*/ +service XSDValidationPropertyHandler +{ + interface com::sun::star::inspection::XPropertyHandler; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/modules.idl b/offapi/com/sun/star/form/modules.idl new file mode 100644 index 0000000000..6a9b556eef --- /dev/null +++ b/offapi/com/sun/star/form/modules.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +module com { module sun { module star { module form { + + /** collects functionality for binding form controls to external + data sources. + */ + module binding { }; + + /** collects form control model descriptions + */ + module component { }; + + /** collects form control descriptions + */ + module control { }; + + /** collects services for inspecting form/components + @see com::sun::star::inspection::ObjectInspector + @see com::sun::star::inspection + */ + module inspection { }; + + /** collects functionality needed during a form's runtime, e.g. + when it is active and interacts with the user. + */ + module runtime { }; + + /** collects functionality for submitting forms to external data sinks + */ + module submission { }; + + /** collects functionality to validate form components by help + of external validator instances + */ + module validation { }; + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FeatureState.idl b/offapi/com/sun/star/form/runtime/FeatureState.idl new file mode 100644 index 0000000000..ebc160f0c6 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FeatureState.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** encapsulates the state of a FormFeature + + @see XFormOperations + + @since OOo 2.2 + */ +struct FeatureState +{ + /** determines whether the respective feature is enabled (i.e. available) + in the current state of the form. + */ + boolean Enabled; + + /** determines the state of the feature. The concrete semantics depends + on the concrete FormFeature. + */ + any State; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FilterEvent.idl b/offapi/com/sun/star/form/runtime/FilterEvent.idl new file mode 100644 index 0000000000..362bc44538 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FilterEvent.idl @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** is an event fired by a filter controller, when the filter managed by the controller changes. + + @see XFilterController + + @since OOo 3.3 + */ +struct FilterEvent : ::com::sun::star::lang::EventObject +{ + /** denotes the index of the disjunctive term to which the event applies, if any. + */ + long DisjunctiveTerm; + + /** denotes the index of the filter component to which the event applies, if any. + */ + long FilterComponent; + + /** denotes the predicate expression associated with the event. + */ + string PredicateExpression; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormController.idl b/offapi/com/sun/star/form/runtime/FormController.idl new file mode 100644 index 0000000000..7bb44cdf6f --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormController.idl @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** specifies a component controlling the interaction between the user and multiple + form controls belonging to a single form. + */ +service FormController : XFormController; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormFeature.idl b/offapi/com/sun/star/form/runtime/FormFeature.idl new file mode 100644 index 0000000000..6a3ff83c43 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormFeature.idl @@ -0,0 +1,140 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** specifies the operations on a user interface form, as supported by the + XFormOperations interface. + + @since OOo 2.2 +*/ +constants FormFeature +{ + /** moves the form to a record given by absolute position. + +

This operation cannot be executed without arguments. When executing it (i.e. + when calling com::sun::star::form::runtime::XFormOperations::executeWithArguments()), + you need to specify a parameter named Position of type long, which + denotes the position to move the form to.

+ */ + const short MoveAbsolute = 1; + + /** determines the number of total records in the form, + including the potentially active insertion row. + +

This is not strictly an operation you can do on a form, but rather a + state you can retrieve (and display to the user) using the XFormOperations's + respective methods.

+ +

The state obtained here is a string, not a number. This is because in an UI + form, the fact that the current record count is not yet known (since not all + records have been visited, yet) is indicated by an asterisk (*) besides + the record count.

+ */ + 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 + +

For instance, if the currently active form control is bound to a table field + named Price, and currently has a value of 100, then invoking + the AutoFilter operation will put an additional filter Price = 100 + on the form.

+ */ + 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. + +

Note that this does not apply to criteria which are part of the form's + data source. That is, if you bind the form to the SQL command SELECT * FROM + Articles WHERE Price > 100, then the Price > 100 filter + will not be removed.

+ +

Effectively, this operation resets the com::sun::star::sdb::RowSet::Filter + and com::sun::star::sdb::RowSet::Order properties of the form.

+ */ + const short RemoveFilterAndSort = 18; + + /** refreshes the current control + +

Basically, this means calling XRefreshable::refresh on the current control, if it supports + this interface.

+ + @since OOo 3.1 + */ + const short RefreshCurrentControl = 19; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/FormOperations.idl b/offapi/com/sun/star/form/runtime/FormOperations.idl new file mode 100644 index 0000000000..58c185eb30 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormOperations.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** encapsulates operations on a database form which has a UI representation, + and is interacting with the user. + + @since OOo 2.2 + */ +service FormOperations : XFormOperations +{ + /** creates a FormOperations instance which works on a com::sun::star::form::FormController + instance. + @throws IllegalArgumentException + if the given form controller is `NULL`, or does not have a model denoting a valid + com::sun::star::form::component::DataForm instance. + */ + createWithFormController( + [in] XFormController Controller + ) + raises( + ::com::sun::star::lang::IllegalArgumentException + ); + + /** creates a FormOperations instance which works on a com::sun::star::form::component::DataForm + instance. + + @throws IllegalArgumentException + if the given form is `NULL`, or does not support the com::sun::star::form::component::DataForm + service. + */ + createWithForm( + [in] XForm Form + ) + raises( + ::com::sun::star::lang::IllegalArgumentException + ); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl b/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl new file mode 100644 index 0000000000..9c7aa43aed --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFeatureInvalidation.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** implements a callback for a XFormOperations instance, which is called + when the state of one or more FormFeatures might have changed. + + @see XFormOperations + + @since OOo 2.2 +*/ +interface XFeatureInvalidation +{ + /** invalidates the given FormFeatures + +

Invalidation means that any user interface representation (such as toolbox buttons), or + any dispatches associated with the features in question are potentially out-of-date, and + need to be updated.

+ + @param Features + The set of features whose state might have changed. + */ + void invalidateFeatures( [in] sequence< short > Features ); + + /** invalidates all features + +

This method is used of it cannot be exactly and reliably determined + which features might actually have changed their state. In this case, the callee + should assume all features it is interested in must be required.

+ */ + void invalidateAllFeatures(); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFilterController.idl b/offapi/com/sun/star/form/runtime/XFilterController.idl new file mode 100644 index 0000000000..477ff8cf1d --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterController.idl @@ -0,0 +1,164 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +interface XFilterControllerListener; + +/** provides access to a form based filter for a database form + +

In a form based filter, form controls bound to a searchable database field are replaced with a control + which allows entering a search expression. This so-called predicate expression is basically a part of an + SQL WHERE clause, but without the part denoting the database column. For instance, if you + have a form control bound to a table column named Name, then entering the string + LIKE '%Smith%' effectively constitutes a SQL WHERE clause "Name" LIKE '%Smith%'.

+ +

In the actual document view, there are usually some relaxations to this. For instance, keywords such as + LIKE might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion, + the equality sign = is usually omitted. However, this interface here provides programmatic access + to the form based filter, so those relaxations are not considered here.

+ +

The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL WHERE + class. That is, it is a disjunction of m terms, where each term is a conjunction of n clauses + of the form <column> <predicate> <literal> or of the form <column> + IS [NOT] NULL.

+ +

n equals the number of filter controls which the filter controller is responsible for. This number + doesn't change during one session of the form based filter. On the other hand, m, the number of disjunctive + terms, is dynamic.

+ + +

With the above, there are potentially m * n predicate expressions (though usually only a fraction + of those will actually exist). Since in a form based filter, there are only n filter controls, and each + filter control displays exactly one predicate expression, this means that only a part of the complete + filter can be displayed, in particular, only one disjunctive term can be displayed at a time. Thus, + the filter controller knows the concept of an active term, denoted by the #ActiveTerm + attribute, controls which of the terms is currently displayed in the form controls.

+ + @see XFormController + @see com::sun::star::sdbc::XResultSetMetaData::isSearchable + @see com::sun::star::sdb::XSingleSelectQueryAnalyzer::getStructuredFilter + @see com::sun::star::sdb::SQLFilterOperator + + @since OOo 3.3 + */ +interface XFilterController +{ + /** registers a listener to be notified of certain changes in the form based filter. + +

Registering the same listener multiple times results in multiple notifications of the same event, + and also requires multiple revocations of the listener. + */ + void addFilterControllerListener( [in] XFilterControllerListener Listener ); + + /** revokes a listener which was previously registered to be notified of certain changes in the form based filter. + */ + void removeFilterControllerListener( [in] XFilterControllerListener Listener ); + + /** is the number of filter components, or filter controls, which the filter controller is responsible + for. + +

This number is constant during one session of the form based filter.

+ */ + [attribute, readonly] long FilterComponents; + + /** is the number of disjunctive terms of the filter expression represented by the form based filter. + */ + [attribute, readonly] long DisjunctiveTerms; + + /** denotes the active term of the filter controller. + */ + [attribute] long ActiveTerm + { + set raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + }; + + /** sets a given predicate expression + + @param Component + denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than + #FilterComponents. + + @param Term + denotes the disjunctive term in which the expression is to be set. Must be greater than or equal to 0, + and smaller than #DisjunctiveTerms. + + @param PredicateExpression + denotes the predicate expression to set for the given filter component in the given term. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if one of the indexes is out of the allowed range + */ + void + setPredicateExpression( [in] long Component, [in] long Term, [in] string PredicateExpression ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the filter component with the given index. + +

The filter control has the same control model as the control which it stands in for. Consequently, you can use this method + to obtain the database column which the filter control works on, by examining the control model's BoundField + property.

+ + @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 predicate expressions represented by the filter controller. + +

Each element of the returned sequence is a disjunctive term, having exactly #FilterComponents + elements, which denote the single predicate expressions of this term.

+ */ + sequence< sequence< string > > + getPredicateExpressions(); + + /** removes a given disjunctive term + + @param Term + the index of the term to remove. Must be greater than or equal to 0, and smaller than + #DisjunctiveTerms. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Term is out of the allowed range. + */ + void + removeDisjunctiveTerm( [in] long Term ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** appends an empty disjunctive term to the list of terms. + */ + void + appendEmptyDisjunctiveTerm(); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl new file mode 100644 index 0000000000..2931a0cfcb --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** is implemented by components listening for events fired by an XFilterController. + + @since OOo 3.3 +*/ +interface XFilterControllerListener : ::com::sun::star::lang::XEventListener +{ + /** is fired when a single predicate expression of the filter represented by the filter + controller changed. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term in which the + expression changed. This usually equals XFilterController::ActiveTerm.

+ +

FilterEvent::FilterComponent denotes the index of the filter component whose + predicate expression changed.

+ +

FilterEvent::PredicateExpression is the new predicate expressions.

+ */ + void predicateExpressionChanged( [in] FilterEvent Event ); + + /** is fired when a disjunctive term was removed from the filter of the filter controller. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + removed.

+ +

FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.

+ */ + void disjunctiveTermRemoved( [in] FilterEvent Event ); + + /** is fired when a disjunctive term was added to the filter of the filter controller. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + added.

+ +

FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.

+ */ + void disjunctiveTermAdded( [in] FilterEvent Event ); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl new file mode 100644 index 0000000000..cc7e6e6956 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -0,0 +1,343 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + +interface XFormOperations; +interface XFormControllerContext; + + +/** specifies a component controlling the interaction between the user and form functionality. + +

As soon as a form (containing controls) is to be presented to the user, + there is a need for an instance controlling the user interaction.
+ Such a FormController is responsible for dialog processing, + like controlling the tab order and the grouping of controls.

+ +

As a form may contain one or many subforms, a FormController may + contain one or more other FormControllers, so the form model structure or hierarchy + is reflected in the structure of FormControllers. That is, retrieving the parent of + the model of a controller will give you the same object as retrieving the model of the parent of + the controller. Similarly, retrieving the model of the nth child of + a controller gives you the same object as retrieving the nth child of + the model of the controller.

+ +

A controller is called active if one of the controls it is responsible for has the focus, + else inactive. To be notified whenever this activation state of a given controller changes, you can + add listeners.

+ +

This interface supersedes the com::sun::star::form::FormController.

+ +

Responsibilities

+

A FormController is responsible for a com::sun::star::awt::UnoControlContainer, + and all controls therein.

+ +

Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form + contains controls bound to a database, or to an external validator, then the form controller will + check their current value when the current record is to be saved to the database.

+ +

First, it will check whether any controls with an external validator exist. If so, those validators + will be asked to validate the current control content. If this fails, the message provided by the validator + is displayed to the user, the control is focused, and the update of the record is vetoed.

+ +

Second, the controls are examined for NULL values. If a control is bound to a database field which + is declared to be NOT NULL, no auto-increment field, but still `NULL`, then an error + message is shown to the user saying that input is required, the respective control is focused, and + the update of the record is vetoed.

+ +

Note that you can present the second check - for database fields containing `NULL` values - on + a per-form and a per-database basis.
+ For the former, you need to add a boolean property FormsCheckRequiredFields to the form + (aka the FormController's model), using its + com::sun::star::beans::XPropertyContainer::addProperty() method, with a value + of `FALSE`.
+ For the latter, you need to set the respective property of the data source's Settings + (also named FormsCheckRequiredFields) to `FALSE`.

+ +

Alternatively, you can prevent the check on a per-control basis, using the + DataAwareControlModel::InputRequired property of a single control model.

+ +

If a control which the controller is responsible for supports the com::sun::star::frame::XDispatchProviderInterception + interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its + functionality to the controller by querying the dispatch interceptor for it.

+ +

Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them, + there must be a guaranteed semantics. However, concrete implementations may support an arbitrary sub or super + set of these URLs.

+ +

In general, all URLs start with the same prefix, namely .uno:FormController/. To this, a suffix is + appended which describes the requested functionality.
+ Example: The URL suffix for deleting the current record is deleteRecord, so the complete URL for + requesting a dispatcher for this functionality is .uno:FormController/deleteRecord.

+ +

Some URLs may require parameters. For this, the sequence of com::sun::star::beans::PropertyValues + passed to the com::sun::star::frame::XDispatch::dispatch() call is used - every property value is + used as one named parameter.

+ +

For all URLs, interested parties can register as status listeners (com::sun::star::frame::XStatusListener) + at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or + disabled.
+ For instance, the URL with the suffix moveToFirst is associated with moving the form to the first + record, and it will be disabled in case the form is already positioned on the first record.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
URL suffixfunctionality
positionFormpositions the form on a record given by absolute number.
+ There's one parameter for this functionality, named Position, which must be a long + value specifying the absolute position to which the form should be moved
RecordCountThis is a passive functionality: It cannot be dispatched, instead, interested parties may + use the dispatcher to add as com::sun::star::frame::XStatusListener, and be + notified when the record count changes.
+ The status value which is being notified (com::sun::star::frame::FeatureStateEvent::State) + is a string which can be used to display the record count. In particular, if the record count is not yet known + (com::sun::star::sdb::RowSet::IsRowCountFinal is `FALSE`), this is indicated in the + string, too.
moveToFirstmoves the form to the first record
moveToPrevmoves the form to the record preceding the current one
moveToNextmoves the form to the record after the current one
moveToLastmoves the form to the last record
moveToNewmoves the form to the virtual "insert row", where new records can be inserted
saveRecordCommits 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.
undoRecordreverts 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.
deleteRecorddeletes the current record, after asking the user for confirmation.
refreshFormreloads the complete form. After this, the form is positioned on the first record
sortUpAdds 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.
sortDownAdds 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.
sortopens 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.
autoFiltercreates, 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.
filteropens a dialog, which allows the user to manipulate the current filter of the form. If the dialog + is closed with OK, the form is reloaded after setting the new filter.
applyFilter

Toggles the com::sun::star::sdb::RowSet::ApplyFilter property + of the form.

+

Additionally, status listeners will be provided with the current (boolean) state of this property + in the com::sun::star::frame::FeatureStateEvent::State member of the event + notified by the dispatcher.

removeFilterOrdercompletely removes any filter and sorting order from the form, and reloads it.
+ + @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. + +

The model obtained via com::sun::star::awt::XTabController::getModel() is the form for which the + controller is responsible.

+ */ + interface ::com::sun::star::awt::XTabController; + + /** allows access to the parent controller. + */ + interface ::com::sun::star::container::XChild; + + /** allows access to the sub controllers. + */ + interface ::com::sun::star::container::XIndexAccess; + + /** allows enumerating sub controllers + */ + interface ::com::sun::star::container::XEnumerationAccess; + + /** allows life time control of the controller. + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to register as listener for modifications in the controls which the controller is responsible + for. + */ + interface ::com::sun::star::util::XModifyBroadcaster; + + /** used to notify deletions of data in the form before they happen. + +

A form controller listens for deletion events at the form it is responsible for. If and only if no + com::sun::star::form::XConfirmDeleteListener is registered at + the controller, it uses an own dialog to ask the user for confirmation.

+ */ + interface ::com::sun::star::form::XConfirmDeleteBroadcaster; + + /** is used to notify errors which happen in the form the controller is responsible for. + +

A form controller listens for error events at the form it is responsible for. If and only if no + com::sun::star::sdb::XSQLErrorListener is registered at the controller, it + uses an own dialog to notify the user of the error.

+ + */ + interface ::com::sun::star::sdb::XSQLErrorBroadcaster; + + /** is used for multiplexing row set events happening on the form which the controller is responsible for. + */ + interface ::com::sun::star::sdb::XRowSetApproveBroadcaster; + + /** is used broadcasting parameter events in the form. + +

A form controller listens for parameter events at the form it is responsible for. If and only if no + com::sun::star::form::XDatabaseParameterListener is registered at the controller, it + uses an own dialog to ask the user for parameter values.

+ */ + interface ::com::sun::star::form::XDatabaseParameterBroadcaster2; + + /** allows switching the form controller to different operation modes. + + +

The two modes usually (but not necessarily) supported by a form controller are the DataMode + and the FilterMode, where the former is the usual modus operandi for displaying and modifying + data, and the latter is a special mode to enter a filter for the database form which the controller is + responsible for.

+ */ + interface ::com::sun::star::util::XModeSelector; + + /** allows controlling the filter mode. + +

If the form controller supports a form based filter mode, then it shall also + support the XFilterController interface, which allows controlling this mode.

+ */ + [optional] interface XFilterController; + + /** denotes the instance which is used to implement operations on the form which the controller + works for. + +

This instance can be used, for instance, to determine the current state of certain form features.

+ */ + [attribute, readonly] XFormOperations FormOperations; + + /** provides access to the currently active control + */ + [attribute, readonly] ::com::sun::star::awt::XControl CurrentControl; + + /** allows to delegate certain tasks to the context of the form controller + */ + [attribute] XFormControllerContext Context; + + /** used (if not `NULL`) for user interactions triggered by the form controller. + */ + [attribute] ::com::sun::star::task::XInteractionHandler InteractionHandler; + + /** adds the specified listener to receive notifications whenever the activation state of + the controller changes. + */ + void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener Listener ); + + /** removes the specified listener from the list of components to receive notifications whenever the activation + state of the controller changes. + */ + void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener Listener ); + + /** adds a controller to the list of child controllers + @throws ::com::sun::star::lang::IllegalArgumentException + if the given controller is `NULL`, or cannot rightfully be a child controller. Since controllers + mirror the hierarchy of the forms the are responsible for, this means that the form of the given + child controller must be a child of the controller at which the method is invoked. + */ + void addChildController( [in] XFormController ChildController ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/runtime/XFormControllerContext.idl b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl new file mode 100644 index 0000000000..d4f439ffeb --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + + +/** provides a context for a FormController + +

A FormController knows about the controls it is responsible + for, and about the control container which those controls live in. However, it doesn't know + about a possible larger context, like a scrollable view which the controls are embedded into. + To compensate this, it can be provided a XFormControllerContext.

+ */ +interface XFormControllerContext +{ + /** ensures the given control is visible, by scrolling the view if necessary. + */ + void makeVisible( [in] ::com::sun::star::awt::XControl Control ); +}; + + +}; }; }; }; }; + + +/* 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 0000000000..d40b36e808 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormOperations.idl @@ -0,0 +1,243 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module runtime { + +interface XFeatureInvalidation; + + +/** encapsulates operations on a database form. + +

This instance allows for operations on a user interface form, by saving its clients + from various tedious and error-prone operations.

+ +

As an example, imagine you have a database form, displayed in some user + interface, which you want to move to the next record.
+ It is as easy as calling com::sun::star::sdbc::XResultSet::next() + on this form, right? Wrong. First, you need to care for saving the current + record, so the user doesn't lose her input. So you need to call + com::sun::star::sdbc::XResultSetUpdate::updateRow() or + com::sun::star::sdbc::XResultSetUpdate::insertRow(), depending + on the form's com::sun::star::sdb::RowSet::IsNew property.
+ But then you're done, right? Wrong, again.
+ When the user just entered some data into one of the form fields, but did not yet + leave this field, then the data is not yet committed to the form, not to talk + about being committed to the underlying database. So, before everything else, + you would need to obtain the active control of the form, and commit it.
+ Now you're done ...

+ +

As another example, consider that you want to delete the current record from the + form. You have to take into account any com::sun::star::form::XConfirmDeleteListeners + registered at the com::sun::star::form::FormController or the + com::sun::star::form::component::DataForm.

+ +

If you agree that this is ugly to do and maintain, then XFormOperations + is for you. It provides an execute() method, which will do all of the above + for you; plus some similar convenient wrappers for similar functionality.

+ + @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. + +

Note that it is possible to operate on a user interface form without + actually having access to the form controller instance. However, in this + case some functionality will not be available. In particular, every feature + which relies on the active control of the controller might be of limited use.

+ */ + [attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller; + + /** retrieves the current state of the given feature + +

You would usually use this to update some user interface to reflect this state. + For instance, you could imagine a toolbar button which is associated with a given feature. + This button would be enabled if and only if the respective feature is currently + available, and be checked if and only if the feature state is a boolean + evaluating to `TRUE`.

+ + @param Feature + the feature whose state is to be determined. Must be one of the FormFeature + constants.
+ An invalid value here will be silently ignored, and simply return a FeatureState + indicating disabled with a `NULL` state.

+ */ + FeatureState getState( + [in] short Feature + ); + + /** determines whether a feature is currently enabled. + +

Calling this is equivalent to calling getState(), and evaluating the + FeatureState::Enabled member.

+ + @param Feature + the feature whose state is to be determined. Must be one of the FormFeature + constants.
+ 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 + +

This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsNew property of the form.

+ + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs obtaining the form property + */ + boolean isInsertionRow( + ) + raises ( ::com::sun::star::lang::WrappedTargetException ); + + /** determines whether the current row of the form is modified + +

This is a convenience method only. Calling it is equivalent to examining the + com::sun::star::sdb::RowSet::IsModified property of the form.

+ + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs obtaining the form property + */ + boolean isModifiedRow( + ) + raises ( ::com::sun::star::lang::WrappedTargetException ); + + /** denotes the instance which should be notified about features whose state might have changed. + +

If this attribute is not `NULL`, the instance which it denotes will be notified + whenever the state of any supported feature might have changed.

+ +

For instance, imagine a form whose current row has just been moved to another + record, using the execute() method. This means that potentially, the state + of all movement-related features might have changed.

+ +

Note that the instance does not actually notify changes in the feature states, but only + potential changes: It's up to the callee to react on this appropriately. This is + since OpenOffice.org's application framework features own mechanisms to cache and invalidate + feature states, so we do not burden this implementation here with such mechanisms.

+ + @see FormFeature + */ + [attribute] XFeatureInvalidation FeatureInvalidation; +}; + + +}; }; }; }; }; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmission.idl b/offapi/com/sun/star/form/submission/XSubmission.idl new file mode 100644 index 0000000000..d4ddd35f2b --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmission.idl @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module submission { + +interface XSubmissionVetoListener; + + +/** is implemented by components which support submitting data. +*/ +interface XSubmission : com::sun::star::uno::XInterface +{ + /** tells the component to submit data + + @throws com::sun::star::util::VetoException + if the submission has been vetoed. Usually, this indicates that not all + requirements for the submission, e.g. data consistency, are fulfilled. + + @throws com::sun::star::lang::WrappedTargetException + if an error occurred during invoking the submission target + */ + void submit( ) + raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); + + /** tells the component to submit data + + @param aHandler + This handler allows additional user interaction, which may be necessary before + the submission can be performed. + + @throws com::sun::star::util::VetoException + if the submission has been vetoed. Usually, this indicates that not all + requirements for the submission, e.g. data consistency, are fulfilled. + + @throws com::sun::star::lang::WrappedTargetException + if an error occurred during invoking the submission target + */ + void submitWithInteraction( [in] com::sun::star::task::XInteractionHandler aHandler ) + raises ( com::sun::star::util::VetoException, com::sun::star::lang::WrappedTargetException ); + + /** registers the given listener to be notified when a submission occurs + + @param listener + the listener to register + + @throws com::sun::star::lang::NoSupportException + when the component does not support external components vetoing the submission + */ + void addSubmissionVetoListener( [in] XSubmissionVetoListener listener ) + raises ( com::sun::star::lang::NoSupportException ); + + /** revokes a listener which has previously been registered to be notified when a submission occurs + + @param listener + the listener to revoke + + @throws com::sun::star::lang::NoSupportException + when the component does not support external components vetoing the submission + */ + void removeSubmissionVetoListener( [in] XSubmissionVetoListener listener ) + raises ( com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmissionSupplier.idl b/offapi/com/sun/star/form/submission/XSubmissionSupplier.idl new file mode 100644 index 0000000000..1776ea7bf3 --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionSupplier.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module submission { + +interface XSubmission; + + +/** is implemented by a component which allows access to a component which can + submit data. + + @see XSubmission +*/ +interface XSubmissionSupplier : com::sun::star::uno::XInterface +{ + /** specifies the XSubmission instance to which the submission + request should be delegated. + */ + [attribute] XSubmission Submission; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl b/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl new file mode 100644 index 0000000000..eab12b96f2 --- /dev/null +++ b/offapi/com/sun/star/form/submission/XSubmissionVetoListener.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module submission { + + +/** is implement by components which want to observe (and probably veto) the + submission of data. + + @see XSubmission +*/ +interface XSubmissionVetoListener : com::sun::star::lang::XEventListener +{ + /** is invoked when a component, at which the listener has been registered, + is about to submit its data. + + @param event + The submission event. The com::sun::star::lang::EventObject::Source + member of the structure describes the component which is about to submit its data. + + @throws com::sun::star::util::VetoException + when the submission is vetoed. com::sun::star::uno::Exception::Message + should contain a justification for the veto then. + */ + void submitting( [in] com::sun::star::lang::EventObject event ) + raises ( com::sun::star::util::VetoException ); + +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl b/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl new file mode 100644 index 0000000000..87aa9a9019 --- /dev/null +++ b/offapi/com/sun/star/form/validation/ValidatableBindableControlModel.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +module com { module sun { module star { module form { module validation { + +/** specifies a control model which supports both binding to an external value supplier, + and to an external validator. + +

There are two methods how the value which is represented by a control model + can interact with other components (well, except the trivial ones accessible + by using com::sun::star::beans::XPropertySet): +

  • binding the value to an external component via com::sun::star::form::binding::XBindableValue
  • +
  • validating the current value by an external component, via XValidatable and XValidator
  • +

+ +

The ValidatableBindableControlModel services describes the interaction of these concepts + for control models which support both of them.

+*/ +service ValidatableBindableControlModel +{ + /** specifies support for validating the current value of the control + */ + service ValidatableControlModel; + + /** specifies support for binding the control value to an external component + +

If a value binding is established at the control model (by using + com::sun::star::form::binding::XBindableValue::setValueBinding() with a non-`NULL` + binding), this binding is analyzed for validation support. If it is present (read: if the + binding also supports the XValidator interface), the binding is also + established as validator, as if it has been passed to XValidatable::setValidator().
+ If, while this binding is active (in both its roles as value binding and validator), + an attempt is made to establish another validator, this is blocked with raising a + com::sun::star::util::VetoException upon calling XValidatable::setValidator().

+ */ + service com::sun::star::form::binding::BindableControlModel; +}; + + +}; }; }; }; }; + +/* 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 0000000000..2dcf1ba7e8 --- /dev/null +++ b/offapi/com/sun/star/form/validation/ValidatableControlModel.idl @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + +/** specifies the model of a form control which supports live validation of its + input. + +

Validatable control models support setting a validator with dynamic + validity constraints, and broadcasting changes in their value as well as the + validity of their value.

+*/ +service ValidatableControlModel +{ + /** specifies the basic functionality for a form control model + +

Via this service, validatable control models inherit the + com::sun::star::util::XCloneable interface.
+ If a validatable control model, at which a validator has been set (via + XValidatable::setValidator()), is being cloned, then the + validator is also set at the clone. Effectively, this means that + both control model instances share the same validator instance.

+ */ + service com::sun::star::form::FormControlModel; + + /** enables support for validating the value of the control model + +

Setting and retrieving the current validator of the control model is + possible via the XValidatable interface (which + XValidatableFormComponent is derived from).

+ +

Easy access to the current value of the control, as well as it's validity + (relative to the active validator), is provided by the methods XValidatableFormComponent::isValid() + and XValidatableFormComponent::getCurrentValue().

+ +

Note that the type of the value provided by XValidatableFormComponent::getCurrentValue() + is not specified here, but depends on the concrete control type.

+ */ + interface XValidatableFormComponent; + + /** enables support for validators with dynamic validity constraints. + +

As soon as a validator is set via XValidatable::setValidator(), the validatable + control model registers itself as listener. If the validity constraint of the validator + changes, the ValidatableControlModel re-validates its current valid, and + broadcasts any resulting changes to all its XFormComponentValidityListener, if + necessary.

+ */ + interface XValidityConstraintListener; +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl b/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl new file mode 100644 index 0000000000..5114f337f6 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XFormComponentValidityListener.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + + +/** is the listener interface to be notified of changes of a XValidatableFormComponent +*/ +interface XFormComponentValidityListener : com::sun::star::lang::XEventListener +{ + /** called when the validity and/or the value of the form component at which the listener + is registered changed. + + @param Source + The member com::sun::star::lang::EventObject::Source + represents the XValidatableFormComponent whose validity, value, or text changed. + */ + void componentValidityChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidatable.idl b/offapi/com/sun/star/form/validation/XValidatable.idl new file mode 100644 index 0000000000..be7d27f7a6 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatable.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XValidator; + + +/** specifies support for validating a component + + @see XValidator +*/ +interface XValidatable : com::sun::star::uno::XInterface +{ + /** sets an external instance which is able to validate the component + +

Any previously active validator will be revoked - there can be only one!

+ + @param Validator + the new validator which is to be used by the component. May be `NULL`, + in this case only the current validator is revoked. + + @throws com::sun::star::util::VetoException + if changing the validator is not allowed in the current component state + */ + void setValidator( [in] XValidator Validator ) + raises ( com::sun::star::util::VetoException ); + + /** retrieves the external instance which is currently used to validate the component + */ + XValidator + getValidator( ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl b/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl new file mode 100644 index 0000000000..f797ef2521 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidatableFormComponent.idl @@ -0,0 +1,100 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XFormComponentValidityListener; + + +/** is a convenience interface for accessing several aspects of a form component + which supports validation. + +

A validatable form component has two aspects which other parties might + be interested in: +

    +
  • The pure validity flag: Whatever the user enters in the component, this is + either valid (relative to the active validator), or invalid.
  • +
  • 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.
  • +
+

+ +

An XValidatableFormComponent allows to easily access both of these aspects.

+ +

Note that all of the information provided at this interface can also obtained by other means, + but much more inconveniently.

+ + @see XValidatable + @see XValidator +*/ +interface XValidatableFormComponent : XValidatable +{ + /** determines whether the current value of the component passed the validity test + at the validator. + +

Calling this is equal to calling XValidator::isValid() with + the current value (see getCurrentValue()) of the component, where + the validator is obtained via XValidatable::getValidator().

+ +

If no validator has been set (XValidatable::setValidator()), this method + returns true.

+ */ + boolean isValid(); + + /** retrieves the current value of the component. + +

The type of the current value, as well as it's semantics, depend on the service + implementing this interface.

+ +

Again, this is a convenience method. For example, for a com::sun::star::form::component::FormattedField, + calling this method is equivalent to retrieving the + com::sun::star::awt::UnoControlFormattedFieldModel::EffectiveValue.

+ +

If no validator has been set (XValidatable::setValidator()), the value returned + here is defined by the service implementing this interface.

+ */ + any getCurrentValue(); + + /** registers the given listener. + +

XFormComponentValidityListeners are called whenever any of the aspects + of the validatable form component (the validity flag, or the value) changed.

+ + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void addFormComponentValidityListener( [in] XFormComponentValidityListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** registers the given listener. + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + */ + void removeFormComponentValidityListener( [in] XFormComponentValidityListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidator.idl b/offapi/com/sun/star/form/validation/XValidator.idl new file mode 100644 index 0000000000..a46db60045 --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidator.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + +interface XValidityConstraintListener; + + +/** specifies a component able to validate (the content of) other components + +

Validators support simple validity checks and retrieving justifications for + invalidity.

+ +

Validators may additionally support dynamic validity constraints. In such a case, + the validity of a given value may change, without the value changing itself.
+ To be notified about this, interested components should register as XValidityConstraintListener. + + @see XValidatable +*/ +interface XValidator : com::sun::star::uno::XInterface +{ + /** determines whether the given value is valid + + @param Value + the value to check for validity + @return + `TRUE` if and only if the value is considered valid. + */ + boolean isValid( [in] any Value ); + + /** retrieves a justification for the invalidity of the given value + + @param Value + the value which has been recognized as being invalid + @return + a human-readable string, which explains why the given value is considered invalid. + */ + string explainInvalid( [in] any Value ); + + /** registers the given validity listener. + +

Usually, an XValidatable instance will also add itself as validity listener, + as soon as the validator is introduced to it.

+ +

Implementations which do not support dynamic validity constraints should simply ignore this + call.

+ + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + @see XValidityConstraintListener + */ + void addValidityConstraintListener( [in] XValidityConstraintListener Listener ) + raises( com::sun::star::lang::NullPointerException ); + + /** revokes the given validity listener + + @throws com::sun::star::lang::NullPointerException + if the given listener is `NULL` + @see XValidityConstraintListener + */ + void removeValidityConstraintListener( [in] XValidityConstraintListener Listener ) + raises( com::sun::star::lang::NullPointerException ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/form/validation/XValidityConstraintListener.idl b/offapi/com/sun/star/form/validation/XValidityConstraintListener.idl new file mode 100644 index 0000000000..dad86ef2eb --- /dev/null +++ b/offapi/com/sun/star/form/validation/XValidityConstraintListener.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +module com { module sun { module star { module form { module validation { + + +/** specifies an interface for listening for changes in the validity constraints + represented by an XValidator. +*/ +interface XValidityConstraintListener : com::sun::star::lang::XEventListener +{ + /** called when the validity constraint represented by an XValidator, + at which the listener is registered, changed. + + @param Source + The event source. The member com::sun::star::lang::EventObject::Source + represents the validator component whose validity constraint changed. + */ + void validityConstraintChanged( [in] com::sun::star::lang::EventObject Source ); +}; + + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3