[Libreoffice-commits] core.git: desktop/inc desktop/source

Michael Meeks michael.meeks at collabora.com
Wed Mar 14 18:51:58 UTC 2018


 desktop/inc/app.hxx         |    2 ++
 desktop/source/lib/init.cxx |    8 ++++++++
 2 files changed, 10 insertions(+)

New commits:
commit 005abf983d34042a7ced46d886f8ef2250cb3fce
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Mar 14 17:12:57 2018 +0000

    Allow lok to re-set temporary paths on second init.
    
    Change-Id: I40cd0538b573c2d090f56424e1110b938981a878
    Reviewed-on: https://gerrit.libreoffice.org/51292
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 0e5f8774d3c3..53f4eba57829 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -130,9 +130,11 @@ class Desktop : public Application
                                     css::uno::Reference< css::uno::XComponentContext > const & context);
         static void             DeregisterServices();
 
+    public:
         static void             CreateTemporaryDirectory();
         static void             RemoveTemporaryDirectory();
 
+    private:
         static bool             InitializeConfiguration();
         static void             FlushConfiguration();
         static bool             InitializeQuickstartMode( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d0978b449937..44d07125835a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -92,6 +92,7 @@
 #include <unotools/configmgr.hxx>
 #include <unotools/syslocaleoptions.hxx>
 #include <unotools/mediadescriptor.hxx>
+#include <unotools/pathoptions.hxx>
 #include <osl/module.hxx>
 #include <comphelper/sequence.hxx>
 #include <sfx2/sfxbasemodel.hxx>
@@ -3805,6 +3806,13 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
 
         if (eStage != PRE_INIT)
         {
+            SAL_INFO("lok", "Re-initialize temp paths");
+            SvtPathOptions aOptions;
+            OUString aNewTemp;
+            osl::FileBase::getTempDirURL(aNewTemp);
+            aOptions.SetTempPath(aNewTemp);
+            desktop::Desktop::CreateTemporaryDirectory();
+
             SAL_INFO("lok", "Enabling RequestHandler");
             RequestHandler::Enable(false);
             SAL_INFO("lok", "Starting soffice_main");


More information about the Libreoffice-commits mailing list