diff options
Diffstat (limited to 'sfx2/source/control/request.cxx')
-rw-r--r-- | sfx2/source/control/request.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 2c8f1ea69cb4..751e2f30108a 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -152,6 +152,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)); + } + } } |