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

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon May 17 16:49:17 UTC 2021


 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |   38 +++++-----
 connectivity/source/drivers/file/FDriver.cxx             |   24 +++---
 connectivity/source/drivers/flat/EDatabaseMetaData.cxx   |   38 +++++-----
 connectivity/source/drivers/flat/EDriver.cxx             |   20 ++---
 connectivity/source/drivers/jdbc/JDriver.cxx             |   52 +++++++--------
 5 files changed, 86 insertions(+), 86 deletions(-)

New commits:
commit 08ffd34d5274e745a1400c70f94fc297f5ad8569
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun May 16 20:36:59 2021 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon May 17 18:48:35 2021 +0200

    Simplify some initializations in connectivity
    
    Change-Id: I980b59f06fb6004ba23279c8364cb0587e7ac8fc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115679
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 455bf09e6733..6c798e5a166c 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1013,25 +1013,25 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw(  )
         ODatabaseMetaDataResultSet::ORows tmp(2);
         ODatabaseMetaDataResultSet::ORow aRow
         {
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { new ORowSetValueDecorator(OUString("VARCHAR")) },
-            { new ORowSetValueDecorator(DataType::VARCHAR) },
-            { new ORowSetValueDecorator(sal_Int32(s_nCHAR_OCTET_LENGTH)) },
-            { ODatabaseMetaDataResultSet::getQuoteValue() },
-            { ODatabaseMetaDataResultSet::getQuoteValue() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { ODatabaseMetaDataResultSet::get1Value() },
-            { ODatabaseMetaDataResultSet::get1Value() },
-            { new ORowSetValueDecorator(sal_Int32(ColumnSearch::FULL)) },
-            { ODatabaseMetaDataResultSet::get1Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { new ORowSetValueDecorator(sal_Int32(10)) }
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             new ORowSetValueDecorator(OUString("VARCHAR")) ,
+             new ORowSetValueDecorator(DataType::VARCHAR) ,
+             new ORowSetValueDecorator(sal_Int32(s_nCHAR_OCTET_LENGTH)) ,
+             ODatabaseMetaDataResultSet::getQuoteValue() ,
+             ODatabaseMetaDataResultSet::getQuoteValue() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             ODatabaseMetaDataResultSet::get1Value() ,
+             ODatabaseMetaDataResultSet::get1Value() ,
+             new ORowSetValueDecorator(sal_Int32(ColumnSearch::FULL)) ,
+             ODatabaseMetaDataResultSet::get1Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             new ORowSetValueDecorator(sal_Int32(10))
         };
 
         tmp.push_back(aRow);
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index f536df64039d..5c251a402b5b 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -104,47 +104,47 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUSt
 
         std::vector< DriverPropertyInfo > aDriverInfo
         {
-             { DriverPropertyInfo(
+             {
                 "CharSet"
                 ,"CharSet of the database."
                 ,false
                 ,OUString()
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
              },
-             { DriverPropertyInfo(
+             {
                 "Extension"
                 ,"Extension of the file format."
                 ,false
                 ,".*"
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
              },
-             { DriverPropertyInfo(
+             {
                 "ShowDeleted"
                 ,"Display inactive records."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
              },
-             { DriverPropertyInfo(
+             {
                 "EnableSQL92Check"
                 ,"Use SQL92 naming constraints."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
              },
-             { DriverPropertyInfo(
+             {
                 "UseRelativePath"
                 ,"Handle the connection url as relative path."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
              },
-             { DriverPropertyInfo(
+             {
                 "URL"
                 ,"The URL of the database document which is used to create an absolute path."
                 ,false
                 ,OUString()
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
              }
         };
         return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size());
diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
index ff02c5827395..0170c67ed3b0 100644
--- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
@@ -56,25 +56,25 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw(  )
         ODatabaseMetaDataResultSet::ORows tmp(10);
         ODatabaseMetaDataResultSet::ORow aRow
         {
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { new ORowSetValueDecorator(OUString("CHAR")) },
-            { new ORowSetValueDecorator(DataType::CHAR) },
-            { new ORowSetValueDecorator(sal_Int32(254)) },
-            { ODatabaseMetaDataResultSet::getQuoteValue() },
-            { ODatabaseMetaDataResultSet::getQuoteValue() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { new ORowSetValueDecorator(sal_Int32(ColumnValue::NULLABLE)) },
-            { ODatabaseMetaDataResultSet::get1Value() },
-            { new ORowSetValueDecorator(sal_Int32(ColumnSearch::CHAR)) },
-            { ODatabaseMetaDataResultSet::get1Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::get0Value() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { ODatabaseMetaDataResultSet::getEmptyValue() },
-            { new ORowSetValueDecorator(sal_Int32(10)) }
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             new ORowSetValueDecorator(OUString("CHAR")) ,
+             new ORowSetValueDecorator(DataType::CHAR) ,
+             new ORowSetValueDecorator(sal_Int32(254)) ,
+             ODatabaseMetaDataResultSet::getQuoteValue() ,
+             ODatabaseMetaDataResultSet::getQuoteValue() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             new ORowSetValueDecorator(sal_Int32(ColumnValue::NULLABLE)) ,
+             ODatabaseMetaDataResultSet::get1Value() ,
+             new ORowSetValueDecorator(sal_Int32(ColumnSearch::CHAR)) ,
+             ODatabaseMetaDataResultSet::get1Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::get0Value() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             ODatabaseMetaDataResultSet::getEmptyValue() ,
+             new ORowSetValueDecorator(sal_Int32(10))
         };
 
         tmp.push_back(aRow);
diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx
index 6a1c4a37adef..6ab16eabee0e 100644
--- a/connectivity/source/drivers/flat/EDriver.cxx
+++ b/connectivity/source/drivers/flat/EDriver.cxx
@@ -88,40 +88,40 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString
 
         std::vector< DriverPropertyInfo > aDriverInfo
         {
-            { DriverPropertyInfo(
+            {
                 "FieldDelimiter"
                 ,"Field separator."
                 ,false
                 ,OUString()
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
             },
-            { DriverPropertyInfo(
+            {
                 "HeaderLine"
                 ,"Text contains headers."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
             },
-            { DriverPropertyInfo(
+            {
                 "StringDelimiter"
                 ,"Text separator."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
             },
-            { DriverPropertyInfo(
+            {
                 "DecimalDelimiter"
                 ,"Decimal separator."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
             },
-            { DriverPropertyInfo(
+            {
                 "ThousandDelimiter"
                 ,"Thousands separator."
                 ,false
                 ,"0"
-                ,aBoolean)
+                ,aBoolean
             }
         };
         return ::comphelper::concatSequences(OFileDriver::getPropertyInfo(url,info ),
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 16cfa9643291..beaa7a07ab1a 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -114,96 +114,96 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const
 
         std::vector< DriverPropertyInfo > aDriverInfo
         {
-            { DriverPropertyInfo(
+            {
                 "JavaDriverClass"
                 ,"The JDBC driver class name."
                 ,true
                 ,OUString()
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
             },
-            { DriverPropertyInfo(
+            {
                 "JavaDriverClassPath"
                 ,"The class path where to look for the JDBC driver."
                 ,true
                 , ""
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
             },
-            { DriverPropertyInfo(
+            {
                 "SystemProperties"
                 ,"Additional properties to set at java.lang.System before loading the driver."
                 ,true
                 , ""
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
             },
-            { DriverPropertyInfo(
+            {
                 "ParameterNameSubstitution"
                 ,"Change named parameters with '?'."
                 ,false
                 ,"false"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "IgnoreDriverPrivileges"
                 ,"Ignore the privileges from the database driver."
                 ,false
                 , "false"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "IsAutoRetrievingEnabled"
                 ,"Retrieve generated values."
                 ,false
                 ,"false"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "AutoRetrievingStatement"
                 ,"Auto-increment statement."
                 ,false
                 ,OUString()
-                ,Sequence< OUString >())
+                ,Sequence< OUString >()
             },
-            { DriverPropertyInfo(
+            {
                 "GenerateASBeforeCorrelationName"
                 ,"Generate AS before table correlation names."
                 ,false
                 ,"false"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "IgnoreCurrency"
                 ,"Ignore the currency field from the ResultsetMetaData."
                 ,false
                 ,"false"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "EscapeDateTime"
                 ,"Escape date time format."
                 ,false
                 ,"true"
-                ,aBooleanValues)
+                ,aBooleanValues
             },
-            { DriverPropertyInfo(
+            {
                 "TypeInfoSettings"
                 ,"Defines how the type info of the database metadata should be manipulated."
                 ,false
                 ,OUString()
-                ,Sequence< OUString > ())
+                ,Sequence< OUString > ()
             },
-            { DriverPropertyInfo(
+            {
                 "ImplicitCatalogRestriction"
                 ,"The catalog which should be used in getTables calls, when the caller passed NULL."
                 ,false
                 ,OUString( )
-                ,Sequence< OUString > ())
+                ,Sequence< OUString > ()
             },
-            { DriverPropertyInfo(
+            {
                 "ImplicitSchemaRestriction"
                 ,"The schema which should be used in getTables calls, when the caller passed NULL."
                 ,false
                 ,OUString( )
-                ,Sequence< OUString > ())
+                ,Sequence< OUString > ()
             }
         };
         return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size());


More information about the Libreoffice-commits mailing list