diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 64 | ||||
-rw-r--r-- | desktop/uiconfig/ui/querytrytorestoreconfigurationdialog.ui | 37 |
2 files changed, 12 insertions, 89 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index cd3fbfa96326..6be6d6139bfa 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -951,64 +951,23 @@ void Desktop::HandleBootstrapErrors( } else if ( aBootstrapError == BE_OFFICECONFIG_BROKEN ) { - bool bFireOriginalError(true); - comphelper::BackupFileHelper aBackupFileHelper; - - // crerate BackupFileHelper and check if active and if pop is possible - 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", - "desktop/ui/querytrytorestoreconfigurationdialog.ui"); - - if (aQueryShouldRestore.get()) - { - if (!aErrorMessage.isEmpty()) - { - OUString aPrimaryText(aQueryShouldRestore->get_primary_text()); - - aPrimaryText += "\n(\"" + aErrorMessage + "\")"; - aQueryShouldRestore->set_primary_text(aPrimaryText); - } - - if (RET_YES == aQueryShouldRestore->Execute()) - { - aBackupFileHelper.tryPop(); - bFireOriginalError = false; - } - } - } - // set flag at BackupFileHelper to be able to know if _exit was called and // actions are executed after this. This method we are in will not return, // but end up in a _exit() call comphelper::BackupFileHelper::setExitWasCalled(); - if (bFireOriginalError) - { - OUString msg( - GetMsgString( - STR_CONFIG_ERR_ACCESS_GENERAL, - ("A general error occurred while accessing your central" - " configuration."))); - if (!aErrorMessage.isEmpty()) { - msg += "\n(\"" + aErrorMessage + "\")"; - } - FatalError(MakeStartupErrorMessage(msg)); - } - else - { - // Already presented all information to the user. - // just do what FatalError does at it's end - _exit(EXITHELPER_FATAL_ERROR); + // enter safe mode, too + sfx2::SafeMode::putFlag(); + + OUString msg( + GetMsgString( + STR_CONFIG_ERR_ACCESS_GENERAL, + ("A general error occurred while accessing your central" + " configuration. SafeMode is initiated."))); + if (!aErrorMessage.isEmpty()) { + msg += "\n(\"" + aErrorMessage + "\")"; } + FatalError(MakeStartupErrorMessage(msg)); } else if ( aBootstrapError == BE_USERINSTALL_FAILED ) { @@ -1824,6 +1783,7 @@ int Desktop::doShutdown() comphelper::BackupFileHelper aBackupFileHelper; aBackupFileHelper.tryPush(); + aBackupFileHelper.tryPushExtensionInfo(); } // The acceptors in the AcceptorMap must be released (in DeregisterServices) diff --git a/desktop/uiconfig/ui/querytrytorestoreconfigurationdialog.ui b/desktop/uiconfig/ui/querytrytorestoreconfigurationdialog.ui deleted file mode 100644 index 4c332d1889d6..000000000000 --- a/desktop/uiconfig/ui/querytrytorestoreconfigurationdialog.ui +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <!-- interface-requires gtk+ 3.0 --> - <object class="GtkMessageDialog" id="QueryTryToRestoreConfigurationDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="title" translatable="yes">LibreOffice Startup: General Configuration Error</property> - <property name="resizable">False</property> - <property name="type_hint">dialog</property> - <property name="skip_taskbar_hint">True</property> - <property name="message_type">question</property> - <property name="buttons">yes-no</property> - <property name="text" translatable="yes">A general error occurred during startup while accessing the central configuration.</property> - <property name="secondary_text" translatable="yes">A Backup of your configuration was detected. Restoring the configuration might solve this problem, but is not guaranteed to work. A restart of the Program is needed. - -Do you want to restore the configuration?</property> - <child internal-child="vbox"> - <object class="GtkBox" id="messagedialog-vbox5"> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child internal-child="action_area"> - <object class="GtkButtonBox" id="messagedialog-action_area5"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">0</property> - </packing> - </child> - </object> - </child> - </object> -</interface> |