[Libreoffice-commits] core.git: desktop/source svx/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 15 15:37:50 UTC 2016
desktop/source/app/app.cxx | 2 +-
svx/source/unodraw/recoveryui.cxx | 22 +++++++++++++++-------
2 files changed, 16 insertions(+), 8 deletions(-)
New commits:
commit 1792493e765f8027c2605bd72b9978c6769a262d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 15 16:16:33 2016 +0100
Resolves: tdf#91603 if we cancel/discard recovery dialog, continue as normal
Change-Id: Ifd5df74063bcaf2f3a198b090ed2126449d7b8f8
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 05c3f9b..e4845d4 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1121,7 +1121,7 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
css::uno::Any aRet = xRecoveryUI->dispatchWithReturnValue(aURL, css::uno::Sequence< css::beans::PropertyValue >());
bool bRet = false;
aRet >>= bRet;
- return !bEmergencySave || bRet;
+ return bRet;
}
}
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 17b41e9..07cecc1 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()
More information about the Libreoffice-commits
mailing list