From 2af48226d7224b83fb77fe81a8d7d58886395b88 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 16 Nov 2022 11:38:50 +0100 Subject: [PATCH] CppunitTest_sc_chart2dataprovider: inherit from UnoApiXmlTest Change-Id: I65e833ca307dec186c4a455fdb068b4242873cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142762 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/CppunitTest_sc_chart2dataprovider.mk | 45 +------------------------ sc/qa/unit/chart2dataprovider.cxx | 19 +++++------ 2 files changed, 9 insertions(+), 55 deletions(-) diff --git a/sc/CppunitTest_sc_chart2dataprovider.mk b/sc/CppunitTest_sc_chart2dataprovider.mk index af00a8fa8478..a47bafd5c995 100644 --- a/sc/CppunitTest_sc_chart2dataprovider.mk +++ b/sc/CppunitTest_sc_chart2dataprovider.mk @@ -75,50 +75,7 @@ $(eval $(call gb_CppunitTest_use_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 \ - vcl/vcl.common \ - xmloff/util/xo \ - xmlsecurity/util/xmlsecurity \ -)) - -$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\ - xmlsecurity/util/xsec_xmlsec \ -)) +$(eval $(call gb_CppunitTest_use_rdb,sc_chart2dataprovider,services)) $(eval $(call gb_CppunitTest_use_configuration,sc_chart2dataprovider)) diff --git a/sc/qa/unit/chart2dataprovider.cxx b/sc/qa/unit/chart2dataprovider.cxx index 17e214fc8d37..4c4b8007c15b 100644 --- a/sc/qa/unit/chart2dataprovider.cxx +++ b/sc/qa/unit/chart2dataprovider.cxx @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -23,7 +22,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -class ScChart2DataProviderTest : public ScBootstrapFixture +class ScChart2DataProviderTest : public ScModelTestBase { public: ScChart2DataProviderTest(); @@ -71,22 +70,20 @@ static void lcl_createAndCheckDataProvider(ScDocument& rDoc, const OUString& cel void ScChart2DataProviderTest::testHeaderExpansion() { - ScDocShellRef xDocSh = loadDoc(u"chart2dataprovider.", FORMAT_ODS); + createScDoc("ods/chart2dataprovider.ods"); - ScDocument& rDoc = xDocSh->GetDocument(); + ScDocument* pDoc = getScDoc(); - 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(*pDoc, "$Sheet1.$A$1:$D$4", false, false, 4, 4); + lcl_createAndCheckDataProvider(*pDoc, "$Sheet1.$A$1:$D$4", true, true, 4, 3); - lcl_createAndCheckDataProvider(rDoc, "$Sheet1.$A$17:$D$20", true, true, 3, 2); + lcl_createAndCheckDataProvider(*pDoc, "$Sheet1.$A$17:$D$20", true, true, 3, 2); - lcl_createAndCheckDataProvider(rDoc, "$Sheet1.$A$25:$D$28", true, true, 4, 2); - - xDocSh->DoClose(); + lcl_createAndCheckDataProvider(*pDoc, "$Sheet1.$A$25:$D$28", true, true, 4, 2); } ScChart2DataProviderTest::ScChart2DataProviderTest() - : ScBootstrapFixture("sc/qa/unit/data") + : ScModelTestBase("sc/qa/unit/data") { }