diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-05-08 00:26:08 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-16 11:22:36 +0200 |
commit | 838725b62320c6f9aebdeb45558620952abb5bec (patch) | |
tree | 0e845414a77c4397c3d4d22a3069b507a8f996bd /sc/source | |
parent | 1c7e873dbca6235be66fe1e6a593b2acbd18b059 (diff) |
lok: sc: notify cell cursor position to address control in client
A new callback has been introduced for notifying the client:
LOK_CALLBACK_CELL_ADDRESS
Change-Id: I40b38a3cb8fb658c3f00332d56cfcbaf98e13771
Reviewed-on: https://gerrit.libreoffice.org/37357
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
(cherry picked from commit 9cc9300bc20e9367728aa4b7ec3a789fdd274aff)
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 241d866c365c..5006d3787f7d 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3660,7 +3660,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, } } - if ( pInputWin ) // Named range input + if ( pInputWin || comphelper::LibreOfficeKit::isActive()) // Named range input { OUString aPosStr; const ScAddress::Details aAddrDetails( &rDoc, aCursorPos ); @@ -3686,12 +3686,19 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, aPosStr = aCursorPos.Format(ScRefFlags::VALID | nFlags, &rDoc, aAddrDetails); } - // Disable the accessible VALUE_CHANGE event - bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false); - pInputWin->SetAccessibilityEventsSuppressed(true); - pInputWin->SetPosString(aPosStr); - pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed); - pInputWin->SetSumAssignMode(); + if (pInputWin) + { + // Disable the accessible VALUE_CHANGE event + bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false); + pInputWin->SetAccessibilityEventsSuppressed(true); + pInputWin->SetPosString(aPosStr); + pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed); + pInputWin->SetSumAssignMode(); + } + else if (pActiveViewSh) + { + pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_ADDRESS, aPosStr.toUtf8().getStr()); + } } if (bStopEditing) |