[Libreoffice-commits] core.git: 2 commits - canvas/source sfx2/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 31 12:17:52 UTC 2020


 canvas/source/cairo/cairo_canvas.cxx       |    8 +++++++-
 sfx2/source/notebookbar/SfxNotebookBar.cxx |   11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 42cc32c95db2484961a65c906af1a899c1a6aa2b
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 14:17:19 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>
    (cherry picked from commit 5ca41b36d8d49882d51386da9f41135bfdc9257a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99837
    Tested-by: Jenkins

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;
commit e5d6351f23c750a351fcb9872b1c582d5327a85f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 31 12:44:02 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 31 14:17:09 2020 +0200

    fix leak in CppunitTest_cppcanvas_test
    
    Change-Id: Iecdbbec18a8d88872878a8fa9a17f7040677384c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99863
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 02ab55419d5b..64c65d4cd904 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -181,7 +181,13 @@ com_sun_star_comp_rendering_Canvas_Cairo_get_implementation(
 {
     auto p = new cairocanvas::Canvas(args, context);
     p->acquire();
-    p->initialize();
+    try {
+        p->initialize();
+    } catch (css::uno::Exception&) {
+        p->dispose();
+        p->release();
+        throw;
+    }
     return static_cast<cppu::OWeakObject*>(p);
 }
 


More information about the Libreoffice-commits mailing list