summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-08-11 19:31:52 +0200
committerEike Rathke <erack@redhat.com>2016-08-11 19:35:21 +0200
commit6fb5d747893038e0748f30c205e820850ff8e010 (patch)
treed6ecf2adb629f15d0ec448560a06b06e85aa424a
parent176111160ddfbe4b6b36b300062bab156d46b211 (diff)
Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()
Change-Id: I6843b4fac175b646a6dd725f5591c49e960a5f18
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/view/viewfunc.cxx6
2 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 46f18cd2b593..69550297d555 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4070,6 +4070,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 5f23f4ff4f3e..1ce3e29996ea 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);