diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-16 08:48:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-16 15:00:16 +0200 |
commit | 3b8fb0ba187ad8b0a5eb6102dcfd982aee6db9f5 (patch) | |
tree | 82faf58375583e838834b6291314043a00499dd9 /vcl/unx/gtk4 | |
parent | 1178d2978d3328de0bf0bccb9920fbc8b9a3a414 (diff) |
gtk 4.3.2 will have a fix for this
Change-Id: Idae818c0d7220d0fbe08462eff1654c22d24310c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117284
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk4')
-rw-r--r-- | vcl/unx/gtk4/convert3to4.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index ce9af84251d5..0e8c697ee753 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -1341,13 +1341,16 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode xNode->removeChild(xRemove); // https://gitlab.gnome.org/GNOME/gtk/-/issues/4041 double encode ampersands if use-underline is used - if (xPropertyLabel && bUseUnderline) + if (gtk_check_version(4, 3, 2) != nullptr) { - OString sText = xPropertyLabel->getFirstChild()->getNodeValue().toUtf8(); - gchar* pText = g_markup_escape_text(sText.getStr(), sText.getLength()); - xPropertyLabel->getFirstChild()->setNodeValue( - OUString(pText, strlen(pText), RTL_TEXTENCODING_UTF8)); - g_free(pText); + if (xPropertyLabel && bUseUnderline) + { + OString sText = xPropertyLabel->getFirstChild()->getNodeValue().toUtf8(); + gchar* pText = g_markup_escape_text(sText.getStr(), sText.getLength()); + xPropertyLabel->getFirstChild()->setNodeValue( + OUString(pText, strlen(pText), RTL_TEXTENCODING_UTF8)); + g_free(pText); + } } return ConvertResult(bChildCanFocus, bHasVisible, bHasIconSize, bAlwaysShowImage, bUseUnderline, |