sc/source/ui/app/inputhdl.cxx | 6 +++++- sd/source/ui/unoidl/unocpres.cxx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit ee7b7acba288d265001237e3d81a1791e322ed28 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 24 13:04:28 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 24 17:12:51 2022 +0200 cid#1509194 Dereference after null check Change-Id: Idb290b2780af402f8573c8231e63b2598b34ba43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index bfbb446e1364..f16e52af8fb6 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3458,10 +3458,14 @@ void ScInputHandler::CancelHandler() eMode = SC_INPUT_NONE; StopInputWinEngine( true ); + SCCOL nMaxCol(MAXCOL); if (pExecuteSh) + { pExecuteSh->StopEditShell(); + nMaxCol = pExecuteSh->GetViewData().GetDocument().MaxCol(); + } - aCursorPos.Set(pExecuteSh->GetViewData().GetDocument().MaxCol()+1,0,0); // Invalid flag + aCursorPos.Set(nMaxCol+1,0,0); // Invalid flag mpEditEngine->SetTextCurrentDefaults(OUString()); if ( !pLastState && pExecuteSh ) commit 2f05a65a4eafcbda3438e50bd0b6518248c04d5d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 24 12:56:43 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 24 17:12:36 2022 +0200 cid#1509207 Dereference after null check remove useless null checks left behind after commit bb674aa5503ff40a5619d1fb4c9f310da5f5c983 Date: Thu Nov 17 13:16:30 2016 +0200 loplugin:unusedfields showed they weren't consumed anyway Change-Id: Ia32ee9458e01a995692ab961e52512872b1c415c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138767 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index cc57b1e7941a..1f9bde3b98da 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -98,10 +98,10 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno:: if(pPage) { - if( nullptr == mpModel ) + if (!mpModel) mpModel = pPage->GetModel(); - if( nullptr != mpModel && nullptr == mpSdCustomShow && mpModel->GetDoc() ) + if (!mpSdCustomShow) mpSdCustomShow = new SdCustomShow; mpSdCustomShow->PagesVector().insert(mpSdCustomShow->PagesVector().begin() + Index,