Resolves: rhbz#1712823 crash in extended tooltips over pattern editor

f41
Caolán McNamara 6 years ago
parent 8a7ff77247
commit e9abb43448

@ -0,0 +1,80 @@
From 623ad17227406b30e53436046831c43f160a6486 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 29 Mar 2019 15:23:28 +0000
Subject: [PATCH] Resolves: rhbz#1712823 prefer help strings to a11y strings
when available
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reviewed-on: https://gerrit.libreoffice.org/69934
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit b70053ba681a9b62afd6fa700ad94256d98d8dc7)
Change-Id: I50b36f697b8dd9ff8108392d48a7050702edbfbe
---
vcl/unx/gtk3/gtk3gtkinst.cxx | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index a69e4df05806..5123db7c9f2e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6514,6 +6514,13 @@ public:
return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
}
+ virtual OUString get_accessible_description() const override
+ {
+ AtkObject* pAtkObject = default_drawing_area_get_accessible(m_pWidget);
+ const char* pStr = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
+ return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
+ }
+
virtual ~GtkInstanceDrawingArea() override
{
g_object_steal_data(G_OBJECT(m_pDrawingArea), "g-lo-GtkInstanceDrawingArea");
@@ -7579,16 +7586,7 @@ namespace
const ImplSVData* pSVData = ImplGetSVData();
if (pSVData->maHelpData.mbBalloonHelp)
{
- /*This is how I would prefer things to be, only a few like this though*/
- AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
- const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
- if (pDesc)
- {
- gtk_tooltip_set_text(tooltip, pDesc);
- return true;
- }
-
- /*So fallback to existing mechanism which needs help installed*/
+ /*Current mechanism which needs help installed*/
OString sHelpId = ::get_help_id(pWidget);
Help* pHelp = !sHelpId.isEmpty() ? Application::GetHelp() : nullptr;
if (pHelp)
@@ -7600,10 +7598,19 @@ namespace
return true;
}
}
+
+ /*This is how I would prefer things to be, only a few like this though*/
+ AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
+ const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
+ if (pDesc && pDesc[0])
+ {
+ gtk_tooltip_set_text(tooltip, pDesc);
+ return true;
+ }
}
const char* pDesc = gtk_widget_get_tooltip_text(pWidget);
- if (pDesc)
+ if (pDesc && pDesc[0])
{
gtk_tooltip_set_text(tooltip, pDesc);
return true;
--
2.21.0

@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
Release: 3%{?libo_prerelease}%{?dist}
Release: 4%{?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
URL: http://www.libreoffice.org/
@ -245,6 +245,8 @@ Patch2: 0001-rhbz-1690732-basic-font-variation-support.patch
Patch3: 0001-rhbz-1699347-__glibcxx_requires_subscript-enabled-in.patch
Patch4: 0001-no-home-as-templates.patch
Patch5: 0001-Resolves-rhbz-1702810-Prepare-for-upcoming-libebook-.patch
Patch6: 0001-Resolves-rhbz-1712823-prefer-help-strings-to-a11y-st.patch
Patch7: 0001-Resolves-tdf-125099-round-duration-results-in-interp.patch
%if 0%{?rhel}
# not upstreamed
@ -2134,7 +2136,11 @@ done
%{_includedir}/LibreOfficeKit
%changelog
* Thu May 21 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-3
* Thu May 23 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-4
- Resolves: rhbz#1712823 crash in extended tooltips over pattern editor
- Resolves: rhbz#1711143 calc not rounding time calculation correctly
* Tue May 21 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-3
- rebuild for e-d-s
* Thu May 02 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-2

Loading…
Cancel
Save