nss: upgrade to release 3.73
[LibreOffice.git] / test / source / table / xtablechart.cxx
bloba1c33ceaba63f418f5ae1d7ac36915e3f1fb58f1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/table/xtablechart.hxx>
11 #include <test/cppunitasserthelper.hxx>
13 #include <com/sun/star/table/CellRangeAddress.hpp>
14 #include <com/sun/star/table/XTableChart.hpp>
16 #include <com/sun/star/uno/Reference.hxx>
17 #include <com/sun/star/uno/Sequence.hxx>
19 #include <cppunit/TestAssert.h>
21 using namespace css;
23 namespace apitest
25 void XTableChart::testGetSetHasColumnHeaders()
27 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
29 xTC->setHasColumnHeaders(false);
30 CPPUNIT_ASSERT(!xTC->getHasColumnHeaders());
32 xTC->setHasColumnHeaders(true);
33 CPPUNIT_ASSERT(xTC->getHasColumnHeaders());
36 void XTableChart::testGetSetHasRowHeaders()
38 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
40 xTC->setHasRowHeaders(false);
41 CPPUNIT_ASSERT(!xTC->getHasRowHeaders());
43 xTC->setHasRowHeaders(true);
44 CPPUNIT_ASSERT(xTC->getHasRowHeaders());
47 void XTableChart::testGetSetRanges()
49 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
51 uno::Sequence<table::CellRangeAddress> aCRA = xTC->getRanges();
52 aCRA[0].EndRow = 1;
54 xTC->setRanges(aCRA);
56 CPPUNIT_ASSERT_EQUAL(aCRA[0], xTC->getRanges()[0]);
59 } // namespace apitest
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */