[Libreoffice-commits] core.git: 2 commits - xmloff/source xmlsecurity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 17:52:34 UTC 2018


 xmloff/source/text/txtparae.cxx                                   |    4 ++--
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |    5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 014dec7fea06189d79c635e8df35e1f48edf7ef5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 16:36:44 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 19:52:26 2018 +0200

    pvs-studio: rework expression
    
    Change-Id: Ibcbeef3eba53df790c1860e6e4066de67bdda0bc
    Reviewed-on: https://gerrit.libreoffice.org/62057
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 95a3e89c6f2d..4d1d196189ed 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -654,7 +654,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
             ; // section styles have no parents
             break;
         }
-        if( (aPropStates.size() - nIgnoreProps) > 0 )
+        if (aPropStates.size() - nIgnoreProps)
         {
             GetAutoStylePool().Add( nFamily, sParent, aPropStates, bDontSeek );
             if( !sCondParent.isEmpty() && sParent != sCondParent )
@@ -848,7 +848,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink(
             ppAddStates++;
         }
     }
-    if( (aPropStates.size() - nIgnoreProps) > 0 )
+    if (aPropStates.size() - nIgnoreProps)
     {
         // erase the character style, otherwise the autostyle cannot be found!
         // erase the hyperlink, otherwise the autostyle cannot be found!
commit cdf8d7a1d88865b26cab11f01cc6307a4033f1dd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 16:05:00 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 19:52:12 2018 +0200

    pvs-studio: new does not return nullptr
    
    Change-Id: I3ba9048a4563e7c8e6930ae67d5a076a829d6b81
    Reviewed-on: https://gerrit.libreoffice.org/62049
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index b8783440ea10..d44d093641c1 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -369,8 +369,6 @@ css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension >
                 xExtn = reinterpret_cast<CertificateExtension_XmlSecImpl*>(new SanExtensionImpl());
             else
                 xExtn = new CertificateExtension_XmlSecImpl;
-            if( xExtn == nullptr )
-                throw RuntimeException() ;
 
             xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, reinterpret_cast<unsigned char*>(pExtn->pszObjId), strlen( pExtn->pszObjId ), pExtn->fCritical ) ;
 
@@ -394,9 +392,6 @@ css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certifi
             //TODO: Compare the oid
             if( false ) {
                 xExtn = new CertificateExtension_XmlSecImpl;
-                if( xExtn == nullptr )
-                    throw RuntimeException() ;
-
                 xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, reinterpret_cast<unsigned char*>(pExtn->pszObjId), strlen( pExtn->pszObjId ), pExtn->fCritical ) ;
             }
         }


More information about the Libreoffice-commits mailing list