fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / test / source / sheet / xsheetannotation.cxx
blob2755f5661a58a0855d40f01a6d8635f3e7c613d9
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/xsheetannotation.hxx>
12 #include <com/sun/star/table/CellAddress.hpp>
14 #include "cppunit/extensions/HelperMacros.h"
15 #include <rtl/ustring.hxx>
17 using namespace css;
18 using namespace css::uno;
20 namespace apitest {
22 void XSheetAnnotation::testGetPosition()
24 uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
25 table::CellAddress xResultCellAddress = aSheetAnnotation->getPosition();
27 //expected result
28 table::CellAddress xExpectedCellAddress;
29 xExpectedCellAddress.Sheet = 0;
30 xExpectedCellAddress.Row = 1;
31 xExpectedCellAddress.Column = 2;
33 CPPUNIT_ASSERT_MESSAGE("Wrong SHEET reference position", xResultCellAddress.Sheet == xExpectedCellAddress.Sheet);
34 CPPUNIT_ASSERT_MESSAGE("Wrong COLUMN reference position", xResultCellAddress.Column == xExpectedCellAddress.Column);
35 CPPUNIT_ASSERT_MESSAGE("Wrong ROW reference position", xResultCellAddress.Row == xExpectedCellAddress.Row);
38 void XSheetAnnotation::testGetAuthor()
40 uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
41 OUString aAuthor = aSheetAnnotation->getAuthor();
43 CPPUNIT_ASSERT_MESSAGE("Wrong author", aAuthor == "LG");
45 void XSheetAnnotation::testGetDate()
47 uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
48 OUString aDate = aSheetAnnotation->getDate();
50 CPPUNIT_ASSERT_MESSAGE("Wrong date", aDate == "01/17/2013");
52 void XSheetAnnotation::testGetIsVisible()
54 uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
55 bool isVisible = aSheetAnnotation->getIsVisible();
57 CPPUNIT_ASSERT_MESSAGE("Wrong visible state", isVisible);
59 void XSheetAnnotation::testSetIsVisible()
61 uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
62 aSheetAnnotation->setIsVisible(false);
63 bool isVisible = aSheetAnnotation->getIsVisible();
65 CPPUNIT_ASSERT_MESSAGE("Visible state not changed", !isVisible);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */