[Libreoffice-commits] core.git: cui/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 10 20:04:37 UTC 2020
cui/source/customize/SvxNotebookbarConfigPage.cxx | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
New commits:
commit d2dfda8aba7701d19001d7a080d965a83e30443f
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Sun Feb 9 17:33:30 2020 +0200
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Mon Feb 10 21:03:57 2020 +0100
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 at gmail.com>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
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);
More information about the Libreoffice-commits
mailing list