summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index e81a6e4d347d..7cb69a3398ce 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -94,6 +94,7 @@ public:
void testAxisTitleRotationXLSX();
void testTdf90510(); // Pie chart label placement settings(XLS)
+ void testTdf109858(); // Pie chart label placement settings(XLSX)
void testInternalDataProvider();
@@ -150,6 +151,7 @@ public:
CPPUNIT_TEST(testSecondaryAxisTitleDefaultRotationXLSX);
CPPUNIT_TEST(testAxisTitleRotationXLSX);
CPPUNIT_TEST(testTdf90510);
+ CPPUNIT_TEST(testTdf109858);
CPPUNIT_TEST(testInternalDataProvider);
@@ -1262,6 +1264,19 @@ void Chart2ImportTest::testTdf90510()
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement );
}
+void Chart2ImportTest::testTdf109858()
+{
+ load("/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
+ uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
+ CPPUNIT_ASSERT_MESSAGE( "failed to load chart", xChart1Doc.is() );
+ Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_QUERY_THROW );
+ uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" );
+ CPPUNIT_ASSERT( aAny.hasValue() );
+ sal_Int32 nLabelPlacement = 0;
+ CPPUNIT_ASSERT( aAny >>= nLabelPlacement );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement );
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();