[Libreoffice-commits] core.git: 3 commits - chart2/qa xmloff/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Mon Mar 10 11:47:30 PDT 2014


 chart2/qa/extras/charttest.hxx      |   13 +++++++++++++
 xmloff/source/chart/PropertyMap.hxx |   29 ++++++++++++++++++++---------
 2 files changed, 33 insertions(+), 9 deletions(-)

New commits:
commit 7600e7660961c14ee539274d71a0ffe2314eb5ab
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Mar 10 19:23:08 2014 +0100

    add export validation tests for chart2
    
    ODS and DOCX are still disabled
    
    Change-Id: I2ce30df5fe8977c83a77ca210d79530423bef76e

diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 68b4c88..d4edddd 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -105,6 +105,19 @@ boost::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
     mxComponent->dispose();
     mxComponent = loadFromDesktop(pTempFile->GetURL(), maServiceName);
     std::cout << pTempFile->GetURL();
+    if(rFilterName == "Calc Office Open XML")
+    {
+        validate(pTempFile->GetFileName(), test::OOXML);
+    }
+    else if(rFilterName == "Office Open XML Text")
+    {
+        // validate(pTempFile->GetFileName(), test::OOXML);
+    }
+    else if(rFilterName == "calc8")
+    {
+        // validate(pTempFile->GetFileName(), test::ODF);
+    }
+
     CPPUNIT_ASSERT(mxComponent.is());
     return pTempFile;
 }
commit a49a9dab3168c03a539adc131f2ade03236edb69
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Mar 10 19:19:30 2014 +0100

    fix one more ODF validation error
    
    Change-Id: I265ea970043a954e2e60234d4b3ff90956c939ec

diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 8add811..b0118a1 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -141,7 +141,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
     // Chart display units flags
     MAP_ENTRY_ODF_EXT( "DisplayUnits", LO_EXT, XML_CHART_DUNITS_DISPLAYUNITS, XML_TYPE_BOOL ),
     MAP_ENTRY_ODF_EXT( "BuiltInUnit", LO_EXT, XML_CHART_DUNITS_BUILTINUNIT, XML_TYPE_STRING ),
-    MAP_ENTRY_ODF12( "ExternalData", CHART, XML_EXTERNALDATA, XML_TYPE_STRING),
+    MAP_ENTRY_ODF_EXT( "ExternalData", LO_EXT, XML_EXTERNALDATA, XML_TYPE_STRING),
 
     MAP_ENTRY( "ScaleText", CHART, XML_SCALE_TEXT, XML_TYPE_BOOL ),
 
commit 4c7116413af091a30f5fa60c63d29bc694730518
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Mar 10 19:15:45 2014 +0100

    fix odf validation errors around new chart regression curves
    
    Change-Id: If67207abb204b5aca8365737088437b12ac6eaf1

diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 8bd4b24..8add811 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -87,6 +87,7 @@
 #define MAP_ENTRY( a, ns, nm, t )            { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_010, false }
 #define MAP_ENTRY_ODF12( a, ns, nm, t )      { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012, false }
 #define MAP_ENTRY_ODF_EXT( a, ns, nm, t )    { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
+#define MAP_ENTRY_ODF_EXT_IMPORT( a, ns, nm, t )    { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true }
 #define MAP_CONTEXT( a, ns, nm, t, c )       { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010, false }
 #define MAP_SPECIAL( a, ns, nm, t, c )       { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010, false }
 #define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012, false }
@@ -194,14 +195,24 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
     // regression curve properties
     MAP_SPECIAL( "RegressionType", CHART, XML_REGRESSION_TYPE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ),
 
-    MAP_ENTRY_ODF_EXT( "CurveName", CHART, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
-    MAP_ENTRY_ODF_EXT( "PolynomialDegree", CHART, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
-    MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", CHART, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
-    MAP_ENTRY_ODF_EXT( "MovingAverageType", CHART, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
-    MAP_ENTRY_ODF_EXT( "ExtrapolateForward", CHART, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
-    MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", CHART, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
-    MAP_ENTRY_ODF_EXT( "ForceIntercept", CHART, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
-    MAP_ENTRY_ODF_EXT( "InterceptValue", CHART, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+    MAP_ENTRY_ODF_EXT( "CurveName", LO_EXT, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
+    MAP_ENTRY_ODF_EXT( "PolynomialDegree", LO_EXT, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
+    MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", LO_EXT, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
+    MAP_ENTRY_ODF_EXT( "MovingAverageType", LO_EXT, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+    MAP_ENTRY_ODF_EXT( "ExtrapolateForward", LO_EXT, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+    MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", LO_EXT, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+    MAP_ENTRY_ODF_EXT( "ForceIntercept", LO_EXT, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+    MAP_ENTRY_ODF_EXT( "InterceptValue", LO_EXT, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+
+    // import mapping for broken files
+    MAP_ENTRY_ODF_EXT_IMPORT( "CurveName", CHART, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "PolynomialDegree", CHART, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "MovingAveragePeriod", CHART, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "MovingAverageType", CHART, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateForward", CHART, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateBackward", CHART, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "ForceIntercept", CHART, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+    MAP_ENTRY_ODF_EXT_IMPORT( "InterceptValue", CHART, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
 
     MAP_SPECIAL_ODF12( "ErrorBarRangePositive", CHART, XML_ERROR_UPPER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only
     MAP_SPECIAL_ODF12( "ErrorBarRangeNegative", CHART, XML_ERROR_LOWER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only


More information about the Libreoffice-commits mailing list