[Libreoffice-commits] core.git: wizards/source
Jean-Pierre Ledure (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 8 14:23:38 UTC 2021
wizards/source/sfdialogs/SF_DialogControl.xba | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit 48be34dff4fbb0f3d9b27b3584c451ae9d338263
Author: Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Mon Feb 8 12:47:33 2021 +0100
Commit: Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Mon Feb 8 15:22:57 2021 +0100
ScriptForge - (SF_DialogControl) Fix list of properties
List was incomplete: trre control properties were missing
Additionally, comments wre reread thanks to writing of help files
Typos or approximations were reviewed
Change-Id: I799011f27d89d93278027f5f3cf9853d3d2371cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110575
Tested-by: Jean-Pierre Ledure <jp at ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp at ledure.be>
diff --git a/wizards/source/sfdialogs/SF_DialogControl.xba b/wizards/source/sfdialogs/SF_DialogControl.xba
index 1b8c72cc25fe..161ff1d2b571 100644
--- a/wizards/source/sfdialogs/SF_DialogControl.xba
+++ b/wizards/source/sfdialogs/SF_DialogControl.xba
@@ -491,7 +491,7 @@ End Property ' SFDialogs.SF_DialogControl.XControlView (get)
REM -----------------------------------------------------------------------------
Property Get XTreeDataModel() As Object
-''' The XTreeDataModel property returns the model UNO object of the control
+''' The XTreeDataModel property returns the mutable data model UNO object of the tree control
XTreeDataModel = _PropertyGet("XTreeDataModel", Nothing)
End Property ' SFDialogs.SF_DialogControl.XTreeDataModel (get)
@@ -504,7 +504,7 @@ Public Function AddSubNode(Optional ByRef ParentNode As Variant _
) As Variant
''' Return a new node of the tree control subordinate to a parent node
''' Args:
-''' ParentNode: A node UNO object, of type com.sun.star.awt.tree.XMutableTreeNode
+''' ParentNode: A node UNO object, of type com.sun.star.awt.tree.XMutableTreeNode
''' DisplayValue: the text appearing in the control box
''' DataValue: any value associated with the new node. Default = Empty
''' Returns:
@@ -564,7 +564,7 @@ Public Function AddSubTree(Optional ByRef ParentNode As Variant _
''' A1 B1 C2 |__ B1
''' A1 B2 C3 |__ C1
''' A2 B3 C4 |__ C2
-''' A2 B3 C5 B2
+''' A2 B3 C5 |__ B2
''' A3 B4 C6 |__ C3
''' |__ A2
''' |__ B3
@@ -574,23 +574,23 @@ Public Function AddSubTree(Optional ByRef ParentNode As Variant _
''' |__ B4
''' |__ C6
''' Typically, such an array can be issued by the GetRows method applied on the SFDatabases.Database service
-''' when the array item containing the text to be displayed is = "" or is empty/null,
+''' when an array item containing the text to be displayed is = "" or is empty/null,
''' no new subnode is created and the remainder of the row is skipped
''' WithDataValue:
''' When False (default), every column of FlatTree contains the text to be displayed in the tree control
''' When True, the texts to be displayed (DisplayValue) are in columns 0, 2, 4, ...
''' while the DataValues are in columns 1, 3, 5, ...
''' Returns:
-''' The new node UNO object: com.sun.star.awt.tree.XMutableTreeNode
+''' True when successful
''' Examples:
''' Dim myTree As Object, theRoot As Object, oDb As Object, vData As Variant
''' Set myTree = myDialog.Controls("myTreeControl")
''' Set theRoot = myTree.CreateRoot("By product category")
''' Set oDb = CreateScriptService("SFDatabases.Database", "/home/.../mydatabase.odb")
''' vData = oDb.GetRows("SELECT [Category].[Name], [Category].[ID], [Product].[Name], [Product].[ID] " _
-''' & "FROM [Category], [PRODUCT] WHERE [Product].[CategoryID] = [Category].[ID] " _
+''' & "FROM [Category], [Product] WHERE [Product].[CategoryID] = [Category].[ID] " _
''' & "ORDER BY [Category].[Name], [Product].[Name]")
-''' myTree.AddSubTree(theRoot, vData)
+''' myTree.AddSubTree(theRoot, vData, WithDataValue := True)
Dim bSubTree As Boolean ' Return value
Dim oNode As Object ' com.sun.star.awt.tree.XMutableTreeNode
@@ -668,7 +668,7 @@ REM ----------------------------------------------------------------------------
Public Function CreateRoot(Optional ByVal DisplayValue As Variant _
, Optional ByRef DataValue As Variant _
) As Variant
-''' Return a new root node of the tree control. The new tree root is inserted below pre-exiting root nodes
+''' Return a new root node of the tree control. The new tree root is inserted below pre-existing root nodes
''' Args:
''' DisplayValue: the text appearing in the control box
''' DataValue: any value associated with the root node. Default = Empty
@@ -826,6 +826,7 @@ Public Function Properties() As Variant
"Cancel" _
, "Caption" _
, "ControlType" _
+ , "CurrentNode" _
, "Default" _
, "Enabled" _
, "Format" _
@@ -861,6 +862,7 @@ Public Function Properties() As Variant
, "Visible" _
, "XControlModel" _
, "XControlView" _
+ , "XTreeDataModel" _
)
End Function ' SFDialogs.SF_DialogControl.Properties
@@ -1503,7 +1505,7 @@ Const cstSubArgs = "Value"
If oSession.HasUNOProperty(_ControlModel, "Label") Then _ControlModel.Label = pvValue
Case Else : GoTo CatchType
End Select
- Case UCAse("CurrentNode")
+ Case UCase("CurrentNode")
Select Case _ControlType
Case CTLTREECONTROL
If Not ScriptForge.SF_Utils._Validate(pvValue, "Selection", ScriptForge.V_OBJECT) Then GoTo Finally
More information about the Libreoffice-commits
mailing list