From 4223ff2be69f03e571464b0b09ad0d278918631b Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Wed, 15 Jan 2020 16:31:35 +0100 Subject: tdf#48436 Chart: add CustomLabelPosition UNO API property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and CUSTOM DataLabelPlacement to support custom data label positions, and its initial implementation: only UI support with OOXML import (tdf#130030), yet. Change-Id: I01d986071d78ae3e2a5f43d5711e9f60b8410c21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86859 Tested-by: Jenkins Reviewed-by: László Németh Tested-by: László Németh --- sd/qa/unit/import-tests.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 61c74879a6db..9eff839c2865 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -2614,24 +2614,25 @@ void SdImportTest::testTdf114821() uno::Sequence< uno::Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Invalid Series count", static_cast( 1 ), aSeriesSeq.getLength() ); + // These Labels have custom position, so the exported LabelPlacement (reference point) by MSO is OUTSIDE/OUTEND // Check the first label const css::uno::Reference< css::beans::XPropertySet >& rPropSet0( aSeriesSeq[0]->getDataPointByIndex( 0 ) ); CPPUNIT_ASSERT( rPropSet0.is() ); sal_Int32 aPlacement; rPropSet0->getPropertyValue( "LabelPlacement" ) >>= aPlacement; - CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::TOP, aPlacement ); + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::OUTSIDE, aPlacement ); // Check the second label const css::uno::Reference< css::beans::XPropertySet >& rPropSet1( aSeriesSeq[0]->getDataPointByIndex( 1 ) ); CPPUNIT_ASSERT( rPropSet1.is() ); rPropSet1->getPropertyValue( "LabelPlacement" ) >>= aPlacement; - CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::CENTER, aPlacement ); + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::OUTSIDE, aPlacement ); // Check the third label const css::uno::Reference< css::beans::XPropertySet >& rPropSet2( aSeriesSeq[0]->getDataPointByIndex( 2 ) ); CPPUNIT_ASSERT( rPropSet2.is() ); rPropSet2->getPropertyValue( "LabelPlacement") >>= aPlacement; - CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::TOP, aPlacement ); + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::OUTSIDE, aPlacement ); xDocShRef->DoClose(); } -- cgit