diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-07-21 11:33:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-07-21 17:10:09 +0200 |
commit | 25da92004038c03c0feedf373e8038e7ee3e0c37 (patch) | |
tree | 654babe8087b83ca18bb8bd49f9fe821b3b23d45 /vcl | |
parent | 9dff8edf97f454f24a40acbed4a9297816f91da6 (diff) |
Make JunitTest_toolkit_unoapi_1 succeed again on macOS
...after afc828b9833b7a612369e95606ba56d41ef2c369 "VCL expect correct frame size
for native menubars" caused it to fail with
[...]
> checking: [toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent] is iface: [com.sun.star.accessibility.XAccessibleComponent] testcode: [ifc.accessibility._XAccessibleComponent]
> LOG> Execute: containsPoint()
> LOG> Upper bound of box containsPoint no component points - FAILED
> LOG> Lower bound of box containsPoint no component points - FAILED
> LOG> Left bound of box containsPoint no component points - FAILED
> LOG> Right bound of box containsPoint no component points - FAILED
> LOG> Outer upper and lower bounds contain no component points - OK
> LOG> Outer left and right bounds contain no component points - OK
> Method containsPoint() finished with state FAILED
> LOG> containsPoint(): COMPLETED.FAILED
[...]
> LOG> Execute: getBounds()
> LOG> Bounds = (0,0),(0,0)
> Method getBounds() finished with state FAILED
> LOG> getBounds(): COMPLETED.FAILED
[...]
> LOG> Execute: getSize()
> LOG> starting required method: getBounds()
> LOG> ! Required method getBounds() failed
> LOG> getSize(): COMPLETED.FAILED
[...]
> ***** State for toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent ******
> [toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent::containsPoint()] is testcode: [containsPoint()] - COMPLETED.FAILED
> [toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent::getBounds()] is testcode: [getBounds()] - COMPLETED.FAILED
> [toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent::getSize()] is testcode: [getSize()] - COMPLETED.FAILED
> Whole interface: COMPLETED.FAILED
> **************************************************************************************************
[...]
> ***** State for toolkit.AccessibleMenu ******
> [toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleComponent] is testcode: [ifc.accessibility._XAccessibleComponent] - COMPLETED.FAILED
> Whole component: COMPLETED.FAILED
> *********************************************
[...]
I have no idea whether that test legitimately started to fail, or is itself
bogus, and (if the former) whether adding back the call to ImplCalcSize in
MenuBar::ImplCreate is the best way to fix this.
Change-Id: I8b575c66c57a698c59ccab01698df5355d4553bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136996
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/menu.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 811d4ea360fb..cb110281ee66 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2453,6 +2453,11 @@ VclPtr<vcl::Window> MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWind pMenu->pStartedFrom = nullptr; pMenu->pWindow = pMenuBarWindow; pMenuBarWindow->SetMenu(pMenu); + if (pMenuBarWindow) { + // This is needed at least on macOS to make the JunitTest_toolkit_unoapi_1 + // toolkit.AccessibleMenu test pass: + pMenu->ImplCalcSize(pMenuBarWindow); + } return pMenuBarWindow; } |