summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh/select.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 /sw/source/uibase/wrtsh/select.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 'sw/source/uibase/wrtsh/select.cxx')
-rw-r--r--sw/source/uibase/wrtsh/select.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index fe2915a90234..5b7358c230ce 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -54,9 +54,9 @@ void SwWrtShell::Invalidate()
{
// to avoid making the slot volatile, invalidate it every time if something could have been changed
// this is still much cheaper than asking for the state every 200 ms (and avoid background processing)
- GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
- GetView().GetViewFrame()->GetBindings().Update(FN_STAT_SELMODE); // make selection mode control icon update immediately
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ GetView().GetViewFrame().GetBindings().Invalidate( FN_STAT_SELMODE );
+ GetView().GetViewFrame().GetBindings().Update(FN_STAT_SELMODE); // make selection mode control icon update immediately
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
}
@@ -439,7 +439,7 @@ void SwWrtShell::EndSelect()
m_fnKillSel = &SwWrtShell::ResetSelect;
}
}
- SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
+ SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
@@ -673,7 +673,7 @@ void SwWrtShell::SetInsMode( bool bOn )
m_bIns = bOn;
SwCursorShell::SetOverwriteCursor( !m_bIns );
const SfxBoolItem aTmp( SID_ATTR_INSERT, m_bIns );
- GetView().GetViewFrame()->GetBindings().SetState( aTmp );
+ GetView().GetViewFrame().GetBindings().SetState( aTmp );
StartAction();
EndAction();
Invalidate();