summaryrefslogtreecommitdiff
path: root/test/source/sheet/xsubtotalfield.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/source/sheet/xsubtotalfield.cxx')
-rw-r--r--test/source/sheet/xsubtotalfield.cxx6
1 files changed, 2 insertions, 4 deletions
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());