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

Jens Carl (via logerrit) logerrit at kemper.freedesktop.org
Thu May 9 18:09:52 UTC 2019


 extensions/source/propctrlr/MasterDetailLinkDialog.cxx |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit c338638eeabbc959a4d71e04774365e628a093c2
Author:     Jens Carl <j.carl43 at gmx.de>
AuthorDate: Wed May 8 00:01:38 2019 -0700
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu May 9 20:08:21 2019 +0200

    tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)
    
    Replace OSL_VERIFY with if-statement and SAL_WARN.
    
    Change-Id: Ibeef67f21dc9e18d3bc614cb838a6188bb58fff2
    Reviewed-on: https://gerrit.libreoffice.org/72025
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
index 3a2390b26845..00814017184b 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <toolkit/helper/vclunohelper.hxx>
+#include <sal/log.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include "MasterDetailLinkDialog.hxx"
@@ -112,27 +113,32 @@ namespace pcr
         {
             if (aProperty.Name == "Detail")
             {
-                OSL_VERIFY( aProperty.Value >>= m_xDetail );
+                if ( ! (aProperty.Value >>= m_xDetail) )
+                    SAL_WARN("extensions.propctrlr", "implInitialize: unable to get property Detail");
                 return;
             }
             else if (aProperty.Name == "Master")
             {
-                OSL_VERIFY( aProperty.Value >>= m_xMaster );
+                if ( ! (aProperty.Value >>= m_xMaster) )
+                    SAL_WARN("extensions.propctrlr", "implInitialize: unable to get property Master");
                 return;
             }
             else if (aProperty.Name == "Explanation")
             {
-                OSL_VERIFY( aProperty.Value >>= m_sExplanation );
+                if ( ! (aProperty.Value >>= m_sExplanation) )
+                    SAL_WARN("extensions.propctrlr", "implInitialize: unable to get property Explanation");
                 return;
             }
             else if (aProperty.Name == "DetailLabel")
             {
-                OSL_VERIFY( aProperty.Value >>= m_sDetailLabel );
+                if ( ! (aProperty.Value >>= m_sDetailLabel) )
+                    SAL_WARN("extensions.propctrlr", "implInitialize: unable to get property DetailLabel");
                 return;
             }
             else if (aProperty.Name == "MasterLabel")
             {
-                OSL_VERIFY( aProperty.Value >>= m_sMasterLabel );
+                if ( ! (aProperty.Value >>= m_sMasterLabel) )
+                    SAL_WARN("extensions.propctrlr", "implInitialize: unable to get property MasterLabel");
                 return;
             }
         }


More information about the Libreoffice-commits mailing list