LibreOffice Module test (master) 1
xtablechart.cxx
Go to the documentation of this file.
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.
4 *
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 */
9
12
13#include <com/sun/star/table/CellRangeAddress.hpp>
14#include <com/sun/star/table/XTableChart.hpp>
15
16#include <com/sun/star/uno/Reference.hxx>
17#include <com/sun/star/uno/Sequence.hxx>
18
19#include <cppunit/TestAssert.h>
20
21using namespace css;
22
23namespace apitest
24{
26{
27 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
28
29 xTC->setHasColumnHeaders(false);
30 CPPUNIT_ASSERT(!xTC->getHasColumnHeaders());
31
32 xTC->setHasColumnHeaders(true);
33 CPPUNIT_ASSERT(xTC->getHasColumnHeaders());
34}
35
37{
38 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
39
40 xTC->setHasRowHeaders(false);
41 CPPUNIT_ASSERT(!xTC->getHasRowHeaders());
42
43 xTC->setHasRowHeaders(true);
44 CPPUNIT_ASSERT(xTC->getHasRowHeaders());
45}
46
48{
49 uno::Reference<table::XTableChart> xTC(init(), uno::UNO_QUERY_THROW);
50
51 uno::Sequence<table::CellRangeAddress> aCRA = xTC->getRanges();
52 aCRA.getArray()[0].EndRow = 1;
53
54 xTC->setRanges(aCRA);
55
56 CPPUNIT_ASSERT_EQUAL(aCRA[0], xTC->getRanges()[0]);
57}
58
59} // namespace apitest
60/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual css::uno::Reference< css::uno::XInterface > init()=0
void testGetSetHasColumnHeaders()
Definition: xtablechart.cxx:25
void testGetSetHasRowHeaders()
Definition: xtablechart.cxx:36