diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-25 14:51:02 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-25 17:03:53 +0200 |
commit | 51d366712c55c61bea5169c238098d7007e4ce20 (patch) | |
tree | 60a003053acddc9a9c9705577dac8daa313b3a1c /chart2/qa/extras/chart2dump | |
parent | 4b0f51efbcb9e71034089f431117e6bac92a26b2 (diff) |
ChartTest: inherit from UnoApiTest
Change-Id: Ie826b66364f61bdab555228ca3a348f86b34847f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141824
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'chart2/qa/extras/chart2dump')
-rw-r--r-- | chart2/qa/extras/chart2dump/chart2dump.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx index d3ec24de68e9..030a536f320a 100644 --- a/chart2/qa/extras/chart2dump/chart2dump.cxx +++ b/chart2/qa/extras/chart2dump/chart2dump.cxx @@ -88,6 +88,7 @@ class Chart2DumpTest : public ChartTest { protected: Chart2DumpTest(bool bDumpMode) + : ChartTest("/chart2/qa/extras/chart2dump/data/") { m_bDumpMode = bDumpMode; } @@ -107,7 +108,6 @@ protected: virtual OUString getTestName() { return OUString(); } OUString const & getTestFileName() const { return m_sTestFileName; } - OUString getTestFileDirName() const { return "/chart2/qa/extras/chart2dump/data/"; } OUString getReferenceDirName() { return "/chart2/qa/extras/chart2dump/reference/" + getTestName().toAsciiLowerCase() + "/"; @@ -269,7 +269,7 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false) for (const OUString& aTestFile : aTestFiles) { setTestFileName(aTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc (getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); // Check title @@ -382,7 +382,7 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false) for (const OUString& aTestFile : aTestFiles) { setTestFileName(aTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -476,7 +476,7 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -548,7 +548,7 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -621,7 +621,7 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -704,7 +704,7 @@ DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -774,7 +774,7 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -822,7 +822,6 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false) sal_Int32 nChartWallLineWidth = 0; xPropSet->getPropertyValue("LineWidth") >>= nChartWallLineWidth; CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nChartWallLineWidth); - } } @@ -840,7 +839,7 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -913,7 +912,7 @@ DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -986,7 +985,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - load(getTestFileDirName(), getTestFileName()); + loadFromURL(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -1078,7 +1077,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false) DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false ) { setTestFileName( "pivotchart_data_button.ods" ); - load( getTestFileDirName(), getTestFileName() ); + loadFromURL(getTestFileName()); // Check that we have pivot chart in the document uno::Reference<table::XTablePivotCharts> xTablePivotCharts = getTablePivotChartsFromSheet( 1, mxComponent ); |