summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-07-01 07:20:53 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-07-02 16:39:06 +0000
commit6f4c31eb757cd19311b23ce06fdbbe9268f9cd16 (patch)
tree5d15efb845f5b878aaa3c2e2488bdd4002cb3239 /sc
parent7ea10bbd898f31565e5cdfb2612b1e8b22ed3809 (diff)
tdf#91641 adjust cursor when deleting preceding characters
IMDeleteSurrounding is used by input methods to take multiple keystrokes and convert them into a special character. Then the composing keystrokes are removed. Before this fix, the cursor placement was not adjusted, so the special character was inserted in the wrong position and if 3+ keystrokes were involved, the wrong characters were deleted. Also fixes "editLine should have focus on accessibleText init." The first time an accessibleEdit is created, it didnt recognize any focused text when editing in the "Input Line". Change-Id: Ib2608c46bba1c84bb49aa29619a004c125a3bf98 Reviewed-on: https://gerrit.libreoffice.org/16637 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 0020a70e89cd..99104991de5b 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -372,13 +372,21 @@ void ScAccessibleEditObject::CreateTextHelper()
::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleTextData)));
mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
mpTextHelper->SetEventSource(this);
- mpTextHelper->SetFocus(mbHasFocus);
+
+ const ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
+ if ( pInputHdl && pInputHdl->IsEditMode() )
+ {
+ mpTextHelper->SetFocus(true);
+ }
+ else
+ {
+ mpTextHelper->SetFocus(mbHasFocus);
+ }
// #i54814# activate cell in edit mode
if( meObjectType == CellInEditMode )
{
// do not activate cell object, if top edit line is active
- const ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if( pInputHdl && !pInputHdl->IsTopMode() )
{
SdrHint aHint( HINT_BEGEDIT );