diff options
author | Justin Luth <justin.luth@collabora.com> | 2022-11-09 17:02:03 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-10 08:59:24 +0100 |
commit | 2a26f136a36791c06caa895d5a25f4633fd10651 (patch) | |
tree | e5a98514cfeb7f8f4d9ecb779ccc180ed5b8f6fe /oovbaapi | |
parent | e2f8558324091bddba0637942f4f000a24e673a7 (diff) |
tdf#151548 vba FormFields: Add basic word::XFormField support
Unit tests will come in the following commits that represent
actual FormFields that have content/results.
This lays the foundation for adding
Checkboxes, Textinputs, and Dropdowns.
Change-Id: If85ae25f881198d5a0699b3350a7eb20b1735c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142507
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'oovbaapi')
-rw-r--r-- | oovbaapi/ooo/vba/word/XFormField.idl | 50 | ||||
-rw-r--r-- | oovbaapi/ooo/vba/word/XFormFields.idl | 7 |
2 files changed, 55 insertions, 2 deletions
diff --git a/oovbaapi/ooo/vba/word/XFormField.idl b/oovbaapi/ooo/vba/word/XFormField.idl index 3131fda872f5..3d51fcd263cd 100644 --- a/oovbaapi/ooo/vba/word/XFormField.idl +++ b/oovbaapi/ooo/vba/word/XFormField.idl @@ -22,12 +22,60 @@ module ooo { module vba { module word { interface XFormField { interface ooo::vba::XHelperInterface; + interface com::sun::star::script::XDefaultProperty; + /// Default member: returns the field type from WdFieldType + [attribute, readonly] long Type; + + /** + * Returns or sets true if references to the specified form field + * are automatically updated whenever the field is exited. + */ + [attribute] boolean CalculateOnExit; + /// Returns or sets a string that represents the result of the specified form field [attribute] string Result; + /// Returns or sets true if a form field is enabled [attribute] boolean Enabled; + /// Returns or sets the macro name that runs on keyboard (tab) navigation into the field + [attribute] string EntryMacro; + /// Returns or sets an exit macro name that runs on keyboard (tab) navigation out of the field + [attribute] string ExitMacro; + /** + * Returns or sets the text that's displayed in a message box + * when the form field has the focus and the user presses F1. + * + * When OwnHelp is False, HelpText specifies the name of an AutoText entry + * that contains help text for the form field + */ + [attribute] string HelpText; + /** + * Returns or sets the specifies the source of the F1 text that's displayed in a message box + * If True, the text specified by the HelpText property is displayed. + * If False, the text in the AutoText entry specified by the HelpText property is displayed. + */ + [attribute] boolean OwnHelp; + /// returns or sets the name of the specified object. + [attribute] string Name; + /// Returns or sets the text that is displayed in the status bar when a form field has the focus + [attribute] string StatusText; + /** OwnStatus: + * If True, the text specified by the StatusText property is displayed. + * If False, the text of the AutoText entry specified by the StatusText property is displayed. + */ + [attribute] boolean OwnStatus; any CheckBox(); - + any DropDown(); + any TextInput(); + /// Returns the next form field in the collection. + any Next(); + /// returns the previous form field in the collection. + any Previous(); + /** + * Represents a contiguous area in a document. + * Each Range object is defined by a starting and ending character position. + */ + any Range(); }; }; }; }; diff --git a/oovbaapi/ooo/vba/word/XFormFields.idl b/oovbaapi/ooo/vba/word/XFormFields.idl index bef2aa9d919b..8b98c6381681 100644 --- a/oovbaapi/ooo/vba/word/XFormFields.idl +++ b/oovbaapi/ooo/vba/word/XFormFields.idl @@ -23,10 +23,15 @@ module ooo { module vba { module word { - +interface XFormField; interface XFormFields { interface ::ooo::vba::XCollection; + + ///Returns and sets if shading is applied to form XFormFields + [attribute] boolean Shaded; + /// Resturns a FormField object that representa new WdFieldType added at a range + //XFormField Add( [in] any Range, [in] long Type ) raises ( com::sun::star::script::BasicErrorException ); }; }; }; }; |