[Libreoffice-commits] core.git: desktop/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 6 14:08:55 UTC 2020
desktop/source/lib/init.cxx | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
New commits:
commit 6c97e5d0d5012fe0ad8bad9157463a6293f34b8d
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: Mon Jul 6 16:08:12 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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97206
Tested-by: Jenkins
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f499213cf0a2..bdfcc69b5764 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -132,6 +132,8 @@
#include <vcl/ITiledRenderable.hxx>
#include <vcl/dialoghelper.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>
@@ -6036,6 +6038,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)
@@ -6050,6 +6065,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;
@@ -6070,6 +6086,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;
}
}
@@ -6344,6 +6362,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