summaryrefslogtreecommitdiff
path: root/sfx2/source/control/request.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-01-12 11:57:22 +0000
committerJan Holesovsky <kendy@collabora.com>2018-01-15 17:44:42 +0100
commitc40dfabd56ade10fe35690dc9810955c2e99e2c0 (patch)
tree0ae297ec41e2a1a5e4e078180c18320a83823a89 /sfx2/source/control/request.cxx
parent5942140c5149065ffb5adf9d33b21aeceeabf957 (diff)
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 <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2/source/control/request.cxx')
-rw-r--r--sfx2/source/control/request.cxx17
1 files changed, 17 insertions, 0 deletions
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));
+ }
+ }
}