diff options
-rw-r--r-- | include/test/sheet/xsheetfilterableex.hxx | 36 | ||||
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv | 1 | ||||
-rw-r--r-- | qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv | 1 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java | 90 | ||||
-rw-r--r-- | sc/qa/extras/sccellcursorobj.cxx | 26 | ||||
-rw-r--r-- | sc/qa/extras/sccellrangeobj.cxx | 8 | ||||
-rw-r--r-- | sc/qa/extras/sctablesheetobj.cxx | 19 | ||||
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/sheet/xsheetfilterableex.cxx | 61 | ||||
-rw-r--r-- | test/source/sheet/xsubtotalcalculatable.cxx | 2 |
12 files changed, 134 insertions, 113 deletions
diff --git a/include/test/sheet/xsheetfilterableex.hxx b/include/test/sheet/xsheetfilterableex.hxx new file mode 100644 index 000000000000..959008386b81 --- /dev/null +++ b/include/test/sheet/xsheetfilterableex.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_TEST_SHEET_XSHEETFILTERABLEEX_HXX +#define INCLUDED_TEST_SHEET_XSHEETFILTERABLEEX_HXX + +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/Reference.hxx> + +#include <test/testdllapi.hxx> + +namespace apitest +{ + +class OOO_DLLPUBLIC_TEST XSheetFilterableEx +{ +public: + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + virtual css::uno::Reference<css::uno::XInterface> getXSpreadsheet() = 0; + + void testCreateFilterDescriptorByObject(); + +protected: + ~XSheetFilterableEx() {} +}; +} + +#endif // INCLUDED_TEST_SHEET_XSHEETFILTERABLEEX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 7faba4235a32..8418c1e65c41 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -618,7 +618,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationsSupplier \ qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \ qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \ - qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx \ qadevOOo/tests/java/ifc/sheet/_XSpreadsheetView \ qadevOOo/tests/java/ifc/style/_CharacterProperties \ qadevOOo/tests/java/ifc/style/_CharacterPropertiesAsian \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv index 4e672f8418af..0e5e6448c72b 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv @@ -117,7 +117,6 @@ "ScCellCursorObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex" "ScCellCursorObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()" "ScCellCursorObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()" -"ScCellCursorObj";"com::sun::star::sheet::XSheetFilterableEx";"createFilterDescriptorByObject()" "ScCellCursorObj";"com::sun::star::sheet::XArrayFormulaRange";"getArrayFormula()" "ScCellCursorObj";"com::sun::star::sheet::XArrayFormulaRange";"setArrayFormula()" "ScCellCursorObj";"com::sun::star::sheet::XCellRangeFormula#optional";"getFormulaArray()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv index cd2e335c7834..95186af1d9a2 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv @@ -112,7 +112,6 @@ "ScCellRangeObj";"com::sun::star::style::CharacterPropertiesComplex";"CharLocaleComplex" "ScCellRangeObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()" "ScCellRangeObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()" -"ScCellRangeObj";"com::sun::star::sheet::XSheetFilterableEx";"createFilterDescriptorByObject()" "ScCellRangeObj";"com::sun::star::sheet::XArrayFormulaRange";"getArrayFormula()" "ScCellRangeObj";"com::sun::star::sheet::XArrayFormulaRange";"setArrayFormula()" "ScCellRangeObj";"com::sun::star::sheet::XCellRangeFormula#optional";"getFormulaArray()" diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv index 1fd3970c58dd..4fbb1a5f92da 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv @@ -124,7 +124,6 @@ "ScTableSheetObj";"com::sun::star::util::XProtectable";"isProtected()" "ScTableSheetObj";"com::sun::star::sheet::XFormulaQuery";"queryDependents()" "ScTableSheetObj";"com::sun::star::sheet::XFormulaQuery";"queryPrecedents()" -"ScTableSheetObj";"com::sun::star::sheet::XSheetFilterableEx";"createFilterDescriptorByObject()" "ScTableSheetObj";"com::sun::star::sheet::XArrayFormulaRange";"getArrayFormula()" "ScTableSheetObj";"com::sun::star::sheet::XArrayFormulaRange";"setArrayFormula()" "ScTableSheetObj";"com::sun::star::sheet::XCellRangeFormula#optional";"getFormulaArray()" diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java b/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java deleted file mode 100644 index 84cdd224904a..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -package ifc.sheet; - -import lib.MultiMethodTest; - -import com.sun.star.sheet.TableFilterField; -import com.sun.star.sheet.XSheetFilterDescriptor; -import com.sun.star.sheet.XSheetFilterable; -import com.sun.star.sheet.XSheetFilterableEx; -import com.sun.star.uno.UnoRuntime; - - -/** - * Interface test for XSheetFilterableEx - * - * methods: - * - * createFilterDescriptorByObject - * - */ -public class _XSheetFilterableEx extends MultiMethodTest { - public XSheetFilterableEx oObj = null; - - /** - * queries a XSheetFilterable from the parent Object and then creates - * a XSheetFilterDescriptor with it. - * Returns OK if the Descriptor isn't null and checkFilterDescriptor returns true - */ - - public void _createFilterDescriptorByObject() { - boolean res = true; - Object parent = tEnv.getTestObject(); - XSheetFilterable aFilterable = UnoRuntime.queryInterface( - XSheetFilterable.class, parent); - XSheetFilterDescriptor desc = oObj.createFilterDescriptorByObject( - aFilterable); - - if (desc != null) { - res &= checkFilterDescriptor(desc); - } else { - log.println("gained XSheetFilterDescriptor is null"); - res &= false; - } - tRes.tested("createFilterDescriptorByObject()",res); - } - - /** - * returns true if the Method getFilterFields() returns a non empty array - * and all Fields can be gained without exception - */ - - public boolean checkFilterDescriptor(XSheetFilterDescriptor desc) { - TableFilterField[] fields = desc.getFilterFields(); - boolean res = true; - - if (fields.length == 0) { - log.println("The gained Descriptor is empty"); - res &= false; - } else { - log.println("Found "+fields.length+" TableFields"); - } - - for (int k = 0; k < fields.length; k++) { - log.println("StringValue(" + k + "): " + fields[k].StringValue); - log.println("IsNumeric(" + k + "): " + fields[k].IsNumeric); - log.println("NumericValue(" + k + "): " + fields[k].NumericValue); - log.println("Field(" + k + "): " + fields[k].Field); - log.println("Connection(" + k + "): " + fields[k].Connection); - log.println("Operator(" + k + "): " + fields[k].Operator); - } - - return res; - } -} diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx index f5663714b7be..26dcb3f86bc4 100644 --- a/sc/qa/extras/sccellcursorobj.cxx +++ b/sc/qa/extras/sccellcursorobj.cxx @@ -11,6 +11,7 @@ #include <test/sheet/xcellseries.hxx> #include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> +#include <test/sheet/xsheetfilterableex.hxx> #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xusedareacursor.hxx> @@ -25,11 +26,12 @@ using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 12 +#define NUMBER_OF_TESTS 13 class ScCellCursorObj : public CalcUnoApiTest, public apitest::XCellSeries, public apitest::XSheetCellRange, public apitest::XSheetFilterable, + public apitest::XSheetFilterableEx, public apitest::XSheetOperation, public apitest::XSubTotalCalculatable, public apitest::XUsedAreaCursor, @@ -60,6 +62,9 @@ public: CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testFilter); + // XSheetFilterableEx + CPPUNIT_TEST(testCreateFilterDescriptorByObject); + // XSheetOperation CPPUNIT_TEST(testComputeFunction); CPPUNIT_TEST(testClearContents); @@ -91,14 +96,17 @@ uno::Reference< uno::XInterface > ScCellCursorObj::init() { OUString aFileURL; createFileURL("ScCellCursorObj.ods", aFileURL); - if(!mxComponent.is()) + if (!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); - CPPUNIT_ASSERT(mxComponent.is()); + CPPUNIT_ASSERT_MESSAGE("no calc document", mxComponent.is()); - uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); - uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(0), UNO_QUERY_THROW); - uno::Reference< table::XCellCursor > xCellCursor( xSheet->createCursor(), UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIndex (xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), UNO_QUERY_THROW); + + uno::Reference<table::XCellRange> xCellRange = xSheet->getCellRangeByName("$A$1:$D$4"); + uno::Reference<sheet::XSheetCellRange> xSheetCellRange(xCellRange, UNO_QUERY_THROW); + uno::Reference<table::XCellCursor> xCellCursor(xSheet->createCursorByRange(xSheetCellRange), UNO_QUERY_THROW); return xCellCursor; } @@ -107,9 +115,9 @@ uno::Reference< uno::XInterface > ScCellCursorObj::getXSpreadsheet() { OUString aFileURL; createFileURL("ScCellCursorObj.ods", aFileURL); - if(!mxComponent.is()) + if (!mxComponent.is()) mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); - CPPUNIT_ASSERT(mxComponent.is()); + CPPUNIT_ASSERT_MESSAGE("no calc document", mxComponent.is()); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW); diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 49477e137e4c..d3735b6ad518 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -14,6 +14,7 @@ #include <test/sheet/xcellseries.hxx> #include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> +#include <test/sheet/xsheetfilterableex.hxx> #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsubtotalcalculatable.hxx> #include <test/sheet/xuniquecellformatrangessupplier.hxx> @@ -36,12 +37,13 @@ #include <com/sun/star/table/XTableRows.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> + using namespace css; using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 25 +#define NUMBER_OF_TESTS 26 class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, public apitest::XCellRangeData, @@ -51,6 +53,7 @@ class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties, public apitest::XSearchable, public apitest::XSheetCellRange, public apitest::XSheetFilterable, + public apitest::XSheetFilterableEx, public apitest::XSheetOperation, public apitest::XSubTotalCalculatable, public apitest::XUniqueCellFormatRangesSupplier @@ -88,6 +91,9 @@ public: // XSheetCellRange CPPUNIT_TEST(testGetSpreadsheet); + // XSheetFilterableEx + CPPUNIT_TEST(testCreateFilterDescriptorByObject); + // XReplaceable CPPUNIT_TEST(testReplaceAll); CPPUNIT_TEST(testCreateReplaceDescriptor); diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index 5f954cc5e66d..a1f836e7091a 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -12,6 +12,7 @@ #include <test/sheet/xprintareas.hxx> #include <test/sheet/xsheetcellrange.hxx> #include <test/sheet/xsheetfilterable.hxx> +#include <test/sheet/xsheetfilterableex.hxx> #include <test/sheet/xsheetlinkable.hxx> #include <test/sheet/xsheetoperation.hxx> #include <test/sheet/xsheetpagebreak.hxx> @@ -30,7 +31,7 @@ using namespace css::uno; namespace sc_apitest { -#define NUMBER_OF_TESTS 23 +#define NUMBER_OF_TESTS 24 class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries, public apitest::XPrintAreas, @@ -38,6 +39,7 @@ class ScTableSheetObj : public CalcUnoApiTest, public apitest::XCellSeries, public apitest::XSearchable, public apitest::XSheetCellRange, public apitest::XSheetFilterable, + public apitest::XSheetFilterableEx, public apitest::XSheetLinkable, public apitest::XSheetOperation, public apitest::XSheetPageBreak, @@ -82,6 +84,9 @@ public: CPPUNIT_TEST(testCreateFilterDescriptor); CPPUNIT_TEST(testFilter); + // XSheetFilterableEx + CPPUNIT_TEST(testCreateFilterDescriptorByObject); + // XSheetLinkable CPPUNIT_TEST(testSheetLinkable); @@ -126,9 +131,8 @@ ScTableSheetObj::ScTableSheetObj(): uno::Reference< uno::XInterface > ScTableSheetObj::init() { - //OUString aFileURL; createFileURL("ScTableSheetObj.ods", maFileURL); - if(!mxComponent.is()) + if (!mxComponent.is()) mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); @@ -141,15 +145,14 @@ uno::Reference< uno::XInterface > ScTableSheetObj::init() uno::Reference< uno::XInterface > ScTableSheetObj::getXSpreadsheet() { - OUString aFileURL; - createFileURL("ScTableSheetObj.ods", aFileURL); - if(!mxComponent.is()) - mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument"); + createFileURL("ScTableSheetObj.ods", maFileURL); + if (!mxComponent.is()) + mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT(mxComponent.is()); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(1), UNO_QUERY_THROW); + uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(0), UNO_QUERY_THROW); return xSheet; } diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index eb8fc2d1d97e..49eab32c01cd 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -77,6 +77,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/sheet/xsheetconditionalentry \ test/source/sheet/xsheetcondition \ test/source/sheet/xsheetfilterable \ + test/source/sheet/xsheetfilterableex \ test/source/sheet/xsheetfilterdescriptor \ test/source/sheet/xsheetoutline \ test/source/sheet/xsheetlinkable \ diff --git a/test/source/sheet/xsheetfilterableex.cxx b/test/source/sheet/xsheetfilterableex.cxx new file mode 100644 index 000000000000..d3d23d7ce60f --- /dev/null +++ b/test/source/sheet/xsheetfilterableex.cxx @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <test/sheet/xsheetfilterableex.hxx> + +#include <com/sun/star/sheet/FilterConnection.hpp> +#include <com/sun/star/sheet/FilterOperator.hpp> +#include <com/sun/star/sheet/TableFilterField.hpp> +#include <com/sun/star/sheet/XSheetFilterDescriptor.hpp> +#include <com/sun/star/sheet/XSheetFilterable.hpp> +#include <com/sun/star/sheet/XSheetFilterableEx.hpp> +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <com/sun/star/table/XCellCursor.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> + +#include <cppunit/extensions/HelperMacros.h> + +using namespace css; +using namespace css::uno; + +namespace apitest +{ +void XSheetFilterableEx::testCreateFilterDescriptorByObject() +{ + uno::Reference<sheet::XSheetFilterableEx> xSFEx(init(), UNO_QUERY_THROW); + uno::Reference<sheet::XSheetFilterable> xSF(getXSpreadsheet(), UNO_QUERY_THROW); + + uno::Reference<sheet::XSheetFilterDescriptor> xSFD = xSFEx->createFilterDescriptorByObject(xSF); + CPPUNIT_ASSERT_MESSAGE("no XSheetFilterDescriptor", xSFD.is()); + + uno::Sequence<sheet::TableFilterField> xTFF = xSFD->getFilterFields(); + CPPUNIT_ASSERT_MESSAGE("The gained XSheetFilterDescriptor is empty", xTFF.getLength() != 0); + + for (const auto& field : xTFF) + { + // we don't care about the actual value, just that we can access the fields + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: StringValue", + !field.StringValue.isEmpty()); + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: IsNumeric", + !field.IsNumeric || field.IsNumeric); + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: NumericValue", + field.NumericValue != 0.0 || field.NumericValue == 0.0); + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: Field", + field.Field != 0 || field.Field == 0); + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: Connection", + field.Connection == sheet::FilterConnection_AND + || field.Connection == sheet::FilterConnection_OR); + CPPUNIT_ASSERT_MESSAGE("Unable to retrieve field: Operator", + field.Operator != sheet::FilterOperator_EMPTY); + } +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/test/source/sheet/xsubtotalcalculatable.cxx b/test/source/sheet/xsubtotalcalculatable.cxx index 05071e95cb64..5bca1dc7498a 100644 --- a/test/source/sheet/xsubtotalcalculatable.cxx +++ b/test/source/sheet/xsubtotalcalculatable.cxx @@ -48,7 +48,7 @@ void XSubTotalCalculatable::testApplyRemoveSubTotals() xCols.realloc(1); xCols[0].Column = 0; xCols[0].Function = sheet::GeneralFunction_SUM; - xSTD->addNew(xCols, 0); + xSTD->addNew(xCols, 1); xSheet->getCellByPosition(0, 0)->setFormula("first"); xSheet->getCellByPosition(1, 0)->setFormula("second"); |