[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 30 06:15:53 UTC 2020


 desktop/source/lib/init.cxx |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

New commits:
commit a09b5f46c4b577668e2f5b4450dab3e4eb7e6066
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jun 26 12:56:38 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jun 30 08:15:17 2020 +0200

    notebookbar: early init
    
    Change-Id: I2a129911b6949fd0e165065fd6d02f3546613407
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97232
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 51a8c80ad049..9bd636910959 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -140,6 +140,7 @@
 #include <vcl/dialog.hxx>
 #include <unicode/uchar.h>
 #include <unotools/configmgr.hxx>
+#include <unotools/confignode.hxx>
 #include <unotools/syslocaleoptions.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <unotools/pathoptions.hxx>
@@ -6044,6 +6045,19 @@ public:
     }
 };
 
+static void activateNotebookbar(const OUString& rApp)
+{
+    OUString aPath = "org.openoffice.Office.UI.ToolbarMode/Applications/" + rApp;
+
+    const utl::OConfigurationTreeRoot aAppNode(xContext, aPath, true);
+
+    if (aAppNode.isValid())
+    {
+        aAppNode.setNodeValue("Active", makeAny(OUString("notebookbar.ui")));
+        aAppNode.commit();
+    }
+}
+
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl)
 {
     enum {
@@ -6056,6 +6070,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
     static bool bPreInited = false;
     static bool bUnipoll = false;
     static bool bProfileZones = false;
+    static bool bNotebookbar = false;
 
     { // cf. string lifetime for preinit
         std::vector<OUString> aOpts;
@@ -6076,6 +6091,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
             else if (it == "sc_print_twips_msgs")
                 comphelper::LibreOfficeKit::setCompatFlag(
                     comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+            else if (it == "notebookbar")
+                bNotebookbar = true;
         }
     }
 
@@ -6350,6 +6367,13 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
     }
 #endif
 
+    if (bNotebookbar)
+    {
+        activateNotebookbar("Writer");
+        activateNotebookbar("Calc");
+        activateNotebookbar("Impress");
+    }
+
     return bInitialized;
 }
 


More information about the Libreoffice-commits mailing list