diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-04 15:39:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-04 17:48:56 +0100 |
commit | fcb7fe3a082c200f69f10c1d3951761a7e41d6e0 (patch) | |
tree | 5417f4a4198ccb5cf186460a079d872ff8728a3c /vcl/source/window/builder.cxx | |
parent | d97a819abe84fe667f8b136b1c2adaec5ca7196e (diff) |
move ManagedMenuButton to vcl
Change-Id: Ie2dd1635a5f5f677d286011a14b734af7435612a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107231
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/builder.cxx')
-rw-r--r-- | vcl/source/window/builder.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 6110f3460a9b..fa759ead51f8 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -57,6 +57,7 @@ #include <iconview.hxx> #include <svdata.hxx> #include <bitmaps.hlst> +#include <managedmenubutton.hxx> #include <messagedialog.hxx> #include <OptionalBox.hxx> #include <window.h> @@ -1958,6 +1959,16 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & // tdf#135495 fallback sfxlo-OptionalBox to VclOptionalBox as a stopgap xWindow = VclPtr<OptionalBox>::Create(pParent); } + else if (name == "svtlo-ManagedMenuButton") + { + // like tdf#135495 keep the name svtlo-ManagedMenuButton even though its a misnomer + // and is not dlsymed from the svt library + xWindow = VclPtr<ManagedMenuButton>::Create(pParent, WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_FLATBUTTON); + OUString sMenu = BuilderUtils::extractCustomProperty(rMap); + if (!sMenu.isEmpty()) + m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu); + setupFromActionName(static_cast<Button*>(xWindow.get()), rMap, m_xFrame); + } else if (name == "GtkIconView") { assert(rMap.find(OString("model")) != rMap.end() && "GtkIconView must have a model"); |