summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-12-07 15:19:45 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-12-13 15:58:14 +0100
commit62600f404b5fbecee3958d15722388e5ab49a71e (patch)
tree559cf022e22df2e7003768e50b919141d98128f6 /sc
parentecfb83d7463bed7c89baeccc03286c1ac9956d70 (diff)
tdf#121699 sc: wrap LOKit stuff with isActive
This is a partial revert of LO 6.1 commit 009d2756b1678477ec23d5647bd5004c4bff3a62. It is one thing to change code that you don't really know why it is setup that way, but it is another thing to ignore the resulting regression reports for 3 years. Not impressed. It look me only 1 hour to work through this, and this is completely outside of my normal line of programming. Change-Id: I8671677f38cc1332c6c5a76847801e2680097048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126500 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit a99aea61c3199dc8188d4d873a10201082dff2e2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126686 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 7e310d12cb45..20b2d7318df4 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -458,6 +458,28 @@ void ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
void ScFormulaReferenceHelper::SetDispatcherLock( bool bLock )
{
+ if (!comphelper::LibreOfficeKit::isActive())
+ {
+ // lock / unlock only the dispatchers of Calc documents
+ ScDocShell* pDocShell = static_cast<ScDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<ScDocShell>));
+ while (pDocShell)
+ {
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst(pDocShell);
+ while (pFrame)
+ {
+ SfxDispatcher* pDisp = pFrame->GetDispatcher();
+ if (pDisp)
+ pDisp->Lock(bLock);
+ pFrame = SfxViewFrame::GetNext(*pFrame, pDocShell);
+ }
+ pDocShell = static_cast<ScDocShell*>(SfxObjectShell::GetNext(*pDocShell, checkSfxObjectShell<ScDocShell>));
+ }
+ return;
+ // if a new view is created while the dialog is open,
+ // that view's dispatcher is locked when trying to create the dialog
+ // for that view (ScTabViewShell::CreateRefDialog)
+ }
+
// lock / unlock only the dispatcher of Calc document
SfxDispatcher* pDisp = nullptr;
if ( m_pBindings )