summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 f716048d8399..9276a57ecfc6 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1426,6 +1426,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();
@@ -1472,6 +1477,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() );