From a211c754003f98bc8f7761224a0b265bd224f61f Mon Sep 17 00:00:00 2001 From: Sourav Date: Tue, 15 Apr 2014 16:39:52 +0530 Subject: [PATCH] fdo77216-Charts-Scattered chart: Chart gets distorted on RT In case there is some text entered in place of X coordinates for scatter chart then x coordinates should be taken as 1,2,3.... MS Word does the same thing Change-Id: I1db0fd64c6ac0f4d5e77a9676812f5e26577ecf6 Reviewed-on: https://gerrit.libreoffice.org/9011 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard --- chart2/qa/extras/chart2export.cxx | 38 +++++++++++++++++++++++ chart2/qa/extras/data/docx/fdo77216.docx | Bin 0 -> 23974 bytes oox/source/export/chartexport.cxx | 17 +++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 chart2/qa/extras/data/docx/fdo77216.docx diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index bc1dcd3f61ee..eded887bbb3f 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -36,6 +36,7 @@ public: void testStockChart(); void testBarChart(); void testCrosses(); + void testScatterChart(); void testChartDataTable(); void testChartExternalData(); void testEmbeddingsGrabBag(); @@ -64,6 +65,7 @@ public: CPPUNIT_TEST(testStockChart); CPPUNIT_TEST(testBarChart); CPPUNIT_TEST(testCrosses); + CPPUNIT_TEST(testScatterChart); CPPUNIT_TEST(testChartDataTable); CPPUNIT_TEST(testChartExternalData); CPPUNIT_TEST(testEmbeddingsGrabBag); @@ -117,6 +119,14 @@ protected: * Same as the assertXPath(), but don't assert: return the string instead. */ OUString getXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute); + /** + Assert that rXPath exists, and its content equals rContent. + */ + void assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rContent); + /** + Same as the assertXPathContent(), but don't assert: return the string instead. + */ + OUString getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath); private: }; @@ -211,6 +221,24 @@ void Chart2ExportTest::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfNodes, xmlXPathNodeSetGetLength(pXmlNodes)); } +void Chart2ExportTest::assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rContent) +{ + CPPUNIT_ASSERT_EQUAL_MESSAGE("XPath contents of child does not match", rContent, getXPathContent(pXmlDoc, rXPath)); +} + +OUString Chart2ExportTest::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath) +{ + xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath); + + CPPUNIT_ASSERT_MESSAGE(OString("XPath '" + rXPath + "' not found").getStr(), + xmlXPathNodeSetGetLength(pXmlNodes) > 0); + + xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; + + _xmlNode *pNode = &(pXmlNode->children[0]); + return pNode ? OUString::createFromAscii((const char*)((pXmlNode->children[0]).content)) : OUString(); +} + OUString Chart2ExportTest::getXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute) { xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath); @@ -479,6 +507,16 @@ void Chart2ExportTest::testCrosses() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero"); } +void Chart2ExportTest::testScatterChart() +{ + load("/chart2/qa/extras/data/docx/", "fdo77216.docx"); + xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); + if (!pXmlDoc) + return; + + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]", "1"); +} + void Chart2ExportTest::testChartDataTable() { load("/chart2/qa/extras/data/docx/", "testChartDataTable.docx"); diff --git a/chart2/qa/extras/data/docx/fdo77216.docx b/chart2/qa/extras/data/docx/fdo77216.docx new file mode 100644 index 0000000000000000000000000000000000000000..b741bbce2157dd56fd6d901b62d507adc0617cc4 GIT binary patch literal 23974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S+x`TI`k_jmoDT2p1L`9kK8RpJ+g z!{ra{;RPA$`Ulj5nb9MPhy@g=N4_E(@ErdF3e2_LIOB3t;Vp)-0eOor5r932@B<*a(b+bRf>aeS8JNj1=G^ zVz3#c9A<$U&FBjN5Qf)VqdE{0=4i_S(1Q$p_8ei{L>s7a$aCrF+R-QS5ZYZGVA{cp zJkX}~(9J;~cSD$S&jV@>+9({l38rl%-3w`{1#C$xx_0z20fYgEeNa3CY7?Mq tMsGzRG@lEBYDQ^OpzBAiV-UI-7(Rp{xgBkp2tRN$?@wUPoE{0%0RW*xWyAmg literal 0 HcmV?d00001 diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index f6e02dbf8818..9b12eb766336 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2008,6 +2008,14 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen pFS->singleElement( FSNS( XML_c, XML_ptCount ), XML_val, I32S( ptCount ), FSEND ); + + sal_Bool bIsNumberValue = sal_True; + sal_Bool bXSeriesValue = sal_False; + double Value = 1.0; + + if(nValueType == XML_xVal) + bXSeriesValue = sal_True; + for( sal_Int32 i = 0; i < ptCount; i++ ) { pFS->startElement( FSNS( XML_c, XML_pt ), @@ -2015,8 +2023,15 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen FSEND ); pFS->startElement( FSNS( XML_c, XML_v ), FSEND ); - if (!rtl::math::isNan(aValues[i])) + if (bIsNumberValue && !rtl::math::isNan(aValues[i])) pFS->write( aValues[i] ); + else if(bXSeriesValue) + { + //In Case aValues is not a number for X Values...We write X values as 1,2,3....MS Word does the same thing. + pFS->write( Value ); + Value = Value + 1; + bIsNumberValue = sal_False; + } pFS->endElement( FSNS( XML_c, XML_v ) ); pFS->endElement( FSNS( XML_c, XML_pt ) ); }