include/vcl/syswin.hxx | 1 + sfx2/source/dialog/backingwindow.cxx | 7 +------ vcl/source/window/syswin.cxx | 7 +++++++ 3 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit 3651482ef3a436bc1de01dcb333fa0cab7dc2d36 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 24 12:17:15 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 24 17:14:02 2021 +0100 hide menubar details Change-Id: If9d30b4f1408f16cb84636245fc9039a0dd6bad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111481 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 8b728a1af912..7841b0b657fb 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -195,6 +195,7 @@ public: MenuBar* GetMenuBar() const { return mpMenuBar; } void SetMenuBarMode( MenuBarMode nMode ); void CollectMenuBarMnemonics(MnemonicGenerator& rMnemonicGenerator) const; + int GetMenuBarHeight() const; void SetNotebookBar(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame, diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index ce04c182fd77..d9e2659e0fa8 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -21,7 +21,6 @@ #include <vcl/accel.hxx> #include <vcl/event.hxx> #include <vcl/help.hxx> -#include <vcl/menu.hxx> #include <vcl/ptrstyle.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> @@ -351,11 +350,7 @@ void BackingWindow::ApplyStyleSettings() // compute the menubar height sal_Int32 nMenuHeight = 0; if (SystemWindow* pSystemWindow = GetSystemWindow()) - { - MenuBar* pMenuBar = pSystemWindow->GetMenuBar(); - if (pMenuBar) - nMenuHeight = pMenuBar->GetMenuBarHeight(); - } + nMenuHeight = pSystemWindow->GetMenuBarHeight(); // fdo#34392: we do the layout dynamically, the layout depends on the font, // so we should handle data changed events (font changing) of the last child diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index b204135036bd..06e3482100e7 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1211,4 +1211,11 @@ void SystemWindow::CollectMenuBarMnemonics(MnemonicGenerator& rMnemonicGenerator } } +int SystemWindow::GetMenuBarHeight() const +{ + if (MenuBar* pMenuBar = GetMenuBar()) + return pMenuBar->GetMenuBarHeight(); + return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits