https://bugs.documentfoundation.org/show_bug.cgi?id=157672
Bug ID: 157672
Summary: SFDocument.Form.Controls("ControlName") method fails
in Calc document when control name given and sheet
Sheet is NOT active
Product: LibreOffice
Version: 7.6.2.1 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
In the SourceForge Macro Library, SFDocument.Form.Controls("ControlName")
method fails in a Calc document when a control name parameter is given and the
sheet that the control is on is NOT the active sheet. Note that the method
works properly when no Control name is given. Also note thet the
Subforms("SubFormName") method works fine whether or not the containing sheet
is active.
Steps to Reproduce:
1. In a calc sheet, create DB Form with controls and a subform
2. Retrieve the SF Form object
3. Ensure a different sheet is Active
4. Execute the SFDocument.Form.Controls("ControlName") method, naming the
control
5. Observe the failure
Actual Results:
SFDocument.Form.Controls("ControlName") method fails with the following
MessageBox contents:
Library : SFDocuments
Service : Form
Method : Controls
The ScriptForge library has crashed. The reason is unknown.
Maybe a bug that could be reported on
https://bugs.documentfoundation.org/
More details :
Location : SFDocuments.Form.Controls/637
An exception occurred
Type: com.sun.star.container.NoSuchElementException
Message: .
THE EXECUTION IS CANCELLED.
Expected Results:
Normal execution, whether or not the containing sheet is active
Reproducible: Always
User Profile Reset: No
Additional Info:
1. SFDocument.Form.Controls("") works and returne the full control list,
whether or not the containing sheet is active.
2. SFDocument.Form.Subforms("SubFormName") works and returns the SubForm
Object, whether or not the containing sheet is Active.
3. SFDocument.Form.Controls("ControlName") works if the containing sheet is
first made active.
--
You are receiving this mail because:
You are the assignee for the bug.