[Libreoffice-commits] core.git: 4 commits - chart2/qa oox/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Apr 22 17:09:53 PDT 2015
chart2/qa/extras/chart2export.cxx | 12 ++++++++++++
chart2/qa/extras/data/xlsx/no_marker.xlsx |binary
oox/source/export/chartexport.cxx | 28 +++++++++++++---------------
3 files changed, 25 insertions(+), 15 deletions(-)
New commits:
commit 186238b1940f89070a9fb54778a9b63735c136f3
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Apr 23 01:59:24 2015 +0200
we should not try to export an error bar in that case
Change-Id: Id209c5b3af04d93b6aae4043d20144d01d5b92a4
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 263b9f3..5a51066 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3218,9 +3218,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
switch(nErrorBarStyle)
{
case cssc::ErrorBarStyle::NONE:
- // I have no idea how to map it to OOXML
- // this approach is as good as any else
- return "fixedVal";
+ return NULL;
case cssc::ErrorBarStyle::VARIANCE:
break;
case cssc::ErrorBarStyle::STANDARD_DEVIATION:
commit 34ba0a84eb60d4004c1a04948e95c2b3f3e3eef5
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Apr 23 01:53:45 2015 +0200
don't use a prefix for double values
Change-Id: Id2af88909281d5367d99ae06b66c70e00e282abf
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 5d65f8a..263b9f3 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3035,18 +3035,18 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
assert(false);
}
- double aExtrapolateForward = 0.0;
- double aExtrapolateBackward = 0.0;
+ double fExtrapolateForward = 0.0;
+ double fExtrapolateBackward = 0.0;
- xProperties->getPropertyValue("ExtrapolateForward") >>= aExtrapolateForward;
- xProperties->getPropertyValue("ExtrapolateBackward") >>= aExtrapolateBackward;
+ xProperties->getPropertyValue("ExtrapolateForward") >>= fExtrapolateForward;
+ xProperties->getPropertyValue("ExtrapolateBackward") >>= fExtrapolateBackward;
pFS->singleElement( FSNS( XML_c, XML_forward ),
- XML_val, OString::number(aExtrapolateForward).getStr(),
+ XML_val, OString::number(fExtrapolateForward).getStr(),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_backward ),
- XML_val, OString::number(aExtrapolateBackward).getStr(),
+ XML_val, OString::number(fExtrapolateBackward).getStr(),
FSEND );
bool bForceIntercept = false;
@@ -3054,11 +3054,11 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
if (bForceIntercept)
{
- double aInterceptValue = 0.0;
- xProperties->getPropertyValue("InterceptValue") >>= aInterceptValue;
+ double fInterceptValue = 0.0;
+ xProperties->getPropertyValue("InterceptValue") >>= fInterceptValue;
pFS->singleElement( FSNS( XML_c, XML_intercept ),
- XML_val, OString::number(aInterceptValue).getStr(),
+ XML_val, OString::number(fInterceptValue).getStr(),
FSEND );
}
commit 7d7080b02df5e292ba3ceedaf28e3f704d9c1ab2
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Apr 23 01:50:30 2015 +0200
move one more bool a prefix to b
Change-Id: Id45b20e2216781e346746723856a2b4dfac81df9
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3c609be..5d65f8a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3049,10 +3049,10 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
XML_val, OString::number(aExtrapolateBackward).getStr(),
FSEND );
- bool aForceIntercept = false;
- xProperties->getPropertyValue("ForceIntercept") >>= aForceIntercept;
+ bool bForceIntercept = false;
+ xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept;
- if (aForceIntercept)
+ if (bForceIntercept)
{
double aInterceptValue = 0.0;
xProperties->getPropertyValue("InterceptValue") >>= aInterceptValue;
commit 2aaea67759a59579de8b8b93ba0413b64e74e20b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Apr 23 01:47:53 2015 +0200
add test for line only chart export, related tdf#90728
Change-Id: I4c8319b1b675297c25a70584e151cf985870c0f8
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 5a3d42c..ab30664 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -90,6 +90,7 @@ public:
void testTitleOverlayXLSX();
void testInvertIfNegativeXLSX();
void testBubble3DXLSX();
+ void testNoMarkerXLSX();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(test);
@@ -144,6 +145,7 @@ public:
CPPUNIT_TEST(testTitleOverlayXLSX);
CPPUNIT_TEST(testInvertIfNegativeXLSX);
CPPUNIT_TEST(testBubble3DXLSX);
+ CPPUNIT_TEST(testNoMarkerXLSX);
CPPUNIT_TEST_SUITE_END();
protected:
@@ -1308,6 +1310,16 @@ void Chart2ExportTest::testBubble3DXLSX()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:bubble3D", "val", "0");
}
+void Chart2ExportTest::testNoMarkerXLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "no_marker.xlsx");
+ xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol", "val", "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:marker/c:symbol", "val", "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker", "val", "0");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/no_marker.xlsx b/chart2/qa/extras/data/xlsx/no_marker.xlsx
new file mode 100644
index 0000000..228c459
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/no_marker.xlsx differ
More information about the Libreoffice-commits
mailing list