add test for tdf#105236

Change-Id: I5464504ae9ee411221c2cb2ff6f27b7b7e131326
Reviewed-on: https://gerrit.libreoffice.org/64201
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
Markus Mohrhard
2018-11-29 01:53:12 +01:00
parent fb04e7180c
commit 92c25a6163
2 changed files with 14 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ public:
void testDeletedDataLabel();
void testDataPointInheritedColorDOCX();
void testExternalStrRefsXLSX();
void testSourceNumberFormatComplexCategoriesXLS();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -190,6 +191,7 @@ public:
CPPUNIT_TEST(testDeletedDataLabel);
CPPUNIT_TEST(testDataPointInheritedColorDOCX);
CPPUNIT_TEST(testExternalStrRefsXLSX);
CPPUNIT_TEST(testSourceNumberFormatComplexCategoriesXLS);
CPPUNIT_TEST_SUITE_END();
@@ -1700,6 +1702,18 @@ void Chart2ImportTest::testExternalStrRefsXLSX()
CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get<OUString>());
}
void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
{
load("/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
chart2::ScaleData aScaleData = xAxis->getScaleData();
sal_Int32 nNumberFormat = aScaleData.Categories->getValues()->getNumberFormatKeyByIndex(-1);
CPPUNIT_ASSERT(nNumberFormat != 0);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();