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/source/uibase/shells/textsh2.cxx | |
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/source/uibase/shells/textsh2.cxx')
-rw-r--r-- | sw/source/uibase/shells/textsh2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index 582a7d9a5efa..9d7e2bd81e48 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -181,12 +181,12 @@ void SwTextShell::ExecDB(SfxRequest const &rReq) if(pColumnItem) aData.m_aDBColumn = pColumnItem->GetValue(); aFieldMgr.InsertField(aData); - SfxViewFrame* pViewFrame = GetView().GetViewFrame(); + SfxViewFrame& rViewFrame = GetView().GetViewFrame(); uno::Reference< XDispatchRecorder > xRecorder = - pViewFrame->GetBindings().GetRecorder(); + rViewFrame.GetBindings().GetRecorder(); if ( xRecorder.is() ) { - SfxRequest aReq( pViewFrame, 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 )); |