summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-20 07:31:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-20 09:16:11 +0100
commit3caea32ae4af3a1e4885266cf5e26333ee98fb28 (patch)
tree8b5d9fd320d3befa237fc67c07571d462be7ccea /chart2/qa
parent8ef2b4b4c6624247305a22dbcc54098910584b66 (diff)
Extended loplugin:ostr: chart2
Change-Id: I544f7286ff28cd105fa9dc7bff2712aebb3d5a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159725 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/chart2export.cxx142
-rw-r--r--chart2/qa/extras/chart2export2.cxx434
-rw-r--r--chart2/qa/extras/chart2export3.cxx296
-rw-r--r--chart2/qa/extras/chart2geometry.cxx40
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx52
5 files changed, 494 insertions, 470 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 2f5f030ef3d1..b92c933970cc 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -238,14 +238,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarPropXLSX)
CPPUNIT_ASSERT(pXmlDoc);
// test y error bars property
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir", "val", "y");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln", "w", "12600");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir"_ostr, "val"_ostr, "y");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln"_ostr, "w"_ostr, "12600");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
// test x error bars property
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir", "val", "x");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln", "w", "9360");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "595959");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir"_ostr, "val"_ostr, "x");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln"_ostr, "w"_ostr, "9360");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "595959");
}
// This method tests the preservation of properties for trendlines / regression curves
@@ -320,11 +320,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order"_ostr, "val"_ostr, "1");
assertXPathContent(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v",
+ "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr,
"Open");
}
@@ -335,7 +335,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChart)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir", "val", "col");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir"_ostr, "val"_ostr, "col");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
@@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses"_ostr, "val"_ostr, "autoZero");
}
// tdf#142351: test crossesAt val="-50" with XLSX
{
@@ -355,7 +355,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt", "val", "-50");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt"_ostr, "val"_ostr, "-50");
}
}
@@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]", "1");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues)
@@ -416,11 +416,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:ptCount", "val", "5");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[1]/c:v", "15");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[2]/c:v", "11");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[3]/c:v", "20");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[4]/c:v", "16");
+ assertXPath(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:ptCount"_ostr, "val"_ostr, "5");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[1]/c:v"_ostr, "15");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[2]/c:v"_ostr, "11");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[3]/c:v"_ostr, "20");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[4]/c:v"_ostr, "16");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories)
@@ -430,9 +430,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount", "val", "4");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[1]/c:v", "Row 1");
- assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[2]/c:v", "Row 2");
+ assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount"_ostr, "val"_ostr, "4");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[1]/c:v"_ostr, "Row 1");
+ assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[2]/c:v"_ostr, "Row 2");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable)
@@ -442,9 +442,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline"_ostr, "val"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData)
@@ -454,7 +454,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:externalData");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:externalData"_ostr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag)
@@ -506,8 +506,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars)
@@ -516,7 +516,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart)
@@ -526,7 +526,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart"_ostr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits)
@@ -536,7 +536,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit", "val", "billions");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit"_ostr, "val"_ostr, "billions");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill)
@@ -546,7 +546,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"_ostr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill)
@@ -555,7 +555,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill"_ostr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle)
@@ -568,7 +568,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill"_ostr);
}
//The below test case tests the built in marker 'x' for Office 2010 in Line charts
@@ -579,8 +579,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"7");
}
// We can also use the built in marker 'x' in scatter chart, hence writing the test case for the same.
@@ -591,8 +591,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"7");
}
// Also in a combination of charts like a column chart and line chart, we can use the built in marker 'x'
@@ -604,8 +604,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]","val","7");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]"_ostr,"val"_ostr,"x");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:size[1]"_ostr,"val"_ostr,"7");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker)
@@ -616,13 +616,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// 1. series
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:symbol", "val", "square");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:size", "val", "8");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, "square");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, "8");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
// 2. series
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:symbol", "val", "x");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:size", "val", "15");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "7030a0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, "x");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, "15");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "7030a0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS)
@@ -862,8 +862,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX)
// We must not export label position attributes for 3D bar charts. The
// same rule also applies to several other 3D charts, apparently.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLblPos", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX)
@@ -877,9 +877,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLblPos", "val", "ctr");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLblPos", "val", "inEnd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos", "val", "inBase");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "ctr");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "inEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "inBase");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX)
@@ -897,7 +897,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX)
CPPUNIT_ASSERT(pXmlDoc);
// This was "t", should be one of the allowed values.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl[2]/c:dLblPos", "val", "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX)
@@ -912,8 +912,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX)
CPPUNIT_ASSERT(pXmlDoc);
// We must not export label position attributes for radar charts.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLblPos", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX)
@@ -931,8 +931,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX)
CPPUNIT_ASSERT(pXmlDoc);
// We must not export label position attributes for doughnut charts.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLblPos", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX)
@@ -950,8 +950,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX)
CPPUNIT_ASSERT(pXmlDoc);
// We must not export label position attributes for area charts.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLblPos", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLblPos"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl/c:dLblPos"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDefaultLineChartDOCX)
@@ -987,10 +987,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "b", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "sz", "1600");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:latin", "typeface", "Times New Roman");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1600");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr/a:latin"_ostr, "typeface"_ostr, "Times New Roman");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation)
@@ -1000,8 +1000,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "30");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY", "val", "50");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, "30");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, "50");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart)
@@ -1020,8 +1020,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart)
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OUString aValueOfFirstDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id");
- OUString aValueOfSecondDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]", "id");
+ OUString aValueOfFirstDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]"_ostr, "id"_ostr);
+ OUString aValueOfSecondDocPR = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]"_ostr, "id"_ostr);
CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR );
}
@@ -1036,7 +1036,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder)
@@ -1045,8 +1045,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]"_ostr, "val"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels)
@@ -1124,8 +1124,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartRotation)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "40");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY", "val", "30");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, "40");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, "30");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag)
@@ -1228,7 +1228,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS)
diff --git a/chart2/qa/extras/chart2export2.cxx b/chart2/qa/extras/chart2export2.cxx
index c565ad03c538..f17e35c1b24d 100644
--- a/chart2/qa/extras/chart2export2.cxx
+++ b/chart2/qa/extras/chart2export2.cxx
@@ -46,7 +46,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Check there are only two <lineChart> tag in the XML, one for the primary and one for the secondary axis.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart", 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart"_ostr, 2);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX)
@@ -57,23 +57,23 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Collect barchart axID on secondary Axis
- OUString XValueIdOfBarchart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val");
- OUString YValueIdOfBarchart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val");
+ OUString XValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
// Collect linechart axID on primary Axis
- OUString XValueIdOfLinechart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val");
- OUString YValueIdOfLinechart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val");
+ OUString XValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr);
// Check which c:catAx and c:valAx contain the AxisId of charttypes
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr,
XValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr,
YValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr,
XValueIdOfBarchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr,
YValueIdOfBarchart);
}
@@ -85,26 +85,26 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisODS)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Collect barchart axID on secondary Axis
- OUString XValueIdOfBarchart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val");
- OUString YValueIdOfBarchart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val");
+ OUString XValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
// Collect linechart axID on primary Axis
- OUString XValueIdOfLinechart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val");
- OUString YValueIdOfLinechart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val");
+ OUString XValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOfLinechart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr);
// Check which c:catAx and c:valAx contain the AxisId of charttypes
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr,
XValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr,
YValueIdOfLinechart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr,
XValueIdOfBarchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr,
YValueIdOfBarchart);
// do not need CT_crosses tag if the actual axis is deleted, so we need to make sure it is not saved
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:crosses", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:crosses"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
@@ -118,16 +118,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
- "between");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr,
+ "val"_ostr, "between");
}
{
loadFromURL(u"xlsx/tdf132076.xlsx");
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
- "between");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr,
+ "val"_ostr, "between");
}
}
@@ -138,7 +138,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"between");
}
@@ -149,7 +149,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"between");
}
@@ -160,8 +160,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr",
- "rot", "0");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:bodyPr"_ostr,
+ "rot"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX)
@@ -173,25 +174,29 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX)
// test X Axis title position
OUString aXVal = getXPath(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:x",
- "val");
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.698208543867708, nX, 1e-3);
OUString aYVal = getXPath(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:y",
- "val");
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:title/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.805152435594555, nY, 1e-3);
// test Y Axis title position
- aXVal = getXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:x",
- "val");
+ aXVal = getXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
nX = aXVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0253953671500755, nX, 1e-3);
- aYVal = getXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:y",
- "val");
+ aYVal = getXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
nY = aYVal.toDouble();
// just test the first two decimal digits because it is not perfect in docx yet.
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.384070199122511, nY, 1e-2);
@@ -206,7 +211,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
- assertXPath(pXmlDoc, "(//c:crossBetween)[1]", "val", "midCat");
+ assertXPath(pXmlDoc, "(//c:crossBetween)[1]"_ostr, "val"_ostr, "midCat");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX)
@@ -216,8 +221,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dPt/c:explosion",
- "val", "28");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dPt/c:explosion"_ostr,
+ "val"_ostr, "28");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
@@ -337,8 +342,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
// Check the data labels font color for the complete data series
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:p/a:pPr/"
- "a:defRPr/a:solidFill/a:srgbClr",
- "val", "404040");
+ "a:defRPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "404040");
}
/// Test for tdf#94235
@@ -385,20 +390,21 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
CPPUNIT_ASSERT(pXmlDoc);
// test custom position of data label (xlsx)
- assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx",
- "val", "2");
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr,
+ "val"_ostr, "2");
OUString aXVal = getXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/"
- "c:dLbl[1]/c:layout/c:manualLayout/c:x",
- "val");
+ "c:dLbl[1]/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.11027682973075476, nX, 1e-7);
OUString aYVal = getXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/"
- "c:dLbl[1]/c:layout/c:manualLayout/c:y",
- "val");
+ "c:dLbl[1]/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0742140311063737, nY, 1e-7);
}
@@ -410,20 +416,21 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
CPPUNIT_ASSERT(pXmlDoc);
// test custom position of data label (docx)
- assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:idx",
- "val", "2");
+ assertXPath(
+ pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[2]/c:idx"_ostr,
+ "val"_ostr, "2");
OUString aXVal = getXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/"
- "c:dLbl[2]/c:layout/c:manualLayout/c:x",
- "val");
+ "c:dLbl[2]/c:layout/c:manualLayout/c:x"_ostr,
+ "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0227256488772236, nX, 1e-7);
OUString aYVal = getXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/"
- "c:dLbl[2]/c:layout/c:manualLayout/c:y",
- "val");
+ "c:dLbl[2]/c:layout/c:manualLayout/c:y"_ostr,
+ "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.172648731408574, nY, 1e-7);
}
@@ -522,12 +529,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/"
- "c15:showLeaderLines",
- "val", "1");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "1");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/"
- "c15:showLeaderLines",
- "val", "0");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "0");
}
loadFromURL(u"docx/MSO_Custom_Leader_Line.docx");
{
@@ -537,8 +544,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
// tdf#134571: Check the leader line is switch off.
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:extLst/c:ext/"
- "c15:showLeaderLines",
- "val", "0");
+ "c15:showLeaderLines"_ostr,
+ "val"_ostr, "0");
}
}
@@ -549,10 +556,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX)
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt",
- "formatCode", "#,##0.00,\\K");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt",
- "sourceLinked", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
+ "formatCode"_ostr, "#,##0.00,\\K");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
@@ -568,13 +575,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
// The text separator should be a new line
assertXPathContent(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:separator", "\n");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:separator"_ostr,
+ "\n");
// The text separator should be a comma
assertXPathContent(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:separator", ", ");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:separator"_ostr,
+ ", ");
// The text separator should be a semicolon
assertXPathContent(
- pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator", "; ");
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator"_ostr,
+ "; ");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
@@ -583,9 +593,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
save("Impress MS PowerPoint 2007 XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val",
- "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX)
@@ -595,12 +605,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val",
- "f6f8fc");
+ "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr,
+ "val"_ostr, "f6f8fc");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val",
- "c7d5ed");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr,
+ "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
@@ -609,8 +619,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
save("Impress MS PowerPoint 2007 XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr,
+ "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
@@ -621,8 +632,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
CPPUNIT_ASSERT(pXmlDoc1);
// Chart1 xAxis labels should be 45 degree
- assertXPath(pXmlDoc1, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot",
- "2700000");
+ assertXPath(pXmlDoc1, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "2700000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
@@ -634,28 +645,29 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
// check category axis labels number of first level
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/"
- "c:multiLvlStrCache/c:ptCount",
- "val", "6");
+ "c:multiLvlStrCache/c:ptCount"_ostr,
+ "val"_ostr, "6");
// check category axis labels text of first level
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v"_ostr,
"Categoria 1");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[6]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[6]/c:v"_ostr,
"Categoria 6");
// check category axis labels text of second level
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v"_ostr,
"2011");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[3]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[3]/c:v"_ostr,
"2013");
// check the 'noMultiLvlLbl' tag - ChartExport.cxx:2950 FIXME: seems not support, so check the default noMultiLvlLbl value.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl"_ostr,
+ "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
@@ -667,28 +679,29 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
// check category axis labels number of first level
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:multiLvlStrRef/"
- "c:multiLvlStrCache/c:ptCount",
- "val", "4");
+ "c:multiLvlStrCache/c:ptCount"_ostr,
+ "val"_ostr, "4");
// check category axis labels text of first level
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[1]/c:v"_ostr,
"Categoria 1");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[4]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[1]/c:pt[4]/c:v"_ostr,
"Categoria 4");
// check category axis labels text of second level
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[1]/c:v"_ostr,
"2011");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/"
- "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[2]/c:v",
+ "c:multiLvlStrRef/c:multiLvlStrCache/c:lvl[2]/c:pt[2]/c:v"_ostr,
"2012");
// check the 'noMultiLvlLbl' tag - ChartExport.cxx:2950 FIXME: seems not support, so check the default noMultiLvlLbl value.
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:noMultiLvlLbl"_ostr,
+ "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
@@ -698,8 +711,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr", "rot",
- "-5400000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-5400000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
@@ -710,10 +723,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
CPPUNIT_ASSERT(pXmlDoc);
// Collect 3D barchart Z axID
- OUString zAxisIdOf3DBarchart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:axId[3]", "val");
+ OUString zAxisIdOf3DBarchart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bar3DChart/c:axId[3]"_ostr, "val"_ostr);
// 3D barchart Z axis properties should be in a serAx OOXML tag instead of catAx
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId"_ostr, "val"_ostr,
zAxisIdOf3DBarchart);
}
@@ -725,10 +738,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis)
CPPUNIT_ASSERT(pXmlDoc);
// Collect 3D area chart Z axID
- OUString zAxisIdOf3DAreachart
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:area3DChart/c:axId[3]", "val");
+ OUString zAxisIdOf3DAreachart = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:area3DChart/c:axId[3]"_ostr, "val"_ostr);
// 3D area chart z-axis properties should be in a serAx OOXML element instead of catAx
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:serAx/c:axId"_ostr, "val"_ostr,
zAxisIdOf3DAreachart);
}
@@ -741,8 +754,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029)
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr", "rot",
- "-5400000");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-5400000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
@@ -764,13 +777,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OUString XValueId
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]", "val");
- OUString YValueId
- = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]", "val");
+ OUString XValueId = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueId = getXPath(
+ pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:axId[2]"_ostr, "val"_ostr);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]", "val", XValueId);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val", YValueId);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[1]"_ostr, "val"_ostr,
+ XValueId);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]"_ostr, "val"_ostr,
+ YValueId);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189)
@@ -798,17 +813,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt",
- "formatCode", "0.000%");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt",
- "formatCode", "0.000%");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt"_ostr,
+ "formatCode"_ostr, "0.000%");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012)
@@ -818,7 +833,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// workaround: use-zero instead of leave-gap to show the original line chart
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "zero");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "zero");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
@@ -832,7 +847,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// workaround: use leave-gap instead of zero to show the original line chart
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "gap");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "gap");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
@@ -851,7 +866,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/"
- "c:rich/a:p/a:r/a:t",
+ "c:rich/a:p/a:r/a:t"_ostr,
"kiscica");
}
@@ -870,27 +885,27 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText)
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val",
- "2");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr,
+ "val"_ostr, "2");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:tx/"
- "c:rich/a:p/a:r[1]/a:t",
+ "c:rich/a:p/a:r[1]/a:t"_ostr,
"3.5");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[1]/c:tx/"
- "c:rich/a:p/a:r[3]/a:t",
+ "c:rich/a:p/a:r[3]/a:t"_ostr,
"CustomLabel 1");
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx", "val",
- "3");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx"_ostr,
+ "val"_ostr, "3");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/"
- "c:rich/a:p/a:r[1]/a:t",
+ "c:rich/a:p/a:r[1]/a:t"_ostr,
"4.5");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:tx/"
- "c:rich/a:p/a:r[3]/a:t",
+ "c:rich/a:p/a:r[3]/a:t"_ostr,
"CustomLabel 2");
}
@@ -941,8 +956,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
CPPUNIT_ASSERT(pXmlDoc);
// Without the fix in place, the shape would have had a solidFill background
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:noFill", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
@@ -967,12 +982,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:ln/a:noFill", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:solidFill/a:srgbClr", "val",
- "cccccc");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:noFill", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:solidFill/a:srgbClr",
- "val", "b3b3b3");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:ln/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:floor/c:spPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:noFill"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:backWall/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "b3b3b3");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
@@ -985,9 +1000,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
// This was 12: all series exported with square markers
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker/c:symbol[@val='square']", 0);
+ "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker/c:symbol[@val='square']"_ostr,
+ 0);
// instead of skipping markers
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
@@ -1021,12 +1037,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"between");
pXmlDoc = parseExport("word/charts/chart2.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val",
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
"midCat");
}
@@ -1075,20 +1091,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "formatCode",
- "dd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "sourceLinked",
- "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt"_ostr,
+ "formatCode"_ostr, "dd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
{
loadFromURL(u"xlsx/tdf132076.xlsx");
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "formatCode",
- "dd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "sourceLinked",
- "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt"_ostr,
+ "formatCode"_ostr, "dd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt"_ostr,
+ "sourceLinked"_ostr, "0");
}
}
@@ -1098,16 +1114,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812)
save("Impress MS PowerPoint 2007 XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", "path",
- "circle");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect",
- "l", "50000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect",
- "t", "49000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect",
- "r", "50000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect",
- "b", "51000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path"_ostr,
+ "path"_ostr, "circle");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "l"_ostr, "50000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "t"_ostr, "49000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "r"_ostr, "50000");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
+ "b"_ostr, "51000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
@@ -1124,12 +1144,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
// Test word wrap of data point label
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:bodyPr",
- "wrap", "none");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "none");
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr",
- "wrap", "square");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "square");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
@@ -1146,8 +1166,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
// Test rotation of data point label
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr",
- "rot", "-4500000");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr"_ostr,
+ "rot"_ostr, "-4500000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594)
@@ -1157,7 +1177,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255)
@@ -1183,8 +1203,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255)
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:txPr/a:bodyPr", "wrap",
- "square");
+ "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
+ "wrap"_ostr, "square");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
@@ -1213,8 +1233,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:tx/c:rich/a:p/"
- "a:r/a:rPr",
- "sz", "900");
+ "a:r/a:rPr"_ostr,
+ "sz"_ostr, "900");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647)
@@ -1224,7 +1244,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
@@ -1240,7 +1260,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
assertXPathContent(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v"_ostr,
"John");
}
@@ -1271,13 +1291,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:baseTimeUnit", "val", "days");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorUnit", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorTimeUnit", "val",
- "months");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorUnit", "val", "7");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorTimeUnit", "val",
- "days");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:baseTimeUnit"_ostr,
+ "val"_ostr, "days");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorUnit"_ostr, "val"_ostr,
+ "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorTimeUnit"_ostr,
+ "val"_ostr, "months");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorUnit"_ostr, "val"_ostr,
+ "7");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorTimeUnit"_ostr,
+ "val"_ostr, "days");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
@@ -1344,13 +1367,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
// Check the first data label field type
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld"_ostr,
+ "type"_ostr, "CELLRANGE");
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLbl/c:tx/c:rich/a:p/a:fld"_ostr,
+ "type"_ostr, "CELLRANGE");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181)
@@ -1487,11 +1510,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX)
CPPUNIT_ASSERT(pXmlDoc);
// test the syntax of local range name on the local sheet.
assertXPathContent(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:f",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:f"_ostr,
"Sheet1!local_name_range");
// test the syntax of a global range name.
assertXPathContent(pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:val/c:numRef/c:f",
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:val/c:numRef/c:f"_ostr,
"[0]!series1");
}
@@ -1535,26 +1558,27 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext",
- "uri", "{02D57815-91ED-43cb-92C2-25804820EDAC}");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext"_ostr,
+ "uri"_ostr, "{02D57815-91ED-43cb-92C2-25804820EDAC}");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
- "c15:datalabelsRange/c15:dlblRangeCache/c:ptCount",
- "val", "4");
+ "c15:datalabelsRange/c15:dlblRangeCache/c:ptCount"_ostr,
+ "val"_ostr, "4");
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
- "c15:datalabelsRange/c15:f",
+ "c15:datalabelsRange/c15:f"_ostr,
aCellRange);
for (size_t i = 0; i < nLabels; ++i)
{
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dLbls/c:dLbl["
+ OString::number(i + 1) + "]/c:tx/c:rich/a:p/a:fld",
- "type", "CELLRANGE");
+ "type"_ostr, "CELLRANGE");
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dLbls/c:dLbl["
+ OString::number(i + 1) + "]/c:extLst/c:ext/c15:showDataLabelsRange",
- "val", "1");
+ "val"_ostr, "1");
// Check if the actual label is stored under c15:datalabelsRange
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/"
@@ -1581,15 +1605,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
41426, 41456, 41487, 41518, 41548, 41579, 41609, 41640,
};
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat"_ostr);
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/"
- "c:numCache/c:formatCode",
+ "c:numCache/c:formatCode"_ostr,
"mmm\\-yy");
assertXPath(
pXmlDoc,
- "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:ptCount",
- "val", OUString::number(nCats));
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:ptCount"_ostr,
+ "val"_ostr, OUString::number(nCats));
for (size_t i = 0; i < nCats; ++i)
{
@@ -1597,7 +1621,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:pt["
+ OString::number(i + 1) + "]",
- "idx", OUString::number(i));
+ "idx"_ostr, OUString::number(i));
assertXPathContent(
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:pt["
diff --git a/chart2/qa/extras/chart2export3.cxx b/chart2/qa/extras/chart2export3.cxx
index 845e6c98c6a6..e06568f5f1e8 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -38,9 +38,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr", "b", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr", "sz", "2000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "2000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
@@ -50,10 +50,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart"_ostr, 1);
//no fill
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
@@ -64,8 +64,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
CPPUNIT_ASSERT(pXmlDoc);
//no fill
- assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:noFill", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:solidFill", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:solidFill"_ostr, 0);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
@@ -74,8 +74,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX)
@@ -84,9 +84,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "666666");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "666666");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX)
@@ -95,8 +95,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
@@ -108,9 +108,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Test the transparency of the first color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha"_ostr, "val"_ostr, "60000");
// Test the transparency of the second color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "90000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha"_ostr, "val"_ostr, "90000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS)
@@ -121,9 +121,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Test the transparency of the first color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr/a:alpha"_ostr, "val"_ostr, "60000");
// Test the transparency of the second color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "60000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr/a:alpha"_ostr, "val"_ostr, "60000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
@@ -134,9 +134,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Test the position of the first color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]", "pos", "45000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[1]"_ostr, "pos"_ostr, "45000");
// Test the position of the second color
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]", "pos", "100000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:gradFill/a:gsLst/a:gs[2]"_ostr, "pos"_ostr, "100000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
@@ -146,9 +146,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Test the gradient style (if there is no 'a:path' attribute, it is a linear gradient)
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path"_ostr, 0);
// Test the linear gradient angle
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin", "ang", "13500000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin"_ostr, "ang"_ostr, "13500000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX)
@@ -158,16 +158,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX)
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "c7d5ed");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "70ad47");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "f6f8fc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "70ad47");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "000000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, "2");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "000000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
@@ -180,10 +180,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
save("Office Open XML Text");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos", "val", "outEnd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[3]/c:dLblPos", "val", "outEnd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[4]/c:dLblPos", "val", "outEnd");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[5]/c:dLblPos", "val", "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[3]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[4]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[5]/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
@@ -192,7 +192,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
@@ -201,7 +201,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "gap");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "gap");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
@@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "92d050");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "92d050");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
@@ -219,7 +219,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX)
@@ -228,12 +228,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 2);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt", "formatCode", "0.00E+000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt", "sourceLinked", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx"_ostr, 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt"_ostr, "formatCode"_ostr, "0.00E+000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt", "formatCode", "[$$-409]#,##0;\\-[$$-409]#,##0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt", "sourceLinked", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "formatCode"_ostr, "[$$-409]#,##0;\\-[$$-409]#,##0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "sourceLinked"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
@@ -246,11 +246,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "formatCode", "[$-40E]0.00%");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt", "sourceLinked", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr, "formatCode"_ostr, "[$-40E]0.00%");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "formatCode", "[$-40E]0.00%");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "sourceLinked", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "formatCode"_ostr, "[$-40E]0.00%");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
}
loadFromURL(u"xlsx/tdf130986.xlsx");
@@ -258,9 +258,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt", "formatCode", "0.00E+00");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt", "sourceLinked", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "formatCode"_ostr, "0.00E+00");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "sourceLinked"_ostr, "0");
}
}
@@ -278,8 +278,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLblPos", "val", "outEnd");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLblPos"_ostr, "val"_ostr, "outEnd");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
@@ -295,7 +295,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr", "val", "F79646");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "F79646");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
@@ -304,7 +304,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
@@ -313,7 +313,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
@@ -322,9 +322,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D", "val", "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[2]/c:bubble3D", "val", "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[3]/c:bubble3D", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[2]/c:bubble3D"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[3]/c:bubble3D"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
@@ -333,9 +333,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol"_ostr, "val"_ostr, "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:marker/c:symbol"_ostr, "val"_ostr, "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
@@ -344,22 +344,22 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode", "val", "edge");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode", "val", "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
- OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x", "val");
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT(nX > 0);
CPPUNIT_ASSERT(nX < 1);
- OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y", "val");
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT(nY > 0);
CPPUNIT_ASSERT(nY < 1);
CPPUNIT_ASSERT(nX != nY);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr", "rot", "1200000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr"_ostr, "rot"_ostr, "1200000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
@@ -369,27 +369,27 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", "val", "inner");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode", "val", "edge");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode", "val", "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget"_ostr, "val"_ostr, "inner");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
- OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x", "val");
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT(nX > 0);
CPPUNIT_ASSERT(nX < 1);
- OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:y", "val");
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT(nY > 0);
CPPUNIT_ASSERT(nY < 1);
CPPUNIT_ASSERT(nX != nY);
- OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:w", "val");
+ OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:w"_ostr, "val"_ostr);
double nW = aWVal.toDouble();
CPPUNIT_ASSERT(nW > 0);
CPPUNIT_ASSERT(nW < 1);
- OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:h", "val");
+ OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:h"_ostr, "val"_ostr);
double nH = aHVal.toDouble();
CPPUNIT_ASSERT(nH > 0);
CPPUNIT_ASSERT(nH < 1);
@@ -403,34 +403,34 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 0);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode", "val", "edge");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode", "val", "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget"_ostr, 0);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, "edge");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, "edge");
- OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x", "val");
+ OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
CPPUNIT_ASSERT(nX > 0);
CPPUNIT_ASSERT(nX < 1);
- OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:y", "val");
+ OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:y"_ostr, "val"_ostr);
double nY = aYVal.toDouble();
CPPUNIT_ASSERT(nY > 0);
CPPUNIT_ASSERT(nY < 1);
CPPUNIT_ASSERT(nX != nY);
- OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w", "val");
+ OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w"_ostr, "val"_ostr);
double nW = aWVal.toDouble();
CPPUNIT_ASSERT(nW > 0);
CPPUNIT_ASSERT(nW < 1);
- OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h", "val");
+ OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h"_ostr, "val"_ostr);
double nH = aHVal.toDouble();
CPPUNIT_ASSERT(nH > 0);
CPPUNIT_ASSERT(nH < 1);
CPPUNIT_ASSERT(nH != nW);
// Make sure that default text font size is preserved after export
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "900");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
@@ -440,12 +440,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// test properties of subtitle
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1100");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "00a933");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", "Times New Roman");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Subtitle");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "b2b2b2");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1100");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "00a933");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, "Times New Roman");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Subtitle");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "b2b2b2");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
@@ -455,13 +455,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// test properties of title
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "1300");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "i", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "f10d0c");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin", "typeface", "Arial");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t", "It is a Maintitle\nIt is a Subtitle");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "81d41a");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1300");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "f10d0c");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, "Arial");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Maintitle\nIt is a Subtitle");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "81d41a");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
@@ -470,7 +470,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
@@ -479,8 +479,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX)
@@ -489,9 +489,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "666666");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "cccccc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "666666");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
@@ -500,8 +500,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
save("Calc Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
@@ -511,16 +511,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "000000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "000000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr", "val", "c7d5ed");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr", "val", "70ad47");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, "2");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, "f6f8fc");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, "c7d5ed");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "70ad47");
}
namespace {
@@ -589,15 +589,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "1000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "i", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr", "u", "sng");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "u"_ostr, "sng");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "b", "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr", "strike", "sngStrike");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr", "val", "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "900");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "strike"_ostr, "sngStrike");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
@@ -607,11 +607,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "sz", "2400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr", "b", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, "2400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr", "sz", "2400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr", "b", "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, "2400");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotVisOnly", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotVisOnly"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
@@ -631,7 +631,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161)
@@ -641,7 +641,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:varyColors", "val", "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:varyColors"_ostr, "val"_ostr, "0");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3)
@@ -671,13 +671,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart", 2);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[1]/c:ser", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[2]/c:ser", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 4);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:delete[@val='1']", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='l']", 1);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='r']", 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart"_ostr, 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[1]/c:ser"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart[2]/c:ser"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx"_ostr, 4);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:delete[@val='1']"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='l']"_ostr, 1);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:axPos[@val='r']"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
@@ -687,14 +687,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart", 2);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart"_ostr, 2);
// test there is just those series in the first <lineChart> tag which are attached to the primary axis
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser", 2);
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v", "b");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[2]/c:tx/c:strRef/c:strCache/c:pt/c:v", "c");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser"_ostr, 2);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr, "b");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[1]/c:ser[2]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr, "c");
// test there is just those series in the second <lineChart> tag which are attached to the secondary axis
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser", 1);
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v", "a");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser"_ostr, 1);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart[2]/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr, "a");
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
@@ -704,16 +704,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
// Collect barchart axID on primary Axis
- OUString XValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[1]", "val");
- OUString YValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[2]", "val");
+ OUString XValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[2]"_ostr, "val"_ostr);
// Collect barchart axID on secondary Axis
- OUString XValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[1]", "val");
- OUString YValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[2]", "val");
+ OUString XValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[1]"_ostr, "val"_ostr);
+ OUString YValueIdOf2Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[2]/c:axId[2]"_ostr, "val"_ostr);
// Check which c:catAx and c:valAx contain the AxisId of barcharts
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId", "val", XValueIdOf1Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId", "val", YValueIdOf1Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId", "val", XValueIdOf2Barchart);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId", "val", YValueIdOf2Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[1]/c:axId"_ostr, "val"_ostr, XValueIdOf1Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:axId"_ostr, "val"_ostr, YValueIdOf1Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx[2]/c:axId"_ostr, "val"_ostr, XValueIdOf2Barchart);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:axId"_ostr, "val"_ostr, YValueIdOf2Barchart);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index c4374e65c678..52e0ff414c63 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -142,12 +142,12 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3()
static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr);
// chart area
- assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val", "dashDot");
+ assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val"_ostr, "dashDot");
// data series line
static constexpr OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"_ostr);
- assertXPath(pXmlDoc, sStart + sDash, "val", "dash");
+ assertXPath(pXmlDoc, sStart + sDash, "val"_ostr, "dash");
// regression-curve (trendline)
- assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val", "sysDot");
+ assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val"_ostr, "sysDot");
}
void Chart2GeometryTest::testTdf135184RoundLineCap4()
@@ -160,10 +160,10 @@ void Chart2GeometryTest::testTdf135184RoundLineCap4()
static constexpr OString sChartStart("/c:chartSpace/c:chart"_ostr);
static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr);
- assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val", "sysDot");
+ assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val"_ostr, "sysDot");
const OString sSeries(sChartStart + "/c:plotArea/c:pieChart/c:ser/c:dPt[3]");
- assertXPath(pXmlDoc, sSeries + sDash, "val", "dash");
- assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val", "dashDot");
+ assertXPath(pXmlDoc, sSeries + sDash, "val"_ostr, "dash");
+ assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val"_ostr, "dashDot");
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
@@ -183,10 +183,10 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:spPr/a:gradFill");
+ OString sPathStart("//c:chartSpace/c:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "30000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "30000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "30000");
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
@@ -210,7 +210,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName = getXPathContent(
pXmlDoc,
- "//office:document-content/office:body/office:chart/chart:chart/@chart:style-name");
+ "//office:document-content/office:body/office:chart/chart:chart/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -244,10 +244,10 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill");
+ OString sPathStart("//c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"_ostr);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2); //linear
// MS Office has opacity, so 100% transparency is val="0"
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, "0");
// no element for 0% transparent
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", 0);
}
@@ -264,7 +264,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
- "chart:plot-area/chart:wall/@chart:style-name");
+ "chart:plot-area/chart:wall/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -296,22 +296,22 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill");
+ OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill"_ostr);
// MCGR: three entries due to axial being mirrored+expanded to linear
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 3);
// MCGR: start entry, no transparence, pos zero
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", 0);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos", "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos"_ostr, "0");
// MCGR: middle entry, 100% transparence, pos 0.5
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val", "0");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos", "50000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos"_ostr, "50000");
// MCGR: end entry, no transparence, pos 1.0
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]/a:srgbClr/a:alpha", 0);
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]", "pos", "100000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]", "pos"_ostr, "100000");
}
void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
@@ -326,7 +326,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
- "chart:legend/@chart:style-name");
+ "chart:legend/@chart:style-name"_ostr);
const OString sStylePath(
"//office:document-content/office:automatic-styles/style:style[@style:name='"
+ OU2O(sOUChartStyleName) + "']");
@@ -448,7 +448,7 @@ void Chart2GeometryTest::testTdf135366LabelExport()
// Find label style
const OUString sOULabelStyleName = getXPathContent(
pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/chart:plot-area"
- "/chart:series/chart:data-point[1]/chart:data-label/@chart:style-name");
+ "/chart:series/chart:data-point[1]/chart:data-label/@chart:style-name"_ostr);
// Verify content of graphic properties of label style
const OString sStylePath(
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index 92605a71199c..10b9235653f9 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -247,7 +247,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
// Check if the regression curve exists (which means a XShape with a certain
// name should exist in the dump)
- assertXPath(pXmlDoc, "//XShape[@name='CID/D=0:CS=0:CT=0:Series=0:Curve=0']", 1);
+ assertXPath(pXmlDoc, "//XShape[@name='CID/D=0:CS=0:CT=0:Series=0:Curve=0']"_ostr, 1);
}
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
@@ -259,56 +259,56 @@ void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
{
- OString aPath("//XShape[@text='Oct-12']/Transformation");
+ OString aPath("//XShape[@text='Oct-12']/Transformation"_ostr);
assertXPath(pXmlDoc, aPath, 1);
- double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
- double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
- double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble();
- double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Nov-12']/Transformation");
+ OString aPath("//XShape[@text='Nov-12']/Transformation"_ostr);
assertXPath(pXmlDoc, aPath, 1);
- double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
- double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
- double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble();
- double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Dec-12']/Transformation");
+ OString aPath("//XShape[@text='Dec-12']/Transformation"_ostr);
assertXPath(pXmlDoc, aPath, 1);
- double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
- double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
- double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble();
- double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='May-13']/Transformation");
+ OString aPath("//XShape[@text='May-13']/Transformation"_ostr);
assertXPath(pXmlDoc, aPath, 1);
- double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
- double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
- double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble();
- double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath("//XShape[@text='Jan-14']/Transformation");
+ OString aPath("//XShape[@text='Jan-14']/Transformation"_ostr);
assertXPath(pXmlDoc, aPath, 1);
- double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
- double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
- double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1").toDouble();
- double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2").toDouble();
+ double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1"_ostr).toDouble();
+ double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2"_ostr).toDouble();
+ double fT21 = getXPath(pXmlDoc, aPath + "/Line2", "column1"_ostr).toDouble();
+ double fT22 = getXPath(pXmlDoc, aPath + "/Line2", "column2"_ostr).toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT11, -fT21, 1e-8);
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);