test/source/chart/xchartdata.cxx               |    5 +-
 test/source/sheet/globalsheetsettings.cxx      |   16 ++++----
 test/source/sheet/sheetcell.cxx                |    6 +--
 test/source/sheet/sheetcellrange.cxx           |    6 +--
 test/source/sheet/sheetcellranges.cxx          |    6 +--
 test/source/sheet/xcellrangedata.cxx           |   11 +++--
 test/source/sheet/xcellrangeformula.cxx        |    2 -
 test/source/sheet/xconsolidationdescriptor.cxx |    3 -
 test/source/sheet/xdatapilottable2.cxx         |    2 -
 test/source/sheet/xdocumentauditing.cxx        |    8 +---
 test/source/sheet/xmultiformulatokens.cxx      |    3 -
 test/source/sheet/xrecentfunctions.cxx         |    3 +
 test/source/sheet/xscenarios.cxx               |    5 +-
 test/source/sheet/xsheetcellrangecontainer.cxx |   11 +++--
 test/source/sheet/xsheetfilterable.cxx         |   48 ++++++++++++++-----------
 test/source/sheet/xsubtotalcalculatable.cxx    |   12 ++----
 test/source/sheet/xsubtotaldescriptor.cxx      |    6 +--
 test/source/sheet/xsubtotalfield.cxx           |    6 +--
 test/source/style/xstyleloader.cxx             |    2 -
 test/source/table/xtablechart.cxx              |    2 -
 test/source/table/xtablecharts.cxx             |    3 -
 21 files changed, 82 insertions(+), 84 deletions(-)

New commits:
commit eafa99c6c4904bce9bf692eca97562af92cd633e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 29 10:15:13 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Oct 31 20:27:57 2021 +0100

    Prepare for removal of non-const operator[] from Sequence in test
    
    Change-Id: I9f2c0deda676b10377b0a4572d26422cb0d8b807
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124399
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/test/source/chart/xchartdata.cxx b/test/source/chart/xchartdata.cxx
index 68a9b82f191e..5d0dcb48f13f 100644
--- a/test/source/chart/xchartdata.cxx
+++ b/test/source/chart/xchartdata.cxx
@@ -75,7 +75,8 @@ void XChartData::testChartDataChangeEventListener()
 
     uno::Reference<chart::XChartDataArray> xCDD(xCD, uno::UNO_QUERY_THROW);
     uno::Sequence<uno::Sequence<double>> aData = xCDD->getData();
-    aData[0][0] += 1.0;
+    auto& rFirstCell = aData.getArray()[0].getArray()[0];
+    rFirstCell += 1.0;
     xCDD->setData(aData);
     CPPUNIT_ASSERT(pListener0->m_bListenerCalled);
     CPPUNIT_ASSERT(pListener1->m_bListenerCalled);
@@ -85,7 +86,7 @@ void XChartData::testChartDataChangeEventListener()
 
     xCD->removeChartDataChangeEventListener(
         uno::Reference<chart::XChartDataChangeEventListener>(pListener1));
-    aData[0][0] += 1.0;
+    rFirstCell += 1.0;
     xCDD->setData(aData);
     CPPUNIT_ASSERT(pListener0->m_bListenerCalled);
     CPPUNIT_ASSERT(!pListener1->m_bListenerCalled);
diff --git a/test/source/sheet/globalsheetsettings.cxx 
b/test/source/sheet/globalsheetsettings.cxx
index 5018120ae3f5..78b6d88009dc 100644
--- a/test/source/sheet/globalsheetsettings.cxx
+++ b/test/source/sheet/globalsheetsettings.cxx
@@ -151,14 +151,14 @@ void 
GlobalSheetSettings::testGlobalSheetSettingsProperties()
                                  aStatusBarFunction);
 
     propName = "UserLists";
