[Libreoffice-commits] core.git: Branch 'feature/profilesafemode' - desktop/source

Armin Le Grand Armin.Le.Grand at cib.de
Thu Sep 15 13:53:02 UTC 2016


 desktop/source/app/app.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 0d8db04858579b7f780fca3ec756117cd61a3458
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Thu Sep 15 15:51:21 2016 +0200

    profilesafe: make dialog open on linux
    
    Change-Id: Idacec97ec2f097af9bd22a8a67b410c7677d17f1

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c2fe950..b3514ef 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -981,6 +981,12 @@ void Desktop::HandleBootstrapErrors(
 
                 if (aBackupFileHelper.isPopPossible())
                 {
+                    // for linux (and probably others?) we need to instantiate XDesktop2
+                    // to be able to open a *.ui-file based dialog, so do this here locally.
+                    // does no harm on win, so better always do this (in error case only anyways)
+                    Reference< XComponentContext > xLocalContext = ::comphelper::getProcessComponentContext();
+                    Reference< XDesktop2 > xDesktop = css::frame::Desktop::create(xLocalContext);
+
                     ScopedVclPtrInstance< MessageDialog > aQueryShouldRestore(
                         Application::GetDefDialogParent(),
                         "QueryTryToRestoreConfigurationDialog",


More information about the Libreoffice-commits mailing list