summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-05-30 07:17:32 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-06-02 08:03:52 +0000
commit8bf66416a834a503309d4d0f3298d65f321f360e (patch)
tree9f546f9a21665ca7b349d3b2a1685754e25d10ca
parent32fc5f1605dc2ce224074e88bea6aa548d450287 (diff)
tdf#91641 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: I5aff199c10313d9c51ea15541a825cfbfd7ad374 Reviewed-on: https://gerrit.libreoffice.org/15962 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 e975bd527912..c68816548c6f 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 );