From 69de2b4772e7f7c1b285cf0405f872423c3f88cd Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Mon, 31 Oct 2016 16:20:47 +0100 Subject: [PATCH] SafeModeDialog: Add link to user profile Change-Id: I0096b3d7db51e28eb58c7209109c30b73b382478 Reviewed-on: https://gerrit.libreoffice.org/30448 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- comphelper/source/misc/backupfilehelper.cxx | 5 +++++ include/comphelper/backupfilehelper.hxx | 3 +++ svx/source/dialog/SafeModeDialog.cxx | 4 ++++ svx/source/dialog/SafeModeDialog.hxx | 1 + svx/uiconfig/ui/safemodedialog.ui | 33 ++++++++++++++++++++++++++--- 5 files changed, 43 insertions(+), 3 deletions(-) diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 6686d08df947..de03b0b05c1e 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -2202,6 +2202,11 @@ namespace comphelper deleteDirRecursively(maUserConfigWorkURL); } + const OUString& BackupFileHelper::getUserProfileURL() + { + return maUserConfigBaseURL; + } + /////////////////// helpers /////////////////////// const rtl::OUString BackupFileHelper::getPackURL() diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx index 5d3173f28b68..07cfb61053ec 100644 --- a/include/comphelper/backupfilehelper.hxx +++ b/include/comphelper/backupfilehelper.hxx @@ -179,6 +179,9 @@ namespace comphelper */ static void tryResetUserProfile(); + /** Return the profile url */ + static const OUString& getUserProfileURL(); + private: // internal helper methods static const rtl::OUString getPackURL(); diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 9dd2d4d13d2d..4a3a83515a91 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -62,6 +62,7 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) get(mpCBResetWholeUserProfile, "check_reset_whole_userprofile"); get(mpBugLink, "linkbutton_bugs"); + get(mpUserProfileLink, "linkbutton_profile"); mpBtnContinue->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl)); mpBtnQuit->SetClickHdl(LINK(this, SafeModeDialog, BtnHdl)); @@ -115,6 +116,8 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() + "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=safemode"); mpBugLink->SetURL(sURL); + + mpUserProfileLink->SetURL(comphelper::BackupFileHelper::getUserProfileURL()); } SafeModeDialog::~SafeModeDialog() @@ -138,6 +141,7 @@ void SafeModeDialog::dispose() mpCBResetWholeUserProfile.clear(); mpBugLink.clear(); + mpUserProfileLink.clear(); Dialog::dispose(); } diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index 66a83b275831..f770c535e41d 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -46,6 +46,7 @@ private: VclPtr mpCBResetWholeUserProfile; VclPtr mpBugLink; + VclPtr mpUserProfileLink; // local BackupFileHelper for handling possible restores comphelper::BackupFileHelper maBackupFileHelper; diff --git a/svx/uiconfig/ui/safemodedialog.ui b/svx/uiconfig/ui/safemodedialog.ui index e28cac7fc0ae..bc5226ea2573 100644 --- a/svx/uiconfig/ui/safemodedialog.ui +++ b/svx/uiconfig/ui/safemodedialog.ui @@ -225,15 +225,14 @@ The offered possible changes get more radical from top to bottom, so it is recom True False + 12 vertical 12 True False - If you experience problems that are not resolved by using the Safe Mode, visit the following link to get help or report a bug. - -You can also include the relevant parts of your User Profile. Beware that it might contain personal data. + If you experience problems that are not resolved by using the Safe Mode, visit the following link to get help or report a bug. 0 @@ -256,6 +255,34 @@ You can also include the relevant parts of your User Profile. Beware that it mig 1 + + + True + False + You can also include the relevant parts of your User Profile. Beware that it might contain personal data. +Your User Profile is located at: + 0 + + + False + True + 2 + + + + + Show User Profile + True + True + True + none + + + False + True + 3 + +