summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-19 11:16:15 +0000
committerMichael Meeks <michael.meeks@collabora.com>2020-01-02 12:04:01 +0100
commit0778991057fd4592aacc193a5a30a0ee09a8be18 (patch)
treec7d7b5f3e04d6fcc17917083c67e4afba45574b0 /svx
parent8d3548e9f05d9ea9fd7880ffe217257cdf5c8585 (diff)
sidebar: bring new sidebar commands in-house & be more assertive with sfx2
Force the sidebar to do it's asynchronous things synchronously to help keep things sane. Also emit our (in-process on Android / iOS) context change notification after everyone else got it & updated their panels. Change-Id: If94de6c83f1b783d7deee515fc2ee9a8d3754765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86088 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/ContextChangeEventMultiplexer.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
index 321a56c5024e..af804342fa34 100644
--- a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
+++ b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
@@ -39,13 +39,6 @@ void ContextChangeEventMultiplexer::NotifyContextChange (
{
if (rxController.is() && rxController->getFrame().is())
{
- // notify the LOK too
- if (comphelper::LibreOfficeKit::isActive())
- {
- if (SfxViewShell* pViewShell = SfxViewShell::Get(rxController))
- SfxLokHelper::notifyContextChange(pViewShell, GetModuleName(rxController->getFrame()), vcl::EnumContext::GetContextName(eContext));
- }
-
const css::ui::ContextChangeEventObject aEvent(
rxController,
GetModuleName(rxController->getFrame()),
@@ -56,6 +49,13 @@ void ContextChangeEventMultiplexer::NotifyContextChange (
::comphelper::getProcessComponentContext()));
if (xMultiplexer.is())
xMultiplexer->broadcastContextChangeEvent(aEvent, rxController);
+
+ // notify the LOK too after all the change have taken effect.
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ if (SfxViewShell* pViewShell = SfxViewShell::Get(rxController))
+ SfxLokHelper::notifyContextChange(pViewShell, GetModuleName(rxController->getFrame()), vcl::EnumContext::GetContextName(eContext));
+ }
}
}