diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-06-25 13:26:41 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-06-26 11:00:22 +0200 |
commit | 2783a34899379dae84889c924e49481631280ab1 (patch) | |
tree | 5aa544bc88b384d0ebbfff122cac0850d9101d1e /chart2 | |
parent | 103b562b86a1c96c344bce8eee3ed8e1c4b77323 (diff) |
tdf#126033 chart: hide removed marker of a single data point
instead of showing a black square.
Note: the patch fixes also the OOXML import (see the unit test).
Change-Id: Ie578db3dd9ba310b0ce972832269acd5ae501778
Reviewed-on: https://gerrit.libreoffice.org/74690
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 19 | ||||
-rw-r--r-- | chart2/qa/extras/data/xlsx/tdf126033.xlsx | bin | 0 -> 20012 bytes | |||
-rw-r--r-- | chart2/source/view/main/VDataSeries.cxx | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 803e99e773da..569ba8388d26 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -74,6 +74,7 @@ public: void testTdf108021(); void testTdf100084(); void testTdf124817(); + void testTdf126033(); void testAutoBackgroundXLSX(); void testAutoChartAreaBorderPropXLSX(); void testChartAreaStyleBackgroundXLSX(); @@ -167,6 +168,7 @@ public: CPPUNIT_TEST(testTdf108021); CPPUNIT_TEST(testTdf100084); CPPUNIT_TEST(testTdf124817); + CPPUNIT_TEST(testTdf126033); CPPUNIT_TEST(testAutoBackgroundXLSX); CPPUNIT_TEST(testAutoChartAreaBorderPropXLSX); CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX); @@ -933,6 +935,23 @@ void Chart2ImportTest::testTdf124817() CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.BorderColor == static_cast<sal_Int32>(0xFF0000))); } +void Chart2ImportTest::testTdf126033() +{ + load("/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx"); + Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + // Check symbol style and size of data points + chart2::Symbol aSymblProp; + uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); + CPPUNIT_ASSERT(xDataSeries.is()); + uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Symbol") >>= aSymblProp); + CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Width); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Height); +} + void Chart2ImportTest::testTransparentBackground(OUString const & filename) { load("/chart2/qa/extras/data/xlsx/", filename); diff --git a/chart2/qa/extras/data/xlsx/tdf126033.xlsx b/chart2/qa/extras/data/xlsx/tdf126033.xlsx Binary files differnew file mode 100644 index 000000000000..ee60103c98e4 --- /dev/null +++ b/chart2/qa/extras/data/xlsx/tdf126033.xlsx diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index 6781f2044e7c..a446cd79d538 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -803,7 +803,7 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const m_apSymbolProperties_InvisibleSymbolForSelection.reset(new Symbol); m_apSymbolProperties_InvisibleSymbolForSelection->Style = SymbolStyle_STANDARD; m_apSymbolProperties_InvisibleSymbolForSelection->StandardSymbol = 0;//square - m_apSymbolProperties_InvisibleSymbolForSelection->Size = m_apSymbolProperties_Series->Size; + m_apSymbolProperties_InvisibleSymbolForSelection->Size = com::sun::star::awt::Size(0, 0);//tdf#126033 m_apSymbolProperties_InvisibleSymbolForSelection->BorderColor = 0xff000000;//invisible m_apSymbolProperties_InvisibleSymbolForSelection->FillColor = 0xff000000;//invisible } |