https://bugs.documentfoundation.org/show_bug.cgi?id=168409

            Bug ID: 168409
           Summary: Basic code abort when accessing toolbar buttons -
                    Regression
           Product: LibreOffice
           Version: 25.8.1.1 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Exploring the buttons belonging to a toolbar by macro code returns no button.

There is no difference between toolbars stored in the document or stored at LO
level.

Running the code below returned a list of buttons in 25.2. The list is empty in
25.8.



Steps to Reproduce:
1. Create a new empty Calc document

2. With the Basic IDE, enter next code in an empty Basic module:

Sub Main
        With GlobalScope.BasicLibraries
                .loadLibrary("ScriptForge")
                If .hasByName("XrayTool") Then .loadLibrary("XrayTool")
        End With
        doc = CreateScriptService("Calc", ThisComponent)        '      
ScriptForge (Basic) object

        toolbar = doc.Toolbars("standardbar")                           '      
ScriptForge (Basic) object
        toolbar.Visible = True
        layoutmanager = toolbar._LayoutManager                          '      
com.sun.star.comp.framework.LayoutManager
        resourceURL = toolbar.ResourceURL                                      
'       private:resource/toolbar/standardbar

        element = layoutmanager.getElement(resourceURL)         '      
com.sun.star.ui.XUIElement
        accessiblecontext = element.RealInterface.AccessibleContext            
'       com.sun.star.accessibility.XAccessibleContext
        settings = element.getSettings(True)                            '      
com.sun.star.container.XIndexAccess

        For i = 0 To accessiblecontext.AccessibleChildCount - 1
                print accessiblecontext.getAccessibleChild(i).AccessibleName,
        Next i
End Sub

3. Run the code

Actual Results:
No output.

Expected Results:
A message box should be displayed with the list of the names of the buttons in
the "Standard" toolbar.


Reproducible: Always


User Profile Reset: No

Additional Info:
Actual release:
Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 6; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-BE (en_US.UTF-8); UI: en-US
Calc: threaded

The
   accessiblecontext.AccessibleChildCount
value is zero.

The behaviour is OK in next release:
Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 6; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-BE (en_US.UTF-8); UI: en-US
Calc: threaded

The
   accessiblecontext.AccessibleChildCount
value is identical with the
   settings.Count
property.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to