[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Thu Aug 11 17:36:00 UTC 2016


 sc/source/ui/docshell/docfunc.cxx |    3 +++
 sc/source/ui/view/viewfunc.cxx    |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 6fb5d747893038e0748f30c205e820850ff8e010
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Aug 11 19:31:52 2016 +0200

    Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()
    
    Change-Id: I6843b4fac175b646a6dd725f5591c49e960a5f18

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 46f18cd..6955029 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 5f23f4f..1ce3e29 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);


More information about the Libreoffice-commits mailing list