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 /sd | |
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 'sd')
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 8 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/uiimpress.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellImplementation.cxx | 2 |
5 files changed, 10 insertions, 10 deletions
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))); |