12#include <com/sun/star/beans/XPropertySet.hpp>
13#include <com/sun/star/util/XIndent.hpp>
15#include <com/sun/star/uno/Any.hxx>
16#include <com/sun/star/uno/Reference.hxx>
18#include <cppunit/TestAssert.h>
27 uno::Reference<util::XIndent> xIndent(
init(), UNO_QUERY_THROW);
28 uno::Reference<beans::XPropertySet> xPropertySet(xIndent, UNO_QUERY_THROW);
29 uno::Any aAny = xPropertySet->getPropertyValue(
"ParaIndent");
30 sal_Int32 nOldValue = aAny.get<sal_Int32>();
32 xIndent->incrementIndent();
34 uno::Any aAny2 = xPropertySet->getPropertyValue(
"ParaIndent");
35 sal_Int32 nNewValue = aAny2.get<sal_Int32>();
36 CPPUNIT_ASSERT_MESSAGE(
"Successfully able to Increment Indent", nOldValue < nNewValue);
40 uno::Reference<util::XIndent> xIndent(
init(), UNO_QUERY_THROW);
41 uno::Reference<beans::XPropertySet> xPropertySet(xIndent, UNO_QUERY_THROW);
42 xIndent->incrementIndent();
43 uno::Any aAny = xPropertySet->getPropertyValue(
"ParaIndent");
44 sal_Int32 nOldValue = aAny.get<sal_Int32>();
46 xIndent->decrementIndent();
48 uno::Any aAny2 = xPropertySet->getPropertyValue(
"ParaIndent");
49 sal_Int32 nNewValue = aAny2.get<sal_Int32>();
50 CPPUNIT_ASSERT_MESSAGE(
"Successfully able to Decrement Indent", nOldValue > nNewValue);
void testDecrementIndent()
void testIncrementIndent()
virtual css::uno::Reference< css::uno::XInterface > init()=0