summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/test/util/searchdescriptor.hxx33
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv10
-rw-r--r--sc/qa/extras/sccellsearchobj.cxx5
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/util/searchdescriptor.cxx65
5 files changed, 104 insertions, 10 deletions
diff --git a/include/test/util/searchdescriptor.hxx b/include/test/util/searchdescriptor.hxx
new file mode 100644
index 000000000000..b2f5d5bd62fa
--- /dev/null
+++ b/include/test/util/searchdescriptor.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST SearchDescriptor
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testSearchDescriptorProperties();
+
+protected:
+ ~SearchDescriptor() {}
+};
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
index 04f296d22cbf..0ba1e44ec269 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellSearchObj.csv
@@ -1,12 +1,2 @@
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchBackwards"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchCaseSensitive"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchWords"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchRegularExpression"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchStyles"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarity"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityRelax"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityRemove"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityAdd"
-"ScCellSearchObj";"com::sun::star::util::SearchDescriptor";"SearchSimilarityExchange"
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"getReplaceString()"
"ScCellSearchObj";"com::sun::star::util::XReplaceDescriptor";"setReplaceString()"
diff --git a/sc/qa/extras/sccellsearchobj.cxx b/sc/qa/extras/sccellsearchobj.cxx
index 0dfb94a8c245..7d376a5b5262 100644
--- a/sc/qa/extras/sccellsearchobj.cxx
+++ b/sc/qa/extras/sccellsearchobj.cxx
@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
+#include <test/util/searchdescriptor.hxx>
#include <test/util/xsearchdescriptor.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -26,6 +27,7 @@ using namespace css;
namespace sc_apitest
{
class ScCellSearchObj : public CalcUnoApiTest,
+ public apitest::SearchDescriptor,
public apitest::XPropertySet,
public apitest::XSearchDescriptor
{
@@ -38,6 +40,9 @@ public:
CPPUNIT_TEST_SUITE(ScCellSearchObj);
+ // SearchDescriptor
+ CPPUNIT_TEST(testSearchDescriptorProperties);
+
// XPropertSet
CPPUNIT_TEST(testGetPropertySetInfo);
CPPUNIT_TEST(testGetPropertyValue);
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 2d8a876d6a95..6bdde7dece5b 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -186,6 +186,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/text/textprintersettings \
test/source/text/textsettings \
test/source/text/textdocumentindex \
+ test/source/util/searchdescriptor \
test/source/util/xindent \
test/source/util/xmergeable \
test/source/util/xrefreshable \
diff --git a/test/source/util/searchdescriptor.cxx b/test/source/util/searchdescriptor.cxx
new file mode 100644
index 000000000000..a2b72ce588dc
--- /dev/null
+++ b/test/source/util/searchdescriptor.cxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/util/searchdescriptor.hxx>
+#include <test/unoapi_property_testers.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+
+namespace apitest
+{
+void SearchDescriptor::testSearchDescriptorProperties()
+{
+ uno::Reference<beans::XPropertySet> xPS(init(), uno::UNO_QUERY_THROW);
+
+ OUString aPropName;
+
+ aPropName = "SearchBackwards";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchCaseSensitive";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchWords";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchRegularExpression";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchStyles";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarity";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityRelax";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityRemove";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityAdd";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityExchange";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchWildcard";
+ testBooleanOptionalProperty(xPS, aPropName);
+}
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */