tdf#158556 cache SwDocStyleSheet
[LibreOffice.git] / include / test / unoapi_property_testers.hxx
blob70160280dd897ebbccb86ccb8aa3fe1a2e95c01a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 #ifndef INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
11 #define INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
13 #include <com/sun/star/beans/XPropertySet.hpp>
14 #include <com/sun/star/uno/Reference.hxx>
15 #include <com/sun/star/util/Color.hpp>
17 #include <sal/config.h>
18 #include <test/testdllapi.hxx>
20 namespace apitest
22 /** @brief Tester for property type 'boolean' of a @see com::sun::star::beans::XPropertySet.
24 * @param xPropertySet The property set, which contains the property to test against.
25 * @param name Name of property to test.
27 void OOO_DLLPUBLIC_TEST testBooleanProperty(
28 css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name);
30 /** @brief Tester for optional property type 'boolean' of a @see com::sun::star::beans::XPropertySet.
32 * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException)
34 * @param xPropertySet The property set, which contains the property to test against.
35 * @param name Name of property to test.
37 void OOO_DLLPUBLIC_TEST testBooleanOptionalProperty(
38 css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name);
40 /** @brief Tester for read-only property type 'boolean' of a @see com::sun::star::beans::XPropertySet.
42 * @param xPropertySet The property set, which contains the property to test against.
43 * @param name Name of property to test.
45 void OOO_DLLPUBLIC_TEST testBooleanReadonlyProperty(
46 css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name);
48 /** @brief Tester for property type 'double' of a @see com::sun::star::beans::XPropertySet.
50 * @param xPropertySet The property set, which contains the property to test against.
51 * @param name Name of property to test.
52 * @param nValue Value to use when setting a new value.
54 void OOO_DLLPUBLIC_TEST
55 testDoubleProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
56 const OUString& name, const double& dValue = 42.0);
58 /** @brief Tester for read-only property type 'double' of a @see com::sun::star::beans::XPropertySet.
60 * @param xPropertySet The property set, which contains the property to test against.
61 * @param name Name of property to test.
62 * @param nValue Value to use when setting a new value.
64 void OOO_DLLPUBLIC_TEST
65 testDoubleReadonlyProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
66 const OUString& name, const double& dValue = 42.0);
68 /** @brief Tester for property type 'long' of a @see com::sun::star::beans::XPropertySet.
70 * @param xPropertySet The property set, which contains the property to test against.
71 * @param name Name of property to test.
72 * @param nValue Value to use when setting a new value.
74 void OOO_DLLPUBLIC_TEST
75 testLongProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
76 const OUString& name, const sal_Int32& nValue = 42);
78 /** @brief Tester for optional property type 'long' of a @see com::sun::star::beans::XPropertySet.
80 * @param xPropertySet The property set, which contains the property to test against.
81 * @param name Name of property to test.
82 * @param nValue Value to use when setting a new value.
84 void OOO_DLLPUBLIC_TEST
85 testLongOptionalProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
86 const OUString& name, const sal_Int32& nValue = 42);
88 /** @brief Tester for read-only property type 'long' of a @see com::sun::star::beans::XPropertySet.
90 * @param xPropertySet The property set, which contains the property to test against.
91 * @param name Name of property to test.
92 * @param nValue Value to use when setting a new value.
94 void OOO_DLLPUBLIC_TEST
95 testLongReadonlyProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
96 const OUString& name, const sal_Int32& nValue = 42);
98 /** @brief Tester for property type 'short' of a @see com::sun::star::beans::XPropertySet.
100 * @param xPropertySet The property set, which contains the property to test against.
101 * @param name Name of property to test.
102 * @param nValue Value to use when setting a new value.
104 void OOO_DLLPUBLIC_TEST
105 testShortProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
106 const OUString& name, const sal_Int16& nValue = 42);
108 /** @brief Tester for optional property type 'short' of a @see com::sun::star::beans::XPropertySet.
110 * @param xPropertySet The property set, which contains the property to test against.
111 * @param name Name of property to test.
112 * @param nValue Value to use when setting a new value.
114 void OOO_DLLPUBLIC_TEST
115 testShortOptionalProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
116 const OUString& name, const sal_Int16& nValue = 42);
118 /** @brief Tester for read-only property type 'short' of a @see com::sun::star::beans::XPropertySet.
120 * @param xPropertySet The property set, which contains the property to test against.
121 * @param name Name of property to test.
122 * @param nValue Value to use when setting a new value.
124 void OOO_DLLPUBLIC_TEST
125 testShortReadonlyProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
126 const OUString& name, const sal_Int16& nValue = 42);
128 /** @brief Tester for property type 'string' of a @see com::sun::star::beans::XPropertySet.
130 * @param xPropertySet The property set, which contains the property to test against.
131 * @param name Name of property to test.
132 * @param rValue Value to use when setting a new value.
134 void OOO_DLLPUBLIC_TEST
135 testStringProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
136 const OUString& name, const OUString& rValue);
138 /** @brief Tester for optional property type 'string' of a @see com::sun::star::beans::XPropertySet.
140 * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException)
142 * @param xPropertySet The property set, which contains the property to test against.
143 * @param name Name of property to test.
144 * @param rValue Value to use when setting a new value.
146 void OOO_DLLPUBLIC_TEST
147 testStringOptionalProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
148 const OUString& name, const OUString& rValue = u"StringValue"_ustr);
150 /** @brief Tester for read-only property type 'string' of a @see com::sun::star::beans::XPropertySet.
152 * @param xPropertySet The property set, which contains the property to test against.
153 * @param name Name of property to test.
154 * @param rValue Value to use when setting a new value.
156 void OOO_DLLPUBLIC_TEST
157 testStringReadonlyProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
158 const OUString& name, const OUString& rValue);
160 /** @brief Tester for property type com::sun::star::util::Color of a @see com::sun::star::beans::XPropertySet.
162 * @param xPropertySet The property set, which contains the property to test against.
163 * @param name Name of property to test.
164 * @param rValue Value to use when setting a new value.
166 void OOO_DLLPUBLIC_TEST testColorProperty(
167 css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name,
168 const css::util::Color& rValue = css::util::Color(0x12345678));
170 } // namespace apitest
171 #endif // INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
173 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */