oox/source/shape/ShapeContextHandler.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 97cb43c001ffa7811d05150b86902bff8323c2d7
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Nov 13 16:23:13 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Nov 13 20:12:06 2024 +0100

    tdf#163486: PVS: variable is used after being declared
    
    Since
    commit d4087b13fa278bd63f229a290dd12bda6392e77c
    Author: Rüdiger Timm <r...@openoffice.org>
    Date:   Fri Apr 18 13:32:32 2008 +0000
    
        INTEGRATION: CWS xmlfilter04 (1.2.12); FILE MERGED
    
    V614    The 'pMasterShape' smart pointer is utilized immediately after 
being declared or reset. It is suspicious that no value was assigned to it. 
Consider checking the second actual argument of the 
'GraphicalObjectFrameContext' function.
    
    Change-Id: I3d4241e8c88ee80c95a93d0e08d5498d87e7853b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176551
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 7f8ec35c7350..e34f5be34700 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -167,19 +167,18 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 
Element )
     if (! mxGraphicShapeContext.is())
     {
         auto pFragmentHandler = 
std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, 
msRelationFragmentPath);
-        ShapePtr pMasterShape;
 
         switch (Element & 0xffff)
         {
             case XML_graphic:
                 mpShape = 
std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
                 mxGraphicShapeContext.set
-                (new GraphicalObjectFrameContext(*pFragmentHandler, 
pMasterShape, mpShape, true));
+                (new GraphicalObjectFrameContext(*pFragmentHandler, nullptr, 
mpShape, true));
                 break;
             case XML_pic:
                 mpShape = 
std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
                 mxGraphicShapeContext.set
-                (new GraphicShapeContext(*pFragmentHandler, pMasterShape, 
mpShape));
+                (new GraphicShapeContext(*pFragmentHandler, nullptr, mpShape));
                 break;
             default:
                 break;

Reply via email to