summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-05-25 22:33:46 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-05-26 08:56:40 +0200
commitbdcf20ada557ef85297869014e678743f41d0815 (patch)
tree0a21408d56cf5ba0892466cec2d12b1af0df8781
parenteb5b345172516b31ec43e226c242e536e93a3413 (diff)
Related: tdf#81757 Do not even try to re-enter ScDocShell::Do*Recalc()
That happened when loading bug doc https://bugs.documentfoundation.org/attachment.cgi?id=103462 where form selection events fire asynchronous recalcul() and BASIC Main also calls recalcul. Change-Id: Ic27fb340c7b5019453723c7cabe2122905d400f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116133 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 807f3508c9319d7f94820ea1282e306594418fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116152 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/source/ui/docshell/docsh4.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 111fb8262234..32e14f99eff4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1421,6 +1421,11 @@ bool ScDocShell::ExecuteChangeProtectionDialog( bool bJustQueryIfProtected )
void ScDocShell::DoRecalc( bool bApi )
{
+ if (m_aDocument.IsInDocShellRecalc())
+ {
+ SAL_WARN("sc","ScDocShell::DoRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
+ return;
+ }
ScDocShellRecalcGuard aGuard(m_aDocument);
bool bDone = false;
ScTabViewShell* pSh = GetBestViewShell();
@@ -1467,6 +1472,11 @@ void ScDocShell::DoRecalc( bool bApi )
void ScDocShell::DoHardRecalc()
{
+ if (m_aDocument.IsInDocShellRecalc())
+ {
+ SAL_WARN("sc","ScDocShell::DoHardRecalc tries re-entering while in Recalc; probably Forms->BASIC->Dispatcher.");
+ return;
+ }
auto start = std::chrono::steady_clock::now();
ScDocShellRecalcGuard aGuard(m_aDocument);
weld::WaitObject aWaitObj( GetActiveDialogParent() );