diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-02-09 17:33:30 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-02-10 21:03:57 +0100 |
commit | d2dfda8aba7701d19001d7a080d965a83e30443f (patch) | |
tree | 46d6238959486b8804124c8f3180e9302a43bd5e /cui | |
parent | 37187ecf8c2e5c5d9333a672206a1d4cb2ea1b57 (diff) |
Always checking for Master document command labels makes no sense
Change-Id: I33d04da63c5e30d166bd22f9fc7ffb5aa4da5c6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88343
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxNotebookbarConfigPage.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index c8270b941385..2d6bdca787b1 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -221,15 +221,13 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, weld::TreeView& rTreeView, weld::TreeIter& rIter, int nStartCol) { - css::uno::Reference<css::container::XNameAccess> m_xCommandToLabelMap, - m_xGlobalCommandToLabelMap; + css::uno::Reference<css::container::XNameAccess> m_xCommandToLabelMap; uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); uno::Reference<container::XNameAccess> xNameAccess( css::frame::theUICommandDescription::get(xContext)); - uno::Sequence<beans::PropertyValue> aPropSeq, aGlobalPropSeq; + uno::Sequence<beans::PropertyValue> aPropSeq; - xNameAccess->getByName("com.sun.star.text.GlobalDocument") >>= m_xGlobalCommandToLabelMap; xNameAccess->getByName(getModuleId(m_sAppName)) >>= m_xCommandToLabelMap; try @@ -242,23 +240,10 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, { } - try - { - uno::Any aGlobalVal = m_xGlobalCommandToLabelMap->getByName(sUIItemCommand); - aGlobalVal >>= aGlobalPropSeq; - } - catch (container::NoSuchElementException&) - { - } - OUString aLabel; for (sal_Int32 i = 0; i < aPropSeq.getLength(); ++i) if (aPropSeq[i].Name == "Name") aPropSeq[i].Value >>= aLabel; - if (aLabel.isEmpty()) - for (sal_Int32 i = 0; i < aGlobalPropSeq.getLength(); ++i) - if (aGlobalPropSeq[i].Name == "Name") - aGlobalPropSeq[i].Value >>= aLabel; OUString aName = SvxConfigPageHelper::stripHotKey(aLabel); |