12#include <com/sun/star/sheet/XCellRangeFormula.hpp>
13#include <com/sun/star/uno/Reference.hxx>
14#include <com/sun/star/uno/Sequence.hxx>
16#include <cppunit/TestAssert.h>
25 uno::Reference<sheet::XCellRangeFormula> xCRF(
init(), UNO_QUERY_THROW);
27 uno::Sequence<uno::Sequence<OUString>> aFormulaArrayOriginal = xCRF->getFormulaArray();
28 uno::Sequence<uno::Sequence<OUString>> aFormulaArrayNew = xCRF->getFormulaArray();
29 aFormulaArrayNew.getArray()[0].getArray()[0] =
"NewValue";
31 xCRF->setFormulaArray(aFormulaArrayNew);
32 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to get new FormulaArray", OUString(
"NewValue"),
33 xCRF->getFormulaArray()[0][0]);
35 xCRF->setFormulaArray(aFormulaArrayOriginal);
36 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to set new FormulaArray", aFormulaArrayOriginal[0][0],
37 xCRF->getFormulaArray()[0][0]);