12#include <com/sun/star/beans/XPropertySet.hpp>
13#include <com/sun/star/uno/Any.hxx>
14#include <com/sun/star/uno/Reference.hxx>
16#include <cppunit/TestAssert.h>
25 uno::Reference<beans::XPropertySet> xTableAutoFormat(
init(), UNO_QUERY_THROW);
29 propName =
"IncludeFont";
30 bool aIncludeFont =
false;
31 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeFont",
32 xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont);
35 xTableAutoFormat->setPropertyValue(propName, aNewValue);
36 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont);
37 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeFont", !aIncludeFont);
39 propName =
"IncludeJustify";
40 bool aIncludeJustify =
false;
41 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeJustify",
42 xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify);
45 xTableAutoFormat->setPropertyValue(propName, aNewValue);
46 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify);
47 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeJustify", !aIncludeJustify);
49 propName =
"IncludeBorder";
50 bool aIncludeBorder =
false;
51 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeBorder",
52 xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder);
55 xTableAutoFormat->setPropertyValue(propName, aNewValue);
56 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder);
57 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeBorder", !aIncludeBorder);
59 propName =
"IncludeBackground";
60 bool aIncludeBackground =
false;
61 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeBackground",
62 xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground);
65 xTableAutoFormat->setPropertyValue(propName, aNewValue);
66 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground);
67 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeBackground", !aIncludeBackground);
69 propName =
"IncludeNumberFormat";
70 bool aIncludeNumberFormat =
false;
71 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeNumberFormat",
72 xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat);
75 xTableAutoFormat->setPropertyValue(propName, aNewValue);
76 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat);
77 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeNumberFormat",
78 !aIncludeNumberFormat);
80 propName =
"IncludeWidthAndHeight";
81 bool aIncludeWidthAndHeight =
false;
82 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeWidthAndHeight);
83 CPPUNIT_ASSERT_MESSAGE(
"Unable to get property value IncludeWidthAndHeight",
84 aIncludeWidthAndHeight);
87 xTableAutoFormat->setPropertyValue(propName, aNewValue);
88 CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeWidthAndHeight);
89 CPPUNIT_ASSERT_MESSAGE(
"Unable to set property value IncludeWidthAndHeight",
90 !aIncludeWidthAndHeight);