summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2013-05-06 14:20:11 +0900
committerTor Lillqvist <tml@iki.fi>2013-05-13 05:14:37 +0000
commit57b5ed51d46fd5673dfe35125ceffa71d39f133d (patch)
treec6dcc9991647a7869451a15ba436cb7443f1dc06 /sc
parentc0417e82174297ace604c68fc577c831929f3573 (diff)
Support IMR_QUERYCHARPOSITION in Writer and Calc.
IMR_QUERYCHARPOSITION is one of optional but fundamental request message sent from IMEs to application. This message is used for retrieving the positional information for each character in a composition text especially when the composition text is drawn by the application. This information is critical for IMEs to align suggestion window with the composition text. Change-Id: I53a344a78688060004cc8bcbbf1127f22a468e20 Reviewed-on: https://gerrit.libreoffice.org/3849 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputhdl.cxx15
-rw-r--r--sc/source/ui/view/gridwin.cxx3
2 files changed, 17 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b3bd84a5ba26..9baa6cc36eda 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3351,6 +3351,21 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
}
}
}
+ else if ( rCEvt.GetCommand() == COMMAND_QUERYCHARPOSITION )
+ {
+ if ( eMode != SC_INPUT_NONE )
+ {
+ UpdateActiveView();
+ if (pTableView || pTopView)
+ {
+ if (pTableView)
+ pTableView->Command( rCEvt );
+ else if (pTopView) // call only once
+ pTopView->Command( rCEvt );
+ bUsed = true;
+ }
+ }
+ }
else
{
if ( bForce || eMode != SC_INPUT_NONE )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index cb9c09f19788..86cddf2526c9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2813,7 +2813,8 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if ( nCmd == COMMAND_STARTEXTTEXTINPUT ||
nCmd == COMMAND_ENDEXTTEXTINPUT ||
nCmd == COMMAND_EXTTEXTINPUT ||
- nCmd == COMMAND_CURSORPOS )
+ nCmd == COMMAND_CURSORPOS ||
+ nCmd == COMMAND_QUERYCHARPOSITION )
{
sal_Bool bEditView = pViewData->HasEditView( eWhich );
if (!bEditView)