mirror of
https://github.com/LibreOffice/core.git
synced 2025-07-23 04:42:03 +00:00
ScriptForge (Form) Fix missing attributes
When a FormControl instance is created triggered by an event with fc = CreateScriptService("FormEvent", event) a number of attributes are not (re)-initialized in the parent Form instance. They concern references to the form document container and to the database connetction. The absences prevent from scripting easily (workarounds exist) operations on the form document (close, print, ...) or towards the database (read, sql, ...). In particular, this limits the reusability of scripts across >1 form documents. This is a bug. It is fixed with the actual change. Documentation may be left unchanged. Basic and Python scripts are impacted alike. Change-Id: I285148917174d5a046c11b15ea2a2581a23d4277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187854 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
|
||||
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="SFDatabases" library:readonly="false" library:passwordprotected="false">
|
||||
<library:element library:name="SF_Dataset"/>
|
||||
<library:element library:name="SF_Datasheet"/>
|
||||
<library:element library:name="SF_Database"/>
|
||||
<library:element library:name="__License"/>
|
||||
<library:element library:name="SF_Register"/>
|
||||
<library:element library:name="__License"/>
|
||||
<library:element library:name="SF_Database"/>
|
||||
<library:element library:name="SF_Datasheet"/>
|
||||
<library:element library:name="SF_Dataset"/>
|
||||
</library:library>
|
@ -1263,7 +1263,12 @@ Try:
|
||||
_FormType = ISBASEFORM
|
||||
' Make a new SF_FormDocument instance
|
||||
Set [_Parent] = ScriptForge.SF_Services.CreateScriptService("SFDocuments.FormDocument", oParent)
|
||||
Set _FormDocument = [_Parent]._FormDocument
|
||||
With [_Parent]
|
||||
Set _FormDocument = ._FormDocument
|
||||
_FormDocumentName = ._HierarchicalName
|
||||
Set _BaseComponent = ._BaseComponent
|
||||
Set _Component = ._Component
|
||||
End With
|
||||
ElseIf oParent.Identifier = "com.sun.star.text.TextDocument" Then
|
||||
_FormType = ISDOCFORM
|
||||
Set [_Parent] = ScriptForge.SF_Services.CreateScriptService("SFDocuments.Document", oParent)
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
|
||||
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="SFDocuments" library:readonly="false" library:passwordprotected="false">
|
||||
<library:element library:name="__License"/>
|
||||
<library:element library:name="SF_Form"/>
|
||||
<library:element library:name="SF_DocumentListener"/>
|
||||
<library:element library:name="SF_Document"/>
|
||||
<library:element library:name="SF_Calc"/>
|
||||
<library:element library:name="SF_Writer"/>
|
||||
<library:element library:name="SF_Register"/>
|
||||
<library:element library:name="SF_Base"/>
|
||||
<library:element library:name="SF_FormControl"/>
|
||||
<library:element library:name="SF_FormDocument"/>
|
||||
<library:element library:name="SF_Chart"/>
|
||||
<library:element library:name="SF_FormDocument"/>
|
||||
<library:element library:name="SF_FormControl"/>
|
||||
<library:element library:name="SF_Base"/>
|
||||
<library:element library:name="SF_Register"/>
|
||||
<library:element library:name="SF_Writer"/>
|
||||
<library:element library:name="SF_Calc"/>
|
||||
<library:element library:name="SF_Document"/>
|
||||
<library:element library:name="SF_DocumentListener"/>
|
||||
<library:element library:name="SF_Form"/>
|
||||
<library:element library:name="__License"/>
|
||||
</library:library>
|
Reference in New Issue
Block a user