From c40dfabd56ade10fe35690dc9810955c2e99e2c0 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 12 Jan 2018 11:57:22 +0000 Subject: lokdialog: Allow closing the Format Cell dialogs in any order. Includes also lots of infrastructural changes, making the conversion of the rest of the dialogs much easier. StartExecuteAsync should be used in-place of StartExecuteModal and the latter removed from the code-base incrementally. More common code from Dialog::Execute should be moved to ImplStartExecuteModal in a next step, as this is used more widely. Change-Id: Idb2c1ec790e38f582438471a0419a56cdcf1439d Reviewed-on: https://gerrit.libreoffice.org/47722 Tested-by: Jenkins Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky --- sfx2/source/control/request.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sfx2/source/control/request.cxx') diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 2bd37d439613..d7e6e6af1346 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -155,6 +155,23 @@ SfxRequest::SfxRequest pImpl->SetPool( pArgs->GetPool() ); else pImpl->SetPool( rOrig.pImpl->pPool ); + + // setup macro recording if it was in the original SfxRequest + if (rOrig.pImpl->pViewFrame && rOrig.pImpl->xRecorder.is()) + { + nSlot = rOrig.nSlot; + pImpl->pViewFrame = rOrig.pImpl->pViewFrame; + if (pImpl->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl(nSlot, &pImpl->pShell, &pImpl->pSlot, true, true)) + { + pImpl->SetPool( &pImpl->pShell->GetPool() ); + pImpl->xRecorder = SfxRequest::GetMacroRecorder(pImpl->pViewFrame); + pImpl->aTarget = pImpl->pShell->GetName(); + } + else + { + SAL_WARN("sfx", "Recording unsupported slot: " << pImpl->pPool->GetSlotId(nSlot)); + } + } } -- cgit