From 63ba54a168dbc777cdcec2393be476bdd5f79bc1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 9 May 2016 17:07:54 +0200 Subject: convert EXTTEXTINPUT_ATTR to scoped enum Change-Id: I94706bdea91d367fc8c2bbd482f6b4d8f55449d7 Reviewed-on: https://gerrit.libreoffice.org/24821 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/unx/gtk3/gtk3gtkframe.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vcl/unx/gtk3') diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 2630aa19f2a2..b6352c694ca5 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3794,7 +3794,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ pThis->m_aInputEvent.mnCursorFlags = 0; pThis->m_aInputEvent.mbOnlyCursor = False; - pThis->m_aInputFlags = std::vector( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), 0 ); + pThis->m_aInputFlags = std::vector( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), ExtTextInputAttr::NONE ); PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs); do @@ -3802,7 +3802,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ GSList *attr_list = nullptr; GSList *tmp_list = nullptr; gint start, end; - guint sal_attr = 0; + ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE; pango_attr_iterator_range (iter, &start, &end); if (end == G_MAXINT) @@ -3821,14 +3821,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ switch (pango_attr->klass->type) { case PANGO_ATTR_BACKGROUND: - sal_attr |= EXTTEXTINPUT_ATTR_HIGHLIGHT; + sal_attr |= ExtTextInputAttr::Highlight; pThis->m_aInputEvent.mnCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE; break; case PANGO_ATTR_UNDERLINE: - sal_attr |= EXTTEXTINPUT_ATTR_UNDERLINE; + sal_attr |= ExtTextInputAttr::Underline; break; case PANGO_ATTR_STRIKETHROUGH: - sal_attr |= EXTTEXTINPUT_ATTR_REDTEXT; + sal_attr |= ExtTextInputAttr::RedText; break; default: break; @@ -3836,8 +3836,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ pango_attribute_destroy (pango_attr); tmp_list = tmp_list->next; } - if (sal_attr == 0) - sal_attr |= EXTTEXTINPUT_ATTR_UNDERLINE; + if (sal_attr == ExtTextInputAttr::NONE) + sal_attr |= ExtTextInputAttr::Underline; g_slist_free (attr_list); // Set the sal attributes on our text -- cgit