1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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>
24 using namespace css::uno
;
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 );
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: */