From bf52d1951587bea895902c8b030a19942dd0ba69 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 2 May 2015 21:04:06 +0200 Subject: add test for tdf#86624 Change-Id: Iaab521433d8573fb1184ec59e7d734b0e0c97f00 --- chart2/qa/extras/chart2import.cxx | 13 +++++++++++++ chart2/qa/extras/data/ods/tdf86624.ods | Bin 0 -> 14461 bytes 2 files changed, 13 insertions(+) create mode 100644 chart2/qa/extras/data/ods/tdf86624.ods (limited to 'chart2/qa') diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 445edf364401..f7c7799d0e09 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -58,6 +58,7 @@ public: void testFdo78080(); void testFdo54361(); void testFdo54361_1(); + void testTdf86624(); // manualy placed legends void testAutoBackgroundXLSX(); void testChartAreaStyleBackgroundXLSX(); void testAxisTextRotationXLSX(); @@ -109,6 +110,7 @@ public: CPPUNIT_TEST(testFdo78080); CPPUNIT_TEST(testFdo54361); CPPUNIT_TEST(testFdo54361_1); + CPPUNIT_TEST(testTdf86624); CPPUNIT_TEST(testAutoBackgroundXLSX); CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX); CPPUNIT_TEST(testAxisTextRotationXLSX); @@ -634,6 +636,17 @@ void Chart2ImportTest::testFdo78080() CPPUNIT_ASSERT(!xTitle.is()); } +void Chart2ImportTest::testTdf86624() +{ + load("/chart2/qa/extras/data/ods/", "tdf86624.ods"); + uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent); + uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY); + uno::Reference xLegend = xChartDoc->getLegend(); + awt::Point aPos = xLegend->getPosition(); + CPPUNIT_ASSERT(aPos.X > 5000); // real value for me is above 8000 but before bug fix is below 1000 + CPPUNIT_ASSERT(aPos.Y > 4000); // real value for ms is above 7000 +} + void Chart2ImportTest::testTransparentBackground(OUString const & filename) { load("/chart2/qa/extras/data/xlsx/", filename); diff --git a/chart2/qa/extras/data/ods/tdf86624.ods b/chart2/qa/extras/data/ods/tdf86624.ods new file mode 100644 index 000000000000..05702371a16d Binary files /dev/null and b/chart2/qa/extras/data/ods/tdf86624.ods differ -- cgit v1.2.3