summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-16 15:45:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-17 08:49:11 +0000
commit7183d259d0d8bf8020da1aa06c963581d2bf779f (patch)
treeeb585467413710892a505cb37fc0aecc50e4f8ab
parentosl::Mutex->std::mutex in SortedDynamicResultSetListener (diff)
downloadcore-7183d259d0d8bf8020da1aa06c963581d2bf779f.tar.gz
core-7183d259d0d8bf8020da1aa06c963581d2bf779f.zip
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>
-rw-r--r--include/sfx2/request.hxx2
-rw-r--r--sc/qa/unit/scshapetest.cxx6
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx8
-rw-r--r--sc/source/ui/view/prevwsh.cxx12
-rw-r--r--sd/qa/unit/misc-tests.cxx8
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sd/qa/unit/uiimpress.cxx4
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx4
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx2
-rw-r--r--sfx2/source/control/request.cxx20
-rw-r--r--sfx2/source/view/lokhelper.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svx/qa/unit/customshapes.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx4
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx8
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx8
-rw-r--r--sw/source/uibase/shells/textsh1.cxx10
-rw-r--r--sw/source/uibase/shells/textsh2.cxx2
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
30 files changed, 68 insertions, 74 deletions
diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx
index 966974498065..908f98b55379 100644
--- a/include/sfx2/request.hxx
+++ b/include/sfx2/request.hxx
@@ -56,7 +56,7 @@ private:
SAL_DLLPRIVATE void Done_Impl( const SfxItemSet *pSet );
public:
- SfxRequest( SfxViewFrame*, sal_uInt16 nSlotId );
+ SfxRequest( SfxViewFrame&, sal_uInt16 nSlotId );
SfxRequest( sal_uInt16 nSlot, SfxCallMode nCallMode, SfxItemPool &rPool );
SfxRequest( const SfxSlot* pSlot, const css::uno::Sequence < css::beans::PropertyValue >& rArgs,
SfxCallMode nCallMode, SfxItemPool &rPool );
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index df6fb030d691..dc60439a536f 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -135,7 +135,7 @@ void ScShapeTest::testTdf144242_OpenBezier_noSwapWH()
// Insert default open Bezier curve
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_BEZIER_NOFILL);
+ SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_BEZIER_NOFILL);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
pTabViewShell->SetDrawShell(false);
@@ -168,7 +168,7 @@ void ScShapeTest::testTdf144242_Line_noSwapWH()
// Insert default line
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_LINE);
+ SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_LINE);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
pTabViewShell->SetDrawShell(false);
@@ -611,7 +611,7 @@ void ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
// Create default measureline by SfxRequest that corresponds to Ctrl+Click
ScTabViewShell* pTabViewShell = getViewShell();
- SfxRequest aReq(&pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
+ SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
aReq.SetModifier(KEY_MOD1); // Ctrl
pTabViewShell->ExecDraw(aReq);
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index eb8cb4a18382..84b8d3595502 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -345,7 +345,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest aRequest(&pTabViewShell->GetViewFrame(), FID_INS_CELL);
+ SfxRequest aRequest(pTabViewShell->GetViewFrame(), FID_INS_CELL);
InsertCells(pTabViewShell, aRequest, pDlg->GetInsCellCmd());
}
pDlg->disposeOnce();
@@ -399,7 +399,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest aRequest(&pTabViewShell->GetViewFrame(), FID_INS_CELL);
+ SfxRequest aRequest(pTabViewShell->GetViewFrame(), FID_INS_CELL);
DeleteCells(pTabViewShell, aRequest, pDlg->GetDelCellCmd());
}
pDlg->disposeOnce();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index c34f8ce14267..b1ddf40c9598 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -529,7 +529,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pTabViewShell->UISort( rOutParam );
SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
- SfxRequest aRequest(&rViewFrm, SID_SORT);
+ SfxRequest aRequest(rViewFrm, SID_SORT);
if ( rOutParam.bInplace )
{
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 9e3fcc37bf88..f6245b4d0d6a 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -695,7 +695,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if (nResult == RET_OK)
{
- SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_ROW_HEIGHT);
+ SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_ROW_HEIGHT);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_DIRECT, static_cast<sal_uInt16>(nVal) );
@@ -735,7 +735,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if ( nResult == RET_OK )
{
- SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_ROW_OPT_HEIGHT);
+ SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_ROW_OPT_HEIGHT);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( false, SC_SIZE_OPTIMAL, static_cast<sal_uInt16>(nVal) );
ScGlobal::nLastRowHeightExtra = nVal;
@@ -800,7 +800,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
if ( nResult == RET_OK )
{
- SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_COL_WIDTH);
+ SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_COL_WIDTH);
tools::Long nVal = pDlg->GetInputValue();
pTabViewShell->SetMarkedWidthOrHeight( true, SC_SIZE_DIRECT, static_cast<sal_uInt16>(nVal) );
@@ -838,7 +838,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 2, MAX_EXTRA_WIDTH));
pDlg->StartExecuteAsync([pDlg, pTabViewShell](sal_Int32 nResult){
- SfxRequest pRequest(&pTabViewShell->GetViewFrame(), FID_COL_OPT_WIDTH);
+ SfxRequest pRequest(pTabViewShell->GetViewFrame(), FID_COL_OPT_WIDTH);
if ( nResult == RET_OK )
{
tools::Long nVal = pDlg->GetInputValue();
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index d38c16b2d4ad..7c52096f7c2d 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -989,7 +989,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage>0 )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_PREVIOUS );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_PREVIOUS);
Execute( aSfxRequest );
}
}
@@ -1012,7 +1012,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage<nTotal-1 )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_NEXT );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_NEXT);
Execute( aSfxRequest );
}
}
@@ -1033,7 +1033,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage>0 )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_PREVIOUS );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_PREVIOUS);
Execute( aSfxRequest );
aCurPos.setY( nVRange );
}
@@ -1056,7 +1056,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nPage<nTotal-1 )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_NEXT );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_NEXT);
Execute( aSfxRequest );
aCurPos.setY( 0 );
}
@@ -1072,7 +1072,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nTotal && nPage != 0 )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_FIRST );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_FIRST);
Execute( aSfxRequest );
}
}
@@ -1092,7 +1092,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
if( nTotal && nPage+1 != nTotal )
{
SfxViewFrame& rSfxViewFrame = GetViewFrame();
- SfxRequest aSfxRequest( &rSfxViewFrame, SID_PREVIEW_LAST );
+ SfxRequest aSfxRequest(rSfxViewFrame, SID_PREVIEW_LAST);
Execute( aSfxRequest );
}
}
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index ee03008dfb47..ea391708d060 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -134,7 +134,7 @@ void SdMiscTest::testTdf99396()
sdr::table::SvxTableController* pTableController
= dynamic_cast<sdr::table::SvxTableController*>(pView->getSelectionController().get());
CPPUNIT_ASSERT(pTableController);
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
pTableController->Execute(aRequest);
// This was 0, it wasn't possible to undo a vertical alignment change.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetUndoManager()->GetUndoActionCount());
@@ -163,7 +163,7 @@ void SdMiscTest::testTableObjectUndoTest()
pView->SdrBeginTextEdit(pTableObject);
CPPUNIT_ASSERT(pView->GetTextEditObject());
{
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_ATTR_PARA_ADJUST_RIGHT);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_ATTR_PARA_ADJUST_RIGHT);
SfxItemSet aEditAttr(pDoc->GetPool());
pView->GetAttributes(aEditAttr);
SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
@@ -179,7 +179,7 @@ void SdMiscTest::testTableObjectUndoTest()
auto pTableController
= dynamic_cast<sdr::table::SvxTableController*>(pView->getSelectionController().get());
CPPUNIT_ASSERT(pTableController);
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
pTableController->Execute(aRequest);
}
// Global change "Format cell" is applied only - Change the vertical alignment to "Bottom"
@@ -244,7 +244,7 @@ void SdMiscTest::testTableObjectUndoTest()
pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
pView->MarkObj(pTableObject, pView->GetSdrPageView()); // select table
{
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_GROW_FONT_SIZE);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_GROW_FONT_SIZE);
static_cast<sd::DrawViewShell*>(pViewShell)->ExecChar(aRequest);
}
Scheduler::ProcessEventsToIdle();
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 6b74588b7ea9..f46090ef2c7e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1741,7 +1741,7 @@ void SdTiledRenderingTest::testTdf105502()
pView->SdrBeginTextEdit(pObject);
rtl::Reference<sdr::SelectionController> xSelectionController(pView->getSelectionController());
CPPUNIT_ASSERT(xSelectionController.is());
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_SELECT_ROW);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_TABLE_SELECT_ROW);
xSelectionController->Execute(aRequest);
// Assert that the A1:B1 selection succeeded.
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 4eb16f50713b..fc4a5fe231bb 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -178,7 +178,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
CPPUNIT_ASSERT(pViewShell1 != pViewShell2);
// Have slide 1 in window 1, slide 2 in window 2.
- SfxRequest aRequest(pViewShell2->GetViewFrame(), SID_SWITCHPAGE);
+ SfxRequest aRequest(*pViewShell2->GetViewFrame(), SID_SWITCHPAGE);
aRequest.AppendItem(SfxUInt32Item(ID_VAL_WHATPAGE, 1));
aRequest.AppendItem(
SfxUInt32Item(ID_VAL_WHATKIND, static_cast<sal_uInt32>(PageKind::Standard)));
@@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf142589)
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
- SfxRequest aRequest(pViewShell->GetViewFrame(), SID_PRESENTATION);
+ SfxRequest aRequest(*pViewShell->GetViewFrame(), SID_PRESENTATION);
pImpressDocument->GetDoc()->getPresentationSettings().mbCustomShow = true;
pImpressDocument->GetDoc()->getPresentationSettings().mbStartCustomShow = true;
sd::slideshowhelp::ShowSlideShow(aRequest, *pImpressDocument->GetDoc());
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 563df318211c..b0aab2f227ed 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -449,7 +449,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
continue;
// Call the SID_ASSIGN_LAYOUT slot with all the necessary parameters.
- SfxRequest aRequest(&mrBase.GetViewFrame(), SID_ASSIGN_LAYOUT);
+ SfxRequest aRequest(mrBase.GetViewFrame(), SID_ASSIGN_LAYOUT);
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATPAGE, (rpPage->GetPageNum()-1)/2));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
pMainViewShell->ExecuteSlot (aRequest, false);
@@ -462,7 +462,7 @@ SfxRequest LayoutMenu::CreateRequest (
sal_uInt16 nSlotId,
AutoLayout aLayout)
{
- SfxRequest aRequest(&mrBase.GetViewFrame(), nSlotId);
+ SfxRequest aRequest(mrBase.GetViewFrame(), nSlotId);
do
{
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index fc617fa2d6a2..c76de5a513b6 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -262,7 +262,7 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest const & rRequest, Page
else
aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- SfxRequest aRequest(&mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ SfxRequest aRequest(mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout));
aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
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();
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index c0cd925741f7..ddcad7bab42d 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -85,7 +85,7 @@ int SfxLokHelper::createView(SfxViewFrame& rViewFrame, ViewShellDocId docId)
assert(docId >= ViewShellDocId(0) && "Cannot createView for invalid (negative) DocId.");
SfxViewShell::SetCurrentDocId(docId);
- SfxRequest aRequest(&rViewFrame, SID_NEWWINDOW);
+ SfxRequest aRequest(rViewFrame, SID_NEWWINDOW);
rViewFrame.ExecView_Impl(aRequest);
SfxViewShell* pViewShell = SfxViewShell::Current();
if (pViewShell == nullptr)
@@ -145,7 +145,7 @@ void SfxLokHelper::destroyView(int nId)
if (pViewShell->GetViewShellId() == nViewShellId)
{
SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
- SfxRequest aRequest(&rViewFrame, SID_CLOSEWIN);
+ SfxRequest aRequest(rViewFrame, SID_CLOSEWIN);
rViewFrame.Exec_Impl(aRequest);
break;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 9229d541b183..5add9956abcb 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -874,7 +874,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if (pPrinter->GetName() != pDlgPrinter->GetName())
{
// user has changed the printer -> macro recording
- SfxRequest aReq(&GetViewFrame(), SID_PRINTER_NAME);
+ SfxRequest aReq(GetViewFrame(), SID_PRINTER_NAME);
aReq.AppendItem(SfxStringItem(SID_PRINTER_NAME, pDlgPrinter->GetName()));
aReq.Done();
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index d4f34185af57..0cc5a385d149 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -719,10 +719,10 @@ bool SmGraphicWidget::KeyInput(const KeyEvent& rKEvt)
rCursor.Paste();
break;
case KeyFuncType::UNDO:
- GetDoc()->Execute(o3tl::temporary(SfxRequest(GetView().GetFrame(), SID_UNDO)));
+ GetDoc()->Execute(o3tl::temporary(SfxRequest(*GetView().GetFrame(), SID_UNDO)));
break;
case KeyFuncType::REDO:
- GetDoc()->Execute(o3tl::temporary(SfxRequest(GetView().GetFrame(), SID_REDO)));
+ GetDoc()->Execute(o3tl::temporary(SfxRequest(*GetView().GetFrame(), SID_REDO)));
break;
default:
switch (rKEvt.GetKeyCode().GetCode())
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 82f7d9f561c5..52667c326f3c 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth)
pSdrView->MarkObj(&rSdrCustomShape, pSdrView->GetSdrPageView());
// Set direction
- SfxRequest aReq(&pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
+ SfxRequest aReq(pViewShell->GetViewFrame(), SID_EXTRUSION_DIRECTION);
SfxInt32Item aItem(SID_EXTRUSION_DIRECTION, 90);
aReq.AppendItem(aItem);
svx::ExtrusionBar::execute(pSdrView, aReq, SfxViewFrame::Current()->GetBindings());
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index bf3831f29e0b..b2cd48f5c346 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1428,7 +1428,7 @@ short SwInsertSectionTabDialog::Ok()
rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aRequest( &rViewFrame, FN_INSERT_REGION);
+ SfxRequest aRequest(rViewFrame, FN_INSERT_REGION);
if(const SwFormatCol* pCol = pOutputItemSet->GetItemIfSet(RES_COL, false))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index d3cee669e971..a059d88c0b23 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -137,8 +137,8 @@ void SwFieldPage::InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, con
SwFieldTypesEnum::DatabaseNextSet == nTypeId ||
SwFieldTypesEnum::DatabaseName == nTypeId ;
- SfxRequest aReq( &pView->GetViewFrame(),
- bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD );
+ SfxRequest aReq(pView->GetViewFrame(),
+ bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD);
if(bRecordDB)
{
sal_Int32 nIdx{ 0 };
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 593753f263f4..959ceacad2d5 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -107,7 +107,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void)
OUString sRemoved = pBookmark->GetName();
IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess();
pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved), false);
- SfxRequest aReq(&m_rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
+ SfxRequest aReq(m_rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved));
aReq.Done();
m_aTableBookmarks.erase(std::remove(m_aTableBookmarks.begin(), m_aTableBookmarks.end(),
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index aa7b83caf1c5..33aefaa2ce39 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -415,7 +415,7 @@ IMPL_LINK(SwGlossaryDlg, GrpSelect, weld::TreeView&, rBox, void)
NameModify(*m_xShortNameEdit);
if (SfxRequest::HasMacroRecorder(m_pShell->GetView().GetViewFrame()))
{
- SfxRequest aReq( &m_pShell->GetView().GetViewFrame(), FN_SET_ACT_GLOSSARY );
+ SfxRequest aReq(m_pShell->GetView().GetViewFrame(), FN_SET_ACT_GLOSSARY);
aReq.AppendItem(SfxStringItem(FN_SET_ACT_GLOSSARY, getCurrentGlossary()));
aReq.Done();
}
@@ -438,7 +438,7 @@ void SwGlossaryDlg::Apply()
}
if (SfxRequest::HasMacroRecorder(m_pShell->GetView().GetViewFrame()))
{
- SfxRequest aReq( &m_pShell->GetView().GetViewFrame(), FN_INSERT_GLOSSARY );
+ SfxRequest aReq(m_pShell->GetView().GetViewFrame(), FN_INSERT_GLOSSARY);
aReq.AppendItem(SfxStringItem(FN_INSERT_GLOSSARY, getCurrentGlossary()));
aReq.AppendItem(SfxStringItem(FN_PARAM_1, aGlosName));
aReq.Done();
@@ -595,7 +595,7 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OString&, rItemIdent, void)
if (SfxRequest::HasMacroRecorder(m_pShell->GetView().GetViewFrame()))
{
- SfxRequest aReq(&m_pShell->GetView().GetViewFrame(), FN_NEW_GLOSSARY);
+ SfxRequest aReq(m_pShell->GetView().GetViewFrame(), FN_NEW_GLOSSARY);
aReq.AppendItem(SfxStringItem(FN_NEW_GLOSSARY, getCurrentGlossary()));
aReq.AppendItem(SfxStringItem(FN_PARAM_1, aShortName));
aReq.AppendItem(SfxStringItem(FN_PARAM_2, aStr));
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index cc11be02b7d6..e0ceb396fc81 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -521,7 +521,7 @@ void SwPostItMgr::Focus(const SfxBroadcaster& rBC)
{
if (!mpWrtShell->GetViewOptions()->IsPostIts())
{
- SfxRequest aRequest(&mpView->GetViewFrame(), SID_TOGGLE_NOTES);
+ SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_NOTES);
mpView->ExecViewOptions(aRequest);
}
@@ -535,7 +535,7 @@ void SwPostItMgr::Focus(const SfxBroadcaster& rBC)
if (postItField->mpPostIt->IsResolved() &&
!mpWrtShell->GetViewOptions()->IsResolvedPostIts())
{
- SfxRequest aRequest(&mpView->GetViewFrame(), SID_TOGGLE_RESOLVED_NOTES);
+ SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_RESOLVED_NOTES);
mpView->ExecViewOptions(aRequest);
}
postItField->mpPostIt->GrabFocus();
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index f127a5a64c24..afdf7fc5a756 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -997,7 +997,7 @@ void SwEditWin::FlushInBuffer()
// generate request and record
if (pSfxShell)
{
- SfxRequest aReq(&m_rView.GetViewFrame(), FN_INSERT_STRING);
+ SfxRequest aReq(m_rView.GetViewFrame(), FN_INSERT_STRING);
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, m_aInBuffer ) );
aReq.Done();
}
@@ -2787,7 +2787,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
if( nSlotId && m_rView.GetViewFrame().GetBindings().GetRecorder().is() )
{
- SfxRequest aReq(&m_rView.GetViewFrame(), nSlotId);
+ SfxRequest aReq(m_rView.GetViewFrame(), nSlotId);
aReq.Done();
}
eKeyState = SwKeyState::End;
@@ -5244,7 +5244,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SfxShell *pSfxShell = lcl_GetTextShellFromDispatcher( m_rView );
if ( pSfxShell )
{
- SfxRequest aReq( &m_rView.GetViewFrame(), SID_STYLE_APPLY );
+ SfxRequest aReq(m_rView.GetViewFrame(), SID_STYLE_APPLY);
aReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aStyleName ) );
aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, static_cast<sal_uInt16>(m_pApplyTempl->eType) ) );
aReq.Done();
@@ -5735,7 +5735,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// generate request and record
if (pSfxShell)
{
- SfxRequest aReq( &m_rView.GetViewFrame(), FN_INSERT_STRING );
+ SfxRequest aReq(m_rView.GetViewFrame(), FN_INSERT_STRING);
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sRecord ) );
aReq.Done();
}
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index c56a199ad022..2c402cf44bb3 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -832,7 +832,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
else if (nId == m_nRedlinePrevId)
nId = FN_REDLINE_PREV_CHANGE;
// Let SwView::Execute() handle the redline actions.
- SfxRequest aReq(&m_pSh->GetView().GetViewFrame(), nId);
+ SfxRequest aReq(m_pSh->GetView().GetViewFrame(), nId);
m_pSh->GetView().Execute(aReq);
}
else
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 48ce19524065..4166a754bf77 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -224,7 +224,7 @@ void SwCommentRuler::MouseButtonDown(const MouseEvent& rMEvt)
// Toggle notes visibility
SwView& rView = mpSwWin->GetView();
- SfxRequest aRequest(&rView.GetViewFrame(), SID_TOGGLE_NOTES);
+ SfxRequest aRequest(rView.GetViewFrame(), SID_TOGGLE_NOTES);
rView.ExecViewOptions(aRequest);
// It is inside comment control, so update help text
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index e117c7295861..146f2ffde9ef 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -281,7 +281,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
m_pSh->GetView().GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aReq(&m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
+ SfxRequest aReq(m_pSh->GetView().GetViewFrame(), FN_INSERT_FRAME);
aReq .AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
static_cast<sal_uInt16>(RndStdIds::FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 88cfb135ef84..0006596a87fb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -426,7 +426,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
uno::Reference< frame::XDispatchRecorder > xRecorder =
rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( &rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
+ SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS);
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(SotClipboardFormatId::STRING) ) );
aReq.Done();
}
@@ -482,7 +482,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
uno::Reference< frame::XDispatchRecorder > xRecorder =
rViewFrame.GetBindings().GetRecorder();
if(xRecorder.is()) {
- SfxRequest aReq( &rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
+ SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS);
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) );
aReq.Done();
}
@@ -1274,7 +1274,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SfxViewFrame& rViewFrame = GetView().GetViewFrame();
if (SfxRequest::HasMacroRecorder(rViewFrame))
{
- SfxRequest aReq( &rViewFrame, nSlot);
+ SfxRequest aReq(rViewFrame, nSlot);
aReq.AppendItem( SfxStringItem( FN_PARAM_1, OUString(cDelim) ));
if(bToTable)
{
@@ -1584,7 +1584,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
// set from design mode
OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" );
- SfxRequest aReq( &GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
+ SfxRequest aReq(GetView().GetViewFrame(), SID_FM_DESIGN_MODE);
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
GetView().GetFormShell()->Execute( aReq );
aReq.Done();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 5b871c532cf3..60a608a04a70 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -233,10 +233,10 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std:
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
rWrtSh.ExtendSelection(false, sInsert.getLength());
- SfxRequest aReq( &rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
+ SfxRequest aReq(rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING);
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
- SfxRequest aReq1( &rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
+ SfxRequest aReq1(rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT);
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, true) );
aReq1.Done();
@@ -255,7 +255,7 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std:
pReq->Done(aTmpSet);
if(bInsert)
{
- SfxRequest aReq1( &rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
+ SfxRequest aReq1(rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT);
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, false) );
aReq1.Done();
@@ -967,7 +967,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( pDlg->Execute() == RET_OK )
{
const sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
- SfxRequest aReq( &GetView().GetViewFrame(), nId );
+ SfxRequest aReq(GetView().GetViewFrame(), nId);
if ( !pDlg->GetStr().isEmpty() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
if ( !pDlg->GetFontName().isEmpty() )
@@ -1919,7 +1919,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else
{
- SfxRequest aReq( &GetView().GetViewFrame(), SID_FM_CTL_PROPERTIES );
+ SfxRequest aReq(GetView().GetViewFrame(), SID_FM_CTL_PROPERTIES);
aReq.AppendItem( SfxBoolItem( SID_FM_CTL_PROPERTIES, true ) );
rWrtSh.GetView().GetFormShell()->Execute( aReq );
}
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 9d7e2bd81e48..8f05aef76788 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -186,7 +186,7 @@ void SwTextShell::ExecDB(SfxRequest const &rReq)
rViewFrame.GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aReq( &rViewFrame, FN_INSERT_DBFIELD );
+ SfxRequest aReq(rViewFrame, FN_INSERT_DBFIELD);
aReq.AppendItem( SfxUInt16Item(FN_PARAM_FIELD_TYPE, static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
aReq.AppendItem( SfxStringItem( FN_INSERT_DBFIELD, sDBName ));
aReq.AppendItem( SfxStringItem( FN_PARAM_1, sCommandArg ));
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 5d04bab53cda..bfa252217087 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -108,7 +108,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_OFF:
{
GetShell().StartAllAction();
- SfxRequest aReq(&GetView().GetViewFrame(), FN_NUM_BULLET_ON);
+ SfxRequest aReq(GetView().GetViewFrame(), FN_NUM_BULLET_ON);
aReq.AppendItem(SfxBoolItem(FN_PARAM_1, false));
aReq.Done();
GetShell().NumOrBulletOff();
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 41928abe971b..a4458aaf5b21 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2719,7 +2719,7 @@ tools::Long SwView::InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium>
GetViewFrame().GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- SfxRequest aRequest(&GetViewFrame(), SID_INSERTDOC);
+ SfxRequest aRequest(GetViewFrame(), SID_INSERTDOC);
aRequest.AppendItem(SfxStringItem(SID_INSERTDOC, pMedium->GetOrigURL()));
if(pMedium->GetFilter())
aRequest.AppendItem(SfxStringItem(FN_PARAM_1, pMedium->GetFilter()->GetName()));