Kaydet (Commit) 994fc8fa authored tarafından Heena Gupta's avatar Heena Gupta Kaydeden (comit) Markus Mohrhard

fdo#54361:Add test case for the chart background

Change-Id: I03f0a45d821b14fe687b3ec7df98f9367adab1f2
Reviewed-on: https://gerrit.libreoffice.org/9978Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 0ed069ff
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <com/sun/star/chart/XChartData.hpp> #include <com/sun/star/chart/XChartData.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp> #include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp> #include <com/sun/star/chart/XChartDataArray.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/util/Color.hpp> #include <com/sun/star/util/Color.hpp>
...@@ -40,6 +41,7 @@ public: ...@@ -40,6 +41,7 @@ public:
void testDelayedCellImport(); // chart range referencing content on later sheets void testDelayedCellImport(); // chart range referencing content on later sheets
void testFlatODSStackedColumnChart(); void testFlatODSStackedColumnChart();
void testFdo78080(); void testFdo78080();
void testFdo54361();
CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083); CPPUNIT_TEST(Fdo60083);
...@@ -66,6 +68,7 @@ public: ...@@ -66,6 +68,7 @@ public:
CPPUNIT_TEST(testDelayedCellImport); CPPUNIT_TEST(testDelayedCellImport);
CPPUNIT_TEST(testFlatODSStackedColumnChart); CPPUNIT_TEST(testFlatODSStackedColumnChart);
CPPUNIT_TEST(testFdo78080); CPPUNIT_TEST(testFdo78080);
CPPUNIT_TEST(testFdo54361);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -396,6 +399,24 @@ void Chart2ImportTest::testFdo78080() ...@@ -396,6 +399,24 @@ void Chart2ImportTest::testFdo78080()
CPPUNIT_ASSERT(!xTitle.is()); CPPUNIT_ASSERT(!xTitle.is());
} }
void Chart2ImportTest::testFdo54361()
{
load("/chart2/qa/extras/data/xlsx/", "fdo54361.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
uno::Reference< chart::XChartDocument > xChart2Doc (xChartDoc, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChart2Doc.is());
Reference< beans::XPropertySet > xPropSet( xChart2Doc->getArea(), uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("failed to get Area", xPropSet.is());
com::sun::star::drawing::FillStyle aStyle;
xPropSet -> getPropertyValue("FillStyle") >>= aStyle;
CPPUNIT_ASSERT_MESSAGE("Background needs to be with solid fill style", aStyle == 1);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment