diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2019-07-13 16:19:17 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2019-07-13 16:22:32 +0200 |
commit | 15fec4ee1c07b7c2b234384654ca3ee730acc2c8 (patch) | |
tree | d053260ace1ac15e11f53519c0bb44ea6e5baa35 /wizards/source/access2base/Control.xba | |
parent | 35463d886e15d13a81bce36610140e40ae742416 (diff) |
Access2Base - Set Parent property in all classes
To get faster access to parents from controls
Top classes (form, dialog and commandbar) should return Parent = Nothing
Diffstat (limited to 'wizards/source/access2base/Control.xba')
-rw-r--r-- | wizards/source/access2base/Control.xba | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba index 9f6f36f1ba04..5e241186f081 100644 --- a/wizards/source/access2base/Control.xba +++ b/wizards/source/access2base/Control.xba @@ -17,6 +17,7 @@ REM ---------------------------------------------------------------------------- Private _Type As String ' Must be CONTROL Private _This As Object ' Workaround for absence of This builtin function +Private _Parent As Object Private _ImplementationName As String Private _ClassId As Integer Private _ParentType As String ' One of CTLPARENTISxxxx constants @@ -40,6 +41,7 @@ REM ---------------------------------------------------------------------------- Private Sub Class_Initialize() _Type = OBJCONTROL Set _This = Nothing + Set _Parent = Nothing _ClassId = -1 _ParentType = "" _Shortcut = "" @@ -781,6 +783,7 @@ Dim j As Integer, oView As Object ' Determine exact name Set ocControl = New Control Set ocControl._This = ocControl + Set ocControl._Parent = _This ocControl._ParentType = CTLPARENTISGRID sParentShortcut = _Shortcut sControls() = ControlModel.getElementNames() @@ -1649,7 +1652,7 @@ Dim oControlEvents As Object, sEventName As String Case UCase("Page") If Utils._hasUNOProperty(ControlModel, "Step") Then _PropertyGet = ControlModel.Step Case UCase("Parent") - Set _PropertyGet = PropertiesGet._ParentObject(_Shortcut) + Set _PropertyGet = _Parent Case UCase("Picture") _PropertyGet = ConvertToUrl(ControlModel.ImageURL) Case UCase("Required") |