diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2016-11-23 17:30:46 -0500 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:08:03 -0500 |
commit | ffc985f6a6de909aad51fb985fd824dc185eea61 (patch) | |
tree | 5ff9f525f6aae8c6423b7a7ef26b7c8e5e08433e | |
parent | a489dfa2e24587cbac62466355ac25e826eac667 (diff) |
Reduce the indirection count...
... by getting the input handler instance directly from the view
shell that owns it.
Change-Id: I3b6e74285f64457d694db05d591461b291fa34c5
(cherry picked from commit d33a81c24ec0b4a05eb0b69fa85c5fd7eb8ec5a7)
(cherry picked from commit a5f343faf122e55d4c955892172e78b0d19b71f5)
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index d290deb6357c..902c1f72c96b 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1107,7 +1107,9 @@ void ScTextWnd::StartEditEngine() InitEditEngine(); } - SC_MOD()->SetInputMode( SC_INPUT_TOP ); + ScInputHandler* pHdl = mpViewShell->GetInputHandler(); + if (pHdl) + pHdl->SetMode(SC_INPUT_TOP); SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) @@ -1557,8 +1559,10 @@ void ScTextWnd::StopEditEngine( bool bAll ) mpEditView.reset(); mpEditEngine.reset(); - if ( pScMod->IsEditMode() && !bAll ) - pScMod->SetInputMode(SC_INPUT_TABLE); + ScInputHandler* pHdl = mpViewShell->GetInputHandler(); + + if (pHdl && pHdl->IsEditMode() && !bAll) + pHdl->SetMode(SC_INPUT_TABLE); SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) |