summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-15 16:16:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-15 16:37:24 +0100
commit1792493e765f8027c2605bd72b9978c6769a262d (patch)
tree6c031053e518f3b7b58a1b98a79c648d01cb07ba /svx
parent4f61b652323e1bde5c45bc9dece3c61b2f69b83d (diff)
Resolves: tdf#91603 if we cancel/discard recovery dialog, continue as normal
Change-Id: Ifd5df74063bcaf2f3a198b090ed2126449d7b8f8
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/recoveryui.cxx22
1 files changed, 15 insertions, 7 deletions
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 17b41e9b39d2..07cecc148abe 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -107,7 +107,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper< css::lang::XServiceInfo
bool impl_doEmergencySave();
- void impl_doRecovery();
+ bool impl_doRecovery();
void impl_showAllRecoveredDocs();
@@ -157,19 +157,25 @@ css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL&
switch(eJob)
{
- case RecoveryUI::E_DO_EMERGENCY_SAVE :
+ case RecoveryUI::E_DO_EMERGENCY_SAVE:
{
bool bRet = impl_doEmergencySave();
aRet <<= bRet;
break;
}
- case RecoveryUI::E_DO_RECOVERY :
- impl_doRecovery();
+ case RecoveryUI::E_DO_RECOVERY:
+ {
+ bool bRet = impl_doRecovery();
+ aRet <<= bRet;
break;
+ }
- default :
+ default:
+ {
+ aRet <<= false;
break;
+ }
}
return aRet;
@@ -243,7 +249,7 @@ bool RecoveryUI::impl_doEmergencySave()
return (nRet==DLG_RET_OK_AUTOLUNCH);
}
-void RecoveryUI::impl_doRecovery()
+bool RecoveryUI::impl_doRecovery()
{
// create core service, which implements the real "emergency save" algorithm.
svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xContext, false);
@@ -254,11 +260,13 @@ void RecoveryUI::impl_doRecovery()
ScopedVclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore);
// start the dialog
- xDialog->Execute();
+ short nRet = xDialog->Execute();
impl_showAllRecoveredDocs();
delete_pending_crash();
+
+ return nRet != RET_CANCEL;
}
void RecoveryUI::impl_showAllRecoveredDocs()