fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / test / source / sheet / xdatapilottable.cxx
blobcef1550dc9d1db1246bd3327c5ee0d196115e1fb
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/XSpreadsheetDocument.hpp>
12 #include <com/sun/star/sheet/XSpreadsheet.hpp>
13 #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
14 #include <com/sun/star/sheet/XDataPilotTables.hpp>
15 #include <com/sun/star/sheet/XDataPilotTable.hpp>
16 #include <com/sun/star/table/XCell.hpp>
17 #include <com/sun/star/util/XCloseable.hpp>
18 #include <com/sun/star/table/CellRangeAddress.hpp>
19 #include <com/sun/star/beans/XPropertySet.hpp>
21 #include <rtl/ustring.hxx>
23 using namespace css;
24 using namespace css::uno;
26 namespace apitest
29 void XDataPilotTable::testGetOutputRange()
31 uno::Reference< sheet::XDataPilotTable > xDPTable(init(),UNO_QUERY_THROW);
33 table::CellRangeAddress aRange = xDPTable->getOutputRange();
34 CPPUNIT_ASSERT( aRange.Sheet == 0 );
35 CPPUNIT_ASSERT( aRange.StartColumn == 7 );
36 CPPUNIT_ASSERT( aRange.StartRow == 8 );
39 void XDataPilotTable::testRefresh()
41 uno::Reference< sheet::XDataPilotTable > xDPTable(init(),UNO_QUERY_THROW);
42 std::cout << "xCellForChange: Old Value: " << xCellForChange->getValue() << std::endl;
43 std::cout << "xCellForCheck: Old Value: " << xCellForCheck->getValue() << std::endl;
44 double aOldData = xCellForCheck->getValue();
45 xCellForChange->setValue( 5 );
47 xDPTable->refresh();
48 xDPTable->refresh();
49 std::cout << "xCellForChange: Old Value: " << xCellForChange->getValue() << std::endl;
50 std::cout << "xCellForCheck: Old Value: " << xCellForCheck->getValue() << std::endl;
51 double aNewData = xCellForCheck->getValue();
52 CPPUNIT_ASSERT_MESSAGE("value needs to change", aOldData != aNewData);
55 XDataPilotTable::~XDataPilotTable()
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */