summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2016-02-29 16:20:21 +0100
committerEike Rathke <erack@redhat.com>2016-03-11 22:55:07 +0000
commit8dd5dbbb6ef27e7e5405e38761576a61f11a3b19 (patch)
tree308870cc90bddd767701de56e007e1e5c85daa1f
parent7bc97db5b972f27693161beb9182f8a5850f5551 (diff)
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 <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/ui/docshell/docsh4.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 62b27d8eb215..1332e29190a4 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);