Kaydet (Commit) 8dd5dbbb authored tarafından Winfried Donkers's avatar Winfried Donkers Kaydeden (comit) Eike Rathke

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/22772Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 7bc97db5
...@@ -98,6 +98,7 @@ using namespace ::com::sun::star; ...@@ -98,6 +98,7 @@ using namespace ::com::sun::star;
#include "sharedocdlg.hxx" #include "sharedocdlg.hxx"
#include "conditio.hxx" #include "conditio.hxx"
#include "sheetevents.hxx" #include "sheetevents.hxx"
#include "formulacell.hxx"
#include <documentlinkmgr.hxx> #include <documentlinkmgr.hxx>
#include <memory> #include <memory>
...@@ -1205,9 +1206,9 @@ void ScDocShell::DoRecalc( bool bApi ) ...@@ -1205,9 +1206,9 @@ void ScDocShell::DoRecalc( bool bApi )
{ {
bool bDone = false; bool bDone = false;
ScTabViewShell* pSh = GetBestViewShell(); ScTabViewShell* pSh = GetBestViewShell();
ScInputHandler* pHdl = ( pSh ? SC_MOD()->GetInputHdl( pSh ) : nullptr );
if ( pSh ) if ( pSh )
{ {
ScInputHandler* pHdl = SC_MOD()->GetInputHdl(pSh);
if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi ) if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi )
{ {
pHdl->FormulaPreview(); // Teilergebnis als QuickHelp pHdl->FormulaPreview(); // Teilergebnis als QuickHelp
...@@ -1222,6 +1223,13 @@ void ScDocShell::DoRecalc( bool bApi ) ...@@ -1222,6 +1223,13 @@ void ScDocShell::DoRecalc( bool bApi )
if (!bDone) // sonst Dokument neu berechnen if (!bDone) // sonst Dokument neu berechnen
{ {
WaitObject aWaitObj( GetActiveDialogParent() ); 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(); aDocument.CalcFormulaTree();
if ( pSh ) if ( pSh )
pSh->UpdateCharts(true); pSh->UpdateCharts(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment