wizards/source/access2base/Application.xba |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 180e69dca92bb8652bf627372cb22efdd57f3f68
Author: Jean-Pierre Ledure <j...@ledure.be>
Date:   Tue Nov 7 14:34:39 2017 +0100

    Access2Base - Insert Window argument in CommandBars collection
    
    Window argument forces the determination of the window
    in which toolbars are searched for.
    This argument is not part of the standard MSAccess API => Unpublished

diff --git a/wizards/source/access2base/Application.xba 
b/wizards/source/access2base/Application.xba
index 41c9a1d42e4f..13b97fda0927 100644
--- a/wizards/source/access2base/Application.xba
+++ b/wizards/source/access2base/Application.xba
@@ -573,9 +573,10 @@ Exit_Sub:
 End Sub                        &apos;  CloseConnection         V1.2.0
 
 REM 
-----------------------------------------------------------------------------------------------------------------------
-Public Function CommandBars(Optional ByVal pvIndex As Variant) As Variant
+Public Function CommandBars(Optional ByVal pvIndex As Variant, Optional ByRef 
poWindow As Object) As Variant
 &apos; Return an object of type CommandBar indicated by its index or its name 
(CASE-INSENSITIVE string)
 &apos; If no pvIndex argument, return a Collection type
+&apos; (Unpublished) With poWindow, force the frame in which toolbars are 
detected
 
        If _ErrorHandler() Then On Local Error Goto Error_Function
 Const cstThisSub = &quot;CommandBars&quot;
@@ -596,9 +597,8 @@ Const cstCustom = &quot;CUSTOM&quot;
                        
        iObjectsCount = 0
        bFound = False
-       iBuiltin = 1            &apos;  Default = builtin
 
-       Set oWindow = _SelectWindow()
+       If IsMissing(poWindow) Then Set oWindow = _SelectWindow() Else Set 
oWindow = poWindow
        If IsNull(oWindow.Frame) Then Goto Trace_WindowError
 
        &apos;  List of 21 modules
@@ -639,6 +639,7 @@ Const cstCustom = &quot;CUSTOM&quot;
        Set oModuleUI = 
CreateUnoService(&quot;com.sun.star.ui.ModuleUIConfigurationManagerSupplier&quot;)
        For k = 0 To UBound(vModules)
                For j = 0 To UBound(sSupportedModules)
+                       iBuiltin = 1            &apos;  Default = builtin
                        If vModules(k) = sSupportedModules(j) Then      &apos;  
Supported modules only
                                Set oToolbar = 
oModuleUI.getUIConfigurationManager(vModules(k))
                                vUIElements() = oToolbar.getUIElementsInfo(0)
@@ -686,7 +687,7 @@ Const cstCustom = &quot;CUSTOM&quot;
                        Case Else
                                If pvIndex = iObjectsCount - 1 Then bFound = 
True
                End Select
-                       If bFound Then
+               If bFound Then
                        Set oObject = _NewCommandBar(&quot;&quot;, 
sToolbarName, sToolbarFullName, iBuiltin)
                        Set oObject._Window = oWindow.Frame
                        Set oObject._Toolbar = oToolbar
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to