Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / test / beans / xpropertyset.hxx
blobdbfac0a2e86c900dead34f0730ab9a539dc8573c
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 #ifndef INCLUDED_TEST_BEANS_XPROPERTYSET_HXX
11 #define INCLUDED_TEST_BEANS_XPROPERTYSET_HXX
13 #include <com/sun/star/beans/XPropertySet.hpp>
14 #include <com/sun/star/beans/XPropertySetInfo.hpp>
16 #include <com/sun/star/uno/Reference.hxx>
18 #include <test/testdllapi.hxx>
20 #include <set>
21 #include <vector>
23 namespace apitest
25 class OOO_DLLPUBLIC_TEST XPropertySet
27 public:
28 XPropertySet() {}
30 XPropertySet(const std::set<OUString> rIgnoreValue)
31 : m_IgnoreValue(rIgnoreValue)
34 virtual css::uno::Reference<css::uno::XInterface> init() = 0;
36 void testGetPropertySetInfo();
37 void testSetPropertyValue();
38 void testGetPropertyValue();
39 void testPropertyChangeListener();
40 void testVetoableChangeListener();
42 protected:
43 ~XPropertySet(){};
44 bool isPropertyValueChangeable(const OUString& rName);
46 virtual bool isPropertyIgnored(const OUString& rName);
48 private:
49 void fillPropsToTest(const css::uno::Reference<css::beans::XPropertySetInfo>& xPropInfo);
50 static bool
51 getSinglePropertyValue(const css::uno::Reference<css::beans::XPropertySet>& xPropSet,
52 const OUString& rName);
54 struct OOO_DLLPUBLIC_TEST PropsToTest
56 std::vector<OUString> constrained;
57 std::vector<OUString> bound;
58 std::vector<OUString> normal;
59 std::vector<OUString> readonly;
61 bool initialized;
63 PropsToTest();
66 PropsToTest maPropsToTest;
67 std::set<OUString> m_IgnoreValue;
70 } // namespace apitest
72 #endif
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */