sc/source/filter/oox/commentsbuffer.cxx  |    1 +
 svgio/source/svgreader/svgfilternode.cxx |   12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit dee1cf105306d6795c50fdf53afe1d10fbf8552d
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jun 11 21:35:28 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jun 12 09:13:18 2023 +0200

    cid#1532369 Unchecked dynamic_cast
    
    Change-Id: I43cd71b608fcddd48d7713e11efdf01d20f963fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152863
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/filter/oox/commentsbuffer.cxx 
b/sc/source/filter/oox/commentsbuffer.cxx
index 309d96ec377f..05deae3ee876 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -164,6 +164,7 @@ void Comment::finalizeImport()
         SdrCaptionObj* pCaption = pPostIt->GetOrCreateCaption( 
maModel.maRange.aStart );
 
         rtl::Reference< SvxShapeText > xAnnoShape( 
dynamic_cast<SvxShapeText*>(pCaption->getUnoShape().get() ) ); // SvxShapeText
+        assert(xAnnoShape && "will not be null");
         // setting a property triggers expensive process, so set them all at 
once
 
         // Add shape formatting properties (autoFill, colHidden and rowHidden 
are dropped)
commit 081ceacde942f558e34cfef8ab64a9feed9b4549
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jun 11 21:33:01 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jun 12 09:13:06 2023 +0200

    cid#1532368 Unchecked dynamic_cast
    
    Change-Id: I132b734e74f0b92e7fcb6230163d876783140b7a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152862
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/svgio/source/svgreader/svgfilternode.cxx 
b/svgio/source/svgreader/svgfilternode.cxx
index 12656a7c28e7..60d6371e1a0a 100644
--- a/svgio/source/svgreader/svgfilternode.cxx
+++ b/svgio/source/svgreader/svgfilternode.cxx
@@ -44,15 +44,15 @@ void 
SvgFilterNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTarg
         SvgNode* pCandidate = rChildren[a].get();
         if (pCandidate->getType() == SVGToken::FeGaussianBlur)
         {
-            const SvgFeGaussianBlurNode* pFeGaussianBlurNode
-                = dynamic_cast<const SvgFeGaussianBlurNode*>(pCandidate);
-            pFeGaussianBlurNode->apply(rTarget);
+            const SvgFeGaussianBlurNode& rFeGaussianBlurNode
+                = dynamic_cast<const SvgFeGaussianBlurNode&>(*pCandidate);
+            rFeGaussianBlurNode.apply(rTarget);
         }
         else if (pCandidate->getType() == SVGToken::FeColorMatrix)
         {
-            const SvgFeColorMatrixNode* pFeColorMatrixNode
-                = dynamic_cast<const SvgFeColorMatrixNode*>(pCandidate);
-            pFeColorMatrixNode->apply(rTarget);
+            const SvgFeColorMatrixNode& rFeColorMatrixNode
+                = dynamic_cast<const SvgFeColorMatrixNode&>(*pCandidate);
+            rFeColorMatrixNode.apply(rTarget);
         }
     }
 }

Reply via email to