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

Jens Carl (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 1 19:31:38 UTC 2019


 connectivity/source/commontools/dbmetadata.cxx |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

New commits:
commit af36ccc2143a7181964cc87077303ac5a5be205e
Author:     Jens Carl <j.carl43 at gmx.de>
AuthorDate: Fri May 31 20:57:52 2019 +0000
Commit:     Jens Carl <j.carl43 at gmx.de>
CommitDate: Sat Jun 1 21:31:00 2019 +0200

    tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)
    
    Replace OSL_VERIFY with if-statement and SAL_WARN.
    
    Change-Id: Iccc7e079d9f8778060bbebba3f8e9204fc351d8e
    Reviewed-on: https://gerrit.libreoffice.org/73289
    Tested-by: Jenkins
    Reviewed-by: Jens Carl <j.carl43 at gmx.de>

diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 4f4aa1e09353..026381e0377b 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -37,6 +37,7 @@
 #include <comphelper/namedvaluecollection.hxx>
 #include <comphelper/processfactory.hxx>
 #include <sal/macros.h>
+#include <sal/log.hxx>
 
 #include <boost/optional.hpp>
 
@@ -278,7 +279,8 @@ namespace dbtools
         bool restrict( false );
         Any setting;
         if ( lcl_getConnectionSetting( "EnableSQL92Check", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= restrict );
+            if( ! (setting >>= restrict) )
+                SAL_WARN("connectivity.commontools", "restrictIdentifiersToSQL92: unable to assign EnableSQL92Check");
         return restrict;
     }
 
@@ -288,7 +290,8 @@ namespace dbtools
         bool doGenerate( false );
         Any setting;
         if ( lcl_getConnectionSetting( "GenerateASBeforeCorrelationName", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= doGenerate );
+            if( ! (setting >>= doGenerate) )
+                SAL_WARN("connectivity.commontools", "generateASBeforeCorrelationName: unable to assign GenerateASBeforeCorrelationName");
         return doGenerate;
     }
 
@@ -297,7 +300,8 @@ namespace dbtools
         bool doGenerate( true );
         Any setting;
         if ( lcl_getConnectionSetting( "EscapeDateTime", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= doGenerate );
+            if( ! (setting >>= doGenerate) )
+                SAL_WARN("connectivity.commontools", "shouldEscapeDateTime: unable to assign EscapeDateTime");
         return doGenerate;
     }
 
@@ -306,7 +310,8 @@ namespace dbtools
         bool doSubstitute( true );
         Any setting;
         if ( lcl_getConnectionSetting( "ParameterNameSubstitution", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= doSubstitute );
+            if( ! (setting >>= doSubstitute) )
+                SAL_WARN("connectivity.commontools", "shouldSubstituteParameterNames: unable to assign ParameterNameSubstitution");
         return doSubstitute;
     }
 
@@ -315,7 +320,8 @@ namespace dbtools
         bool is( true );
         Any setting;
         if ( lcl_getDriverSetting( "AutoIncrementIsPrimaryKey", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= is );
+            if( ! (setting >>= is) )
+                SAL_WARN("connectivity.commontools", "isAutoIncrementPrimaryKey: unable to assign AutoIncrementIsPrimaryKey");
         return is;
     }
 
@@ -324,7 +330,8 @@ namespace dbtools
         sal_Int32 mode( BooleanComparisonMode::EQUAL_INTEGER );
         Any setting;
         if ( lcl_getConnectionSetting( "BooleanComparisonMode", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= mode );
+            if( ! (setting >>= mode) )
+                SAL_WARN("connectivity.commontools", "getBooleanComparisonMode: unable to assign BooleanComparisonMode");
         return mode;
     }
 
@@ -361,7 +368,8 @@ namespace dbtools
         bool doGenerate( true );
         Any setting;
         if ( lcl_getConnectionSetting( "ColumnAliasInOrderBy", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= doGenerate );
+            if( ! (setting >>= doGenerate) )
+                SAL_WARN("connectivity.commontools", "supportsColumnAliasInOrderBy: unable to assign ColumnAliasInOrderBy");
         return doGenerate;
     }
 
@@ -401,7 +409,8 @@ namespace dbtools
 #ifdef IMPLEMENTED_LATER
         Any setting;
         if ( lcl_getConnectionSetting( "DisplayEmptyTableFolders", *m_pImpl, setting ) )
-            OSL_VERIFY( setting >>= doDisplay );
+            if( ! (setting >>= doDisplay) )
+                SAL_WARN("connectivity.commontools", "displayEmptyTableFolders: unable to assign DisplayEmptyTableFolders");
 #else
         try
         {


More information about the Libreoffice-commits mailing list