[Libreoffice-commits] core.git: 2 commits - filter/source sd/source

Caolán McNamara caolanm at redhat.com
Thu Nov 2 09:01:19 UTC 2017


 filter/source/graphicfilter/ieps/ieps.cxx |    2 +-
 sd/source/ui/view/drviews2.cxx            |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit d2397c08722b9acf84b7a03e1395f5391998cf84
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 2 09:00:05 2017 +0000

    coverity#1420538 Copy-paste error
    
    Change-Id: If85024b144f9d13da35b1f548100cf5860f3c75f

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 6d5c41cba7d8..265349a7119d 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -765,7 +765,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
                 if (!bFail)
                     bFail = o3tl::checked_sub(nNumb[2], nNumb[0], nWidth) || o3tl::checked_add(nWidth, 1L, nWidth);
                 if (!bFail)
-                    bFail = o3tl::checked_sub(nNumb[3], nNumb[1], nHeight) || o3tl::checked_add(nWidth, 1L, nHeight);
+                    bFail = o3tl::checked_sub(nNumb[3], nNumb[1], nHeight) || o3tl::checked_add(nHeight, 1L, nHeight);
                 if (!bFail && nWidth > 0 && nHeight > 0)
                 {
                     GDIMetaFile aMtf;
commit f99de44a02bae5d5e2298be821fc7bcb56bee086
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 2 08:57:16 2017 +0000

    coverity#1420536 Unchecked dynamic_cast
    
    Change-Id: I289f61fe7e9d6b8c37b70a8fce56090c72af9abf

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6959bd726536..fa89000bddca 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -312,9 +312,11 @@ private:
             }
 
             const SvxFieldItem* pFieldItem = findField(rSection);
-            if (pFieldItem)
+            const editeng::CustomPropertyField* pCustomPropertyField = pFieldItem ?
+                dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField()) :
+                nullptr;
+            if (pCustomPropertyField)
             {
-                const auto* pCustomPropertyField = dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField());
                 OUString aKey = pCustomPropertyField->GetName();
                 if (aKeyCreator.isMarkingTextKey(aKey))
                 {


More information about the Libreoffice-commits mailing list