nss: upgrade to release 3.73
[LibreOffice.git] / test / source / sheet / xdatapilottable.cxx
blob4cfff74ed5c16174d613bf626495a7770617e6ba
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <test/sheet/xdatapilottable.hxx>
11 #include <com/sun/star/sheet/XDataPilotTable.hpp>
12 #include <com/sun/star/table/CellRangeAddress.hpp>
14 using namespace css;
15 using namespace css::uno;
17 namespace apitest
19 void XDataPilotTable::testGetOutputRange()
21 uno::Reference<sheet::XDataPilotTable> xDPTable(init(), UNO_QUERY_THROW);
23 table::CellRangeAddress aRange = xDPTable->getOutputRange();
24 CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aRange.Sheet);
25 CPPUNIT_ASSERT_EQUAL(sal_Int32(7), aRange.StartColumn);
26 CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aRange.StartRow);
29 void XDataPilotTable::testRefresh()
31 uno::Reference<sheet::XDataPilotTable> xDPTable(init(), UNO_QUERY_THROW);
32 std::cout << "xCellForChange: Old Value: " << xCellForChange->getValue() << std::endl;
33 std::cout << "xCellForCheck: Old Value: " << xCellForCheck->getValue() << std::endl;
34 double aOldData = xCellForCheck->getValue();
35 xCellForChange->setValue(5);
37 xDPTable->refresh();
38 xDPTable->refresh();
39 std::cout << "xCellForChange: Old Value: " << xCellForChange->getValue() << std::endl;
40 std::cout << "xCellForCheck: Old Value: " << xCellForCheck->getValue() << std::endl;
41 double aNewData = xCellForCheck->getValue();
42 CPPUNIT_ASSERT_MESSAGE("value needs to change", aOldData != aNewData);
45 XDataPilotTable::~XDataPilotTable() {}
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */