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/cellproperties.hxx>
12 #include <com/sun/star/beans/XPropertySet.hpp>
13 #include <com/sun/star/table/CellVertJustify.hpp>
15 #include "cppunit/extensions/HelperMacros.h"
19 using namespace css::uno
;
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
);
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
);
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: */