-    uno::Sequence<OUString> aSeq(6);
-    aSeq[0] = "Sun,Mon,Tue,Wed,Thu,Fri,Sat";
-    aSeq[1] = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday";
-    aSeq[2] = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec";
-    aSeq[3]
-        = 
"January,February,March,April,May,June,July,August,September,October,November,December";
-    aSeq[4] = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Shabbat";
-    aSeq[5] = 
"Nissan,Iyar,Sivan,Tammuz,Av,Elul,Tishri,Heshvan,Kislev,Tevet,Shevat,Adar,Adar 
B";
+    uno::Sequence<OUString> aSeq{
+        "Sun,Mon,Tue,Wed,Thu,Fri,Sat",
+        "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
+        "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
+        
"January,February,March,April,May,June,July,August,September,October,November,December",
+        "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Shabbat",
+        
"Nissan,Iyar,Sivan,Tammuz,Av,Elul,Tishri,Heshvan,Kislev,Tevet,Shevat,Adar,Adar 
B"
+    };
 
     uno::Sequence<OUString> aUserLists;
     CPPUNIT_ASSERT(xGlobalSheetSettings->getPropertyValue(propName) >>= 
aUserLists);
diff --git a/test/source/sheet/sheetcell.cxx b/test/source/sheet/sheetcell.cxx
index e30847367b7d..d0a2c6c032bd 100644
--- a/test/source/sheet/sheetcell.cxx
+++ b/test/source/sheet/sheetcell.cxx
@@ -21,6 +21,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
+#include <comphelper/propertyvalue.hxx>
 #include <cppunit/TestAssert.h>
 
 using namespace com::sun::star;
@@ -104,9 +105,8 @@ void SheetCell::testSheetCellProperties()
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Able to set PropertyValue 
FormulaResultType2",
                                  aFormulaResultType2Get, 
aFormulaResultType2Set);
 
-    uno::Sequence<beans::PropertyValue> aPropValue(1);
-    aPropValue[0].Name = "StyleName";
-    aPropValue[0].Value <<= OUString("Result2");
+    uno::Sequence<beans::PropertyValue> aPropValue{ 
comphelper::makePropertyValue(
+        "StyleName", OUString("Result2")) };
 
     propName = "ConditionalFormat";
     uno::Reference<sheet::XSheetConditionalEntries> aConditionalFormatGet;
diff --git a/test/source/sheet/sheetcellrange.cxx 
b/test/source/sheet/sheetcellrange.cxx
index 93d121b3b46d..bf56849360c0 100644
--- a/test/source/sheet/sheetcellrange.cxx
+++ b/test/source/sheet/sheetcellrange.cxx
@@ -20,6 +20,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
+#include <comphelper/propertyvalue.hxx>
 #include <cppunit/TestAssert.h>
 
 using namespace com::sun::star;
@@ -55,9 +56,8 @@ void SheetCellRange::testSheetCellRangeProperties()
     CPPUNIT_ASSERT(xSheetCellRange->getPropertyValue(propName) >>= aSizeSet);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Able to set PropertyValue Size", aSizeGet, 
aSizeSet);
 
-    uno::Sequence<beans::PropertyValue> aPropValue(1);
-    aPropValue[0].Name = "StyleName";
-    aPropValue[0].Value <<= OUString("Result2");
+    uno::Sequence<beans::PropertyValue> aPropValue{ 
comphelper::makePropertyValue(
+        "StyleName", OUString("Result2")) };
 
     propName = "ConditionalFormat";
     uno::Reference<sheet::XSheetConditionalEntries> aConditionalFormatGet;
diff --git a/test/source/sheet/sheetcellranges.cxx 
b/test/source/sheet/sheetcellranges.cxx
index d48d28e0011b..9611a33bd5a3 100644
--- a/test/source/sheet/sheetcellranges.cxx
+++ b/test/source/sheet/sheetcellranges.cxx
@@ -17,6 +17,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 
+#include <comphelper/propertyvalue.hxx>
 #include <cppunit/TestAssert.h>
 
 using namespace com::sun::star;
@@ -30,9 +31,8 @@ void SheetCellRanges::testSheetCellRangesProperties()
     OUString propName;
     uno::Any aNewValue;
 
-    uno::Sequence<beans::PropertyValue> aPropValue(1);
-    aPropValue[0].Name = "StyleName";
-    aPropValue[0].Value <<= OUString("Result2");
+    uno::Sequence<beans::PropertyValue> aPropValue{ 
comphelper::makePropertyValue(
+        "StyleName", OUString("Result2")) };
 
     propName = "ConditionalFormat";
     uno::Reference<sheet::XSheetConditionalEntries> aConditionalFormatGet;
