summaryrefslogtreecommitdiff
path: root/desktop/source/app
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-10-13 18:31:51 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2016-10-14 10:37:30 +0000
commita1b7231a33322bbbb8352e2cd6aeff3b473b01d4 (patch)
tree5f4ff9e277889f8aa44067328d667c6aa16d7406 /desktop/source/app
parent876fcb5461bb1fdb151a4457ccacaed6904238a2 (diff)
profilesafe: Adapted to UI
Adaptions to UI, added more modes what the user can do in SafeMode. Adapted locations to write pack information and added places where to enter SafeMode. Implemented basically all five possible user choices Change-Id: Ic5324a8f77ab434309e840949c3803e65a75c538 Reviewed-on: https://gerrit.libreoffice.org/29785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'desktop/source/app')
-rw-r--r--desktop/source/app/app.cxx64
1 files changed, 12 insertions, 52 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)