fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / test / source / sheet / cellproperties.cxx
blobc5a52367f34bad20016a38e3d952b49bd9d5de1d
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/cellproperties.hxx>
12 #include <com/sun/star/beans/XPropertySet.hpp>
13 #include <com/sun/star/table/CellVertJustify.hpp>
15 #include "cppunit/extensions/HelperMacros.h"
16 #include <iostream>
18 using namespace css;
19 using namespace css::uno;
21 namespace apitest {
23 void CellProperties::testVertJustify()
25 uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
26 OUString aVertJustify("VertJustify");
27 uno::Any aOldVertJustify = xCellRangeBase->getPropertyValue(aVertJustify);
28 sal_Int32 aValue = 0;
29 CPPUNIT_ASSERT(aOldVertJustify >>= aValue);
30 std::cout << "Old VertJustify value: " << aValue << std::endl;
32 uno::Any aNewVertJustify;
33 aNewVertJustify <<= static_cast<sal_Int32>(3);
34 xCellRangeBase->setPropertyValue(aVertJustify, aNewVertJustify);
35 uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
36 CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
37 std::cout << "New VertJustify value: " << aValue << std::endl;
38 CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
41 void CellProperties::testRotateReference()
43 uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
44 OUString aRotateReference("RotateReference");
45 uno::Any aOldRotateReference = xCellRangeBase->getPropertyValue(aRotateReference);
46 sal_Int32 aValue = 0;
47 CPPUNIT_ASSERT(aOldRotateReference >>= aValue);
48 std::cout << "Old RotateReference Value: " << aValue << std::endl;
50 uno::Any aNewRotateReference;
51 aNewRotateReference <<= static_cast<sal_Int32>(3);
52 xCellRangeBase->setPropertyValue(aRotateReference, aNewRotateReference);
53 uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
54 CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
55 std::cout << "New RotateReference value: " << aValue << std::endl;
56 CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */