diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-11 19:31:52 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-11 20:16:26 +0000 |
commit | 282e9a69c92d4c616e3e8f71ffe1149e19ae1655 (patch) | |
tree | 1a389dadf78b24232ece19a1bc1c232297577682 | |
parent | 2f02999c360a4fc55cd5f59eac2beeea630adf32 (diff) |
Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()
Change-Id: I6843b4fac175b646a6dd725f5591c49e960a5f18
(cherry picked from commit 6fb5d747893038e0748f30c205e820850ff8e010)
Reviewed-on: https://gerrit.libreoffice.org/28061
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 40cc3d982ed9..6fe32df1e233 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -4060,6 +4060,9 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, const ScTokenArray* pTokenArray, const OUString& rString, bool bApi, bool bEnglish, const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { + if (ScViewData::SelectionFillDOOM( rRange )) + return false; + ScDocShellModificator aModificator( rDocShell ); bool bSuccess = false; diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 649c384e6347..03109577f6aa 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -739,6 +739,8 @@ void ScViewFunc::EnterDataAtCursor( const OUString& rString ) void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar::Grammar eGram ) { ScViewData& rData = GetViewData(); + const SCCOL nCol = rData.GetCurX(); + const SCROW nRow = rData.GetCurY(); const ScMarkData& rMark = rData.GetMarkData(); if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) { @@ -746,8 +748,6 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar // with size of result formula to get the size ScDocument* pDoc = rData.GetDocument(); - SCCOL nCol = rData.GetCurX(); - SCROW nRow = rData.GetCurY(); SCTAB nTab = rData.GetTabNo(); ScFormulaCell aFormCell( pDoc, ScAddress(nCol,nRow,nTab), rString, eGram, MM_FORMULA ); @@ -773,6 +773,8 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar aRange, &rMark, nullptr, rString, false, false, EMPTY_OUSTRING, eGram ); if (bSuccess) pDocSh->UpdateOle(&GetViewData()); + else + PaintArea(nCol, nRow, nCol, nRow); // possibly the edit-engine is still painted there } else ErrorMessage(STR_NOMULTISELECT); |