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

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Fri May 14 14:17:19 UTC 2021


 connectivity/source/drivers/calc/CDatabaseMetaData.cxx |   22 +++++++----------
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 23b39541ddab1bcbeeea9cb6ecb7b5f18d4220a3
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri May 14 14:06:04 2021 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri May 14 16:16:38 2021 +0200

    Directly initialize ODatabaseMetaDataResultSet in CDatabaseMetaData.cxx
    
    Change-Id: I32af6d9c699689b688d996c56fd5f64c5ed2f71d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115608
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
index bbed24e0c5e2..04945e71de6c 100644
--- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
@@ -175,12 +175,11 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables(
         OUString aName = aSheetNames[nSheet];
         if ( !lcl_IsEmptyOrHidden( xSheets, aName ) && match(tableNamePattern,aName,'\0') )
         {
-            ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
-            aRow.reserve(6);
-            aRow.push_back(new ORowSetValueDecorator(aName));
-            aRow.push_back(new ORowSetValueDecorator(aTable));
-            aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
-            aRows.push_back(aRow);
+            aRows.push_back( { nullptr, nullptr, nullptr,
+                               new ORowSetValueDecorator(aName),
+                               new ORowSetValueDecorator(aTable),
+                               ODatabaseMetaDataResultSet::getEmptyValue()
+                             } );
         }
     }
 
@@ -200,12 +199,11 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables(
                 OUString aName = aDBNames[nRange];
                 if ( !lcl_IsUnnamed( xRanges, aName ) && match(tableNamePattern,aName,'\0') )
                 {
-                    ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
-                    aRow.reserve(6);
-                    aRow.push_back(new ORowSetValueDecorator(aName));
-                    aRow.push_back(new ORowSetValueDecorator(aTable));
-                    aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
-                    aRows.push_back(aRow);
+                    aRows.push_back( { nullptr, nullptr, nullptr,
+                                       new ORowSetValueDecorator(aName),
+                                       new ORowSetValueDecorator(aTable),
+                                       ODatabaseMetaDataResultSet::getEmptyValue()
+                                     } );
                 }
             }
         }


More information about the Libreoffice-commits mailing list