diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-04 12:05:16 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-06 10:04:31 +0100 |
commit | 6bf428d354349995f7a20e6ce38a47c238911abe (patch) | |
tree | eedc0818a882e4b49e146b0d4417ef421d1aff75 /compilerplugins | |
parent | e0334e1a77ec080b38952ea64b394c8652af851c (diff) |
lok: notebookbar: handle multiple sessions
This fixes regression from commit db5a78c8ab1eae30e442151f07b0dc4dcd017550
lok: notebookbar: don't recreate toolbars too often
When we had 2 sessions with notebookbar and one of them switched
to compact mode - other session's notebookbar didn't work.
Before previous change we recreated notebookbar and its welded wrapper
on every StateMethod call for LOK case. So when it become destroyed
we made it working again. But now we need to introduce better management
and not rely on single instence we get from SystemWindow.
Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK
case as when other view will turn notebookbar off, but QueryState
will be trigerred in our session - we will think that it should be
destroyed (it reads config state which is shared between views).
So trust only "true" value (it happens after calling SID_TOOLBAR_MODE),
but destroy notebookbar only after explicit call of
SfxNotebookBar::CloseMethod. It seems to have good result when tested
with multiple views in Online. Maybe we can track Notebookbar state
per view later to make things simpler in LOK case.
Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/badstatics.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx index f22dabac9b48..328218086453 100644 --- a/compilerplugins/clang/badstatics.cxx +++ b/compilerplugins/clang/badstatics.cxx @@ -211,6 +211,7 @@ public: || name == "s_aLOKWeldBuildersMap" // LOK only, similar case as above || name == "s_aLOKPopupsMap" // LOK only, similar case as above || name == "m_pNotebookBarWeldedWrapper" // LOK only, warning about map's key, no VCL cleanup performed + || name == "m_pNotebookBarInstance" // LOK only case, when notebookbar is closed - VclPtr instance is removed || name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers || name == "aThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning || name == "aNonThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning |