sd/source/ui/unoidl/unomodel.cxx | 7 +------ sw/source/core/unocore/unotext.cxx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-)
New commits: commit 6164600ec1e60d450a6f2154f231e5c284c148ab Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 5 10:52:34 2023 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 5 13:39:46 2023 +0200 cid#1539501 Unchecked dynamic_cast Change-Id: I5b369c51259036e02609e5ad66b882063aa9e309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155369 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 789f419716f8..197c13283324 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2331,15 +2331,10 @@ OString SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell) OStringBuffer aState; DrawViewShell* pView = nullptr; - if (pViewShell) - { - ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pViewShell); + if (ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pViewShell)) pView = dynamic_cast<DrawViewShell*>(pShellBase->GetMainViewShell().get()); - } else - { pView = GetViewShell(); - } if (pView) { commit 46d6dc0e67f9ff1d4b606372ed58101e3c62b7a1 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 5 10:51:03 2023 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 5 13:39:34 2023 +0200 cid#1539503 Unchecked dynamic_cast Change-Id: Id54f46aa4ac7a2afcbc8fa4f898c812738f10f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155368 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 4fede9da65b4..25cfd8c97914 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -492,7 +492,7 @@ SwXText::insertControlCharacter( { pRange->SetPositions(aCursor); } - else + else if (pCursor) { SwPaM *const pUnoCursor = pCursor->GetPaM(); *pUnoCursor->GetPoint() = *aCursor.GetPoint();
