Hello,
I am having trouble getting rid of all menus & toolbars after upgrading to LibreOffice 6.4+. Previously, I could just use this macro to toggle show/hide everything - only sheets showing.
Sub showAllBars(opt as Boolean)
oCurrentController = ThisComponent.getCurrentController()
oCurrentController.SheetTabs = opt
oCurrentController.HasColumnRowHeaders = opt
oLayout = oCurrentController.Frame.LayoutManager()
oLayout.AutomaticToolbars = opt
oLayout.MenuBarCloser = not(opt)
oLayout.setVisible(opt)
End Sub
Now the Menubar still persists though
I have also tried:
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args9(0) as new com.sun.star.beans.PropertyValue
args9(0).Name = "MenuBarVisible"
args9(0).Value = opt
dispatcher.executeDispatch(document, ".uno:MenuBarVisible", "", 0, args9())
I’ve tried versions 6.4.X and 7.X but it just won’t go away. Even adding the command manually from:
Tools->Customize->Menus->(Menubar)
But still can’t hide it.
This is running on CentOS 7.9 KDE (also does not work on CentOS 8/Stream KDE)