[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 31 10:15:14 UTC 2020
sfx2/source/notebookbar/SfxNotebookBar.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 5ca41b36d8d49882d51386da9f41135bfdc9257a
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jul 31 11:30:21 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jul 31 12:14:43 2020 +0200
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 at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index a3ef7e7aa2fd..5bd8e03f698b 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -370,6 +370,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;
More information about the Libreoffice-commits
mailing list