diff options
Diffstat (limited to 'chart2/qa/extras/chart2export.cxx')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 398 |
1 files changed, 199 insertions, 199 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 3f5866e8c49c..1c4977f5d38b 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -25,7 +25,7 @@ using beans::XPropertySet; class Chart2ExportTest : public ChartTest { public: - Chart2ExportTest() : ChartTest("/chart2/qa/extras/data/") {} + Chart2ExportTest() : ChartTest(u"/chart2/qa/extras/data/"_ustr) {} }; namespace { @@ -34,17 +34,17 @@ void testErrorBar( Reference< XPropertySet > const & xErrorBar ) { sal_Int32 nErrorBarStyle; CPPUNIT_ASSERT( - xErrorBar->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle); + xErrorBar->getPropertyValue(u"ErrorBarStyle"_ustr) >>= nErrorBarStyle); CPPUNIT_ASSERT_EQUAL(chart::ErrorBarStyle::RELATIVE, nErrorBarStyle); bool bShowPositive = bool(), bShowNegative = bool(); CPPUNIT_ASSERT( - xErrorBar->getPropertyValue("ShowPositiveError") >>= bShowPositive); + xErrorBar->getPropertyValue(u"ShowPositiveError"_ustr) >>= bShowPositive); CPPUNIT_ASSERT(bShowPositive); CPPUNIT_ASSERT( - xErrorBar->getPropertyValue("ShowNegativeError") >>= bShowNegative); + xErrorBar->getPropertyValue(u"ShowNegativeError"_ustr) >>= bShowNegative); CPPUNIT_ASSERT(bShowNegative); double nVal = 0.0; - CPPUNIT_ASSERT(xErrorBar->getPropertyValue("PositiveError") >>= nVal); + CPPUNIT_ASSERT(xErrorBar->getPropertyValue(u"PositiveError"_ustr) >>= nVal); CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, nVal, 1e-10); } @@ -58,21 +58,21 @@ void checkCommonTrendline( CPPUNIT_ASSERT(xProperties.is()); double aExtrapolateForward = 0.0; - CPPUNIT_ASSERT(xProperties->getPropertyValue("ExtrapolateForward") >>= aExtrapolateForward); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"ExtrapolateForward"_ustr) >>= aExtrapolateForward); CPPUNIT_ASSERT_EQUAL(aExpectedExtrapolateForward, aExtrapolateForward); double aExtrapolateBackward = 0.0; - CPPUNIT_ASSERT(xProperties->getPropertyValue("ExtrapolateBackward") >>= aExtrapolateBackward); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"ExtrapolateBackward"_ustr) >>= aExtrapolateBackward); CPPUNIT_ASSERT_EQUAL(aExpectedExtrapolateBackward, aExtrapolateBackward); bool bForceIntercept = false; - CPPUNIT_ASSERT(xProperties->getPropertyValue("ForceIntercept") >>= bForceIntercept); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"ForceIntercept"_ustr) >>= bForceIntercept); CPPUNIT_ASSERT_EQUAL(aExpectedForceIntercept, bForceIntercept); if (bForceIntercept) { double aInterceptValue = 0.0; - CPPUNIT_ASSERT(xProperties->getPropertyValue("InterceptValue") >>= aInterceptValue); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"InterceptValue"_ustr) >>= aInterceptValue); CPPUNIT_ASSERT_EQUAL(aExpectedInterceptValue, aInterceptValue); } @@ -80,15 +80,15 @@ void checkCommonTrendline( CPPUNIT_ASSERT(xEquationProperties.is()); bool bShowEquation = false; - CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("ShowEquation") >>= bShowEquation); + CPPUNIT_ASSERT(xEquationProperties->getPropertyValue(u"ShowEquation"_ustr) >>= bShowEquation); CPPUNIT_ASSERT_EQUAL(aExpectedShowEquation, bShowEquation); bool bShowCorrelationCoefficient = false; - CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowCorrelationCoefficient); + CPPUNIT_ASSERT(xEquationProperties->getPropertyValue(u"ShowCorrelationCoefficient"_ustr) >>= bShowCorrelationCoefficient); CPPUNIT_ASSERT_EQUAL(aExpectedR2, bShowCorrelationCoefficient); bool bMayHaveR2 = false; - CPPUNIT_ASSERT(xEquationProperties->getPropertyValue("MayHaveCorrelationCoefficient") >>= bMayHaveR2); + CPPUNIT_ASSERT(xEquationProperties->getPropertyValue(u"MayHaveCorrelationCoefficient"_ustr) >>= bMayHaveR2); CPPUNIT_ASSERT_EQUAL(aExpectedMayHaveR2, bMayHaveR2); } @@ -101,7 +101,7 @@ void checkNameAndType(Reference<XPropertySet> const & xProperties, const OUStrin CPPUNIT_ASSERT_EQUAL(aExpectedServiceName, aServiceName); OUString aCurveName; - CPPUNIT_ASSERT(xProperties->getPropertyValue("CurveName") >>= aCurveName); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"CurveName"_ustr) >>= aCurveName); CPPUNIT_ASSERT_EQUAL(aExpectedName, aCurveName); } @@ -113,7 +113,7 @@ void checkLinearTrendline( Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY ); CPPUNIT_ASSERT(xProperties.is()); - checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.LinearRegressionCurve"); + checkNameAndType(xProperties, aExpectedName, u"com.sun.star.chart2.LinearRegressionCurve"_ustr); checkCommonTrendline( xCurve, @@ -131,10 +131,10 @@ void checkPolynomialTrendline( Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY ); CPPUNIT_ASSERT(xProperties.is()); - checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.PolynomialRegressionCurve"); + checkNameAndType(xProperties, aExpectedName, u"com.sun.star.chart2.PolynomialRegressionCurve"_ustr); sal_Int32 aDegree = 2; - CPPUNIT_ASSERT(xProperties->getPropertyValue("PolynomialDegree") >>= aDegree); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"PolynomialDegree"_ustr) >>= aDegree); CPPUNIT_ASSERT_EQUAL(aExpectedDegree, aDegree); checkCommonTrendline( @@ -150,10 +150,10 @@ void checkMovingAverageTrendline( Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY ); CPPUNIT_ASSERT(xProperties.is()); - checkNameAndType(xProperties, aExpectedName, "com.sun.star.chart2.MovingAverageRegressionCurve"); + checkNameAndType(xProperties, aExpectedName, u"com.sun.star.chart2.MovingAverageRegressionCurve"_ustr); sal_Int32 aPeriod = 2; - CPPUNIT_ASSERT(xProperties->getPropertyValue("MovingAveragePeriod") >>= aPeriod); + CPPUNIT_ASSERT(xProperties->getPropertyValue(u"MovingAveragePeriod"_ustr) >>= aPeriod); CPPUNIT_ASSERT_EQUAL(aExpectedPeriod, aPeriod); checkCommonTrendline( @@ -180,15 +180,15 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh xCurve = xRegressionCurveSequence[0]; CPPUNIT_ASSERT(xCurve.is()); - checkPolynomialTrendline(xCurve, "col2_poly", 3, 0.1, -0.1, -1.0); + checkPolynomialTrendline(xCurve, u"col2_poly"_ustr, 3, 0.1, -0.1, -1.0); xCurve = xRegressionCurveSequence[1]; CPPUNIT_ASSERT(xCurve.is()); - checkLinearTrendline(xCurve, "col2_linear", -0.5, -0.5, 0.0); + checkLinearTrendline(xCurve, u"col2_linear"_ustr, -0.5, -0.5, 0.0); xCurve = xRegressionCurveSequence[2]; CPPUNIT_ASSERT(xCurve.is()); - checkMovingAverageTrendline(xCurve, "col2_moving_avg", 3); + checkMovingAverageTrendline(xCurve, u"col2_moving_avg"_ustr, 3); } } @@ -213,7 +213,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX) testErrorBar(xErrorBarYProps); } - saveAndReload("Calc Office Open XML"); + saveAndReload(u"Calc Office Open XML"_ustr); { uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -233,19 +233,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarPropXLSX) { loadFromFile(u"xlsx/testErrorBarProp.xlsx"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); 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"_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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:errDir"_ostr, "val"_ostr, u"y"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[1]/c:spPr/a:ln"_ostr, "w"_ostr, u"12600"_ustr); + 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, u"ff0000"_ustr); // test x error bars property - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:errDir"_ostr, "val"_ostr, u"x"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:errBars[2]/c:spPr/a:ln"_ostr, "w"_ostr, u"9360"_ustr); + 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, u"595959"_ustr); } // This method tests the preservation of properties for trendlines / regression curves @@ -257,7 +257,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendline) skipValidation(); loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); } @@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineOOXML) { loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); - saveAndReload("Calc Office Open XML"); + saveAndReload(u"Calc Office Open XML"_ustr); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); } @@ -273,14 +273,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineXLS) { loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); - saveAndReload("MS Excel 97"); + saveAndReload(u"MS Excel 97"_ustr); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testMovingAverage) { loadFromFile(u"ods/moving-type.ods"); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -301,7 +301,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testMovingAverage) CPPUNIT_ASSERT(xProperties.is()); sal_Int32 nMovingAverageType = 0; - xProperties->getPropertyValue("MovingAverageType") >>= nMovingAverageType; + xProperties->getPropertyValue(u"MovingAverageType"_ustr) >>= nMovingAverageType; CPPUNIT_ASSERT_EQUAL(chart2::MovingAverageType::Central, nMovingAverageType); } @@ -316,26 +316,26 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart) */ loadFromFile(u"docx/testStockChart.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order"_ostr, "val"_ostr, u"1"_ustr); assertXPathContent( pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:tx/c:strRef/c:strCache/c:pt/c:v"_ostr, - "Open"); + u"Open"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChart) { loadFromFile(u"docx/testBarChart.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir"_ostr, "val"_ostr, "col"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir"_ostr, "val"_ostr, u"col"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses) @@ -343,19 +343,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses) // test crosses val="autoZero" with DOCX { loadFromFile(u"docx/Bar_horizontal_cone.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses"_ostr, "val"_ostr, "autoZero"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses"_ostr, "val"_ostr, u"autoZero"_ustr); } // tdf#142351: test crossesAt val="-50" with XLSX { loadFromFile(u"xlsx/tdf142351.xlsx"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt"_ostr, "val"_ostr, "-50"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crossesAt"_ostr, "val"_ostr, u"-50"_ustr); } } @@ -372,9 +372,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues) // Make sure we have exactly 3 data series. std::vector<uno::Sequence<uno::Any> > aLabels = getDataSeriesLabelsFromChartType(xCT); CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); - CPPUNIT_ASSERT_EQUAL(OUString("Series 1"), aLabels[0][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("Series 2"), aLabels[1][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[2][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"Series 1"_ustr, aLabels[0][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"Series 2"_ustr, aLabels[1][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"Series 3"_ustr, aLabels[2][0].get<OUString>()); std::vector<std::vector<double> > aYValues = getDataSeriesYValuesFromChartType(xCT); CPPUNIT_ASSERT_EQUAL(size_t(3), aYValues.size()); @@ -401,58 +401,58 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues) CPPUNIT_ASSERT_EQUAL(5.0, aYValues[2][3]); // Test the export. - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); 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]"_ostr, "1"); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues) { loadFromFile(u"odt/tdf114657.odt"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:ptCount"_ostr, "val"_ostr, u"5"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[1]/c:v"_ostr, u"15"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[2]/c:v"_ostr, u"11"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[3]/c:v"_ostr, u"20"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser/c:xVal/c:numRef/c:numCache/c:pt[4]/c:v"_ostr, u"16"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories) { loadFromFile(u"odt/tdf131143.odt"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:ptCount"_ostr, "val"_ostr, u"4"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[1]/c:v"_ostr, u"Row 1"_ustr); + assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal/c:strRef/c:strCache/c:pt[2]/c:v"_ostr, u"Row 2"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable) { loadFromFile(u"docx/testChartDataTable.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showHorzBorder"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showVertBorder"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dTable/c:showOutline"_ostr, "val"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData) { loadFromFile(u"docx/testMultipleChart.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:externalData"_ostr); } @@ -467,7 +467,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag) uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag(0); - xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + xTextDocumentPropertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; const char* const testEmbeddedFileNames[] {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", @@ -503,18 +503,18 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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:showVal"_ostr, "val"_ostr, u"1"_ustr); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:dLbl"_ostr, 0); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars) { loadFromFile(u"docx/UpDownBars.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:upDownBars"_ostr, 0); } @@ -522,8 +522,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart) { loadFromFile(u"docx/doughnutChart.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart"_ostr); @@ -532,40 +532,40 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieOfPieChart) { loadFromFile(u"xlsx/pieOfPieChart.xlsx"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart"_ostr); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, "pie"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, u"pie"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarOfPieChart) { loadFromFile(u"xlsx/barOfPieChart.xlsx"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart"_ostr); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, "bar"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:ofPieChart/c:ofPieType[1]"_ostr, "val"_ostr, u"bar"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits) { loadFromFile(u"docx/DisplayUnits.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit"_ostr, "val"_ostr, "billions"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit"_ostr, "val"_ostr, u"billions"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill) { loadFromFile(u"docx/fdo74115_WallGradientFill.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill"_ostr); @@ -574,8 +574,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill) { loadFromFile(u"docx/fdo74115_WallBitmapFill.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill"_ostr); } @@ -587,8 +587,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle) // FIXME: validation error in OOXML export: Errors: 9 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill"_ostr); } @@ -598,11 +598,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX) { loadFromFile(u"docx/fdo78290_Line_Chart_Marker_x.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); 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]"_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"); + 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,u"x"_ustr); + 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,u"7"_ustr); } // We can also use the built in marker 'x' in scatter chart, hence writing the test case for the same. @@ -610,11 +610,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX) { loadFromFile(u"docx/fdo78290_Scatter_Chart_Marker_x.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); 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]"_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"); + 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,u"x"_ustr); + 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,u"7"_ustr); } // Also in a combination of charts like a column chart and line chart, we can use the built in marker 'x' @@ -623,28 +623,28 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX) { loadFromFile(u"docx/fdo78290_Combination_Chart_Marker_x.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); 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]"_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"); + 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,u"x"_ustr); + 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,u"7"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker) { // Check individual marker properties. loadFromFile(u"xlsx/tdf126115.xlsx"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // 1. series - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, u"square"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, u"8"_ustr); + 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, u"ff0000"_ustr); // 2. series - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:symbol"_ostr, "val"_ostr, u"x"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[2]/c:dPt/c:marker/c:size"_ostr, "val"_ostr, u"15"_ustr); + 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, u"7030a0"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) @@ -656,7 +656,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) Reference<chart2::XAxis> xAxisX = getAxisFromDoc(xChartDoc, 0, 0, 0); Reference<chart2::XTitled> xTitle(xAxisX, UNO_QUERY_THROW); OUString aTitleText = getTitleString(xTitle); - CPPUNIT_ASSERT_EQUAL(OUString("Linked To Source"), aTitleText); + CPPUNIT_ASSERT_EQUAL(u"Linked To Source"_ustr, aTitleText); sal_Int32 nNumFmt = getNumberFormatFromAxis(xAxisX); sal_Int16 nType = getNumberFormatType(xChartDoc, nNumFmt); @@ -664,13 +664,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) bool bNumFmtLinked = false; Reference<beans::XPropertySet> xPS(xAxisX, uno::UNO_QUERY_THROW); - xPS->getPropertyValue("LinkNumberFormatToSource") >>= bNumFmtLinked; + xPS->getPropertyValue(u"LinkNumberFormatToSource"_ustr) >>= bNumFmtLinked; CPPUNIT_ASSERT_MESSAGE("X axis should have its number format linked to source.", bNumFmtLinked); Reference<chart2::XAxis> xAxisY = getAxisFromDoc(xChartDoc, 0, 1, 0); xTitle.set(xAxisY, UNO_QUERY_THROW); aTitleText = getTitleString(xTitle); - CPPUNIT_ASSERT_EQUAL(OUString("Not Linked"), aTitleText); + CPPUNIT_ASSERT_EQUAL(u"Not Linked"_ustr, aTitleText); nNumFmt = getNumberFormatFromAxis(xAxisY); nType = getNumberFormatType(xChartDoc, nNumFmt); @@ -678,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) bNumFmtLinked = true; xPS.set(xAxisY, uno::UNO_QUERY_THROW); - xPS->getPropertyValue("LinkNumberFormatToSource") >>= bNumFmtLinked; + xPS->getPropertyValue(u"LinkNumberFormatToSource"_ustr) >>= bNumFmtLinked; CPPUNIT_ASSERT_MESSAGE("Y axis should not have its number format linked to source.", !bNumFmtLinked); } @@ -690,7 +690,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) aTest.check(xChartDoc); // Reload the document and make sure everything remains intact. - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); xChartDoc = getChartDocFromSheet(0, mxComponent); aTest.check(xChartDoc); } @@ -704,7 +704,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS) Reference<chart2::XAxis> xAxisY = getAxisFromDoc( xChartDoc, 0, 1, 0 ); bool bNumFmtLinked = false; Reference<beans::XPropertySet> xPS( xAxisY, uno::UNO_QUERY_THROW ); - xPS->getPropertyValue( "LinkNumberFormatToSource" ) >>= bNumFmtLinked; + xPS->getPropertyValue( u"LinkNumberFormatToSource"_ustr ) >>= bNumFmtLinked; if ( bNumFmtLinkedActual ) CPPUNIT_ASSERT_MESSAGE( "Y axis should have its number format linked to source.", bNumFmtLinked ); @@ -726,12 +726,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS) Reference<chart2::XAxis> xAxisY = getAxisFromDoc( xChartDoc, 0, 1, 0 ); Reference<beans::XPropertySet> xPS( xAxisY, uno::UNO_QUERY_THROW ); Any aAny( false ); - xPS->setPropertyValue( "LinkNumberFormatToSource", aAny ); + xPS->setPropertyValue( u"LinkNumberFormatToSource"_ustr, aAny ); Reference<util::XNumberFormatsSupplier> xNFS( xChartDoc, uno::UNO_QUERY_THROW ); Reference<util::XNumberFormats> xNumberFormats = xNFS->getNumberFormats(); CPPUNIT_ASSERT( xNumberFormats.is() ); - lang::Locale aLocale{ "en", "US", "" }; + lang::Locale aLocale{ u"en"_ustr, u"US"_ustr, u""_ustr }; Sequence<sal_Int32> aNumFmts = xNumberFormats->queryKeys( nNumFmtTypeFlag, aLocale, false ); CPPUNIT_ASSERT( aNumFmts.hasElements() ); aAny <<= aNumFmts[0]; @@ -747,7 +747,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS) aTest.change( xChartDoc, util::NumberFormat::NUMBER ); // Write the document(xls) with changes made close it, load it and check if changes are intact - saveAndReload( "MS Excel 97" ); + saveAndReload( u"MS Excel 97"_ustr ); xChartDoc = getChartDocFromSheet( 0, mxComponent ); aTest.check( xChartDoc, false, util::NumberFormat::NUMBER ); } @@ -779,7 +779,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX) CPPUNIT_ASSERT(xPropSet.is()); Sequence<sal_Int32> aIndices; - xPropSet->getPropertyValue("AttributedDataPoints") >>= aIndices; + xPropSet->getPropertyValue(u"AttributedDataPoints"_ustr) >>= aIndices; /* CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be 2 data points with local properties.", sal_Int32(2), aIndices.getLength()); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aIndices[0]); @@ -846,8 +846,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX) // "Automatic" chart background fill in docx should be loaded as solid white. Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground(); CPPUNIT_ASSERT(xPropSet.is()); - drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get<drawing::FillStyle>(); - sal_Int32 nColor = xPropSet->getPropertyValue("FillColor").get<sal_Int32>(); + drawing::FillStyle eStyle = xPropSet->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>(); + sal_Int32 nColor = xPropSet->getPropertyValue(u"FillColor"_ustr).get<sal_Int32>(); CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in docx should be loaded as solid fill.", drawing::FillStyle_SOLID, eStyle); CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in docx should be loaded as solid white.", @@ -860,7 +860,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX) // FIXME: validation error in OOXML export: Errors: 3 skipValidation(); - saveAndReload("Office Open XML Text"); + saveAndReload(u"Office Open XML Text"_ustr); xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); aTest.checkObject1(xChartDoc); @@ -878,8 +878,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // We must not export label position attributes for 3D bar charts. The @@ -895,13 +895,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX) Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, u"ctr"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, u"inEnd"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos"_ostr, "val"_ostr, u"inBase"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX) @@ -914,12 +914,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX) // FIXME: validation error in OOXML export: Errors: 9 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); 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"_ostr, "val"_ostr, "outEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX) @@ -929,8 +929,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX) Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // We must not export label position attributes for radar charts. @@ -948,8 +948,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // We must not export label position attributes for doughnut charts. @@ -967,8 +967,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); // We must not export label position attributes for area charts. @@ -987,14 +987,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDefaultLineChartDOCX) Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); - saveAndReload("Office Open XML Text"); + saveAndReload(u"Office Open XML Text"_ustr); xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY); CPPUNIT_ASSERT(xPropSet.is()); sal_Int32 nLabelPlacement = -1; - if (xPropSet->getPropertyValue("LabelPlacement") >>= nLabelPlacement) + if (xPropSet->getPropertyValue(u"LabelPlacement"_ustr) >>= nLabelPlacement) // This option may not be set. Check its value only when it's set. CPPUNIT_ASSERT_EQUAL_MESSAGE("Line chart's default label placement should be 'right'.", chart::DataLabelPlacement::RIGHT, nLabelPlacement ); } @@ -1006,24 +1006,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); 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"_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"); + 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, u"1"_ustr); + 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, u"1600"_ustr); + 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, u"ff0000"_ustr); + 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, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation) { loadFromFile(u"docx/barChartRotation.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, u"30"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, u"50"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart) @@ -1038,8 +1038,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart) // FIXME: validation error in OOXML export: Errors: 5 skipValidation(); - save("Office Open XML Text" ); - xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + save(u"Office Open XML Text"_ustr ); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); 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]"_ostr, "id"_ostr); @@ -1055,20 +1055,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels) // FIXME: validation error in OOXML export: Errors: 19 skipValidation(); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos"_ostr, "val"_ostr, "outEnd"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder) { loadFromFile(u"docx/testSeriesIdxOrder.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]"_ostr, "val"_ostr, u"1"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:order[1]"_ostr, "val"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels) @@ -1083,12 +1083,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels) // Make sure the original chart has 'a', 'b', 'c' as its data labels. std::vector<uno::Sequence<uno::Any> > aLabels = getDataSeriesLabelsFromChartType(xCT); CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); - CPPUNIT_ASSERT_EQUAL(OUString("a"), aLabels[0][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("b"), aLabels[1][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"a"_ustr, aLabels[0][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"b"_ustr, aLabels[1][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"c"_ustr, aLabels[2][0].get<OUString>()); // Reload the doc and check again. The labels should not change. - saveAndReload("writer8"); + saveAndReload(u"writer8"_ustr); xChartDoc.set(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1098,15 +1098,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels) aLabels = getDataSeriesLabelsFromChartType(xCT); CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size()); - CPPUNIT_ASSERT_EQUAL(OUString("a"), aLabels[0][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("b"), aLabels[1][0].get<OUString>()); - CPPUNIT_ASSERT_EQUAL(OUString("c"), aLabels[2][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"a"_ustr, aLabels[0][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"b"_ustr, aLabels[1][0].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(u"c"_ustr, aLabels[2][0].get<OUString>()); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS) { loadFromFile(u"ods/ErrorBarRange.ods"); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1119,23 +1119,23 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS) // test that y error bars are there Reference< beans::XPropertySet > xErrorBarYProps; xPropSet->getPropertyValue(CHART_UNONAME_ERRORBAR_Y) >>= xErrorBarYProps; - uno::Any aAny = xErrorBarYProps->getPropertyValue("ErrorBarRangePositive"); + uno::Any aAny = xErrorBarYProps->getPropertyValue(u"ErrorBarRangePositive"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); OUString aPosRange; aAny >>= aPosRange; - CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$B$1:$B$3"), aPosRange); + CPPUNIT_ASSERT_EQUAL(u"$Sheet1.$B$1:$B$3"_ustr, aPosRange); - aAny = xErrorBarYProps->getPropertyValue("ErrorBarRangeNegative"); + aAny = xErrorBarYProps->getPropertyValue(u"ErrorBarRangeNegative"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); OUString aNegRange; aAny >>= aNegRange; - CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$1:$C$3"), aNegRange); + CPPUNIT_ASSERT_EQUAL(u"$Sheet1.$C$1:$C$3"_ustr, aNegRange); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie) { loadFromFile(u"ods/tdf50934_barOfPie.ods"); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1151,7 +1151,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie) CPPUNIT_ASSERT(xDia.is()); uno::Reference< beans::XPropertySet > xDiaProp( xDia, uno::UNO_QUERY ); CPPUNIT_ASSERT(xDiaProp.is()); - uno::Any aAny = xDiaProp->getPropertyValue("SubPieType"); + uno::Any aAny = xDiaProp->getPropertyValue(u"SubPieType"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); chart2::PieChartSubType subPieType; aAny >>= subPieType; @@ -1161,7 +1161,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_barOfPie) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie) { loadFromFile(u"ods/tdf50934_pieOfPie.ods"); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1177,7 +1177,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie) CPPUNIT_ASSERT(xDia.is()); uno::Reference< beans::XPropertySet > xDiaProp( xDia, uno::UNO_QUERY ); CPPUNIT_ASSERT(xDiaProp.is()); - uno::Any aAny = xDiaProp->getPropertyValue("SubPieType"); + uno::Any aAny = xDiaProp->getPropertyValue(u"SubPieType"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); chart2::PieChartSubType subPieType; aAny >>= subPieType; @@ -1187,19 +1187,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, tdf50934_pieOfPie) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash) { loadFromFile(u"docx/FDO75975.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartRotation) { loadFromFile(u"docx/pieChartRotation.docx"); - save("Office Open XML Text"); - xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); + save(u"Office Open XML Text"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - 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"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX"_ostr, "val"_ostr, u"40"_ustr); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY"_ostr, "val"_ostr, u"30"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag) @@ -1212,7 +1212,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag) uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag(0); - xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + xTextDocumentPropertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; const char* const testEmbeddedFileNames[] = {"word/embeddings/oleObject1.bin"}; @@ -1243,7 +1243,7 @@ namespace { void checkGapWidth(Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nValue) { - uno::Any aAny = xPropSet->getPropertyValue("GapwidthSequence"); + uno::Any aAny = xPropSet->getPropertyValue(u"GapwidthSequence"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); uno::Sequence< sal_Int32 > aSequence; aAny >>= aSequence; @@ -1253,7 +1253,7 @@ void checkGapWidth(Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nV void checkOverlap(Reference<beans::XPropertySet> const & xPropSet, sal_Int32 nValue) { - uno::Any aAny = xPropSet->getPropertyValue("OverlapSequence"); + uno::Any aAny = xPropSet->getPropertyValue(u"OverlapSequence"_ustr); CPPUNIT_ASSERT(aAny.hasValue()); uno::Sequence< sal_Int32 > aSequence; aAny >>= aSequence; @@ -1287,7 +1287,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX) xChartDoc = getChartDocFromSheet( 1, mxComponent ); checkSheetForGapWidthAndOverlap(xChartDoc, 50, 30); - saveAndReload("Calc Office Open XML"); + saveAndReload(u"Calc Office Open XML"_ustr); xChartDoc = getChartDocFromSheet( 0, mxComponent ); checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60); @@ -1299,10 +1299,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines) { loadFromFile(u"ods/smoothedLines.ods"); - save("Calc Office Open XML"); - xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); CPPUNIT_ASSERT(pXmlDoc); - assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth"_ostr, "val"_ostr, "0"); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth"_ostr, "val"_ostr, u"0"_ustr); } CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS) @@ -1315,16 +1315,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS) CPPUNIT_ASSERT(xLabelSeq.is()); OUString aLabelString = xLabelSeq->getSourceRangeRepresentation(); - CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString); + CPPUNIT_ASSERT_EQUAL(u"\"LabelName\""_ustr, aLabelString); - saveAndReload("calc8"); + saveAndReload(u"calc8"_ustr); xChartDoc = getChartDocFromSheet( 0, mxComponent ); xLabelSeq = getLabelDataSequenceFromDoc(xChartDoc); CPPUNIT_ASSERT(xLabelSeq.is()); aLabelString = xLabelSeq->getSourceRangeRepresentation(); - CPPUNIT_ASSERT_EQUAL(OUString("\"LabelName\""), aLabelString); + CPPUNIT_ASSERT_EQUAL(u"\"LabelName\""_ustr, aLabelString); } CPPUNIT_PLUGIN_IMPLEMENT(); |