summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-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);