summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-12-12 23:13:18 -0500
committerNoel Power <noel.power@novell.com>2011-12-13 13:06:03 +0000
commit43c7830b03d141ae11d8617c0fdabefa32dd243c (patch)
treee5effd7a26d16caa920a2c50a11808e47a78ebbd
parentbcdea3b379637a98e5bbc304078149ca6c2b6e03 (diff)
Don't crash when typing Japanese via SCIM.
There should only be one active edit view while the user is typing into a cell, or else it crashes when an external input method is being used to input values (such as Japanese).
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 98cfac2891c0..7620df7e470b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1719,7 +1719,7 @@ void ScInputHandler::UpdateActiveView()
else
pTableView = NULL;
- if (pInputWin)
+ if (pInputWin && pInputWin->IsInputActive())
pTopView = pInputWin->GetEditView();
else
pTopView = NULL;
@@ -2047,7 +2047,7 @@ void ScInputHandler::SyncViews( EditView* pSourceView )
lcl_SetTopSelection( pTableView, aSel );
}
// Only sync selection from topView if we are actually editiing there
- else if ( ( eMode == SC_INPUT_TOP ) && pTopView && pTableView)
+ else if (pTopView && pTableView)
{
aSel = pTopView->GetSelection();
lcl_SetTopSelection( pTableView, aSel );