summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-08 01:18:58 +0200
committerEike Rathke <erack@redhat.com>2017-12-08 00:20:00 +0100
commit7a9bd8f3345e680bfbefe949da1bd1fbcc38b615 (patch)
tree08e51e29164d7a53b7d6d8fd6c730657c8414e95
parent447c052d5c074f923fb04e086c9da0340eecb6bd (diff)
Revert "tdf#113861: Unittest for chart datatable labels expansion"
This reverts commit 51cdf6248dbdf7a5dcddd2128bbb8f889cec25d6. It breaks all Linux debug builds. To be investigated. Change-Id: Ic0cd080e249aff80b73f2338ab5aae4b32f97793 Reviewed-on: https://gerrit.libreoffice.org/46058 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/CppunitTest_sc_chart2dataprovider.mk122
-rw-r--r--sc/Module_sc.mk1
-rw-r--r--sc/inc/chart2uno.hxx2
-rw-r--r--sc/qa/unit/chart2dataprovider.cxx122
-rw-r--r--sc/qa/unit/data/ods/chart2dataprovider.odsbin9276 -> 0 bytes
5 files changed, 1 insertions, 246 deletions
diff --git a/sc/CppunitTest_sc_chart2dataprovider.mk b/sc/CppunitTest_sc_chart2dataprovider.mk
deleted file mode 100644
index 7ef131b7f147..000000000000
--- a/sc/CppunitTest_sc_chart2dataprovider.mk
+++ /dev/null
@@ -1,122 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sc_chart2dataprovider, \
- sc/qa/unit/chart2dataprovider \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sc_chart2dataprovider, \
- boost_headers \
- mdds_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sc_chart2dataprovider, \
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- drawinglayer \
- editeng \
- for \
- forui \
- i18nlangtag \
- msfilter \
- oox \
- sal \
- salhelper \
- sax \
- sb \
- sc \
- scqahelper \
- sfx \
- sot \
- subsequenttest \
- svl \
- svt \
- svx \
- svxcore \
- test \
- tk \
- tl \
- ucbhelper \
- unotest \
- utl \
- vbahelper \
- vcl \
- xo \
- $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sc_chart2dataprovider,\
- -I$(SRCDIR)/sc/source/ui/inc \
- -I$(SRCDIR)/sc/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_use_ure,sc_chart2dataprovider))
-$(eval $(call gb_CppunitTest_use_vcl,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
- basic/util/sb \
- chart2/source/chartcore \
- chart2/source/controller/chartcontroller \
- comphelper/util/comphelp \
- configmgr/source/configmgr \
- dbaccess/util/dba \
- embeddedobj/util/embobj \
- eventattacher/source/evtatt \
- filter/source/config/cache/filterconfig1 \
- forms/util/frm \
- framework/util/fwk \
- i18npool/source/search/i18nsearch \
- i18npool/util/i18npool \
- linguistic/source/lng \
- oox/util/oox \
- package/source/xstor/xstor \
- package/util/package2 \
- sax/source/expatwrap/expwrap \
- scaddins/source/analysis/analysis \
- scaddins/source/datefunc/date \
- sc/util/sc \
- sc/util/scfilt \
- sfx2/util/sfx \
- sot/util/sot \
- svl/util/svl \
- svl/source/fsstor/fsstorage \
- svtools/util/svt \
- toolkit/util/tk \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- ucb/source/ucp/tdoc/ucptdoc1 \
- unotools/util/utl \
- unoxml/source/rdf/unordf \
- unoxml/source/service/unoxml \
- uui/util/uui \
- xmloff/util/xo \
- xmlsecurity/util/xmlsecurity \
-))
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
- xmlsecurity/util/xsec_xmlsec.windows \
-))
-else
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
- xmlsecurity/util/xsec_xmlsec \
-))
-endif
-
-$(eval $(call gb_CppunitTest_use_configuration,sc_chart2dataprovider))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index dc60e9d1d049..ae9a2c4e89af 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -144,7 +144,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_headerfootercontentobj \
CppunitTest_sc_recentfunctionsobj \
CppunitTest_sc_functionlistobj \
- CppunitTest_sc_chart2dataprovider \
))
$(eval $(call gb_Module_add_perfcheck_targets,sc,\
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index fb19a502a4c9..795561b642fa 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -53,7 +53,7 @@
class ScDocument;
// DataProvider
-class SC_DLLPUBLIC ScChart2DataProvider : public
+class ScChart2DataProvider : public
::cppu::WeakImplHelper<
css::chart2::data::XDataProvider,
css::chart2::data::XSheetDataProvider,
diff --git a/sc/qa/unit/chart2dataprovider.cxx b/sc/qa/unit/chart2dataprovider.cxx
deleted file mode 100644
index d7fd25122797..000000000000
--- a/sc/qa/unit/chart2dataprovider.cxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 <sal/config.h>
-#include <test/bootstrapfixture.hxx>
-
-#include <docsh.hxx>
-#include <chart2uno.hxx>
-
-#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
-
-#include "helper/qahelper.hxx"
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-class ScChart2DataProviderTest : public ScBootstrapFixture
-{
-public:
- ScChart2DataProviderTest();
-
- virtual void setUp() override;
- virtual void tearDown() override;
-
- void testHeaderExpansion();
-
- CPPUNIT_TEST_SUITE(ScChart2DataProviderTest);
- CPPUNIT_TEST(testHeaderExpansion);
- CPPUNIT_TEST_SUITE_END();
-
-private:
- uno::Reference<uno::XInterface> m_xCalcComponent;
-};
-
-void lcl_createAndCheckDataProvider(ScDocument& rDoc, const OUString& cellRange, bool hasCategories,
- bool firstCellAsLabel, sal_Int32 expectedRows,
- sal_Int32 expectedCols)
-{
- uno::Reference<chart2::data::XDataProvider> xDataProvider = new ScChart2DataProvider(&rDoc);
- CPPUNIT_ASSERT(xDataProvider.is());
-
- uno::Sequence<beans::PropertyValue> aArgs(4);
-
- aArgs[0].Name = "CellRangeRepresentation";
- aArgs[0].Value <<= cellRange;
-
- aArgs[1].Name = "HasCategories";
- aArgs[1].Value <<= hasCategories;
-
- aArgs[2].Name = "FirstCellAsLabel";
- aArgs[2].Value <<= firstCellAsLabel;
-
- aArgs[3].Name = "DataRowSource";
- aArgs[3].Value <<= chart::ChartDataRowSource_COLUMNS;
-
- uno::Reference<chart2::data::XDataSource> xDataSource = xDataProvider->createDataSource(aArgs);
- CPPUNIT_ASSERT(xDataSource.is());
-
- css::uno::Sequence<uno::Reference<chart2::data::XLabeledDataSequence>> xSequences
- = xDataSource->getDataSequences();
-
- CPPUNIT_ASSERT_EQUAL(expectedRows, xSequences.getLength());
-
- for (sal_Int32 nIdx = 0; nIdx < xSequences.getLength(); ++nIdx)
- {
- Reference<chart2::data::XDataSequence> xValues(xSequences[nIdx]->getValues());
- if (xValues.is())
- CPPUNIT_ASSERT_EQUAL(expectedCols, xValues->getData().getLength());
- }
-}
-
-void ScChart2DataProviderTest::testHeaderExpansion()
-{
- ScDocShellRef xDocSh = loadDoc("chart2dataprovider.", FORMAT_ODS);
- CPPUNIT_ASSERT_MESSAGE("Failed to load ch.ods.", xDocSh.is());
-
- ScDocument& rDoc = xDocSh->GetDocument();
-
- lcl_createAndCheckDataProvider(rDoc, "$Sheet1.$A$1:$D$4", false, false, 4, 4);
- lcl_createAndCheckDataProvider(rDoc, "$Sheet1.$A$1:$D$4", true, true, 4, 3);
-
- lcl_createAndCheckDataProvider(rDoc, "$Sheet1.$A$9:$D$12", true, true, 1, 2);
-
- xDocSh->DoClose();
-}
-
-ScChart2DataProviderTest::ScChart2DataProviderTest()
- : ScBootstrapFixture("sc/qa/unit/data")
-{
-}
-
-void ScChart2DataProviderTest::setUp()
-{
- test::BootstrapFixture::setUp();
-
- // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
- // which is a private symbol to us, gets called
- m_xCalcComponent
- = getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument");
- CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is());
-}
-
-void ScChart2DataProviderTest::tearDown()
-{
- uno::Reference<lang::XComponent>(m_xCalcComponent, UNO_QUERY_THROW)->dispose();
- test::BootstrapFixture::tearDown();
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(ScChart2DataProviderTest);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/data/ods/chart2dataprovider.ods b/sc/qa/unit/data/ods/chart2dataprovider.ods
deleted file mode 100644
index d27b78c83e82..000000000000
--- a/sc/qa/unit/data/ods/chart2dataprovider.ods
+++ /dev/null
Binary files differ