[Libreoffice-commits] core.git: drawinglayer/source

Caolán McNamara caolanm at redhat.com
Mon Mar 26 19:28:44 UTC 2018


 drawinglayer/source/tools/emfphelperdata.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8ce700ebd84b8ccd5db461729a1c0fac8ad19baf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 26 12:49:54 2018 +0100

    forcepoint #33 ensure payload is a EMFPPath
    
    Change-Id: I0a9f332cc66e43caa4e1611006fa765cad063539
    Reviewed-on: https://gerrit.libreoffice.org/51889
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 09c3a2854aab..679a47c1a7f3 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -938,7 +938,7 @@ namespace emfplushelper
                         rMS.ReadUInt32(brushIndexOrColor);
                         SAL_INFO("drawinglayer", "EMF+ FillPath slot: " << index);
 
-                        EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[index].get());
+                        EMFPPath* path = dynamic_cast<EMFPPath*>(maEMFPObjects[index].get());
                         if (path)
                             EMFPPlusFillPolygon(path->GetPolygon(*this), flags & 0x8000, brushIndexOrColor);
                         else
@@ -1066,7 +1066,7 @@ namespace emfplushelper
                         SAL_INFO("drawinglayer", "EMF+ DrawPath");
                         SAL_INFO("drawinglayer", "EMF+\tpen: " << penIndex);
 
-                        EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
+                        EMFPPath* path = dynamic_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
                         if (path)
                             EMFPPlusDrawPolygon(path->GetPolygon(*this), penIndex);
                         else


More information about the Libreoffice-commits mailing list