sc/source/ui/docshell/docsh4.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 8dd5dbbb6ef27e7e5405e38761576a61f11a3b19
Author: Winfried Donkers <winfrieddonk...@libreoffice.org>
Date:   Mon Feb 29 16:20:21 2016 +0100

    tdf#97897 (first problem) fix for not recalculating on F9.
    
    Set current formulacell to dirty to enforce recalculation.
    
    Change-Id: Ie02b6a5ce7df57e6acca2fa3854cab883834af69
    Reviewed-on: https://gerrit.libreoffice.org/22772
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 62b27d8..1332e29 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -98,6 +98,7 @@ using namespace ::com::sun::star;
 #include "sharedocdlg.hxx"
 #include "conditio.hxx"
 #include "sheetevents.hxx"
+#include "formulacell.hxx"
 #include <documentlinkmgr.hxx>
 #include <memory>
 
@@ -1205,9 +1206,9 @@ void ScDocShell::DoRecalc( bool bApi )
 {
     bool bDone = false;
     ScTabViewShell* pSh = GetBestViewShell();
+    ScInputHandler* pHdl = ( pSh ? SC_MOD()->GetInputHdl( pSh ) : nullptr );
     if ( pSh )
     {
-        ScInputHandler* pHdl = SC_MOD()->GetInputHdl(pSh);
         if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi )
         {
             pHdl->FormulaPreview();     // Teilergebnis als QuickHelp
@@ -1222,6 +1223,13 @@ void ScDocShell::DoRecalc( bool bApi )
     if (!bDone)                         // sonst Dokument neu berechnen
     {
         WaitObject aWaitObj( GetActiveDialogParent() );
+        if ( pHdl )
+        {
+            // tdf97897 set current cell to Dirty to force recalculation of 
cell
+            ScFormulaCell* pFC = aDocument.GetFormulaCell( 
pHdl->GetCursorPos());
+            if (pFC)
+                pFC->SetDirty();
+        }
         aDocument.CalcFormulaTree();
         if ( pSh )
             pSh->UpdateCharts(true);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to