chart2/qa/extras/PivotChartTest.cxx | 168 +- chart2/qa/extras/chart2_trendcalculators.cxx | 6 chart2/qa/extras/chart2dump/chart2dump.cxx | 176 +-- chart2/qa/extras/chart2export.cxx | 398 +++--- chart2/qa/extras/chart2export2.cxx | 578 +++++----- chart2/qa/extras/chart2export3.cxx | 560 ++++----- chart2/qa/extras/chart2geometry.cxx | 114 + chart2/qa/extras/chart2import.cxx | 420 +++---- chart2/qa/extras/chart2import2.cxx | 119 +- chart2/qa/extras/charttest.hxx | 18 chart2/qa/extras/uichart.cxx | 72 - chart2/qa/extras/xshape/chart2xshape.cxx | 5 chart2/qa/unit/common_functor_test.cxx | 28 chart2/source/controller/accessibility/AccessibleBase.cxx | 8 chart2/source/controller/accessibility/AccessibleChartElement.cxx | 2 chart2/source/controller/accessibility/AccessibleChartShape.cxx | 2 chart2/source/controller/accessibility/AccessibleChartView.cxx | 4 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx | 14 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx | 40 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx | 12 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx | 12 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 64 - chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 112 - chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 132 +- chart2/source/controller/chartapiwrapper/GridWrapper.cxx | 12 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx | 42 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx | 18 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx | 26 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx | 12 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx | 14 chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx | 16 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx | 10 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx | 12 chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx | 6 chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx | 2 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx | 6 chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx | 2 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx | 6 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx | 2 chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx | 2 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx | 2 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx | 72 - chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx | 22 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx | 44 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx | 2 chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx | 22 chart2/source/controller/dialogs/ChartResourceGroups.cxx | 20 chart2/source/controller/dialogs/ChartTypeDialogController.cxx | 12 chart2/source/controller/dialogs/DataBrowser.cxx | 22 chart2/source/controller/dialogs/DataBrowserModel.cxx | 4 chart2/source/controller/dialogs/DialogModel.cxx | 40 chart2/source/controller/dialogs/ObjectNameProvider.cxx | 28 chart2/source/controller/dialogs/RangeSelectionHelper.cxx | 8 chart2/source/controller/dialogs/dlg_ChartType.cxx | 5 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 6 chart2/source/controller/dialogs/dlg_DataEditor.cxx | 48 chart2/source/controller/dialogs/dlg_DataSource.cxx | 12 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx | 20 chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx | 2 chart2/source/controller/dialogs/dlg_InsertDataTable.cxx | 6 chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx | 2 chart2/source/controller/dialogs/dlg_InsertLegend.cxx | 3 chart2/source/controller/dialogs/dlg_InsertTitle.cxx | 3 chart2/source/controller/dialogs/dlg_NumberFormat.cxx | 4 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 116 +- chart2/source/controller/dialogs/dlg_ShapeFont.cxx | 8 chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx | 12 chart2/source/controller/dialogs/dlg_View3D.cxx | 16 chart2/source/controller/dialogs/res_BarGeometry.cxx | 4 chart2/source/controller/dialogs/res_DataLabel.cxx | 36 chart2/source/controller/dialogs/res_DataTableProperties.cxx | 8 chart2/source/controller/dialogs/res_ErrorBar.cxx | 52 chart2/source/controller/dialogs/res_LegendPosition.cxx | 30 chart2/source/controller/dialogs/res_Titles.cxx | 28 chart2/source/controller/dialogs/res_Trendline.cxx | 54 chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx | 16 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx | 30 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 40 chart2/source/controller/dialogs/tp_AxisLabel.cxx | 34 chart2/source/controller/dialogs/tp_AxisPositions.cxx | 34 chart2/source/controller/dialogs/tp_ChartType.cxx | 14 chart2/source/controller/dialogs/tp_DataLabel.cxx | 2 chart2/source/controller/dialogs/tp_DataPointOption.cxx | 6 chart2/source/controller/dialogs/tp_DataSource.cxx | 44 chart2/source/controller/dialogs/tp_DataTable.cxx | 4 chart2/source/controller/dialogs/tp_ErrorBars.cxx | 2 chart2/source/controller/dialogs/tp_LegendPosition.cxx | 6 chart2/source/controller/dialogs/tp_PointGeometry.cxx | 2 chart2/source/controller/dialogs/tp_PolarOptions.cxx | 14 chart2/source/controller/dialogs/tp_RangeChooser.cxx | 34 chart2/source/controller/dialogs/tp_Scale.cxx | 52 chart2/source/controller/dialogs/tp_SeriesToAxis.cxx | 32 chart2/source/controller/dialogs/tp_TitleRotation.cxx | 14 chart2/source/controller/dialogs/tp_Trendline.cxx | 2 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx | 8 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 46 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx | 36 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 74 - chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx | 24 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 82 - chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx | 24 chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx | 48 chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx | 2 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx | 32 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx | 72 - chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 74 - chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx | 8 chart2/source/controller/main/ChartController.cxx | 160 +- chart2/source/controller/main/ChartController_Insert.cxx | 28 chart2/source/controller/main/ChartController_TextEdit.cxx | 4 chart2/source/controller/main/ChartController_Tools.cxx | 62 - chart2/source/controller/main/ChartController_Window.cxx | 160 +- chart2/source/controller/main/ChartWindow.cxx | 2 chart2/source/controller/main/CommandDispatchContainer.cxx | 20 chart2/source/controller/main/ControllerCommandDispatch.cxx | 250 ++-- chart2/source/controller/main/DragMethod_PieSegment.cxx | 2 chart2/source/controller/main/DragMethod_RotateDiagram.cxx | 2 chart2/source/controller/main/ElementSelector.cxx | 6 chart2/source/controller/main/ObjectHierarchy.cxx | 10 chart2/source/controller/main/PositionAndSizeHelper.cxx | 20 chart2/source/controller/main/StatusBarCommandDispatch.cxx | 6 chart2/source/controller/main/ToolbarController.cxx | 4 chart2/source/controller/main/UndoCommandDispatch.cxx | 8 chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 20 chart2/source/controller/sidebar/ChartAreaPanel.cxx | 66 - chart2/source/controller/sidebar/ChartAxisPanel.cxx | 26 chart2/source/controller/sidebar/ChartColorWrapper.cxx | 14 chart2/source/controller/sidebar/ChartElementsPanel.cxx | 72 - chart2/source/controller/sidebar/ChartErrorBarPanel.cxx | 32 chart2/source/controller/sidebar/ChartLinePanel.cxx | 18 chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 28 chart2/source/controller/sidebar/ChartTypePanel.cxx | 12 chart2/source/controller/uitest/uiobject.cxx | 24 chart2/source/model/filter/XMLFilter.cxx | 88 - chart2/source/model/inc/XMLFilter.hxx | 6 chart2/source/model/main/Axis.cxx | 6 chart2/source/model/main/BaseCoordinateSystem.cxx | 4 chart2/source/model/main/CartesianCoordinateSystem.cxx | 10 chart2/source/model/main/ChartModel.cxx | 28 chart2/source/model/main/ChartModel_Persistence.cxx | 50 chart2/source/model/main/DataPoint.cxx | 10 chart2/source/model/main/DataPointProperties.cxx | 2 chart2/source/model/main/DataSeries.cxx | 16 chart2/source/model/main/DataTable.cxx | 9 chart2/source/model/main/Diagram.cxx | 38 chart2/source/model/main/FormattedString.cxx | 8 chart2/source/model/main/GridProperties.cxx | 6 chart2/source/model/main/Legend.cxx | 14 chart2/source/model/main/PageBackground.cxx | 6 chart2/source/model/main/PolarCoordinateSystem.cxx | 10 chart2/source/model/main/Title.cxx | 10 chart2/source/model/template/AreaChartType.cxx | 4 chart2/source/model/template/AreaChartTypeTemplate.cxx | 6 chart2/source/model/template/BarChartType.cxx | 6 chart2/source/model/template/BarChartTypeTemplate.cxx | 10 chart2/source/model/template/BubbleChartType.cxx | 12 chart2/source/model/template/BubbleChartTypeTemplate.cxx | 2 chart2/source/model/template/BubbleDataInterpreter.cxx | 22 chart2/source/model/template/CandleStickChartType.cxx | 8 chart2/source/model/template/ChartType.cxx | 8 chart2/source/model/template/ChartTypeManager.cxx | 8 chart2/source/model/template/ChartTypeTemplate.cxx | 18 chart2/source/model/template/ColumnChartType.cxx | 6 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx | 4 chart2/source/model/template/DataInterpreter.cxx | 18 chart2/source/model/template/FilledNetChartType.cxx | 6 chart2/source/model/template/LineChartType.cxx | 6 chart2/source/model/template/LineChartTypeTemplate.cxx | 4 chart2/source/model/template/NetChartType.cxx | 8 chart2/source/model/template/NetChartTypeTemplate.cxx | 4 chart2/source/model/template/PieChartType.cxx | 14 chart2/source/model/template/PieChartTypeTemplate.cxx | 22 chart2/source/model/template/ScatterChartType.cxx | 8 chart2/source/model/template/ScatterChartTypeTemplate.cxx | 6 chart2/source/model/template/StockChartTypeTemplate.cxx | 20 chart2/source/model/template/StockDataInterpreter.cxx | 18 chart2/source/model/template/XYDataInterpreter.cxx | 16 chart2/source/tools/AxisHelper.cxx | 30 chart2/source/tools/CachedDataSequence.cxx | 16 chart2/source/tools/CharacterProperties.cxx | 22 chart2/source/tools/ChartModelHelper.cxx | 14 chart2/source/tools/ChartTypeHelper.cxx | 4 chart2/source/tools/ColorPerPointHelper.cxx | 2 chart2/source/tools/ConfigColorScheme.cxx | 6 chart2/source/tools/DataSeriesHelper.cxx | 30 chart2/source/tools/DataSource.cxx | 4 chart2/source/tools/DataSourceHelper.cxx | 16 chart2/source/tools/DiagramHelper.cxx | 18 chart2/source/tools/ErrorBar.cxx | 6 chart2/source/tools/InternalDataProvider.cxx | 22 chart2/source/tools/LabeledDataSequence.cxx | 4 chart2/source/tools/LegendHelper.cxx | 18 chart2/source/tools/LinePropertiesHelper.cxx | 18 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx | 2 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx | 2 chart2/source/tools/NameContainer.cxx | 4 chart2/source/tools/NumberFormatterWrapper.cxx | 2 chart2/source/tools/OPropertySet.cxx | 2 chart2/source/tools/ObjectIdentifier.cxx | 6 chart2/source/tools/PropertyHelper.cxx | 20 chart2/source/tools/RangeHighlighter.cxx | 2 chart2/source/tools/ReferenceSizeProvider.cxx | 4 chart2/source/tools/RegressionCurveCalculator.cxx | 16 chart2/source/tools/RegressionCurveHelper.cxx | 34 chart2/source/tools/RegressionCurveModel.cxx | 44 chart2/source/tools/RegressionEquation.cxx | 16 chart2/source/tools/Scaling.cxx | 4 chart2/source/tools/StatisticsHelper.cxx | 10 chart2/source/tools/ThreeDHelper.cxx | 10 chart2/source/tools/TitleHelper.cxx | 18 chart2/source/tools/UncachedDataSequence.cxx | 12 chart2/source/tools/WrappedIgnoreProperty.cxx | 44 chart2/source/view/axes/VAxisBase.cxx | 4 chart2/source/view/axes/VAxisProperties.cxx | 26 chart2/source/view/axes/VCartesianAxis.cxx | 4 chart2/source/view/axes/VCartesianGrid.cxx | 2 chart2/source/view/axes/VCoordinateSystem.cxx | 2 chart2/source/view/axes/VPolarAngleAxis.cxx | 2 chart2/source/view/axes/VPolarGrid.cxx | 2 chart2/source/view/charttypes/AreaChart.cxx | 12 chart2/source/view/charttypes/BarChart.cxx | 14 chart2/source/view/charttypes/BubbleChart.cxx | 14 chart2/source/view/charttypes/CandleStickChart.cxx | 8 chart2/source/view/charttypes/NetChart.cxx | 4 chart2/source/view/charttypes/PieChart.cxx | 26 chart2/source/view/charttypes/VSeriesPlotter.cxx | 82 - chart2/source/view/diagram/VDiagram.cxx | 10 chart2/source/view/main/ChartItemPool.cxx | 8 chart2/source/view/main/ChartView.cxx | 98 - chart2/source/view/main/DataTableView.cxx | 148 +- chart2/source/view/main/ExplicitValueProvider.cxx | 4 chart2/source/view/main/LabelPositionHelper.cxx | 2 chart2/source/view/main/PropertyMapper.cxx | 4 chart2/source/view/main/SeriesPlotterContainer.cxx | 19 chart2/source/view/main/ShapeFactory.cxx | 40 chart2/source/view/main/VButton.cxx | 34 chart2/source/view/main/VDataSeries.cxx | 22 chart2/source/view/main/VLegend.cxx | 46 chart2/source/view/main/VLegendSymbolFactory.cxx | 2 chart2/source/view/main/VLineProperties.cxx | 12 chart2/source/view/main/VTitle.cxx | 6 241 files changed, 3867 insertions(+), 3850 deletions(-)
New commits: commit 1de066d04f73a0e901e875597b8244a3ecdf624c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon May 6 18:28:51 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue May 7 08:46:21 2024 +0200 loplugin:ostr in chart2 Change-Id: I2985b6793a776639214a25bf9732c000b9026bfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167236 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins 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); } -e ... etc. - the rest is truncated