https://bugs.documentfoundation.org/show_bug.cgi?id=171163
Bug ID: 171163
Summary: Issue with basic protected library and using data type
declaration
Product: LibreOffice
Version: 25.8.4.2 release
Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
libreoffice calc, starbasic, using protected library including data type
declaration, issue when the protected library is opened in the IDE, and execute
a save file by macro.
Steps to Reproduce:
the basic code used is :
Option VBASupport 1
Option Explicit
type tPeriod
dBeginOn as date
dEndOn as date
end type
public sub Fichier_Enregistrer
'--- Equivaut à menu Fichier.Enregistrer Ctrl + S
dim dispatcher as object
if (ThisComponent.isModified) then
If (ThisComponent.hasLocation and (not
ThisComponent.isReadOnly)) then
dispatcher =
createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(ThisComponent.CurrentController.Frame, ".uno:Save",
"", 0, Array())
' call ThisComponent.store()
' msgbox "passe"
end if
end if
end sub
this code is set in a separate library (not in the Standard library)
protected by a password
Actual Results:
1. call ThisComponent.store(), runs correctly if the LibreOffice StarBasic IDE
is not open.
2. the issue "Error 91, Undefined object variable" occurs, during call
ThisComponent.store() and LibreOffice StarBasic IDE is opened and the protected
libray is opened, and a data type is declared in the code.
3.the same procedure works properly if the LibreOffice StarBasic IDE is open
after entering the password, but the type declaration at the beginning of the
code is commented out.
Case 2 is the issue.
Expected Results:
that the case 2. issue does not occurs.
This is only problematic in a development environment because the behavior is
not normal.
I only identified the anomaly when calling the file recording (call
ThisComponent.store()).
Reproducible: Always
User Profile Reset: No
Additional Info:
I stopped using classes (object-oriented programming), as my classes contained
data type declarations. I suppose that could be the reason.
Regards.
PG
--
You are receiving this mail because:
You are the assignee for the bug.