diff --git a/test/source/sheet/xcellrangedata.cxx 
b/test/source/sheet/xcellrangedata.cxx
index 6bd8f0f85171..eff1041475fc 100644
--- a/test/source/sheet/xcellrangedata.cxx
+++ b/test/source/sheet/xcellrangedata.cxx
@@ -26,12 +26,14 @@ namespace {
 
 void setValues(uno::Sequence< uno::Sequence < Any > >& rColRow, double nOffset)
 {
+    auto pColRow = rColRow.getArray();
     for (sal_Int32 i = 0; i < 4; ++i)
     {
-        rColRow[i].realloc(4);
+        pColRow[i].realloc(4);
+        auto pCol = pColRow[i].getArray();
         for (sal_Int32 j = 0; j < 4; ++j)
         {
-            Any& aAny = rColRow[i][j];
+            Any& aAny = pCol[j];
             double nValue = i + j + nOffset;
             aAny <<= nValue;
         }
@@ -44,8 +46,7 @@ void XCellRangeData::testSetDataArray()
 {
     uno::Reference< sheet::XCellRangeData > xCellRangeData( 
getXCellRangeData(), UNO_QUERY_THROW);
 
-    uno::Sequence< uno::Sequence < Any > > aColRow;
-    aColRow.realloc(4);
+    uno::Sequence< uno::Sequence < Any > > aColRow(4);
     setValues(aColRow, 1);
     xCellRangeData->setDataArray(aColRow);
 
@@ -53,7 +54,7 @@ void XCellRangeData::testSetDataArray()
     {
         for ( sal_Int32 j = 0; j < aColRow[i].getLength(); ++j)
         {
-            Any& aAny = aColRow[i][j];
+            const Any& aAny = aColRow[i][j];
             double nValue = 0.0;
             CPPUNIT_ASSERT( aAny >>= nValue);
             CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<double>(i+j+1), nValue, 
0.000001);
diff --git a/test/source/sheet/xcellrangeformula.cxx 
b/test/source/sheet/xcellrangeformula.cxx
index 8a2eeb220ba2..ce7fc54eb620 100644
--- a/test/source/sheet/xcellrangeformula.cxx
+++ b/test/source/sheet/xcellrangeformula.cxx
@@ -26,7 +26,7 @@ void XCellRangeFormula::testGetSetFormulaArray()
 
     uno::Sequence<uno::Sequence<OUString>> aFormulaArrayOriginal = 
xCRF->getFormulaArray();
     uno::Sequence<uno::Sequence<OUString>> aFormulaArrayNew = 
xCRF->getFormulaArray();
-    aFormulaArrayNew[0][0] = "NewValue";
+    aFormulaArrayNew.getArray()[0].getArray()[0] = "NewValue";
 
     xCRF->setFormulaArray(aFormulaArrayNew);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get new FormulaArray", 
OUString("NewValue"),
diff --git a/test/source/sheet/xconsolidationdescriptor.cxx 
b/test/source/sheet/xconsolidationdescriptor.cxx
index 455533c23695..45ba69877eb4 100644
--- a/test/source/sheet/xconsolidationdescriptor.cxx
+++ b/test/source/sheet/xconsolidationdescriptor.cxx
@@ -57,8 +57,7 @@ void XConsolidationDescriptor::testSetSources()
     uno::Reference<sheet::XConsolidationDescriptor> 
xConsolidationDescriptor(init(),
                                                                              
UNO_QUERY_THROW);
 
-    uno::Sequence<table::CellRangeAddress> aSources(1);
-    aSources[0] = table::CellRangeAddress(0, 1, 1, 5, 5);
+    uno::Sequence<table::CellRangeAddress> aSources{ 
table::CellRangeAddress(0, 1, 1, 5, 5) };
     xConsolidationDescriptor->setSources(aSources);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to set sources", 
table::CellRangeAddress(0, 1, 1, 5, 5),
                                  xConsolidationDescriptor->getSources()[0]);
diff --git a/test/source/sheet/xdatapilottable2.cxx 
b/test/source/sheet/xdatapilottable2.cxx
index eccd132f6af7..2e802eeadbda 100644
--- a/test/source/sheet/xdatapilottable2.cxx
+++ b/test/source/sheet/xdatapilottable2.cxx
@@ -265,7 +265,7 @@ void 
XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpread
     {
         for(sal_Int32 y = 0; y < aSheetData[x].getLength(); ++y)
         {
-            Any& aCell1 = aSheetData[x][y];
+            const Any& aCell1 = aSheetData[x][y];
             const Any& aCell2 = aData[x][y];
             CPPUNIT_ASSERT_EQUAL(aCell2, aCell1);
         }
diff --git a/test/source/sheet/xdocumentauditing.cxx 
b/test/source/sheet/xdocumentauditing.cxx
index 3a08fdb2e729..8728f02bfd8d 100644
--- a/test/source/sheet/xdocumentauditing.cxx
+++ b/test/source/sheet/xdocumentauditing.cxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
 
 #include <cppunit/TestAssert.h>
 
@@ -93,11 +94,8 @@ void XDocumentAuditing::testRefreshArrows()
     if (xDrawPage->hasElements())
         nDrawPageElementCount = xDrawPage->getCount();
 
-    uno::Sequence<beans::PropertyValue> aPropertyValue(1);
-    uno::Any aValue;
-    aValue <<= false;
-    aPropertyValue[0].Name = "AutoRefreshArrows";
-    aPropertyValue[0].Value = aValue;
+    uno::Sequence<beans::PropertyValue> aPropertyValue{ 
comphelper::makePropertyValue(
+        "AutoRefreshArrows", false) };
     uno::Reference<frame::XModel> xModel(xDocumentAuditing, UNO_QUERY_THROW);
     dispatch(xModel->getCurrentController()->getFrame(), aPropertyValue);
 
diff --git a/test/source/sheet/xmultiformulatokens.cxx 
b/test/source/sheet/xmultiformulatokens.cxx
index 54e8a4e8803d..ac2b76382b66 100644
--- a/test/source/sheet/xmultiformulatokens.cxx
+++ b/test/source/sheet/xmultiformulatokens.cxx
@@ -32,8 +32,7 @@ void XMultiFormulaTokens::testGetSetTokens()
 {
     uno::Reference<sheet::XMultiFormulaTokens> xMFT(init(), 
uno::UNO_QUERY_THROW);
 
-    uno::Sequence<sheet::FormulaToken> aTokens(1);
-    aTokens[0].OpCode = 2;
+    uno::Sequence<sheet::FormulaToken> aTokens{ { /* OpCode */ 2, /* Data */ 
{} } };
     xMFT->setTokens(0, aTokens);
 
     CPPUNIT_ASSERT_EQUAL(aTokens[0].OpCode, xMFT->getTokens(0)[0].OpCode);
diff --git a/test/source/sheet/xrecentfunctions.cxx 
b/test/source/sheet/xrecentfunctions.cxx
index 7dded7f3516c..5680b666a2c6 100644
--- a/test/source/sheet/xrecentfunctions.cxx
+++ b/test/source/sheet/xrecentfunctions.cxx
@@ -50,13 +50,14 @@ void XRecentFunctions::testSetRecentFunctionIds()
 
     // max. size list
     aIds.realloc(nMaxNumber);
+    auto pIds = aIds.getArray();
     std::random_device rd;
     std::mt19937 gen(rd());
     std::uniform_int_distribution<> distr(1, nMaxNumber + 1);
 
     int nStartIdx = distr(gen);
     for (int i = nStartIdx; i < nStartIdx + nMaxNumber; i++)
-        aIds[i - nStartIdx] = 1;
+        pIds[i - nStartIdx] = 1;
 
     xRecentFunctions->setRecentFunctionIds(aIds);
 
diff --git a/test/source/sheet/xscenarios.cxx b/test/source/sheet/xscenarios.cxx
index d2335dda7e9b..77781361ea22 100644
--- a/test/source/sheet/xscenarios.cxx
+++ b/test/source/sheet/xscenarios.cxx
@@ -25,9 +25,8 @@ void XScenarios::testAddNewByName()
 {
     uno::Reference<sheet::XScenarios> xScenarios(init(), UNO_QUERY_THROW);
 
-    uno::Sequence<table::CellRangeAddress> aCellRangeAddresses(1);
-    aCellRangeAddresses[0] = table::CellRangeAddress(0, 0, 0, 0, 0);
-
+    uno::Sequence<table::CellRangeAddress> aCellRangeAddresses{ 
table::CellRangeAddress(0, 0, 0, 0,
+                                                                               
         0) };
     xScenarios->addNewByName("XScenarios2", aCellRangeAddresses, "new");
     CPPUNIT_ASSERT_MESSAGE("Unable to add new XScenario", 
xScenarios->hasByName("XScenarios2"));
 }
diff --git a/test/source/sheet/xsheetcellrangecontainer.cxx 
b/test/source/sheet/xsheetcellrangecontainer.cxx
index 3a4f356c7df0..af5d02d70a88 100644
--- a/test/source/sheet/xsheetcellrangecontainer.cxx
+++ b/test/source/sheet/xsheetcellrangecontainer.cxx
@@ -84,13 +84,14 @@ void XSheetCellRangeContainer::testAddRemoveRangeAddresses()
 uno::Sequence<table::CellRangeAddress> 
XSheetCellRangeContainer::createCellRangeAddresses()
 {
     uno::Sequence<table::CellRangeAddress> aAddr(2);
+    auto pAddr = aAddr.getArray();
     for (unsigned int i = 0; i < 2; i++)
     {
-        aAddr[i].Sheet = i;
-        aAddr[i].StartColumn = i;
-        aAddr[i].StartRow = i;
-        aAddr[i].EndColumn = i + 3;
-        aAddr[i].EndRow = i + 3;
+        pAddr[i].Sheet = i;
+        pAddr[i].StartColumn = i;
+        pAddr[i].StartRow = i;
+        pAddr[i].EndColumn = i + 3;
+        pAddr[i].EndRow = i + 3;
     }
 
     return aAddr;
diff --git a/test/source/sheet/xsheetfilterable.cxx 
b/test/source/sheet/xsheetfilterable.cxx
index a6c8b59016ba..2f5509e95f98 100644
--- a/test/source/sheet/xsheetfilterable.cxx
+++ b/test/source/sheet/xsheetfilterable.cxx
@@ -32,16 +32,20 @@ void XSheetFilterable::testCreateFilterDescriptor()
     uno::Reference< sheet::XSheetFilterable > xFA(init(), UNO_QUERY_THROW);
     uno::Reference< sheet::XSheetFilterDescriptor > xSFD = 
xFA->createFilterDescriptor(true);
 
-    uno::Sequence< sheet::TableFilterField > xTFF;
-    xTFF.realloc(2);
-    xTFF[0].IsNumeric = true;
-    xTFF[0].Field = 0;
-    xTFF[0].NumericValue = 2;
-    xTFF[0].Operator = sheet::FilterOperator_GREATER_EQUAL;
-    xTFF[1].IsNumeric = false;
-    xTFF[1].Field = 1;
-    xTFF[1].StringValue = "C";
-    xTFF[1].Operator = sheet::FilterOperator_LESS;
+    uno::Sequence< sheet::TableFilterField > xTFF{
+        { /* Connection   */ {},
+          /* Field        */ 0,
+          /* Operator     */ sheet::FilterOperator_GREATER_EQUAL,
+          /* IsNumeric    */ true,
+          /* NumericValue */ 2,
+          /* StringValue  */ {}},
+        { /* Connection   */ {},
+          /* Field        */ 1,
+          /* Operator     */ sheet::FilterOperator_LESS,
+          /* IsNumeric    */ false,
+          /* NumericValue */ {},
+          /* StringValue  */ "C" }
+    };
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to create XSheetFilterDescriptor", 
xSFD->setFilterFields(xTFF));
 }
@@ -53,16 +57,20 @@ void XSheetFilterable::testFilter()
     uno::Reference< sheet::XSheetFilterable > xFA(xSheet, UNO_QUERY_THROW);
     uno::Reference< sheet::XSheetFilterDescriptor > xSFD = 
xFA->createFilterDescriptor(true);
 
-    uno::Sequence< sheet::TableFilterField > xTFF;
-    xTFF.realloc(2);
-    xTFF[0].IsNumeric = true;
-    xTFF[0].Field = 0;
-    xTFF[0].NumericValue = 2;
-    xTFF[0].Operator = sheet::FilterOperator_GREATER_EQUAL;
-    xTFF[1].IsNumeric = false;
-    xTFF[1].Field = 1;
-    xTFF[1].StringValue = "C";
-    xTFF[1].Operator = sheet::FilterOperator_LESS;
+    uno::Sequence< sheet::TableFilterField > xTFF{
+        { /* Connection   */ {},
+          /* Field        */ 0,
+          /* Operator     */ sheet::FilterOperator_GREATER_EQUAL,
+          /* IsNumeric    */ true,
+          /* NumericValue */ 2,
+          /* StringValue  */ {}},
+        { /* Connection   */ {},
+          /* Field        */ 1,
+          /* Operator     */ sheet::FilterOperator_LESS,
+          /* IsNumeric    */ false,
+          /* NumericValue */ {},
+          /* StringValue  */ "C" }
+    };
     xSFD->setFilterFields(xTFF);
 
     xSheet->getCellByPosition(0, 0)->setValue(1);
diff --git a/test/source/sheet/xsubtotalcalculatable.cxx 
b/test/source/sheet/xsubtotalcalculatable.cxx
index 3a85c923bfaf..ad29154d60a4 100644
--- a/test/source/sheet/xsubtotalcalculatable.cxx
+++ b/test/source/sheet/xsubtotalcalculatable.cxx
@@ -30,10 +30,8 @@ void XSubTotalCalculatable::testCreateSubTotalDescriptor()
     uno::Reference< sheet::XSubTotalCalculatable > xSTC(init(), 
uno::UNO_QUERY_THROW);
     uno::Reference< sheet::XSubTotalDescriptor > xSTD = 
xSTC->createSubTotalDescriptor(true);
 
-    uno::Sequence< sheet::SubTotalColumn > xCols;
-    xCols.realloc(1);
-    xCols[0].Column = 5;
-    xCols[0].Function = sheet::GeneralFunction_SUM;
+    uno::Sequence< sheet::SubTotalColumn > xCols{ { /* Column   */ 5,
+                                                    /* Function */ 
sheet::GeneralFunction_SUM } };
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to create XSubTotalDescriptor", 
xSTD->addNew(xCols, 1));
 }
@@ -44,10 +42,8 @@ void XSubTotalCalculatable::testApplyRemoveSubTotals()
     uno::Reference< sheet::XSubTotalCalculatable > xSTC(xSheet, 
UNO_QUERY_THROW);
 
     uno::Reference< sheet::XSubTotalDescriptor > xSTD = 
xSTC->createSubTotalDescriptor(true);
-    uno::Sequence< sheet::SubTotalColumn > xCols;
-    xCols.realloc(1);
-    xCols[0].Column = 0;
-    xCols[0].Function = sheet::GeneralFunction_SUM;
+    uno::Sequence< sheet::SubTotalColumn > xCols{ { /* Column   */ 0,
+                                                    /* Function */ 
sheet::GeneralFunction_SUM } };
     xSTD->addNew(xCols, 1);
 
     xSheet->getCellByPosition(0, 0)->setFormula("first");
diff --git a/test/source/sheet/xsubtotaldescriptor.cxx 
b/test/source/sheet/xsubtotaldescriptor.cxx
index 87c2083ef9f5..037963a28cf5 100644
--- a/test/source/sheet/xsubtotaldescriptor.cxx
+++ b/test/source/sheet/xsubtotaldescriptor.cxx
@@ -27,10 +27,8 @@ void XSubTotalDescriptor::testAddNew()
 {
     uno::Reference<sheet::XSubTotalDescriptor> xSTD(init(), 
uno::UNO_QUERY_THROW);
 
-    uno::Sequence<sheet::SubTotalColumn> xCols;
-    xCols.realloc(1);
-    xCols[0].Column = 5;
-    xCols[0].Function = sheet::GeneralFunction_SUM;
+    uno::Sequence<sheet::SubTotalColumn> xCols{ { /* Column   */ 5,
+                                                  /* Function */ 
sheet::GeneralFunction_SUM } };
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to add column", 
xSTD->addNew(xCols, 1));
 }
diff --git a/test/source/sheet/xsubtotalfield.cxx 
b/test/source/sheet/xsubtotalfield.cxx
index 048d005dce23..dd022af10f14 100644
--- a/test/source/sheet/xsubtotalfield.cxx
+++ b/test/source/sheet/xsubtotalfield.cxx
@@ -65,10 +65,8 @@ void XSubTotalField::testGetSetTotalColumns()
     uno::Sequence< sheet::SubTotalColumn > sDefaultCols = 
xSTF->getSubTotalColumns();
     CPPUNIT_ASSERT_MESSAGE("Unable to get SubTotalColumns", 
sDefaultCols.hasElements());
 
-    uno::Sequence< sheet::SubTotalColumn > sNewCols;
-    sNewCols.realloc(1);
-    sNewCols[0].Column = 5;
-    sNewCols[0].Function = sheet::GeneralFunction_AVERAGE;
+    uno::Sequence< sheet::SubTotalColumn > sNewCols{ { /* Column   */ 5,
+                                                       /* Function */ 
sheet::GeneralFunction_AVERAGE } };
     xSTF->setSubTotalColumns(sNewCols);
 
     CPPUNIT_ASSERT_MESSAGE("Unable to set SubTotalColumns", sDefaultCols != 
xSTF->getSubTotalColumns());
diff --git a/test/source/style/xstyleloader.cxx 
b/test/source/style/xstyleloader.cxx
index fd3f8eec5303..4b58758d9e8b 100644
--- a/test/source/style/xstyleloader.cxx
+++ b/test/source/style/xstyleloader.cxx
@@ -76,7 +76,7 @@ void XStyleLoader::testLoadStylesFromStream()
     uno::Any aTmp;
     aTmp <<= xInputStream;
     aInputStream.Value = aTmp;
-    aOptions[nLength] = aInputStream;
+    aOptions.getArray()[nLength] = aInputStream;
 
     xStyleLoader->loadStylesFromURL("private:stream", aOptions);
 
diff --git a/test/source/table/xtablechart.cxx 
b/test/source/table/xtablechart.cxx
index a1c33ceaba63..38a43eee670b 100644
--- a/test/source/table/xtablechart.cxx
+++ b/test/source/table/xtablechart.cxx
@@ -49,7 +49,7 @@ void XTableChart::testGetSetRanges()
     uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
 
     uno::Sequence<table::CellRangeAddress> aCRA = xTC->getRanges();
-    aCRA[0].EndRow = 1;
+    aCRA.getArray()[0].EndRow = 1;
 
     xTC->setRanges(aCRA);
 
diff --git a/test/source/table/xtablecharts.cxx 
b/test/source/table/xtablecharts.cxx
index 2f11a0d29c47..15aa710ffca3 100644
--- a/test/source/table/xtablecharts.cxx
+++ b/test/source/table/xtablecharts.cxx
@@ -26,8 +26,7 @@ void XTableCharts::testAddNewRemoveByName()
 {
     uno::Reference<table::XTableCharts> xTC(init(), uno::UNO_QUERY_THROW);
 
-    uno::Sequence<table::CellRangeAddress> aRanges(1);
-    aRanges[0] = table::CellRangeAddress(0, 1, 1, 14, 4);
+    uno::Sequence<table::CellRangeAddress> aRanges{ table::CellRangeAddress(0, 
1, 1, 14, 4) };
     xTC->addNewByName("XTableCharts", awt::Rectangle(500, 3000, 25000, 11000), 
aRanges, true, true);
     CPPUNIT_ASSERT(xTC->hasByName("XTableCharts"));
 

Reply via email to