diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-16 10:42:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-16 15:13:21 +0000 |
commit | 0908c7c1184ab7acb7b6f6740a82c2f12c296fae (patch) | |
tree | 7bfe09dce871f6f2bc59a81b689d7ab5a3a6f3ea /sw/qa/core | |
parent | e71080e19365aa074c56d1136dad2b09783949a2 (diff) |
SfxViewShell::GetViewFrame never returns null, change to a reference
various null checks can be seen to be redundant and removed
Change-Id: Icf49c1de4b0302795d2769a370af3abceaad0221
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa/core')
-rw-r--r-- | sw/qa/core/doc/doc.cxx | 2 | ||||
-rw-r--r-- | sw/qa/core/layout/layout.cxx | 2 | ||||
-rw-r--r-- | sw/qa/core/undo/undo.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index cec9525eb9e8..39680d3a632b 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxMakeFlyFrame) // When cutting the textbox and pasting it to a new document: SwView* pView = pDoc->GetDocShell()->GetView(); - pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON); + pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON); pView->StopShellTimer(); SwDocShell* pDocShell = pDoc->GetDocShell(); SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 829492c45cd9..2669b05fb2a2 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -960,7 +960,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testPageRemoveFlyTable) // When updating the ToC and incrementally formatting the document: SwView* pView = pDoc->GetDocShell()->GetView(); - SfxDispatcher& rDispatcher = *pView->GetViewFrame()->GetDispatcher(); + SfxDispatcher& rDispatcher = *pView->GetViewFrame().GetDispatcher(); rDispatcher.Execute(FN_UPDATE_TOX); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); pWrtShell->Reformat(); diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx index 154226d2129f..d4156c850476 100644 --- a/sw/qa/core/undo/undo.cxx +++ b/sw/qa/core/undo/undo.cxx @@ -68,7 +68,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutUndo) SwDoc* pDoc = pDocShell->GetDoc(); SwView* pView = pDoc->GetDocShell()->GetView(); - pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON); + pView->GetViewFrame().GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON); pView->StopShellTimer(); rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell); pTransfer->Cut(); |