Kaydet (Commit) f2ee5326 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

tdf#122459 Qt5 IM underline pre-edit

This simply always underlines the pre-edit text, so it'S easier to
see what text block is currently IM edited.

Change-Id: I45145e4faa872c44eb6583ac6f335dd40fe3e53e
Reviewed-on: https://gerrit.libreoffice.org/65856
Tested-by: Jenkins
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst dd0b559d
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <cairo.h> #include <cairo.h>
#include <headless/svpgdi.hxx> #include <headless/svpgdi.hxx>
#include <vcl/commandevent.hxx>
void Qt5Widget::paintEvent(QPaintEvent* pEvent) void Qt5Widget::paintEvent(QPaintEvent* pEvent)
{ {
...@@ -449,6 +450,10 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent) ...@@ -449,6 +450,10 @@ void Qt5Widget::inputMethodEvent(QInputMethodEvent* pEvent)
{ {
aInputEvent.maText = toOUString(pEvent->preeditString()); aInputEvent.maText = toOUString(pEvent->preeditString());
aInputEvent.mnCursorPos = 0; aInputEvent.mnCursorPos = 0;
sal_Int32 nLength = aInputEvent.maText.getLength();
std::vector<ExtTextInputAttr> aTextAttrs(nLength, ExtTextInputAttr::Underline);
if (nLength)
aInputEvent.mpTextAttr = &aTextAttrs[0];
m_pFrame->CallCallback(SalEvent::ExtTextInput, &aInputEvent); m_pFrame->CallCallback(SalEvent::ExtTextInput, &aInputEvent);
pEvent->accept(); pEvent->accept();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment