summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/editsh.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-16 10:42:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-16 15:13:21 +0000
commit0908c7c1184ab7acb7b6f6740a82c2f12c296fae (patch)
tree7bfe09dce871f6f2bc59a81b689d7ab5a3a6f3ea /sc/source/ui/view/editsh.cxx
parente71080e19365aa074c56d1136dad2b09783949a2 (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 'sc/source/ui/view/editsh.cxx')
-rw-r--r--sc/source/ui/view/editsh.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 52566f45d7b8..9583f7fb0ac9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -628,7 +628,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
{
// Ensure the field is selected first
pEditView->SelectFieldAtCursor();
- rViewData.GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(
+ rViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(
SID_HYPERLINK_DIALOG);
}
break;
@@ -1302,14 +1302,14 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
{
// Undo state is taken from normal ViewFrame state function
- SfxViewFrame* pViewFrm = rViewData.GetViewShell()->GetViewFrame();
- if ( pViewFrm && GetUndoManager() )
+ SfxViewFrame& rViewFrm = rViewData.GetViewShell()->GetViewFrame();
+ if ( GetUndoManager() )
{
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- pViewFrm->GetSlotState( nWhich, nullptr, &rSet );
+ rViewFrm.GetSlotState( nWhich, nullptr, &rSet );
nWhich = aIter.NextWhich();
}
}