summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-03 10:08:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-03 18:18:35 +0100
commit57e0b4344111431e0a26622920b35dfc7d9e8ff8 (patch)
tree213c627aa6d9f4e9cf582b7047cb3a911d12c537 /vcl/unx
parent6f77eda1f4de7f2835a32dd597442a29fe59291c (diff)
Related: tdf#149932 honour PANGO_UNDERLINE_NONE for preedit underline
at least don't show an underline for PANGO_UNDERLINE_NONE Change-Id: I190f44e1dfb7da1c663ce588973278d0da591c46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142222 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtkframe.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 33a42787ab4c..d937e8eddd9f 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -5712,8 +5712,12 @@ OUString GtkSalFrame::GetPreeditDetails(GtkIMContext* pIMContext, std::vector<Ex
rCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE;
break;
case PANGO_ATTR_UNDERLINE:
- sal_attr |= ExtTextInputAttr::Underline;
+ {
+ PangoAttrInt* pango_underline = reinterpret_cast<PangoAttrInt*>(pango_attr);
+ if (pango_underline->value != PANGO_UNDERLINE_NONE)
+ sal_attr |= ExtTextInputAttr::Underline;
break;
+ }
case PANGO_ATTR_STRIKETHROUGH:
sal_attr |= ExtTextInputAttr::RedText;
break;
@@ -5723,7 +5727,7 @@ OUString GtkSalFrame::GetPreeditDetails(GtkIMContext* pIMContext, std::vector<Ex
pango_attribute_destroy (pango_attr);
tmp_list = tmp_list->next;
}
- if (sal_attr == ExtTextInputAttr::NONE)
+ if (!attr_list)
sal_attr |= ExtTextInputAttr::Underline;
g_slist_free (attr_list);