diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-07-31 11:30:21 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-07-31 14:17:19 +0200 |
commit | 42cc32c95db2484961a65c906af1a899c1a6aa2b (patch) | |
tree | 890608a8fdd664d50b701d156b3de9b705c340df /sfx2 | |
parent | e5d6351f23c750a351fcb9872b1c582d5327a85f (diff) |
Notebookbar: skip early init
This will prevent us from hanging in the start
center during notebookbar initialization.
Also prevents from bugs due to uno state querying
too early: eg. Paste Special was not working in LOK.
Change-Id: I0ac619a4c8b629eced0eb6ba6992897569f7263a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99856
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 5ca41b36d8d49882d51386da9f41135bfdc9257a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99837
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/notebookbar/SfxNotebookBar.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index ab2bc145f7de..41d6522c5456 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -366,6 +366,17 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || !pNotebookBar->IsVisible() || bReloadNotebookbar || comphelper::LibreOfficeKit::isActive()) { + // Notebookbar was loaded too early what caused: + // * little hang in the start center on desktop + // * in LOK: Paste Special feature was incorrectly initialized + // Skip first request so Notebookbar will be initialized after document was loaded + static bool bSkipFirstInit = true; + if (bSkipFirstInit) + { + bSkipFirstInit = false; + return false; + } + RemoveListeners(pSysWindow); OUString aBuf = rUIFile + sFile; |