diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-16 15:45:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-17 08:49:11 +0000 |
commit | 7183d259d0d8bf8020da1aa06c963581d2bf779f (patch) | |
tree | eb585467413710892a505cb37fc0aecc50e4f8ab /sfx2/source/control | |
parent | eefa8e8110c432be36e1cd5d166b5f5676a7e5ca (diff) |
SfxViewFrame* arg of SfxRequest ctor always dereferenced
change it to take a reference
Change-Id: Ib9349f4c2660d297d93ee81256e7fa9873728ba3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147163
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/request.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 4cfeb629121c..802fc3b34c9e 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -176,13 +176,6 @@ SfxRequest::SfxRequest } -SfxRequest::SfxRequest -( - SfxViewFrame* pViewFrame, - sal_uInt16 nSlotId - -) - /* [Description] With this constructor events can subsequently be recorded that are not run @@ -192,20 +185,21 @@ SfxRequest::SfxRequest parameter. */ -: nSlot(nSlotId), - pImpl( new SfxRequest_Impl(this) ) +SfxRequest::SfxRequest(SfxViewFrame& rViewFrame, sal_uInt16 nSlotId) + : nSlot(nSlotId) + , pImpl(new SfxRequest_Impl(this)) { pImpl->bDone = false; pImpl->bIgnored = false; - pImpl->SetPool( &pViewFrame->GetPool() ); + pImpl->SetPool( &rViewFrame.GetPool() ); pImpl->pShell = nullptr; pImpl->pSlot = nullptr; pImpl->nCallMode = SfxCallMode::SYNCHRON; - pImpl->pViewFrame = pViewFrame; + pImpl->pViewFrame = &rViewFrame; if( pImpl->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImpl->pShell, &pImpl->pSlot, true, true ) ) { pImpl->SetPool( &pImpl->pShell->GetPool() ); - pImpl->xRecorder = SfxRequest::GetMacroRecorder(*pViewFrame); + pImpl->xRecorder = SfxRequest::GetMacroRecorder(rViewFrame); if (pImpl->xRecorder) pImpl->xTransform = util::URLTransformer::create(comphelper::getProcessComponentContext()); pImpl->aTarget = pImpl->pShell->GetName(); @@ -636,7 +630,7 @@ void SfxRequest::Done_Impl } // Record a Sub-Request - SfxRequest aReq( pImpl->pViewFrame, nSlotId ); + SfxRequest aReq( *pImpl->pViewFrame, nSlotId ); if ( aReq.pImpl->pSlot ) aReq.AppendItem( *pItem ); aReq.Done(); |