desktop/source/lib/init.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
New commits: commit 6c97e5d0d5012fe0ad8bad9157463a6293f34b8d Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Jun 26 12:56:38 2020 +0200 Commit: Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits