Resolves: rhbz#1671340 extended tooltips not working in impress navigator

f41
Caolán McNamara 6 years ago
parent 735ab2caf6
commit aec7c74062

@ -0,0 +1,68 @@
From 429f80910484079e4ef10ca904710e40a14ed3c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 19 Dec 2018 11:56:23 +0000
Subject: [PATCH] Resolves: tdf#105602 fix extended help for non-dispatchable
toolbox commands
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I832a043ca5ae3a4030b9ac22447cecfabd3650c0
Reviewed-on: https://gerrit.libreoffice.org/65422
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
vcl/source/window/builder.cxx | 2 +-
vcl/source/window/toolbox.cxx | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ba0281bacc4c..857bf71f34ca 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2121,9 +2121,9 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
//TODO: ImplToolItems::size_type -> sal_uInt16!
pToolBox->InsertItem(nItemId, extractLabel(rMap), nBits);
pToolBox->SetItemCommand(nItemId, aCommand);
- pToolBox->SetHelpId(nItemId, m_sHelpRoot + id);
}
+ pToolBox->SetHelpId(nItemId, m_sHelpRoot + id);
OUString sTooltip(extractTooltipText(rMap));
if (!sTooltip.isEmpty())
pToolBox->SetQuickHelpText(nItemId, sTooltip);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 824f216ccf0c..4d203c6b9186 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3792,6 +3792,17 @@ void ToolBox::Resize()
}
}
+namespace
+{
+ bool DispatchableCommand(const OUString& rName)
+ {
+ return rName.startsWith(".uno") ||
+ rName.startsWith("slot:") ||
+ rName.startsWith("macro:") ||
+ rName.startsWith("vnd.sun.star.script");
+ }
+}
+
const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -3803,7 +3814,7 @@ const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- if ( pItem->maCommandStr.getLength() )
+ if (DispatchableCommand(pItem->maCommandStr))
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this );
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
--
2.20.1

@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.2 Version: %{libo_version}.2
Release: 4%{?libo_prerelease}%{?dist} Release: 5%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
URL: http://www.libreoffice.org/ URL: http://www.libreoffice.org/
@ -241,6 +241,7 @@ Patch3: 0001-Update-orcus-to-0.14.0.patch
Patch4: 0001-tdf-121855-like-osx-case-don-t-search-near-infinite-.patch Patch4: 0001-tdf-121855-like-osx-case-don-t-search-near-infinite-.patch
Patch5: 0001-Fix-build-with-poppler-0.73.0.patch Patch5: 0001-Fix-build-with-poppler-0.73.0.patch
Patch6: 0001-Upgrade-external-boost-to-Boost-1.69.0.patch Patch6: 0001-Upgrade-external-boost-to-Boost-1.69.0.patch
Patch7: 0001-Resolves-tdf-105602-fix-extended-help-for-non-dispat.patch
%if 0%{?rhel} %if 0%{?rhel}
# not upstreamed # not upstreamed
@ -2173,6 +2174,9 @@ done
%{_includedir}/LibreOfficeKit %{_includedir}/LibreOfficeKit
%changelog %changelog
* Fri Feb 01 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.1.4.2-5
- Resolves: rhbz#1671340 extended tooltips not working in impress navigator
* Thu Jan 31 2019 Kalev Lember <klember@redhat.com> - 1:6.1.4.2-4 * Thu Jan 31 2019 Kalev Lember <klember@redhat.com> - 1:6.1.4.2-4
- Rebuilt for Boost 1.69 - Rebuilt for Boost 1.69

Loading…
Cancel
Save