summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /chart2
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/PivotChartTest.cxx126
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx6
-rw-r--r--chart2/qa/extras/chart2import.cxx4
-rw-r--r--chart2/qa/extras/charttest.hxx2
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx6
-rw-r--r--chart2/source/model/template/DataInterpreter.hxx2
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx2
-rw-r--r--chart2/source/view/inc/PropertyMapper.hxx2
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx10
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx2
-rw-r--r--chart2/source/view/main/VLegend.cxx2
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx2
13 files changed, 85 insertions, 85 deletions
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx
index 80bfcf14202b..44998835dbcc 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -60,7 +60,7 @@ namespace
{
void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor,
- OUString const & sFieldName,
+ std::u16string_view sFieldName,
sheet::DataPilotFieldOrientation eOrientation)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
@@ -76,7 +76,7 @@ void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xD
}
void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor,
- OUString const & sFieldName,
+ std::u16string_view sFieldName,
sheet::GeneralFunction eFunction)
{
uno::Reference<container::XIndexAccess> xPilotIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
@@ -92,7 +92,7 @@ void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDesc
}
void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor,
- OUString const & sFieldName,
+ std::u16string_view sFieldName,
sheet::DataPilotFieldLayoutInfo aLayoutInfo)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
@@ -112,7 +112,7 @@ void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDe
}
void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor,
- OUString const & sFieldName,
+ std::u16string_view sFieldName,
uno::Sequence<sheet::GeneralFunction> const & rSubtotalFunctions)
{
uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW);
@@ -325,12 +325,12 @@ void PivotChartTest::testRoundtrip()
// Check the data series
{
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference1, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0));
}
{
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1));
}
@@ -339,14 +339,14 @@ void PivotChartTest::testRoundtrip()
{
uno::Reference<sheet::XDataPilotTable> xDataPilotTable = lclGetPivotTableByName(1, "DataPilot1", mxComponent);
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW);
- lclModifyOrientation(xDataPilotDescriptor, "Exp.", sheet::DataPilotFieldOrientation_HIDDEN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Exp.", sheet::DataPilotFieldOrientation_HIDDEN);
}
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc));
// Check again the data series
{
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
}
@@ -360,7 +360,7 @@ void PivotChartTest::testRoundtrip()
// Check again the data series
{
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference2, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
}
@@ -398,7 +398,7 @@ void PivotChartTest::testChangePivotTable()
{
std::vector<double> aReference { 10162.033139, 16614.523063, 27944.146101 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0));
@@ -408,7 +408,7 @@ void PivotChartTest::testChangePivotTable()
{
std::vector<double> aReference { 101879.458079, 178636.929704, 314626.484864 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1));
@@ -419,9 +419,9 @@ void PivotChartTest::testChangePivotTable()
{
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW);
- lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Group Segment", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Rev.", sheet::DataPilotFieldOrientation_HIDDEN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Service Month", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Group Segment", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Rev.", sheet::DataPilotFieldOrientation_HIDDEN);
}
// Check the pivot chart again as we expect it has been updated when we updated the pivot table
@@ -432,7 +432,7 @@ void PivotChartTest::testChangePivotTable()
{
std::vector<double> aReference { 2855.559, 1780.326, 2208.713, 2130.064, 1187.371 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
@@ -442,7 +442,7 @@ void PivotChartTest::testChangePivotTable()
{
std::vector<double> aReference { 4098.908, 2527.286, 4299.716, 2362.225, 3326.389 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
@@ -452,7 +452,7 @@ void PivotChartTest::testChangePivotTable()
{
std::vector<double> aReference { 4926.303, 5684.060, 4201.398, 7290.795, 5841.591 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
@@ -461,7 +461,7 @@ void PivotChartTest::testChangePivotTable()
// Remove "Service Month" so row fields are empty - check we handle empty rows
{
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, uno::UNO_QUERY_THROW);
- lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_HIDDEN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Service Month", sheet::DataPilotFieldOrientation_HIDDEN);
}
// Check the pivot chart again as we expect it has been updated when we updated the pivot table
@@ -471,21 +471,21 @@ void PivotChartTest::testChangePivotTable()
// Check the first data series
{
std::vector<double> aReference { 10162.033139 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
}
// Check the second data series
{
std::vector<double> aReference { 16614.523063 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
}
// Check the third data series
{
std::vector<double> aReference { 27944.146101 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
}
@@ -501,21 +501,21 @@ void PivotChartTest::testChangePivotTable()
// Check the first data series
{
std::vector<double> aReference { 10162.033139 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0));
}
// Check the second data series
{
std::vector<double> aReference { 16614.523063 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1));
}
// Check the third data series
{
std::vector<double> aReference { 27944.146101 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-3);
CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2));
}
@@ -542,9 +542,9 @@ void PivotChartTest::testPivotChartWithOneColumnField()
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM);
xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor);
@@ -577,7 +577,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
{
std::vector<double> aReference { 1738.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("DE"), lclGetLabel(xChartDoc, 0));
@@ -587,7 +587,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
{
std::vector<double> aReference { 2003.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("EN"), lclGetLabel(xChartDoc, 1));
@@ -596,7 +596,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
{
std::vector<double> aReference { 1936.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("FR"), lclGetLabel(xChartDoc, 2));
@@ -624,9 +624,9 @@ void PivotChartTest::testPivotChartWithOneRowField()
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM);
xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor);
@@ -659,7 +659,7 @@ void PivotChartTest::testPivotChartWithOneRowField()
{
std::vector<double> aReference { 1738.0, 2003.0, 1936.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
@@ -684,13 +684,13 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
- lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T2", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T2", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T2", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T2", sheet::GeneralFunction_SUM);
lclModifyColumnGrandTotal(xDataPilotDescriptor, true);
lclModifyRowGrandTotal(xDataPilotDescriptor, true);
@@ -743,14 +743,14 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name);
// Data to column fields
- lclModifyOrientation(xDataPilotDescriptor, "Data", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Data", sheet::DataPilotFieldOrientation_COLUMN);
// Change the order of column fields: expected data, type, country
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_HIDDEN);
- lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_HIDDEN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_HIDDEN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_HIDDEN);
- lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
// set the XPivotTableDataProvider again as the old one was exchanged
xPivotTableDataProvider.set(xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW);
@@ -792,10 +792,10 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM);
xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor);
// TEST
@@ -830,7 +830,7 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
{
std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
@@ -851,18 +851,18 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
// Enable subtotals - set to auto
aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO;
- lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence);
+ lclModifySubtotals(xDataPilotDescriptor, u"Country", aGeneralFunctionSequence);
// Set Subtotals layout to bottom + add empty lines
aLayoutInfoValue.AddEmptyLines = true;
aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM;
- lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue);
+ lclModifyLayoutInfo(xDataPilotDescriptor, u"Country", aLayoutInfoValue);
// Check data is unchanged
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc));
{
std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
@@ -880,18 +880,18 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
// Enable subtotals - set to auto
aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO;
- lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence);
+ lclModifySubtotals(xDataPilotDescriptor, u"Country", aGeneralFunctionSequence);
// Set Subtotals layout to top + add empty lines
aLayoutInfoValue.AddEmptyLines = true;
aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP;
- lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue);
+ lclModifyLayoutInfo(xDataPilotDescriptor, u"Country", aLayoutInfoValue);
// Check data is unchanged
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc));
{
std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 };
- xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData();
+ xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData();
lclCheckSequence(aReference, xSequence, 1E-4);
CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0));
@@ -923,12 +923,12 @@ void PivotChartTest::testPivotChartWithDateRowField()
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
- lclModifyOrientation(xDataPilotDescriptor, "Date", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW);
- lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN);
- lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA);
- lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM);
+ lclModifyOrientation(xDataPilotDescriptor, u"Date", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
+ lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN);
+ lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
+ lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM);
lclModifyColumnGrandTotal(xDataPilotDescriptor, true);
lclModifyRowGrandTotal(xDataPilotDescriptor, true);
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 0c011aa93fd3..544eec6b5373 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -366,19 +366,19 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false)
// Check source ranges
for (size_t nIndex = 0; nIndex < aDataSeriesYValues.size(); ++nIndex)
{
- Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc2, "values-x", nIndex);
+ Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc2, u"values-x", nIndex);
if (xDataSeq.is())
{
OUString aXValuesSourceRange = xDataSeq->getSourceRangeRepresentation();
CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aXValuesSourceRange);
}
- xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "values-y", nIndex));
+ xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, u"values-y", nIndex));
if (xDataSeq.is())
{
OUString aYValuesSourceRange = xDataSeq->getSourceRangeRepresentation();
CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aYValuesSourceRange);
}
- xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "categories", nIndex));
+ xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, u"categories", nIndex));
if (xDataSeq.is())
{
OUString aCategoriesSourceRange = xDataSeq->getSourceRangeRepresentation();
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 6b55d112d5fb..8e8f0886d50f 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -918,7 +918,7 @@ void Chart2ImportTest::testDelayedCellImport()
load("/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
Reference< chart2::data::XDataSequence > xDataSeq =
- getDataSequenceFromDocByRole(xChartDoc, "values-x");
+ getDataSequenceFromDocByRole(xChartDoc, u"values-x");
OUString aRange = xDataSeq->getSourceRangeRepresentation();
CPPUNIT_ASSERT_EQUAL(OUString("$Sheet2.$C$5:$C$9"), aRange);
@@ -2399,7 +2399,7 @@ void Chart2ImportTest::testXaxisValues()
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
- const uno::Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, "values-x");
+ const uno::Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, u"values-x");
Sequence<uno::Any> xSequence = xDataSeq->getData();
// test X values
CPPUNIT_ASSERT_EQUAL(uno::Any(0.04), xSequence[0]);
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index bcd1f101189d..04794bbeb607 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -349,7 +349,7 @@ Reference< chart2::data::XDataSequence > getLabelDataSequenceFromDoc(
}
Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole(
- Reference< chart2::XChartDocument > const & xChartDoc, const OUString& rRole,
+ Reference< chart2::XChartDocument > const & xChartDoc, std::u16string_view rRole,
sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 )
{
Reference< chart2::XDataSeries > xDataSeries =
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 7e85e0b36199..ad473df9e8d7 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -335,7 +335,7 @@ void DataInterpreter::SetRole( const Reference< data::XDataSequence > & xSeq, co
uno::Any DataInterpreter::GetProperty(
const Sequence< beans::PropertyValue > & aArguments,
- const OUString & rName )
+ std::u16string_view rName )
{
for( sal_Int32 i=aArguments.getLength(); i--; )
{
@@ -352,7 +352,7 @@ bool DataInterpreter::HasCategories(
bool bHasCategories = false;
if( rArguments.hasElements() )
- GetProperty( rArguments, "HasCategories" ) >>= bHasCategories;
+ GetProperty( rArguments, u"HasCategories" ) >>= bHasCategories;
for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx )
bHasCategories = ( rData[nLSeqIdx].is() && GetRole( rData[nLSeqIdx]->getValues() ) == "categories");
@@ -364,7 +364,7 @@ bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > &
{
bool bUseCategoriesAsX = true;
if( rArguments.hasElements() )
- GetProperty( rArguments, "UseCategoriesAsX" ) >>= bUseCategoriesAsX;
+ GetProperty( rArguments, u"UseCategoriesAsX" ) >>= bUseCategoriesAsX;
return bUseCategoriesAsX;
}
diff --git a/chart2/source/model/template/DataInterpreter.hxx b/chart2/source/model/template/DataInterpreter.hxx
index 2b8bd50fc3a2..8294f5ca4c9c 100644
--- a/chart2/source/model/template/DataInterpreter.hxx
+++ b/chart2/source/model/template/DataInterpreter.hxx
@@ -47,7 +47,7 @@ public:
static css::uno::Any GetProperty(
const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
- const OUString & rName );
+ std::u16string_view rName );
static bool HasCategories(
const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 44e64973e0b8..cb57a6a62207 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -790,7 +790,7 @@ bool VCartesianAxis::createTextShapes(
tAnySequence aPropValues;
getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, nLimitedSpaceForText, bLimitedHeight);
- uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
+ uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor");
Color nColor = COL_AUTO;
if(pColorAny)
*pColorAny >>= nColor;
@@ -981,7 +981,7 @@ bool VCartesianAxis::createTextShapesSimple(
tAnySequence aPropValues;
getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, -1, bLimitedHeight);
- uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
+ uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor");
Color nColor = COL_AUTO;
if(pColorAny)
*pColorAny >>= nColor;
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 70d9ac85fbb4..ae06bcf4d6da 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -67,7 +67,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
LabelPositionHelper::doDynamicFontResize( aPropValues, aPropNames, xProps
, rAxisLabelProperties.m_aFontReferenceSize );
- uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor");
+ uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor");
Color nColor = COL_AUTO;
if(pColorAny)
*pColorAny >>= nColor;
diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx
index 7a44584349b8..2039ebdde185 100644
--- a/chart2/source/view/inc/PropertyMapper.hxx
+++ b/chart2/source/view/inc/PropertyMapper.hxx
@@ -82,7 +82,7 @@ public:
static css::uno::Any*
getValuePointer( tAnySequence& rPropValues
, const tNameSequence& rPropNames
- , const OUString& rPropName );
+ , std::u16string_view rPropName );
static css::uno::Any*
getValuePointerForLimitedSpace( tAnySequence& rPropValues
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index 35d19ebc5ab5..74fd1ed78174 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -61,7 +61,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT;
else if( eAlignment==LABEL_ALIGN_LEFT || eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT;
- uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextHorizontalAdjust");
+ uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextHorizontalAdjust");
if(pHorizontalAdjustAny)
*pHorizontalAdjustAny <<= eHorizontalAdjust;
}
@@ -73,7 +73,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
else if( eAlignment==LABEL_ALIGN_BOTTOM || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eVerticalAdjust = drawing::TextVerticalAdjust_TOP;
- uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextVerticalAdjust");
+ uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextVerticalAdjust");
if(pVerticalAdjustAny)
*pVerticalAdjustAny <<= eVerticalAdjust;
}
@@ -101,11 +101,11 @@ void LabelPositionHelper::doDynamicFontResize( tAnySequence& rPropValues
awt::Size aOldReferenceSize;
if( xAxisModelProps->getPropertyValue( "ReferencePageSize") >>= aOldReferenceSize )
{
- uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeight" );
+ uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeight" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
- pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightAsian" );
+ pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightAsian" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
- pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightComplex" );
+ pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightComplex" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
}
}
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 8611cef5d43a..c7327974249a 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -159,7 +159,7 @@ void PropertyMapper::getMultiPropertyListsFromValueMap(
uno::Any* PropertyMapper::getValuePointer( tAnySequence& rPropValues
, const tNameSequence& rPropNames
- , const OUString& rPropName )
+ , std::u16string_view rPropName )
{
sal_Int32 nCount = rPropNames.getLength();
for( sal_Int32 nN = 0; nN < nCount; nN++ )
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 2a2048c35016..353fd4d9630c 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -291,7 +291,7 @@ awt::Size lcl_placeLegendEntries(
const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm
const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance;
sal_Int32 nMaxTextWidth = rRemainingSpace.Width - nSymbolPlusDistanceWidth;
- uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, "TextMaximumFrameWidth");
+ uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, u"TextMaximumFrameWidth");
if(pFrameWidthAny)
{
if( eExpansion == css::chart::ChartLegendExpansion_HIGH )
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 1ccc0de34324..8af21c374dba 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -60,7 +60,7 @@ void getPropNamesAndValues( const Reference< beans::XPropertySet >& xProp,
::chart::PropertyMapper::getMultiPropertyListsFromValueMap( rNames, rValues, aValueMap );
- uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,"LineWidth");
+ uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,u"LineWidth");
sal_Int32 nLineWidth = 0;
if( pLineWidthAny && (*pLineWidthAny>>=nLineWidth) )
{