sfx2/source/notebookbar/SfxNotebookBar.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 5ca41b36d8d49882d51386da9f41135bfdc9257a
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Fri Jul 31 11:30:21 2020 +0200
Commit:     Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to