sc/qa/perf/scperfobj.cxx |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 32c01c6653b85082e2d5e03ab3095768402834eb
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Nov 6 12:20:11 2021 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sat Nov 6 13:14:42 2021 +0100

    Try to fix Jenkins_Callgrind
    
    Change-Id: I9e099c7ab59fc8db1deaae454b413f3b5dc62b55
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124790
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx
index 7b9ed7927098..3a45daabbae2 100644
--- a/sc/qa/perf/scperfobj.cxx
+++ b/sc/qa/perf/scperfobj.cxx
@@ -475,12 +475,7 @@ void ScPerfObj::testSubTotalWithFormulas()
     uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = 
xSub->createSubTotalDescriptor(true);
 
     // Create the column used for subtotal
-    uno::Sequence < sheet::SubTotalColumn > xSubTotalColumns;
-    xSubTotalColumns.realloc(1);
-
-    // Add the column to the descriptor
-    xSubTotalColumns[0].Column   = 1;
-    xSubTotalColumns[0].Function = sheet::GeneralFunction_SUM;
+    uno::Sequence < sheet::SubTotalColumn > xSubTotalColumns { { 1, 
sheet::GeneralFunction_SUM } };
 
     xSubDesc->addNew(xSubTotalColumns, 0);
 
@@ -511,12 +506,7 @@ void ScPerfObj::testSubTotalWithoutFormulas()
     uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = 
xSub->createSubTotalDescriptor(true);
 
     // Create the column used for subtotal
-    uno::Sequence < sheet::SubTotalColumn> xSubTotalColumns;
-    xSubTotalColumns.realloc(1);
-
-    // Add the column to the descriptor
-    xSubTotalColumns[0].Column   = 1;
-    xSubTotalColumns[0].Function = sheet::GeneralFunction_SUM;
+    uno::Sequence < sheet::SubTotalColumn> xSubTotalColumns { { 1, 
sheet::GeneralFunction_SUM } };
 
     xSubDesc->addNew(xSubTotalColumns, 0);
 
@@ -549,9 +539,10 @@ namespace {
             xSheetCellRange->getCellRangeByName(rCellRange), UNO_QUERY);
 
         uno::Sequence< uno::Sequence< OUString > > aFormulae(1000);
+        auto pFormulae = aFormulae.getArray();
         for (sal_Int32 i = 0; i < 1000; ++i)
         {
-            aFormulae[i] = { rFormula };
+            pFormulae[i] = { rFormula };
         }
 
         // NB. not set Array (matrix) formula

Reply via email to