summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-01-29 21:32:14 +0000
committerJens Carl <j.carl43@gmx.de>2019-01-29 23:57:08 +0100
commitce2b98580b9f36d6f358bd2c9c027d3d82cb33d7 (patch)
tree6bcaa9c88b4134ce9f94d39d33533c3d091092f1
parent37f4c73aef2acd02b2f03d1f28ebcadf5e5dbf5e (diff)
Add XSheetFilterDescriptor2 and XSheetFilterDescriptor3 tests
Add XSheetFilterDescriptor2 and XSheetFilterDescriptor3 tests to ScFilterDescriptorBase. Change-Id: I932560c42d9c5f3077f47f116f6ae011f6aea79e Reviewed-on: https://gerrit.libreoffice.org/67097 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r--include/test/sheet/xsheetfilterdescriptor.hxx13
-rw-r--r--include/test/sheet/xsheetfilterdescriptor2.hxx35
-rw-r--r--include/test/sheet/xsheetfilterdescriptor3.hxx35
-rw-r--r--sc/qa/extras/scfilterdescriptorbase.cxx14
-rw-r--r--solenv/clang-format/blacklist2
-rw-r--r--test/Library_subsequenttest.mk2
-rw-r--r--test/source/sheet/xsheetfilterdescriptor.cxx29
-rw-r--r--test/source/sheet/xsheetfilterdescriptor2.cxx43
-rw-r--r--test/source/sheet/xsheetfilterdescriptor3.cxx43
9 files changed, 192 insertions, 24 deletions
diff --git a/include/test/sheet/xsheetfilterdescriptor.hxx b/include/test/sheet/xsheetfilterdescriptor.hxx
index 3a4a6a695c1b..65620f0f0936 100644
--- a/include/test/sheet/xsheetfilterdescriptor.hxx
+++ b/include/test/sheet/xsheetfilterdescriptor.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -10,18 +10,17 @@
#ifndef INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR_HXX
#define INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR_HXX
-
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
-namespace apitest {
-
+namespace apitest
+{
class OOO_DLLPUBLIC_TEST XSheetFilterDescriptor
{
public:
- virtual css::uno::Reference< css::uno::XInterface > init() =0;
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
void testGetSetFilterFields();
@@ -29,8 +28,8 @@ protected:
~XSheetFilterDescriptor() {}
};
-}
+} // namespace apitest
#endif // INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/sheet/xsheetfilterdescriptor2.hxx b/include/test/sheet/xsheetfilterdescriptor2.hxx
new file mode 100644
index 000000000000..7555c65cb3a5
--- /dev/null
+++ b/include/test/sheet/xsheetfilterdescriptor2.hxx
@@ -0,0 +1,35 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR2_HXX
+#define INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR2_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XSheetFilterDescriptor2
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testGetSetFilterFields2();
+
+protected:
+ ~XSheetFilterDescriptor2() {}
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR2_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/test/sheet/xsheetfilterdescriptor3.hxx b/include/test/sheet/xsheetfilterdescriptor3.hxx
new file mode 100644
index 000000000000..1d8f94087200
--- /dev/null
+++ b/include/test/sheet/xsheetfilterdescriptor3.hxx
@@ -0,0 +1,35 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR3_HXX
+#define INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR3_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <test/testdllapi.hxx>
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XSheetFilterDescriptor3
+{
+public:
+ virtual css::uno::Reference<css::uno::XInterface> init() = 0;
+
+ void testGetSetFilterFields3();
+
+protected:
+ ~XSheetFilterDescriptor3() {}
+};
+
+} // namespace apitest
+
+#endif // INCLUDED_TEST_SHEET_XSHEETFILTERDESCRIPTOR3_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sc/qa/extras/scfilterdescriptorbase.cxx b/sc/qa/extras/scfilterdescriptorbase.cxx
index c989e60b743b..7811d6c83bf1 100644
--- a/sc/qa/extras/scfilterdescriptorbase.cxx
+++ b/sc/qa/extras/scfilterdescriptorbase.cxx
@@ -12,11 +12,15 @@
#include <test/lang/xserviceinfo.hxx>
#include <test/sheet/sheetfilterdescriptor.hxx>
#include <test/sheet/xsheetfilterdescriptor.hxx>
+#include <test/sheet/xsheetfilterdescriptor2.hxx>
+#include <test/sheet/xsheetfilterdescriptor3.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/sheet/XSheetFilterable.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
@@ -29,7 +33,9 @@ class ScFilterDescriptorBase : public CalcUnoApiTest,
public apitest::SheetFilterDescriptor,
public apitest::XPropertySet,
public apitest::XServiceInfo,
- public apitest::XSheetFilterDescriptor
+ public apitest::XSheetFilterDescriptor,
+ public apitest::XSheetFilterDescriptor2,
+ public apitest::XSheetFilterDescriptor3
{
public:
ScFilterDescriptorBase();
@@ -59,6 +65,12 @@ public:
// XSheetFilterDescriptor
CPPUNIT_TEST(testGetSetFilterFields);
+ // XSheetFilterDescriptor2
+ CPPUNIT_TEST(testGetSetFilterFields2);
+
+ // XSheetFilterDescriptor3
+ CPPUNIT_TEST(testGetSetFilterFields3);
+
CPPUNIT_TEST_SUITE_END();
private:
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 67797171aa51..82e649e0341f 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7604,7 +7604,6 @@ include/test/sheet/xsheetannotation.hxx
include/test/sheet/xsheetannotations.hxx
include/test/sheet/xsheetannotationshapesupplier.hxx
include/test/sheet/xsheetfilterable.hxx
-include/test/sheet/xsheetfilterdescriptor.hxx
include/test/sheet/xsheetlinkable.hxx
include/test/sheet/xsheetoperation.hxx
include/test/sheet/xsheetoutline.hxx
@@ -16587,7 +16586,6 @@ test/source/sheet/xsheetannotation.cxx
test/source/sheet/xsheetannotations.cxx
test/source/sheet/xsheetannotationshapesupplier.cxx
test/source/sheet/xsheetfilterable.cxx
-test/source/sheet/xsheetfilterdescriptor.cxx
test/source/sheet/xsheetlinkable.cxx
test/source/sheet/xsheetoperation.cxx
test/source/sheet/xsheetoutline.cxx
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index d0ce3ad4dac0..8867773ae22f 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -140,6 +140,8 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xsheetfilterable \
test/source/sheet/xsheetfilterableex \
test/source/sheet/xsheetfilterdescriptor \
+ test/source/sheet/xsheetfilterdescriptor2 \
+ test/source/sheet/xsheetfilterdescriptor3 \
test/source/sheet/xsheetlinkable \
test/source/sheet/xsheetoperation \
test/source/sheet/xsheetoutline \
diff --git a/test/source/sheet/xsheetfilterdescriptor.cxx b/test/source/sheet/xsheetfilterdescriptor.cxx
index b1d26473fca7..97214fb10dd2 100644
--- a/test/source/sheet/xsheetfilterdescriptor.cxx
+++ b/test/source/sheet/xsheetfilterdescriptor.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -11,8 +11,8 @@
#include <com/sun/star/sheet/TableFilterField.hpp>
#include <com/sun/star/sheet/XSheetFilterDescriptor.hpp>
-#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppunit/extensions/HelperMacros.h>
@@ -20,23 +20,24 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XSheetFilterDescriptor::testGetSetFilterFields()
{
- uno::Reference< sheet::XSheetFilterDescriptor > xSFD(init(), UNO_QUERY_THROW);
- uno::Sequence< sheet::TableFilterField > xDefaultTFF = xSFD->getFilterFields();
+ uno::Reference<sheet::XSheetFilterDescriptor> xSFD(init(), uno::UNO_QUERY_THROW);
+ uno::Sequence<sheet::TableFilterField> aDefaultTFF = xSFD->getFilterFields();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get TableFilterField", sal_Int32(0), xDefaultTFF.getLength());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get TableFilterField", sal_Int32(0),
+ aDefaultTFF.getLength());
- uno::Sequence< sheet::TableFilterField > xTFF;
- xTFF.realloc(1);
+ uno::Sequence<sheet::TableFilterField> aTFF;
+ aTFF.realloc(1);
- xSFD->setFilterFields(xTFF);
- uno::Sequence< sheet::TableFilterField > xNewTFF = xSFD->getFilterFields();
- CPPUNIT_ASSERT_MESSAGE("Unable to set TableFilterField", xNewTFF != xDefaultTFF);
+ xSFD->setFilterFields(aTFF);
+ uno::Sequence<sheet::TableFilterField> aNewTFF = xSFD->getFilterFields();
+ CPPUNIT_ASSERT_MESSAGE("Unable to set TableFilterField", aNewTFF != aDefaultTFF);
}
-}
+} // namespace apitest
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/xsheetfilterdescriptor2.cxx b/test/source/sheet/xsheetfilterdescriptor2.cxx
new file mode 100644
index 000000000000..0f501769272c
--- /dev/null
+++ b/test/source/sheet/xsheetfilterdescriptor2.cxx
@@ -0,0 +1,43 @@
+/* -*- 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/sheet/xsheetfilterdescriptor2.hxx>
+
+#include <com/sun/star/sheet/TableFilterField2.hpp>
+#include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest
+{
+void XSheetFilterDescriptor2::testGetSetFilterFields2()
+{
+ uno::Reference<sheet::XSheetFilterDescriptor2> xSFD(init(), uno::UNO_QUERY_THROW);
+ uno::Sequence<sheet::TableFilterField2> aDefaultTFF = xSFD->getFilterFields2();
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get TableFilterField", sal_Int32(0),
+ aDefaultTFF.getLength());
+
+ uno::Sequence<sheet::TableFilterField2> aTFF;
+ aTFF.realloc(1);
+
+ xSFD->setFilterFields2(aTFF);
+ uno::Sequence<sheet::TableFilterField2> aNewTFF = xSFD->getFilterFields2();
+ CPPUNIT_ASSERT_MESSAGE("Unable to set TableFilterField", aNewTFF != aDefaultTFF);
+}
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/xsheetfilterdescriptor3.cxx b/test/source/sheet/xsheetfilterdescriptor3.cxx
new file mode 100644
index 000000000000..420135e10914
--- /dev/null
+++ b/test/source/sheet/xsheetfilterdescriptor3.cxx
@@ -0,0 +1,43 @@
+/* -*- 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/sheet/xsheetfilterdescriptor3.hxx>
+
+#include <com/sun/star/sheet/TableFilterField3.hpp>
+#include <com/sun/star/sheet/XSheetFilterDescriptor3.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+using namespace css::uno;
+
+namespace apitest
+{
+void XSheetFilterDescriptor3::testGetSetFilterFields3()
+{
+ uno::Reference<sheet::XSheetFilterDescriptor3> xSFD(init(), uno::UNO_QUERY_THROW);
+ uno::Sequence<sheet::TableFilterField3> aDefaultTFF = xSFD->getFilterFields3();
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get TableFilterField", sal_Int32(0),
+ aDefaultTFF.getLength());
+
+ uno::Sequence<sheet::TableFilterField3> aTFF;
+ aTFF.realloc(1);
+
+ xSFD->setFilterFields3(aTFF);
+ uno::Sequence<sheet::TableFilterField3> aNewTFF = xSFD->getFilterFields3();
+ CPPUNIT_ASSERT_MESSAGE("Unable to set TableFilterField", aNewTFF != aDefaultTFF);
+}
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */