summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/PivotChartTest.cxx168
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx6
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx176
-rw-r--r--chart2/qa/extras/chart2export.cxx398
-rw-r--r--chart2/qa/extras/chart2export2.cxx578
-rw-r--r--chart2/qa/extras/chart2export3.cxx560
-rw-r--r--chart2/qa/extras/chart2geometry.cxx114
-rw-r--r--chart2/qa/extras/chart2import.cxx420
-rw-r--r--chart2/qa/extras/chart2import2.cxx119
-rw-r--r--chart2/qa/extras/charttest.hxx18
-rw-r--r--chart2/qa/extras/uichart.cxx72
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx5
-rw-r--r--chart2/qa/unit/common_functor_test.cxx28
13 files changed, 1334 insertions, 1328 deletions
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx
index d6a87ec057a9..fe1ae4437cd9 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -35,7 +35,7 @@ class PivotChartTest : public ChartTest
{
public:
PivotChartTest()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{}
void testRoundtrip();
@@ -72,7 +72,7 @@ void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xD
OUString aName = xNamed->getName();
uno::Reference<beans::XPropertySet> xPropSet(xNamed, UNO_QUERY_THROW);
if (aName == sFieldName)
- xPropSet->setPropertyValue("Orientation", uno::Any(eOrientation));
+ xPropSet->setPropertyValue(u"Orientation"_ustr, uno::Any(eOrientation));
}
}
@@ -88,7 +88,7 @@ void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDesc
OUString aName = xNamed->getName();
uno::Reference<beans::XPropertySet> xPropSet(xNamed, UNO_QUERY_THROW);
if (aName == sFieldName)
- xPropSet->setPropertyValue("Function", uno::Any(eFunction));
+ xPropSet->setPropertyValue(u"Function"_ustr, uno::Any(eFunction));
}
}
@@ -107,7 +107,7 @@ void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDe
{
uno::Any aValue;
aValue <<= aLayoutInfo;
- xPropSet->setPropertyValue("LayoutInfo", aValue);
+ xPropSet->setPropertyValue(u"LayoutInfo"_ustr, aValue);
}
}
}
@@ -127,7 +127,7 @@ void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDes
{
uno::Any aValue;
aValue <<= rSubtotalFunctions;
- xPropSet->setPropertyValue("Subtotals", aValue);
+ xPropSet->setPropertyValue(u"Subtotals"_ustr, aValue);
}
}
}
@@ -135,13 +135,13 @@ void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDes
void lclModifyColumnGrandTotal(uno::Reference<sheet::XDataPilotDescriptor> const & xDataPilotDescriptor, bool bTotal)
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("ColumnGrand", uno::Any(bTotal));
+ xProperties->setPropertyValue(u"ColumnGrand"_ustr, uno::Any(bTotal));
}
void lclModifyRowGrandTotal(uno::Reference<sheet::XDataPilotDescriptor> const & xDataPilotDescriptor, bool bTotal)
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotDescriptor, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("RowGrand", uno::Any(bTotal));
+ xProperties->setPropertyValue(u"RowGrand"_ustr, uno::Any(bTotal));
}
void lclCheckSequence(std::vector<double> const & reference,
@@ -192,7 +192,7 @@ uno::Sequence<uno::Reference<chart2::data::XLabeledDataSequence>>
lclGetCategories(Reference<chart2::XChartDocument> const & xChartDoc)
{
uno::Sequence<beans::PropertyValue> aArguments( comphelper::InitPropertySequence(
- {{"CellRangeRepresentation", uno::Any(OUString("PT@categories"))}} ));
+ {{"CellRangeRepresentation", uno::Any(u"PT@categories"_ustr)}} ));
uno::Reference<chart2::data::XDataProvider> xDataProvider(xChartDoc->getDataProvider(), uno::UNO_SET_THROW);
return xDataProvider->createDataSource(aArguments)->getDataSequences();
@@ -234,22 +234,22 @@ table::CellRangeAddress lclCreateTestData(uno::Reference<sheet::XSpreadsheetDocu
CPPUNIT_ASSERT_MESSAGE("no calc document!", xSheetDoc.is());
std::vector<OUString> aHeaders {
- "Country", "City", "Type", "Sales T1", "Sales T2", "Sales T3", "Sales T4", "Date"
+ u"Country"_ustr, u"City"_ustr, u"Type"_ustr, u"Sales T1"_ustr, u"Sales T2"_ustr, u"Sales T3"_ustr, u"Sales T4"_ustr, u"Date"_ustr
};
std::vector<std::vector<Value>> aData {
- { {"FR"}, {"Paris"}, {"A"}, {123.0}, {223.0}, {323.0}, {423.0}, {"12/14/15"} },
- { {"EN"}, {"London"}, {"A"}, {456.0}, {556.0}, {656.0}, {756.0}, {"12/11/15"} },
- { {"DE"}, {"Berlin"}, {"A"}, {468.0}, {568.0}, {668.0}, {768.0}, {"12/11/15"} },
- { {"FR"}, {"Nantes"}, {"A"}, {694.0}, {794.0}, {894.0}, {994.0}, {"12/11/15"} },
- { {"EN"}, {"Glasgow"}, {"A"}, {298.0}, {398.0}, {498.0}, {598.0}, {"12/11/15"} },
- { {"DE"}, {"Munich"}, {"A"}, {369.0}, {469.0}, {569.0}, {669.0}, {"12/11/15"} },
- { {"FR"}, {"Paris"}, {"B"}, {645.0}, {745.0}, {845.0}, {945.0}, {"12/11/15"} },
- { {"EN"}, {"London"}, {"B"}, {687.0}, {787.0}, {887.0}, {987.0}, {"03/21/17"} },
- { {"DE"}, {"Munich"}, {"B"}, {253.0}, {353.0}, {453.0}, {553.0}, {"12/17/15"} },
- { {"FR"}, {"Nantes"}, {"B"}, {474.0}, {574.0}, {674.0}, {774.0}, {"01/20/16"} },
- { {"EN"}, {"Liverpool"}, {"B"}, {562.0}, {662.0}, {762.0}, {862.0}, {"01/20/16"} },
- { {"DE"}, {"Berlin"}, {"B"}, {648.0}, {748.0}, {848.0}, {948.0}, {"01/20/16"} }
+ { {u"FR"_ustr}, {u"Paris"_ustr}, {u"A"_ustr}, {123.0}, {223.0}, {323.0}, {423.0}, {u"12/14/15"_ustr} },
+ { {u"EN"_ustr}, {u"London"_ustr}, {u"A"_ustr}, {456.0}, {556.0}, {656.0}, {756.0}, {u"12/11/15"_ustr} },
+ { {u"DE"_ustr}, {u"Berlin"_ustr}, {u"A"_ustr}, {468.0}, {568.0}, {668.0}, {768.0}, {u"12/11/15"_ustr} },
+ { {u"FR"_ustr}, {u"Nantes"_ustr}, {u"A"_ustr}, {694.0}, {794.0}, {894.0}, {994.0}, {u"12/11/15"_ustr} },
+ { {u"EN"_ustr}, {u"Glasgow"_ustr}, {u"A"_ustr}, {298.0}, {398.0}, {498.0}, {598.0}, {u"12/11/15"_ustr} },
+ { {u"DE"_ustr}, {u"Munich"_ustr}, {u"A"_ustr}, {369.0}, {469.0}, {569.0}, {669.0}, {u"12/11/15"_ustr} },
+ { {u"FR"_ustr}, {u"Paris"_ustr}, {u"B"_ustr}, {645.0}, {745.0}, {845.0}, {945.0}, {u"12/11/15"_ustr} },
+ { {u"EN"_ustr}, {u"London"_ustr}, {u"B"_ustr}, {687.0}, {787.0}, {887.0}, {987.0}, {u"03/21/17"_ustr} },
+ { {u"DE"_ustr}, {u"Munich"_ustr}, {u"B"_ustr}, {253.0}, {353.0}, {453.0}, {553.0}, {u"12/17/15"_ustr} },
+ { {u"FR"_ustr}, {u"Nantes"_ustr}, {u"B"_ustr}, {474.0}, {574.0}, {674.0}, {774.0}, {u"01/20/16"_ustr} },
+ { {u"EN"_ustr}, {u"Liverpool"_ustr}, {u"B"_ustr}, {562.0}, {662.0}, {762.0}, {862.0}, {u"01/20/16"_ustr} },
+ { {u"DE"_ustr}, {u"Berlin"_ustr}, {u"B"_ustr}, {648.0}, {748.0}, {848.0}, {948.0}, {u"01/20/16"_ustr} }
};
// Getting spreadsheet
@@ -259,7 +259,7 @@ table::CellRangeAddress lclCreateTestData(uno::Reference<sheet::XSpreadsheetDocu
CPPUNIT_ASSERT(oIndexAccess->getByIndex(0) >>= xSheet);
uno::Reference<sheet::XSpreadsheet> oPivotTableSheet;
- xSpreadsheets->insertNewByName("Pivot Table", 1);
+ xSpreadsheets->insertNewByName(u"Pivot Table"_ustr, 1);
CPPUNIT_ASSERT(oIndexAccess->getByIndex(1) >>= oPivotTableSheet);
sal_Int32 currentRow = 0;
@@ -294,7 +294,7 @@ table::CellRangeAddress lclCreateTestData(uno::Reference<sheet::XSpreadsheetDocu
sal_Int32 nDateKey = xNumberFormatTypes->getStandardFormat(util::NumberFormat::DATE, aLocale);
uno::Reference<table::XCellRange> xCellRange = xSheet->getCellRangeByPosition(nEndCol, 1, nEndCol, nEndRow);
uno::Reference<beans::XPropertySet> xCellProp(xCellRange, UNO_QUERY_THROW);
- xCellProp->setPropertyValue("NumberFormat", uno::Any(nDateKey));
+ xCellProp->setPropertyValue(u"NumberFormat"_ustr, uno::Any(nDateKey));
table::CellRangeAddress sCellRangeAddress;
sCellRangeAddress.Sheet = 0;
@@ -328,17 +328,17 @@ void PivotChartTest::testRoundtrip()
{
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference1, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Exp."_ustr, lclGetLabel(xChartDoc, 0));
}
{
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"Rev."_ustr, lclGetLabel(xChartDoc, 1));
}
// Modify the pivot table
{
- uno::Reference<sheet::XDataPilotTable> xDataPilotTable = lclGetPivotTableByName(1, "DataPilot1", mxComponent);
+ uno::Reference<sheet::XDataPilotTable> xDataPilotTable = lclGetPivotTableByName(1, u"DataPilot1"_ustr, mxComponent);
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW);
lclModifyOrientation(xDataPilotDescriptor, u"Exp.", sheet::DataPilotFieldOrientation_HIDDEN);
}
@@ -349,10 +349,10 @@ void PivotChartTest::testRoundtrip()
{
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
xChartDoc = getPivotChartDocFromSheet(1, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -363,7 +363,7 @@ void PivotChartTest::testRoundtrip()
{
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
}
@@ -375,7 +375,7 @@ void PivotChartTest::testChangePivotTable()
loadFromFile(u"ods/PivotTableExample.ods");
// Check we have the Pivot Table
- OUString sPivotTableName("DataPilot1");
+ OUString sPivotTableName(u"DataPilot1"_ustr);
uno::Reference<sheet::XDataPilotTable> xDataPilotTable = lclGetPivotTableByName(1, sPivotTableName, mxComponent);
CPPUNIT_ASSERT(xDataPilotTable.is());
@@ -385,7 +385,7 @@ void PivotChartTest::testChangePivotTable()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("Chart", awt::Rectangle{0, 0, 9000, 9000}, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"Chart"_ustr, awt::Rectangle{0, 0, 9000, 9000}, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -402,7 +402,7 @@ void PivotChartTest::testChangePivotTable()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Exp."_ustr, lclGetLabel(xChartDoc, 0));
}
// Check second data series
@@ -412,7 +412,7 @@ void PivotChartTest::testChangePivotTable()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"Rev."_ustr, lclGetLabel(xChartDoc, 1));
}
// Modify the pivot table, move "Group Segment" to Column fields,
@@ -436,7 +436,7 @@ void PivotChartTest::testChangePivotTable()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Big"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check the second data series
@@ -446,7 +446,7 @@ void PivotChartTest::testChangePivotTable()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"Medium"_ustr, lclGetLabel(xChartDoc, 1));
}
// Check the third data series
@@ -456,7 +456,7 @@ void PivotChartTest::testChangePivotTable()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
+ CPPUNIT_ASSERT_EQUAL(u"Small"_ustr, lclGetLabel(xChartDoc, 2));
}
// Remove "Service Month" so row fields are empty - check we handle empty rows
@@ -474,27 +474,27 @@ void PivotChartTest::testChangePivotTable()
std::vector<double> aReference { 10162.033139 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Big"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check the second data series
{
std::vector<double> aReference { 16614.523063 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"Medium"_ustr, lclGetLabel(xChartDoc, 1));
}
// Check the third data series
{
std::vector<double> aReference { 27944.146101 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
+ CPPUNIT_ASSERT_EQUAL(u"Small"_ustr, lclGetLabel(xChartDoc, 2));
}
// Enable column totals and check the data is still unchanged
{
uno::Reference<beans::XPropertySet> xProperties(xDataPilotTable, uno::UNO_QUERY_THROW);
- xProperties->setPropertyValue("ColumnGrand", uno::Any(true));
+ xProperties->setPropertyValue(u"ColumnGrand"_ustr, uno::Any(true));
}
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getNumberOfDataSeries(xChartDoc));
@@ -504,21 +504,21 @@ void PivotChartTest::testChangePivotTable()
std::vector<double> aReference { 10162.033139 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Big"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check the second data series
{
std::vector<double> aReference { 16614.523063 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"Medium"_ustr, lclGetLabel(xChartDoc, 1));
}
// Check the third data series
{
std::vector<double> aReference { 27944.146101 };
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
- CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
+ CPPUNIT_ASSERT_EQUAL(u"Small"_ustr, lclGetLabel(xChartDoc, 2));
}
}
@@ -529,11 +529,11 @@ void PivotChartTest::testPivotChartWithOneColumnField()
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
- OUString sPivotTableName("DataPilotTable");
+ OUString sPivotTableName(u"DataPilotTable"_ustr);
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
@@ -564,7 +564,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"PivotChart"_ustr, awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -580,7 +580,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("DE"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"DE"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check data series 2
@@ -590,7 +590,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("EN"), lclGetLabel(xChartDoc, 1));
+ CPPUNIT_ASSERT_EQUAL(u"EN"_ustr, lclGetLabel(xChartDoc, 1));
}
// Check data series 3
{
@@ -599,7 +599,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("FR"), lclGetLabel(xChartDoc, 2));
+ CPPUNIT_ASSERT_EQUAL(u"FR"_ustr, lclGetLabel(xChartDoc, 2));
}
}
@@ -610,11 +610,11 @@ void PivotChartTest::testPivotChartWithOneRowField()
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
- OUString sPivotTableName("DataPilotTable");
+ OUString sPivotTableName(u"DataPilotTable"_ustr);
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
@@ -645,7 +645,7 @@ void PivotChartTest::testPivotChartWithOneRowField()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"PivotChart"_ustr, awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -661,7 +661,7 @@ void PivotChartTest::testPivotChartWithOneRowField()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
}
@@ -669,11 +669,11 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
- OUString sPivotTableName("DataPilotTable");
+ OUString sPivotTableName(u"DataPilotTable"_ustr);
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
@@ -711,7 +711,7 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"PivotChart"_ustr, awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -725,20 +725,20 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
aFieldEntries = xPivotTableDataProvider->getColumnFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Country"), aFieldEntries[0].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Type"), aFieldEntries[1].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Country"_ustr, aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Type"_ustr, aFieldEntries[1].Name);
aFieldEntries = xPivotTableDataProvider->getRowFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("City"), aFieldEntries[0].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Data"), aFieldEntries[1].Name);
+ CPPUNIT_ASSERT_EQUAL(u"City"_ustr, aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Data"_ustr, aFieldEntries[1].Name);
aFieldEntries = xPivotTableDataProvider->getDataFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Sum - Sales T1"_ustr, aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Sum - Sales T2"_ustr, aFieldEntries[1].Name);
// Data to column fields
lclModifyOrientation(xDataPilotDescriptor, u"Data", sheet::DataPilotFieldOrientation_COLUMN);
@@ -756,31 +756,31 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
aFieldEntries = xPivotTableDataProvider->getColumnFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Data"), aFieldEntries[0].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Type"), aFieldEntries[1].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Country"), aFieldEntries[2].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Data"_ustr, aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Type"_ustr, aFieldEntries[1].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Country"_ustr, aFieldEntries[2].Name);
aFieldEntries = xPivotTableDataProvider->getRowFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("City"), aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"City"_ustr, aFieldEntries[0].Name);
aFieldEntries = xPivotTableDataProvider->getDataFields();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aFieldEntries.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T1"), aFieldEntries[0].Name);
- CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Sum - Sales T1"_ustr, aFieldEntries[0].Name);
+ CPPUNIT_ASSERT_EQUAL(u"Sum - Sales T2"_ustr, aFieldEntries[1].Name);
}
void PivotChartTest::testPivotChartRowFieldInOutlineMode()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
- OUString sPivotTableName("DataPilotTable");
+ OUString sPivotTableName(u"DataPilotTable"_ustr);
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
@@ -812,7 +812,7 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"PivotChart"_ustr, awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -830,13 +830,13 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check the categories
{
- lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""},
+ lclCheckCategories({ u"DE"_ustr, u""_ustr, u"EN"_ustr, u""_ustr, u""_ustr, u"FR"_ustr, u""_ustr},
lclGetCategories(xChartDoc)[0]->getValues());
- lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"},
+ lclCheckCategories({ u"Berlin"_ustr, u"Munich"_ustr, u"Glasgow"_ustr, u"Liverpool"_ustr, u"London"_ustr, u"Nantes"_ustr, u"Paris"_ustr},
lclGetCategories(xChartDoc)[1]->getValues());
}
@@ -861,13 +861,13 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check categories
{
- lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""},
+ lclCheckCategories({ u"DE"_ustr, u""_ustr, u"EN"_ustr, u""_ustr, u""_ustr, u"FR"_ustr, u""_ustr},
lclGetCategories(xChartDoc)[0]->getValues());
- lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"},
+ lclCheckCategories({ u"Berlin"_ustr, u"Munich"_ustr, u"Glasgow"_ustr, u"Liverpool"_ustr, u"London"_ustr, u"Nantes"_ustr, u"Paris"_ustr},
lclGetCategories(xChartDoc)[1]->getValues());
}
@@ -890,13 +890,13 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
- CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
+ CPPUNIT_ASSERT_EQUAL(u"Total"_ustr, lclGetLabel(xChartDoc, 0));
}
// Check categories
{
- lclCheckCategories({ "DE", "", "EN", "", "", "FR", ""},
+ lclCheckCategories({ u"DE"_ustr, u""_ustr, u"EN"_ustr, u""_ustr, u""_ustr, u"FR"_ustr, u""_ustr},
lclGetCategories(xChartDoc)[0]->getValues());
- lclCheckCategories({ "Berlin", "Munich", "Glasgow", "Liverpool", "London", "Nantes", "Paris"},
+ lclCheckCategories({ u"Berlin"_ustr, u"Munich"_ustr, u"Glasgow"_ustr, u"Liverpool"_ustr, u"London"_ustr, u"Nantes"_ustr, u"Paris"_ustr},
lclGetCategories(xChartDoc)[1]->getValues());
}
}
@@ -905,11 +905,11 @@ void PivotChartTest::testPivotChartWithDateRowField()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
- OUString sPivotTableName("DataPilotTable");
+ OUString sPivotTableName(u"DataPilotTable"_ustr);
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
@@ -946,7 +946,7 @@ void PivotChartTest::testPivotChartWithDateRowField()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Create a new pivot chart
- xTablePivotCharts->addNewByName("PivotChart", awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
+ xTablePivotCharts->addNewByName(u"PivotChart"_ustr, awt::Rectangle{ 9000, 9000, 21000, 18000 }, sPivotTableName);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Get the pivot chart document so we can access its data
@@ -955,7 +955,7 @@ void PivotChartTest::testPivotChartWithDateRowField()
CPPUNIT_ASSERT(xChartDoc.is());
// Check if Date category is date formatted.
- lclCheckCategories( { "12/11/15", "", "", "", "", "", "12/14/15", "12/17/15", "01/20/16", "", "", "03/21/17" },
+ lclCheckCategories( { u"12/11/15"_ustr, u""_ustr, u""_ustr, u""_ustr, u""_ustr, u""_ustr, u"12/14/15"_ustr, u"12/17/15"_ustr, u"01/20/16"_ustr, u""_ustr, u""_ustr, u"03/21/17"_ustr },
lclGetCategories( xChartDoc )[0]->getValues() );
}
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index 8639015d6299..60e3dad4e446 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -25,7 +25,7 @@ class Chart2TrendCalculators : public ChartTest
{
public:
Chart2TrendCalculators()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{}
void setUp() override;
@@ -117,7 +117,7 @@ void Chart2TrendCalculators::testPotentialRegression1()
pxValues[i] = d;
pyValues[i] = 2.0 * pow ( d, 3 );
}
- checkCalculator( xValues, yValues, "f(x) = 2 x^3");
+ checkCalculator( xValues, yValues, u"f(x) = 2 x^3"_ustr);
}
// test y = A x ^ B
@@ -189,7 +189,7 @@ void Chart2TrendCalculators::testExponentialRegression1()
pxValues[i] = d;
pyValues[i] = 2.0 * exp ( 0.3 * d );
}
- checkCalculator( xValues, yValues, "f(x) = 2 exp( 0.3 x )");
+ checkCalculator( xValues, yValues, u"f(x) = 2 exp( 0.3 x )"_ustr);
}
void Chart2TrendCalculators::testExponentialRegression2()
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index f8cf7ad2d1bd..07d55b30b272 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -88,7 +88,7 @@ class Chart2DumpTest : public ChartTest
{
protected:
Chart2DumpTest(bool bDumpMode)
- : ChartTest("/chart2/qa/extras/chart2dump/data/")
+ : ChartTest(u"/chart2/qa/extras/chart2dump/data/"_ustr)
{
m_bDumpMode = bDumpMode;
}
@@ -262,8 +262,8 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "simple_chart.ods",
- "multiple_categories.ods"
+ u"simple_chart.ods"_ustr,
+ u"multiple_categories.ods"_ustr
};
for (const OUString& aTestFile : aTestFiles)
@@ -369,14 +369,14 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "legend_on_right_side.odp",
- "legend_on_bottom.odp",
- "legend_on_left_side.odp",
- "legend_on_top.odp",
- "many_legend_entries.odp",
- "custom_legend_position.odp",
- "multiple_categories.odp",
- "minimal_legend_test.odp"
+ u"legend_on_right_side.odp"_ustr,
+ u"legend_on_bottom.odp"_ustr,
+ u"legend_on_left_side.odp"_ustr,
+ u"legend_on_top.odp"_ustr,
+ u"many_legend_entries.odp"_ustr,
+ u"custom_legend_position.odp"_ustr,
+ u"multiple_categories.odp"_ustr,
+ u"minimal_legend_test.odp"_ustr
};
for (const OUString& aTestFile : aTestFiles)
@@ -390,7 +390,7 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false)
CPPUNIT_ASSERT(xShapes.is());
// Get legend shape
- uno::Reference<drawing::XShape> xLegend = getShapeByName(xShapes, "CID/D=0:Legend=");
+ uno::Reference<drawing::XShape> xLegend = getShapeByName(xShapes, u"CID/D=0:Legend="_ustr);
CPPUNIT_ASSERT(xLegend.is());
/* Check legend position and size
@@ -467,10 +467,10 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "vertical_grid.ods",
- "horizontal_grid.ods",
- "minor_grid.ods",
- "formated_grid_line.ods"
+ u"vertical_grid.ods"_ustr,
+ u"horizontal_grid.ods"_ustr,
+ u"minor_grid.ods"_ustr,
+ u"formated_grid_line.ods"_ustr
};
for (const OUString& sTestFile : aTestFiles)
@@ -485,10 +485,10 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false)
const std::vector<OUString> aGridShapeNames =
{
- "CID/D=0:CS=0:Axis=1,0:Grid=0", // Major vertical grid
- "CID/D=0:CS=0:Axis=0,0:Grid=0", // Major horizontal grid
- "CID/D=0:CS=0:Axis=1,0:Grid=0:SubGrid=0", // Minor vertical grid
- "CID/D=0:CS=0:Axis=0,0:Grid=0:SubGrid=0" // Minor horizontal grid
+ u"CID/D=0:CS=0:Axis=1,0:Grid=0"_ustr, // Major vertical grid
+ u"CID/D=0:CS=0:Axis=0,0:Grid=0"_ustr, // Major horizontal grid
+ u"CID/D=0:CS=0:Axis=1,0:Grid=0:SubGrid=0"_ustr, // Minor vertical grid
+ u"CID/D=0:CS=0:Axis=0,0:Grid=0:SubGrid=0"_ustr // Minor horizontal grid
};
for (const OUString& sGridShapeName : aGridShapeNames)
@@ -508,7 +508,7 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPropSet(xGrid, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aGridTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aGridTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aGridTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aGridTransformation, INT_EPS);
// Check line properties
@@ -517,18 +517,18 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false)
Reference< beans::XPropertySet > xGridLinePropSet(xGridLine, UNO_QUERY_THROW);
// Line type
drawing::LineDash aLineDash;
- xGridLinePropSet->getPropertyValue("LineDash") >>= aLineDash;
+ xGridLinePropSet->getPropertyValue(u"LineDash"_ustr) >>= aLineDash;
OUString sGridLineDash =
OUString::number(static_cast<sal_Int32>(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) +
OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance);
CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sGridLineDash);
// Line color
util::Color aLineColor = 0;
- xGridLinePropSet->getPropertyValue("LineColor") >>= aLineColor;
+ xGridLinePropSet->getPropertyValue(u"LineColor"_ustr) >>= aLineColor;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast<sal_Int32>(aLineColor));
// Line width
sal_Int32 nLineWidth = 0;
- xGridLinePropSet->getPropertyValue("LineWidth") >>= nLineWidth;
+ xGridLinePropSet->getPropertyValue(u"LineWidth"_ustr) >>= nLineWidth;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nLineWidth);
}
}
@@ -539,10 +539,10 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "default_formated_axis.odp",
- "axis_special_positioning.odp",
- "formated_axis_lines.odp",
- "rotated_axis_labels.odp"
+ u"default_formated_axis.odp"_ustr,
+ u"axis_special_positioning.odp"_ustr,
+ u"formated_axis_lines.odp"_ustr,
+ u"rotated_axis_labels.odp"_ustr
};
for (const OUString& sTestFile : aTestFiles)
@@ -557,8 +557,8 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
const std::vector<OUString> aAxisShapeNames =
{
- "CID/D=0:CS=0:Axis=0,0", // X Axis
- "CID/D=0:CS=0:Axis=1,0", // Y Axis
+ u"CID/D=0:CS=0:Axis=0,0"_ustr, // X Axis
+ u"CID/D=0:CS=0:Axis=1,0"_ustr, // Y Axis
};
for (const OUString& sAxisShapeName : aAxisShapeNames)
@@ -578,7 +578,7 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPropSet(xXAxis, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aAxisTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aAxisTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aAxisTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aAxisTransformation, INT_EPS);
// Check line properties
@@ -589,18 +589,18 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
Reference< beans::XPropertySet > xAxisLinePropSet(xAxisLine, UNO_QUERY_THROW);
// Line type
drawing::LineDash aLineDash;
- xAxisLinePropSet->getPropertyValue("LineDash") >>= aLineDash;
+ xAxisLinePropSet->getPropertyValue(u"LineDash"_ustr) >>= aLineDash;
OUString sAxisLineDash =
OUString::number(static_cast<sal_Int32>(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) +
OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance);
CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sAxisLineDash);
// Line color
util::Color aAxisLineColor = 0;
- xAxisLinePropSet->getPropertyValue("LineColor") >>= aAxisLineColor;
+ xAxisLinePropSet->getPropertyValue(u"LineColor"_ustr) >>= aAxisLineColor;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast<sal_Int32>(aAxisLineColor));
// Line width
sal_Int32 nAxisLineWidth = 0;
- xAxisLinePropSet->getPropertyValue("LineWidth") >>= nAxisLineWidth;
+ xAxisLinePropSet->getPropertyValue(u"LineWidth"_ustr) >>= nAxisLineWidth;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nAxisLineWidth);
}
}
@@ -610,12 +610,12 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "default_formated_axis.odp",
- "rotated_axis_labels.odp",
- "formated_axis_labels.odp",
- "percent_stacked_column_chart.odp",
- "tdf118150.xlsx",
- "date-categories.pptx",
+ u"default_formated_axis.odp"_ustr,
+ u"rotated_axis_labels.odp"_ustr,
+ u"formated_axis_labels.odp"_ustr,
+ u"percent_stacked_column_chart.odp"_ustr,
+ u"tdf118150.xlsx"_ustr,
+ u"date-categories.pptx"_ustr,
};
for (const OUString& sTestFile : aTestFiles)
@@ -630,8 +630,8 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
const std::vector<OUString> aAxisShapeNames =
{
- "CID/D=0:CS=0:Axis=0,0", // X Axis
- "CID/D=0:CS=0:Axis=1,0", // Y Axis
+ u"CID/D=0:CS=0:Axis=0,0"_ustr, // X Axis
+ u"CID/D=0:CS=0:Axis=1,0"_ustr, // Y Axis
};
for (const OUString& sAxisShapeName : aAxisShapeNames)
@@ -678,10 +678,10 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
// Check font color and height
util::Color aLabelFontColor = 0;
- xPropSet->getPropertyValue("CharColor") >>= aLabelFontColor;
+ xPropSet->getPropertyValue(u"CharColor"_ustr) >>= aLabelFontColor;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast<sal_Int32>(aLabelFontColor));
float fLabelFontHeight = 0.0f;
- xPropSet->getPropertyValue("CharHeight") >>= fLabelFontHeight;
+ xPropSet->getPropertyValue(u"CharHeight"_ustr) >>= fLabelFontHeight;
CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(fLabelFontHeight, 1E-12);
}
}
@@ -692,13 +692,13 @@ DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "normal_column_chart.ods",
- "stacked_column_chart.ods",
- "percent_stacked_column_chart.ods",
- "column_chart_small_spacing.ods",
- "normal_bar_chart.ods",
- "stacked_bar_chart.ods",
- "percent_stacked_bar_chart.ods",
+ u"normal_column_chart.ods"_ustr,
+ u"stacked_column_chart.ods"_ustr,
+ u"percent_stacked_column_chart.ods"_ustr,
+ u"column_chart_small_spacing.ods"_ustr,
+ u"normal_bar_chart.ods"_ustr,
+ u"stacked_bar_chart.ods"_ustr,
+ u"percent_stacked_bar_chart.ods"_ustr,
};
for (const OUString& sTestFile : aTestFiles)
@@ -755,7 +755,7 @@ DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPropSet(xColumnOrBar, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aColumnOrBarTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aColumnOrBarTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aColumnOrBarTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aColumnOrBarTransformation, INT_EPS);
}
}
@@ -766,9 +766,9 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "chartwall_auto_adjust_with_titles.ods",
- "chartwall_auto_adjust_without_titles.ods",
- "chartwall_custom_positioning.ods"
+ u"chartwall_auto_adjust_with_titles.ods"_ustr,
+ u"chartwall_auto_adjust_without_titles.ods"_ustr,
+ u"chartwall_custom_positioning.ods"_ustr
};
for (const OUString& sTestFile : aTestFiles)
@@ -781,7 +781,7 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapes.is());
- uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, "CID/DiagramWall=");
+ uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, u"CID/DiagramWall="_ustr);
CPPUNIT_ASSERT(xChartWall.is());
// Check position and size
@@ -809,18 +809,18 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false)
// Check line properties
// Line type
drawing::LineDash aLineDash;
- xPropSet->getPropertyValue("LineDash") >>= aLineDash;
+ xPropSet->getPropertyValue(u"LineDash"_ustr) >>= aLineDash;
OUString sChartWallLineDash =
OUString::number(static_cast<sal_Int32>(aLineDash.Style)) + ";" + OUString::number(aLineDash.Dots) + ";" + OUString::number(aLineDash.DotLen) +
OUString::number(aLineDash.Dashes) + ";" + OUString::number(aLineDash.DashLen) + ";" + OUString::number(aLineDash.Distance);
CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(sChartWallLineDash);
// Line color
util::Color aChartWallLineColor = 0;
- xPropSet->getPropertyValue("LineColor") >>= aChartWallLineColor;
+ xPropSet->getPropertyValue(u"LineColor"_ustr) >>= aChartWallLineColor;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast<sal_Int32>(aChartWallLineColor));
// Line width
sal_Int32 nChartWallLineWidth = 0;
- xPropSet->getPropertyValue("LineWidth") >>= nChartWallLineWidth;
+ xPropSet->getPropertyValue(u"LineWidth"_ustr) >>= nChartWallLineWidth;
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nChartWallLineWidth);
}
}
@@ -829,11 +829,11 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "normal_pie_chart.ods",
- "rotated_pie_chart.ods",
- "exploded_pie_chart.ods",
- "donut_chart.ods",
- "pie_chart_many_slices.ods",
+ u"normal_pie_chart.ods"_ustr,
+ u"rotated_pie_chart.ods"_ustr,
+ u"exploded_pie_chart.ods"_ustr,
+ u"donut_chart.ods"_ustr,
+ u"pie_chart_many_slices.ods"_ustr,
};
for (const OUString& sTestFile : aTestFiles)
@@ -885,7 +885,7 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPropSet(xSlice, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aSliceTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aSliceTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aSliceTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aSliceTransformation, INT_EPS);
// Check slice fill style and color
@@ -904,9 +904,9 @@ DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "normal_area_chart.ods",
- "stacked_area_chart.ods",
- "percent_stacked_area_chart.ods"
+ u"normal_area_chart.ods"_ustr,
+ u"stacked_area_chart.ods"_ustr,
+ u"percent_stacked_area_chart.ods"_ustr
};
for (const OUString& sTestFile : aTestFiles)
@@ -949,7 +949,7 @@ DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPropSet(xArea, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aAreaTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aAreaTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aAreaTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aAreaTransformation, INT_EPS);
// Check area fill style and color
@@ -968,18 +968,18 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
{
const std::vector<OUString> aTestFiles =
{
- "normal_line_chart_lines_only.ods",
- "normal_line_chart_points_only.ods",
- "normal_line_chart_lines_and_points.ods",
- "stacked_line_chart_lines_only.ods",
- "stacked_line_chart_points_only.ods",
- "stacked_line_chart_lines_and_points.ods",
- "percent_stacked_line_chart_lines_only.ods",
- "percent_stacked_line_chart_points_only.ods",
- "percent_stacked_line_chart_lines_and_points.ods",
- "scatter_chart_points_only.ods",
- "scatter_chart_lines_only.ods",
- "scatter_chart_lines_and_points.ods",
+ u"normal_line_chart_lines_only.ods"_ustr,
+ u"normal_line_chart_points_only.ods"_ustr,
+ u"normal_line_chart_lines_and_points.ods"_ustr,
+ u"stacked_line_chart_lines_only.ods"_ustr,
+ u"stacked_line_chart_points_only.ods"_ustr,
+ u"stacked_line_chart_lines_and_points.ods"_ustr,
+ u"percent_stacked_line_chart_lines_only.ods"_ustr,
+ u"percent_stacked_line_chart_points_only.ods"_ustr,
+ u"percent_stacked_line_chart_lines_and_points.ods"_ustr,
+ u"scatter_chart_points_only.ods"_ustr,
+ u"scatter_chart_lines_only.ods"_ustr,
+ u"scatter_chart_lines_and_points.ods"_ustr,
};
for (const OUString& sTestFile : aTestFiles)
@@ -1016,7 +1016,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
xPropSet->getPropertyValue(UNO_NAME_LINESTYLE) >>= aSeriesLineStyle;
if (aSeriesLineStyle != drawing::LineStyle_NONE)
{
- CPPUNIT_DUMP_ASSERT_NOTE("Lines are displayed");
+ CPPUNIT_DUMP_ASSERT_NOTE(u"Lines are displayed"_ustr);
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast<sal_Int32>(aSeriesLineStyle));
// Check line shape geometry
@@ -1028,14 +1028,14 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLineSize.Width, INT_EPS);
CPPUNIT_ASSERT(xPropSet.is());
drawing::HomogenMatrix3 aLineTransformation;
- xPropSet->getPropertyValue("Transformation") >>= aLineTransformation;
+ xPropSet->getPropertyValue(u"Transformation"_ustr) >>= aLineTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aLineTransformation, INT_EPS);
}
// Check points of series
if (xIndexAccess->getCount() >= 2)
{
- CPPUNIT_DUMP_ASSERT_NOTE("Points are displayed");
+ CPPUNIT_DUMP_ASSERT_NOTE(u"Points are displayed"_ustr);
uno::Reference<container::XIndexAccess> xPointsOfSeries(xIndexAccess->getByIndex(1), UNO_QUERY_THROW);
sal_Int32 nPointCountInSeries = xPointsOfSeries->getCount();
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nPointCountInSeries);
@@ -1058,7 +1058,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
// Check transformation
Reference< beans::XPropertySet > xPointPropSet(XPoint, UNO_QUERY_THROW);
drawing::HomogenMatrix3 aPointTransformation;
- xPointPropSet->getPropertyValue("Transformation") >>= aPointTransformation;
+ xPointPropSet->getPropertyValue(u"Transformation"_ustr) >>= aPointTransformation;
CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aPointTransformation, INT_EPS);
// Check fill style and color
@@ -1076,7 +1076,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false)
DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
{
- setTestFileName( "pivotchart_data_button.ods" );
+ setTestFileName( u"pivotchart_data_button.ods"_ustr );
loadFromFile(getTestFileName());
// Check that we have pivot chart in the document
@@ -1095,7 +1095,7 @@ DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
CPPUNIT_ASSERT( xShapes.is() );
// Get the shape that represents the "Data" button.
- uno::Reference<drawing::XShape> xButton = getShapeByName( xShapes, "FieldButton.Row.8",
+ uno::Reference<drawing::XShape> xButton = getShapeByName( xShapes, u"FieldButton.Row.8"_ustr,
[]( const uno::Reference<drawing::XShape>& xShapeNode )
{
return xShapeNode->getShapeType() == "com.sun.star.drawing.TextShape";
@@ -1103,7 +1103,7 @@ DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false )
CPPUNIT_ASSERT_MESSAGE( "Cannot find Data button shape", xButton.is() );
// Make sure that there is no arrow shape with the Data button
- uno::Reference<drawing::XShape> xArrow = getShapeByName( xShapes, "FieldButton.Row.8",
+ uno::Reference<drawing::XShape> xArrow = getShapeByName( xShapes, u"FieldButton.Row.8"_ustr,
[]( const uno::Reference<drawing::XShape>& xShapeNode )
{
return xShapeNode->getShapeType() == "com.sun.star.drawing.PolyPolygonShape";
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();
diff --git a/chart2/qa/extras/chart2export2.cxx b/chart2/qa/extras/chart2export2.cxx
index f5378dc9444c..7d81dbb6f6a7 100644
--- a/chart2/qa/extras/chart2export2.cxx
+++ b/chart2/qa/extras/chart2export2.cxx
@@ -24,7 +24,7 @@ class Chart2ExportTest2 : public ChartTest
{
public:
Chart2ExportTest2()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{
}
};
@@ -40,10 +40,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX)
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
sal_Int32 AxisIndex = 1;
// Attach the second series to the secondary axis. (The third series is already attached.)
- xPropSet->setPropertyValue("AttachedAxisIndex", uno::Any(AxisIndex));
+ xPropSet->setPropertyValue(u"AttachedAxisIndex"_ustr, uno::Any(AxisIndex));
- 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);
// 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"_ostr, 2);
@@ -53,8 +53,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX)
{
// Original file was created with MS Office
loadFromFile(u"xlsx/combined_chart_secondary_axis.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);
// Collect barchart axID on secondary Axis
OUString XValueIdOfBarchart = getXPath(
@@ -81,8 +81,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisODS)
{
// Original file was created with LibreOffice
loadFromFile(u"ods/combined_chart_secondary_axis.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);
// Collect barchart axID on secondary Axis
OUString XValueIdOfBarchart = getXPath(
@@ -115,19 +115,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX)
// Original files were created with MS Office
{
loadFromFile(u"xlsx/tdf127777.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:valAx/c:crossBetween"_ostr,
- "val"_ostr, "between");
+ "val"_ostr, u"between"_ustr);
}
{
loadFromFile(u"xlsx/tdf132076.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:valAx/c:crossBetween"_ostr,
- "val"_ostr, "between");
+ "val"_ostr, u"between"_ustr);
}
}
@@ -135,41 +135,41 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis)
{
// Original file was created with MS Office (the category axis is deleted in the file)
loadFromFile(u"xlsx/tdf128633.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:valAx/c:crossBetween"_ostr, "val"_ostr,
- "between");
+ u"between"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS)
{
// Original file was created with LibreOffice
loadFromFile(u"ods/test_CrossBetween.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:valAx/c:crossBetween"_ostr, "val"_ostr,
- "between");
+ u"between"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
{
loadFromFile(u"xlsx/axis_title_rotation.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:valAx/c:title/c:tx/c:rich/a:bodyPr"_ostr,
- "rot"_ostr, "0");
+ "rot"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX)
{
loadFromFile(u"docx/testAxisTitlePosition.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);
// test X Axis title position
@@ -209,20 +209,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX)
// FIXME: validation error in OOXML export: Errors: 3
skipValidation();
- save("Office Open XML Text");
- xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
- assertXPath(pXmlDoc, "(//c:crossBetween)[1]"_ostr, "val"_ostr, "midCat");
+ save(u"Office Open XML Text"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"word/charts/chart1.xml"_ustr);
+ assertXPath(pXmlDoc, "(//c:crossBetween)[1]"_ostr, "val"_ostr, u"midCat"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX)
{
loadFromFile(u"xlsx/pie_chart_datapoint_explosion.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:pieChart/c:ser/c:dPt/c:explosion"_ostr,
- "val"_ostr, "28");
+ "val"_ostr, u"28"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
@@ -242,42 +242,42 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
// 1
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("90.0 = "), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"90.0 = "_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xed7d31), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE,
aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("90"), aFields[1]->getString());
- CPPUNIT_ASSERT_EQUAL(OUString("{0C576297-5A9F-4B4E-A675-B6BA406B7D87}"), aFields[1]->getGuid());
+ CPPUNIT_ASSERT_EQUAL(u"90"_ustr, aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"{0C576297-5A9F-4B4E-A675-B6BA406B7D87}"_ustr, aFields[1]->getGuid());
// 2
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Text"), aFields[0]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, aFields[0]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" : "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" : "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME,
aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("B"), aFields[2]->getString());
- CPPUNIT_ASSERT_EQUAL(OUString("{0CCAAACD-B393-42CE-8DBD-82F9F9ADC852}"), aFields[2]->getGuid());
- aFields[2]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[2]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"B"_ustr, aFields[2]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"{0CCAAACD-B393-42CE-8DBD-82F9F9ADC852}"_ustr, aFields[2]->getGuid());
+ aFields[2]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[2]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(16), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xed7d31), nFontColor);
@@ -287,13 +287,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[4]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Multi"), aFields[4]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Multi"_ustr, aFields[4]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[5]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("line"), aFields[5]->getString());
- aFields[5]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[5]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"line"_ustr, aFields[5]->getString());
+ aFields[5]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[5]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(11.97), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xbf9000), nFontColor);
@@ -303,28 +303,28 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[7]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Abc"), aFields[7]->getString());
- aFields[7]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[7]->getPropertyValue("CharColor") >>= nFontColor;
- aFields[7]->getPropertyValue("CharUnderline") >>= nCharUnderline;
+ CPPUNIT_ASSERT_EQUAL(u"Abc"_ustr, aFields[7]->getString());
+ aFields[7]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[7]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
+ aFields[7]->getPropertyValue(u"CharUnderline"_ustr) >>= nCharUnderline;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(12), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xa9d18e), nFontColor);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nCharUnderline);
// 3
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME,
aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("DATA"), aFields[0]->getString());
- CPPUNIT_ASSERT_EQUAL(OUString("{C8F3EB90-8960-4F9A-A3AD-B4FAC4FE4566}"), aFields[0]->getGuid());
+ CPPUNIT_ASSERT_EQUAL(u"DATA"_ustr, aFields[0]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"{C8F3EB90-8960-4F9A-A3AD-B4FAC4FE4566}"_ustr, aFields[0]->getGuid());
// 4
xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(
@@ -334,16 +334,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel)
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" <CELLREF"), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" <CELLREF"_ustr, aFields[1]->getString());
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// 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"_ostr,
- "val"_ostr, "404040");
+ "val"_ostr, u"404040"_ustr);
}
/// Test for tdf#94235
@@ -352,28 +352,28 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName)
// ODF
{
loadFromFile(u"ods/ser_labels.ods");
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropertySet;
chart2::DataPointLabel aDataPointLabel;
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aDataPointLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aDataPointLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aDataPointLabel.ShowSeriesName);
}
// OOXML
{
loadFromFile(u"xlsx/ser_labels.xlsx");
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropertySet;
chart2::DataPointLabel aDataPointLabel;
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aDataPointLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aDataPointLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aDataPointLabel.ShowSeriesName);
}
}
@@ -385,15 +385,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
loadFromFile(u"xlsx/testCustomPosDataLabels.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 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"_ostr,
- "val"_ostr, "2");
+ "val"_ostr, u"2"_ustr);
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"_ostr,
@@ -411,15 +411,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
loadFromFile(u"docx/testTdf108110.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);
// 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"_ostr,
- "val"_ostr, "2");
+ "val"_ostr, u"2"_ustr);
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"_ostr,
@@ -437,7 +437,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
loadFromFile(u"ods/tdf136024.ods");
{
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
// tdf#136024: test custom position of pie chart data label after an ods export
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -448,7 +448,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel)
uno::UNO_SET_THROW);
chart2::RelativePosition aCustomLabelPosition;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CustomLabelPosition")
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"CustomLabelPosition"_ustr)
>>= aCustomLabelPosition);
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0961935120945059, aCustomLabelPosition.Primary, 1e-5);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.209578842093566, aCustomLabelPosition.Secondary, 1e-5);
@@ -471,50 +471,50 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabelMultipleSeries)
// First series
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE,
aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("4.3"), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"4.3"_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xc00000), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME,
aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Bars"_ustr, aFields[2]->getString());
// Second series
xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE,
aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("2"), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"2"_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xffd966), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT,
aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME,
aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Line"_ustr, aFields[2]->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
@@ -524,42 +524,42 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines)
loadFromFile(u"xlsx/testTdf90749.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:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/"
"c15:showLeaderLines"_ostr,
- "val"_ostr, "1");
+ "val"_ostr, u"1"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/"
"c15:showLeaderLines"_ostr,
- "val"_ostr, "0");
+ "val"_ostr, u"0"_ustr);
}
loadFromFile(u"docx/MSO_Custom_Leader_Line.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);
// 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"_ostr,
- "val"_ostr, "0");
+ "val"_ostr, u"0"_ustr);
}
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX)
{
loadFromFile(u"pptx/tdf115859.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
- "formatCode"_ostr, "#,##0.00,\\K");
+ "formatCode"_ostr, u"#,##0.00,\\K"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:numFmt"_ostr,
- "sourceLinked"_ostr, "0");
+ "sourceLinked"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
@@ -569,157 +569,157 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX)
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);
// 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"_ostr,
- "\n");
+ u"\n"_ustr);
// The text separator should be a comma
assertXPathContent(
pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:dLbls/c:separator"_ostr,
- ", ");
+ u", "_ustr);
// The text separator should be a semicolon
assertXPathContent(
pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:separator"_ostr,
- "; ");
+ u"; "_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX)
{
loadFromFile(u"pptx/testChartTitlePropertiesColorFill.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr,
- "val"_ostr, "ff0000");
+ "val"_ostr, u"ff0000"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX)
{
loadFromFile(u"pptx/testChartTitlePropertiesGradientFill.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr,
- "val"_ostr, "f6f8fc");
+ "val"_ostr, u"f6f8fc"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr,
- "val"_ostr, "c7d5ed");
+ "val"_ostr, u"c7d5ed"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX)
{
loadFromFile(u"pptx/testChartTitlePropertiesBitmapFill.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr,
- "embed"_ostr, "rId1");
+ "embed"_ostr, u"rId1"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation)
{
loadFromFile(u"xlsx/xAxisLabelsRotation.xlsx");
- save("Calc Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart1.xml");
+ save(u"Calc Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc1 = parseExport(u"xl/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc1);
// Chart1 xAxis labels should be 45 degree
assertXPath(pXmlDoc1, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
- "rot"_ostr, "2700000");
+ "rot"_ostr, u"2700000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX)
{
loadFromFile(u"ods/multilevelcat.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);
// 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"_ostr,
- "val"_ostr, "6");
+ "val"_ostr, u"6"_ustr);
// 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"_ostr,
- "Categoria 1");
+ u"Categoria 1"_ustr);
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"_ostr,
- "Categoria 6");
+ u"Categoria 6"_ustr);
// 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"_ostr,
- "2011");
+ u"2011"_ustr);
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"_ostr,
- "2013");
+ u"2013"_ustr);
// 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"_ostr,
- "val"_ostr, "0");
+ "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX)
{
loadFromFile(u"odt/multilevelcat.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);
// 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"_ostr,
- "val"_ostr, "4");
+ "val"_ostr, u"4"_ustr);
// 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"_ostr,
- "Categoria 1");
+ u"Categoria 1"_ustr);
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"_ostr,
- "Categoria 4");
+ u"Categoria 4"_ustr);
// 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"_ostr,
- "2011");
+ u"2011"_ustr);
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"_ostr,
- "2012");
+ u"2012"_ustr);
// 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"_ostr,
- "val"_ostr, "0");
+ "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163)
{
loadFromFile(u"pptx/tdf116163.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:bodyPr"_ostr,
- "rot"_ostr, "-5400000");
+ "rot"_ostr, u"-5400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
{
loadFromFile(u"xlsx/tdf111824.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);
// Collect 3D barchart Z axID
@@ -733,8 +733,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis)
{
loadFromFile(u"xlsx/test3DAreaChartZAxis.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);
// Collect 3D area chart Z axID
@@ -749,19 +749,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029)
{
loadFromFile(u"odp/tdf119029.odp");
// Only use "chart", without number, because the number depends on the previous tests
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
- "rot"_ostr, "-5400000");
+ "rot"_ostr, u"-5400000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
{
loadFromFile(u"odt/tdf108022.odt");
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
// assert we really have two charts
Reference<chart2::XChartDocument> xChartDoc1(getChartDocFromWriter(0), uno::UNO_QUERY);
@@ -773,8 +773,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
{
loadFromFile(u"docx/tdf121744.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);
OUString XValueId = getXPath(
@@ -791,14 +791,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189)
{
loadFromFile(u"odp/tdf121189.odp");
- saveAndReload("Impress Office Open XML");
+ saveAndReload(u"Impress Office Open XML"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage->getCount());
uno::Reference<drawing::XShape> xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.OLE2Shape"_ustr, xShape->getShapeType());
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
@@ -809,31 +809,31 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031)
// 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:pieChart/c:ser/c:dLbls/c:numFmt"_ostr,
- "formatCode"_ostr, "0.000%");
+ "formatCode"_ostr, u"0.000%"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr,
- "formatCode"_ostr, "0.000%");
+ "formatCode"_ostr, u"0.000%"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:numFmt"_ostr,
- "formatCode"_ostr, "0.000%");
+ "formatCode"_ostr, u"0.000%"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:numFmt"_ostr,
- "formatCode"_ostr, "0.000%");
+ "formatCode"_ostr, u"0.000%"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012)
{
loadFromFile(u"xlsx/tdf115012.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);
// workaround: use-zero instead of leave-gap to show the original line chart
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "zero");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, u"zero"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
@@ -843,11 +843,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118)
// 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);
// workaround: use leave-gap instead of zero to show the original line chart
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, "gap");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, u"gap"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
@@ -860,14 +860,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText)
// FIXME: validation error in OOXML export: Errors: 2
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);
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"_ostr,
- "kiscica");
+ u"kiscica"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText)
@@ -880,60 +880,62 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText)
// FIXME: validation error in OOXML export: Errors: 3
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:barChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr,
- "val"_ostr, "2");
+ "val"_ostr, u"2"_ustr);
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"_ostr,
- "3.5");
+ u"3.5"_ustr);
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"_ostr,
- "CustomLabel 1");
+ u"CustomLabel 1"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl[2]/c:idx"_ostr,
- "val"_ostr, "3");
+ "val"_ostr, u"3"_ustr);
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"_ostr,
- "4.5");
+ u"4.5"_ustr);
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"_ostr,
- "CustomLabel 2");
+ u"CustomLabel 2"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
{
loadFromFile(u"xlsx/deleted_legend_entry.xlsx");
{
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 1));
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropertySet(xDataSeries, uno::UNO_QUERY_THROW);
bool bShowLegendEntry = true;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("ShowLegendEntry") >>= bShowLegendEntry);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"ShowLegendEntry"_ustr)
+ >>= bShowLegendEntry);
CPPUNIT_ASSERT(!bShowLegendEntry);
}
loadFromFile(u"xlsx/deleted_legend_entry2.xlsx");
{
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropertySet(xDataSeries, uno::UNO_QUERY_THROW);
bool bShowLegendEntry = true;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("ShowLegendEntry") >>= bShowLegendEntry);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"ShowLegendEntry"_ustr)
+ >>= bShowLegendEntry);
CPPUNIT_ASSERT(!bShowLegendEntry);
Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(1, mxComponent);
@@ -942,7 +944,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
CPPUNIT_ASSERT(xDataSeries2.is());
Reference<beans::XPropertySet> xPropertySet2(xDataSeries2, uno::UNO_QUERY_THROW);
Sequence<sal_Int32> deletedLegendEntriesSeq;
- CPPUNIT_ASSERT(xPropertySet2->getPropertyValue("DeletedLegendEntries")
+ CPPUNIT_ASSERT(xPropertySet2->getPropertyValue(u"DeletedLegendEntries"_ustr)
>>= deletedLegendEntriesSeq);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]);
}
@@ -951,8 +953,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
{
loadFromFile(u"pptx/tdf60316.pptx");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// Without the fix in place, the shape would have had a solidFill background
@@ -963,14 +965,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
{
loadFromFile(u"docx/piechart_deleted_legend_entry.docx");
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropertySet(xDataSeries, uno::UNO_QUERY_THROW);
Sequence<sal_Int32> deletedLegendEntriesSeq;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("DeletedLegendEntries")
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"DeletedLegendEntries"_ustr)
>>= deletedLegendEntriesSeq);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]);
}
@@ -978,23 +980,23 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857)
{
loadFromFile(u"ods/tdf59857.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: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");
+ "val"_ostr, u"cccccc"_ustr);
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");
+ "val"_ostr, u"b3b3b3"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
{
loadFromFile(u"xlsx/auto_marker_excel10.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);
// This was 12: all series exported with square markers
@@ -1009,24 +1011,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
{
loadFromFile(u"ods/legend_overlay.ods");
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
{
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
Reference<beans::XPropertySet> xPropertySet(xLegend, uno::UNO_QUERY_THROW);
bool bOverlay = false;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Overlay"_ustr) >>= bOverlay);
CPPUNIT_ASSERT(bOverlay);
}
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
{
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference<chart::XChartDocument> xChartDoc(xChart2Doc, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
Reference<beans::XPropertySet> xPropertySet(xLegend, uno::UNO_QUERY_THROW);
bool bOverlay = false;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Overlay") >>= bOverlay);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Overlay"_ustr) >>= bOverlay);
CPPUNIT_ASSERT(bOverlay);
}
}
@@ -1034,23 +1036,23 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792)
{
loadFromFile(u"docx/MSO_axis_position.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:crossBetween"_ostr, "val"_ostr,
- "between");
+ u"between"_ustr);
- pXmlDoc = parseExport("word/charts/chart2.xml");
+ pXmlDoc = parseExport(u"word/charts/chart2.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween"_ostr, "val"_ostr,
- "midCat");
+ u"midCat"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979)
{
loadFromFile(u"ods/tdf131115.ods");
{
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1066,7 +1068,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979)
loadFromFile(u"ods/tdf131979.ods");
{
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1088,46 +1090,46 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076)
{
loadFromFile(u"ods/tdf132076.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:catAx/c:numFmt"_ostr,
- "formatCode"_ostr, "dd");
+ "formatCode"_ostr, u"dd"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt"_ostr,
- "sourceLinked"_ostr, "0");
+ "sourceLinked"_ostr, u"0"_ustr);
}
{
loadFromFile(u"xlsx/tdf132076.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:dateAx/c:numFmt"_ostr,
- "formatCode"_ostr, "dd");
+ "formatCode"_ostr, u"dd"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt"_ostr,
- "sourceLinked"_ostr, "0");
+ "sourceLinked"_ostr, u"0"_ustr);
}
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812)
{
loadFromFile(u"odp/ellipticalGradientFill.odp");
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path"_ostr,
- "path"_ostr, "circle");
+ "path"_ostr, u"circle"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
- "l"_ostr, "50000");
+ "l"_ostr, u"50000"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
- "t"_ostr, "49000");
+ "t"_ostr, u"49000"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
- "r"_ostr, "50000");
+ "r"_ostr, u"50000"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect"_ostr,
- "b"_ostr, "51000");
+ "b"_ostr, u"51000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
@@ -1137,19 +1139,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190)
// 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);
// 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"_ostr,
- "wrap"_ostr, "none");
+ "wrap"_ostr, u"none"_ustr);
assertXPath(
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr"_ostr,
- "wrap"_ostr, "square");
+ "wrap"_ostr, u"square"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
@@ -1159,22 +1161,22 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191)
// 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);
// 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"_ostr,
- "rot"_ostr, "-4500000");
+ "rot"_ostr, u"-4500000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594)
{
loadFromFile(u"xlsx/chart_pie2007.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:pieChart/c:ser/c:cat"_ostr, 1);
@@ -1191,20 +1193,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255)
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropSet(xDataSeries, UNO_QUERY_THROW);
bool bWrap = false;
- CPPUNIT_ASSERT((xPropSet->getPropertyValue("TextWordWrap") >>= bWrap));
+ CPPUNIT_ASSERT((xPropSet->getPropertyValue(u"TextWordWrap"_ustr) >>= bWrap));
CPPUNIT_ASSERT(bWrap);
// FIXME: validation error in OOXML export: Errors: 11
skipValidation();
// export test
- 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:pieChart/c:ser/c:dLbls/c:txPr/a:bodyPr"_ostr,
- "wrap"_ostr, "square");
+ "wrap"_ostr, u"square"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
@@ -1220,28 +1222,28 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977)
uno::UNO_SET_THROW);
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
float nFontSize;
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(9), nFontSize);
// FIXME: validation error in OOXML export: Errors: 2
skipValidation();
//export test
- 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:barChart/c:ser/c:dLbls/c:dLbl/c:tx/c:rich/a:p/"
"a:r/a:rPr"_ostr,
- "sz"_ostr, "900");
+ "sz"_ostr, u"900"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647)
{
loadFromFile(u"xlsx/empty_chart.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:barChart"_ostr, 1);
@@ -1254,26 +1256,26 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267)
// FIXME: validation error in OOXML export: Errors: 2
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);
assertXPathContent(
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v"_ostr,
- "John");
+ u"John"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataLabelPlacementPieChart)
{
loadFromFile(u"xlsx/tdf134978.xlsx");
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
UNO_QUERY_THROW);
// test the placement of the manually positioned label
Reference<beans::XPropertySet> xDataPointPropSet(
xChartDoc->getDiagram()->getDataPointProperties(2, 0), uno::UNO_SET_THROW);
- uno::Any aAny = xDataPointPropSet->getPropertyValue("LabelPlacement");
+ uno::Any aAny = xDataPointPropSet->getPropertyValue(u"LabelPlacement"_ustr);
CPPUNIT_ASSERT(aAny.hasValue());
sal_Int32 nLabelPlacement = 0;
CPPUNIT_ASSERT(aAny >>= nLabelPlacement);
@@ -1287,20 +1289,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917)
// 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:dateAx/c:baseTimeUnit"_ostr,
- "val"_ostr, "days");
+ "val"_ostr, u"days"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorUnit"_ostr, "val"_ostr,
- "1");
+ u"1"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:majorTimeUnit"_ostr,
- "val"_ostr, "months");
+ "val"_ostr, u"months"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorUnit"_ostr, "val"_ostr,
- "7");
+ u"7"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:minorTimeUnit"_ostr,
- "val"_ostr, "days");
+ "val"_ostr, u"days"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
@@ -1326,8 +1328,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
0, // nSeriesIdx
1, // nNumFields
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE,
- "Munka1!$F$9", // aCellRange
- "67,5%", // aString
+ u"Munka1!$F$9"_ustr, // aCellRange
+ u"67,5%"_ustr, // aString
},
{
@@ -1335,8 +1337,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
1, // nSeriesIdx
1, // nNumFields
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE,
- "Munka1!$G$9", // aCellRange
- "32,3%", // aString
+ u"Munka1!$G$9"_ustr, // aCellRange
+ u"32,3%"_ustr, // aString
},
};
@@ -1349,7 +1351,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
uno::Reference<beans::XPropertySet> xPropertySet;
uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>> aFields;
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(aTestEntry.nNumFields, aFields.getLength());
CPPUNIT_ASSERT_EQUAL(aTestEntry.eFieldType, aFields[0]->getFieldType());
@@ -1360,20 +1362,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204)
// FIXME: validation error in OOXML export: Errors: 2
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);
// 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"_ostr,
- "type"_ostr, "CELLRANGE");
+ "type"_ostr, u"CELLRANGE"_ustr);
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"_ostr,
- "type"_ostr, "CELLRANGE");
+ "type"_ostr, u"CELLRANGE"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181)
@@ -1387,25 +1389,25 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181)
Reference<drawing::XShape> xLegendEntry1, xLegendEntry2, xLegendEntry3;
// first legend entry is visible
- xLegendEntry1
- = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0:LegendEntry=0");
+ xLegendEntry1 = getShapeByName(
+ xShapes, u"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0:LegendEntry=0"_ustr);
CPPUNIT_ASSERT(xLegendEntry1.is());
// second legend entry is not visible
- xLegendEntry2
- = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1:LegendEntry=0");
+ xLegendEntry2 = getShapeByName(
+ xShapes, u"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1:LegendEntry=0"_ustr);
CPPUNIT_ASSERT(!xLegendEntry2.is());
// third legend entry is visible
- xLegendEntry3
- = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2:LegendEntry=0");
+ xLegendEntry3 = getShapeByName(
+ xShapes, u"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2:LegendEntry=0"_ustr);
CPPUNIT_ASSERT(xLegendEntry3.is());
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText)
{
loadFromFile(u"ods/tdf72776.ods");
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
// test that the text of custom shape exists inside the chart
@@ -1421,7 +1423,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX)
{
loadFromFile(u"xlsx/tdf128621.xlsx");
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1449,7 +1451,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX)
{
loadFromFile(u"docx/tdf143130.docx");
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1477,7 +1479,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
{
loadFromFile(u"xlsx/tdf143127.xlsx");
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1492,7 +1494,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
Reference<XPropertySet> xShapeProps(xCustomShape, UNO_QUERY);
uno::Reference<graphic::XGraphic> xGraphic;
- CPPUNIT_ASSERT(xShapeProps->getPropertyValue("Graphic") >>= xGraphic);
+ CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"Graphic"_ustr) >>= xGraphic);
Graphic aGraphic(xGraphic);
GfxLink aLink = aGraphic.GetGfxLink();
@@ -1505,17 +1507,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX)
{
loadFromFile(u"xlsx/chart_with_name_range.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 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"_ostr,
- "Sheet1!local_name_range");
+ u"Sheet1!local_name_range"_ustr);
// 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"_ostr,
- "[0]!series1");
+ u"[0]!series1"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
@@ -1529,12 +1531,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
CPPUNIT_ASSERT(xDataSeries.is());
constexpr size_t nLabels = 4;
- OUString aCellRange = "Sheet1!$A$2:$A$5";
+ OUString aCellRange = u"Sheet1!$A$2:$A$5"_ustr;
OUString aLabels[nLabels] = {
- "Test1",
- "Test2",
- "Tes3",
- "Test4",
+ u"Test1"_ustr,
+ u"Test2"_ustr,
+ u"Tes3"_ustr,
+ u"Test4"_ustr,
};
uno::Reference<beans::XPropertySet> xPropertySet;
@@ -1542,7 +1544,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
for (size_t i = 0; i < nLabels; ++i)
{
xPropertySet.set(xDataSeries->getDataPointByIndex(i), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(
chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE,
@@ -1554,17 +1556,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
// FIXME: validation error in OOXML export: Errors: 4
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[1]/c:extLst/c:ext"_ostr,
- "uri"_ostr, "{02D57815-91ED-43cb-92C2-25804820EDAC}");
+ "uri"_ostr, u"{02D57815-91ED-43cb-92C2-25804820EDAC}"_ustr);
assertXPath(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
"c15:datalabelsRange/c15:dlblRangeCache/c:ptCount"_ostr,
- "val"_ostr, "4");
+ "val"_ostr, u"4"_ustr);
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[1]/c:extLst/c:ext/"
"c15:datalabelsRange/c15:f"_ostr,
@@ -1574,11 +1576,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942)
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"_ostr, "CELLRANGE");
+ "type"_ostr, u"CELLRANGE"_ustr);
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"_ostr, "1");
+ "val"_ostr, u"1"_ustr);
// 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/"
@@ -1595,8 +1597,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
// FIXME: validation error in OOXML export: Errors: 1
skipValidation();
- save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress Office Open XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
constexpr size_t nCats = 16;
@@ -1609,7 +1611,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX)
assertXPathContent(pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/"
"c:numCache/c:formatCode"_ostr,
- "mmm\\-yy");
+ u"mmm\\-yy"_ustr);
assertXPath(
pXmlDoc,
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:cat/c:numRef/c:numCache/c:ptCount"_ostr,
@@ -1643,19 +1645,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataTableImportExport)
uno::Reference<beans::XPropertySet> xPropertySet(xDataTable, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPropertySet.is());
bool bHBorder;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("HBorder") >>= bHBorder);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"HBorder"_ustr) >>= bHBorder);
CPPUNIT_ASSERT_EQUAL(true, bHBorder);
bool bVBorder;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("VBorder") >>= bVBorder);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"VBorder"_ustr) >>= bVBorder);
CPPUNIT_ASSERT_EQUAL(true, bVBorder);
bool bOutline;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Outline") >>= bOutline);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Outline"_ustr) >>= bOutline);
CPPUNIT_ASSERT_EQUAL(false, bOutline);
bool bKeys;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Keys") >>= bKeys);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Keys"_ustr) >>= bKeys);
CPPUNIT_ASSERT_EQUAL(false, bKeys);
}
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
{
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1666,16 +1668,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataTableImportExport)
uno::Reference<beans::XPropertySet> xPropertySet(xDataTable, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPropertySet.is());
bool bHBorder;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("HBorder") >>= bHBorder);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"HBorder"_ustr) >>= bHBorder);
CPPUNIT_ASSERT_EQUAL(true, bHBorder);
bool bVBorder;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("VBorder") >>= bVBorder);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"VBorder"_ustr) >>= bVBorder);
CPPUNIT_ASSERT_EQUAL(true, bVBorder);
bool bOutline;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Outline") >>= bOutline);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Outline"_ustr) >>= bOutline);
CPPUNIT_ASSERT_EQUAL(false, bOutline);
bool bKeys;
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Keys") >>= bKeys);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Keys"_ustr) >>= bKeys);
CPPUNIT_ASSERT_EQUAL(false, bKeys);
}
}
diff --git a/chart2/qa/extras/chart2export3.cxx b/chart2/qa/extras/chart2export3.cxx
index df70cd603d89..48e1b0720718 100644
--- a/chart2/qa/extras/chart2export3.cxx
+++ b/chart2/qa/extras/chart2export3.cxx
@@ -20,7 +20,7 @@ using beans::XPropertySet;
class Chart2ExportTest3 : public ChartTest
{
public:
- Chart2ExportTest3() : ChartTest("/chart2/qa/extras/data/") {}
+ Chart2ExportTest3() : ChartTest(u"/chart2/qa/extras/data/"_ustr) {}
};
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
@@ -30,19 +30,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107)
// 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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx"_ostr, "val"_ostr, u"1"_ustr);
+ 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, u"1"_ustr);
+ 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, u"2000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
{
loadFromFile(u"xlsx/tdf114139.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:pie3DChart"_ostr, 1);
@@ -54,8 +54,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
{
loadFromFile(u"ods/tdf64224.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);
//no fill
@@ -66,31 +66,31 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX)
{
loadFromFile(u"docx/testChartTitlePropertiesColorFill.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:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"ff0000"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX)
{
loadFromFile(u"docx/testChartTitlePropertiesGradientFill.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: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:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, u"cccccc"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, u"666666"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX)
{
loadFromFile(u"docx/testChartTitlePropertiesBitmapFill.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:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, u"rId1"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
@@ -99,70 +99,70 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX)
{
// Test color gradient (two color) with gradient transparency
loadFromFile(u"docx/testColorGradientWithTransparency.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);
// 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"_ostr, "val"_ostr, "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, u"60000"_ustr);
// 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"_ostr, "val"_ostr, "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, u"90000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS)
{
// Test color gradient (two color) with simple transparency
loadFromFile(u"ods/testColorGradientWithTransparency.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);
// 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"_ostr, "val"_ostr, "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, u"60000"_ustr);
// 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"_ostr, "val"_ostr, "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, u"60000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX)
{
// Test color gradient (two color) stop of the first color
loadFromFile(u"xlsx/tdf128619.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 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]"_ostr, "pos"_ostr, "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, u"45000"_ustr);
// 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]"_ostr, "pos"_ostr, "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, u"100000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX)
{
loadFromFile(u"docx/tdf128794.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);
// 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"_ostr, 0);
// Test the linear gradient angle
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin"_ostr, "ang"_ostr, "13500000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:lin"_ostr, "ang"_ostr, u"13500000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX)
{
loadFromFile(u"docx/testBarChartDataPointPropDOCX.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:varyColors"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, u"0"_ustr);
- 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[1]/c:idx"_ostr, "val"_ostr, u"1"_ustr);
+ 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, u"f6f8fc"_ustr);
+ 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, u"c7d5ed"_ustr);
+ 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, u"70ad47"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, u"2"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"ff0000"_ustr);
+ 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, u"000000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
@@ -172,63 +172,63 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos)
// 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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[3]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[4]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[5]/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX)
{
loadFromFile(u"xlsx/autotitledel_2007.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:autoTitleDeleted"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX)
{
loadFromFile(u"xlsx/dispBlanksAs_2007.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:dispBlanksAs"_ostr, "val"_ostr, "gap");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs"_ostr, "val"_ostr, u"gap"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX)
{
loadFromFile(u"xlsx/markerColor.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:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "92d050");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"92d050"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX)
{
loadFromFile(u"xlsx/markerColor.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:roundedCorners"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX)
{
loadFromFile(u"ods/axis_number_format.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: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[1]/c:numFmt"_ostr, "formatCode"_ostr, u"0.00E+000"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[1]/c:numFmt"_ostr, "sourceLinked"_ostr, u"0"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "formatCode"_ostr, u"[$$-409]#,##0;\\-[$$-409]#,##0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx[2]/c:numFmt"_ostr, "sourceLinked"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
@@ -238,24 +238,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX)
loadFromFile(u"ods/tdf123774.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: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:numFmt"_ostr, "formatCode"_ostr, u"[$-40E]0.00%"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:numFmt"_ostr, "sourceLinked"_ostr, u"0"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "formatCode"_ostr, u"[$-40E]0.00%"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "sourceLinked"_ostr, u"0"_ustr);
}
loadFromFile(u"xlsx/tdf130986.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:idx"_ostr, "val"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "formatCode"_ostr, u"0.00E+00"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/c:numFmt"_ostr, "sourceLinked"_ostr, u"0"_ustr);
}
}
@@ -265,16 +265,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX)
Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("Label");
+ uno::Any aAny = xPropSet->getPropertyValue(u"Label"_ustr);
chart2::DataPointLabel aLabel;
CPPUNIT_ASSERT(aAny >>= aLabel);
CPPUNIT_ASSERT(aLabel.ShowNumber);
- 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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:showVal"_ostr, "val"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLblPos"_ostr, "val"_ostr, u"outEnd"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
@@ -283,65 +283,65 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor)
Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("LabelFillColor");
+ uno::Any aAny = xPropSet->getPropertyValue(u"LabelFillColor"_ustr);
sal_Int32 nLabelFillColor;
CPPUNIT_ASSERT(aAny >>= nLabelFillColor);
- 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:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "F79646");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"F79646"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX)
{
loadFromFile(u"xlsx/chart_title.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:title/c:overlay"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX)
{
loadFromFile(u"xlsx/bar_chart_simple.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:barChart/c:ser/c:invertIfNegative"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX)
{
loadFromFile(u"xlsx/bubble_chart_simple.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D"_ostr, "val"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[2]/c:bubble3D"_ostr, "val"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[3]/c:bubble3D"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX)
{
loadFromFile(u"xlsx/no_marker.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol"_ostr, "val"_ostr, u"none"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:marker/c:symbol"_ostr, "val"_ostr, u"none"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:marker"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
{
loadFromFile(u"xlsx/title_manual_layout.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, u"edge"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, u"edge"_ustr);
OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
@@ -354,19 +354,19 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX)
CPPUNIT_ASSERT(nY < 1);
CPPUNIT_ASSERT(nX != nY);
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr"_ostr, "rot"_ostr, "1200000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr"_ostr, "rot"_ostr, u"1200000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
{
loadFromFile(u"xlsx/plot_area_manual_layout.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget"_ostr, "val"_ostr, u"inner"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, u"edge"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, u"edge"_ustr);
OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
@@ -394,13 +394,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
{
loadFromFile(u"xlsx/legend_manual_layout.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: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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode"_ostr, "val"_ostr, u"edge"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode"_ostr, "val"_ostr, u"edge"_ustr);
OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x"_ostr, "val"_ostr);
double nX = aXVal.toDouble();
@@ -425,117 +425,117 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX)
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"_ostr, "sz"_ostr, "900");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, u"900"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle)
{
loadFromFile(u"ods/testChartSubTitle.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);
// test properties of subtitle
// paragraph props
- 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"_ostr, "sz"_ostr, u"1100"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, u"1"_ustr);
// run props
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, "1100");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, u"1100"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"00a933"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, u"Times New Roman"_ustr);
// text
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, "It is a Subtitle");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:t"_ostr, u"It is a Subtitle"_ustr);
// shape props
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "b2b2b2");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"b2b2b2"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle)
{
loadFromFile(u"ods/testChartMainWithSubTitle.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);
// test properties of title
// paragraph props
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "sz"_ostr, "1300");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "b"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "sz"_ostr, u"1300"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:pPr/a:defRPr"_ostr, "b"_ostr, u"0"_ustr);
// run props
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "sz"_ostr, "1300");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "i"_ostr, "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "f10d0c");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, "Arial");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "sz"_ostr, u"1300"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr"_ostr, "i"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"f10d0c"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:rPr/a:latin"_ostr, "typeface"_ostr, u"Arial"_ustr);
// text
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:t"_ostr, "It is a Maintitle");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r/a:t"_ostr, "It is a Subtitle");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r/a:t"_ostr, u"It is a Maintitle"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r/a:t"_ostr, u"It is a Subtitle"_ustr);
// shape props
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "81d41a");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"81d41a"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted)
{
loadFromFile(u"xlsx/testAutoTitleDeleted.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:autoTitleDeleted"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted"_ostr, "val"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX)
{
loadFromFile(u"xlsx/testChartTitlePropertiesColorFill.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:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"ff0000"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX)
{
loadFromFile(u"xlsx/testChartTitlePropertiesGradientFill.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: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:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr, "val"_ostr, u"cccccc"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr, "val"_ostr, u"666666"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX)
{
loadFromFile(u"xlsx/testChartTitlePropertiesBitmapFill.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:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, "rId1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip"_ostr, "embed"_ostr, u"rId1"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX)
{
loadFromFile(u"xlsx/testBarChartDataPointPropXLSX.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:barChart/c:varyColors"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, u"0"_ustr);
- 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[1]/c:idx"_ostr, "val"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"ff0000"_ustr);
+ 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, u"000000"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx"_ostr, "val"_ostr, u"2"_ustr);
+ 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, u"f6f8fc"_ustr);
+ 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, u"c7d5ed"_ustr);
+ 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, u"70ad47"_ustr);
}
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;
@@ -545,7 +545,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;
@@ -581,7 +581,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataseriesOverlapStackedChartXLSX)
xChartDoc = getChartDocFromSheet( 1, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 100, 35);
- saveAndReload("Calc Office Open XML");
+ saveAndReload(u"Calc Office Open XML"_ustr);
xChartDoc = getChartDocFromSheet( 0, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 100, 100);
@@ -593,63 +593,63 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataseriesOverlapStackedChartXLSX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX)
{
loadFromFile(u"xlsx/axis_character_properties.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: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:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, u"1000"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "i"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "u"_ostr, u"sng"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "sz"_ostr, u"900"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:txPr/a:p/a:pPr/a:defRPr"_ostr, "strike"_ostr, u"sngStrike"_ustr);
+ 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, u"ff0000"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX)
{
loadFromFile(u"xlsx/title_character_properties.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: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, "sz"_ostr, u"1300"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:pPr/a:defRPr"_ostr, "b"_ostr, u"0"_ustr);
- 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");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "sz"_ostr, u"2400"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p/a:r/a:rPr"_ostr, "b"_ostr, u"1"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX)
{
loadFromFile(u"xlsx/hidden_cells.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:plotVisOnly"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotVisOnly"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX)
{
loadFromFile(u"xlsx/tdf90876.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:barChart/c:varyColors"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161)
{
loadFromFile(u"ods/tdf96161.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:varyColors"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:varyColors"_ostr, "val"_ostr, u"0"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3)
@@ -659,24 +659,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3)
// FIXME: validation error in OOXML export: Errors: 2
skipValidation();
- saveAndReload("Office Open XML Text");
+ saveAndReload(u"Office Open XML Text"_ustr);
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference< chart::XChartDataArray > xDataArray(xChartDoc->getDataProvider(), UNO_QUERY_THROW);
Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions();
CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be 4 columns and descriptions", static_cast<sal_Int32>(4), aColumnDesc.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("If oversubscription relative to allowance increases at the same average rate B15-B17"), aColumnDesc[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Known requirements"), aColumnDesc[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Allowance"), aColumnDesc[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("If oversubscription relative to allowance holds steady at average oversubscription level B15-B17"), aColumnDesc[3]);
+ CPPUNIT_ASSERT_EQUAL(u"If oversubscription relative to allowance increases at the same average rate B15-B17"_ustr, aColumnDesc[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Known requirements"_ustr, aColumnDesc[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Allowance"_ustr, aColumnDesc[2]);
+ CPPUNIT_ASSERT_EQUAL(u"If oversubscription relative to allowance holds steady at average oversubscription level B15-B17"_ustr, aColumnDesc[3]);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, tdf137691)
{
// given a doc where the banana negative data formats as ($123) and the pineapple data as $(123)
loadFromFile(u"pptx/tdf137691_dataTable.pptx");
- saveAndReload("Impress MS PowerPoint 2007 XML");
+ saveAndReload(u"Impress MS PowerPoint 2007 XML"_ustr);
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -696,8 +696,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, tdf137691)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
{
loadFromFile(u"ods/multiple_axis.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:scatterChart"_ostr, 2);
@@ -712,25 +712,25 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX)
{
loadFromFile(u"ods/secondary_axis.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"_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"_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");
+ 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, u"b"_ustr);
+ 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, u"c"_ustr);
// 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"_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");
+ 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, u"a"_ustr);
}
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX)
{
loadFromFile(u"xlsx/testSecondaryAxis.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);
// Collect barchart axID on primary Axis
OUString XValueIdOf1Barchart = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart[1]/c:axId[1]"_ostr, "val"_ostr);
@@ -761,7 +761,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
xAxis->setScaleData(aScaleData);
// Check the X axis position after export.
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc2.is());
Reference<chart2::XAxis> xAxis2 = getAxisFromDoc(xChartDoc2, 0, 0, 0);
@@ -773,58 +773,58 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142)
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFormattedChartTitles)
{
loadFromFile(u"xlsx/tdf39052.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);
// Check run level properties [1] - first paragraph
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "b"_ostr, "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "ff0000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, "Aptos Narrow");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:t"_ostr, "This");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "b"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"ff0000"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, u"Aptos Narrow"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[1]/a:t"_ostr, u"This"_ustr);
// Check run level properties [2]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "595959");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:t"_ostr, " is");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"595959"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[2]/a:t"_ostr, u" is"_ustr);
// Check run level properties [3]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "baseline"_ostr, "30000");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:t"_ostr, "3");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:rPr"_ostr, "baseline"_ostr, u"30000"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[3]/a:t"_ostr, u"3"_ustr);
// Check run level properties [4]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:t"_ostr, " a ");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[4]/a:t"_ostr, u" a "_ustr);
// Check run level properties [5]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "i"_ostr, "1");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "sz"_ostr, "2000");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "u"_ostr, "sng");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "4ea72e");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "i"_ostr, u"1"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "sz"_ostr, u"2000"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr"_ostr, "u"_ostr, u"sng"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"4ea72e"_ustr);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:uFillTx"_ostr, 1);
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:t"_ostr, "custom");
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:t"_ostr, u"custom"_ustr);
// Check run level properties [6]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:t"_ostr, " erte1");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[6]/a:t"_ostr, u" erte1"_ustr);
// Check run level properties [1] - second paragraph
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "sz"_ostr, "1400");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "595959");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, "Aptos Narrow");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:t"_ostr, "2dfgd ch");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr"_ostr, "sz"_ostr, u"1400"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, u"595959"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:rPr/a:latin"_ostr, "typeface"_ostr, u"Aptos Narrow"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[1]/a:t"_ostr, u"2dfgd ch"_ustr);
// Check run level properties [2]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:rPr"_ostr, "b"_ostr, "1");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:t"_ostr, "ar");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:rPr"_ostr, "b"_ostr, u"1"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[2]/a:t"_ostr, u"ar"_ustr);
// Check run level properties [3]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:rPr"_ostr, "b"_ostr, "0");;
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:t"_ostr, "t ");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);;
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[3]/a:t"_ostr, u"t "_ustr);
// Check run level properties [4]
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "b"_ostr, "0");
- assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "strike"_ostr, "sngStrike");
- assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:t"_ostr, "title");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "b"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:rPr"_ostr, "strike"_ostr, u"sngStrike"_ustr);
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[2]/a:r[4]/a:t"_ostr, u"title"_ustr);
}
namespace {
@@ -832,90 +832,90 @@ namespace {
void checkCharacterProps(Reference<beans::XPropertySet> const & xTitleProp)
{
Sequence< uno::Reference< chart2::XFormattedString > > xFormattedSubTitle;
- CPPUNIT_ASSERT(xTitleProp->getPropertyValue("FormattedStrings") >>= xFormattedSubTitle);
+ CPPUNIT_ASSERT(xTitleProp->getPropertyValue(u"FormattedStrings"_ustr) >>= xFormattedSubTitle);
CPPUNIT_ASSERT_EQUAL(sal_Int32(10), xFormattedSubTitle.getLength());
// check texts
- std::vector<OUString> aValues = { "This", " is", "3", " a ", "custom", " erte1\n", "2dfgd ch", "ar", "t ", "title" };
+ std::vector<OUString> aValues = { u"This"_ustr, u" is"_ustr, u"3"_ustr, u" a "_ustr, u"custom"_ustr, u" erte1\n"_ustr, u"2dfgd ch"_ustr, u"ar"_ustr, u"t "_ustr, u"title"_ustr };
for (sal_Int32 i = 0; i < xFormattedSubTitle.getLength(); i++)
{
const OUString aText = xFormattedSubTitle[i]->getString();
CPPUNIT_ASSERT_EQUAL(aValues[i], aText);
Reference< beans::XPropertySet > xRunPropSet(xFormattedSubTitle[i], uno::UNO_QUERY);
// common props
- uno::Any aAny = xRunPropSet->getPropertyValue("CharFontName");
- CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Aptos Narrow")), aAny);
+ uno::Any aAny = xRunPropSet->getPropertyValue(u"CharFontName"_ustr);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(u"Aptos Narrow"_ustr), aAny);
// unique props
if (aText == aValues[0])
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::BOLD), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0xff0000)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharEscapement");
+ aAny = xRunPropSet->getPropertyValue(u"CharEscapement"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(short(0)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharEscapementHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharEscapementHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(short(100)), aAny);
}
else if (aText == aValues[1] || aText == aValues[3] || aText == aValues[5] ||
aText == aValues[6] || aText == aValues[8])
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
}
else if (aText == aValues[2])
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharEscapement");
+ aAny = xRunPropSet->getPropertyValue(u"CharEscapement"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(short(30)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharEscapementHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharEscapementHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(short(58)), aAny);
}
else if (aText == aValues[4])
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(20.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x4ea72e)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharPosture");
+ aAny = xRunPropSet->getPropertyValue(u"CharPosture"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_ITALIC), aAny);
- aAny = xRunPropSet->getPropertyValue("CharUnderline");
+ aAny = xRunPropSet->getPropertyValue(u"CharUnderline"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontUnderline::SINGLE), aAny);
}
else if (aText == aValues[7])
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::BOLD), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharPosture");
+ aAny = xRunPropSet->getPropertyValue(u"CharPosture"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_NONE), aAny);
}
else // aText == aValues[9]
{
- aAny = xRunPropSet->getPropertyValue("CharWeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharWeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontWeight::NORMAL), aAny);
- aAny = xRunPropSet->getPropertyValue("CharHeight");
+ aAny = xRunPropSet->getPropertyValue(u"CharHeight"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(14.0f), aAny);
- aAny = xRunPropSet->getPropertyValue("CharColor");
+ aAny = xRunPropSet->getPropertyValue(u"CharColor"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(Color(0x595959)), aAny);
- aAny = xRunPropSet->getPropertyValue("CharPosture");
+ aAny = xRunPropSet->getPropertyValue(u"CharPosture"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontSlant_ITALIC), aAny);
- aAny = xRunPropSet->getPropertyValue("CharOverline");
+ aAny = xRunPropSet->getPropertyValue(u"CharOverline"_ustr);
CPPUNIT_ASSERT_EQUAL(uno::Any(awt::FontUnderline::NONE), aAny);
}
}
@@ -928,7 +928,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testODSFormattedChartTitles)
// The document contains a line chart with "Between tick marks" X axis position.
loadFromFile(u"ods/tdf39052.ods");
// Check formatted strings after export.
- saveAndReload("calc8");
+ saveAndReload(u"calc8"_ustr);
Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChart2Doc.is());
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index c554fc950c61..7c07fd32bf4a 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -25,7 +25,7 @@ class Chart2GeometryTest : public ChartTest
{
public:
Chart2GeometryTest()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{
}
// Mostly tests for line and fill properties
@@ -74,8 +74,8 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
{
// It tests chart area, data series line and regression-curve line.
loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx");
- save("calc8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"calc8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr);
@@ -103,8 +103,8 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2()
{
// It tests legend, data series sector and title.
loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx");
- save("calc8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"calc8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
static constexpr OString sStyleStart("/office:document-content/office:automatic-styles"_ostr);
@@ -134,34 +134,34 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3()
{
// It tests chart area, data series line and regression-curve line.
loadFromFile(u"xlsx/tdf135184RoundLineCap.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);
static constexpr OString sDash("/c:spPr/a:ln/a:prstDash"_ostr);
// chart area
- assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val"_ostr, "dashDot");
+ assertXPath(pXmlDoc, "/c:chartSpace" + sDash, "val"_ostr, u"dashDot"_ustr);
// data series line
static constexpr OString sStart("/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser"_ostr);
- assertXPath(pXmlDoc, sStart + sDash, "val"_ostr, "dash");
+ assertXPath(pXmlDoc, sStart + sDash, "val"_ostr, u"dash"_ustr);
// regression-curve (trendline)
- assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val"_ostr, "sysDot");
+ assertXPath(pXmlDoc, sStart + "/c:trendline" + sDash, "val"_ostr, u"sysDot"_ustr);
}
void Chart2GeometryTest::testTdf135184RoundLineCap4()
{
// It tests legend, data series sector and title.
loadFromFile(u"xlsx/tdf135184RoundLineCap2.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);
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"_ostr, "sysDot");
+ assertXPath(pXmlDoc, sChartStart + "/c:legend" + sDash, "val"_ostr, u"sysDot"_ustr);
const OString sSeries(sChartStart + "/c:plotArea/c:pieChart/c:ser/c:dPt[3]");
- assertXPath(pXmlDoc, sSeries + sDash, "val"_ostr, "dash");
- assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val"_ostr, "dashDot");
+ assertXPath(pXmlDoc, sSeries + sDash, "val"_ostr, u"dash"_ustr);
+ assertXPath(pXmlDoc, sChartStart + "/c:title" + sDash, "val"_ostr, u"dashDot"_ustr);
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
@@ -177,14 +177,16 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
// ODF im/export for MCGR is integrated
// Make sure the chart area has a transparency in gradient stops in saved pptx file.
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
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"_ostr, "30000");
- assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, "30000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr,
+ u"30000"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr,
+ u"30000"_ustr);
}
void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
@@ -203,8 +205,8 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
loadFromFile(u"pptx/tdf128345_ChartArea_CG_TS.pptx");
// Find transparency gradient name
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName = getXPathContent(
pXmlDoc,
@@ -218,8 +220,8 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify the content of the opacity definition
- save("impress8");
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -238,14 +240,14 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
loadFromFile(u"odp/tdf128345_ChartWall_CS_TG.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
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"_ostr, "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val"_ostr, u"0"_ustr);
// no element for 0% transparent
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", 0);
}
@@ -257,8 +259,8 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
loadFromFile(u"pptx/tdf128345_ChartWall_CS_TG.pptx");
// Find transparency gradient name
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
@@ -272,8 +274,8 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify content of the opacity definition
- save("impress8");
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -290,8 +292,8 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
loadFromFile(u"odp/tdf128345_Legend_CS_TG_axial.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
- save("Impress MS PowerPoint 2007 XML");
- xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
+ save(u"Impress MS PowerPoint 2007 XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill"_ostr);
@@ -301,15 +303,15 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
// 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"_ostr, "0");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos"_ostr, u"0"_ustr);
// MCGR: middle entry, 100% transparence, pos 0.5
- 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");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", "val"_ostr, u"0"_ustr);
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos"_ostr, u"50000"_ustr);
// 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"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]", "pos"_ostr, u"100000"_ustr);
}
void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
@@ -319,8 +321,8 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
loadFromFile(u"pptx/tdf128345_Legend_CS_TG_axial.pptx");
// Find transparency gradient name
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
const OUString sOUChartStyleName
= getXPathContent(pXmlDoc, "//office:document-content/office:body/office:chart/chart:chart/"
@@ -334,8 +336,8 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
= getXPathContent(pXmlDoc, sStylePath + "/style:graphic-properties/@draw:opacity-name");
// Verify content of the opacity definition
- save("impress8");
- xmlDocUniquePtr pXmlDoc2 = parseExport("Object 1/styles.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc2 = parseExport(u"Object 1/styles.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc2);
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
@@ -357,29 +359,29 @@ void Chart2GeometryTest::testTdf135366LabelOnSeries()
Reference<beans::XPropertySet> xPropSet(xDataSeries, UNO_QUERY_THROW);
uno::Any aAny;
- aAny = xPropSet->getPropertyValue("LabelBorderStyle");
+ aAny = xPropSet->getPropertyValue(u"LabelBorderStyle"_ustr);
drawing::LineStyle eLineStyle;
CPPUNIT_ASSERT_MESSAGE("No LabelBorderStyle set.", aAny >>= eLineStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("solid line expected", drawing::LineStyle_SOLID, eLineStyle);
sal_Int32 nBorderWidth;
sal_Int32 nExpectedWidth = 95;
- xPropSet->getPropertyValue("LabelBorderWidth") >>= nBorderWidth;
+ xPropSet->getPropertyValue(u"LabelBorderWidth"_ustr) >>= nBorderWidth;
CPPUNIT_ASSERT_EQUAL_MESSAGE("LabelBorderWidth", nExpectedWidth, nBorderWidth);
sal_Int32 nLineColor;
sal_Int32 nExpectedLineColor = 255;
- xPropSet->getPropertyValue("LabelBorderColor") >>= nLineColor;
+ xPropSet->getPropertyValue(u"LabelBorderColor"_ustr) >>= nLineColor;
CPPUNIT_ASSERT_EQUAL_MESSAGE("line color blue, 255=#0000FF", nExpectedLineColor, nLineColor);
- aAny = xPropSet->getPropertyValue("LabelFillStyle");
+ aAny = xPropSet->getPropertyValue(u"LabelFillStyle"_ustr);
drawing::FillStyle eFillStyle;
CPPUNIT_ASSERT_MESSAGE("No LabelFillStyle set", aAny >>= eFillStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("solid fill expected", drawing::FillStyle_SOLID, eFillStyle);
sal_Int32 nFillColor;
sal_Int32 nExpectedFillColor = 65280;
- xPropSet->getPropertyValue("LabelFillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"LabelFillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL_MESSAGE("fill color green, 65280=#00FF00", nExpectedFillColor, nFillColor);
}
@@ -396,35 +398,35 @@ void Chart2GeometryTest::testTdf135366LabelOnPoint()
uno::UNO_SET_THROW);
uno::Any aAny;
- aAny = xPropSet->getPropertyValue("LabelBorderStyle");
+ aAny = xPropSet->getPropertyValue(u"LabelBorderStyle"_ustr);
drawing::LineStyle eLineStyle;
CPPUNIT_ASSERT_MESSAGE("No LabelBorderStyle set.", aAny >>= eLineStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("solid line expected", drawing::LineStyle_SOLID, eLineStyle);
sal_Int32 nBorderWidth;
sal_Int32 nExpectedWidth = 381;
- xPropSet->getPropertyValue("LabelBorderWidth") >>= nBorderWidth;
+ xPropSet->getPropertyValue(u"LabelBorderWidth"_ustr) >>= nBorderWidth;
CPPUNIT_ASSERT_EQUAL_MESSAGE("LabelBorderWidth", nExpectedWidth, nBorderWidth);
sal_Int32 nLineTransparency;
sal_Int32 nExpectedTransparency = 30;
- xPropSet->getPropertyValue("LabelBorderTransparency") >>= nLineTransparency;
+ xPropSet->getPropertyValue(u"LabelBorderTransparency"_ustr) >>= nLineTransparency;
CPPUNIT_ASSERT_EQUAL_MESSAGE("line transparency", nExpectedTransparency, nLineTransparency);
sal_Int32 nLineColor;
sal_Int32 nExpectedLineColor = 10206041;
- xPropSet->getPropertyValue("LabelBorderColor") >>= nLineColor;
+ xPropSet->getPropertyValue(u"LabelBorderColor"_ustr) >>= nLineColor;
CPPUNIT_ASSERT_EQUAL_MESSAGE("line color greenish, 10206041=#9BBB59", nExpectedLineColor,
nLineColor);
- aAny = xPropSet->getPropertyValue("LabelFillStyle");
+ aAny = xPropSet->getPropertyValue(u"LabelFillStyle"_ustr);
drawing::FillStyle eFillStyle;
CPPUNIT_ASSERT_MESSAGE("No LabelFillStyle set", aAny >>= eFillStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("solid fill expected", drawing::FillStyle_SOLID, eFillStyle);
sal_Int32 nFillColor;
sal_Int32 nExpectedFillColor = 14277081;
- xPropSet->getPropertyValue("LabelFillColor") >>= nFillColor;
+ xPropSet->getPropertyValue(u"LabelFillColor"_ustr) >>= nFillColor;
CPPUNIT_ASSERT_EQUAL_MESSAGE("fill color gray, 14277081=#d9d9d9", nExpectedFillColor,
nFillColor);
}
@@ -439,8 +441,8 @@ void Chart2GeometryTest::testTdf135366LabelExport()
// FIXME: Error: unexpected attribute "loext:label-stroke-color"
skipValidation();
- save("writer8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"writer8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// Find label style
@@ -467,8 +469,8 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion());
SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
loadFromFile(u"pptx/tdf135366_CustomLabelText.pptx");
- save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml");
+ save(u"impress8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"Object 1/content.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// Find custom text. As of version 7.0 it is in a <text:span> element.
@@ -479,7 +481,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
// Verify text content
const OUString sOUTextContent = getXPathContent(pXmlDoc, sCustomTextPath);
- CPPUNIT_ASSERT_EQUAL(OUString("Custom"), sOUTextContent);
+ CPPUNIT_ASSERT_EQUAL(u"Custom"_ustr, sOUTextContent);
SetODFDefaultVersion(nCurrentODFVersion);
}
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 02c00daed941..2f8777f66a29 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -42,7 +42,7 @@ namespace
class Chart2ImportTest : public ChartTest
{
public:
- Chart2ImportTest() : ChartTest("/chart2/qa/extras/data/") {}
+ Chart2ImportTest() : ChartTest(u"/chart2/qa/extras/data/"_ustr) {}
protected:
void testTransparentBackground(std::u16string_view filename);
@@ -50,7 +50,7 @@ protected:
OUString getShapeDump(css::uno::Reference<css::chart::XChartDocument> const& doc)
{
- return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)->dump("shapes");
+ return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)->dump(u"shapes"_ustr);
}
// error bar import
@@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo60083)
{
sal_Int32 nErrorBarStyle;
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("ErrorBarStyle")
+ xErrorBarYProps->getPropertyValue(u"ErrorBarStyle"_ustr)
>>= nErrorBarStyle);
CPPUNIT_ASSERT_EQUAL(
chart::ErrorBarStyle::RELATIVE,
@@ -81,20 +81,20 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo60083)
double nVal = 0.0;
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("PositiveError") >>= nVal);
+ xErrorBarYProps->getPropertyValue(u"PositiveError"_ustr) >>= nVal);
CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8);
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("NegativeError") >>= nVal);
+ xErrorBarYProps->getPropertyValue(u"NegativeError"_ustr) >>= nVal);
CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8);
bool bVal;
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("ShowPositiveError") >>= bVal);
+ xErrorBarYProps->getPropertyValue(u"ShowPositiveError"_ustr) >>= bVal);
CPPUNIT_ASSERT_EQUAL(true, bVal);
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("ShowNegativeError") >>= bVal);
+ xErrorBarYProps->getPropertyValue(u"ShowNegativeError"_ustr) >>= bVal);
CPPUNIT_ASSERT_EQUAL(true, bVal);
}
@@ -122,15 +122,15 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarRange)
sal_Int32 nErrorBarStyle;
CPPUNIT_ASSERT(
- xErrorBarYProps->getPropertyValue("ErrorBarStyle")
+ xErrorBarYProps->getPropertyValue(u"ErrorBarStyle"_ustr)
>>= nErrorBarStyle);
CPPUNIT_ASSERT_EQUAL(
chart::ErrorBarStyle::FROM_DATA,
nErrorBarStyle);
OUString aRangePos;
- CPPUNIT_ASSERT(xErrorBarYProps->getPropertyValue("ErrorBarRangePositive") >>= aRangePos);
- CPPUNIT_ASSERT_EQUAL(OUString("$Sheet1.$C$2:$C$4"), aRangePos);
+ CPPUNIT_ASSERT(xErrorBarYProps->getPropertyValue(u"ErrorBarRangePositive"_ustr) >>= aRangePos);
+ CPPUNIT_ASSERT_EQUAL(u"$Sheet1.$C$2:$C$4"_ustr, aRangePos);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarFormatting)
@@ -150,7 +150,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarFormatting)
CPPUNIT_ASSERT(xErrorBarYProps.is());
util::Color aColor(0);
- xErrorBarYProps->getPropertyValue("LineColor") >>= aColor;
+ xErrorBarYProps->getPropertyValue(u"LineColor"_ustr) >>= aColor;
sal_uInt32 nColorValue = aColor;
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xff3333), nColorValue);
}
@@ -189,7 +189,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSteppedLines)
CPPUNIT_ASSERT(xPropSet.is());
chart2::CurveStyle eCurveStyle;
- xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle;
+ xPropSet->getPropertyValue(u"CurveStyle"_ustr) >>= eCurveStyle;
CPPUNIT_ASSERT_EQUAL(eCurveStyle, curveStyle[nSheet]);
}
}
@@ -207,9 +207,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODSChartSeries)
loadFromFile(u"ods/chart.ods");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions( xChart1Doc);
- CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col 33"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Col2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 33"_ustr, seriesList[2]);
}
@@ -218,9 +218,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSXChartSeries)
loadFromFile(u"xlsx/chart.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
- CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col 33"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Col2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 33"_ustr, seriesList[2]);
}
@@ -229,9 +229,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSChartSeries)
loadFromFile(u"xls/chart.xls");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
- CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col 2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Col 3"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Col 3"_ustr, seriesList[2]);
}
@@ -239,9 +239,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODTChartSeries)
{
loadFromFile(u"odt/chart.odt");
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, seriesList[2]);
}
@@ -249,9 +249,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCChartSeries)
{
loadFromFile(u"doc/chart.doc");
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, seriesList[2]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartSeries)
@@ -265,9 +265,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartSeries)
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>());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartEmptySeries)
@@ -281,9 +281,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartEmptySeries)
std::vector<uno::Sequence<uno::Any> > aLabels = getDataSeriesLabelsFromChartType(xCT);
CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size());
- CPPUNIT_ASSERT_EQUAL(OUString("1. dataseries"), aLabels[0][0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("2. dataseries"), aLabels[1][0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), aLabels[2][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"1. dataseries"_ustr, aLabels[0][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"2. dataseries"_ustr, aLabels[1][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, aLabels[2][0].get<OUString>());
//test chart series sparse data for docx
std::vector<std::vector<double> > aValues = getDataSeriesYValuesFromChartType(xCT);
@@ -353,9 +353,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTChartSeries)
loadFromFile(u"ppt/chart.ppt");
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, seriesList[2]);
}
@@ -371,9 +371,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartSeries)
std::vector<uno::Sequence<uno::Any> > aLabels = getDataSeriesLabelsFromChartType(xCT);
CPPUNIT_ASSERT_EQUAL(size_t(3), aLabels.size());
- CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), aLabels[0][0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), aLabels[1][0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), aLabels[2][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"Column 1"_ustr, aLabels[0][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"Column 2"_ustr, aLabels[1][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, aLabels[2][0].get<OUString>());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXSparseChartSeries)
@@ -412,7 +412,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries)
// "Automatic" chart background fill in pptx should be loaded as no fill.
Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
CPPUNIT_ASSERT(xPropSet.is());
- drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get<drawing::FillStyle>();
+ drawing::FillStyle eStyle = xPropSet->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>();
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in pptx should be loaded as no fill (transparent).",
drawing::FillStyle_NONE, eStyle);
@@ -422,7 +422,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries)
// There should be only one data series present.
std::vector<uno::Sequence<uno::Any> > aLabels = getDataSeriesLabelsFromChartType(xCT);
CPPUNIT_ASSERT_EQUAL(size_t(1), aLabels.size());
- CPPUNIT_ASSERT_EQUAL(OUString("Series 3"), aLabels[0][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"Series 3"_ustr, aLabels[0][0].get<OUString>());
// Test the internal data.
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
@@ -436,10 +436,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries)
// Get the category labels.
Sequence<Sequence<OUString> > aCategories = xDescAccess->getComplexRowDescriptions();
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Category 1"), aCategories[0][0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Category 2"), aCategories[1][0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Category 3"), aCategories[2][0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Category 4"), aCategories[3][0]);
+ CPPUNIT_ASSERT_EQUAL(u"Category 1"_ustr, aCategories[0][0]);
+ CPPUNIT_ASSERT_EQUAL(u"Category 2"_ustr, aCategories[1][0]);
+ CPPUNIT_ASSERT_EQUAL(u"Category 3"_ustr, aCategories[2][0]);
+ CPPUNIT_ASSERT_EQUAL(u"Category 4"_ustr, aCategories[3][0]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats)
@@ -455,35 +455,35 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats)
uno::Reference<beans::XPropertySet> xPropertySet;
chart2::DataPointLabel aLabel;
sal_Int32 nNumberFormat;
- const sal_Int32 nPercentFormatSimple = getNumberFormat(xChartDoc, "0%");
- const sal_Int32 nPercentFormatDecimal = getNumberFormat(xChartDoc, "0.00%");
+ const sal_Int32 nPercentFormatSimple = getNumberFormat(xChartDoc, u"0%"_ustr);
+ const sal_Int32 nPercentFormatDecimal = getNumberFormat(xChartDoc, u"0.00%"_ustr);
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
- xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nPercentFormatSimple, nNumberFormat);
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
- xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimal, nNumberFormat);
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
- xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nPercentFormatSimple, nNumberFormat);
xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
- xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimal, nNumberFormat);
// 2nd chart
@@ -501,7 +501,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats)
// FIXME: This should be in fact "0.00%".
// see TODO in oox/source/drawingml/chart/modelbase.cxx
- const sal_Int32 nPercentFormatDecimalShort = getNumberFormat(xChartDoc, "0.0%");
+ const sal_Int32 nPercentFormatDecimalShort = getNumberFormat(xChartDoc, u"0.0%"_ustr);
nNumberFormat = getNumberFormatFromAxis(xYAxis);
CPPUNIT_ASSERT_EQUAL(nPercentFormatDecimalShort, nNumberFormat);
sal_Int16 nType = getNumberFormatType(xChartDoc, nNumberFormat);
@@ -516,7 +516,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartLabelsNumFormat)
// test data point labels format
Reference<beans::XPropertySet> xDataPointPropSet(xChartDoc->getDiagram()->getDataPointProperties(0, 0), uno::UNO_SET_THROW);
chart2::DataPointLabel aLabel;
- xDataPointPropSet->getPropertyValue("Label") >>= aLabel;
+ xDataPointPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
}
@@ -530,7 +530,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis)
Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
OUString aTitle = getTitleString(xTitled);
- CPPUNIT_ASSERT_EQUAL(OUString("Stacked"), aTitle);
+ CPPUNIT_ASSERT_EQUAL(u"Stacked"_ustr, aTitle);
// Get the Y-axis.
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
@@ -547,7 +547,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis)
xTitled.set(xChartDoc, uno::UNO_QUERY_THROW);
aTitle = getTitleString(xTitled);
- CPPUNIT_ASSERT_EQUAL(OUString("100% Stacked"), aTitle);
+ CPPUNIT_ASSERT_EQUAL(u"100% Stacked"_ustr, aTitle);
// Get the Y-axis.
xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
@@ -566,7 +566,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis)
xTitled.set(xChartDoc, uno::UNO_QUERY_THROW);
aTitle = getTitleString(xTitled);
- CPPUNIT_ASSERT_EQUAL(OUString("Stacked column mixed with 100% stacked area"), aTitle);
+ CPPUNIT_ASSERT_EQUAL(u"Stacked column mixed with 100% stacked area"_ustr, aTitle);
// Get the Y-axis.
xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
@@ -584,9 +584,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODPChartSeries)
//test chart series names for odp
loadFromFile(u"odp/chart.odp");
uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 1"_ustr, seriesList[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 2"_ustr, seriesList[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Column 3"_ustr, seriesList[2]);
}
@@ -618,10 +618,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755)
CPPUNIT_ASSERT_EQUAL(nNumCategories, aDateSeq.getLength());
const OUString aExpectedDateCategories[nNumCategories] = {
- "Oct-12", "Nov-12", "Dec-12", "Jan-13",
- "Feb-13", "Mar-13", "Apr-13", "May-13",
- "Jun-13", "Jul-13", "Aug-13", "Sep-13",
- "Oct-13", "Nov-13", "Dec-13", "Jan-14",
+ u"Oct-12"_ustr, u"Nov-12"_ustr, u"Dec-12"_ustr, u"Jan-13"_ustr,
+ u"Feb-13"_ustr, u"Mar-13"_ustr, u"Apr-13"_ustr, u"May-13"_ustr,
+ u"Jun-13"_ustr, u"Jul-13"_ustr, u"Aug-13"_ustr, u"Sep-13"_ustr,
+ u"Oct-13"_ustr, u"Nov-13"_ustr, u"Dec-13"_ustr, u"Jan-14"_ustr,
};
for (size_t nIdx = 0; nIdx < nNumCategories; ++nIdx)
@@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755)
// MCGR: Use the whole completely imported transparency gradient to check for correctness
uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(4), uno::UNO_QUERY_THROW);
awt::Gradient2 aTransparence;
- xShapeProps->getPropertyValue("FillTransparenceGradient") >>= aTransparence;
+ xShapeProps->getPropertyValue(u"FillTransparenceGradient"_ustr) >>= aTransparence;
const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparence.ColorStops);
CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
@@ -656,7 +656,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383)
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
OUString sGradientName;
- xPropertySet->getPropertyValue("GradientName") >>= sGradientName;
+ xPropertySet->getPropertyValue(u"GradientName"_ustr) >>= sGradientName;
CPPUNIT_ASSERT(!sGradientName.isEmpty());
}
@@ -670,13 +670,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue)
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
OUString sTranspGradientName;
- xPropertySet->getPropertyValue("FillTransparenceGradientName") >>= sTranspGradientName;
+ xPropertySet->getPropertyValue(u"FillTransparenceGradientName"_ustr) >>= sTranspGradientName;
CPPUNIT_ASSERT(!sTranspGradientName.isEmpty());
awt::Gradient2 aTransparenceGradient;
uno::Reference< lang::XMultiServiceFactory > xFact(xChartDoc, uno::UNO_QUERY);
CPPUNIT_ASSERT(xFact.is());
- uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY);
+ uno::Reference< container::XNameAccess > xTransparenceGradient(xFact->createInstance(u"com.sun.star.drawing.TransparencyGradientTable"_ustr), uno::UNO_QUERY);
uno::Any rTransparenceValue = xTransparenceGradient->getByName(sTranspGradientName);
CPPUNIT_ASSERT(rTransparenceValue >>= aTransparenceGradient);
const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparenceGradient.ColorStops);
@@ -709,7 +709,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDelayedCellImport)
getDataSequenceFromDocByRole(xChartDoc, u"values-x");
OUString aRange = xDataSeq->getSourceRangeRepresentation();
- CPPUNIT_ASSERT_EQUAL(OUString("$Sheet2.$C$5:$C$9"), aRange);
+ CPPUNIT_ASSERT_EQUAL(u"$Sheet2.$C$5:$C$9"_ustr, aRange);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFlatODSStackedColumnChart)
@@ -755,8 +755,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf127811)
// Without the fix in place, this test would have failed with
// - Expected: 1. first
// - Actual : 2. second
- CPPUNIT_ASSERT_EQUAL(OUString("1. first"), aLabels[0][0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("2. second"), aLabels[1][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"1. first"_ustr, aLabels[0][0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"2. second"_ustr, aLabels[1][0].get<OUString>());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf86624)
@@ -787,14 +787,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf105517)
CPPUNIT_ASSERT(xPropSet1.is());
tools::Long lineColor;
- xPropSet1->getPropertyValue("Color") >>= lineColor;
+ xPropSet1->getPropertyValue(u"Color"_ustr) >>= lineColor;
// incorrect line color was 0x4a7ebb due to not handling themeOverride
CPPUNIT_ASSERT_EQUAL(tools::Long(0xeaa700), lineColor);
Reference<beans::XPropertySet> xPropSet2(xDSContainer->getDataSeries()[1], uno::UNO_QUERY);
CPPUNIT_ASSERT(xPropSet2.is());
- xPropSet2->getPropertyValue("Color") >>= lineColor;
+ xPropSet2->getPropertyValue(u"Color"_ustr) >>= lineColor;
// incorrect line color was 0x98b855
CPPUNIT_ASSERT_EQUAL(tools::Long(0x1e69a8), lineColor);
}
@@ -811,7 +811,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf106217)
CPPUNIT_ASSERT(xCircle.is());
uno::Reference<container::XNamed> xNamedShape(xCircle, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Oval 1"), xNamedShape->getName());
+ CPPUNIT_ASSERT_EQUAL(u"Oval 1"_ustr, xNamedShape->getName());
awt::Point aPosition = xCircle->getPosition();
CPPUNIT_ASSERT_EQUAL(sal_Int32(6870), aPosition.X);
@@ -834,7 +834,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf108021)
uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
CPPUNIT_ASSERT(xAxisXSupp.is());
xAxisProp = xAxisXSupp->getXAxis();
- xAxisProp->getPropertyValue("TextBreak") >>= bTextBreak;
+ xAxisProp->getPropertyValue(u"TextBreak"_ustr) >>= bTextBreak;
// Expected value of 'TextBreak' is true
CPPUNIT_ASSERT(bTextBreak);
}
@@ -862,21 +862,21 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf124817)
xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropSet_0(xDataSeries, uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT((xPropSet_0->getPropertyValue("Symbol") >>= aSymblProp));
+ CPPUNIT_ASSERT((xPropSet_0->getPropertyValue(u"Symbol"_ustr) >>= aSymblProp));
CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style);
// Check the symbol of data series 2 (marker style square)
xDataSeries = getDataSeriesFromDoc(xChartDoc, 1);
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropSet_1(xDataSeries, uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT((xPropSet_1->getPropertyValue("Symbol") >>= aSymblProp));
+ CPPUNIT_ASSERT((xPropSet_1->getPropertyValue(u"Symbol"_ustr) >>= aSymblProp));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xED7D31), aSymblProp.FillColor);
// Check the symbol of data series 3 (marker style diagonal cross)
xDataSeries = getDataSeriesFromDoc(xChartDoc, 2);
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropSet_2(xDataSeries, uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp));
+ CPPUNIT_ASSERT((xPropSet_2->getPropertyValue(u"Symbol"_ustr) >>= aSymblProp));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xFF0000), aSymblProp.BorderColor);
}
@@ -891,7 +891,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf126033)
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Symbol") >>= aSymblProp);
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u"Symbol"_ustr) >>= aSymblProp);
CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Width);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Height);
@@ -910,7 +910,7 @@ void Chart2ImportTest::testTransparentBackground(std::u16string_view filename)
CPPUNIT_ASSERT_MESSAGE("failed to get Area", xPropSet.is());
css::drawing::FillStyle aStyle;
- xPropSet -> getPropertyValue("FillStyle") >>= aStyle;
+ xPropSet -> getPropertyValue(u"FillStyle"_ustr) >>= aStyle;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Background needs to be with solid fill style", css::drawing::FillStyle_SOLID, aStyle);
}
@@ -934,8 +934,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoBackgroundXLSX)
// "Automatic" chart background fill in xlsx 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 xlsx should be loaded as solid fill.",
drawing::FillStyle_SOLID, eStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid white.",
@@ -951,9 +951,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropXLSX)
// Test "Automatic" chartarea border style/color/width.
Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
CPPUNIT_ASSERT(xPropSet.is());
- drawing::LineStyle eStyle = xPropSet->getPropertyValue("LineStyle").get<drawing::LineStyle>();
- sal_Int32 nColor = xPropSet->getPropertyValue("LineColor").get<sal_Int32>();
- sal_Int32 nWidth = xPropSet->getPropertyValue("LineWidth").get<sal_Int32>();
+ drawing::LineStyle eStyle = xPropSet->getPropertyValue(u"LineStyle"_ustr).get<drawing::LineStyle>();
+ sal_Int32 nColor = xPropSet->getPropertyValue(u"LineColor"_ustr).get<sal_Int32>();
+ sal_Int32 nWidth = xPropSet->getPropertyValue(u"LineWidth"_ustr).get<sal_Int32>();
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border should be loaded as solid style.",
drawing::LineStyle_SOLID, eStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border color should be loaded as light gray.",
@@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropPPTX)
// Test "Automatic" chartarea border style/color/width.
Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
CPPUNIT_ASSERT(xPropSet.is());
- drawing::LineStyle eStyle = xPropSet->getPropertyValue("LineStyle").get<drawing::LineStyle>();
+ drawing::LineStyle eStyle = xPropSet->getPropertyValue(u"LineStyle"_ustr).get<drawing::LineStyle>();
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chartarea border should be loaded as none style for pptx.",
drawing::LineStyle_NONE, eStyle);
}
@@ -985,8 +985,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartAreaStyleBackgroundXLSX)
// "Automatic" chart background fill in xlsx 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 xlsx should be loaded as solid fill.",
drawing::FillStyle_SOLID, eStyle);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid white.",
@@ -1002,18 +1002,18 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartHatchFillXLSX)
// Check the chart background FillStyle is HATCH
Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
CPPUNIT_ASSERT(xPropSet.is());
- drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get<drawing::FillStyle>();
+ drawing::FillStyle eStyle = xPropSet->getPropertyValue(u"FillStyle"_ustr).get<drawing::FillStyle>();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Chart background fill in this xlsx should be loaded as hatch fill.",
drawing::FillStyle_HATCH, eStyle);
// Check the FillBackground of chart background
bool bBackgroundFill = false;
- xPropSet->getPropertyValue("FillBackground") >>= bBackgroundFill;
+ xPropSet->getPropertyValue(u"FillBackground"_ustr) >>= bBackgroundFill;
CPPUNIT_ASSERT(bBackgroundFill);
Color nBackgroundColor;
- xPropSet->getPropertyValue("FillColor") >>= nBackgroundColor;
+ xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nBackgroundColor;
CPPUNIT_ASSERT_EQUAL(COL_WHITE, nBackgroundColor);
// Check the datapoint has HatchName value
@@ -1022,16 +1022,16 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartHatchFillXLSX)
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
OUString sHatchName;
- xPropertySet->getPropertyValue("HatchName") >>= sHatchName;
+ xPropertySet->getPropertyValue(u"HatchName"_ustr) >>= sHatchName;
CPPUNIT_ASSERT(!sHatchName.isEmpty());
// Check the FillBackground of datapoint
bool bBackgroundFillofDatapoint = false;
- xPropertySet->getPropertyValue("FillBackground") >>= bBackgroundFillofDatapoint;
+ xPropertySet->getPropertyValue(u"FillBackground"_ustr) >>= bBackgroundFillofDatapoint;
CPPUNIT_ASSERT(bBackgroundFillofDatapoint);
sal_Int32 nBackgroundColorofDatapoint;
- xPropertySet->getPropertyValue("FillColor") >>= nBackgroundColorofDatapoint;
+ xPropertySet->getPropertyValue(u"FillColor"_ustr) >>= nBackgroundColorofDatapoint;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x00B050), nBackgroundColorofDatapoint);
}
@@ -1046,7 +1046,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTextRotationXLSX)
Reference<beans::XPropertySet> xPS(xYAxis, uno::UNO_QUERY_THROW);
double nRotation = 0;
- bool bSuccess = xPS->getPropertyValue("TextRotation") >>= nRotation;
+ bool bSuccess = xPS->getPropertyValue(u"TextRotation"_ustr) >>= nRotation;
CPPUNIT_ASSERT(bSuccess);
CPPUNIT_ASSERT_DOUBLES_EQUAL(90, nRotation, 1e-10);
@@ -1065,7 +1065,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextCanOverlapXLSX)
uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
CPPUNIT_ASSERT(xAxisXSupp.is());
xAxisProp = xAxisXSupp->getXAxis();
- xAxisProp->getPropertyValue("TextCanOverlap") >>= bTextCanOverlap;
+ xAxisProp->getPropertyValue(u"TextCanOverlap"_ustr) >>= bTextCanOverlap;
CPPUNIT_ASSERT(!bTextCanOverlap);
}
@@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextBreakXLSX)
uno::Reference< chart::XAxisXSupplier > xAxisXSupp( mxDiagram, uno::UNO_QUERY );
CPPUNIT_ASSERT(xAxisXSupp.is());
xAxisProp = xAxisXSupp->getXAxis();
- xAxisProp->getPropertyValue("TextBreak") >>= textBreak;
+ xAxisProp->getPropertyValue(u"TextBreak"_ustr) >>= textBreak;
// Expected value of 'TextBreak' is true
CPPUNIT_ASSERT(textBreak);
}
@@ -1101,39 +1101,39 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsXLSX)
sal_Int32 nNumberFormat;
bool bLinkNumberFormatToSource = false;
const sal_Int32 nChartDataNumberFormat = getNumberFormat(
- xChartDoc, "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)");
+ xChartDoc, u"_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)"_ustr);
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
- bool bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ bool bSuccess = xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(false, bSuccess);
bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource);
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumberInPercent);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
- bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ bSuccess = xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(false, bSuccess);
bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource);
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
- bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ bSuccess = xPropertySet->getPropertyValue(u"PercentageNumberFormat"_ustr) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(false, bSuccess);
bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess);
@@ -1154,7 +1154,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX)
sal_Int32 nNumberFormat;
bool bLinkNumberFormatToSource = true;
- const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, "0%");
+ const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, u"0%"_ustr);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
@@ -1175,7 +1175,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX)
sal_Int32 nNumberFormat;
bool bLinkNumberFormatToSource = true;
- const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, "0%");
+ const sal_Int32 nChartDataNumberFormat = getNumberFormat(xChartDoc, u"0%"_ustr);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
@@ -1198,7 +1198,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPercentageNumberFormatsDOCX)
bool bLinkNumberFormatToSource = false;
chart2::DataPointLabel aLabel;
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber);
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
bool bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
@@ -1240,7 +1240,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2007XLSX)
Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY);
CPPUNIT_ASSERT(xDiagram.is());
- uno::Any aAny = xDiagram->getPropertyValue("MissingValueTreatment");
+ uno::Any aAny = xDiagram->getPropertyValue(u"MissingValueTreatment"_ustr);
sal_Int32 nMissingValueTreatment = -2;
CPPUNIT_ASSERT(aAny >>= nMissingValueTreatment);
CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::LEAVE_GAP, nMissingValueTreatment);
@@ -1254,7 +1254,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2013XLSX)
Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY);
CPPUNIT_ASSERT(xDiagram.is());
- uno::Any aAny = xDiagram->getPropertyValue("MissingValueTreatment");
+ uno::Any aAny = xDiagram->getPropertyValue(u"MissingValueTreatment"_ustr);
sal_Int32 nMissingValueTreatment = -2;
CPPUNIT_ASSERT(aAny >>= nMissingValueTreatment);
CPPUNIT_ASSERT_EQUAL(chart::MissingValueTreatment::USE_ZERO, nMissingValueTreatment);
@@ -1274,7 +1274,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2007XLSX)
CPPUNIT_ASSERT(xPropSet.is());
chart2::CurveStyle eCurveStyle;
- xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle;
+ xPropSet->getPropertyValue(u"CurveStyle"_ustr) >>= eCurveStyle;
CPPUNIT_ASSERT_EQUAL(chart2::CurveStyle_LINES, eCurveStyle);
}
@@ -1292,7 +1292,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2013XLSX)
CPPUNIT_ASSERT(xPropSet.is());
chart2::CurveStyle eCurveStyle;
- xPropSet->getPropertyValue("CurveStyle") >>= eCurveStyle;
+ xPropSet->getPropertyValue(u"CurveStyle"_ustr) >>= eCurveStyle;
CPPUNIT_ASSERT(eCurveStyle != chart2::CurveStyle_LINES);
}
@@ -1311,12 +1311,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2007XLSX)
Reference<chart2::XRegressionCurve> xCurve = xRegressionCurveSequence[0];
Reference<beans::XPropertySet> xPropSet(xCurve->getEquationProperties(), uno::UNO_SET_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("ShowEquation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"ShowEquation"_ustr);
bool bShowEquation = true;
CPPUNIT_ASSERT(aAny >>= bShowEquation);
CPPUNIT_ASSERT(!bShowEquation);
- aAny = xPropSet->getPropertyValue("ShowCorrelationCoefficient");
+ aAny = xPropSet->getPropertyValue(u"ShowCorrelationCoefficient"_ustr);
bool bShowCorrelation = true;
CPPUNIT_ASSERT(aAny >>= bShowCorrelation);
CPPUNIT_ASSERT(!bShowCorrelation);
@@ -1337,12 +1337,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2013XLSX)
Reference<chart2::XRegressionCurve> xCurve = xRegressionCurveSequence[0];
Reference<beans::XPropertySet> xPropSet(xCurve->getEquationProperties(), uno::UNO_SET_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("ShowEquation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"ShowEquation"_ustr);
bool bShowEquation = false;
CPPUNIT_ASSERT(aAny >>= bShowEquation);
CPPUNIT_ASSERT(bShowEquation);
- aAny = xPropSet->getPropertyValue("ShowCorrelationCoefficient");
+ aAny = xPropSet->getPropertyValue(u"ShowCorrelationCoefficient"_ustr);
bool bShowCorrelation = false;
CPPUNIT_ASSERT(aAny >>= bShowCorrelation);
CPPUNIT_ASSERT(bShowCorrelation);
@@ -1357,7 +1357,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2007XLSX)
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint");
+ uno::Any aAny = xPropSet->getPropertyValue(u"VaryColorsByPoint"_ustr);
bool bVaryColor = true;
CPPUNIT_ASSERT(aAny >>= bVaryColor);
CPPUNIT_ASSERT(!bVaryColor);
@@ -1372,7 +1372,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2013XLSX)
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint");
+ uno::Any aAny = xPropSet->getPropertyValue(u"VaryColorsByPoint"_ustr);
bool bVaryColor = false;
CPPUNIT_ASSERT(aAny >>= bVaryColor);
CPPUNIT_ASSERT(!bVaryColor);
@@ -1383,7 +1383,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPlotVisOnlyDefaultValue2013XLSX)
loadFromFile(u"xlsx/plotVisOnly.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells");
+ uno::Any aAny = xPropSet->getPropertyValue(u"IncludeHiddenCells"_ustr);
CPPUNIT_ASSERT(aAny.hasValue());
bool bShowHiddenValues = true;
CPPUNIT_ASSERT(aAny >>= bShowHiddenValues);
@@ -1395,7 +1395,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testRAngAxDefaultValue2013XLSX)
loadFromFile(u"xlsx/rAngAx.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes");
+ uno::Any aAny = xPropSet->getPropertyValue(u"RightAngledAxes"_ustr);
CPPUNIT_ASSERT(aAny.hasValue());
bool bRightAngleAxes = false;
CPPUNIT_ASSERT(aAny >>= bRightAngleAxes);
@@ -1410,7 +1410,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMajorTickMarksDefaultValue2013XLSX)
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
CPPUNIT_ASSERT(xXAxis.is());
Reference<beans::XPropertySet> xPropSet(xXAxis, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("MajorTickmarks");
+ uno::Any aAny = xPropSet->getPropertyValue(u"MajorTickmarks"_ustr);
sal_Int32 nMajorTickmarks = chart2::TickmarkStyle::NONE;
CPPUNIT_ASSERT(aAny.hasValue());
CPPUNIT_ASSERT(aAny >>= nMajorTickmarks);
@@ -1425,7 +1425,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMinorTickMarksDefaultValue2013XLSX)
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
CPPUNIT_ASSERT(xXAxis.is());
Reference<beans::XPropertySet> xPropSet(xXAxis, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("MinorTickmarks");
+ uno::Any aAny = xPropSet->getPropertyValue(u"MinorTickmarks"_ustr);
sal_Int32 nMajorTickmarks = chart2::TickmarkStyle::NONE;
CPPUNIT_ASSERT(aAny.hasValue());
CPPUNIT_ASSERT(aAny >>= nMajorTickmarks);
@@ -1443,7 +1443,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleDefaultRotationXLSX)
Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
CPPUNIT_ASSERT(xTitle.is());
Reference<beans::XPropertySet> xPropSet(xTitle, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TextRotation"_ustr);
double nRotation = 0;
CPPUNIT_ASSERT(aAny >>= nRotation);
CPPUNIT_ASSERT_EQUAL(90.0, nRotation);
@@ -1460,7 +1460,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSecondaryAxisTitleDefaultRotationXLSX
Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
CPPUNIT_ASSERT(xTitle.is());
Reference<beans::XPropertySet> xPropSet(xTitle, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TextRotation"_ustr);
double nRotation = 0;
CPPUNIT_ASSERT(aAny >>= nRotation);
CPPUNIT_ASSERT_EQUAL(90.0, nRotation);
@@ -1478,7 +1478,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleRotationXLSX)
Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
CPPUNIT_ASSERT(xTitle.is());
Reference<beans::XPropertySet> xPropSet(xTitle, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TextRotation"_ustr);
double nRotation = 0;
CPPUNIT_ASSERT(aAny >>= nRotation);
CPPUNIT_ASSERT_EQUAL(340.0, nRotation);
@@ -1490,7 +1490,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleRotationXLSX)
Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
CPPUNIT_ASSERT(xTitle.is());
Reference<beans::XPropertySet> xPropSet(xTitle, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("TextRotation");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TextRotation"_ustr);
double nRotation = 0;
CPPUNIT_ASSERT(aAny >>= nRotation);
CPPUNIT_ASSERT_EQUAL(270.0, nRotation);
@@ -1541,7 +1541,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testCombinedChartAttachedAxisXLSX)
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
sal_Int32 nAxisIndex = -1;
// First series (column chart) should be attached to secondary axis!
- uno::Any aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ uno::Any aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
CPPUNIT_ASSERT(aAny >>= nAxisIndex);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nAxisIndex);
@@ -1551,7 +1551,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testCombinedChartAttachedAxisXLSX)
xPropSet.set(xSeries, uno::UNO_QUERY_THROW);
// Second series (line chart) should be attached to primary axis!
- aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
CPPUNIT_ASSERT(aAny >>= nAxisIndex);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAxisIndex);
}
@@ -1566,7 +1566,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX)
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
sal_Int32 nAxisIndex = -1;
- uno::Any aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ uno::Any aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
CPPUNIT_ASSERT(aAny >>= nAxisIndex);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAxisIndex);
@@ -1575,7 +1575,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX)
CPPUNIT_ASSERT(xSeries.is());
xPropSet.set(xSeries, uno::UNO_QUERY_THROW);
- aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
CPPUNIT_ASSERT(aAny >>= nAxisIndex);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nAxisIndex);
@@ -1584,7 +1584,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX)
CPPUNIT_ASSERT(xSeries.is());
xPropSet.set(xSeries, uno::UNO_QUERY_THROW);
- aAny = xPropSet->getPropertyValue("AttachedAxisIndex");
+ aAny = xPropSet->getPropertyValue(u"AttachedAxisIndex"_ustr);
CPPUNIT_ASSERT(aAny >>= nAxisIndex);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nAxisIndex);
}
@@ -1596,7 +1596,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider();
// Parse 42 array
- Reference<chart2::data::XDataSequence> xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;42;42;42}", "");
+ Reference<chart2::data::XDataSequence> xDataSeq = rxDataProvider->createDataSequenceByValueArray(u"values-y"_ustr, u"{42;42;42;42}"_ustr, u""_ustr);
Sequence<Any> xSequence = xDataSeq->getData();
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[1]);
@@ -1604,7 +1604,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[3]);
// Parse empty first and last
- xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{\"\";42;42;\"\"}", "");
+ xDataSeq = rxDataProvider->createDataSequenceByValueArray(u"values-y"_ustr, u"{\"\";42;42;\"\"}"_ustr, u""_ustr);
xSequence = xDataSeq->getData();
CPPUNIT_ASSERT( std::isnan( *static_cast<const double*>(xSequence[0].getValue())));
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[1]);
@@ -1612,7 +1612,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
CPPUNIT_ASSERT( std::isnan( *static_cast<const double*>(xSequence[3].getValue())));
// Parse empty middle
- xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;\"\";\"\";42}", "");
+ xDataSeq = rxDataProvider->createDataSequenceByValueArray(u"values-y"_ustr, u"{42;\"\";\"\";42}"_ustr, u""_ustr);
xSequence = xDataSeq->getData();
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]);
CPPUNIT_ASSERT( std::isnan( *static_cast<const double*>(xSequence[1].getValue())) );
@@ -1620,7 +1620,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[3]);
// Parse mixed types, numeric only role
- xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", "{42;\"hello\";0;\"world\"}", "");
+ xDataSeq = rxDataProvider->createDataSequenceByValueArray(u"values-y"_ustr, u"{42;\"hello\";0;\"world\"}"_ustr, u""_ustr);
xSequence = xDataSeq->getData();
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]);
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)), xSequence[1]);
@@ -1628,12 +1628,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider)
CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)), xSequence[3]);
// Parse mixed types, mixed role
- xDataSeq = rxDataProvider->createDataSequenceByValueArray("categories", "{42;\"hello\";0;\"world\"}", "");
+ xDataSeq = rxDataProvider->createDataSequenceByValueArray(u"categories"_ustr, u"{42;\"hello\";0;\"world\"}"_ustr, u""_ustr);
xSequence = xDataSeq->getData();
- CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 1 42")), xSequence[0]);
- CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 2 hello")), xSequence[1]);
- CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 3 0")), xSequence[2]);
- CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Row 4 world")), xSequence[3]);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(u"Row 1 42"_ustr), xSequence[0]);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(u"Row 2 hello"_ustr), xSequence[1]);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(u"Row 3 0"_ustr), xSequence[2]);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(u"Row 4 world"_ustr), xSequence[3]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf90510)
@@ -1642,7 +1642,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf90510)
loadFromFile(u"xls/piechart_outside.xls");
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW );
Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
- uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" );
+ uno::Any aAny = xPropSet->getPropertyValue( u"LabelPlacement"_ustr );
CPPUNIT_ASSERT( aAny.hasValue() );
sal_Int32 nLabelPlacement = 0;
CPPUNIT_ASSERT( aAny >>= nLabelPlacement );
@@ -1657,7 +1657,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf109858)
// test data point labels position
Reference<beans::XPropertySet> xDataPointPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
- uno::Any aAny = xDataPointPropSet->getPropertyValue( "LabelPlacement" );
+ uno::Any aAny = xDataPointPropSet->getPropertyValue( u"LabelPlacement"_ustr );
CPPUNIT_ASSERT( aAny.hasValue() );
sal_Int32 nLabelPlacement = 0;
CPPUNIT_ASSERT( aAny >>= nLabelPlacement );
@@ -1665,7 +1665,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf109858)
// test data series label position
Reference<beans::XPropertySet> xSeriesPropSet(xChart1Doc->getDiagram()->getDataRowProperties(0), uno::UNO_SET_THROW);
- aAny = xSeriesPropSet->getPropertyValue( "LabelPlacement" );
+ aAny = xSeriesPropSet->getPropertyValue( u"LabelPlacement"_ustr );
CPPUNIT_ASSERT( aAny >>= nLabelPlacement );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data series labels should be placed outside", chart::DataLabelPlacement::OUTSIDE, nLabelPlacement );
}
@@ -1679,7 +1679,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf130105)
CPPUNIT_ASSERT(xDataSeries.is());
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- uno::Any aAny = xPropertySet->getPropertyValue("LabelPlacement");
+ uno::Any aAny = xPropertySet->getPropertyValue(u"LabelPlacement"_ustr);
CPPUNIT_ASSERT(aAny.hasValue());
sal_Int32 nLabelPlacement = 0;
CPPUNIT_ASSERT(aAny >>= nLabelPlacement);
@@ -1703,11 +1703,11 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf122226)
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
CPPUNIT_ASSERT(xPropertySet.is());
- uno::Any aAny = xPropertySet->getPropertyValue( "LabelSeparator" );
+ uno::Any aAny = xPropertySet->getPropertyValue( u"LabelSeparator"_ustr );
CPPUNIT_ASSERT( aAny.hasValue() );
OUString nLabelSeparator;
CPPUNIT_ASSERT( aAny >>= nLabelSeparator );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be separated into new lines", OUString("\n"), nLabelSeparator );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Data labels should be separated into new lines", u"\n"_ustr, nLabelSeparator );
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107)
@@ -1728,78 +1728,78 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107)
// 1
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("90.0 = "), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"90.0 = "_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xed7d31), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("90"), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"90"_ustr, aFields[1]->getString());
// 2
xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Text"), aFields[0]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, aFields[0]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" : "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" : "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME, aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("B"), aFields[2]->getString());
- aFields[2]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[2]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"B"_ustr, aFields[2]->getString());
+ aFields[2]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[2]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(16), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xed7d31), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[3]->getFieldType());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[4]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Multi"), aFields[4]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Multi"_ustr, aFields[4]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[5]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("line"), aFields[5]->getString());
- aFields[5]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[5]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"line"_ustr, aFields[5]->getString());
+ aFields[5]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[5]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(11.97), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xbf9000), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE, aFields[6]->getFieldType());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[7]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Abc"), aFields[7]->getString());
- aFields[7]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[7]->getPropertyValue("CharColor") >>= nFontColor;
- aFields[7]->getPropertyValue("CharUnderline") >>= nCharUnderline;
+ CPPUNIT_ASSERT_EQUAL(u"Abc"_ustr, aFields[7]->getString());
+ aFields[7]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[7]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
+ aFields[7]->getPropertyValue(u"CharUnderline"_ustr) >>= nCharUnderline;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(12), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xa9d18e), nFontColor);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nCharUnderline);
// 3
xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("DATA"), aFields[0]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"DATA"_ustr, aFields[0]->getString());
// 4
xPropertySet.set(xDataSeries->getDataPointByIndex(3), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF, aFields[0]->getFieldType());
//CPPUNIT_ASSERT_EQUAL(OUString("70"), aFields[0]->getString()); TODO: Not implemented yet
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" <CELLREF"), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" <CELLREF"_ustr, aFields[1]->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107_2)
@@ -1819,42 +1819,42 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107_2)
// First series
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("4.3"), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"4.3"_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xc00000), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Bars"_ustr, aFields[2]->getString());
// Second series
xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
- xPropertySet->getPropertyValue("CustomLabelFields") >>= aFields;
+ xPropertySet->getPropertyValue(u"CustomLabelFields"_ustr) >>= aFields;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aFields.getLength());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE, aFields[0]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("2"), aFields[0]->getString());
- aFields[0]->getPropertyValue("CharHeight") >>= nFontSize;
- aFields[0]->getPropertyValue("CharColor") >>= nFontColor;
+ CPPUNIT_ASSERT_EQUAL(u"2"_ustr, aFields[0]->getString());
+ aFields[0]->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize;
+ aFields[0]->getPropertyValue(u"CharColor"_ustr) >>= nFontColor;
CPPUNIT_ASSERT_EQUAL(static_cast<float>(18), nFontSize);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int64>(0xffd966), nFontColor);
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT, aFields[1]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString(" "), aFields[1]->getString());
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, aFields[1]->getString());
CPPUNIT_ASSERT_EQUAL(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME, aFields[2]->getFieldType());
- CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Line"_ustr, aFields[2]->getString());
}
@@ -1885,10 +1885,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163)
::std::copy(aTextData.begin(), aTextData.end(),
::std::back_inserter(aCategories));
- CPPUNIT_ASSERT_EQUAL(OUString("Aaaa"), aCategories[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Bbbbbbb"), aCategories[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Ccc"), aCategories[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("Ddddddddddddd"), aCategories[3]);
+ CPPUNIT_ASSERT_EQUAL(u"Aaaa"_ustr, aCategories[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Bbbbbbb"_ustr, aCategories[1]);
+ CPPUNIT_ASSERT_EQUAL(u"Ccc"_ustr, aCategories[2]);
+ CPPUNIT_ASSERT_EQUAL(u"Ddddddddddddd"_ustr, aCategories[3]);
// Check visible text
@@ -1897,7 +1897,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163)
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapes.is());
- uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=0,0",
+ uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, u"CID/D=0:CS=0:Axis=0,0"_ustr,
// Axis occurs twice in chart xshape representation so need to get the one related to labels
[](const uno::Reference<drawing::XShape>& rXShape) -> bool
{
@@ -1913,14 +1913,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163)
// Check text
uno::Reference<text::XTextRange> xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Aaaa"), xLabel0->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Aaaa"_ustr, xLabel0->getString());
uno::Reference<text::XTextRange> xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
// If there is space for 3 chars only then don't show "..."
- CPPUNIT_ASSERT_EQUAL(OUString("Bbb"), xLabel1->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Bbb"_ustr, xLabel1->getString());
uno::Reference<text::XTextRange> xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Ccc"), xLabel2->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Ccc"_ustr, xLabel2->getString());
uno::Reference<text::XTextRange> xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Dddd..."), xLabel3->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Dddd..."_ustr, xLabel3->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041)
@@ -1942,7 +1942,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041)
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapes.is());
- uno::Reference<drawing::XShape> xYAxisShape = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=1,0", // Y Axis
+ uno::Reference<drawing::XShape> xYAxisShape = getShapeByName(xShapes, u"CID/D=0:CS=0:Axis=1,0"_ustr, // Y Axis
// Axis occurs twice in chart xshape representation so need to get the one related to labels
[](const uno::Reference<drawing::XShape>& rXShape) -> bool
{
@@ -1960,17 +1960,17 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041)
// Check text
uno::Reference<text::XTextRange> xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("0"), xLabel0->getString());
+ CPPUNIT_ASSERT_EQUAL(u"0"_ustr, xLabel0->getString());
uno::Reference<text::XTextRange> xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("1"), xLabel1->getString());
+ CPPUNIT_ASSERT_EQUAL(u"1"_ustr, xLabel1->getString());
uno::Reference<text::XTextRange> xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("2"), xLabel2->getString());
+ CPPUNIT_ASSERT_EQUAL(u"2"_ustr, xLabel2->getString());
uno::Reference<text::XTextRange> xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("3"), xLabel3->getString());
+ CPPUNIT_ASSERT_EQUAL(u"3"_ustr, xLabel3->getString());
uno::Reference<text::XTextRange> xLabel4(xIndexAccess->getByIndex(4), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("4"), xLabel4->getString());
+ CPPUNIT_ASSERT_EQUAL(u"4"_ustr, xLabel4->getString());
uno::Reference<text::XTextRange> xLabel5(xIndexAccess->getByIndex(5), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("5"), xLabel5->getString());
+ CPPUNIT_ASSERT_EQUAL(u"5"_ustr, xLabel5->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf121205)
@@ -1983,7 +1983,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf121205)
OUString aTitle = getTitleString(xTitled);
// We expect title split in 3 lines
- CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle);
+ CPPUNIT_ASSERT_EQUAL(u"Firstline\nSecondline\nThirdline"_ustr, aTitle);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146487)
@@ -2005,7 +2005,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146487)
OString aPath("//XShape[@text='Green; $7,654,321 ']"_ostr);
assertXPath(pXmlDoc, aPath, 1);
// Expected - 1 line tall(371), not 4 lines(1481).
- CPPUNIT_ASSERT_EQUAL(OUString("371"), getXPath(pXmlDoc, aPath, "sizeY"_ostr));
+ CPPUNIT_ASSERT_EQUAL(u"371"_ustr, getXPath(pXmlDoc, aPath, "sizeY"_ostr));
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146756)
@@ -2023,7 +2023,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf146756)
OString aPath("//XShape[@text='New service request and approval; 18%']"_ostr);
assertXPath(pXmlDoc, aPath, 1);
// Expected something like 4 lines tall(1697), not 11 lines(3817).
- CPPUNIT_ASSERT_EQUAL(OUString("1697"), getXPath(pXmlDoc, aPath, "sizeY"_ostr));
+ CPPUNIT_ASSERT_EQUAL(u"1697"_ustr, getXPath(pXmlDoc, aPath, "sizeY"_ostr));
// Expected some reasonable maximum text length for the label like 2350, not 881.
sal_Int32 nTextLength = getXPath(pXmlDoc, aPath, "textMaximumFrameWidth"_ostr).toInt32();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2350), nTextLength);
@@ -2065,7 +2065,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel)
::std::back_inserter(aCategories));
// Check that we have a very very long label text
- CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), aCategories[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Very very very very very very very very very very very loooooooooooong label"_ustr, aCategories[0]);
// Check visible text
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
@@ -2073,7 +2073,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel)
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapes.is());
- uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=0,0",
+ uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, u"CID/D=0:CS=0:Axis=0,0"_ustr,
// Axis occurs twice in chart xshape representation so need to get the one related to labels
[](const uno::Reference<drawing::XShape>& rXShape) -> bool
{
@@ -2094,7 +2094,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel)
CPPUNIT_ASSERT_LESSEQUAL(sal_Int32(32), aLabelString.getLength());
CPPUNIT_ASSERT(aLabelString.endsWith(u"..."));
- uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, "CID/DiagramWall=");
+ uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, u"CID/DiagramWall="_ustr);
CPPUNIT_ASSERT(xChartWall.is());
// The text shape width should be smaller than the chart wall
@@ -2136,7 +2136,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel)
::std::back_inserter(aCategories));
// Check that we have a very very long label text
- CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), aCategories[0]);
+ CPPUNIT_ASSERT_EQUAL(u"Very very very very very very very very very very very loooooooooooong label"_ustr, aCategories[0]);
// Check visible text
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
@@ -2144,7 +2144,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel)
uno::Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapes.is());
- uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, "CID/D=0:CS=0:Axis=0,0",
+ uno::Reference<drawing::XShape> xXAxis = getShapeByName(xShapes, u"CID/D=0:CS=0:Axis=0,0"_ustr,
// Axis occurs twice in chart xshape representation so need to get the one related to labels
[](const uno::Reference<drawing::XShape>& rXShape) -> bool
{
@@ -2160,9 +2160,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel)
// Check text is unmodified
uno::Reference<text::XTextRange> xLabel(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("Very very very very very very very very very very very loooooooooooong label"), xLabel->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Very very very very very very very very very very very loooooooooooong label"_ustr, xLabel->getString());
- uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, "CID/DiagramWall=");
+ uno::Reference<drawing::XShape> xChartWall = getShapeByName(xShapes, u"CID/DiagramWall="_ustr);
CPPUNIT_ASSERT(xChartWall.is());
// The text shape width should be smaller than the chart wall
@@ -2206,7 +2206,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartPlotAreaMarginWithAutomaticLa
loadFromFile(u"pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx");
- OUString aCheckShapeName = "CID/D=0:CS=0:CT=0:Series=0";
+ OUString aCheckShapeName = u"CID/D=0:CS=0:CT=0:Series=0"_ustr;
// Chart Wuse case Width == Height
{
// Load chart Chart_2_2 - 2cm x 2cm -
diff --git a/chart2/qa/extras/chart2import2.cxx b/chart2/qa/extras/chart2import2.cxx
index dc9a2cddae46..75adcd12c105 100644
--- a/chart2/qa/extras/chart2import2.cxx
+++ b/chart2/qa/extras/chart2import2.cxx
@@ -23,7 +23,7 @@ class Chart2ImportTest2 : public ChartTest
{
public:
Chart2ImportTest2()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{
}
};
@@ -54,7 +54,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf124243)
Reference<beans::XPropertySet> xPS(xAxis, uno::UNO_QUERY_THROW);
bool bShow = true;
// test X Axis is not visible.
- bool bSuccess = xPS->getPropertyValue("Show") >>= bShow;
+ bool bSuccess = xPS->getPropertyValue(u"Show"_ustr) >>= bShow;
CPPUNIT_ASSERT(bSuccess);
CPPUNIT_ASSERT(!bShow);
}
@@ -169,7 +169,7 @@ void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries,
uno::Reference<beans::XPropertySet> xPropertySet(
xDataSeries->getDataPointByIndex(nDataPointIndex), uno::UNO_SET_THROW);
chart2::DataPointLabel aLabel;
- xPropertySet->getPropertyValue("Label") >>= aLabel;
+ xPropertySet->getPropertyValue(u"Label"_ustr) >>= aLabel;
CPPUNIT_ASSERT_EQUAL(bValueVisible, static_cast<bool>(aLabel.ShowNumber));
CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(aLabel.ShowNumberInPercent));
}
@@ -203,7 +203,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointInheritedColorDOCX)
uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0),
uno::UNO_SET_THROW);
CPPUNIT_ASSERT(xPropertySet.is());
- sal_Int32 nColor = xPropertySet->getPropertyValue("FillColor").get<sal_Int32>();
+ sal_Int32 nColor = xPropertySet->getPropertyValue(u"FillColor"_ustr).get<sal_Int32>();
CPPUNIT_ASSERT_EQUAL(sal_Int32(16776960), nColor);
}
@@ -217,8 +217,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testExternalStrRefsXLSX)
Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
chart2::ScaleData aScaleData = xAxis->getScaleData();
css::uno::Sequence<css::uno::Any> aValues = aScaleData.Categories->getValues()->getData();
- CPPUNIT_ASSERT_EQUAL(OUString("test1"), aValues[0].get<OUString>());
- CPPUNIT_ASSERT_EQUAL(OUString("test2"), aValues[1].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"test1"_ustr, aValues[0].get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"test2"_ustr, aValues[1].get<OUString>());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSourceNumberFormatComplexCategoriesXLS)
@@ -281,14 +281,14 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testMultilevelCategoryAxis)
// Get the complex category labels.
Sequence<Sequence<OUString>> aCategories = xDescAccess->getComplexRowDescriptions();
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("2011"), aCategories[0][0]);
- CPPUNIT_ASSERT_EQUAL(OUString(""), aCategories[1][0]);
- CPPUNIT_ASSERT_EQUAL(OUString("2012"), aCategories[2][0]);
- CPPUNIT_ASSERT_EQUAL(OUString(""), aCategories[3][0]);
- CPPUNIT_ASSERT_EQUAL(OUString("Categoria 1"), aCategories[0][1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Categoria 2"), aCategories[1][1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Categoria 3"), aCategories[2][1]);
- CPPUNIT_ASSERT_EQUAL(OUString("Categoria 4"), aCategories[3][1]);
+ CPPUNIT_ASSERT_EQUAL(u"2011"_ustr, aCategories[0][0]);
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, aCategories[1][0]);
+ CPPUNIT_ASSERT_EQUAL(u"2012"_ustr, aCategories[2][0]);
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, aCategories[3][0]);
+ CPPUNIT_ASSERT_EQUAL(u"Categoria 1"_ustr, aCategories[0][1]);
+ CPPUNIT_ASSERT_EQUAL(u"Categoria 2"_ustr, aCategories[1][1]);
+ CPPUNIT_ASSERT_EQUAL(u"Categoria 3"_ustr, aCategories[2][1]);
+ CPPUNIT_ASSERT_EQUAL(u"Categoria 4"_ustr, aCategories[3][1]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testXaxisValues)
@@ -322,8 +322,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123504)
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
- Reference<drawing::XShape> xSeriesSlices(getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=0"),
- UNO_SET_THROW);
+ Reference<drawing::XShape> xSeriesSlices(
+ getShapeByName(xShapes, u"CID/D=0:CS=0:CT=0:Series=0"_ustr), UNO_SET_THROW);
Reference<container::XIndexAccess> xIndexAccess(xSeriesSlices, UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
@@ -347,8 +347,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf122765)
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
- Reference<drawing::XShape> xSeriesSlices(getShapeByName(xShapes, "CID/D=0:CS=0:CT=0:Series=0"),
- UNO_SET_THROW);
+ Reference<drawing::XShape> xSeriesSlices(
+ getShapeByName(xShapes, u"CID/D=0:CS=0:CT=0:Series=0"_ustr), UNO_SET_THROW);
Reference<container::XIndexAccess> xIndexAccess(xSeriesSlices, UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(9), xIndexAccess->getCount());
@@ -374,9 +374,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123206CustomLabelField)
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xDp = xDataSeries->getDataPointByIndex(1);
Sequence<Reference<chart2::XDataPointCustomLabelField>> aLabelFields;
- CPPUNIT_ASSERT(xDp->getPropertyValue("CustomLabelFields") >>= aLabelFields);
+ CPPUNIT_ASSERT(xDp->getPropertyValue(u"CustomLabelFields"_ustr) >>= aLabelFields);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aLabelFields.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Kiskacsa"), aLabelFields[0]->getString());
+ CPPUNIT_ASSERT_EQUAL(u"Kiskacsa"_ustr, aLabelFields[0]->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf125444PercentageCustomLabel)
@@ -391,7 +391,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf125444PercentageCustomLabel)
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xDp = xDataSeries->getDataPointByIndex(1);
Sequence<Reference<chart2::XDataPointCustomLabelField>> aLabelFields;
- CPPUNIT_ASSERT(xDp->getPropertyValue("CustomLabelFields") >>= aLabelFields);
+ CPPUNIT_ASSERT(xDp->getPropertyValue(u"CustomLabelFields"_ustr) >>= aLabelFields);
// There are three label field: a value label, a newline and a percentage label. We want
// to assert the latter.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aLabelFields.getLength());
@@ -413,12 +413,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointLabelCustomPos)
CPPUNIT_ASSERT(xPropertySet.is());
chart2::RelativePosition aCustomLabelPosition;
- xPropertySet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition;
+ xPropertySet->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition;
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.14621409921671025, aCustomLabelPosition.Primary, 1e-7);
CPPUNIT_ASSERT_DOUBLES_EQUAL(-5.2887961029923464E-2, aCustomLabelPosition.Secondary, 1e-7);
sal_Int32 aPlacement;
- xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement;
+ xPropertySet->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::OUTSIDE, aPlacement);
}
@@ -436,12 +436,12 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130032)
CPPUNIT_ASSERT(xPropertySet.is());
chart2::RelativePosition aCustomLabelPosition;
- xPropertySet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition;
+ xPropertySet->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition;
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0438333333333334, aCustomLabelPosition.Primary, 1e-7);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.086794050743657, aCustomLabelPosition.Secondary, 1e-7);
sal_Int32 aPlacement;
- xPropertySet->getPropertyValue("LabelPlacement") >>= aPlacement;
+ xPropertySet->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
CPPUNIT_ASSERT_EQUAL(chart::DataLabelPlacement::RIGHT, aPlacement);
}
@@ -459,7 +459,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134978)
CPPUNIT_ASSERT(xPropertySet.is());
chart2::RelativePosition aCustomLabelPosition;
- xPropertySet->getPropertyValue("CustomLabelPosition") >>= aCustomLabelPosition;
+ xPropertySet->getPropertyValue(u"CustomLabelPosition"_ustr) >>= aCustomLabelPosition;
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.040273622047244093, aCustomLabelPosition.Primary, 1e-7);
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.25635352872557599, aCustomLabelPosition.Secondary, 1e-7);
}
@@ -507,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf133376)
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel(
getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"),
+ u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=2"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel.is());
@@ -528,13 +528,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134225)
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel1(
getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"),
+ u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel1.is());
Reference<drawing::XShape> xDataPointLabel2(
getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"),
+ u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel2.is());
@@ -566,8 +566,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136105)
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel(
- getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"),
+ getShapeByName(
+ xShapes, u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel.is());
@@ -585,8 +585,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136105)
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel(
- getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"),
+ getShapeByName(
+ xShapes, u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel.is());
@@ -612,10 +612,10 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf91250)
// Get the category labels.
Sequence<OUString> aCategories = xDescAccess->getRowDescriptions();
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aCategories.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("12.3254"), aCategories[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("11.62315"), aCategories[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("9.26"), aCategories[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("8.657"), aCategories[3]);
+ CPPUNIT_ASSERT_EQUAL(u"12.3254"_ustr, aCategories[0]);
+ CPPUNIT_ASSERT_EQUAL(u"11.62315"_ustr, aCategories[1]);
+ CPPUNIT_ASSERT_EQUAL(u"9.26"_ustr, aCategories[2]);
+ CPPUNIT_ASSERT_EQUAL(u"8.657"_ustr, aCategories[3]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134111)
@@ -630,7 +630,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134111)
CPPUNIT_ASSERT(xAxisXSupp.is());
uno::Reference<beans::XPropertySet> xAxisProp(xAxisXSupp->getXAxis());
bool bTextBreak = false;
- xAxisProp->getPropertyValue("TextBreak") >>= bTextBreak;
+ xAxisProp->getPropertyValue(u"TextBreak"_ustr) >>= bTextBreak;
// Expected value of 'TextBreak' is true
CPPUNIT_ASSERT(bTextBreak);
}
@@ -646,7 +646,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136752)
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel(
getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"),
+ u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel.is());
@@ -672,7 +672,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137505)
Reference<text::XTextCursor> xAt = xRange->createTextCursor();
Reference<beans::XPropertySet> xProps(xAt, UNO_QUERY);
// check the text size of custom shape, inside the chart.
- CPPUNIT_ASSERT(xProps->getPropertyValue("CharHeight") >>= nFontSize);
+ CPPUNIT_ASSERT(xProps->getPropertyValue(u"CharHeight"_ustr) >>= nFontSize);
CPPUNIT_ASSERT_EQUAL(float(12), nFontSize);
}
@@ -685,7 +685,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137734)
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries.is());
Reference<beans::XPropertySet> xPropSet(xDataSeries, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("VaryColorsByPoint");
+ uno::Any aAny = xPropSet->getPropertyValue(u"VaryColorsByPoint"_ustr);
bool bVaryColor = true;
CPPUNIT_ASSERT(aAny >>= bVaryColor);
CPPUNIT_ASSERT(!bVaryColor);
@@ -697,7 +697,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137734)
Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
CPPUNIT_ASSERT(xTitle.is());
Reference<beans::XPropertySet> xTitlePropSet(xTitle, uno::UNO_QUERY_THROW);
- uno::Any aAny2 = xTitlePropSet->getPropertyValue("TextRotation");
+ uno::Any aAny2 = xTitlePropSet->getPropertyValue(u"TextRotation"_ustr);
double nRotation = -1;
CPPUNIT_ASSERT(aAny2 >>= nRotation);
CPPUNIT_ASSERT_EQUAL(0.0, nRotation);
@@ -712,8 +712,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137874)
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xLegendEntry;
- xLegendEntry
- = getShapeByName(xShapes, "CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0:LegendEntry=0");
+ xLegendEntry = getShapeByName(
+ xShapes, u"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0:LegendEntry=0"_ustr);
CPPUNIT_ASSERT(xLegendEntry.is());
}
@@ -782,7 +782,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf121281)
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
Reference<drawing::XShape> xDataPointLabel(
getShapeByName(xShapes,
- "CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"),
+ u"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"_ustr),
UNO_SET_THROW);
CPPUNIT_ASSERT(xDataPointLabel.is());
@@ -806,9 +806,9 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf139658)
// Get the category labels.
Sequence<OUString> aCategories = xDescAccess->getRowDescriptions();
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aCategories.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("category1"), aCategories[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("\"category2\""), aCategories[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("category\"3"), aCategories[2]);
+ CPPUNIT_ASSERT_EQUAL(u"category1"_ustr, aCategories[0]);
+ CPPUNIT_ASSERT_EQUAL(u"\"category2\""_ustr, aCategories[1]);
+ CPPUNIT_ASSERT_EQUAL(u"category\"3"_ustr, aCategories[2]);
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066)
@@ -822,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066)
CPPUNIT_ASSERT(xShapes.is());
uno::Reference<drawing::XShape> xYAxisShape = getShapeByName(
- xShapes, "CID/D=0:CS=0:Axis=1,0", // Y Axis
+ xShapes, u"CID/D=0:CS=0:Axis=1,0"_ustr, // Y Axis
// Axis occurs twice in chart xshape representation so need to get the one related to labels
[](const uno::Reference<drawing::XShape>& rXShape) -> bool {
uno::Reference<drawing::XShapes> xAxisShapes(rXShape, uno::UNO_QUERY);
@@ -840,21 +840,21 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066)
// Check text
uno::Reference<text::XTextRange> xLabel0(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("0"), xLabel0->getString());
+ CPPUNIT_ASSERT_EQUAL(u"0"_ustr, xLabel0->getString());
uno::Reference<text::XTextRange> xLabel1(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("5"), xLabel1->getString());
+ CPPUNIT_ASSERT_EQUAL(u"5"_ustr, xLabel1->getString());
uno::Reference<text::XTextRange> xLabel2(xIndexAccess->getByIndex(2), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("10"), xLabel2->getString());
+ CPPUNIT_ASSERT_EQUAL(u"10"_ustr, xLabel2->getString());
uno::Reference<text::XTextRange> xLabel3(xIndexAccess->getByIndex(3), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("15"), xLabel3->getString());
+ CPPUNIT_ASSERT_EQUAL(u"15"_ustr, xLabel3->getString());
uno::Reference<text::XTextRange> xLabel4(xIndexAccess->getByIndex(4), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("20"), xLabel4->getString());
+ CPPUNIT_ASSERT_EQUAL(u"20"_ustr, xLabel4->getString());
uno::Reference<text::XTextRange> xLabel5(xIndexAccess->getByIndex(5), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("25"), xLabel5->getString());
+ CPPUNIT_ASSERT_EQUAL(u"25"_ustr, xLabel5->getString());
uno::Reference<text::XTextRange> xLabel6(xIndexAccess->getByIndex(6), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("30"), xLabel6->getString());
+ CPPUNIT_ASSERT_EQUAL(u"30"_ustr, xLabel6->getString());
uno::Reference<text::XTextRange> xLabel7(xIndexAccess->getByIndex(7), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("35"), xLabel7->getString());
+ CPPUNIT_ASSERT_EQUAL(u"35"_ustr, xLabel7->getString());
}
CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf150434)
@@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf150434)
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
- Reference<drawing::XShape> xLegend = getShapeByName(xShapes, "CID/D=0:Legend=");
+ Reference<drawing::XShape> xLegend = getShapeByName(xShapes, u"CID/D=0:Legend="_ustr);
CPPUNIT_ASSERT(xLegend.is());
awt::Point aPosition = xLegend->getPosition();
@@ -883,7 +883,8 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testChartDataTableWithMultipleLegendEntr
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
Reference<drawing::XShapes> xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW);
- Reference<drawing::XShape> xDataTableShape = getShapeByName(xShapes, "CID/D=0:DataTable=");
+ Reference<drawing::XShape> xDataTableShape
+ = getShapeByName(xShapes, u"CID/D=0:DataTable="_ustr);
CPPUNIT_ASSERT(xDataTableShape.is());
}
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index db416affaa9f..53f068601885 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -279,7 +279,7 @@ Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole(
if(!xProps.is())
continue;
- OUString aRoleName = xProps->getPropertyValue("Role").get<OUString>();
+ OUString aRoleName = xProps->getPropertyValue(u"Role"_ustr).get<OUString>();
if(aRoleName == rRole)
return xLabelSeq;
@@ -296,7 +296,7 @@ uno::Sequence < OUString > getWriterChartColumnDescriptions( Reference< lang::XC
CPPUNIT_ASSERT( xShape.is() );
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
uno::Reference< chart2::XChartDocument > xChartDoc;
- xChartDoc.set( xPropertySet->getPropertyValue( "Model" ), uno::UNO_QUERY );
+ xChartDoc.set( xPropertySet->getPropertyValue( u"Model"_ustr ), uno::UNO_QUERY );
CPPUNIT_ASSERT( xChartDoc.is() );
CPPUNIT_ASSERT( xChartDoc->getDataProvider().is() );
uno::Reference< chart2::XAnyDescriptionAccess > xAnyDescriptionAccess ( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
@@ -325,7 +325,7 @@ std::vector<std::vector<double> > getDataSeriesYValuesFromChartType( const Refer
continue;
OUString aRoleName;
- xPropSet->getPropertyValue("Role") >>= aRoleName;
+ xPropSet->getPropertyValue(u"Role"_ustr) >>= aRoleName;
if (aRoleName == "values-y")
{
const uno::Sequence<uno::Any> aData = xValues->getData();
@@ -370,7 +370,7 @@ std::vector<uno::Sequence<uno::Any> > getDataSeriesLabelsFromChartType( const Re
continue;
OUString aRoleName;
- xPropSet->getPropertyValue("Role") >>= aRoleName;
+ xPropSet->getPropertyValue(u"Role"_ustr) >>= aRoleName;
if (aRoleName == aLabelRole)
{
Reference<chart2::data::XLabeledDataSequence> xLabel = lds;
@@ -403,7 +403,7 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromDrawImpress(
return xEmpty;
uno::Reference<frame::XModel> xDocModel;
- xShapeProps->getPropertyValue("Model") >>= xDocModel;
+ xShapeProps->getPropertyValue(u"Model"_ustr) >>= xDocModel;
if (!xDocModel.is())
return xEmpty;
@@ -437,7 +437,7 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromDrawImpressNamed
continue;
uno::Reference<frame::XModel> xDocModel;
- xShapeProps->getPropertyValue("Model") >>= xDocModel;
+ xShapeProps->getPropertyValue(u"Model"_ustr) >>= xDocModel;
if (!xDocModel.is())
continue;
@@ -460,7 +460,7 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int3
CPPUNIT_ASSERT(xShapeProps.is());
Reference<frame::XModel> xDocModel;
- xShapeProps->getPropertyValue("Model") >>= xDocModel;
+ xShapeProps->getPropertyValue(u"Model"_ustr) >>= xDocModel;
CPPUNIT_ASSERT(xDocModel.is());
uno::Reference<chart::XChartDocument> xChartDoc(xDocModel, uno::UNO_QUERY);
@@ -517,7 +517,7 @@ sal_Int16 getNumberFormatType( const Reference<chart2::XChartDocument>& xChartDo
CPPUNIT_ASSERT(xNumPS.is());
sal_Int16 nType = util::NumberFormat::UNDEFINED;
- xNumPS->getPropertyValue("Type") >>= nType;
+ xNumPS->getPropertyValue(u"Type"_ustr) >>= nType;
return nType;
}
@@ -568,7 +568,7 @@ awt::Size ChartTest::getSize(css::uno::Reference<chart2::XDiagram> xDiagram, con
{
Reference< beans::XPropertySet > xProp(xDiagram, uno::UNO_QUERY);
chart2::RelativeSize aRelativeSize;
- xProp->getPropertyValue( "RelativeSize" ) >>= aRelativeSize;
+ xProp->getPropertyValue( u"RelativeSize"_ustr ) >>= aRelativeSize;
double fX = aRelativeSize.Primary * rPageSize.Width;
double fY = aRelativeSize.Secondary * rPageSize.Height;
awt::Size aSize;
diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx
index 50d6c9a27495..2728bb289830 100644
--- a/chart2/qa/extras/uichart.cxx
+++ b/chart2/qa/extras/uichart.cxx
@@ -17,7 +17,7 @@ class Chart2UiChartTest : public ChartTest
{
public:
Chart2UiChartTest()
- : ChartTest("/chart2/qa/extras/data/")
+ : ChartTest(u"/chart2/qa/extras/data/"_ustr)
{
}
@@ -43,16 +43,16 @@ void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocu
Sequence<Sequence<double>> aExpectedData = xChartData->getData();
uno::Sequence<beans::PropertyValue> aPropertyValues = {
- comphelper::makePropertyValue("ToObject", aObjectName),
+ comphelper::makePropertyValue(u"ToObject"_ustr, aObjectName),
};
- dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+ dispatchCommand(mxComponent, u".uno:GoToObject"_ustr, aPropertyValues);
- dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load("private:factory/scalc");
+ load(u"private:factory/scalc"_ustr);
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
uno::Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc2.is());
@@ -123,15 +123,15 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf99969)
Sequence<Sequence<double>> aExpectedData = xChartData->getData();
- dispatchCommand(mxComponent, ".uno:GoToCell",
- { comphelper::makePropertyValue("ToPoint", uno::Any(OUString("C2:L25"))) });
+ dispatchCommand(mxComponent, u".uno:GoToCell"_ustr,
+ { comphelper::makePropertyValue(u"ToPoint"_ustr, uno::Any(u"C2:L25"_ustr)) });
- dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load("private:factory/scalc");
+ load(u"private:factory/scalc"_ustr);
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
uno::Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc2.is());
@@ -188,7 +188,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf120348)
// - Expected: 0
// - Actual : 3.33625955201419
// - Incorrect value in Col: 2 Row: 51
- testCopyPasteToNewSheet(xChartDoc, "Object 2", 4, 158);
+ testCopyPasteToNewSheet(xChartDoc, u"Object 2"_ustr, 4, 158);
}
CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091)
@@ -208,16 +208,16 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091)
CPPUNIT_ASSERT_EQUAL(aExpected[i], aSeriesList[i]);
uno::Sequence<beans::PropertyValue> aPropertyValues = {
- comphelper::makePropertyValue("ToObject", OUString("Object 1")),
+ comphelper::makePropertyValue(u"ToObject"_ustr, u"Object 1"_ustr),
};
- dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+ dispatchCommand(mxComponent, u".uno:GoToObject"_ustr, aPropertyValues);
- dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new writer document
- load("private:factory/swriter");
+ load(u"private:factory/swriter"_ustr);
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
aSeriesList = getWriterChartColumnDescriptions(mxComponent);
@@ -235,7 +235,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf107097)
loadFromFile(u"ods/tdf107097.ods");
uno::Reference<chart::XChartDocument> xChartDoc(getPivotChartDocFromSheet(1, mxComponent),
uno::UNO_QUERY_THROW);
- testCopyPasteToNewSheet(xChartDoc, "Object 1", 4, 12);
+ testCopyPasteToNewSheet(xChartDoc, u"Object 1"_ustr, 4, 12);
}
CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011)
@@ -243,7 +243,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011)
loadFromFile(u"ods/tdf136011.ods");
uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent),
uno::UNO_QUERY_THROW);
- testCopyPasteToNewSheet(xChartDoc, "Object 1", 3, 9);
+ testCopyPasteToNewSheet(xChartDoc, u"Object 1"_ustr, 3, 9);
loadFromFile(u"ods/tdf136011.ods");
uno::Reference<chart::XChartDocument> xChartDoc2(getChartCompFromSheet(0, 1, mxComponent),
@@ -253,7 +253,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011)
// - Expected: Test 1 1
// - Actual : Test 1
// - Incorrect description in row: 0
- testCopyPasteToNewSheet(xChartDoc2, "Object 2", 3, 9);
+ testCopyPasteToNewSheet(xChartDoc2, u"Object 2"_ustr, 3, 9);
}
CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf62057)
@@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf62057)
// - Expected: 2
// - Actual : 7
// - Incorrect number of columns in destination file
- testCopyPasteToNewSheet(xChartDoc, "Object 1", 2, 6);
+ testCopyPasteToNewSheet(xChartDoc, u"Object 1"_ustr, 2, 6);
}
CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690)
@@ -281,16 +281,16 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6), aSeriesList.getLength());
uno::Sequence<beans::PropertyValue> aPropertyValues = {
- comphelper::makePropertyValue("ToObject", OUString("Chart 2")),
+ comphelper::makePropertyValue(u"ToObject"_ustr, u"Chart 2"_ustr),
};
- dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
+ dispatchCommand(mxComponent, u".uno:GoToObject"_ustr, aPropertyValues);
- dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load("private:factory/scalc");
+ load(u"private:factory/scalc"_ustr);
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
uno::Reference<chart::XChartDocument> xChartDoc2(getChartCompFromSheet(0, 0, mxComponent),
uno::UNO_QUERY_THROW);
@@ -326,10 +326,10 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf101894)
// Create a copy of the sheet and move to the end
uno::Sequence<beans::PropertyValue> aArgs(
- comphelper::InitPropertySequence({ { "DocName", uno::Any(OUString("tdf101894")) },
+ comphelper::InitPropertySequence({ { "DocName", uno::Any(u"tdf101894"_ustr) },
{ "Index", uno::Any(sal_uInt16(32767)) },
{ "Copy", uno::Any(true) } }));
- dispatchCommand(mxComponent, ".uno:Move", aArgs);
+ dispatchCommand(mxComponent, u".uno:Move"_ustr, aArgs);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW);
@@ -404,18 +404,18 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testCopyPasteChartWithDotInSheetName)
Sequence<Sequence<double>> aExpectedData = xChartData->getData();
- dispatchCommand(mxComponent, ".uno:SelectAll", {});
- dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
- { { "Name", uno::Any(OUString("NewTab")) }, { "Index", uno::Any(sal_uInt16(2)) } }));
- dispatchCommand(mxComponent, ".uno:Insert", aArgs);
+ { { "Name", uno::Any(u"NewTab"_ustr) }, { "Index", uno::Any(sal_uInt16(2)) } }));
+ dispatchCommand(mxComponent, u".uno:Insert"_ustr, aArgs);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIA->getCount());
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
for (sal_Int32 sheetIndex = 0; sheetIndex < 2; ++sheetIndex)
{
@@ -487,7 +487,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf158223)
// Remove last sheet
uno::Sequence<beans::PropertyValue> aArgs(
comphelper::InitPropertySequence({ { "Index", uno::Any(sal_uInt16(3)) } }));
- dispatchCommand(mxComponent, ".uno:Remove", aArgs);
+ dispatchCommand(mxComponent, u".uno:Remove"_ustr, aArgs);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIA->getCount());
@@ -558,10 +558,10 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf153706)
// Without the fix, this would fail with
// - Expected: values-x
// - Actual : values-y
- CPPUNIT_ASSERT_EQUAL(u"values-x"_ustr, propX->getPropertyValue("Role").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"values-x"_ustr, propX->getPropertyValue(u"Role"_ustr).get<OUString>());
auto propY(sequences[1]->getValues().queryThrow<beans::XPropertySet>());
- CPPUNIT_ASSERT_EQUAL(u"values-y"_ustr, propY->getPropertyValue("Role").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(u"values-y"_ustr, propY->getPropertyValue(u"Role"_ustr).get<OUString>());
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index b968a29c8940..35e048e50101 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -22,7 +22,7 @@ class Chart2XShapeTest : public ChartTest
{
public:
Chart2XShapeTest()
- : ChartTest("/chart2/qa/extras/xshape/data/")
+ : ChartTest(u"/chart2/qa/extras/xshape/data/"_ustr)
{
}
@@ -65,7 +65,8 @@ namespace
{
OUString getShapeDump(css::uno::Reference<css::chart::XChartDocument> const& doc)
{
- return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)->dump("shapes");
+ return css::uno::Reference<css::qa::XDumper>(doc, css::uno::UNO_QUERY_THROW)
+ ->dump(u"shapes"_ustr);
}
bool checkDumpAgainstFile(std::u16string_view rDump, std::u16string_view aFilePath,
diff --git a/chart2/qa/unit/common_functor_test.cxx b/chart2/qa/unit/common_functor_test.cxx
index a744945e6663..05e62490848d 100644
--- a/chart2/qa/unit/common_functor_test.cxx
+++ b/chart2/qa/unit/common_functor_test.cxx
@@ -50,13 +50,13 @@ void CommonFunctorsTest::testAnyToString()
std::transform(aInput.begin(), aInput.end(),
std::back_inserter(aOutput), chart::CommonFunctors::ToString());
- CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("12"), aOutput[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("15"), aOutput[3]);
- CPPUNIT_ASSERT_EQUAL(OUString("25.234"), aOutput[4]);
- CPPUNIT_ASSERT_EQUAL(OUString("123.456"), aOutput[5]);
- CPPUNIT_ASSERT_EQUAL(OUString("0.12345"), aOutput[6]);
+ CPPUNIT_ASSERT_EQUAL(u"2"_ustr, aOutput[0]);
+ CPPUNIT_ASSERT_EQUAL(u"10"_ustr, aOutput[1]);
+ CPPUNIT_ASSERT_EQUAL(u"12"_ustr, aOutput[2]);
+ CPPUNIT_ASSERT_EQUAL(u"15"_ustr, aOutput[3]);
+ CPPUNIT_ASSERT_EQUAL(u"25.234"_ustr, aOutput[4]);
+ CPPUNIT_ASSERT_EQUAL(u"123.456"_ustr, aOutput[5]);
+ CPPUNIT_ASSERT_EQUAL(u"0.12345"_ustr, aOutput[6]);
}
void CommonFunctorsTest::testDoubleToString()
@@ -67,13 +67,13 @@ void CommonFunctorsTest::testDoubleToString()
std::transform(aInput.begin(), aInput.end(),
std::back_inserter(aOutput), chart::CommonFunctors::ToString());
- CPPUNIT_ASSERT_EQUAL(OUString("2"), aOutput[0]);
- CPPUNIT_ASSERT_EQUAL(OUString("10"), aOutput[1]);
- CPPUNIT_ASSERT_EQUAL(OUString("12"), aOutput[2]);
- CPPUNIT_ASSERT_EQUAL(OUString("15"), aOutput[3]);
- CPPUNIT_ASSERT_EQUAL(OUString("25.234"), aOutput[4]);
- CPPUNIT_ASSERT_EQUAL(OUString("123.456"), aOutput[5]);
- CPPUNIT_ASSERT_EQUAL(OUString("0.12345"), aOutput[6]);
+ CPPUNIT_ASSERT_EQUAL(u"2"_ustr, aOutput[0]);
+ CPPUNIT_ASSERT_EQUAL(u"10"_ustr, aOutput[1]);
+ CPPUNIT_ASSERT_EQUAL(u"12"_ustr, aOutput[2]);
+ CPPUNIT_ASSERT_EQUAL(u"15"_ustr, aOutput[3]);
+ CPPUNIT_ASSERT_EQUAL(u"25.234"_ustr, aOutput[4]);
+ CPPUNIT_ASSERT_EQUAL(u"123.456"_ustr, aOutput[5]);
+ CPPUNIT_ASSERT_EQUAL(u"0.12345"_ustr, aOutput[6]);
}
CPPUNIT_TEST_SUITE_REGISTRATION(CommonFunctorsTest);