summaryrefslogtreecommitdiff
path: root/test
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 /test
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>
Diffstat (limited to 'test')
-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
4 files changed, 103 insertions, 14 deletions
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: */