LibreOffice Module test (master)  1
searchdescriptor.cxx
Go to the documentation of this file.
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.
4  *
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  */
9 
12 
13 #include <com/sun/star/beans/XPropertySet.hpp>
14 
15 #include <com/sun/star/uno/Reference.hxx>
16 
17 using namespace css;
18 
19 namespace apitest
20 {
21 void SearchDescriptor::testSearchDescriptorProperties()
22 {
23  uno::Reference<beans::XPropertySet> xPS(init(), uno::UNO_QUERY_THROW);
24 
25  OUString aPropName;
26 
27  aPropName = "SearchBackwards";
28  testBooleanProperty(xPS, aPropName);
29 
30  aPropName = "SearchCaseSensitive";
31  testBooleanProperty(xPS, aPropName);
32 
33  aPropName = "SearchWords";
34  testBooleanProperty(xPS, aPropName);
35 
36  aPropName = "SearchRegularExpression";
37  testBooleanProperty(xPS, aPropName);
38 
39  aPropName = "SearchStyles";
40  testBooleanProperty(xPS, aPropName);
41 
42  aPropName = "SearchSimilarity";
43  testBooleanProperty(xPS, aPropName);
44 
45  aPropName = "SearchSimilarityRelax";
46  testBooleanProperty(xPS, aPropName);
47 
48  aPropName = "SearchSimilarityRemove";
49  testShortProperty(xPS, aPropName);
50 
51  aPropName = "SearchSimilarityAdd";
52  testShortProperty(xPS, aPropName);
53 
54  aPropName = "SearchSimilarityExchange";
55  testShortProperty(xPS, aPropName);
56 
57  aPropName = "SearchWildcard";
58  testBooleanOptionalProperty(xPS, aPropName);
59 }
60 
61 } // namespace apitest
62 
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
void testBooleanOptionalProperty(uno::Reference< beans::XPropertySet > const &xPropertySet, const OUString &rName)
void testShortProperty(uno::Reference< beans::XPropertySet > const &xPropertySet, const OUString &name, const sal_Int16 &nValue)
OUString aPropName
void testBooleanProperty(uno::Reference< beans::XPropertySet > const &xPropertySet, const OUString &name)
FILE * init(int, char **)