diff options
118 files changed, 897 insertions, 897 deletions
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx index 682dba753d11..d6a87ec057a9 100644 --- a/chart2/qa/extras/PivotChartTest.cxx +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -317,7 +317,7 @@ void PivotChartTest::testRoundtrip() std::vector<double> aReference2 { 101879.458079, 178636.929704, 314626.484864 }; - loadFromURL(u"ods/PivotChartRoundTrip.ods"); + loadFromFile(u"ods/PivotChartRoundTrip.ods"); xChartDoc = getPivotChartDocFromSheet(1, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -372,7 +372,7 @@ void PivotChartTest::testChangePivotTable() uno::Sequence<uno::Any> xSequence; Reference<chart2::XChartDocument> xChartDoc; - loadFromURL(u"ods/PivotTableExample.ods"); + loadFromFile(u"ods/PivotTableExample.ods"); // Check we have the Pivot Table OUString sPivotTableName("DataPilot1"); diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx index 263201daad7c..8639015d6299 100644 --- a/chart2/qa/extras/chart2_trendcalculators.cxx +++ b/chart2/qa/extras/chart2_trendcalculators.cxx @@ -60,7 +60,7 @@ private: void Chart2TrendCalculators::setUp() { ChartTest::setUp(); - loadFromURL(u"ods/trend_calculators.ods"); + loadFromFile(u"ods/trend_calculators.ods"); } void Chart2TrendCalculators::tearDown() diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx index 339a69bb80bd..d13d768c032f 100644 --- a/chart2/qa/extras/chart2dump/chart2dump.cxx +++ b/chart2/qa/extras/chart2dump/chart2dump.cxx @@ -269,7 +269,7 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false) for (const OUString& aTestFile : aTestFiles) { setTestFileName(aTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc (getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); // Check title @@ -382,7 +382,7 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false) for (const OUString& aTestFile : aTestFiles) { setTestFileName(aTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -476,7 +476,7 @@ DECLARE_DUMP_TEST(GridTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -548,7 +548,7 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -621,7 +621,7 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -704,7 +704,7 @@ DECLARE_DUMP_TEST(ColumnBarChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -774,7 +774,7 @@ DECLARE_DUMP_TEST(ChartWallTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0, 0), UNO_SET_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -839,7 +839,7 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -912,7 +912,7 @@ DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -985,7 +985,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false) for (const OUString& sTestFile : aTestFiles) { setTestFileName(sTestFile); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); uno::Reference< chart::XChartDocument > xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -1077,7 +1077,7 @@ DECLARE_DUMP_TEST(PointLineChartTest, Chart2DumpTest, false) DECLARE_DUMP_TEST( PivotChartDataButtonTest, Chart2DumpTest, false ) { setTestFileName( "pivotchart_data_button.ods" ); - loadFromURL(getTestFileName()); + loadFromFile(getTestFileName()); // Check that we have pivot chart in the document uno::Reference<table::XTablePivotCharts> xTablePivotCharts = getTablePivotChartsFromSheet( 1, mxComponent ); diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index b92c933970cc..6958876b1d7d 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -196,7 +196,7 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh // improve the test CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX) { - loadFromURL(u"ods/error_bar.ods"); + loadFromFile(u"ods/error_bar.ods"); { // make sure the ODS import was successful uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); @@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarPropXLSX) { - loadFromURL(u"xlsx/testErrorBarProp.xlsx"); + loadFromFile(u"xlsx/testErrorBarProp.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -255,7 +255,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendline) // Validation fails with // Error: tag name "chart:symbol-image" is not allowed. Possible tag names are: <label-separator> skipValidation(); - loadFromURL(u"ods/trendline.ods"); + loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); saveAndReload("calc8"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); @@ -263,7 +263,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendline) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineOOXML) { - loadFromURL(u"ods/trendline.ods"); + loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); saveAndReload("Calc Office Open XML"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); @@ -271,7 +271,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineOOXML) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineXLS) { - loadFromURL(u"ods/trendline.ods"); + loadFromFile(u"ods/trendline.ods"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); saveAndReload("MS Excel 97"); checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent)); @@ -279,7 +279,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTrendlineXLS) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testMovingAverage) { - loadFromURL(u"ods/moving-type.ods"); + loadFromFile(u"ods/moving-type.ods"); saveAndReload("calc8"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent); @@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart) * an attribute val of index should start from 1 and not from 0. * Which was problem area. */ - loadFromURL(u"docx/testStockChart.docx"); + loadFromFile(u"docx/testStockChart.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -330,7 +330,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testStockChart) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChart) { - loadFromURL(u"docx/testBarChart.docx"); + loadFromFile(u"docx/testBarChart.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -342,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses) { // test crosses val="autoZero" with DOCX { - loadFromURL(u"docx/Bar_horizontal_cone.docx"); + loadFromFile(u"docx/Bar_horizontal_cone.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -350,7 +350,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses) } // tdf#142351: test crossesAt val="-50" with XLSX { - loadFromURL(u"xlsx/tdf142351.xlsx"); + loadFromFile(u"xlsx/tdf142351.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -361,7 +361,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testCrosses) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues) { - loadFromURL(u"docx/scatter-chart-text-x-values.docx"); + loadFromFile(u"docx/scatter-chart-text-x-values.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -410,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterChartTextXValues) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues) { - loadFromURL(u"odt/tdf114657.odt"); + loadFromFile(u"odt/tdf114657.odt"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -425,7 +425,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisValues) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories) { - loadFromURL(u"odt/tdf131143.odt"); + loadFromFile(u"odt/tdf131143.odt"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -437,7 +437,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterXAxisCategories) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable) { - loadFromURL(u"docx/testChartDataTable.docx"); + loadFromFile(u"docx/testChartDataTable.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -449,7 +449,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartDataTable) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartExternalData) { - loadFromURL(u"docx/testMultipleChart.docx"); + loadFromFile(u"docx/testMultipleChart.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -463,7 +463,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag) // after saving file. // This test case tests whether embeddings files grabbagged properly in correct object. - loadFromURL(u"docx/testMultiplechartembeddings.docx" ); + loadFromFile(u"docx/testMultiplechartembeddings.docx" ); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag(0); @@ -498,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad) { - loadFromURL(u"docx/testAreaChartLoad.docx"); + loadFromFile(u"docx/testAreaChartLoad.docx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -512,7 +512,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAreaChartLoad) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars) { - loadFromURL(u"docx/UpDownBars.docx"); + loadFromFile(u"docx/UpDownBars.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -521,7 +521,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testUpDownBars) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart) { - loadFromURL(u"docx/doughnutChart.docx"); + loadFromFile(u"docx/doughnutChart.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -531,7 +531,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDoughnutChart) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits) { - loadFromURL(u"docx/DisplayUnits.docx"); + loadFromFile(u"docx/DisplayUnits.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -541,7 +541,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDisplayUnits) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill) { - loadFromURL(u"docx/fdo74115_WallGradientFill.docx"); + loadFromFile(u"docx/fdo74115_WallGradientFill.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -551,7 +551,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallGradientFill) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill) { - loadFromURL(u"docx/fdo74115_WallBitmapFill.docx"); + loadFromFile(u"docx/fdo74115_WallBitmapFill.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -560,7 +560,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo74115WallBitmapFill) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle) { - loadFromURL(u"odt/testPieChartWallLineStyle.odt"); + loadFromFile(u"odt/testPieChartWallLineStyle.odt"); // FIXME: validation error in OOXML export: Errors: 9 skipValidation(); @@ -575,7 +575,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartWallLineStyle) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX) { - loadFromURL(u"docx/fdo78290_Line_Chart_Marker_x.docx"); + loadFromFile(u"docx/fdo78290_Line_Chart_Marker_x.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -587,7 +587,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290LineChartMarkerX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX) { - loadFromURL(u"docx/fdo78290_Scatter_Chart_Marker_x.docx"); + loadFromFile(u"docx/fdo78290_Scatter_Chart_Marker_x.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -600,7 +600,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290ScatterChartMarkerX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX) { - loadFromURL(u"docx/fdo78290_Combination_Chart_Marker_x.docx"); + loadFromFile(u"docx/fdo78290_Combination_Chart_Marker_x.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -611,7 +611,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testFdo78290CombinationChartMarkerX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testTdf126115IndividualMarker) { // Check individual marker properties. - loadFromURL(u"xlsx/tdf126115.xlsx"); + loadFromFile(u"xlsx/tdf126115.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -662,7 +662,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatODS) } aTest; - loadFromURL(u"ods/axis-numformats-linked.ods"); + loadFromFile(u"ods/axis-numformats-linked.ods"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); aTest.check(xChartDoc); @@ -718,7 +718,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testAxisNumberFormatXLS) } aTest; - loadFromURL(u"xls/axis_sourceformatting.xls" ); + loadFromFile(u"xls/axis_sourceformatting.xls" ); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet( 0, mxComponent ); aTest.check( xChartDoc, true, util::NumberFormat::PERCENT ); @@ -817,7 +817,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX) } aTest; - loadFromURL(u"docx/data-label-borders.docx"); + loadFromFile(u"docx/data-label-borders.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); @@ -848,7 +848,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBordersDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX) { - loadFromURL(u"docx/3d-bar-label.docx"); + loadFromFile(u"docx/3d-bar-label.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -868,7 +868,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabel3DChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX) { - loadFromURL(u"docx/bar-chart-labels.docx"); + loadFromFile(u"docx/bar-chart-labels.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -884,7 +884,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelBarChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX) { - loadFromURL(u"docx/clustered-bar-chart-labels.docx"); + loadFromFile(u"docx/clustered-bar-chart-labels.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -902,7 +902,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelClusteredBarChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX) { - loadFromURL(u"docx/radar-chart-labels.docx"); + loadFromFile(u"docx/radar-chart-labels.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -918,7 +918,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelRadarChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX) { - loadFromURL(u"docx/doughnut-chart-labels.docx"); + loadFromFile(u"docx/doughnut-chart-labels.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -937,7 +937,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDoughnutChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelAreaChartDOCX) { - loadFromURL(u"docx/area-chart-labels.docx"); + loadFromFile(u"docx/area-chart-labels.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -960,7 +960,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDefaultLineChartDOCX) // label position (2010 does). Make sure its default data label position // is RIGHT when exporting. - loadFromURL(u"docx/line-chart-label-default-placement.docx"); + loadFromFile(u"docx/line-chart-label-default-placement.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -979,7 +979,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testDataLabelDefaultLineChartDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps) { - loadFromURL(u"xlsx/tdf122915.xlsx"); + loadFromFile(u"xlsx/tdf122915.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -995,7 +995,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testIndividualDataLabelProps) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testBarChartRotation) { - loadFromURL(u"docx/barChartRotation.docx"); + loadFromFile(u"docx/barChartRotation.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1011,7 +1011,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart) docPr Id is being repeated, ECMA 20.4.2.5 says that the docPr Id should be unique, ensuring the same here. */ - loadFromURL(u"docx/FDO74430.docx"); + loadFromFile(u"docx/FDO74430.docx"); // FIXME: validation error in OOXML export: Errors: 5 skipValidation(); @@ -1028,7 +1028,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testShapeFollowedByChart) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels) { - loadFromURL(u"docx/PieChartDataLabels.docx"); + loadFromFile(u"docx/PieChartDataLabels.docx"); // FIXME: validation error in OOXML export: Errors: 19 skipValidation(); @@ -1041,7 +1041,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartDataLabels) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder) { - loadFromURL(u"docx/testSeriesIdxOrder.docx"); + loadFromFile(u"docx/testSeriesIdxOrder.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1051,7 +1051,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSeriesIdxOrder) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels) { - loadFromURL(u"odt/scatter-plot-labels.odt"); + loadFromFile(u"odt/scatter-plot-labels.odt"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testScatterPlotLabels) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS) { - loadFromURL(u"ods/ErrorBarRange.ods"); + loadFromFile(u"ods/ErrorBarRange.ods"); saveAndReload("calc8"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); @@ -1112,7 +1112,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testErrorBarDataRangeODS) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash) { - loadFromURL(u"docx/FDO75975.docx"); + loadFromFile(u"docx/FDO75975.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1120,7 +1120,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testChartCrash) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testPieChartRotation) { - loadFromURL(u"docx/pieChartRotation.docx"); + loadFromFile(u"docx/pieChartRotation.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1134,7 +1134,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag) // after saving file. // This test case tests whether embeddings files grabbagged properly in correct object. - loadFromURL(u"docx/testchartoleobjectembeddings.docx" ); + loadFromFile(u"docx/testchartoleobjectembeddings.docx" ); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag(0); @@ -1205,7 +1205,7 @@ void checkSheetForGapWidthAndOverlap(uno::Reference< chart2::XChartDocument > co CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX) { - loadFromURL(u"xlsx/gapWidth.xlsx"); + loadFromFile(u"xlsx/gapWidth.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60); @@ -1224,7 +1224,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testGapWidthXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines) { - loadFromURL(u"ods/smoothedLines.ods"); + loadFromFile(u"ods/smoothedLines.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1233,7 +1233,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testSmoothedLines) CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testLabelStringODS) { - loadFromURL(u"ods/labelString.ods"); + loadFromFile(u"ods/labelString.ods"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); Reference< chart2::data::XDataSequence > xLabelSeq = diff --git a/chart2/qa/extras/chart2export2.cxx b/chart2/qa/extras/chart2export2.cxx index f17e35c1b24d..f5378dc9444c 100644 --- a/chart2/qa/extras/chart2export2.cxx +++ b/chart2/qa/extras/chart2export2.cxx @@ -31,7 +31,7 @@ public: CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX) { - loadFromURL(u"xlsx/add_series_secondary_axis.xlsx"); + loadFromFile(u"xlsx/add_series_secondary_axis.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); // Second series Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 1); @@ -52,7 +52,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testSetSeriesToSecondaryAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX) { // Original file was created with MS Office - loadFromURL(u"xlsx/combined_chart_secondary_axis.xlsx"); + loadFromFile(u"xlsx/combined_chart_secondary_axis.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCombinedChartSecondaryAxisODS) { // Original file was created with LibreOffice - loadFromURL(u"ods/combined_chart_secondary_axis.ods"); + loadFromFile(u"ods/combined_chart_secondary_axis.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX) // Original files were created with MS Office { - loadFromURL(u"xlsx/tdf127777.xlsx"); + loadFromFile(u"xlsx/tdf127777.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX) "val"_ostr, "between"); } { - loadFromURL(u"xlsx/tdf132076.xlsx"); + loadFromFile(u"xlsx/tdf132076.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -134,7 +134,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis) { // Original file was created with MS Office (the category axis is deleted in the file) - loadFromURL(u"xlsx/tdf128633.xlsx"); + loadFromFile(u"xlsx/tdf128633.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -145,7 +145,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenWithDeletedAxis) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS) { // Original file was created with LibreOffice - loadFromURL(u"ods/test_CrossBetween.ods"); + loadFromFile(u"ods/test_CrossBetween.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -155,7 +155,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCrossBetweenODS) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX) { - loadFromURL(u"xlsx/axis_title_rotation.xlsx"); + loadFromFile(u"xlsx/axis_title_rotation.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -167,7 +167,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX) { - loadFromURL(u"docx/testAxisTitlePosition.docx"); + loadFromFile(u"docx/testAxisTitlePosition.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitlePositionDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX) { - loadFromURL(u"odt/axis-position.odt"); + loadFromFile(u"odt/axis-position.odt"); // FIXME: validation error in OOXML export: Errors: 3 skipValidation(); @@ -216,7 +216,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisCrossBetweenDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX) { - loadFromURL(u"xlsx/pie_chart_datapoint_explosion.xlsx"); + loadFromFile(u"xlsx/pie_chart_datapoint_explosion.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -227,7 +227,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testPieChartDataPointExplosionXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabel) { - loadFromURL(u"pptx/tdf115107.pptx"); + loadFromFile(u"pptx/tdf115107.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -351,7 +351,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName) { // ODF { - loadFromURL(u"ods/ser_labels.ods"); + loadFromFile(u"ods/ser_labels.ods"); saveAndReload("calc8"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataSeriesName) // OOXML { - loadFromURL(u"xlsx/ser_labels.xlsx"); + loadFromFile(u"xlsx/ser_labels.xlsx"); saveAndReload("Calc Office Open XML"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -383,7 +383,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - loadFromURL(u"xlsx/testCustomPosDataLabels.xlsx"); + loadFromFile(u"xlsx/testCustomPosDataLabels.xlsx"); { save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); @@ -409,7 +409,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel) CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0742140311063737, nY, 1e-7); } - loadFromURL(u"docx/testTdf108110.docx"); + loadFromFile(u"docx/testTdf108110.docx"); { save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -435,7 +435,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.172648731408574, nY, 1e-7); } - loadFromURL(u"ods/tdf136024.ods"); + loadFromFile(u"ods/tdf136024.ods"); { saveAndReload("calc8"); // tdf#136024: test custom position of pie chart data label after an ods export @@ -457,7 +457,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomPositionofDataLabel) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomDataLabelMultipleSeries) { - loadFromURL(u"pptx/tdf115107-2.pptx"); + loadFromFile(u"pptx/tdf115107-2.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -522,7 +522,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines) // FIXME: validation error in OOXML export: Errors: 2 skipValidation(); - loadFromURL(u"xlsx/testTdf90749.xlsx"); + loadFromFile(u"xlsx/testTdf90749.xlsx"); { save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); @@ -536,7 +536,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines) "c15:showLeaderLines"_ostr, "val"_ostr, "0"); } - loadFromURL(u"docx/MSO_Custom_Leader_Line.docx"); + loadFromFile(u"docx/MSO_Custom_Leader_Line.docx"); { save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); @@ -551,7 +551,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX) { - loadFromURL(u"pptx/tdf115859.pptx"); + loadFromFile(u"pptx/tdf115859.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -564,7 +564,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX) { - loadFromURL(u"docx/testLabelSeparator.docx"); + loadFromFile(u"docx/testLabelSeparator.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -589,7 +589,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLabelSeparatorExportDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX) { - loadFromURL(u"pptx/testChartTitlePropertiesColorFill.pptx"); + loadFromFile(u"pptx/testChartTitlePropertiesColorFill.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -600,7 +600,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesColorFillPPTX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX) { - loadFromURL(u"pptx/testChartTitlePropertiesGradientFill.pptx"); + loadFromFile(u"pptx/testChartTitlePropertiesGradientFill.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -615,7 +615,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesGradientFillPPTX CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX) { - loadFromURL(u"pptx/testChartTitlePropertiesBitmapFill.pptx"); + loadFromFile(u"pptx/testChartTitlePropertiesBitmapFill.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -626,7 +626,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartTitlePropertiesBitmapFillPPTX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation) { - loadFromURL(u"xlsx/xAxisLabelsRotation.xlsx"); + loadFromFile(u"xlsx/xAxisLabelsRotation.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc1); @@ -638,7 +638,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testxAxisLabelsRotation) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX) { - loadFromURL(u"ods/multilevelcat.ods"); + loadFromFile(u"ods/multilevelcat.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -672,7 +672,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX) { - loadFromURL(u"odt/multilevelcat.odt"); + loadFromFile(u"odt/multilevelcat.odt"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -706,7 +706,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testMultipleCategoryAxisLablesDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163) { - loadFromURL(u"pptx/tdf116163.pptx"); + loadFromFile(u"pptx/tdf116163.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -717,7 +717,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf116163) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824) { - loadFromURL(u"xlsx/tdf111824.xlsx"); + loadFromFile(u"xlsx/tdf111824.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -732,7 +732,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf111824) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis) { - loadFromURL(u"xlsx/test3DAreaChartZAxis.xlsx"); + loadFromFile(u"xlsx/test3DAreaChartZAxis.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -747,7 +747,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, test3DAreaChartZAxis) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029) { - loadFromURL(u"odp/tdf119029.odp"); + loadFromFile(u"odp/tdf119029.odp"); // Only use "chart", without number, because the number depends on the previous tests save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); @@ -760,7 +760,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf119029) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022) { - loadFromURL(u"odt/tdf108022.odt"); + loadFromFile(u"odt/tdf108022.odt"); saveAndReload("Office Open XML Text"); // assert we really have two charts @@ -772,7 +772,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf108022) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744) { - loadFromURL(u"docx/tdf121744.docx"); + loadFromFile(u"docx/tdf121744.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -790,7 +790,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121744) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189) { - loadFromURL(u"odp/tdf121189.odp"); + loadFromFile(u"odp/tdf121189.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); @@ -804,7 +804,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf121189) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031) { //Checks pie chart data label format. - loadFromURL(u"xlsx/tdf122031.xlsx"); + loadFromFile(u"xlsx/tdf122031.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -828,7 +828,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf122031) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012) { - loadFromURL(u"xlsx/tdf115012.xlsx"); + loadFromFile(u"xlsx/tdf115012.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -838,7 +838,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf115012) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118) { - loadFromURL(u"xlsx/tdf134118.xlsx"); + loadFromFile(u"xlsx/tdf134118.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -852,7 +852,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134118) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText) { - loadFromURL(u"docx/tdf123206.docx"); + loadFromFile(u"docx/tdf123206.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -872,7 +872,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123206_customLabelText) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText) { - loadFromURL(u"docx/testCustomlabeltext.docx"); + loadFromFile(u"docx/testCustomlabeltext.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -911,7 +911,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomLabelText) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries) { - loadFromURL(u"xlsx/deleted_legend_entry.xlsx"); + loadFromFile(u"xlsx/deleted_legend_entry.xlsx"); { saveAndReload("Calc Office Open XML"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -924,7 +924,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries) CPPUNIT_ASSERT(!bShowLegendEntry); } - loadFromURL(u"xlsx/deleted_legend_entry2.xlsx"); + loadFromFile(u"xlsx/deleted_legend_entry2.xlsx"); { saveAndReload("Calc Office Open XML"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -950,7 +950,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDeletedLegendEntries) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316) { - loadFromURL(u"pptx/tdf60316.pptx"); + loadFromFile(u"pptx/tdf60316.pptx"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -962,7 +962,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf60316) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225) { - loadFromURL(u"docx/piechart_deleted_legend_entry.docx"); + loadFromFile(u"docx/piechart_deleted_legend_entry.docx"); saveAndReload("Office Open XML Text"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -977,7 +977,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf130225) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857) { - loadFromURL(u"ods/tdf59857.ods"); + loadFromFile(u"ods/tdf59857.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -992,7 +992,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf59857) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076) { - loadFromURL(u"xlsx/auto_marker_excel10.xlsx"); + loadFromFile(u"xlsx/auto_marker_excel10.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1008,7 +1008,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf126076) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330) { - loadFromURL(u"ods/legend_overlay.ods"); + loadFromFile(u"ods/legend_overlay.ods"); saveAndReload("calc8"); { uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent); @@ -1033,7 +1033,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf75330) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792) { - loadFromURL(u"docx/MSO_axis_position.docx"); + loadFromFile(u"docx/MSO_axis_position.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1048,7 +1048,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf127792) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979) { - loadFromURL(u"ods/tdf131115.ods"); + loadFromFile(u"ods/tdf131115.ods"); { saveAndReload("calc8"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -1064,7 +1064,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf131979) !blinknumberformattosource); } - loadFromURL(u"ods/tdf131979.ods"); + loadFromFile(u"ods/tdf131979.ods"); { saveAndReload("calc8"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -1087,7 +1087,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076) skipValidation(); { - loadFromURL(u"ods/tdf132076.ods"); + loadFromFile(u"ods/tdf132076.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1097,7 +1097,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076) "sourceLinked"_ostr, "0"); } { - loadFromURL(u"xlsx/tdf132076.xlsx"); + loadFromFile(u"xlsx/tdf132076.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1110,7 +1110,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132076) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812) { - loadFromURL(u"odp/ellipticalGradientFill.odp"); + loadFromFile(u"odp/ellipticalGradientFill.odp"); save("Impress MS PowerPoint 2007 XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1132,7 +1132,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf125812) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190) { - loadFromURL(u"xlsx/tdf133190_tdf133191.xlsx"); + loadFromFile(u"xlsx/tdf133190_tdf133191.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -1154,7 +1154,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133190) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191) { - loadFromURL(u"xlsx/tdf133190_tdf133191.xlsx"); + loadFromFile(u"xlsx/tdf133190_tdf133191.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -1172,7 +1172,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf133191) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594) { - loadFromURL(u"xlsx/chart_pie2007.xlsx"); + loadFromFile(u"xlsx/chart_pie2007.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1182,7 +1182,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf132594) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255) { - loadFromURL(u"docx/tdf134255.docx"); + loadFromFile(u"docx/tdf134255.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1209,7 +1209,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134255) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977) { - loadFromURL(u"xlsx/custom_data_label.xlsx"); + loadFromFile(u"xlsx/custom_data_label.xlsx"); //import test uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -1239,7 +1239,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf134977) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647) { - loadFromURL(u"xlsx/empty_chart.xlsx"); + loadFromFile(u"xlsx/empty_chart.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1249,7 +1249,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf123647) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267) { - loadFromURL(u"xlsx/tdf136267.xlsx"); + loadFromFile(u"xlsx/tdf136267.xlsx"); // FIXME: validation error in OOXML export: Errors: 2 skipValidation(); @@ -1266,7 +1266,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf136267) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataLabelPlacementPieChart) { - loadFromURL(u"xlsx/tdf134978.xlsx"); + loadFromFile(u"xlsx/tdf134978.xlsx"); saveAndReload("calc8"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW); @@ -1282,7 +1282,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataLabelPlacementPieChart) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917) { - loadFromURL(u"xlsx/tdf137917.xlsx"); + loadFromFile(u"xlsx/tdf137917.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -1305,7 +1305,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf137917) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204) { - loadFromURL(u"xlsx/tdf138204.xlsx"); + loadFromFile(u"xlsx/tdf138204.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1378,7 +1378,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138204) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181) { - loadFromURL(u"xlsx/piechart_deleted_legendentry.xlsx"); + loadFromFile(u"xlsx/piechart_deleted_legendentry.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); @@ -1404,7 +1404,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf138181) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText) { - loadFromURL(u"ods/tdf72776.ods"); + loadFromFile(u"ods/tdf72776.ods"); saveAndReload("calc8"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -1420,7 +1420,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testCustomShapeText) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX) { - loadFromURL(u"xlsx/tdf128621.xlsx"); + loadFromFile(u"xlsx/tdf128621.xlsx"); saveAndReload("Calc Office Open XML"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -1448,7 +1448,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX) { - loadFromURL(u"docx/tdf143130.docx"); + loadFromFile(u"docx/tdf143130.docx"); saveAndReload("Office Open XML Text"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); @@ -1476,7 +1476,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testuserShapesDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX) { - loadFromURL(u"xlsx/tdf143127.xlsx"); + loadFromFile(u"xlsx/tdf143127.xlsx"); saveAndReload("Calc Office Open XML"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); @@ -1504,7 +1504,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testGraphicBlipXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX) { - loadFromURL(u"xlsx/chart_with_name_range.xlsx"); + loadFromFile(u"xlsx/chart_with_name_range.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -1520,7 +1520,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNameRangeXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942) { - loadFromURL(u"xlsx/tdf143942.xlsx"); + loadFromFile(u"xlsx/tdf143942.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1590,7 +1590,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf143942) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX) { - loadFromURL(u"pptx/bnc889755.pptx"); + loadFromFile(u"pptx/bnc889755.pptx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -1632,7 +1632,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDateCategoriesPPTX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testDataTableImportExport) { - loadFromURL(u"xlsx/ChartDataTable.xlsx"); + loadFromFile(u"xlsx/ChartDataTable.xlsx"); { uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); diff --git a/chart2/qa/extras/chart2export3.cxx b/chart2/qa/extras/chart2export3.cxx index e06568f5f1e8..59416198ce0f 100644 --- a/chart2/qa/extras/chart2export3.cxx +++ b/chart2/qa/extras/chart2export3.cxx @@ -30,7 +30,7 @@ public: CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107) { - loadFromURL(u"xlsx/tdf108107.xlsx"); + loadFromFile(u"xlsx/tdf108107.xlsx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -45,7 +45,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf108107) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139) { - loadFromURL(u"xlsx/tdf114139.xlsx"); + loadFromFile(u"xlsx/tdf114139.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf114139) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224) { - loadFromURL(u"ods/tdf64224.ods"); + loadFromFile(u"ods/tdf64224.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf64224) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX) { - loadFromURL(u"docx/testChartTitlePropertiesColorFill.docx"); + loadFromFile(u"docx/testChartTitlePropertiesColorFill.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX) { - loadFromURL(u"docx/testChartTitlePropertiesGradientFill.docx"); + loadFromFile(u"docx/testChartTitlePropertiesGradientFill.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillDOCX CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX) { - loadFromURL(u"docx/testChartTitlePropertiesBitmapFill.docx"); + loadFromFile(u"docx/testChartTitlePropertiesBitmapFill.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX) { // Test color gradient (two color) with gradient transparency - loadFromURL(u"docx/testColorGradientWithTransparency.docx"); + loadFromFile(u"docx/testColorGradientWithTransparency.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS) { // Test color gradient (two color) with simple transparency - loadFromURL(u"ods/testColorGradientWithTransparency.ods"); + loadFromFile(u"ods/testColorGradientWithTransparency.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -129,7 +129,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientWithTransparencyODS) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX) { // Test color gradient (two color) stop of the first color - loadFromURL(u"xlsx/tdf128619.xlsx"); + loadFromFile(u"xlsx/tdf128619.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -141,7 +141,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testColorGradientStopXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX) { - loadFromURL(u"docx/tdf128794.docx"); + loadFromFile(u"docx/tdf128794.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -153,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRadialColorGradientDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX) { - loadFromURL(u"docx/testBarChartDataPointPropDOCX.docx"); + loadFromFile(u"docx/testBarChartDataPointPropDOCX.docx"); save("Office Open XML Text"); xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -172,7 +172,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropDOCX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos) { - loadFromURL(u"docx/fdo83058_dlblPos.docx"); + loadFromFile(u"docx/fdo83058_dlblPos.docx"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -188,7 +188,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testFdo83058dlblPos) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX) { - loadFromURL(u"xlsx/autotitledel_2007.xlsx"); + loadFromFile(u"xlsx/autotitledel_2007.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDelXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX) { - loadFromURL(u"xlsx/dispBlanksAs_2007.xlsx"); + loadFromFile(u"xlsx/dispBlanksAs_2007.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDispBlanksAsXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX) { - loadFromURL(u"xlsx/markerColor.xlsx"); + loadFromFile(u"xlsx/markerColor.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMarkerColorXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX) { - loadFromURL(u"xlsx/markerColor.xlsx"); + loadFromFile(u"xlsx/markerColor.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -224,7 +224,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testRoundedCornersXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisNumberFormatXLSX) { - loadFromURL(u"ods/axis_number_format.ods"); + loadFromFile(u"ods/axis_number_format.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -241,7 +241,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX) // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); - loadFromURL(u"ods/tdf123774.ods"); + loadFromFile(u"ods/tdf123774.ods"); { save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); @@ -253,7 +253,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX) assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt"_ostr, "sourceLinked"_ostr, "0"); } - loadFromURL(u"xlsx/tdf130986.xlsx"); + loadFromFile(u"xlsx/tdf130986.xlsx"); { save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); @@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataPointLabelNumberFormatXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX) { - loadFromURL(u"xlsx/data_label.xlsx"); + loadFromFile(u"xlsx/data_label.xlsx"); Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent); Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0); Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW); @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelDefaultValuesXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor) { - loadFromURL(u"xlsx/data_labels_fill_color.xlsx"); + loadFromFile(u"xlsx/data_labels_fill_color.xlsx"); Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent); Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0); Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW); @@ -300,7 +300,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataLabelFillColor) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX) { - loadFromURL(u"xlsx/chart_title.xlsx"); + loadFromFile(u"xlsx/chart_title.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -309,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleOverlayXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX) { - loadFromURL(u"xlsx/bar_chart_simple.xlsx"); + loadFromFile(u"xlsx/bar_chart_simple.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testInvertIfNegativeXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX) { - loadFromURL(u"xlsx/bubble_chart_simple.xlsx"); + loadFromFile(u"xlsx/bubble_chart_simple.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -329,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBubble3DXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX) { - loadFromURL(u"xlsx/no_marker.xlsx"); + loadFromFile(u"xlsx/no_marker.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -340,7 +340,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testNoMarkerXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX) { - loadFromURL(u"xlsx/title_manual_layout.xlsx"); + loadFromFile(u"xlsx/title_manual_layout.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -364,7 +364,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleManualLayoutXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX) { - loadFromURL(u"xlsx/plot_area_manual_layout.xlsx"); + loadFromFile(u"xlsx/plot_area_manual_layout.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -398,7 +398,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotAreaManualLayoutXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX) { - loadFromURL(u"xlsx/legend_manual_layout.xlsx"); + loadFromFile(u"xlsx/legend_manual_layout.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -435,7 +435,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testLegendManualLayoutXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle) { - loadFromURL(u"ods/testChartSubTitle.ods"); + loadFromFile(u"ods/testChartSubTitle.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartSubTitle) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle) { - loadFromURL(u"ods/testChartMainWithSubTitle.ods"); + loadFromFile(u"ods/testChartMainWithSubTitle.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -466,7 +466,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartMainWithSubTitle) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted) { - loadFromURL(u"xlsx/testAutoTitleDeleted.xlsx"); + loadFromFile(u"xlsx/testAutoTitleDeleted.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -475,7 +475,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAutoTitleDeleted) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX) { - loadFromURL(u"xlsx/testChartTitlePropertiesColorFill.xlsx"); + loadFromFile(u"xlsx/testChartTitlePropertiesColorFill.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -485,7 +485,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesColorFillXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX) { - loadFromURL(u"xlsx/testChartTitlePropertiesGradientFill.xlsx"); + loadFromFile(u"xlsx/testChartTitlePropertiesGradientFill.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -496,7 +496,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesGradientFillXLSX CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX) { - loadFromURL(u"xlsx/testChartTitlePropertiesBitmapFill.xlsx"); + loadFromFile(u"xlsx/testChartTitlePropertiesBitmapFill.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -506,7 +506,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testChartTitlePropertiesBitmapFillXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartDataPointPropXLSX) { - loadFromURL(u"xlsx/testBarChartDataPointPropXLSX.xlsx"); + loadFromFile(u"xlsx/testBarChartDataPointPropXLSX.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -563,7 +563,7 @@ void checkSheetForGapWidthAndOverlap(uno::Reference< chart2::XChartDocument > co CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataseriesOverlapStackedChartXLSX) { - loadFromURL(u"xlsx/testDataseriesOverlapStackedChart.xlsx"); + loadFromFile(u"xlsx/testDataseriesOverlapStackedChart.xlsx"); // test the overlap value of a simple Stacked Column Chart uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); @@ -584,7 +584,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testDataseriesOverlapStackedChartXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX) { - loadFromURL(u"xlsx/axis_character_properties.xlsx"); + loadFromFile(u"xlsx/axis_character_properties.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -602,7 +602,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testAxisCharacterPropertiesXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX) { - loadFromURL(u"xlsx/title_character_properties.xlsx"); + loadFromFile(u"xlsx/title_character_properties.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -616,7 +616,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTitleCharacterPropertiesXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX) { - loadFromURL(u"xlsx/hidden_cells.xlsx"); + loadFromFile(u"xlsx/hidden_cells.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -626,7 +626,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testPlotVisOnlyXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX) { - loadFromURL(u"xlsx/tdf90876.xlsx"); + loadFromFile(u"xlsx/tdf90876.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -636,7 +636,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartVaryColorsXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161) { - loadFromURL(u"ods/tdf96161.ods"); + loadFromFile(u"ods/tdf96161.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -646,7 +646,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf96161) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3) { - loadFromURL(u"docx/TableOnPage3.docx"); + loadFromFile(u"docx/TableOnPage3.docx"); // FIXME: validation error in OOXML export: Errors: 2 skipValidation(); @@ -666,7 +666,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTableOnPage3) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX) { - loadFromURL(u"ods/multiple_axis.ods"); + loadFromFile(u"ods/multiple_axis.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -682,7 +682,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testMultipleAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX) { - loadFromURL(u"ods/secondary_axis.ods"); + loadFromFile(u"ods/secondary_axis.ods"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -699,7 +699,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testSecondaryAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX) { - loadFromURL(u"xlsx/testSecondaryAxis.xlsx"); + loadFromFile(u"xlsx/testSecondaryAxis.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -719,7 +719,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testBarChartSecondaryAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf148142) { // The document contains a line chart with "Between tick marks" X axis position. - loadFromURL(u"ods/tdf148142.ods"); + loadFromFile(u"ods/tdf148142.ods"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx index 52e0ff414c63..c7de713df1b2 100644 --- a/chart2/qa/extras/chart2geometry.cxx +++ b/chart2/qa/extras/chart2geometry.cxx @@ -75,7 +75,7 @@ static OString OU2O(std::u16string_view sOUSource) void Chart2GeometryTest::testTdf135184RoundLineCap() { // It tests chart area, data series line and regression-curve line. - loadFromURL(u"xlsx/tdf135184RoundLineCap.xlsx"); + loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx"); save("calc8"); xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -104,7 +104,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap() void Chart2GeometryTest::testTdf135184RoundLineCap2() { // It tests legend, data series sector and title. - loadFromURL(u"xlsx/tdf135184RoundLineCap2.xlsx"); + loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx"); save("calc8"); xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -135,7 +135,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2() void Chart2GeometryTest::testTdf135184RoundLineCap3() { // It tests chart area, data series line and regression-curve line. - loadFromURL(u"xlsx/tdf135184RoundLineCap.xlsx"); + loadFromFile(u"xlsx/tdf135184RoundLineCap.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -153,7 +153,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3() void Chart2GeometryTest::testTdf135184RoundLineCap4() { // It tests legend, data series sector and title. - loadFromURL(u"xlsx/tdf135184RoundLineCap2.xlsx"); + loadFromFile(u"xlsx/tdf135184RoundLineCap2.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart1.xml"); CPPUNIT_ASSERT(pXmlDoc); @@ -170,7 +170,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export() { // chart area with color gradient and solid transparency // Without the patch the transparency was lost in saved pptx file. - loadFromURL(u"odp/tdf128345_ChartArea_CG_TS.odp"); + loadFromFile(u"odp/tdf128345_ChartArea_CG_TS.odp"); // MCGR: Similar to testTdf128345Legend_CS_TG_axial_export: // Checked that it works with the existing import file, @@ -202,7 +202,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import() // but will change with ODF MCGR im/export again. We will need to // update the *.odp input file. Disable unclear values for now and // adapt when ODF im/export for MCGR is integrated - loadFromURL(u"pptx/tdf128345_ChartArea_CG_TS.pptx"); + loadFromFile(u"pptx/tdf128345_ChartArea_CG_TS.pptx"); // Find transparency gradient name save("impress8"); @@ -237,7 +237,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export() { // chart wall with solid color and transparency gradient // Without the patch the transparency was lost. - loadFromURL(u"odp/tdf128345_ChartWall_CS_TG.odp"); + loadFromFile(u"odp/tdf128345_ChartWall_CS_TG.odp"); // Make sure the chart has a gradient with transparency in gradient stops in saved pptx file. save("Impress MS PowerPoint 2007 XML"); @@ -256,7 +256,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import() { // This works on the file, which was exported from file tdf128345_ChartWall_CS_TG.odp to pptx. // Make sure chart wall has transparency when pptx document is resaved as odp. - loadFromURL(u"pptx/tdf128345_ChartWall_CS_TG.pptx"); + loadFromFile(u"pptx/tdf128345_ChartWall_CS_TG.pptx"); // Find transparency gradient name save("impress8"); @@ -289,7 +289,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export() { // legend with solid color and transparency gradient // Without the patch the transparency was lost. - loadFromURL(u"odp/tdf128345_Legend_CS_TG_axial.odp"); + loadFromFile(u"odp/tdf128345_Legend_CS_TG_axial.odp"); // Make sure the chart has a gradient with transparency in gradient stops in saved pptx file. save("Impress MS PowerPoint 2007 XML"); @@ -318,7 +318,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import() { // This works on the file, which was exported from file tdf128345_Legend_CS_TG_axial.odp to pptx. // Error was, that in case of axial not the middle value was taken but start and end value. - loadFromURL(u"pptx/tdf128345_Legend_CS_TG_axial.pptx"); + loadFromFile(u"pptx/tdf128345_Legend_CS_TG_axial.pptx"); // Find transparency gradient name save("impress8"); @@ -351,7 +351,7 @@ void Chart2GeometryTest::testTdf135366LabelOnSeries() { // Error was, that the fill and line properties of a <chart:data-label> were not // imported at all. Here they should be at the series. - loadFromURL(u"ods/tdf135366_data_label_series.ods"); + loadFromFile(u"ods/tdf135366_data_label_series.ods"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); @@ -389,7 +389,7 @@ void Chart2GeometryTest::testTdf135366LabelOnPoint() { // Error was, that the fill and line properties of a <chart:data-label> were not // imported at all. Here they should be at point 2. - loadFromURL(u"odt/tdf135366_data_label_point.odt"); + loadFromFile(u"odt/tdf135366_data_label_point.odt"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); @@ -436,7 +436,7 @@ void Chart2GeometryTest::testTdf135366LabelExport() // Error was, that line and fill properties were not exported as // graphic-properties of a <chart:data-label> element, but only // as loext chart-properties of the <chart:data-point> element. - loadFromURL(u"odt/tdf135366_data_label_export.odt"); + loadFromFile(u"odt/tdf135366_data_label_export.odt"); // FIXME: Error: unexpected attribute "loext:label-stroke-color" skipValidation(); @@ -468,7 +468,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText() // although the used <chart:data-label> element exists since ODF 1.2. const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion()); SetODFDefaultVersion(SvtSaveOptions::ODFVER_012); - loadFromURL(u"pptx/tdf135366_CustomLabelText.pptx"); + loadFromFile(u"pptx/tdf135366_CustomLabelText.pptx"); save("impress8"); xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml"); CPPUNIT_ASSERT(pXmlDoc); diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index b219baccad74..f7324c94754f 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -50,7 +50,7 @@ protected: // split method up into smaller chunks for more detailed tests CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo60083) { - loadFromURL(u"ods/fdo60083.ods"); + loadFromFile(u"ods/fdo60083.ods"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo60083) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarRange) { - loadFromURL(u"ods/error_bar_range.ods"); + loadFromFile(u"ods/error_bar_range.ods"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarRange) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testErrorBarFormatting) { - loadFromURL(u"ods/error_bar_properties.ods"); + loadFromFile(u"ods/error_bar_properties.ods"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -169,7 +169,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSteppedLines) chart2::CurveStyle_STEP_CENTER_Y }; - loadFromURL(u"ods/stepped_lines.ods"); + loadFromFile(u"ods/stepped_lines.ods"); for(sal_Int32 nSheet = 0; nSheet < MAXSHEET; ++nSheet) { uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet( nSheet, mxComponent ); @@ -197,7 +197,7 @@ static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< ch CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODSChartSeries) { - loadFromURL(u"ods/chart.ods"); + loadFromFile(u"ods/chart.ods"); uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW); uno::Sequence < OUString > seriesList = getChartColumnDescriptions( xChart1Doc); CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); @@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODSChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSXChartSeries) { - loadFromURL(u"xlsx/chart.xlsx"); + loadFromFile(u"xlsx/chart.xlsx"); uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW); uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc ); CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); @@ -219,7 +219,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSXChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSChartSeries) { - loadFromURL(u"xls/chart.xls"); + loadFromFile(u"xls/chart.xls"); uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW); uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc ); CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]); @@ -230,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testXLSChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODTChartSeries) { - loadFromURL(u"odt/chart.odt"); + loadFromFile(u"odt/chart.odt"); uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent); CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); @@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODTChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCChartSeries) { - loadFromURL(u"doc/chart.doc"); + loadFromFile(u"doc/chart.doc"); uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent); CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); @@ -249,7 +249,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartSeries) { - loadFromURL(u"docx/chart.docx"); + loadFromFile(u"docx/chart.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartEmptySeries) { - loadFromURL(u"docx/tdf125337.docx"); + loadFromFile(u"docx/tdf125337.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -291,7 +291,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartEmptySeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf81396) { - loadFromURL(u"xlsx/tdf81396.xlsx"); + loadFromFile(u"xlsx/tdf81396.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -308,7 +308,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf81396) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartErrorBars) { - loadFromURL(u"pptx/tdf127720.pptx"); + loadFromFile(u"pptx/tdf127720.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -321,7 +321,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartErrorBars) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartValuesSize) { - loadFromURL(u"docx/bubblechart.docx" ); + loadFromFile(u"docx/bubblechart.docx" ); Reference<chart2::XChartDocument> xChartDoc( getChartDocFromWriter(0), uno::UNO_QUERY ); CPPUNIT_ASSERT( xChartDoc.is() ); @@ -343,7 +343,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDOCXChartValuesSize) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTChartSeries) { //test chart series names for ppt - loadFromURL(u"ppt/chart.ppt"); + loadFromFile(u"ppt/chart.ppt"); uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0); CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); @@ -355,7 +355,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartSeries) { //test chart series names for pptx - loadFromURL(u"pptx/chart.pptx"); + loadFromFile(u"pptx/chart.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -372,7 +372,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXSparseChartSeries) { //test chart series sparse data for pptx - loadFromURL(u"pptx/sparse-chart.pptx"); + loadFromFile(u"pptx/sparse-chart.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -398,7 +398,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries) * detect and skip those hidden series on import (since we don't support * hidden columns for internal data table yet). */ - loadFromURL(u"pptx/stacked-bar-chart-hidden-series.pptx"); + loadFromFile(u"pptx/stacked-bar-chart-hidden-series.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -437,7 +437,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXHiddenDataSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats) { - loadFromURL(u"pptx/percentage-number-formats.pptx"); + loadFromFile(u"pptx/percentage-number-formats.pptx"); // 1st chart Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); @@ -503,7 +503,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXPercentageNumberFormats) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartLabelsNumFormat) { - loadFromURL(u"xlsx/tdfPieNumFormat.xlsx"); + loadFromFile(u"xlsx/tdfPieNumFormat.xlsx"); uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc.is()); // test data point labels format @@ -515,7 +515,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartLabelsNumFormat) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis) { - loadFromURL(u"pptx/stacked-non-stacked-mix-y-axis.pptx"); + loadFromFile(u"pptx/stacked-non-stacked-mix-y-axis.pptx"); // 1st chart is a normal stacked column. Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); @@ -575,7 +575,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPPTXStackedNonStackedYAxis) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODPChartSeries) { //test chart series names for odp - loadFromURL(u"odp/chart.odp"); + loadFromFile(u"odp/chart.odp"); uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(0, 0); CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]); CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]); @@ -585,7 +585,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testODPChartSeries) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc864396) { - loadFromURL(u"pptx/bnc864396.pptx"); + loadFromFile(u"pptx/bnc864396.pptx"); uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0,0), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); @@ -601,7 +601,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc864396) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755) { - loadFromURL(u"pptx/bnc889755.pptx"); + loadFromFile(u"pptx/bnc889755.pptx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 5), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider()); @@ -642,7 +642,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383) { - loadFromURL(u"pptx/bnc882383.pptx"); + loadFromFile(u"pptx/bnc882383.pptx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); CPPUNIT_ASSERT(xDataSeries.is()); @@ -655,7 +655,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue) { - loadFromURL(u"xlsx/tdf128732.xlsx"); + loadFromFile(u"xlsx/tdf128732.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -684,7 +684,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSimpleStrictXLSX) { - loadFromURL(u"xlsx/strict_chart.xlsx"); + loadFromFile(u"xlsx/strict_chart.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); CPPUNIT_ASSERT(xChartDoc.is()); @@ -696,7 +696,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSimpleStrictXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDelayedCellImport) { // chart range referencing content on later sheets - loadFromURL(u"xlsx/fdo70609.xlsx"); + loadFromFile(u"xlsx/fdo70609.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, u"values-x"); @@ -707,7 +707,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDelayedCellImport) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFlatODSStackedColumnChart) { - loadFromURL(u"fods/stacked-column-chart.fods"); + loadFromFile(u"fods/stacked-column-chart.fods"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -724,7 +724,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFlatODSStackedColumnChart) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo78080) { - loadFromURL(u"xlsx/fdo78080.xlsx"); + loadFromFile(u"xlsx/fdo78080.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -735,7 +735,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo78080) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf127811) { - loadFromURL(u"pptx/tdf127811.pptx"); + loadFromFile(u"pptx/tdf127811.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -755,7 +755,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf127811) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf86624) { // manually placed legends - loadFromURL(u"ods/tdf86624.ods"); + loadFromFile(u"ods/tdf86624.ods"); uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent); uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY); uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend(); @@ -766,7 +766,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf86624) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf105517) { - loadFromURL(u"pptx/tdf105517.pptx"); + loadFromFile(u"pptx/tdf105517.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -794,7 +794,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf105517) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf106217) { - loadFromURL(u"pptx/tdf106217.pptx"); + loadFromFile(u"pptx/tdf106217.pptx"); uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0, 0); CPPUNIT_ASSERT(xChartDoc.is()); @@ -817,7 +817,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf106217) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf108021) { // Tdf108021 : To check TextBreak value is true. - loadFromURL(u"ods/tdf108021.ods"); + loadFromFile(u"ods/tdf108021.ods"); uno::Reference< chart::XDiagram > mxDiagram; uno::Reference< beans::XPropertySet > xAxisProp; bool bTextBreak = false; @@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf108021) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf100084) { // The test file was created with IBM Cognos, make sure there is a diagram. - loadFromURL(u"xlsx/tdf100084.xlsx"); + loadFromFile(u"xlsx/tdf100084.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY); @@ -844,7 +844,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf100084) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf124817) { - loadFromURL(u"xlsx/tdf124817.xlsx"); + loadFromFile(u"xlsx/tdf124817.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -875,7 +875,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf124817) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf126033) { - loadFromURL(u"xlsx/tdf126033.xlsx"); + loadFromFile(u"xlsx/tdf126033.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -892,7 +892,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf126033) void Chart2ImportTest::testTransparentBackground(std::u16string_view filename) { - loadFromURL(filename); + loadFromFile(filename); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -920,7 +920,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFdo54361_1) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoBackgroundXLSX) { - loadFromURL(u"xlsx/chart-auto-background.xlsx"); + loadFromFile(u"xlsx/chart-auto-background.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -937,7 +937,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoBackgroundXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropXLSX) { - loadFromURL(u"xlsx/chart-area-style-border.xlsx"); + loadFromFile(u"xlsx/chart-area-style-border.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -957,7 +957,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropPPTX) { - loadFromURL(u"pptx/tdf150176.pptx"); + loadFromFile(u"pptx/tdf150176.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoChartAreaBorderPropPPTX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartAreaStyleBackgroundXLSX) { - loadFromURL(u"xlsx/chart-area-style-background.xlsx"); + loadFromFile(u"xlsx/chart-area-style-background.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -988,7 +988,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartAreaStyleBackgroundXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartHatchFillXLSX) { - loadFromURL(u"xlsx/chart-hatch-fill.xlsx"); + loadFromFile(u"xlsx/chart-hatch-fill.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1030,7 +1030,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testChartHatchFillXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTextRotationXLSX) { - loadFromURL(u"xlsx/axis-label-rotation.xlsx"); + loadFromFile(u"xlsx/axis-label-rotation.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1048,7 +1048,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTextRotationXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextCanOverlapXLSX) { // fdo#84647 : To check textoverlap value is imported correctly. - loadFromURL(u"xlsx/chart-text-can-overlap.xlsx"); + loadFromFile(u"xlsx/chart-text-can-overlap.xlsx"); uno::Reference< chart::XDiagram > mxDiagram; uno::Reference< beans::XPropertySet > xAxisProp; bool bTextCanOverlap = false; @@ -1065,7 +1065,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextCanOverlapXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextBreakXLSX) { // tdf#122091: To check textbreak value is true in case of 0° degree of Axis label rotation. - loadFromURL(u"xlsx/chart_label_text_break.xlsx"); + loadFromFile(u"xlsx/chart_label_text_break.xlsx"); uno::Reference< chart::XDiagram > mxDiagram; uno::Reference< beans::XPropertySet > xAxisProp; bool textBreak = false; @@ -1083,7 +1083,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTextBreakXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsXLSX) { - loadFromURL(u"xlsx/number-formats.xlsx"); + loadFromFile(u"xlsx/number-formats.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX) { - loadFromURL(u"docx/tdf132174.docx"); + loadFromFile(u"docx/tdf132174.docx"); { uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1156,7 +1156,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX) CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource); } - loadFromURL(u"docx/tdf136650.docx"); + loadFromFile(u"docx/tdf136650.docx"); { uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1180,7 +1180,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testNumberFormatsDOCX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPercentageNumberFormatsDOCX) { - loadFromURL(u"docx/tdf133632.docx"); + loadFromFile(u"docx/tdf133632.docx"); uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1203,7 +1203,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2007XLSX) { // below are OOXML default value tests for cases // where we fixed the handling of MSO 2007 vs OOXML - loadFromURL(u"xlsx/autotitledel_2007.xlsx"); + loadFromFile(u"xlsx/autotitledel_2007.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1215,7 +1215,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2007XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2013XLSX) { - loadFromURL(u"xlsx/autotitledel_2013.xlsx"); + loadFromFile(u"xlsx/autotitledel_2013.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1227,7 +1227,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutoTitleDelDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2007XLSX) { - loadFromURL(u"xlsx/dispBlanksAs_2007.xlsx"); + loadFromFile(u"xlsx/dispBlanksAs_2007.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1241,7 +1241,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2007XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2013XLSX) { - loadFromURL(u"xlsx/dispBlanksAs_2013.xlsx"); + loadFromFile(u"xlsx/dispBlanksAs_2013.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -1255,7 +1255,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testDispBlanksAsDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2007XLSX) { - loadFromURL(u"xlsx/smoothed_series2007.xlsx"); + loadFromFile(u"xlsx/smoothed_series2007.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1273,7 +1273,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2007XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2013XLSX) { - loadFromURL(u"xlsx/smoothed_series.xlsx"); + loadFromFile(u"xlsx/smoothed_series.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1291,7 +1291,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSmoothDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2007XLSX) { - loadFromURL(u"xlsx/trendline2007.xlsx"); + loadFromFile(u"xlsx/trendline2007.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1317,7 +1317,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2007XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2013XLSX) { - loadFromURL(u"xlsx/trendline.xlsx"); + loadFromFile(u"xlsx/trendline.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTrendlineDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2007XLSX) { - loadFromURL(u"xlsx/vary_color2007.xlsx"); + loadFromFile(u"xlsx/vary_color2007.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1358,7 +1358,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2007XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2013XLSX) { - loadFromURL(u"xlsx/vary_color.xlsx"); + loadFromFile(u"xlsx/vary_color.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1373,7 +1373,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testVaryColorDefaultValues2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPlotVisOnlyDefaultValue2013XLSX) { - loadFromURL(u"xlsx/plotVisOnly.xlsx"); + loadFromFile(u"xlsx/plotVisOnly.xlsx"); uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW); Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW); uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells"); @@ -1385,7 +1385,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPlotVisOnlyDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testRAngAxDefaultValue2013XLSX) { - loadFromURL(u"xlsx/rAngAx.xlsx"); + loadFromFile(u"xlsx/rAngAx.xlsx"); uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW); Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW); uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes"); @@ -1397,7 +1397,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testRAngAxDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMajorTickMarksDefaultValue2013XLSX) { - loadFromURL(u"xlsx/majorTickMark.xlsx"); + loadFromFile(u"xlsx/majorTickMark.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); @@ -1412,7 +1412,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMajorTickMarksDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMinorTickMarksDefaultValue2013XLSX) { - loadFromURL(u"xlsx/minorTickMark.xlsx"); + loadFromFile(u"xlsx/minorTickMark.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); @@ -1427,7 +1427,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testMinorTickMarksDefaultValue2013XLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleDefaultRotationXLSX) { - loadFromURL(u"xlsx/axis_title_default_rotation.xlsx"); + loadFromFile(u"xlsx/axis_title_default_rotation.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0); @@ -1444,7 +1444,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleDefaultRotationXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSecondaryAxisTitleDefaultRotationXLSX) { - loadFromURL(u"xlsx/secondary_axis_title_default_rotation.xlsx"); + loadFromFile(u"xlsx/secondary_axis_title_default_rotation.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1); @@ -1461,7 +1461,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSecondaryAxisTitleDefaultRotationXLSX CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleRotationXLSX) { - loadFromURL(u"xlsx/axis_title_rotated.xlsx"); + loadFromFile(u"xlsx/axis_title_rotated.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); { @@ -1493,7 +1493,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitleRotationXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitlePositionDOCX) { - loadFromURL(u"docx/testAxisTitlePosition.docx"); + loadFromFile(u"docx/testAxisTitlePosition.docx"); uno::Reference< chart::XDiagram > mxDiagram; uno::Reference< drawing::XShape > xAxisTitle; uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0); @@ -1525,7 +1525,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAxisTitlePositionDOCX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testCombinedChartAttachedAxisXLSX) { - loadFromURL(u"xlsx/testCombinedChartAxis.xlsx"); + loadFromFile(u"xlsx/testCombinedChartAxis.xlsx"); Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); // First series Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0); @@ -1551,7 +1551,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testCombinedChartAttachedAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX) { - loadFromURL(u"xlsx/tdf140489.xlsx"); + loadFromFile(u"xlsx/tdf140489.xlsx"); Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); // First series Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0); @@ -1584,7 +1584,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf140489MultiSeriesChartAxisXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider) { - loadFromURL(u"odp/chart.odp"); + loadFromFile(u"odp/chart.odp"); uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromDrawImpress(0,0), uno::UNO_QUERY_THROW); const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider(); @@ -1632,7 +1632,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testInternalDataProvider) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf90510) { // Pie chart label placement settings(XLS) - loadFromURL(u"xls/piechart_outside.xls"); + loadFromFile(u"xls/piechart_outside.xls"); uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW ); Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW ); uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" ); @@ -1645,7 +1645,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf90510) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf109858) { // Pie chart label placement settings(XLSX) - loadFromURL(u"xlsx/piechart_outside.xlsx"); + loadFromFile(u"xlsx/piechart_outside.xlsx"); uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW ); // test data point labels position @@ -1665,7 +1665,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf109858) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf130105) { - loadFromURL(u"xlsx/barchart_outend.xlsx"); + loadFromFile(u"xlsx/barchart_outend.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -1681,13 +1681,13 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf130105) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf111173) { - loadFromURL(u"xlsx/tdf111173.xlsx"); + loadFromFile(u"xlsx/tdf111173.xlsx"); uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, 0, mxComponent ), UNO_QUERY_THROW ); } CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf122226) { - loadFromURL(u"docx/testTdf122226.docx" ); + loadFromFile(u"docx/testTdf122226.docx" ); uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT( xChartDoc.is() ); @@ -1706,7 +1706,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf122226) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107) { // import complex data point labels - loadFromURL(u"pptx/tdf115107.pptx"); + loadFromFile(u"pptx/tdf115107.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1798,7 +1798,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107_2) { // import complex data point labels in cobo charts with multiple data series - loadFromURL(u"pptx/tdf115107-2.pptx"); + loadFromFile(u"pptx/tdf115107-2.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1853,7 +1853,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf115107_2) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163) { - loadFromURL(u"pptx/tdf116163.pptx"); + loadFromFile(u"pptx/tdf116163.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1918,7 +1918,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf116163) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041) { - loadFromURL(u"pptx/tdf48041.pptx"); + loadFromFile(u"pptx/tdf48041.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -1968,7 +1968,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf48041) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTdf121205) { - loadFromURL(u"pptx/tdf121205.pptx"); + loadFromFile(u"pptx/tdf121205.pptx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); uno::Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW); @@ -1986,7 +1986,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testFixedSizeBarChartVeryLongLabel) // case the best course of action is to just crop the label text. This // test checks that the rendered text is actually cropped. - loadFromURL(u"odp/BarChartVeryLongLabel.odp"); + loadFromFile(u"odp/BarChartVeryLongLabel.odp"); // Select shape 0 which has fixed size chart Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); @@ -2057,7 +2057,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel) // Bar chart area size is automatic so we expect the label to be broken // into multiple lines. - loadFromURL(u"odp/BarChartVeryLongLabel.odp"); + loadFromFile(u"odp/BarChartVeryLongLabel.odp"); // Select shape 1, which has an automatic sized chart Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 1), uno::UNO_QUERY); @@ -2122,7 +2122,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testAutomaticSizeBarChartVeryLongLabel) CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTotalsRowIgnored) { - loadFromURL(u"xlsx/barchart_totalsrow.xlsx"); + loadFromFile(u"xlsx/barchart_totalsrow.xlsx"); { uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -2152,7 +2152,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testPieChartPlotAreaMarginWithAutomaticLa // tdf#91265 // Checks the margin and calculation of the plot area for the pie chart inside the chart area. - loadFromURL(u"pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx"); + loadFromFile(u"pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx"); OUString aCheckShapeName = "CID/D=0:CS=0:CT=0:Series=0"; // Chart Wuse case Width == Height diff --git a/chart2/qa/extras/chart2import2.cxx b/chart2/qa/extras/chart2import2.cxx index 156dff2142bf..863d425ae9a5 100644 --- a/chart2/qa/extras/chart2import2.cxx +++ b/chart2/qa/extras/chart2import2.cxx @@ -30,7 +30,7 @@ public: CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf114179) { - loadFromURL(u"docx/testTdf114179.docx"); + loadFromFile(u"docx/testTdf114179.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); css::uno::Reference<chart2::XDiagram> xDiagram; @@ -44,7 +44,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf114179) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf124243) { - loadFromURL(u"docx/tdf124243.docx"); + loadFromFile(u"docx/tdf124243.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -61,7 +61,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf124243) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf127393) { - loadFromURL(u"pptx/tdf127393.pptx"); + loadFromFile(u"pptx/tdf127393.pptx"); // 1st chart Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); @@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf127393) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128733) { - loadFromURL(u"odt/tdf128733.odt"); + loadFromFile(u"odt/tdf128733.odt"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128733) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128432) { - loadFromURL(u"ods/tdf128432.ods"); + loadFromFile(u"ods/tdf128432.ods"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); @@ -118,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128432) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128627) { - loadFromURL(u"xlsx/tdf128627.xlsx"); + loadFromFile(u"xlsx/tdf128627.xlsx"); // Test ShiftedCategoryPosition for Radar Chart uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -133,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128627) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128634) { - loadFromURL(u"xlsx/tdf128634.xlsx"); + loadFromFile(u"xlsx/tdf128634.xlsx"); // Test ShiftedCategoryPosition for 3D Charts uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf128634) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130657) { - loadFromURL(u"xlsx/tdf130657.xlsx"); + loadFromFile(u"xlsx/tdf130657.xlsx"); // Test ShiftedCategoryPosition for charts which is not contain a "crossbetween" OOXML tag. uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -177,7 +177,7 @@ void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries, CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDeletedDataLabel) { - loadFromURL(u"xlsx/deleted_data_labels.xlsx"); + loadFromFile(u"xlsx/deleted_data_labels.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW); Reference<chart2::XDataSeries> xDataSeries0 = getDataSeriesFromDoc(xChartDoc, 0); @@ -194,7 +194,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDeletedDataLabel) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointInheritedColorDOCX) { - loadFromURL(u"docx/data_point_inherited_color.docx"); + loadFromFile(u"docx/data_point_inherited_color.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); css::uno::Reference<chart2::XDiagram> xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW); @@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointInheritedColorDOCX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testExternalStrRefsXLSX) { - loadFromURL(u"xlsx/external_str_ref.xlsx"); + loadFromFile(u"xlsx/external_str_ref.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc.is()); @@ -223,7 +223,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testExternalStrRefsXLSX) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSourceNumberFormatComplexCategoriesXLS) { - loadFromURL(u"xls/source_number_format_axis.xls"); + loadFromFile(u"xls/source_number_format_axis.xls"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc.is()); @@ -236,7 +236,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSourceNumberFormatComplexCategoriesX CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSimpleCategoryAxis) { - loadFromURL(u"docx/testSimpleCategoryAxis.docx"); + loadFromFile(u"docx/testSimpleCategoryAxis.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -264,7 +264,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testSimpleCategoryAxis) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testMultilevelCategoryAxis) { - loadFromURL(u"docx/testMultilevelCategoryAxis.docx"); + loadFromFile(u"docx/testMultilevelCategoryAxis.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -293,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testMultilevelCategoryAxis) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testXaxisValues) { - loadFromURL(u"docx/tdf124083.docx"); + loadFromFile(u"docx/tdf124083.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -310,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testXaxisValues) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123504) { - loadFromURL(u"ods/pie_chart_100_and_0.ods"); + loadFromFile(u"ods/pie_chart_100_and_0.ods"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -342,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123504) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf122765) { // The horizontal position of the slices was wrong. - loadFromURL(u"pptx/tdf122765.pptx"); + loadFromFile(u"pptx/tdf122765.pptx"); Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); @@ -365,7 +365,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123206CustomLabelField) // File contains the deprecated "custom-label-field" attribute of the // "data-point" element. It should be interpreted and stored as a data point // property. - loadFromURL(u"odp/tdf123206.odp"); + loadFromFile(u"odp/tdf123206.odp"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -381,7 +381,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf123206CustomLabelField) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf125444PercentageCustomLabel) { - loadFromURL(u"pptx/tdf125444.pptx"); + loadFromFile(u"pptx/tdf125444.pptx"); // 1st chart Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); @@ -402,7 +402,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf125444PercentageCustomLabel) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointLabelCustomPos) { // test CustomLabelPosition on Bar chart - loadFromURL(u"xlsx/testDataPointLabelCustomPos.xlsx"); + loadFromFile(u"xlsx/testDataPointLabelCustomPos.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -425,7 +425,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testDataPointLabelCustomPos) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130032) { // test CustomLabelPosition on Line chart - loadFromURL(u"xlsx/testTdf130032.xlsx"); + loadFromFile(u"xlsx/testTdf130032.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -448,7 +448,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf130032) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134978) { // test CustomLabelPosition on Pie chart - loadFromURL(u"xlsx/tdf134978.xlsx"); + loadFromFile(u"xlsx/tdf134978.xlsx"); uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT(xChartDoc.is()); uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0)); @@ -466,7 +466,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134978) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf119138MissingAutoTitleDeleted) { - loadFromURL(u"xlsx/tdf119138-missing-autotitledeleted.xlsx"); + loadFromFile(u"xlsx/tdf119138-missing-autotitledeleted.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); @@ -478,7 +478,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf119138MissingAutoTitleDeleted) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testStockChartShiftedCategoryPosition) { - loadFromURL(u"odt/stock_chart_LO_6_2.odt"); + loadFromFile(u"odt/stock_chart_LO_6_2.odt"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); @@ -498,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf133376) if (!IsDefaultDPI()) return; - loadFromURL(u"xlsx/tdf133376.xlsx"); + loadFromFile(u"xlsx/tdf133376.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -519,7 +519,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf133376) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134225) { - loadFromURL(u"xlsx/tdf134225.xlsx"); + loadFromFile(u"xlsx/tdf134225.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -556,7 +556,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136105) if (!IsDefaultDPI()) return; - loadFromURL(u"xlsx/tdf136105.xlsx"); + loadFromFile(u"xlsx/tdf136105.xlsx"); // 1st chart with fix inner position and size { Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), @@ -599,7 +599,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136105) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf91250) { - loadFromURL(u"docx/tdf91250.docx"); + loadFromFile(u"docx/tdf91250.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(), @@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf91250) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134111) { // tdf134111 : To check TextBreak value is true - loadFromURL(u"docx/tdf134111.docx"); + loadFromFile(u"docx/tdf134111.docx"); uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromWriter(0); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); uno::Reference<chart::XDiagram> mxDiagram(xChartDoc->getDiagram()); @@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf134111) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136752) { - loadFromURL(u"xlsx/tdf136752.xlsx"); + loadFromFile(u"xlsx/tdf136752.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf136752) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137505) { - loadFromURL(u"xlsx/tdf137505.xlsx"); + loadFromFile(u"xlsx/tdf137505.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); @@ -678,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137505) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137734) { - loadFromURL(u"xlsx/tdf137734.xlsx"); + loadFromFile(u"xlsx/tdf137734.xlsx"); Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent); CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); CPPUNIT_ASSERT(xChartDoc.is()); @@ -705,7 +705,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137734) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137874) { - loadFromURL(u"xlsx/piechart_legend.xlsx"); + loadFromFile(u"xlsx/piechart_legend.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); @@ -719,7 +719,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf137874) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146463) { - loadFromURL(u"ods/tdf146463.ods"); + loadFromFile(u"ods/tdf146463.ods"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent)); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); @@ -746,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146463) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdfCustomShapePos) { - loadFromURL(u"docx/testcustomshapepos.docx"); + loadFromFile(u"docx/testcustomshapepos.docx"); Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), UNO_QUERY_THROW); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); @@ -774,7 +774,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdfCustomShapePos) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf121281) { - loadFromURL(u"xlsx/incorrect_label_position.xlsx"); + loadFromFile(u"xlsx/incorrect_label_position.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); @@ -793,7 +793,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf121281) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf139658) { - loadFromURL(u"docx/tdf139658.docx"); + loadFromFile(u"docx/tdf139658.docx"); uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(), @@ -813,7 +813,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf139658) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066) { - loadFromURL(u"ods/tdf146066.ods"); + loadFromFile(u"ods/tdf146066.ods"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, uno::UNO_QUERY); @@ -859,7 +859,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf146066) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf150434) { - loadFromURL(u"xlsx/tdf150434.xlsx"); + loadFromFile(u"xlsx/tdf150434.xlsx"); Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW); Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); @@ -875,7 +875,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testTdf150434) CPPUNIT_TEST_FIXTURE(Chart2ImportTest2, testChartDataTableWithMultipleLegendEntriesForOneDataSeries) { - loadFromURL(u"xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx"); + loadFromFile(u"xlsx/DataTable-MultipleLegendEntriesForOneDataSeries.xlsx"); // Loading this file caused a crash in the data table code Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent), diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx index 314f51415d24..84b8658d29ea 100644 --- a/chart2/qa/extras/uichart.cxx +++ b/chart2/qa/extras/uichart.cxx @@ -106,7 +106,7 @@ void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocu CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf120348) { - loadFromURL(u"ods/tdf120348.ods"); + loadFromFile(u"ods/tdf120348.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); @@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091) std::vector<OUString> aExpected = { u"ΩφÎλιμο"_ustr, u"Επικίνδυνο"_ustr, u"Απόσταση"_ustr, u"Μάσκα"_ustr, u"Εμβόλιο"_ustr }; - loadFromURL(u"ods/tdf151091.ods"); + loadFromFile(u"ods/tdf151091.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xChartDoc.is()); @@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf107097) { - loadFromURL(u"ods/tdf107097.ods"); + loadFromFile(u"ods/tdf107097.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getPivotChartDocFromSheet(1, mxComponent), uno::UNO_QUERY_THROW); testCopyPasteToNewSheet(xChartDoc, "Object 1", 4, 12); @@ -166,12 +166,12 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf107097) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011) { - loadFromURL(u"ods/tdf136011.ods"); + loadFromFile(u"ods/tdf136011.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); testCopyPasteToNewSheet(xChartDoc, "Object 1", 3, 9); - loadFromURL(u"ods/tdf136011.ods"); + loadFromFile(u"ods/tdf136011.ods"); uno::Reference<chart::XChartDocument> xChartDoc2(getChartCompFromSheet(0, 1, mxComponent), uno::UNO_QUERY_THROW); @@ -184,7 +184,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf136011) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf62057) { - loadFromURL(u"ods/tdf62057.ods"); + loadFromFile(u"ods/tdf62057.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); @@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf62057) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690) { - loadFromURL(u"xlsx/tdf98690.xlsx"); + loadFromFile(u"xlsx/tdf98690.xlsx"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); @@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf101894) { - loadFromURL(u"ods/tdf101894.ods"); + loadFromFile(u"ods/tdf101894.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); @@ -312,7 +312,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf101894) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testCopyPasteChartWithDotInSheetName) { - loadFromURL(u"ods/chartWithDotInSheetName.ods"); + loadFromFile(u"ods/chartWithDotInSheetName.ods"); uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, 0, mxComponent), uno::UNO_QUERY_THROW); @@ -390,7 +390,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testCopyPasteChartWithDotInSheetName) CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf158223) { - loadFromURL(u"ods/tdf158223.ods"); + loadFromFile(u"ods/tdf158223.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW); diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx index 10b9235653f9..f247b7507ace 100644 --- a/chart2/qa/extras/xshape/chart2xshape.cxx +++ b/chart2/qa/extras/xshape/chart2xshape.cxx @@ -118,7 +118,7 @@ void Chart2XShapeTest::testTdf150832() // Without the fix in place, this test would have failed with // - Expected: 319 // - Actual : 0 - loadFromURL(u"xls/tdf150832.xls"); + loadFromFile(u"xls/tdf150832.xls"); compareAgainstReference(getXShapeDumpString(), u"tdf150832.xml"); } @@ -134,7 +134,7 @@ void Chart2XShapeTest::testTdf149204() // - Actual : 12940 // - Node: /XShapes/XShape[2] // - Attr: sizeX - loadFromURL(u"pptx/tdf149204.pptx"); + loadFromFile(u"pptx/tdf149204.pptx"); uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0); compareAgainstReference(getShapeDump(xChartDoc), u"tdf149204.xml"); } @@ -151,7 +151,7 @@ void Chart2XShapeTest::testTdf151424() // - Actual : 3530 // - Node: /XShapes/XShape[2]/XShapes/XShape[1] // - Attr: positionX - loadFromURL(u"ods/tdf151424.ods"); + loadFromFile(u"ods/tdf151424.ods"); compareAgainstReference(getXShapeDumpString(), u"tdf151424.xml"); } @@ -162,7 +162,7 @@ void Chart2XShapeTest::testFdo75075() if (!IsDefaultDPI()) return; - loadFromURL(u"ods/fdo75075.ods"); + loadFromFile(u"ods/fdo75075.ods"); compareAgainstReference(getXShapeDumpString(), u"fdo75075.xml"); } @@ -173,7 +173,7 @@ void Chart2XShapeTest::testPropertyMappingBarChart() if (!IsDefaultDPI()) return; - loadFromURL(u"ods/property-mapping-bar.ods"); + loadFromFile(u"ods/property-mapping-bar.ods"); compareAgainstReference(getXShapeDumpString(), u"property-mapping-bar.xml"); } @@ -185,7 +185,7 @@ void Chart2XShapeTest::testPieChartLabels1() return; // inside placement for the best fit case - loadFromURL(u"xlsx/tdf90839-1.xlsx"); + loadFromFile(u"xlsx/tdf90839-1.xlsx"); compareAgainstReference(getXShapeDumpString(), u"tdf90839-1.xml"); } @@ -197,7 +197,7 @@ void Chart2XShapeTest::testPieChartLabels2() return; // text wrap: wrap all text labels except one - loadFromURL(u"xlsx/tdf90839-2.xlsx"); + loadFromFile(u"xlsx/tdf90839-2.xlsx"); compareAgainstReference(getXShapeDumpString(), u"tdf90839-2.xml"); } @@ -209,7 +209,7 @@ void Chart2XShapeTest::testPieChartLabels3() return; // text wrap: wrap no text label except one - loadFromURL(u"xlsx/tdf90839-3.xlsx"); + loadFromFile(u"xlsx/tdf90839-3.xlsx"); compareAgainstReference(getXShapeDumpString(), u"tdf90839-3.xml"); } @@ -221,7 +221,7 @@ void Chart2XShapeTest::testPieChartLabels4() return; // data value and percent value are centered horizontally - loadFromURL(u"ods/tdf90839-4.ods"); + loadFromFile(u"ods/tdf90839-4.ods"); compareAgainstReference(getXShapeDumpString(), u"tdf90839-4.xml"); } @@ -232,7 +232,7 @@ void Chart2XShapeTest::testChart() if (!IsDefaultDPI()) return; - loadFromURL(u"ods/testChart.ods"); + loadFromFile(u"ods/testChart.ods"); compareAgainstReference(getXShapeDumpString(), u"testChart.xml"); } @@ -241,7 +241,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug() // This bug prevents that the trendline (regression curve) is drawn // if the first cell is empty. See tdf#76649 for details. - loadFromURL(u"ods/tdf76649_TrendLineBug.ods"); + loadFromFile(u"ods/tdf76649_TrendLineBug.ods"); xmlDocUniquePtr pXmlDoc = getXShapeDumpXmlDoc(); @@ -252,7 +252,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug() void Chart2XShapeTest::testTdf88154LabelRotatedLayout() { - loadFromURL(u"pptx/tdf88154_LabelRotatedLayout.pptx"); + loadFromFile(u"pptx/tdf88154_LabelRotatedLayout.pptx"); uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 5); OUString rDump = getShapeDump(xChartDoc); OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8); diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx b/cppcanvas/qa/extras/emfplus/emfplus.cxx index 21cb7c219e19..1ba179404f28 100644 --- a/cppcanvas/qa/extras/emfplus/emfplus.cxx +++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx @@ -28,7 +28,7 @@ public: Bitmap load(const char* pName) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pModel); SfxObjectShell* pShell = pModel->GetObjectShell(); diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx index 7545d6168e74..a48115ed418d 100644 --- a/dbaccess/qa/extras/macros-test.cxx +++ b/dbaccess/qa/extras/macros-test.cxx @@ -32,7 +32,7 @@ DBAccessTest::DBAccessTest() { } -void DBAccessTest::test() { loadFromURL(u"testdb.odb"); } +void DBAccessTest::test() { loadFromFile(u"testdb.odb"); } CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest); diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx index 8eaf39430e96..1b6b7172fdbd 100644 --- a/dbaccess/qa/unit/firebird.cxx +++ b/dbaccess/qa/unit/firebird.cxx @@ -59,7 +59,7 @@ void FirebirdTest::testEmptyDBConnection() */ void FirebirdTest::testIntegerDatabase() { - loadFromURL(u"firebird_integer_ods12.odb"); + loadFromFile(u"firebird_integer_ods12.odb"); uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW); uno::Reference< XConnection > xConnection = @@ -97,7 +97,7 @@ void FirebirdTest::testIntegerDatabase() void FirebirdTest::testTdf132924() { - loadFromURL(u"tdf132924.odb"); + loadFromFile(u"tdf132924.odb"); uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW); uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument); diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index c164b7ac6122..8e9b1847fa81 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -1734,7 +1734,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPdfInEmf) } // Load a PPTX file, which has a shape, with a bitmap fill, which is an EMF, containing a PDF. - loadFromURL(u"pdf-in-emf.pptx"); + loadFromFile(u"pdf-in-emf.pptx"); // Get the EMF. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx index 9965114cadd2..4b0ef3fa1af7 100644 --- a/filter/qa/pdf.cxx +++ b/filter/qa/pdf.cxx @@ -151,7 +151,7 @@ void Test::doTestCommentsInMargin(bool commentsInMarginEnabled) if (!pPDFium) return; - loadFromURL(u"commentsInMargin.odt"); + loadFromFile(u"commentsInMargin.odt"); uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory(); uno::Reference<document::XFilter> xFilter( xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY); diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx index 6297e1856a06..8e4f5f5130a4 100644 --- a/filter/qa/unit/svg.cxx +++ b/filter/qa/unit/svg.cxx @@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg) { #if !defined(MACOSX) // Load a document with a jpeg image in it. - loadFromURL(u"preserve-jpg.odt"); + loadFromFile(u"preserve-jpg.odt"); // Select the image. dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {}); @@ -78,7 +78,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg) CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine) { // Load a document with a semi-transparent line shape. - loadFromURL(u"semi-transparent-line.odg"); + loadFromFile(u"semi-transparent-line.odg"); // Export it to SVG. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); @@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine) CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentFillWithTransparentLine) { // Load a document with a shape with semi-transparent fill and line - loadFromURL(u"semi-transparent-fill.odg"); + loadFromFile(u"semi-transparent-fill.odg"); // Export it to SVG. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); @@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText) // correct transparency factor applied for the first shape. // Load draw document with transparent text in one box - loadFromURL(u"TransparentText.odg"); + loadFromFile(u"TransparentText.odg"); // Export to SVG. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); @@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentMultiParaText) CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic) { // Load a document containing a 3D shape. - loadFromURL(u"shape-nographic.odp"); + loadFromFile(u"shape-nographic.odp"); // Export to SVG. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); @@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic) CPPUNIT_TEST_FIXTURE(SvgFilterTest, testCustomBullet) { // Given a presentation with a custom bullet: - loadFromURL(u"custom-bullet.fodp"); + loadFromFile(u"custom-bullet.fodp"); // When exporting that to SVG: uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); @@ -275,7 +275,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testCustomBullet) CPPUNIT_TEST_FIXTURE(SvgFilterTest, attributeRedefinedTest) { // Load document containing empty paragraphs with ids. - loadFromURL(u"attributeRedefinedTest.odp"); + loadFromFile(u"attributeRedefinedTest.odp"); // Export to SVG. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW); diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx index c39708668965..e578d4b88fee 100644 --- a/filter/qa/unit/textfilterdetect.cxx +++ b/filter/qa/unit/textfilterdetect.cxx @@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) { // Given an empty file, with a pptx extension // When loading the file - loadFromURL(u"empty.pptx"); + loadFromFile(u"empty.pptx"); // Then make sure it is opened in Impress. // Without the accompanying fix in place, this test would have failed, as it was opened in @@ -81,17 +81,17 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument")); // Now also test ODT - loadFromURL(u"empty.odt"); + loadFromFile(u"empty.odt"); // Make sure it opens in Writer. CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.text.TextDocument")); // ... and ODS - loadFromURL(u"empty.ods"); + loadFromFile(u"empty.ods"); // Make sure it opens in Calc. CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.sheet.SpreadsheetDocument")); // ... and ODP - loadFromURL(u"empty.odp"); + loadFromFile(u"empty.odp"); // Without the accompanying fix in place, this test would have failed, as it was opened in // Writer instead. CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument")); @@ -99,7 +99,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) // ... and DOC // Without the accompanying fix in place, this test would have failed, the import filter aborted // loading. - loadFromURL(u"empty.doc"); + loadFromFile(u"empty.doc"); CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.text.TextDocument")); { uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); @@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) SfxObjectFactory::SetStandardTemplate("com.sun.star.sheet.SpreadsheetDocument", createFileURL(u"calc.ots")); - loadFromURL(u"empty.pptx"); + loadFromFile(u"empty.pptx"); { uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<drawing::XDrawPages> xPages(xDoc->getDrawPages(), uno::UNO_SET_THROW); @@ -134,7 +134,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) CPPUNIT_ASSERT_EQUAL(OUString("Title of Impress template"), xBox->getString()); } - loadFromURL(u"empty.odt"); + loadFromFile(u"empty.odt"); { uno::Reference<text::XTextDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XEnumerationAccess> xEA(xDoc->getText(), uno::UNO_QUERY_THROW); @@ -145,7 +145,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) CPPUNIT_ASSERT_EQUAL(u"Writer template’s first line"_ustr, xParagraph->getString()); } - loadFromURL(u"empty.ods"); + loadFromFile(u"empty.ods"); { uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<sheet::XCellRangesAccess> xRA(xDoc->getSheets(), uno::UNO_QUERY_THROW); @@ -155,7 +155,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) CPPUNIT_ASSERT_EQUAL(u"Calc template’s first cell"_ustr, xC->getString()); } - loadFromURL(u"empty.odp"); + loadFromFile(u"empty.odp"); { uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<drawing::XDrawPages> xPages(xDoc->getDrawPages(), uno::UNO_SET_THROW); @@ -165,7 +165,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile) // Make sure the template's text was loaded CPPUNIT_ASSERT_EQUAL(OUString("Title of Impress template"), xBox->getString()); } - loadFromURL(u"empty.doc"); + loadFromFile(u"empty.doc"); { uno::Reference<text::XTextDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XEnumerationAccess> xEA(xDoc->getText(), uno::UNO_QUERY_THROW); diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index 43837845b04c..7ba29ef9cb7b 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -173,7 +173,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception) CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose) { // this test doesn't work with a new document because of aURL.Main check in SfxBaseController::dispatch() - loadFromURL(u"empty.fodp"); + loadFromFile(u"empty.fodp"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xModel.is()); uno::Reference<frame::XController> xController(xModel->getCurrentController()); diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx index 4ba209c44d39..25945832963b 100644 --- a/include/test/unoapi_test.hxx +++ b/include/test/unoapi_test.hxx @@ -38,7 +38,7 @@ public: void load(const OUString& rURL, const char* pPassword = nullptr); void loadWithParams(const OUString& rURL, const css::uno::Sequence<css::beans::PropertyValue>& rParams); - OUString loadFromURL(std::u16string_view aFileBase, const char* pPassword = nullptr); + OUString loadFromFile(std::u16string_view aFileBase, const char* pPassword = nullptr); css::uno::Any executeMacro(const OUString& rScriptURL, const css::uno::Sequence<css::uno::Any>& rParams = {}); diff --git a/lotuswordpro/qa/cppunit/import_test.cxx b/lotuswordpro/qa/cppunit/import_test.cxx index 8fe223e4277f..08d4c1bd39c1 100644 --- a/lotuswordpro/qa/cppunit/import_test.cxx +++ b/lotuswordpro/qa/cppunit/import_test.cxx @@ -44,7 +44,7 @@ CPPUNIT_TEST_FIXTURE(LotusWordProTest, testtdf33787OrderedBullets) // 2) Numbered bullet w/ bracket two (2)) // a) Lettered bullet w/ bracket lowercase 1 (a)) // b) Lettered bullet w/ bracket lowercase 2 (b)) - loadFromURL(u"tdf33787-ordered-bullets.lwp"); + loadFromFile(u"tdf33787-ordered-bullets.lwp"); uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY); @@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(LotusWordProTest, testtdf33787OrderedBullets) CPPUNIT_TEST_FIXTURE(LotusWordProTest, testTdf129993) { - loadFromURL(u"tdf129993.lwp"); + loadFromFile(u"tdf129993.lwp"); uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY); @@ -149,7 +149,7 @@ CPPUNIT_TEST_FIXTURE(LotusWordProTest, testTdf129993) CPPUNIT_TEST_FIXTURE(LotusWordProTest, paragraphProperties) { - loadFromURL(u"paragraphProperties.lwp"); + loadFromFile(u"paragraphProperties.lwp"); uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY); diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx index 89658e0874fc..ba2eaf75a144 100644 --- a/oox/qa/unit/drawingml.cxx +++ b/oox/qa/unit/drawingml.cxx @@ -70,7 +70,7 @@ public: CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText) { - loadFromURL(u"transparent-text.pptx"); + loadFromFile(u"transparent-text.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082) { - loadFromURL(u"tdf131082.pptx"); + loadFromFile(u"tdf131082.pptx"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue) { - loadFromURL(u"preset-adjust-value.pptx"); + loadFromFile(u"preset-adjust-value.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -137,7 +137,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor) { - loadFromURL(u"chart-data-label-char-color.docx"); + loadFromFile(u"chart-data-label-char-color.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency) { // Load a document with a multi-step gradient. - loadFromURL(u"gradient-multistep-transparency.pptx"); + loadFromFile(u"gradient-multistep-transparency.pptx"); // Check the end transparency of the gradient. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment) { - loadFromURL(u"shape-text-alignment.pptx"); + loadFromFile(u"shape-text-alignment.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft) { - loadFromURL(u"shape-text-adjust-left.pptx"); + loadFromFile(u"shape-text-adjust-left.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -245,7 +245,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution) { - loadFromURL(u"camera-rotation-revolution.docx"); + loadFromFile(u"camera-rotation-revolution.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -269,7 +269,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf146534_CameraRotationRevolutionNonWpsShapes) { - loadFromURL(u"camera-rotation-revolution-nonwps.pptx"); + loadFromFile(u"camera-rotation-revolution-nonwps.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -306,7 +306,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow) CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor); CPPUNIT_ASSERT_EQUAL(Color(0xff0000), nColor); }; - loadFromURL(u"table-shadow.pptx"); + loadFromFile(u"table-shadow.pptx"); // Without the accompanying fix in place, this test would have failed, because shadow on a table // was lost on import. verify(mxComponent); @@ -321,7 +321,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGroupShapeSmartArt) { // Given a file with a smartart inside a group shape: - loadFromURL(u"smartart-groupshape.pptx"); + loadFromFile(u"smartart-groupshape.pptx"); // Then make sure that the smartart is not just an empty group shape: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -339,7 +339,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize) // The document contains a Bezier curve, where the control points are outside the bounding // rectangle of the shape. Error was, that the export uses a path size which included the // control points. - loadFromURL(u"tdf142605_CurveSize.odp"); + loadFromFile(u"tdf142605_CurveSize.odp"); saveAndReload("Impress Office Open XML"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -366,7 +366,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride) { // Given a document with 2 slides, slide1 has a chart with a theme override and slide2 has a // shape: - loadFromURL(u"chart-theme-override.pptx"); + loadFromFile(u"chart-theme-override.pptx"); // Then make sure that the slide 2 shape's text color is blue, not red: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -390,7 +390,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme) { // Given a PPTX file with a slide -> master slide -> theme: - loadFromURL(u"theme.pptx"); + loadFromFile(u"theme.pptx"); // Then make sure the theme + referring to that theme is imported: // Check the imported theme of the master page: @@ -442,7 +442,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes) { // slide with date, footer, slide number with custom shapes - loadFromURL(u"testTdf132557_footerCustomShapes.pptx"); + loadFromFile(u"testTdf132557_footerCustomShapes.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -468,7 +468,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table) { // Given a document with a table style, using theme color with tinting in the A2 cell: - loadFromURL(u"theme-tint.pptx"); + loadFromFile(u"theme-tint.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -510,7 +510,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape) { // Given a document with a table style, using theme color with tinting in the A2 cell: - loadFromURL(u"ThemeShapesReference.pptx"); + loadFromFile(u"ThemeShapesReference.pptx"); // Then make sure that we only import theming info to the doc model if the effects are limited // to lum mod / off that we can handle (i.e. no tint/shade): @@ -581,7 +581,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testVert270AndTextRot) // tdf##149551. The document contains a shape with attributes 'rot="720000"' and 'vert="vert270"' // of the <bodyPr> element. Without the fix the simulation of vert270 had overwritten the text // rotation angle and thus 'rot'="720000" was lost. - loadFromURL(u"tdf149551_vert270AndTextRot.pptx"); + loadFromFile(u"tdf149551_vert270AndTextRot.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -606,7 +606,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot) // tdf#149551 The document contains a shape with attribute 'rot="720000"' of the <bodyPr> element. // Without fix, the text rotation angle was saved in "TextPreRotateAngle" instead of // "TextRotateAngle". That resulted in unrotated but sheared text. - loadFromURL(u"tdf149551_TextRot.pptx"); + loadFromFile(u"tdf149551_TextRot.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo) { - loadFromURL(u"tdf113187_arcTo_withoutReferences.pptx"); + loadFromFile(u"tdf113187_arcTo_withoutReferences.pptx"); // Get ViewBox of shape uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme) { // The font info for the shape is in the theme, the text run has no font settings. - loadFromURL(u"tdf125085_WordArtFontTheme.pptx"); + loadFromFile(u"tdf125085_WordArtFontTheme.pptx"); // Get shape and its properties uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -681,7 +681,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme) CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontText) { // The font info for the shape is in the text run inside the shape. - loadFromURL(u"tdf125085_WordArtFontText.pptx"); + loadFromFile(u"tdf125085_WordArtFontText.pptx"); // Get shape and its properties uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx index 4df8aaa8f587..415c5fe8d02f 100644 --- a/oox/qa/unit/export.cxx +++ b/oox/qa/unit/export.cxx @@ -26,7 +26,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition) { // Given a document with a group shape and therein a polyline and a connector. - loadFromURL(u"tdf141786_PolylineConnectorInGroup.odt"); + loadFromFile(u"tdf141786_PolylineConnectorInGroup.odt"); // When saving that to DOCX: save("Office Open XML Text"); @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition) CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition) { // Given a document with a group shape and therein a rotated custom shape. - loadFromURL(u"tdf141786_RotatedShapeInGroup.odt"); + loadFromFile(u"tdf141786_RotatedShapeInGroup.odt"); // FIXME: validation error in OOXML export: Errors: 3 skipValidation(); @@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition) CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon) { // Given a document with a group shape, containing a single polygon child shape: - loadFromURL(u"dml-groupshape-polygon.docx"); + loadFromFile(u"dml-groupshape-polygon.docx"); // FIXME: validation error in OOXML export: Errors: 9 skipValidation(); @@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon) CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport) { // Given a document with a few different kinds of arrow shapes in it: - loadFromURL(u"tdf142602_CustomShapeArrows.odt"); + loadFromFile(u"tdf142602_CustomShapeArrows.odt"); // FIXME: validation error in OOXML export: Errors: 11 skipValidation(); @@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport) CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag) { // Given a PPTX file that contains camera revolution (rotation around z axis) applied shapes - loadFromURL(u"camera-rotation-revolution-nonwps.pptx"); + loadFromFile(u"camera-rotation-revolution-nonwps.pptx"); // When saving that document: save("Impress Office Open XML"); @@ -308,7 +308,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag) CPPUNIT_TEST_FIXTURE(Test, testReferToTheme) { // Given a PPTX file that contains references to a theme: - loadFromURL(u"refer-to-theme.pptx"); + loadFromFile(u"refer-to-theme.pptx"); // When saving that document: save("Impress Office Open XML"); @@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme) CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill) { // Given an ODP file that contains references to a theme for shape fill: - loadFromURL(u"ReferenceShapeFill.fodp"); + loadFromFile(u"ReferenceShapeFill.fodp"); // When saving that document: save("Impress Office Open XML"); @@ -369,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill) CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSize) { // Given a PPTX file that contains references to a theme: - loadFromURL(u"endParaRPr-newline-textsize.pptx"); + loadFromFile(u"endParaRPr-newline-textsize.pptx"); // When saving that document: save("Impress Office Open XML"); @@ -388,7 +388,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSi CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath) { // Given an odp file that contains a non-primitive custom shape with command N - loadFromURL(u"tdf147978_endsubpath.odp"); + loadFromFile(u"tdf147978_endsubpath.odp"); // When saving that document: save("Impress Office Open XML"); @@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath) CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA) { // Given an odp file that contains a non-primitive custom shape with command N - loadFromURL(u"tdf147978_enhancedPath_commandA.odp"); + loadFromFile(u"tdf147978_enhancedPath_commandA.odp"); // When saving that document: save("Impress Office Open XML"); @@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA) CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT) { // The odp file contains a non-primitive custom shape with commands MTZ - loadFromURL(u"tdf147978_enhancedPath_commandT.odp"); + loadFromFile(u"tdf147978_enhancedPath_commandT.odp"); // Export to pptx had only exported the command M and has used a wrong path size save("Impress Office Open XML"); @@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT) CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY) { // The odp file contains a non-primitive custom shapes with commands XY - loadFromURL(u"tdf147978_enhancedPath_commandXY.odp"); + loadFromFile(u"tdf147978_enhancedPath_commandXY.odp"); // Export to pptx had dropped commands X and Y. save("Impress Office Open XML"); @@ -489,7 +489,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY) CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK) { // The odp file contains a non-primitive custom shapes with commands H,I,J,K - loadFromURL(u"tdf147978_enhancedPath_commandHIJK.odp"); + loadFromFile(u"tdf147978_enhancedPath_commandHIJK.odp"); // Export to pptx had dropped commands X and Y. save("Impress Office Open XML"); @@ -511,7 +511,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK) CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath) { // The odp file contains a non-primitive custom shapes with commands H,I,J,K - loadFromURL(u"tdf147978_enhancedPath_subpath.pptx"); + loadFromFile(u"tdf147978_enhancedPath_subpath.pptx"); // Export to pptx had dropped the subpaths. save("Impress Office Open XML"); @@ -532,7 +532,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath) CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect) { // The document has a custom shape of type "non-primitive" to trigger the custGeom export - loadFromURL(u"tdf100391_TextAreaRect.odp"); + loadFromFile(u"tdf100391_TextAreaRect.odp"); // When saving to PPTX the textarea rect was set to default instead of using the actual area save("Impress Office Open XML"); @@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel) { // The odp file contains an "Octagon Bevel" shape. Such has shading not in commands H,I,J,K // but shading is generated in ctor of EnhancedCustomShape2d from the Type value. - loadFromURL(u"tdf109169_OctagonBevel.odt"); + loadFromFile(u"tdf109169_OctagonBevel.odt"); // FIXME: validation error in OOXML export: Errors: 1 skipValidation(); @@ -578,7 +578,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT) // path. LO is tolerant and renders it so that is makes a moveTo to the start point of the arc or // the end of the line respectively. Export to OOXML does the same now and writes a moveTo // instead of the normally used lnTo. If a lnTo is written, MS Office shows nothing of the shape. - loadFromURL(u"FaultyPathStart.odp"); + loadFromFile(u"FaultyPathStart.odp"); save("Impress Office Open XML"); @@ -597,7 +597,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY) // They use formulas with 'right' and 'bottom'. // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. The // line at right and bottom edge were positioned inside as if the shape had a square size. - loadFromURL(u"tdf148784_StretchXY.odp"); + loadFromFile(u"tdf148784_StretchXY.odp"); save("Impress Office Open XML"); // Verify the markup. @@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ) // They use formulas with 'right' and 'bottom'. // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. // That results in wrong arcs on the right or bottom side of the shape. - loadFromURL(u"tdf148784_StretchCommandQ.odp"); + loadFromFile(u"tdf148784_StretchCommandQ.odp"); save("Impress Office Open XML"); // Verify the markup. @@ -674,7 +674,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW) // has only fixed values in the path. // When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. // That results in circles instead of ellipses. - loadFromURL(u"tdf148784_StretchCommandVW.odp"); + loadFromFile(u"tdf148784_StretchCommandVW.odp"); save("Impress Office Open XML"); // Verify the markup. @@ -708,7 +708,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551VertPadding) // The document has shape[1] with attribute vert="vert270" and shape[2] with vert="vert". The text // has paddings lIns="720000"=2cm, tIns="360000"=1cm, rIns="0" and bIns="0". // After load and save the paddings were rotated and a 90deg text rotation was added. - loadFromURL(u"tdf149551_vert_and_padding.pptx"); + loadFromFile(u"tdf149551_vert_and_padding.pptx"); save("Impress Office Open XML"); // Verify the markup. The values must be the same as in the original file. @@ -730,7 +730,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright) // emulated by rotating the text area rectangle. On export there should be an upright="1" // attribute but no 'rot' attribute. Without the fix the 'rot' attribute with values from // the emulation was written out. - loadFromURL(u"tdf149538_upright.pptx"); + loadFromFile(u"tdf149538_upright.pptx"); save("Impress Office Open XML"); // Verify the markup. The values must be the same as in the original file. @@ -741,7 +741,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright) CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor) { - loadFromURL(u"tdf151008_eaVertAnchor.pptx"); + loadFromFile(u"tdf151008_eaVertAnchor.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); // The order of the shapes in the file is by name "Right", "Center", "Left", "RightMiddle", @@ -771,7 +771,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor) CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill) { // The document has a Fontwork shape with bitmap fill. - loadFromURL(u"tdf128568_FontworkBitmapFill.odt"); + loadFromFile(u"tdf128568_FontworkBitmapFill.odt"); // FIXME: validation error in OOXML export: Errors: 1 // Attribute ID is not allowed in element v:shape @@ -802,7 +802,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkFontProperties) { // The document has five Fontwork shapes. They have bitmap fill and thus are exported to VML. // They differ in font properties e.g. font weight and character spacing. - loadFromURL(u"tdf128568_FontworkFontProperties.odt"); + loadFromFile(u"tdf128568_FontworkFontProperties.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -838,7 +838,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkSlantUp) // not recognize its markup as preset WordArt, because the used markup differs from what Word // expects for this type of shape. As a result Word saves the shape as having custom geometry // and such is not understand by LibreOffice. - loadFromURL(u"tdf153296_VML_export_SlantUp.odt"); + loadFromFile(u"tdf153296_VML_export_SlantUp.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkArchUp) { // The document has a Fontwork shape type 'textArchUp' (172). When exporting to docx, the shape // was not exported as VML Fontwork but as a rectangle. - loadFromURL(u"tdf153296_VML_export_ArchUpCurve.odt"); + loadFromFile(u"tdf153296_VML_export_ArchUpCurve.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -887,7 +887,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLAdjustmentExport) { // The document has a Fontwork shape type 'textCirclePour' (150). When exporting to docx, the // adjustment values were not exported at all. - loadFromURL(u"tdf153246_VML_export_Fontwork_Adjustment.odt"); + loadFromFile(u"tdf153246_VML_export_Fontwork_Adjustment.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDirectColor) // The document has a Fontwork shape with fill #2e8b57 plus 60% transparency and line color // #ff7f50 with 20% transparency. When exporting to docx, line color was not exported at all // and fill color was replaced with character color. - loadFromURL(u"tdf51195_Fontwork_DirectColor.odt"); + loadFromFile(u"tdf51195_Fontwork_DirectColor.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -951,7 +951,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor) // The document has a Fontwork shape with fill theme color 'lt2' and 50% darker, and a Fontwork // shape with theme color 'dk2' and 40% lighter. When exporting to docx, fill color was not // exported as theme color at all, and it was replaced with character color. - loadFromURL(u"tdf51195_Fontwork_ThemeColor.fodt"); + loadFromFile(u"tdf51195_Fontwork_ThemeColor.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -999,7 +999,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDistance) { // LO ignores 'Spacing to Borders' of the 'Text Attributes' for Fontwork shapes. Word interprets // them. Make sure we force them to zero on export to docx, otherwise Word might wrap the text. - loadFromURL(u"tdf51195_Fontwork_Distance.odt"); + loadFromFile(u"tdf51195_Fontwork_Distance.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1022,7 +1022,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkLinGradientRGBColor) // start color #ffff00 (Yellow) with 'Intensity' 80%, end color #4682B4 (Steel Blue), Transition // Start 25% and solid transparency 30%. // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_linearGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_linearGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1069,7 +1069,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency) // Transparency gradient Type Axial with Angle 160deg, Transition start 40%, // Start value 5%, End value 90% // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_axialGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_axialGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1119,7 +1119,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient) // From Color #40E0D0, To Color #FF0000, Center x|y 75%|20%, no transparency // Transition start 10% // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_radialGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_radialGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1160,7 +1160,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient) // transparency gradient type Ellipsoid, Center x|y 50%|50%, Transition Start 50%, // Start 70%, End 0%. // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_ellipticalGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_ellipticalGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1203,7 +1203,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient) // From Color #4963ef 40%, To Color #ffff6e 90%, Center x|y 100%|50%, // no transparency // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_squareGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_squareGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1245,7 +1245,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient) // transparency gradient Type "Rectangular", Center x|y 50%|50%, Transition start 10%, // Start value 70%, End value 5%. // Without fix the gradient was not exported at all. - loadFromURL(u"tdf51195_Fontwork_rectGradient.fodt"); + loadFromFile(u"tdf51195_Fontwork_rectGradient.fodt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -1295,7 +1295,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency) // The document has first a Fontwork shape with solid fill theme color with transparency and // outline transparency and second a textbox with character transparency. // Without fix the transparency was not written to file. - loadFromURL(u"tdf139618_ThemeColorTransparency.pptx"); + loadFromFile(u"tdf139618_ThemeColorTransparency.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -1321,7 +1321,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface) // Saving the document had produced a file which PowerPoint wants to repair. The mandatory // attribute 'typeface' was missing in the <a:ea> elements. - loadFromURL(u"tdf155412_typeface.pptx"); + loadFromFile(u"tdf155412_typeface.pptx"); save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml"); @@ -1337,7 +1337,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport) // The document has a custom shape of type "circular-arrow". Such uses a B command where // the ellipse bounding box is defined by bottom-right vertex first and then top-left vertex. // When saving to PPTX this had resulted in negative radii for the ellipse. - loadFromURL(u"tdf157289_circularArrow_export.fodp"); + loadFromFile(u"tdf157289_circularArrow_export.fodp"); save("Impress Office Open XML"); // Verify the markup. Both wR and hR must be positive. diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx index 0cc750aa0c7a..3e1b8c55b8ce 100644 --- a/oox/qa/unit/mathml.cxx +++ b/oox/qa/unit/mathml.cxx @@ -26,12 +26,12 @@ public: CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters) { // Without the accompanying fix in place, this failed with an assertion failure on import. - loadFromURL(u"import-characters.pptx"); + loadFromFile(u"import-characters.pptx"); } CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportMce) { - loadFromURL(u"import-mce.pptx"); + loadFromFile(u"import-mce.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx index ac3792633ba7..edb9b9bf76eb 100644 --- a/oox/qa/unit/mcgr.cxx +++ b/oox/qa/unit/mcgr.cxx @@ -26,7 +26,7 @@ public: CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradient) { // Given a document with three-color gradient on a Fontwork. - loadFromURL(u"MCGR_FontworkColorGradient.fodp"); + loadFromFile(u"MCGR_FontworkColorGradient.fodp"); // Save it to PPTX save("Impress Office Open XML"); // And make sure a multi-color gradient fill is exported. @@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord) // Fontwork is handled different in Word than in PowerPoint documents. So we need a separate // test for a text document. // Given a document with three-color gradient on a Fontwork. - loadFromURL(u"MCGR_FontworkColorGradient.fodt"); + loadFromFile(u"MCGR_FontworkColorGradient.fodt"); // Save it to DOCX save("Office Open XML Text"); // And make sure a multi-color gradient fill is exported. @@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord) CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent) { // Color gradient has offset range [0,0.8] and transparency gradient has offset range [0,1]. - loadFromURL(u"tdf155825_MCGR_SourceOffsetRangeDifferent.fodp"); + loadFromFile(u"tdf155825_MCGR_SourceOffsetRangeDifferent.fodp"); // Save it to PPTX // Without fix, a debug-build would have crashed in oox/source/export/drawingml.cxx from // assert(false && "oox::WriteGradientFill: non-synchronized gradients (!)"); @@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent) CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount) { // Given a document with two-color gradient with StepCount 4. - loadFromURL(u"tdf155852_MCGR_StepCount4.fodp"); + loadFromFile(u"tdf155852_MCGR_StepCount4.fodp"); // Save it to PPTX save("Impress Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml"); @@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans) { // Given a document with a shape with axial color gradient from inside red to outside cyan and // two-stop linear transparency gradient from start 80% to end 0%. - loadFromURL(u"tdf155827_MCGR_AxialColorLinearTrans.fodp"); + loadFromFile(u"tdf155827_MCGR_AxialColorLinearTrans.fodp"); // Save it to PPTX save("Impress Office Open XML"); // OOXML has transparency together with color. Transparency is stored as opacity. diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index d3a971cd58db..490c81bf9b1f 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -93,7 +93,7 @@ uno::Reference<drawing::XShape> OoxShapeTest::getShapeByName(std::u16string_view CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform) { - loadFromURL(u"tdf141463_GroupTransform.pptx"); + loadFromFile(u"tdf141463_GroupTransform.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes) { - loadFromURL(u"multiple-group-shapes.docx"); + loadFromFile(u"multiple-group-shapes.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -142,7 +142,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition) { - loadFromURL(u"customshape-position.docx"); + loadFromFile(u"customshape-position.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -165,7 +165,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf125582_TextOnCircle) // The document contains a shape with a:prstTxWarp="textCircle" with two paragraphs. // PowerPoint aligns the bottom of the text with the path, LO had aligned the middle of the // text with the path, which resulted in smaller text. - loadFromURL(u"tdf125582_TextOnCircle.pptx"); + loadFromFile(u"tdf125582_TextOnCircle.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -193,7 +193,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151008VertAnchor) // The document contains shapes with all six kind of anchor positions in pptx. The text in the // shapes is larger than the shape and has no word wrap. That way anchor position is visible // in case you inspect the file manually. - loadFromURL(u"tdf151008_eaVertAnchor.pptx"); + loadFromFile(u"tdf151008_eaVertAnchor.pptx"); struct anchorDesc { @@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151518VertAnchor) // The document contains SmartArt with shapes with not default text area. Without fix the // text was shifted up because of wrong values in TextLowerDistance and TextUpperDistance. - loadFromURL(u"tdf151518_SmartArtTextLocation.docx"); + loadFromFile(u"tdf151518_SmartArtTextLocation.docx"); struct TextDistance { @@ -295,7 +295,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor) } // get SmartArt - loadFromURL(u"tdf54095_SmartArtThemeTextColor.docx"); + loadFromFile(u"tdf54095_SmartArtThemeTextColor.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -336,7 +336,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork) { - loadFromURL(u"tdf125885_WordArt.docx"); + loadFromFile(u"tdf125885_WordArt.docx"); // Without the patch WordArt in text document was imported as rectangular custom shape with // attached frame. So there was no artistic text at all. Now it is imported as Fontwork. // This test covers some basic properties. @@ -412,7 +412,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2) { - loadFromURL(u"tdf125885_WordArt2.docx"); + loadFromFile(u"tdf125885_WordArt2.docx"); // Without the patch WordArt in text document was imported as rectangular custom shape with // attached frame. So there was no artistic text at all. Now it is imported as Fontwork. // This test covers whether theme color properties are correctly converted on import. @@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) { - loadFromURL(u"tdf125885_WordArt3.docx"); + loadFromFile(u"tdf125885_WordArt3.docx"); // Without the patch WordArt in text document was imported as rectangular custom shape with // attached frame. So there was no artistic text at all. Now it is imported as Fontwork. // This test covers some aspects of import of gradient fill. @@ -544,7 +544,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkNonAccentColor) { - loadFromURL(u"tdf152840_WordArt_non_accent_color.docx"); + loadFromFile(u"tdf152840_WordArt_non_accent_color.docx"); // The file contains WordArt which uses the theme colors "Background 1", "Text 1", "Background 2" // and "Text 2". @@ -587,7 +587,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkNonAccentColor) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor) { - loadFromURL(u"tdf152840_theme_color_non_accent.docx"); + loadFromFile(u"tdf152840_theme_color_non_accent.docx"); // The file contains shapes which uses the theme colors "bg2", "bg1", "tx1" and "tx2" in this // order as fill color. @@ -613,7 +613,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency) { - loadFromURL(u"tdf152896_WordArt_color_darken.docx"); + loadFromFile(u"tdf152896_WordArt_color_darken.docx"); // The file contains a WordArt shape with theme colors "Background 2", shading mode "Darken 25%" // and "20% Transparency". Word writes this as w:color element with additional w14:textFill // element. In such case the w14:textFill element supersedes the w:color element. Error was, that @@ -634,7 +634,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency) CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient) { - loadFromURL(u"tdf139618_ImportWordArtGradient.pptx"); + loadFromFile(u"tdf139618_ImportWordArtGradient.pptx"); // Without the patch all WordArt was imported with solid color. Now gradient is imported. // This test covers several aspects of import of gradient fill. @@ -772,7 +772,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtBitmapFill) { // The document has a WordArt shape with bitmap fill. // Without fix it was imported as solid color fill. - loadFromURL(u"tdf139618_WordArtBitmapFill.pptx"); + loadFromFile(u"tdf139618_WordArtBitmapFill.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -805,7 +805,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtDefaultColor) // The document has a WordArt shape for which the text color is not explicitly set. In such cases // MS Office uses the scheme color 'tx1'. Without fix it was imported as 'fill none'. The shape // existed but was not visible on screen. - loadFromURL(u"tdf155327_WordArtDefaultColor.pptx"); + loadFromFile(u"tdf155327_WordArtDefaultColor.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -822,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGlowOnGroup) { // The document contains a group of two shapes. A glow-effect is set on the group. // Without the fix, the children of the group were not imported at all. - loadFromURL(u"tdf156902_GlowOnGroup.docx"); + loadFromFile(u"tdf156902_GlowOnGroup.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx index c46475efe418..c0918b2682c9 100644 --- a/oox/qa/unit/vml.cxx +++ b/oox/qa/unit/vml.cxx @@ -38,7 +38,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline) { // Load a document with v:polyline shapes. Error was, that the size was set to zero and the // points were zero because of missing decode from length with unit. - loadFromURL(u"tdf112450_vml_polyline.docx"); + loadFromFile(u"tdf112450_vml_polyline.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf137314_vml_rotation_unit_fd) { // Load a document with a 30deg rotated arc on a drawing canvas. Rotation is given // as 1966080fd. Error was, that the vml angle unit "fd" was not converted to Degree100. - loadFromURL(u"tdf137314_vml_rotation_unit_fd.docx"); + loadFromFile(u"tdf137314_vml_rotation_unit_fd.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType) { // Load a document with a groupshape, 2nd child is a <v:shape>, its type has o:spt set to 202 // (TextBox). - loadFromURL(u"group-spt202.docx"); + loadFromFile(u"group-spt202.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText) // Load a document which has a group shape, containing a single child. // 17.78 cm is the full group shape width, 19431/64008 is the child shape's relative width inside // that, so 5.3975 cm should be the shape width. - loadFromURL(u"shape-non-autosize-with-text.docx"); + loadFromFile(u"shape-non-autosize-with-text.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText) CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke) { - loadFromURL(u"graphic-stroke.pptx"); + loadFromFile(u"graphic-stroke.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -186,7 +186,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWatermark) // Given a document with a picture watermark, and the "washout" checkbox is ticked on the Word // UI: // When loading that document: - loadFromURL(u"watermark.docx"); + loadFromFile(u"watermark.docx"); // Then make sure the watermark effect is not lost on import: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWriterFontworkTrimTrue) // The document contains a shape, that will be exported as VML shape to docx. Error was that the // attribute trim was not written out and thus import had treated it as the default 'false' and // had reduced the shape height. - loadFromURL(u"tdf153260_VML_trim_export.odt"); + loadFromFile(u"tdf153260_VML_trim_export.odt"); // FIXME: tdf#153183 validation error in OOXML export: Errors: 1 // Attribute 'ID' is not allowed to appear in element 'v:shape'. @@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testVMLDetectWordArtOnImport) { // The document contains a WordArt shape with type other than "fontwork-foo". Error was that // WordArt was not detected and thus shrinking shape to text content was not prevented. - loadFromURL(u"tdf153258_VML_import_WordArt_detection.docx"); + loadFromFile(u"tdf153258_VML_import_WordArt_detection.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape(xDrawPageSupplier->getDrawPage()->getByIndex(0), diff --git a/oox/qa/unit/wpc_drawing_canvas.cxx b/oox/qa/unit/wpc_drawing_canvas.cxx index ba347925d317..eadd1a26446b 100644 --- a/oox/qa/unit/wpc_drawing_canvas.cxx +++ b/oox/qa/unit/wpc_drawing_canvas.cxx @@ -46,7 +46,7 @@ public: CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Table_inside_Textbox) { // The document has a table inside a text box on a drawing canvas. - loadFromURL(u"WPC_tdf48610_Textbox_with_table_inside.docx"); + loadFromFile(u"WPC_tdf48610_Textbox_with_table_inside.docx"); // Make sure the table exists. Without import of drawing canvas, the table was lost. uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Table_inside_Textbox) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Text_in_ellipse) { // The document has text in an ellipse on a drawing canvas. - loadFromURL(u"WPC_Textwrap_in_ellipse.docx"); + loadFromFile(u"WPC_Textwrap_in_ellipse.docx"); // The VML import creates for an ellipse not a custom shape but a legacy ellipse and that has no // word wrap. Thus the text was in one line and overflows the shape. This overflow becomes visible @@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Text_in_ellipse) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_MulticolorGradient) { // The document has a shape with multi color gradient fill on a drawing canvas. - loadFromURL(u"WPC_MulticolorGradient.docx"); + loadFromFile(u"WPC_MulticolorGradient.docx"); // The VML import was not able to import multicolor gradients. Thus only start and end color // were imported, ColorStops had only two elements. @@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_MulticolorGradient) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CanvasBackground) { // The document has a drawing canvas with color fill. - loadFromURL(u"WPC_CanvasBackground.docx"); + loadFromFile(u"WPC_CanvasBackground.docx"); // The VML import displayed the background as if it was transparent. Thus the BoundRect // of the shape which represents the background was zero. @@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CanvasBackground) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Glow) { // The document has a shape with glow effect. - loadFromURL(u"WPC_Glow.docx"); + loadFromFile(u"WPC_Glow.docx"); // VML does not know any glow effect. Thus it was lost on import. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Glow) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_BentConnector) { // The document has two shapes connected with a bentConnector on a drawing canvas. - loadFromURL(u"WPC_BentConnector.docx"); + loadFromFile(u"WPC_BentConnector.docx"); // VML has no information about the target shapes of the connector. The connector was imported as // custom shape, not as connector shape @@ -165,7 +165,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_ThemeColor) { // The document has a shape with color fill used as pseudo background and a 'heart' shape with // color fill and colored line. All colors are theme colors. - loadFromURL(u"WPC_ThemeColor.docx"); + loadFromFile(u"WPC_ThemeColor.docx"); // VML has no information about theme colors. Thus ThemeColorType was always 'Unknown'. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_ThemeColor) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf104671_Cloud) { // The document has 'cloud' shape on a drawing canvas. - loadFromURL(u"WPC_tdf104671_Cloud.docx"); + loadFromFile(u"WPC_tdf104671_Cloud.docx"); // MS Office writes the 'cloud' shape without type to the VML fallback. Thus the VLM import uses // ClosedBezierShape with several closed polygons. That produces holes because of the even-odd @@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf104671_Cloud) CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Shadow) { // The document has a shape with blur shadow on a drawing canvas. - loadFromURL(u"WPC_Shadow.docx"); + loadFromFile(u"WPC_Shadow.docx"); // The VML fallback contains a block shadow. Blur is not available in VML. The VML import does not // import shadow at all. @@ -260,7 +260,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158339_shape_text_in_group) { // The document has a group of two shapes with text. This group is child of a drawing canvas. // Without fix the text of the shapes were imported as separate text boxes. - loadFromURL(u"WPC_tdf158339_shape_text_in_group.docx"); + loadFromFile(u"WPC_tdf158339_shape_text_in_group.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158348_shape_text_in_table_cell) { // The document has a shape with text on a drawing canvas in a table cell. // Without fix the text of the shape becomes part of the paragraph of the table cell. - loadFromURL(u"WPC_tdf158348_shape_text_in_table_cell.docx"); + loadFromFile(u"WPC_tdf158348_shape_text_in_table_cell.docx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CurvedConnector2) { // The document has two shapes connected with a curvedConnector2 on a drawing canvas. // This connector is a single Bezier segment without handles. - loadFromURL(u"WPC_CurvedConnector2.docx"); + loadFromFile(u"WPC_CurvedConnector2.docx"); // LO and OOXML differ in the position of the control points. LibreOffice uses 2/3 but OOXML // uses 1/2 of width or height. The path by LO looks more round. diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx index 774f75078a85..4e83e51139b2 100644 --- a/sc/qa/extras/htmlexporttest.cxx +++ b/sc/qa/extras/htmlexporttest.cxx @@ -33,7 +33,7 @@ public: void testHtmlSkipImage() { - loadFromURL(u"BaseForHTMLExport.ods"); + loadFromFile(u"BaseForHTMLExport.ods"); save("HTML (StarCalc)"); htmlDocUniquePtr pDoc = parseHtml(maTempFile); CPPUNIT_ASSERT (pDoc); @@ -52,7 +52,7 @@ public: void testTdf155244() { - loadFromURL(u"default-styles.ods"); + loadFromFile(u"default-styles.ods"); save("XHTML Calc File"); xmlDocUniquePtr pXmlDoc = parseXml(maTempFile); diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index c483a05c9300..4494f3f65bee 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -781,7 +781,7 @@ CPPUNIT_TEST_FIXTURE(ScMacrosTest, testShapeLayerId) CPPUNIT_TEST_FIXTURE(ScMacrosTest, testFunctionAccessIndirect) { - OUString aFileName = loadFromURL(u"tdf120161.ods"); // just some document with known values in cells + OUString aFileName = loadFromFile(u"tdf120161.ods"); // just some document with known values in cells const OUString aReference = "'" + aFileName + "'#$Sheet1.A1"; diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx index 9cab2bdd1edc..9749d639c6cc 100644 --- a/sc/qa/extras/new_cond_format.cxx +++ b/sc/qa/extras/new_cond_format.cxx @@ -434,7 +434,7 @@ void ScConditionalFormatTest::setUp() { UnoApiTest::setUp(); // get the test file - loadFromURL(u"new_cond_format_api.ods"); + loadFromFile(u"new_cond_format_api.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScConditionalFormatTest); diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx index 4498ff5ad743..fe092e019892 100644 --- a/sc/qa/extras/scannotationobj.cxx +++ b/sc/qa/extras/scannotationobj.cxx @@ -123,7 +123,7 @@ void ScAnnontationObj::setUp() UnoApiTest::setUp(); // get the test file - loadFromURL(u"ScAnnotationObj.ods"); + loadFromFile(u"ScAnnotationObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScAnnontationObj); diff --git a/sc/qa/extras/scannotationsobj.cxx b/sc/qa/extras/scannotationsobj.cxx index 8e711f8e9362..b81107e0571a 100644 --- a/sc/qa/extras/scannotationsobj.cxx +++ b/sc/qa/extras/scannotationsobj.cxx @@ -99,7 +99,7 @@ void ScAnnontationsObj::setUp() UnoApiTest::setUp(); // get the test file - loadFromURL(u"ScAnnotationObj.ods"); + loadFromFile(u"ScAnnotationObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScAnnontationsObj); diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx index de237299275b..c2b861ccd1b5 100644 --- a/sc/qa/extras/sccellcursorobj.cxx +++ b/sc/qa/extras/sccellcursorobj.cxx @@ -202,7 +202,7 @@ void ScCellCursorObj::setUp() { UnoApiTest::setUp(); - loadFromURL(u"ScCellCursorObj.ods"); + loadFromFile(u"ScCellCursorObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScCellCursorObj); diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index c7635cb21022..5470ae757906 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -245,7 +245,7 @@ void ScCellRangeObj::setUp() { UnoApiTest::setUp(); - loadFromURL(u"xcellrangesquery.ods"); + loadFromFile(u"xcellrangesquery.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScCellRangeObj); diff --git a/sc/qa/extras/scdatabaserangeobj.cxx b/sc/qa/extras/scdatabaserangeobj.cxx index 178ce8e680b6..4ddc137e4b25 100644 --- a/sc/qa/extras/scdatabaserangeobj.cxx +++ b/sc/qa/extras/scdatabaserangeobj.cxx @@ -97,7 +97,7 @@ void ScDatabaseRangeObj::setUp() { UnoApiTest::setUp(); - loadFromURL(u"ScDatabaseRangeObj.ods"); + loadFromFile(u"ScDatabaseRangeObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScDatabaseRangeObj); diff --git a/sc/qa/extras/scdatapilotfieldobj.cxx b/sc/qa/extras/scdatapilotfieldobj.cxx index f7ead7940576..789bc5a5baab 100644 --- a/sc/qa/extras/scdatapilotfieldobj.cxx +++ b/sc/qa/extras/scdatapilotfieldobj.cxx @@ -109,7 +109,7 @@ void ScDataPilotFieldObj::setUp() { UnoApiTest::setUp(); - loadFromURL(u"scdatapilotfieldobj.ods"); + loadFromFile(u"scdatapilotfieldobj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldObj); diff --git a/sc/qa/extras/scdatapilottableobj.cxx b/sc/qa/extras/scdatapilottableobj.cxx index 2a6bfa08ddd2..e0c66269f5f5 100644 --- a/sc/qa/extras/scdatapilottableobj.cxx +++ b/sc/qa/extras/scdatapilottableobj.cxx @@ -131,7 +131,7 @@ void ScDataPilotTableObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"ScDataPilotTableObj.ods"); + loadFromFile(u"ScDataPilotTableObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotTableObj); diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx index 1c2d9c615f1c..1c57effa3a2d 100644 --- a/sc/qa/extras/scmodelobj.cxx +++ b/sc/qa/extras/scmodelobj.cxx @@ -105,7 +105,7 @@ void ScModelObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"ScModelObj.ods"); + loadFromFile(u"ScModelObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScModelObj); diff --git a/sc/qa/extras/scnamedrangeobj.cxx b/sc/qa/extras/scnamedrangeobj.cxx index 7bbd5e510b57..95cbf1c42fcd 100644 --- a/sc/qa/extras/scnamedrangeobj.cxx +++ b/sc/qa/extras/scnamedrangeobj.cxx @@ -92,7 +92,7 @@ void ScNamedRangeObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"ScNamedRangeObj.ods"); + loadFromFile(u"ScNamedRangeObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScNamedRangeObj); diff --git a/sc/qa/extras/scnamedrangesobj.cxx b/sc/qa/extras/scnamedrangesobj.cxx index f5415a0b914c..5ae53f42e07c 100644 --- a/sc/qa/extras/scnamedrangesobj.cxx +++ b/sc/qa/extras/scnamedrangesobj.cxx @@ -134,7 +134,7 @@ void ScNamedRangesObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"ScNamedRangeObj.ods"); + loadFromFile(u"ScNamedRangeObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScNamedRangesObj); diff --git a/sc/qa/extras/scoutlineobj.cxx b/sc/qa/extras/scoutlineobj.cxx index 4e20a9214760..fd442599850b 100644 --- a/sc/qa/extras/scoutlineobj.cxx +++ b/sc/qa/extras/scoutlineobj.cxx @@ -62,7 +62,7 @@ void ScOutlineObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"ScOutlineObj.ods"); + loadFromFile(u"ScOutlineObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScOutlineObj); diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index ca4a7b762f63..bcca563ec9b3 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -345,7 +345,7 @@ void ScPDFExportTest::testExportFitToPage_Tdf103516() void ScPDFExportTest::testUnoCommands_Tdf120161() { - loadFromURL(u"tdf120161.ods"); + loadFromFile(u"tdf120161.ods"); // A1:G1 { @@ -374,7 +374,7 @@ void ScPDFExportTest::testUnoCommands_Tdf120161() void ScPDFExportTest::testTdf64703_hiddenPageBreak() { - loadFromURL(u"tdf64703_hiddenPageBreak.ods"); + loadFromFile(u"tdf64703_hiddenPageBreak.ods"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); @@ -396,7 +396,7 @@ void ScPDFExportTest::testTdf143978() return; } - loadFromURL(u"tdf143978.ods"); + loadFromFile(u"tdf143978.ods"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); // A1:A2 @@ -504,7 +504,7 @@ void ScPDFExportTest::testTdf84012() return; } - loadFromURL(u"tdf84012.ods"); + loadFromFile(u"tdf84012.ods"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); // A1 @@ -539,7 +539,7 @@ void ScPDFExportTest::testTdf78897() return; } - loadFromURL(u"tdf78897.xls"); + loadFromFile(u"tdf78897.xls"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); // C3:D3 @@ -569,7 +569,7 @@ void ScPDFExportTest::testTdf78897() // just needs to not crash on export to pdf void ScPDFExportTest::testForcepoint97() { - loadFromURL(u"forcepoint97.xlsx"); + loadFromFile(u"forcepoint97.xlsx"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); // A1:H81 diff --git a/sc/qa/extras/screcordchanges.cxx b/sc/qa/extras/screcordchanges.cxx index 50774a8a0cb2..9e95e37d78da 100644 --- a/sc/qa/extras/screcordchanges.cxx +++ b/sc/qa/extras/screcordchanges.cxx @@ -62,7 +62,7 @@ void ScRecordChangesTest::testSetRecordChanges() void ScRecordChangesTest::testCheckRecordChangesProtection() { // test with protected changes - loadFromURL(u"RecordChangesProtected.ods"); + loadFromFile(u"RecordChangesProtected.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xDocSettingsPropSet(xDoc, UNO_QUERY_THROW); diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index 8b5b3dbaa056..1c4543af959d 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -354,7 +354,7 @@ OUString ScTableSheetObj::getFileURL() void ScTableSheetObj::setUp() { UnoApiTest::setUp(); - maFileURL = loadFromURL(u"ScTableSheetObj.ods"); + maFileURL = loadFromFile(u"ScTableSheetObj.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScTableSheetObj); diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx index 59146a3e4b36..9fcd6d31e14a 100644 --- a/sc/qa/extras/sctablesheetsobj.cxx +++ b/sc/qa/extras/sctablesheetsobj.cxx @@ -141,7 +141,7 @@ void ScTableSheetsObj::setUp() { UnoApiTest::setUp(); // create a calc document - loadFromURL(u"rangenamessrc.ods"); + loadFromFile(u"rangenamessrc.ods"); } CPPUNIT_TEST_SUITE_REGISTRATION(ScTableSheetsObj); diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx index 570d6520a92c..5dc6157b4304 100644 --- a/sc/qa/extras/vba-macro-test.cxx +++ b/sc/qa/extras/vba-macro-test.cxx @@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testSimpleCopyAndPaste) // Range(Cells(4, 3), Cells(6, 3)).Copy // Cells(4, 2).Activate // ActiveCell.PasteSpecial xlValues - loadFromURL(u"SimpleCopyPaste.xlsm"); + loadFromFile(u"SimpleCopyPaste.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testMultiDocumentCopyAndPaste) // Cells(2, 2).Activate // ActiveCell.PasteSpecial xlValues // ... - loadFromURL(u"MultiDocumentCopyPaste.xlsm"); + loadFromFile(u"MultiDocumentCopyPaste.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testMultiDocumentCopyAndPaste) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testSheetAndColumnSelectAndHide) { - loadFromURL(u"SheetAndColumnSelectAndHide.xlsm"); + loadFromFile(u"SheetAndColumnSelectAndHide.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -185,7 +185,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testPrintArea) { // Sets the print area to A1:B5 // ActiveSheet.PageSetup.PrintArea = "$A$1:$B$5" - loadFromURL(u"VariousTestMacros.xlsm"); + loadFromFile(u"VariousTestMacros.xlsm"); uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); @@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testSelectAllChaged) { // Columns("A:A").Select // Range(Selection, Selection.End(xlToRight)).Select - loadFromURL(u"VariousTestMacros.xlsm"); + loadFromFile(u"VariousTestMacros.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); @@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testRangeSelect) { // Range("B2").Select // Range(Selection, Selection.End(xlToRight)).Select - loadFromURL(u"VariousTestMacros.xlsm"); + loadFromFile(u"VariousTestMacros.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); @@ -255,7 +255,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testWindowState) // Application.WindowState = xlMinimized // Application.WindowState = xlMaximized // Application.WindowState = xlNormal - loadFromURL(u"VariousTestMacros.xlsm"); + loadFromFile(u"VariousTestMacros.xlsm"); executeMacro("vnd.sun.Star.script:VBAProject.ThisWorkbook.testWindowState?language=Basic&" "location=document"); @@ -266,7 +266,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testScroll) // ActiveWindow.ScrollColumn = 30 // ActiveWindow.ScrollRow = 100 - loadFromURL(u"VariousTestMacros.xlsm"); + loadFromFile(u"VariousTestMacros.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); @@ -292,7 +292,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testMacroKeyBinding) { // key_U() -> CTRL+U // key_T() -> CTRL+T - loadFromURL(u"KeyShortcut.xlsm"); + loadFromFile(u"KeyShortcut.xlsm"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xModel.is()); @@ -430,7 +430,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVba) uno::Sequence<uno::Any> aParams; for (const auto& rTestInfo : testInfo) { - OUString aFileName = loadFromURL(rTestInfo.sFileBaseName); + OUString aFileName = loadFromFile(rTestInfo.sFileBaseName); // process all events such as OnLoad events etc. otherwise they tend // to arrive later at a random time - while processing other StarBasic @@ -551,7 +551,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVbaRangeSort) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf107885) { - loadFromURL(u"tdf107885.xlsm"); + loadFromFile(u"tdf107885.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf107885) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf131562) { - loadFromURL(u"tdf131562.xlsm"); + loadFromFile(u"tdf131562.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -607,7 +607,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf131562) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf52602) { - loadFromURL(u"tdf52602.xls"); + loadFromFile(u"tdf52602.xls"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf52602) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf107902) { - loadFromURL(u"tdf107902.xlsm"); + loadFromFile(u"tdf107902.xlsm"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -663,7 +663,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf107902) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf90278) { - loadFromURL(u"tdf90278.xls"); + loadFromFile(u"tdf90278.xls"); // Without the fix in place, changing the border weight // would cause a Basic exception/error in the following script. @@ -678,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf90278) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf149531) { - loadFromURL(u"tdf149531.xls"); + loadFromFile(u"tdf149531.xls"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf149531) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf118247) { - loadFromURL(u"tdf118247.xlsm"); + loadFromFile(u"tdf118247.xlsm"); uno::Any aRet = executeMacro( "vnd.sun.Star.script:VBAProject.Module1.testXlSpecialCellsValuesConstantsEmpty?" @@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVbaPDFExport) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testForEachInSelection) { - loadFromURL(u"ForEachInSelection.ods"); + loadFromFile(u"ForEachInSelection.ods"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); @@ -857,7 +857,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testForEachInSelection) CPPUNIT_TEST_FIXTURE(VBAMacroTest, testNonAsciiMacroIRI) { - loadFromURL(u"ForEachInSelection.ods"); + loadFromFile(u"ForEachInSelection.ods"); SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx index 00984eded77e..2cb0f6a3175d 100644 --- a/sc/qa/perf/scperfobj.cxx +++ b/sc/qa/perf/scperfobj.cxx @@ -106,7 +106,7 @@ ScPerfObj::ScPerfObj() void ScPerfObj::testSheetFindAll() { - loadFromURL(u"scBigFile.ods"); + loadFromFile(u"scBigFile.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); // get sheet @@ -160,7 +160,7 @@ void ScPerfObj::testSheetFindAll() void ScPerfObj::testSheetNamedRanges() { - loadFromURL(u"scBigFile.ods"); + loadFromFile(u"scBigFile.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); // get NamedRanges @@ -202,7 +202,7 @@ void ScPerfObj::testSheetNamedRanges() void ScPerfObj::testSheets() { - loadFromURL(u"scBigFile.ods"); + loadFromFile(u"scBigFile.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); // get getSheets @@ -228,7 +228,7 @@ void ScPerfObj::testSheets() void ScPerfObj::testSum() { - loadFromURL(u"scMathFunctions.ods"); + loadFromFile(u"scMathFunctions.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -267,7 +267,7 @@ void ScPerfObj::testSum() void ScPerfObj::testFTest() { - loadFromURL(u"scMathFunctions.ods"); + loadFromFile(u"scMathFunctions.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -291,7 +291,7 @@ void ScPerfObj::testFTest() void ScPerfObj::testChiTest() { - loadFromURL(u"scMathFunctions.ods"); + loadFromFile(u"scMathFunctions.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -315,7 +315,7 @@ void ScPerfObj::testChiTest() void ScPerfObj::testSumX2PY2Test() { - loadFromURL(u"scMathFunctions2.ods"); + loadFromFile(u"scMathFunctions2.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -339,7 +339,7 @@ void ScPerfObj::testSumX2PY2Test() void ScPerfObj::testTTest() { - loadFromURL(u"scMathFunctions2.ods"); + loadFromFile(u"scMathFunctions2.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -363,7 +363,7 @@ void ScPerfObj::testTTest() void ScPerfObj::testLcm() { - loadFromURL(u"scMathFunctions2.ods"); + loadFromFile(u"scMathFunctions2.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -387,7 +387,7 @@ void ScPerfObj::testLcm() void ScPerfObj::testGcd() { - loadFromURL(u"scMathFunctions2.ods"); + loadFromFile(u"scMathFunctions2.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -411,7 +411,7 @@ void ScPerfObj::testGcd() void ScPerfObj::testPearson() { - loadFromURL(u"scMathFunctions2.ods"); + loadFromFile(u"scMathFunctions2.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -435,7 +435,7 @@ void ScPerfObj::testPearson() void ScPerfObj::testSubTotalWithFormulas() { - loadFromURL(u"scBigSingleSheet200.ods"); + loadFromFile(u"scBigSingleSheet200.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -467,7 +467,7 @@ void ScPerfObj::testSubTotalWithFormulas() void ScPerfObj::testSubTotalWithoutFormulas() { - loadFromURL(u"scBigSingleSheet200.ods"); + loadFromFile(u"scBigSingleSheet200.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -500,7 +500,7 @@ void ScPerfObj::testSubTotalWithoutFormulas() void ScPerfObj::testLoadingFileWithSingleBigSheet() { callgrindStart(); - loadFromURL(u"scBigSingleSheet2000.ods"); + loadFromFile(u"scBigSingleSheet2000.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc1(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable1(xDoc1, UNO_QUERY_THROW); callgrindDump("sc:loadingFileWithSingleBigSheetdoSubTotal_2000lines"); @@ -534,7 +534,7 @@ namespace { void ScPerfObj::testFixedSum() { - loadFromURL(u"scMathFunctions3.ods"); + loadFromFile(u"scMathFunctions3.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -558,7 +558,7 @@ void ScPerfObj::testFixedSum() void ScPerfObj::testMatConcatSmall() { - loadFromURL(u"empty.ods"); + loadFromFile(u"empty.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); @@ -586,7 +586,7 @@ void ScPerfObj::testMatConcatSmall() void ScPerfObj::testMatConcatLarge() { - loadFromURL(u"empty.ods"); + loadFromFile(u"empty.ods"); uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW); diff --git a/sc/qa/unit/SparklineImportExportTest.cxx b/sc/qa/unit/SparklineImportExportTest.cxx index 63f7867bc7fc..67b139052c82 100644 --- a/sc/qa/unit/SparklineImportExportTest.cxx +++ b/sc/qa/unit/SparklineImportExportTest.cxx @@ -147,7 +147,7 @@ void checkSparklines(ScDocument& rDocument) void SparklineImportExportTest::testSparklinesRoundtripXLSX() { - loadFromURL(u"xlsx/Sparklines.xlsx"); + loadFromFile(u"xlsx/Sparklines.xlsx"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -163,7 +163,7 @@ void SparklineImportExportTest::testSparklinesRoundtripXLSX() void SparklineImportExportTest::testSparklinesExportODS() { // Load the document containing sparklines - loadFromURL(u"xlsx/Sparklines.xlsx"); + loadFromFile(u"xlsx/Sparklines.xlsx"); // Save as ODS and check content.xml with XPath save("calc8"); @@ -213,7 +213,7 @@ void SparklineImportExportTest::testSparklinesExportODS() void SparklineImportExportTest::testSparklinesRoundtripODS() { - loadFromURL(u"xlsx/Sparklines.xlsx"); + loadFromFile(u"xlsx/Sparklines.xlsx"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -233,7 +233,7 @@ void SparklineImportExportTest::testNoSparklinesInDocumentXLSX() // Check no sparkline elements are written when there are none in the document // Load the document containing NO sparklines - loadFromURL(u"xlsx/empty.xlsx"); + loadFromFile(u"xlsx/empty.xlsx"); save("Calc Office Open XML"); xmlDocUniquePtr pXmlDoc = parseExport("xl/worksheets/sheet1.xml"); @@ -277,7 +277,7 @@ void checkSparklineThemeColors(ScDocument& rDocument) void SparklineImportExportTest::testSparklinesRoundtripThemeColorsODS() { - loadFromURL(u"fods/Sparklines.fods"); + loadFromFile(u"fods/Sparklines.fods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -292,7 +292,7 @@ void SparklineImportExportTest::testSparklinesRoundtripThemeColorsODS() void SparklineImportExportTest::testSparklinesRoundtripThemeColorsOOXML() { - loadFromURL(u"fods/Sparklines.fods"); + loadFromFile(u"fods/Sparklines.fods"); saveAndReload("Calc Office Open XML"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); diff --git a/sc/qa/unit/ThemeImportExportTest.cxx b/sc/qa/unit/ThemeImportExportTest.cxx index d8c7c468c368..9beb19ce2ee7 100644 --- a/sc/qa/unit/ThemeImportExportTest.cxx +++ b/sc/qa/unit/ThemeImportExportTest.cxx @@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExportAndImport) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExportOOXML) { - loadFromURL(u"xlsx/CalcThemeTest.xlsx"); + loadFromFile(u"xlsx/CalcThemeTest.xlsx"); save("Calc Office Open XML"); @@ -219,7 +219,7 @@ void checkCellBackgroundThemeColor(ScDocument* pDoc) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColorOOXML) { - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); checkCellBackgroundThemeColor(getScDoc()); saveAndReload("Calc Office Open XML"); checkCellBackgroundThemeColor(getScDoc()); @@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColorOOXML) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBackgroundThemeColorODF) { // Open the OOXML source - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); // Save as ODF and load again - checks import / export cycle saveAndReload("calc8"); // Check the values and show that the document is unchanged and all the data preserved @@ -290,7 +290,7 @@ void checkCellTextThemeColor(ScDocument* pDoc) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellTextThemeColor) { - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); checkCellTextThemeColor(getScDoc()); saveAndReload("Calc Office Open XML"); checkCellTextThemeColor(getScDoc()); @@ -299,7 +299,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellTextThemeColor) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellTextThemeColorODF) { // Open the OOXML source - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); // Save as ODF and load again - checks import / export cycle saveAndReload("calc8"); // Check the values and show that the document is unchanged and all the data preserved @@ -419,7 +419,7 @@ void checkCellBorderThemeColor(ScDocument* pDoc) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBorderThemeColor) { - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); checkCellBorderThemeColor(getScDoc()); saveAndReload("Calc Office Open XML"); checkCellBorderThemeColor(getScDoc()); @@ -428,7 +428,7 @@ CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBorderThemeColor) CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testCellBorderThemeColorODF) { // Open the OOXML source - loadFromURL(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); + loadFromFile(u"xlsx/Test_ThemeColor_Text_Background_Border.xlsx"); // Save as ODF and load again - checks import / export cycle saveAndReload("calc8"); // Check the values and show that the document is unchanged and all the data preserved diff --git a/sc/qa/unit/anchor.cxx b/sc/qa/unit/anchor.cxx index 789b6d777181..18daecd23aa1 100644 --- a/sc/qa/unit/anchor.cxx +++ b/sc/qa/unit/anchor.cxx @@ -65,7 +65,7 @@ ScAnchorTest::ScAnchorTest() void ScAnchorTest::testUndoAnchor() { - loadFromURL(u"document_with_linked_graphic.ods"); + loadFromFile(u"document_with_linked_graphic.ods"); // Get the document model SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -191,7 +191,7 @@ void ScAnchorTest::testTdf76183() void ScAnchorTest::testODFAnchorTypes() { - loadFromURL(u"3AnchorTypes.ods"); + loadFromFile(u"3AnchorTypes.ods"); // Get the document model SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -230,7 +230,7 @@ void ScAnchorTest::testODFAnchorTypes() /// Test that copying a column with an image anchored to it also copies the image void ScAnchorTest::testCopyColumnWithImages() { - loadFromURL(u"3AnchorTypes.ods"); + loadFromFile(u"3AnchorTypes.ods"); // Get the document model SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); @@ -296,7 +296,7 @@ void ScAnchorTest::testCopyColumnWithImages() void ScAnchorTest::testCutWithImages() { - loadFromURL(u"3AnchorTypes.ods"); + loadFromFile(u"3AnchorTypes.ods"); // open the document with graphic included // Get the document model @@ -350,7 +350,7 @@ void ScAnchorTest::testCutWithImages() void ScAnchorTest::testTdf121963() { - loadFromURL(u"tdf121963.ods"); + loadFromFile(u"tdf121963.ods"); // Without the accompanying fix in place, this test would have never returned due to an infinite // invalidation loop, where ScGridWindow::Paint() invalidated itself. @@ -359,7 +359,7 @@ void ScAnchorTest::testTdf121963() void ScAnchorTest::testTdf129552() { - loadFromURL(u"tdf129552.fods"); + loadFromFile(u"tdf129552.fods"); // Without the accompanying fix in place, this test would have never returned due to an infinite // invalidation loop, where ScGridWindow::Paint() invalidated itself. @@ -368,7 +368,7 @@ void ScAnchorTest::testTdf129552() void ScAnchorTest::testTdf130556() { - loadFromURL(u"tdf130556.ods"); + loadFromFile(u"tdf130556.ods"); // Without the accompanying fix in place, this test would have never returned due to an infinite // invalidation loop, where ScGridWindow::Paint() invalidated itself. @@ -377,7 +377,7 @@ void ScAnchorTest::testTdf130556() void ScAnchorTest::testTdf134161() { - loadFromURL(u"tdf134161.ods"); + loadFromFile(u"tdf134161.ods"); // Without the accompanying fix in place, this test would have never returned due to an infinite // invalidation loop diff --git a/sc/qa/unit/cond_format_merge.cxx b/sc/qa/unit/cond_format_merge.cxx index 5a33cccdbe01..ed6a938bb472 100644 --- a/sc/qa/unit/cond_format_merge.cxx +++ b/sc/qa/unit/cond_format_merge.cxx @@ -41,7 +41,7 @@ ScCondFormatMergeTest::ScCondFormatMergeTest() void ScCondFormatMergeTest::testCondFormatMerge() { - loadFromURL(u"cond_format_merge.ods"); + loadFromFile(u"cond_format_merge.ods"); // get the first sheet uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx index 879c01844ba3..7ee2b1a72cc8 100644 --- a/sc/qa/unit/copy_paste_test.cxx +++ b/sc/qa/unit/copy_paste_test.cxx @@ -75,7 +75,7 @@ private: // tdf#83366 void ScCopyPasteTest::testCopyPasteXLS() { - loadFromURL(u"xls/chartx2.xls"); + loadFromFile(u"xls/chartx2.xls"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -315,7 +315,7 @@ static ScAddress lcl_getMergeSizeOfCell(const ScDocument& rDoc, SCCOL nCol, SCRO void ScCopyPasteTest::testTdf53431_fillOnAutofilter() { - loadFromURL(u"ods/tdf53431_autofilterFilldown.ods"); + loadFromFile(u"ods/tdf53431_autofilterFilldown.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -376,7 +376,7 @@ void ScCopyPasteTest::testTdf53431_fillOnAutofilter() void ScCopyPasteTest::testTdf40993_fillMergedCells() { - loadFromURL(u"ods/tdf40993_fillMergedCells.ods"); + loadFromFile(u"ods/tdf40993_fillMergedCells.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -464,7 +464,7 @@ static void lcl_clickAndCheckCurrentArea(SCCOL nCol, SCROW nRow, SCCOL nCol2, SC void ScCopyPasteTest::testTdf43958_clickSelectOnMergedCells() { - loadFromURL(u"ods/tdf40993_fillMergedCells.ods"); + loadFromFile(u"ods/tdf40993_fillMergedCells.ods"); // select cell (e.g. by clicking on it) and check what is selected [but not marked]: // if it is the top left cell of a merged area, the selection is enlarged to the area @@ -485,7 +485,7 @@ void ScCopyPasteTest::testTdf43958_clickSelectOnMergedCells() void ScCopyPasteTest::testTdf88782_autofillLinearNumbersInMergedCells() { - loadFromURL(u"ods/tdf88782_AutofillLinearNumbersInMergedCells.ods"); + loadFromFile(u"ods/tdf88782_AutofillLinearNumbersInMergedCells.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -547,7 +547,7 @@ void ScCopyPasteTest::testTdf88782_autofillLinearNumbersInMergedCells() void ScCopyPasteTest::tdf137621_autofillMergedBool() { - loadFromURL(u"ods/tdf137621_autofillMergedBool.ods"); + loadFromFile(u"ods/tdf137621_autofillMergedBool.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -580,7 +580,7 @@ void ScCopyPasteTest::tdf137621_autofillMergedBool() void ScCopyPasteTest::tdf137205_autofillDatesInMergedCells() { - loadFromURL(u"ods/tdf137205_AutofillDatesInMergedCells.ods"); + loadFromFile(u"ods/tdf137205_AutofillDatesInMergedCells.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -618,7 +618,7 @@ void ScCopyPasteTest::addToUserList(const OUString& rStr) void ScCopyPasteTest::tdf137653_137654_autofillUserlist() { - loadFromURL(u"ods/tdf137653_137654_autofillUserlist.ods"); + loadFromFile(u"ods/tdf137653_137654_autofillUserlist.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -678,7 +678,7 @@ void ScCopyPasteTest::tdf137653_137654_autofillUserlist() void ScCopyPasteTest::tdf113500_autofillMixed() { - loadFromURL(u"ods/tdf113500_autofillMixed.ods"); + loadFromFile(u"ods/tdf113500_autofillMixed.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -728,7 +728,7 @@ void ScCopyPasteTest::tdf113500_autofillMixed() void ScCopyPasteTest::tdf137625_autofillMergedUserlist() { - loadFromURL(u"ods/tdf137625_autofillMergedUserlist.ods"); + loadFromFile(u"ods/tdf137625_autofillMergedUserlist.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); @@ -788,7 +788,7 @@ void ScCopyPasteTest::tdf137625_autofillMergedUserlist() void ScCopyPasteTest::tdf137624_autofillMergedMixed() { - loadFromURL(u"ods/tdf137624_autofillMergedMixed.ods"); + loadFromFile(u"ods/tdf137624_autofillMergedMixed.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); ScDocument* pDoc = pModelObj->GetDocument(); diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 23ddf5271fc4..4dc09a65de6e 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -574,7 +574,7 @@ void ScModelTestBase::createScDoc(const char* pName, const char* pPassword, bool if (!pName) load("private:factory/scalc"); else - loadFromURL(OUString::createFromAscii(pName), pPassword); + loadFromFile(OUString::createFromAscii(pName), pPassword); uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument")); @@ -620,7 +620,7 @@ void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, unsigne { const std::u16string_view sFileName = aTestValues[ index ].sTestDoc; const OUString sExportType = aTestValues[ index ].sExportType; - loadFromURL(sFileName); + loadFromFile(sFileName); if ( !sExportType.isEmpty() ) saveAndReload(sExportType); diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx index e3bba0717a86..d4cdb18678b1 100644 --- a/sc/qa/unit/jumbosheets-test.cxx +++ b/sc/qa/unit/jumbosheets-test.cxx @@ -86,7 +86,7 @@ void ScJumboSheetsTest::testRoundtripColumn2000Xlsx() void ScJumboSheetsTest::testRoundtripColumn2000(std::u16string_view name, const char* format) { - loadFromURL(name); + loadFromFile(name); { ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -116,7 +116,7 @@ void ScJumboSheetsTest::testRoundtripColumn2000(std::u16string_view name, const void ScJumboSheetsTest::testRoundtripColumnRangeOds() { - loadFromURL(u"ods/sum-whole-column-row.ods"); + loadFromFile(u"ods/sum-whole-column-row.ods"); { ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -150,7 +150,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds() void ScJumboSheetsTest::testRoundtripColumnRangeXlsx() { - loadFromURL(u"ods/sum-whole-column-row.ods"); + loadFromFile(u"ods/sum-whole-column-row.ods"); saveAndReload("Calc Office Open XML"); { ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); @@ -170,7 +170,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeXlsx() void ScJumboSheetsTest::testRoundtripNamedRanges(std::u16string_view name, const char* format) { - loadFromURL(name); + loadFromFile(name); std::pair<OUString, OUString> ranges[] = { { "CELLBXX1", "$Sheet1.$BXX$1" }, { "CELLSA4_AMJ4", "$Sheet1.$A$4:$AMJ$4" }, @@ -220,7 +220,7 @@ void ScJumboSheetsTest::testNamedRangeNameConflict() { // The document contains named ranges named 'num1' and 'num2', that should be still treated // as named references even though with 16k columns those are normally NUM1 and NUM2 cells. - loadFromURL(u"ods/named-range-conflict.ods"); + loadFromFile(u"ods/named-range-conflict.ods"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -242,7 +242,7 @@ void ScJumboSheetsTest::testNamedRangeNameConflict() void ScJumboSheetsTest::testTdf134553() { - loadFromURL(u"xlsx/tdf134553.xlsx"); + loadFromFile(u"xlsx/tdf134553.xlsx"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -292,7 +292,7 @@ void ScJumboSheetsTest::testTdf134553() void ScJumboSheetsTest::testTdf134392() { // Without the fix in place, the file would have crashed - loadFromURL(u"xlsx/tdf134392.xlsx"); + loadFromFile(u"xlsx/tdf134392.xlsx"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -343,7 +343,7 @@ void ScJumboSheetsTest::testTdf133033() void ScJumboSheetsTest::testTdf109061() { // Without the fix in place, the file would have crashed - loadFromURL(u"xlsx/tdf109061.xlsx"); + loadFromFile(u"xlsx/tdf109061.xlsx"); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 31dae9282166..b0042d9878d6 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -1253,7 +1253,7 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testUnicodeFileNameGnumeric) { return; } - loadFromURL(u"gnumeric/t\u00E4\u00DFt.gnumeric"); + loadFromFile(u"gnumeric/t\u00E4\u00DFt.gnumeric"); } CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testMergedCellsXLSXML) diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 8446f07fc3b9..5548dc06fbdf 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -113,7 +113,7 @@ void ScTiledRenderingTest::tearDown() ScModelObj* ScTiledRenderingTest::createDoc(const char* pName) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent); CPPUNIT_ASSERT(pModelObj); @@ -2831,7 +2831,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCommentCellCopyPaste) CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testInvalidEntrySave) { - loadFromURL(u"validity.xlsx"); + loadFromFile(u"validity.xlsx"); // .uno:Save modifies the original file, make a copy first saveAndReload("Calc Office Open XML"); diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx index 1f4b9ae2e177..a0b4203cebf1 100644 --- a/sccomp/qa/unit/SwarmSolverTest.cxx +++ b/sccomp/qa/unit/SwarmSolverTest.cxx @@ -45,7 +45,7 @@ public: void SwarmSolverTest::testUnconstrained() { - loadFromURL(u"Simple.ods"); + loadFromFile(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -88,7 +88,7 @@ void SwarmSolverTest::testUnconstrained() void SwarmSolverTest::testVariableBounded() { - loadFromURL(u"Simple.ods"); + loadFromFile(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -133,7 +133,7 @@ void SwarmSolverTest::testVariableBounded() void SwarmSolverTest::testVariableConstrained() { - loadFromURL(u"Simple.ods"); + loadFromFile(u"Simple.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -181,7 +181,7 @@ void SwarmSolverTest::testVariableConstrained() void SwarmSolverTest::testTwoVariables() { - loadFromURL(u"TwoVariables.ods"); + loadFromFile(u"TwoVariables.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); @@ -233,7 +233,7 @@ void SwarmSolverTest::testTwoVariables() void SwarmSolverTest::testMultipleVariables() { - loadFromURL(u"MultiVariable.ods"); + loadFromFile(u"MultiVariable.ods"); uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW); diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx index b55a5070e696..b84630c971fe 100644 --- a/sd/qa/filter/eppt/eppt.cxx +++ b/sd/qa/filter/eppt/eppt.cxx @@ -38,7 +38,7 @@ Test::Test() CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill) { // Save the bugdoc to PPT. - loadFromURL(u"custom-shape-bitmap-fill.pptx"); + loadFromFile(u"custom-shape-bitmap-fill.pptx"); saveAndReload("MS PowerPoint 97"); // Check if the bitmap shape was lost. @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport) CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation) { // Given a media shape that has an animation that specifies looping for the video: - loadFromURL(u"video-loop.pptx"); + loadFromFile(u"video-loop.pptx"); // When exporting that to PPTX: save("Impress Office Open XML"); diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx index 34b262f6e76c..89f60e98f556 100644 --- a/sd/qa/unit/HtmlExportTest.cxx +++ b/sd/qa/unit/HtmlExportTest.cxx @@ -22,7 +22,7 @@ public: void testHTMLExport() { - loadFromURL(u"HtmlExportTestDocument.odp"); + loadFromFile(u"HtmlExportTestDocument.odp"); save("impress_html_Export"); htmlDocUniquePtr htmlDoc = parseHtml(maTempFile); @@ -43,7 +43,7 @@ public: void testTdf154989() { - loadFromURL(u"tdf154989.odg"); + loadFromFile(u"tdf154989.odg"); save("XHTML Draw File"); xmlDocUniquePtr pXmlDoc = parseXml(maTempFile); diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index ed50b2adc78c..8b2926bbd896 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -42,7 +42,7 @@ static void assertColorsAreSimilar(const std::string& message, const BitmapColor CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998) { - loadFromURL(u"odp/tdf105998.odp"); + loadFromFile(u"odp/tdf105998.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319) { - loadFromURL(u"odg/tdf126319.odg"); + loadFromFile(u"odg/tdf126319.odg"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632) { // Reuse existing file - loadFromURL(u"odp/tdf105998.odp"); + loadFromFile(u"odp/tdf105998.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157652) { - loadFromURL(u"odp/tdf157652.odp"); + loadFromFile(u"odp/tdf157652.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157652) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808) { - loadFromURL(u"pptx/tdf156808.pptx"); + loadFromFile(u"pptx/tdf156808.pptx"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795) { - loadFromURL(u"odp/tdf157795.odp"); + loadFromFile(u"odp/tdf157795.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362) { - loadFromURL(u"odp/tdf105362.odp"); + loadFromFile(u"odp/tdf105362.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -401,7 +401,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157636) { - loadFromURL(u"ppt/tdf157636.ppt"); + loadFromFile(u"ppt/tdf157636.ppt"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -452,7 +452,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157636) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793) { - loadFromURL(u"pptx/tdf157793.pptx"); + loadFromFile(u"pptx/tdf157793.pptx"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -507,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635) { - loadFromURL(u"pptx/tdf157635.pptx"); + loadFromFile(u"pptx/tdf157635.pptx"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -558,7 +558,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113163) { - loadFromURL(u"pptx/tdf113163.pptx"); + loadFromFile(u"pptx/tdf113163.pptx"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -608,7 +608,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113163) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119) { - loadFromURL(u"odg/tdf147119.odg"); + loadFromFile(u"odg/tdf147119.odg"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -657,7 +657,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113197) { - loadFromURL(u"odp/tdf113197.odp"); + loadFromFile(u"odp/tdf113197.odp"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -708,7 +708,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113197) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf93124) { - loadFromURL(u"ppt/tdf93124.ppt"); + loadFromFile(u"ppt/tdf93124.ppt"); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter @@ -764,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729) for (size_t i = 0; i < SAL_N_ELEMENTS(filenames); ++i) { // 1st check for new behaviour - having AnchoredTextOverflowLegacy compatibility flag set to false in settings.xml - loadFromURL(filenames[i]); + loadFromFile(filenames[i]); uno::Reference<uno::XComponentContext> xContext = getComponentContext(); CPPUNIT_ASSERT(xContext.is()); @@ -817,7 +817,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729) CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048) { - loadFromURL(u"odg/diagonalLine.fodg"); + loadFromFile(u"odg/diagonalLine.fodg"); auto xGraphicExporter = drawing::GraphicExportFilter::create(getComponentContext()); CPPUNIT_ASSERT(xGraphicExporter); diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx index 03381bd8901e..b53f8c1d64c4 100644 --- a/sd/qa/unit/SVGExportTests.cxx +++ b/sd/qa/unit/SVGExportTests.cxx @@ -76,7 +76,7 @@ public: void testSVGExportTextDecorations() { - loadFromURL(u"svg-export-text-decorations.odp"); + loadFromFile(u"svg-export-text-decorations.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -99,7 +99,7 @@ public: void testSVGExportJavascriptURL() { - loadFromURL(u"textbox-link-javascript.odp"); + loadFromFile(u"textbox-link-javascript.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -114,7 +114,7 @@ public: void testSVGExportSlideCustomBackground() { - loadFromURL(u"slide-custom-background.odp"); + loadFromFile(u"slide-custom-background.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -125,7 +125,7 @@ public: void testSVGExportTextFieldsInMasterPage() { - loadFromURL(u"text-fields.odp"); + loadFromFile(u"text-fields.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -149,7 +149,7 @@ public: void testSVGExportEmbeddedVideo() { - loadFromURL(u"slide-video-thumbnail.odp"); + loadFromFile(u"slide-video-thumbnail.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -180,7 +180,7 @@ public: void testSVGExportSlideBitmapBackground() { - loadFromURL(u"slide-bitmap-background.odp"); + loadFromFile(u"slide-bitmap-background.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -209,7 +209,7 @@ public: void testSVGExportSlideTileBitmapBackground() { - loadFromURL(u"slide-tile-background.odp"); + loadFromFile(u"slide-tile-background.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); @@ -274,7 +274,7 @@ public: aSettings.SetLanguageTag(aLangISO, true); Application::SetSettings(aSettings); - loadFromURL(u"text-fields.odp"); + loadFromFile(u"text-fields.odp"); save("impress_svg_Export"); xmlDocUniquePtr svgDoc = parseXml(maTempFile); diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx index 5b6c0b4b43be..52388678df74 100644 --- a/sd/qa/unit/SdrPdfImportTest.cxx +++ b/sd/qa/unit/SdrPdfImportTest.cxx @@ -89,7 +89,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testImportSimpleText) // We need to enable PDFium import (and make sure to disable after the test) EnvVarGuard UsePDFiumGuard("LO_IMPORT_USE_PDFIUM", "1"); - loadFromURL(u"SimplePDF.pdf"); + loadFromFile(u"SimplePDF.pdf"); auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) auto pPdfiumLibrary = vcl::pdf::PDFiumLibrary::get(); - loadFromURL(u"PdfWithAnnotation.pdf"); + loadFromFile(u"PdfWithAnnotation.pdf"); auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); diff --git a/sd/qa/unit/ThemeTest.cxx b/sd/qa/unit/ThemeTest.cxx index 3a12ce69ca35..eec1abe5dfd7 100644 --- a/sd/qa/unit/ThemeTest.cxx +++ b/sd/qa/unit/ThemeTest.cxx @@ -65,7 +65,7 @@ Color GetShapeFillColor(const uno::Reference<beans::XPropertySet>& xShape) CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange) { // Given a document, with a first slide and blue shape text from theme: - loadFromURL(u"theme.pptx"); + loadFromFile(u"theme.pptx"); SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pXImpressDocument); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 0003e8b408b1..c08e44ea2653 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -157,7 +157,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testDocumentLayout) int const nUpdateMe = -1; // index of test we want to update; supposedly only when the test is created - loadFromURL(aFilesToCompare[i].sInput); + loadFromFile(aFilesToCompare[i].sInput); if (!aFilesToCompare[i].sExportType.isEmpty()) saveAndReload(aFilesToCompare[i].sExportType); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 6b4e07cad33c..ac730a24d6bf 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -1364,7 +1364,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testDescriptionImport) CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf83247) { auto GetPause = [this](const OUString& sSrc) { - loadFromURL(sSrc); + loadFromFile(sSrc); uno::Reference<presentation::XPresentationSupplier> xPresentationSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPresentationProps( diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index 81e5521ab308..a93584b62f67 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -21,7 +21,7 @@ public: xmlDocUniquePtr load(const char* pName) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pModel); SfxObjectShell* pShell = pModel->GetObjectShell(); diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index f651419c776b..4f0d15c56474 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -51,7 +51,7 @@ public: if (!pName) load("private:factory/simpress"); else - loadFromURL(OUString::createFromAscii(pName), pPassword); + loadFromFile(OUString::createFromAscii(pName), pPassword); uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT( @@ -65,7 +65,7 @@ public: if (!pName) load("private:factory/sdraw"); else - loadFromURL(OUString::createFromAscii(pName), pPassword); + loadFromFile(OUString::createFromAscii(pName), pPassword); uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument")); diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx index 0081fdfae938..35b32640b510 100644 --- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx +++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx @@ -112,7 +112,7 @@ void LOKitSearchTest::tearDown() SdXImpressDocument* LOKitSearchTest::createDoc(const char* pName, const uno::Sequence<beans::PropertyValue>& rArguments) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pImpressDocument); pImpressDocument->initializeForTiledRendering(rArguments); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 2136cd378aba..31d61c1fb1a0 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -135,7 +135,7 @@ void SdTiledRenderingTest::tearDown() SdXImpressDocument* SdTiledRenderingTest::createDoc(const char* pName, const uno::Sequence<beans::PropertyValue>& rArguments) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pImpressDocument); pImpressDocument->initializeForTiledRendering(rArguments); diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx index a59a1128e7df..d80a037f6f07 100644 --- a/sfx2/qa/cppunit/test_misc.cxx +++ b/sfx2/qa/cppunit/test_misc.cxx @@ -86,7 +86,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata) CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail) { // Load a document. - loadFromURL(u"hello.odt"); + loadFromFile(u"hello.odt"); // Save it with the NoThumbnail option and assert that it has no thumbnail. #ifndef _WIN32 diff --git a/sfx2/qa/cppunit/view.cxx b/sfx2/qa/cppunit/view.cxx index b553e17f74ff..725cb5d02cea 100644 --- a/sfx2/qa/cppunit/view.cxx +++ b/sfx2/qa/cppunit/view.cxx @@ -35,7 +35,7 @@ public: CPPUNIT_TEST_FIXTURE(Sfx2ViewTest, testReloadPage) { // Load a document, which has 2 pages. - loadFromURL(u"reload-page.odg"); + loadFromFile(u"reload-page.odg"); // Reload, and request to start on page 2. SfxViewFrame* pFrame = SfxViewFrame::Current(); diff --git a/slideshow/qa/engine/engine.cxx b/slideshow/qa/engine/engine.cxx index 19727fe458c8..ee7f705713b5 100644 --- a/slideshow/qa/engine/engine.cxx +++ b/slideshow/qa/engine/engine.cxx @@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation) { // Given a document with a looping video, the looping is defined as part of its auto-play // animation (and not on the media shape): - loadFromURL(u"video-loop.pptx"); + loadFromFile(u"video-loop.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); uno::Reference<animations::XCommand> xCommandNode = GetFirstCommandNodeOfPage(xPage); diff --git a/starmath/qa/cppunit/test_import.cxx b/starmath/qa/cppunit/test_import.cxx index 5486dfe43e0c..984475878eb3 100644 --- a/starmath/qa/cppunit/test_import.cxx +++ b/starmath/qa/cppunit/test_import.cxx @@ -37,7 +37,7 @@ public: void Test::testFontStyles() { // tdf#143213 - loadFromURL(u"font-styles.odf"); + loadFromFile(u"font-styles.odf"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx index f691fdbef64c..d57dee0aa7f3 100644 --- a/starmath/qa/extras/mmlimport-test.cxx +++ b/starmath/qa/extras/mmlimport-test.cxx @@ -58,7 +58,7 @@ public: void Test::testColor() { - loadFromURL(u"color.mml"); + loadFromFile(u"color.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL(OUString("{ color black b" @@ -86,7 +86,7 @@ void Test::testColor() void Test::testSimple() { - loadFromURL(u"simple.mml"); + loadFromFile(u"simple.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), @@ -95,7 +95,7 @@ void Test::testSimple() void Test::testNsPrefixMath() { - loadFromURL(u"ns-prefix-math.mml"); + loadFromFile(u"ns-prefix-math.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), @@ -104,7 +104,7 @@ void Test::testNsPrefixMath() void Test::testMaction() { - loadFromURL(u"maction.mml"); + loadFromFile(u"maction.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix{ 1 ## 2 ## 3 }"), @@ -113,7 +113,7 @@ void Test::testMaction() void Test::testMspace() { - loadFromURL(u"mspace.mml"); + loadFromFile(u"mspace.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL(OUString("{ a b ~ c ~~``` d }"), pDocShell->GetText()); @@ -121,7 +121,7 @@ void Test::testMspace() void Test::testtdf99556() { - loadFromURL(u"tdf99556-1.mml"); + loadFromFile(u"tdf99556-1.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { }"), pDocShell->GetText()); @@ -129,7 +129,7 @@ void Test::testtdf99556() void Test::testTdf103430() { - loadFromURL(u"tdf103430.mml"); + loadFromFile(u"tdf103430.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL( @@ -140,7 +140,7 @@ void Test::testTdf103430() void Test::testTdf103500() { - loadFromURL(u"tdf103500.mml"); + loadFromFile(u"tdf103500.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL( @@ -152,7 +152,7 @@ void Test::testTdf103500() void Test::testTdf137008() { // Without the fix in place, this test would have crashed - loadFromURL(u"tdf137008.mml"); + loadFromFile(u"tdf137008.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL(OUString("matrix{ { } # ## # }"), pDocShell->GetText()); @@ -161,7 +161,7 @@ void Test::testTdf137008() void Test::testTdf151842() { // Without the fix in place, this test would have crashed - loadFromURL(u"tdf151842.odf"); + loadFromFile(u"tdf151842.odf"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL(OUString("test"), pDocShell->GetText()); @@ -175,7 +175,7 @@ void Test::testTdf151842() void Test::testMathmlEntities() { - loadFromURL(u"mthmlentities.mml"); + loadFromFile(u"mthmlentities.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); CPPUNIT_ASSERT_EQUAL(u"{ \u03C3 \u221E \u221E \u03C3 }"_ustr, pDocShell->GetText()); @@ -183,7 +183,7 @@ void Test::testMathmlEntities() void Test::testMaj() { - loadFromURL(u"maj.mml"); + loadFromFile(u"maj.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pModel); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); @@ -195,7 +195,7 @@ void Test::testMaj() void Test::testHadd() { - loadFromURL(u"hadd.mml"); + loadFromFile(u"hadd.mml"); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pModel); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx index 1ca580acd429..477a331a870d 100644 --- a/svx/qa/unit/classicshapes.cxx +++ b/svx/qa/unit/classicshapes.cxx @@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf98584ShearVertical) // They are converted to rotate * shear horizontal * scale. // Besides using a wrong sign in shear angle, error was, that TRSetGeometry of SdrPathObj did // not consider the additional scaling (tdf#98565). - loadFromURL(u"tdf98584_ShearVertical.odg"); + loadFromFile(u"tdf98584_ShearVertical.odg"); // Tests skewY for (sal_uInt8 nPageIndex = 0; nPageIndex < 3; ++nPageIndex) @@ -127,7 +127,7 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf98583ShearHorizontal) // LT 8000,5000 and RB 14000, 9000, which means width 6001, height 4001. // Error was, that not the mathematical matrix was used, but the API matrix, which has // wrong sign in shear angle. - loadFromURL(u"tdf98583_ShearHorizontal.odp"); + loadFromFile(u"tdf98583_ShearHorizontal.odp"); for (sal_uInt8 nPageIndex = 0; nPageIndex < 2; ++nPageIndex) { @@ -164,7 +164,7 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf130076Flip) // transformed by a matrix equivalent to a horizontal flip. Error was // that the transformation was made before the CircleKind was set, // resulting in the flip being performed incorrectly. - loadFromURL(u"tdf130076_FlipOnSectorSection.odg"); + loadFromFile(u"tdf130076_FlipOnSectorSection.odg"); for (sal_uInt8 nPageIndex = 0; nPageIndex < 2; ++nPageIndex) { diff --git a/svx/qa/unit/core.cxx b/svx/qa/unit/core.cxx index 0625d7ad70fb..d7055993ca94 100644 --- a/svx/qa/unit/core.cxx +++ b/svx/qa/unit/core.cxx @@ -35,7 +35,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testChartExportToPdf) { // Given a Calc document with a chart in it: - loadFromURL(u"chart.ods"); + loadFromFile(u"chart.ods"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index a3d17c60e428..b5615a5b7c5f 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -86,7 +86,7 @@ sal_uInt8 CustomshapesTest::countShapes() CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302) { - loadFromURL(u"FontworkSameLetterHeights.fodg"); + loadFromFile(u"FontworkSameLetterHeights.fodg"); CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong number of shapes", static_cast<sal_uInt8>(2), countShapes()); @@ -134,7 +134,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf150302) CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf147409_GeomItemHash) { - loadFromURL(u"tdf147409_GeomItemHash.odg"); + loadFromFile(u"tdf147409_GeomItemHash.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape* pSdrCustomShape( static_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape))); @@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf147409_GeomItemHash) CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf146866_GeomItemHash) { - loadFromURL(u"tdf147409_GeomItemHash.odg"); + loadFromFile(u"tdf147409_GeomItemHash.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape* pSdrCustomShape( static_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape))); @@ -171,7 +171,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_NonUI) // The document contains first light soft, no ambient color, no second light and shininess 6. // Such settings are not available in the UI. It tests the actual color, not the geometry. // Load document - loadFromURL(u"tdf145700_3D_NonUI.doc"); + loadFromFile(u"tdf145700_3D_NonUI.doc"); // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); @@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FrontLightDim) { // This tests the actual color, not the geometry. // Load document - loadFromURL(u"tdf145700_3D_FrontLightDim.doc"); + loadFromFile(u"tdf145700_3D_FrontLightDim.doc"); // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); @@ -236,7 +236,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FrontLightDim) CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145700_3D_FirstLightHarsh) { // Load document - loadFromURL(u"tdf145700_3D_FirstLightHarsh.doc"); + loadFromFile(u"tdf145700_3D_FirstLightHarsh.doc"); // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); @@ -263,7 +263,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145956_Origin_Relative_BoundRect) // Error (among others) was, that the unrotated snap rectangle was used. // Load document - loadFromURL(u"tdf145956_Origin.odp"); + loadFromFile(u"tdf145956_Origin.odp"); // The shape is extruded with 10cm. viewpoint="(0cm 0cm 25cm)", origin="0 0". uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterZ_odt) // Error (among others) was, that the value was interpreted as Twips. // Load document - loadFromURL(u"tdf145904_center_Zminus2000.odt"); + loadFromFile(u"tdf145904_center_Zminus2000.odt"); // The shape is extruded and tilt left 60deg. The rotation center is at -2000Hmm on the z-axis. // That is a position behind the back face of the extruded shape. @@ -308,7 +308,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_odt) // shape size. Error was, that the relative fraction was handled as absolute value in Hmm. // Load document - loadFromURL(u"tdf145904_center_Y0dot25.odt"); + loadFromFile(u"tdf145904_center_Y0dot25.odt"); // The shape is extruded and tilt down 90deg. The rotation center is in the middle between shape // center and bottom shape edge. The bottom edge of the projected solid has roughly the @@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145904_Extrusion_CenterY_doc) // shape size. Error was, that the relative fraction was handled as absolute value in EMU. // Load document - loadFromURL(u"tdf145904_center_Y0dot25.doc"); + loadFromFile(u"tdf145904_center_Y0dot25.doc"); // The shape is extruded and tilt down 90deg. The rotation center is in the middle between shape // center and bottom shape edge. The bottom edge of the projected solid has roughly the @@ -360,7 +360,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145245_ExtrusionPosition) // depth itself is 5cm. Y-coordinate of shape is 6cm. // Load document - loadFromURL(u"tdf145245_ExtrusionPosition.odp"); + loadFromFile(u"tdf145245_ExtrusionPosition.odp"); // The tolerance 40 is estimated and can be adjusted if required for HiDPI. { @@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_Fontwork_rendering_font_siz // the first paragraph was too long and the second would fit. It resulted in wrong position // and height and overlapping characters. - loadFromURL(u"tdf144988_Fontwork_FontSize.odp"); + loadFromFile(u"tdf144988_Fontwork_FontSize.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); @@ -428,7 +428,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_anchor_in_Fontwork) // 'Top-Left' and 'Bottom-Left'. // Load document - loadFromURL(u"tdf145111_TL_BL_Fontwork.odp"); + loadFromFile(u"tdf145111_TL_BL_Fontwork.odp"); { // First shape has anchor set to Top-Left, which shifts Fontwork text down. @@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145004_gap_by_ScaleX) // Load document and get shape. It is a custom shape from pptx import of a WordArt of // kind 'Follow Path'. - loadFromURL(u"tdf145004_gap_by_ScaleX.pptx"); + loadFromFile(u"tdf145004_gap_by_ScaleX.pptx"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); @@ -482,7 +482,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141021ExtrusionNorth) // side faces were wrong calculated. // Load document and get shape. It is a custom shape in 3D mode. - loadFromURL(u"tdf141021_ExtrusionNorth.odp"); + loadFromFile(u"tdf141021_ExtrusionNorth.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); @@ -511,7 +511,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape) // Problem was, that fObjectRotation was not updated. // Load document and get shape. It is a rectangle custom shape with 45° shear and 330° rotation. - loadFromURL(u"tdf138945_resizeRotatedShape.odg"); + loadFromFile(u"tdf138945_resizeRotatedShape.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); // Change height and mirror vertical @@ -559,7 +559,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop) { // tdf#121890 formula values "left" and "top" are wrongly calculated // Load a document with two custom shapes of type "non-primitive" - loadFromURL(u"viewBox_positive_twolines_strict.odp"); + loadFromFile(u"viewBox_positive_twolines_strict.odp"); // Get the shape "leftright". Error was, that the identifier "left" was always set to zero, thus // the path was outside the frame rectangle for a viewBox having a positive "left" value. uno::Reference<drawing::XShape> xShapeLR(getShape(0)); @@ -590,7 +590,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX) // 121761 Increase accuracy of quarter circles drawn by command X or Y // The loaded document has a quarter circle with radius 10000 (unit 1/100 mm) // which is rotated by 45deg. The test considers the segment. - loadFromURL(u"tdf121761_Accuracy_command_X.odp"); + loadFromFile(u"tdf121761_Accuracy_command_X.odp"); // Get the shape "arc_45deg_rotated". Error was, that a Bezier curve with bad parameters // was used, thus the segment height was obviously smaller than for a true circle. // Math: segment height approx 10000 * ( 1 - sqrt(0.5)) + line width @@ -610,7 +610,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testToggleCommandXY) // The loaded document has a shape with command X and two parameter placed on a diagonal. // The radius of the quarter circles are both 10000 (unit 1/100 mm). // The shape is rotated by 45deg, so you get two segments, one up and one down. - loadFromURL(u"tdf121952_Toggle_direction_command_X.odp"); + loadFromFile(u"tdf121952_Toggle_direction_command_X.odp"); // Error was, that the second segment was drawn with same direction as first one. If drawn // correctly, the bounding box height of the segments together is about twice the single // segment height. Math: segment height approx 10000 * ( 1 - sqrt(0.5)) + line width @@ -628,7 +628,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testMultipleMoveTo) { // tdf122964 Multiple moveTo has to be treated as lineTo in draw:enhanced-path // Load a document with path "M 0 0 5 10 10 0 N" - loadFromURL(u"tdf122964_MultipleMoveTo.odg"); + loadFromFile(u"tdf122964_MultipleMoveTo.odg"); // Error was, that the second and further parameter pairs were treated as moveTo, // and so the generated path was empty, resulting in zero width and height of the // bounding box. It has to be treated same as "M 0 0 L 5 10 10 0 N". @@ -646,7 +646,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testWidthOrientationCommandU) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document with path "M 750 0 L 750 500 250 500 250 0 U 500 0 500 500 0 180 N" // in viewBox="0 0 1000 500" and width="10cm", height="5cm". - loadFromURL(u"tdf121845_WidthOrientation_command_U.odg"); + loadFromFile(u"tdf121845_WidthOrientation_command_U.odg"); // Error was, that the width and height of the ellipse was halved and that the ellipse // was not drawn clockwise but counter clockwise. uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -667,7 +667,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testHalfEllipseVML) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document which was converted from VML to doc by Word. It had a VML // path="m750,al500,,500,500,,-11796480e" resulting in a lower half circle. - loadFromURL(u"tdf121845_HalfEllipseVML.doc"); + loadFromFile(u"tdf121845_HalfEllipseVML.doc"); // Error was, that a full circle instead of the half circle was draw. uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -684,7 +684,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testLargeSwingAngleVML) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document which was converted from VML to doc by Word. It had a VML // path="al50,50,45,45,2621440,31457280e" resulting in a full circle plus 120 deg segment. - loadFromURL(u"tdf121845_start40_swing480.doc"); + loadFromFile(u"tdf121845_start40_swing480.doc"); // Error was, that only the 120 deg segment was drawn. uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf121845_two_commands_U) // Load a document with path "U 950 250 200 200 90 180 250 250 200 200 180 270 N" // Error was, that the second ellipse segment was interpreted as command T and // thus a line from first to second segment was drawn. - loadFromURL(u"tdf121845_Two_commands_U.odg"); + loadFromFile(u"tdf121845_Two_commands_U.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); // In case no line is drawn, two polygons are generated; with line only one polygon SdrObjCustomShape& rSdrObjCustomShape( @@ -721,7 +721,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124212_handle_position) // default viewBox. Load a document with svg:viewBox="10800 0 10800 21600" // Error was, that moving the controller results in a handle position that // does not reflect the movement. - loadFromURL(u"tdf124212_handle_position.odg"); + loadFromFile(u"tdf124212_handle_position.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); // The shape has one, horizontal adjust handle. SdrObjCustomShape& rSdrObjCustomShape( @@ -743,7 +743,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124029_arc_position) // tdf121029 MS binary custom shape mso_sptArc has wrong position // MS uses the sector for position reference. Error was, that // LibreOffice has used the underlying ellipse. - loadFromURL(u"tdf124029_Arc_position.doc"); + loadFromFile(u"tdf124029_Arc_position.doc"); uno::Reference<drawing::XShape> xShape(getShape(0)); // The visual wrong position is due to a wrong shape width. uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -759,7 +759,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124740_handle_path_coordsystem) // tdf124740 OOXML shape with handle and w and h attribute on path has wrong // handle position // The handle position was scaled erroneously twice. - loadFromURL(u"tdf124740_HandleInOOXMLUserShape.pptx"); + loadFromFile(u"tdf124740_HandleInOOXMLUserShape.pptx"); uno::Reference<drawing::XShape> xShape(getShape(0)); // The shape has one, horizontal adjust handle. It is about 1/5 of 10cm from left // shape edge, shape is 6cm from left . That results in a position @@ -782,7 +782,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf115813_OOXML_XY_handle) // Connectors are included as ordinary shapes to prevent converting. // Error was, that the handle movement and the changes to the shape did not follow // the mouse movement. - loadFromURL(u"tdf115813_HandleMovementOOXMLPresetShapes.pptx"); + loadFromFile(u"tdf115813_HandleMovementOOXMLPresetShapes.pptx"); // values in vector InteractionsHandles are in 1/100 mm and refer to page for (sal_uInt8 i = 0; i < countShapes(); i++) @@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testQuadraticCurveTo) // When converting to cubic Bezier curve, this had resulted in a wrong first control point. // The quadraticcurveto segment starts in shape center in the test file. The first control // point should produce a horizontal tangent in the start point. - loadFromURL(u"tdf125782_QuadraticCurveTo.odg"); + loadFromFile(u"tdf125782_QuadraticCurveTo.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); CPPUNIT_ASSERT_MESSAGE("Could not get the shape properties", xShapeProps.is()); @@ -853,7 +853,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP) // opened and exported to ODF format by LibreOffice. // Error was, that for shapes, which were originally imported from OOXML, the handles // could not be moved at all. - loadFromURL(u"tdf126512_OOXMLHandleMovementInODF.odp"); + loadFromFile(u"tdf126512_OOXMLHandleMovementInODF.odp"); for (sal_uInt8 i = 0; i < countShapes(); i++) { @@ -897,7 +897,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror) // and therefore equals approximately the text frame. // Error was, that because of wrong calculation, the flipped shapes do not use the // text frame but the frame rectangle for their text. - loadFromURL(u"tdf127785_Mirror.odp"); + loadFromFile(u"tdf127785_Mirror.odp"); uno::Reference<drawing::XShape> xShapeV(getShape(0)); uno::Reference<beans::XPropertySet> xShapeVProps(xShapeV, uno::UNO_QUERY); @@ -934,7 +934,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126060_3D_Z_Rotation) // and the text has 3D z rotation. When we open the document we // should see the text vertically and rotated from text bound center not text box. - loadFromURL(u"tdf126060_3D_Z_Rotation.pptx"); + loadFromFile(u"tdf126060_3D_Z_Rotation.pptx"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrObjCustomShape( @@ -968,7 +968,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Asymmetric) // the text and therefore equals approximately the text frame. // Error was, that the 180deg text rotation was not compensated for the position of // the flipped text box. - loadFromURL(u"tdf127785_asymmetricTextBoxFlipV.odg"); + loadFromFile(u"tdf127785_asymmetricTextBoxFlipV.odg"); uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -991,7 +991,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_TextRotateAngle) // surrounds the text and therefore equals approximately the text frame. // Error was, that the compensation for the 180° rotation added for vertical // flip were not made to the text box position but to the text matrix. - loadFromURL(u"tdf127785_TextRotateAngle.odp"); + loadFromFile(u"tdf127785_TextRotateAngle.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -1012,7 +1012,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf128413_tbrlOnOff) // The document contains a rotated shape with text. The error was, that switching // tb-rl writing-mode on, changed the shape size and position. - loadFromURL(u"tdf128413_tbrl_OnOff.odp"); + loadFromFile(u"tdf128413_tbrl_OnOff.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); CPPUNIT_ASSERT_MESSAGE("Could not get the shape properties", xShapeProps.is()); @@ -1039,7 +1039,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf129532_MatrixFlipV) // attribute. That should result in mirroring on the x-axis. Error was, that the lines // which are drawn on the shape rectangle were mirrored, but not the rectangle itself. // The rectangle was only shifted. - loadFromURL(u"tdf129532_MatrixFlipV.odg"); + loadFromFile(u"tdf129532_MatrixFlipV.odg"); uno::Reference<drawing::XShape> xShape0(getShape(0)); uno::Reference<beans::XPropertySet> xShape0Props(xShape0, uno::UNO_QUERY); @@ -1065,7 +1065,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf103474_commandT_CaseZeroHeight) // corner case where the ellipse has zero height. // Error was, that the calculation of the circle angle from the ellipse // angle results in a wrong angle for the case 180° and height zero. - loadFromURL(u"tdf103474_commandT_CaseZeroHeight.odp"); + loadFromFile(u"tdf103474_commandT_CaseZeroHeight.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); // The end points of the straight line segment should have the same x-coordinate of left // of shape, and different y-coordinates, one top and the other bottom of the shape. @@ -1093,7 +1093,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf103474_commandT_CaseZeroHeight) CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf103474_commandG_CaseZeroHeight) { // Some as above, but with shape with command G. - loadFromURL(u"tdf103474_commandG_CaseZeroHeight.odp"); + loadFromFile(u"tdf103474_commandG_CaseZeroHeight.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); // The end points of the straight line segment should have the same x-coordinate of left // of shape, and different y-coordinates, one top and the other bottom of the shape. @@ -1122,7 +1122,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf122323_largeSwingAngle) { // SwingAngles are clamped to [-360;360] in MS Office. Error was, that LO calculated // the end angle and used it modulo 360, no full ellipse was drawn. - loadFromURL(u"tdf122323_swingAngle_larger360deg.pptx"); + loadFromFile(u"tdf122323_swingAngle_larger360deg.pptx"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrObjCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); @@ -1140,7 +1140,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf122323_largeSwingAngle) CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf141268) { - loadFromURL(u"tdf141268.odp"); + loadFromFile(u"tdf141268.odp"); uno::Reference<drawing::XShape> xShape(getShape(0)); SdrObjCustomShape& rSdrCustomShape( static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape))); @@ -1155,7 +1155,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176) { // Error was, that fObjectRotation was not correctly updated after shearing. // The problem becomes visible after save and reload. - loadFromURL(u"tdf136176_rot30_flip.odg"); + loadFromFile(u"tdf136176_rot30_flip.odg"); for (sal_uInt16 i = 0; i < 3; i++) { @@ -1200,7 +1200,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf148501_OctagonBevel) // The document contains a shape "Octagon Bevel". It should use shadings 40%, 20%, -20%, -40% // from left-top to bottom-right. The test examines actual color, not the geometry. // Load document - loadFromURL(u"tdf148501_OctagonBevel.odp"); + loadFromFile(u"tdf148501_OctagonBevel.odp"); // Generate bitmap from shape uno::Reference<drawing::XShape> xShape = getShape(0); @@ -1268,7 +1268,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf148714_CurvedArrows) { // Error was, that the line between 1. and 2. arc was missing. - loadFromURL(u"tdf148714_CurvedArrows.ppt"); + loadFromFile(u"tdf148714_CurvedArrows.ppt"); for (sal_Int32 nShapeIndex = 0; nShapeIndex < 4; nShapeIndex++) { @@ -1309,7 +1309,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf148707_two_commands_B_V) // between the arcs as if the second command was a A or W respectively. // The test document has a shape with path "V 0 0 50 100 0 50 25 0 50 0 100 100 75 0 100 50 N" // and a shape with path "B 0 0 50 100 0 50 25 100 50 0 100 100 75 100 100 50 N". - loadFromURL(u"tdf148707_two_commands_B_V.odp"); + loadFromFile(u"tdf148707_two_commands_B_V.odp"); for (sal_uInt8 i = 0; i < 2; i++) { uno::Reference<drawing::XShape> xShape(getShape(i)); @@ -1361,7 +1361,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf153000_MS0_SPT_25_31) { // The shapes MSO_SPT=25 to MSO_SPT=31 are currently rendered as rectangle. They should be // rendered same way as in Word. More info in bug 153000. - loadFromURL(u"tdf153000_WordArt_type_25_to_31.docx"); + loadFromFile(u"tdf153000_WordArt_type_25_to_31.docx"); // The wrong rendering becomes visible in properties "Coordinates" and "Segments". To simplify // the test we do not compare the values themselves but only the amount of values. // Without fix there were always 5 pairs in "Coordinates" and "Segments" did not exist. diff --git a/svx/qa/unit/gluepointTest.cxx b/svx/qa/unit/gluepointTest.cxx index 647f555b8095..07eb7f3fe9e0 100644 --- a/svx/qa/unit/gluepointTest.cxx +++ b/svx/qa/unit/gluepointTest.cxx @@ -87,7 +87,7 @@ bool lcl_getGeometryGluePoints( CPPUNIT_TEST_FIXTURE(GluePointTest, testTdf157543_5PointStar) { - loadFromURL(u"tdf157543_5PointStar.ppt"); + loadFromFile(u"tdf157543_5PointStar.ppt"); uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aGluePoints; CPPUNIT_ASSERT(lcl_getGeometryGluePoints(aGluePoints, getShape(0))); // Without fix only two glue points exist. diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx index 74885586a3b1..15759a2f406f 100644 --- a/svx/qa/unit/sdr.cxx +++ b/svx/qa/unit/sdr.cxx @@ -59,7 +59,7 @@ SdrTest::renderPageToPrimitives(const uno::Reference<drawing::XDrawPage>& xDrawP CPPUNIT_TEST_FIXTURE(SdrTest, testShadowScaleOrigin) { // Load a document containing a custom shape. - loadFromURL(u"shadow-scale-origin.pptx"); + loadFromFile(u"shadow-scale-origin.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -82,7 +82,7 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowScaleOrigin) CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) { - loadFromURL(u"tdf150020-shadow-alignment.pptx"); + loadFromFile(u"tdf150020-shadow-alignment.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); { @@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) CPPUNIT_TEST_FIXTURE(SdrTest, testZeroWidthTextWrap) { // Load a document containing a 0-width shape with text. - loadFromURL(u"0-width-text-wrap.pptx"); + loadFromFile(u"0-width-text-wrap.pptx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); @@ -171,7 +171,7 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testZeroWidthTextWrap) CPPUNIT_TEST_FIXTURE(SdrTest, testSlideBackground) { // Given a document with a slide what has a linked background image: - loadFromURL(u"slide-background.odp"); + loadFromFile(u"slide-background.odp"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index aa495a2c492b..66f4528d889f 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -336,7 +336,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testAutoHeightMultiColShape) // Given a document containing a shape that has: // 1) automatic height (resize shape to fix text) // 2) multiple columns (2) - loadFromURL(u"auto-height-multi-col-shape.pptx"); + loadFromFile(u"auto-height-multi-col-shape.pptx"); // Make sure the in-file shape height is kept, even if nominally the shape height is // automatic: @@ -357,7 +357,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testAutoHeightMultiColShape) CPPUNIT_TEST_FIXTURE(SvdrawTest, testFontWorks) { - loadFromURL(u"FontWork.odg"); + loadFromFile(u"FontWork.odg"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY_THROW); @@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_EOLinCurvedText) for (int i = 0; i < 3; i++) { - loadFromURL(aFilenames[i]); + loadFromFile(aFilenames[i]); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -435,7 +435,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_CurvedTextWidth) for (int i = 0; i < 3; i++) { - loadFromURL(aFilenames[i]); + loadFromFile(aFilenames[i]); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -468,7 +468,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTdf148000_CurvedTextWidth) CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMetal) { - loadFromURL(u"tdf140321_metal.odp"); + loadFromFile(u"tdf140321_metal.odp"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -484,7 +484,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMetal) CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong) { - loadFromURL(u"tdf140321_phong.odp"); + loadFromFile(u"tdf140321_phong.odp"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -497,7 +497,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testExtrusionPhong) CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT) { - loadFromURL(u"tdf140321_Matte_import.ppt"); + loadFromFile(u"tdf140321_Matte_import.ppt"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -521,7 +521,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSurfaceMattePPT) CPPUNIT_TEST_FIXTURE(SvdrawTest, testMaterialSpecular) { - loadFromURL(u"tdf140321_material_specular.odp"); + loadFromFile(u"tdf140321_material_specular.odp"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); @@ -545,7 +545,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testVideoSnapshot) { // Given a slide with a media shape, containing a 4 sec video, red-green-blue-black being the 4 // seconds: - loadFromURL(u"video-snapshot.pptx"); + loadFromFile(u"video-snapshot.pptx"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); auto pSdrMediaObj = dynamic_cast<SdrMediaObj*>(pSdrPage->GetObj(0)); @@ -571,7 +571,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testVideoSnapshot) CPPUNIT_TEST_FIXTURE(SvdrawTest, testPageViewDrawLayerClip) { // Given a document with 2 pages, first page footer has an off-page line shape: - loadFromURL(u"page-view-draw-layer-clip.docx"); + loadFromFile(u"page-view-draw-layer-clip.docx"); // When saving that document to PDF: save("writer_pdf_Export"); @@ -719,7 +719,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testClipVerticalTextOverflow) // 2-) Text not overflowing the rectangle // 3-) (Vertical text) Text overflowing the rectangle // 4-) (Vertical text) Text not overflowing the rectangle - loadFromURL(u"clip-vertical-overflow.pptx"); + loadFromFile(u"clip-vertical-overflow.pptx"); SdrPage* pSdrPage = getFirstDrawPageWithAssert(); xmlDocUniquePtr pDocument = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage); diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index 32faa1f97286..e51cd3f860ce 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -64,7 +64,7 @@ Test::renderPageToPrimitives(const uno::Reference<drawing::XDrawPage>& xDrawPage CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) { // Given a document containing a table with a blurry shadow: - loadFromURL(u"table-shadow-blur.pptx"); + loadFromFile(u"table-shadow-blur.pptx"); // When rendering the table shadow to primitives: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx index 0f619784553f..c077fd53a4bc 100644 --- a/svx/qa/unit/unodraw.cxx +++ b/svx/qa/unit/unodraw.cxx @@ -53,7 +53,7 @@ public: CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport) { // Load a document with a Writer picture in it. - loadFromURL(u"unodraw-writer-image.odt"); + loadFromFile(u"unodraw-writer-image.odt"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<lang::XComponent> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport) CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998) { - loadFromURL(u"tdf93998.odp"); + loadFromFile(u"tdf93998.odp"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xDrawPagesSupplier.is()); diff --git a/svx/qa/unit/xml.cxx b/svx/qa/unit/xml.cxx index f019baca51c3..673113467fbb 100644 --- a/svx/qa/unit/xml.cxx +++ b/svx/qa/unit/xml.cxx @@ -33,7 +33,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, test3DObjectFallback) { // Load a document which has a 3D model we don't understand, but has a fallback PNG. - loadFromURL(u"3d-object-fallback.odp"); + loadFromFile(u"3d-object-fallback.odp"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY); diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx index 8e6a1488fa3a..b783dc0cf3e9 100644 --- a/sw/qa/core/fields/fields.cxx +++ b/sw/qa/core/fields/fields.cxx @@ -159,7 +159,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChapterFieldsFollowedBy) CPPUNIT_TEST_FIXTURE(Test, testTdf86790) { - loadFromURL(u"tdf86790.docx"); + loadFromFile(u"tdf86790.docx"); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess( @@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFootnoteStyleRef) /// STYLEREFs with the REFFLDFLAG_HIDE_NON_NUMERICAL flag should hide all characters that are not numerical or delimiters CPPUNIT_TEST_FIXTURE(Test, testNumericalStyleRef) { - loadFromURL(u"suppress-non-numerical.docx"); + loadFromFile(u"suppress-non-numerical.docx"); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess( @@ -416,7 +416,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumericalStyleRef) /// this docx only has such stylerefs to avoid confusion) CPPUNIT_TEST_FIXTURE(Test, testOOXMLStyleRefFlags) { - loadFromURL(u"styleref-flags.docx"); + loadFromFile(u"styleref-flags.docx"); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess( @@ -447,7 +447,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLStyleRefFlags) /// this docx only has such stylerefs to avoid confusion) CPPUNIT_TEST_FIXTURE(Test, testODFStyleRef) { - loadFromURL(u"styleref.odt"); + loadFromFile(u"styleref.odt"); uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xFieldsAccess( diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index e79271ac764e..19e2c81a0690 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -139,7 +139,7 @@ void SwMacrosTest::testVba() for (auto const & [ sFileBaseName, sMacroUrl ] : testInfo) { OUString sFileName("docm/" + sFileBaseName); - loadFromURL(sFileName); + loadFromFile(sFileName); uno::Any aRet = executeMacro(sMacroUrl); OUString aStringRes; @@ -157,7 +157,7 @@ void SwMacrosTest::testModernVBADelete() }; OUString sFileName("docm/" + testInfo.sFileBaseName); - loadFromURL(sFileName); + loadFromFile(sFileName); SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc(); @@ -244,7 +244,7 @@ void SwMacrosTest::testBookmarkDeleteTdf90816() void SwMacrosTest::testControlShapeGrouping() { - loadFromURL(u"odt/testControlShapeGrouping.odt"); + loadFromFile(u"odt/testControlShapeGrouping.odt"); uno::Reference<frame::XModel> const xModel(mxComponent, UNO_QUERY); CPPUNIT_ASSERT(xModel.is()); @@ -344,7 +344,7 @@ void SwMacrosTest::testControlShapeGrouping() void SwMacrosTest::testTdf151846() { - loadFromURL(u"odt/tdf151846.odt"); + loadFromFile(u"odt/tdf151846.odt"); // Without the fix in place, this test would have failed with // Property or method not found: createDiagramByDataSource. @@ -393,7 +393,7 @@ void SwMacrosTest::testFdo55289() void SwMacrosTest::testFdo68983() { - loadFromURL(u"odt/fdo68983.odt"); + loadFromFile(u"odt/fdo68983.odt"); Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW); saveAndReload("writer8"); diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index f86e1380d20a..6a2a0f9c1785 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -300,8 +300,8 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo81276) CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo62336) { // The problem was essentially a crash during table export as docx/rtf/html - // If calc-layout is enabled, the crash does not occur, that's why loadFromURL/save is used - loadFromURL(u"fdo62336.docx"); + // If calc-layout is enabled, the crash does not occur, that's why loadFromFile/save is used + loadFromFile(u"fdo62336.docx"); save("HTML (StarWriter)"); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx index d783b30a57c7..5f681011eeec 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx @@ -1046,7 +1046,7 @@ CPPUNIT_TEST_FIXTURE(Test, testtdf158044) CPPUNIT_TEST_FIXTURE(Test, testTdf158855) { // Given a table immediately followed by a section break - loadFromURL(u"section_break_after_table.docx"); + loadFromFile(u"section_break_after_table.docx"); // Check that the import doesn't produce an extra empty paragraph before a page break CPPUNIT_ASSERT_EQUAL(2, getPages()); // was 3 @@ -1065,7 +1065,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158855) CPPUNIT_TEST_FIXTURE(Test, testTdf158971) { // Given a section break and an SDT in the following paragraph - loadFromURL(u"sdt_after_section_break.docx"); + loadFromFile(u"sdt_after_section_break.docx"); // Check that the import doesn't introduce unwanted character properties in the paragraph after // the section break diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index 2dab1151f092..ce88aac3158e 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -126,7 +126,7 @@ void UnoApiTest::loadWithParams(OUString const& rURL, mxComponent = loadFromDesktop(rURL, OUString(), rParams); } -OUString UnoApiTest::loadFromURL(std::u16string_view aFileBase, const char* pPassword) +OUString UnoApiTest::loadFromFile(std::u16string_view aFileBase, const char* pPassword) { OUString aFileName = createFileURL(aFileBase); load(aFileName, pPassword); diff --git a/vcl/qa/cppunit/gen/gen.cxx b/vcl/qa/cppunit/gen/gen.cxx index 29d950113282..56a9d5b6ea19 100644 --- a/vcl/qa/cppunit/gen/gen.cxx +++ b/vcl/qa/cppunit/gen/gen.cxx @@ -28,7 +28,7 @@ public: Bitmap load(const char* pName) { - loadFromURL(OUString::createFromAscii(pName)); + loadFromFile(OUString::createFromAscii(pName)); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pModel); SfxObjectShell* pShell = pModel->GetObjectShell(); diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 020d5c4c49d1..d5515facb56f 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -51,7 +51,7 @@ public: void PdfExportTest::saveAsPDF(std::u16string_view rFile) { // Import the bugdoc and export as PDF. - loadFromURL(rFile); + loadFromFile(rFile); uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); } @@ -191,7 +191,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107868) #if !defined MACOSX && !defined _WIN32 // Import the bugdoc and print to PDF. - loadFromURL(u"tdf107868.odt"); + loadFromFile(u"tdf107868.odt"); uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xPrintable.is()); uno::Sequence<beans::PropertyValue> aOptions(comphelper::InitPropertySequence( @@ -431,7 +431,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testSofthyphenPos) #if !defined MACOSX && !defined _WIN32 // Import the bugdoc and print to PDF. - loadFromURL(u"softhyphen_pdf.odt"); + loadFromFile(u"softhyphen_pdf.odt"); uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(xPrintable.is()); uno::Sequence<beans::PropertyValue> aOptions(comphelper::InitPropertySequence( diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index deffb16785ce..130d77be8ef3 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx @@ -71,7 +71,7 @@ public: void PdfExportTest2::saveAsPDF(std::u16string_view rFile) { // Import the bugdoc and export as PDF. - loadFromURL(rFile); + loadFromFile(rFile); uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); } @@ -273,7 +273,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf129085) CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTocLink) { // Load the Writer document. - loadFromURL(u"toc-link.fodt"); + loadFromFile(u"toc-link.fodt"); // Update the ToC. uno::Reference<text::XDocumentIndexesSupplier> xDocumentIndexesSupplier(mxComponent, @@ -441,7 +441,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf147164) CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceImage) { // Load the Writer document. - loadFromURL(u"reduce-image.fodt"); + loadFromFile(u"reduce-image.fodt"); // Save as PDF. uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory(); @@ -3875,7 +3875,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormControlAnnot) CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf142129) { - loadFromURL(u"master.odm"); + loadFromFile(u"master.odm"); // update linked section dispatchCommand(mxComponent, ".uno:UpdateAllLinks", {}); @@ -4858,7 +4858,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf156528) CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf113866) { - loadFromURL(u"tdf113866.odt"); + loadFromFile(u"tdf113866.odt"); // Set -- Printer Settings->Options->Print text in Black -- to true SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); diff --git a/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx b/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx index ff242c2ad136..fed0a5f45b2a 100644 --- a/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx +++ b/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx @@ -29,7 +29,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, test129205) { - loadFromURL(u"tdf129205.docx"); + loadFromFile(u"tdf129205.docx"); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx index ec771ba0f1b4..8452da0203ab 100644 --- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx +++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx @@ -33,7 +33,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testLargeParaTopMargin) { // Given a document with a paragraph with a large "before" spacing. - loadFromURL(u"large-para-top-margin.docx"); + loadFromFile(u"large-para-top-margin.docx"); // When checking the first paragraph. uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLargeParaTopMargin) CPPUNIT_TEST_FIXTURE(Test, testSdtRunInPara) { // Given a document with a block SDT, and inside that some content + a run SDT: - loadFromURL(u"sdt-run-in-para.docx"); + loadFromFile(u"sdt-run-in-para.docx"); // Then make sure the content inside the block SDT but outside the run SDT is not lost: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -76,7 +76,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunInPara) CPPUNIT_TEST_FIXTURE(Test, testSdtDropdownNoDisplayText) { // Given a document with <w:listItem w:value="..."/> (no display text): - loadFromURL(u"sdt-dropdown-no-display-text.docx"); + loadFromFile(u"sdt-dropdown-no-display-text.docx"); // Then make sure we create a dropdown content control, not a rich text one: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableThenTable) { // Given a document with an in-section floating table, followed by a table: // When laying out that document: - loadFromURL(u"floattable-then-table.docx"); + loadFromFile(u"floattable-then-table.docx"); // Then make sure that instead of crashing, the floating table is anchored inside the body text // (and not a cell): @@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableThenTable) CPPUNIT_TEST_FIXTURE(Test, testSdtBlockText) { // Given a document with a block SDT that only contains text: - loadFromURL(u"sdt-block-text.docx"); + loadFromFile(u"sdt-block-text.docx"); // Then make sure that the text inside the SDT is imported as a content control: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -153,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtBlockText) CPPUNIT_TEST_FIXTURE(Test, testFdo78333) { // just care that it doesn't crash/assert - loadFromURL(u"fdo78333-1-minimized.docx"); + loadFromFile(u"fdo78333-1-minimized.docx"); } } diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx index 5046be81e98e..5d8d5efc50cc 100644 --- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx @@ -36,7 +36,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, test1cellInsidevRightborder) { - loadFromURL(u"1cell-insidev-rightborder.docx"); + loadFromFile(u"1cell-insidev-rightborder.docx"); uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTextDocument->getTextTables(), uno::UNO_QUERY); uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); @@ -52,7 +52,7 @@ CPPUNIT_TEST_FIXTURE(Test, test1cellInsidevRightborder) CPPUNIT_TEST_FIXTURE(Test, testNestedFloatingTable) { - loadFromURL(u"nested-floating-table.docx"); + loadFromFile(u"nested-floating-table.docx"); // Normal outer table, floating inner tables. uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), @@ -64,7 +64,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableBreakBefore) { // Given a 3 pages document: page break, then a multi-page floating table on pages 2 and 3: // When laying out that document: - loadFromURL(u"floattable-break-before.docx"); + loadFromFile(u"floattable-break-before.docx"); // Then make sure the page break property is on the anchor of the floating table, otherwise it // has no effect: @@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(Test, test3NestedFloatingTables) { // Given a document with nested tables: outer and inner one is normal, middle one is floating: // When laying out that document: - loadFromURL(u"floattable-nested-3tables.docx"); + loadFromFile(u"floattable-nested-3tables.docx"); // Then make sure we don't crash and create the 3 tables: // Without the accompanying fix in place, this would have crashed, layout can't handle nested @@ -102,7 +102,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTablesOuterNonsplitInner) { // Given a document with a normal table, 3 outer floating tables and an inner floating table in // the last floating table: - loadFromURL(u"floattable-outer-nonsplit-inner.docx"); + loadFromFile(u"floattable-outer-nonsplit-inner.docx"); // When counting the floating tables in the document: uno::Reference<text::XTextFramesSupplier> xFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -120,7 +120,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTablesOuterNonsplitInner) CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHiddenAnchor) { // Given a document with a floating table, anchored in a paragraph that is hidden: - loadFromURL(u"floattable-hidden-anchor.docx"); + loadFromFile(u"floattable-hidden-anchor.docx"); // When checking the visibility of the anchor paragraph: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableNested) { // Given a document with nested, multi-page floating tables: // When loading that document: - loadFromURL(u"floattable-nested.docx"); + loadFromFile(u"floattable-nested.docx"); // Then make sure that both floating tables are allowed to split: uno::Reference<text::XTextFramesSupplier> xFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -167,7 +167,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDOCXFloatingTableHeader) { // Given a document with a header that has a floating table and some large images in the body // text: - loadFromURL(u"floattable-header.docx"); + loadFromFile(u"floattable-header.docx"); // When breaking that document into pages: uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableManager.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableManager.cxx index 88b36379a2c1..3743ece63f7b 100644 --- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableManager.cxx @@ -30,7 +30,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTblOverlap) { // Given a document with 2 floating tables, the second is not allowed to overlap: // When importing that document: - loadFromURL(u"floattable-tbl-overlap.docx"); + loadFromFile(u"floattable-tbl-overlap.docx"); // Then make sure the second table is marked as "can't overlap": uno::Reference<text::XTextFramesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx index 94a2323fd214..d0693746f24b 100644 --- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx @@ -43,7 +43,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageBreakFooterTable) { // Load a document which refers to a footer which ends with a table, and there is a page break // in the body text right after the footer reference. - loadFromURL(u"page-break-footer-table.docx"); + loadFromFile(u"page-break-footer-table.docx"); // Check the last paragraph. uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPageBreakFooterTable) CPPUNIT_TEST_FIXTURE(Test, testNumberingRestartStyleParent) { - loadFromURL(u"num-restart-style-parent.docx"); + loadFromFile(u"num-restart-style-parent.docx"); // The paragraphs are A 1 2 B 1 2. uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -96,7 +96,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingRestartStyleParent) CPPUNIT_TEST_FIXTURE(Test, testFrameDirection) { - loadFromURL(u"frame-direction.docx"); + loadFromFile(u"frame-direction.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFrameDirection) CPPUNIT_TEST_FIXTURE(Test, testAltChunk) { - loadFromURL(u"alt-chunk.docx"); + loadFromFile(u"alt-chunk.docx"); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); @@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFieldIfInsideIf) { // Load a document with a field in a table cell: it contains an IF field with various nested // fields. - loadFromURL(u"field-if-inside-if.docx"); + loadFromFile(u"field-if-inside-if.docx"); uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTextDocument->getTextTables(), uno::UNO_QUERY); uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); @@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFieldIfInsideIf) CPPUNIT_TEST_FIXTURE(Test, testCreateDatePreserve) { - loadFromURL(u"create-date-preserve.docx"); + loadFromFile(u"create-date-preserve.docx"); // Trigger idle layout. Scheduler::ProcessEventsToIdle(); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCreateDatePreserve) CPPUNIT_TEST_FIXTURE(Test, testChartZOrder) { // Given a document with a chart and a shape on it: - loadFromURL(u"chart-zorder.docx"); + loadFromFile(u"chart-zorder.docx"); // Then make sure the shape is on top of the chart: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChartZOrder) CPPUNIT_TEST_FIXTURE(Test, testPTab) { // Given a document that has a <w:ptab> to render a linebreak: - loadFromURL(u"ptab.docx"); + loadFromFile(u"ptab.docx"); // Then make sure that the Writer doc model contains that linebreak: uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, @@ -258,7 +258,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteOle) CPPUNIT_TEST_FIXTURE(Test, testClearingBreak) { // Given a document with a clearing break: - loadFromURL(u"clearing-break.docx"); + loadFromFile(u"clearing-break.docx"); // Then make sure that the clear property of the break is not ignored: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -290,7 +290,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlDateDataBinding) { // Given a document with date content control and data binding, data binding date is 2012, // in-document date is 2022: - loadFromURL(u"content-control-date-data-binding.docx"); + loadFromFile(u"content-control-date-data-binding.docx"); // Then make sure that the date is from the data binding, not from document.xml: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -309,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlDataBindingColor) { // Given a document with an inline content control with data binding, placeholder char color is // set to red, when loading that document: - loadFromURL(u"content-control-data-binding-color.docx"); + loadFromFile(u"content-control-data-binding-color.docx"); // Then make sure that the placeholder char color is not in the document, since data binding is // active: @@ -332,7 +332,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableSectionBreak) { // Given a document with 2 floating tables and 2 pages, section break (next page) between the // two: - loadFromURL(u"floating-table-section-break.docx"); + loadFromFile(u"floating-table-section-break.docx"); // When going to the last page: uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); @@ -353,7 +353,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableSectionBreak) CPPUNIT_TEST_FIXTURE(Test, testFloattableSectend) { // Given a document with 2 tables, table 1 on page 1, table 2 on page 2: - loadFromURL(u"floattable-sectend.docx"); + loadFromFile(u"floattable-sectend.docx"); // When importing that document and listing the tables: uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx index 32239798983e..8ec72d5c7b29 100644 --- a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx +++ b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx @@ -39,7 +39,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testTdf143455SmartArtPosition) { - loadFromURL(u"tdf143455_SmartArtPosition.docx"); + loadFromFile(u"tdf143455_SmartArtPosition.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143455SmartArtPosition) CPPUNIT_TEST_FIXTURE(Test, testTdf143208wrapTight) { - loadFromURL(u"tdf143208_wrapTight.docx"); + loadFromFile(u"tdf143208_wrapTight.docx"); // The document has a shape with indentation and contour wrap "wrapTight". Error was, that // the corresponding shape property 'ContourOutside=true' was not set. uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143208wrapTight) CPPUNIT_TEST_FIXTURE(Test, testTdf142305StrokeGlowMargin) { - loadFromURL(u"tdf142305StrokeGlowMargin.docx"); + loadFromFile(u"tdf142305StrokeGlowMargin.docx"); // The document has an arc with fat stroke and glow. Its bounding rectangle differs much // from the snap rectangle. Error was, that the margins were not set in a way, that the shape // would render similar to Word. @@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142305StrokeGlowMargin) CPPUNIT_TEST_FIXTURE(Test, testTdf142305SquareWrapMargin) { - loadFromURL(u"tdf142305SquareWrapMargin.docx"); + loadFromFile(u"tdf142305SquareWrapMargin.docx"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW); @@ -108,7 +108,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142305SquareWrapMargin) CPPUNIT_TEST_FIXTURE(Test, testTdf142304GroupPosition) { - loadFromURL(u"tdf142304GroupPosition.docx"); + loadFromFile(u"tdf142304GroupPosition.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142304GroupPosition) CPPUNIT_TEST_FIXTURE(Test, testTdf141540ChildRotation) { - loadFromURL(u"tdf141540ChildRotation.docx"); + loadFromFile(u"tdf141540ChildRotation.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY_THROW); @@ -141,7 +141,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141540ChildRotation) CPPUNIT_TEST_FIXTURE(Test, testTdf141540GroupRotation) { - loadFromURL(u"tdf141540GroupRotation.docx"); + loadFromFile(u"tdf141540GroupRotation.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141540GroupRotation) CPPUNIT_TEST_FIXTURE(Test, testTdf141540GroupLinePosSize) { - loadFromURL(u"tdf141540GroupLinePosSize.docx"); + loadFromFile(u"tdf141540GroupLinePosSize.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -185,7 +185,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141540GroupLinePosSize) CPPUNIT_TEST_FIXTURE(Test, testGroupShapeRotation) { - loadFromURL(u"group-shape-rotation.docx"); + loadFromFile(u"group-shape-rotation.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -201,7 +201,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGroupShapeRotation) CPPUNIT_TEST_FIXTURE(Test, testDrawShapeInlineEffect) { - loadFromURL(u"draw-shape-inline-effect.docx"); + loadFromFile(u"draw-shape-inline-effect.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -219,7 +219,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineAnchoredZOrder) { // Load a document which has two shapes: an inline one and an anchored one. The inline has no // explicit ZOrder, the anchored one has, and it's set to a value so it's visible. - loadFromURL(u"inline-anchored-zorder.docx"); + loadFromFile(u"inline-anchored-zorder.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<container::XNamed> xOval(xDrawPage->getByIndex(1), uno::UNO_QUERY); @@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineInShapeAnchoredZOrder) { // This document has a textbox shape and then an inline shape inside that. // The ZOrder of the inline shape is larger than the hosting textbox, so the image is visible. - loadFromURL(u"inline-inshape-anchored-zorder.docx"); + loadFromFile(u"inline-inshape-anchored-zorder.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<container::XNamed> xOval(xDrawPage->getByIndex(1), uno::UNO_QUERY); @@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineInShapeAnchoredZOrder) CPPUNIT_TEST_FIXTURE(Test, testRelfromhInsidemargin) { - loadFromURL(u"relfromh-insidemargin.docx"); + loadFromFile(u"relfromh-insidemargin.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRelfromhInsidemargin) CPPUNIT_TEST_FIXTURE(Test, testWrapPolyCrop) { - loadFromURL(u"wrap-poly-crop.docx"); + loadFromFile(u"wrap-poly-crop.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -294,7 +294,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxTextline) { // Load a document with a shape with a textbox. // The shape's vertical relation is <wp:positionV relativeFrom="line">. - loadFromURL(u"textbox-textline.docx"); + loadFromFile(u"textbox-textline.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxTextline) CPPUNIT_TEST_FIXTURE(Test, testTextboxTextlineTop) { - loadFromURL(u"textbox-textline-top.docx"); + loadFromFile(u"textbox-textline-top.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); @@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxTextlineTop) CPPUNIT_TEST_FIXTURE(Test, testLayoutInCellWrapnoneColumn) { // Given a file with a table, then a shape anchored inside the cell: - loadFromURL(u"layout-in-cell-wrapnone-column.docx"); + loadFromFile(u"layout-in-cell-wrapnone-column.docx"); // Then make sure the shape can leave the cell: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -351,7 +351,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLayoutInCellWrapnoneColumn) CPPUNIT_TEST_FIXTURE(Test, testLayoutInCellOfHraphics) { // Given a file with a table, then a shape anchored inside the cell: - loadFromURL(u"layout-in-cell-2.docx"); + loadFromFile(u"layout-in-cell-2.docx"); // Then make sure the cell obeys the layoutInCell: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -374,7 +374,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149840SmartArtBackground) pChange->commit(); } - loadFromURL(u"tdf149840_SmartArtBackground.docx"); + loadFromFile(u"tdf149840_SmartArtBackground.docx"); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference<container::XIndexAccess> xGroup(xDrawPage->getByIndex(0), uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx b/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx index 9b22e6354166..dae6e387ee64 100644 --- a/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx +++ b/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx @@ -32,7 +32,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testFloatingTableHeader) { - loadFromURL(u"floating-table-header.docx"); + loadFromFile(u"floating-table-header.docx"); uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier( xModel->getCurrentController(), uno::UNO_QUERY); @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFollowPageTopMargin) { // Load a document with 2 pages: first page has larger top margin, second page has smaller top // margin. - loadFromURL(u"follow-page-top-margin.docx"); + loadFromFile(u"follow-page-top-margin.docx"); uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xStyleFamilies @@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableNegativeVerticalPos) { // Given a document with a table which has a negative vertical position (moves up to overlap // with the header): - loadFromURL(u"table-negative-vertical-pos.docx"); + loadFromFile(u"table-negative-vertical-pos.docx"); // Then make sure we don't import that as a plain table, which can't have a negative top margin: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableNegativeVerticalPos) CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder) { // Given a document with a top margin and a border which has more spacing than the margin: - loadFromURL(u"negative-page-border.docx"); + loadFromFile(u"negative-page-border.docx"); // Then make sure that the border distance is negative, so it can appear at the correct // position: @@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder) CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorderNoMargin) { // Given a document with no top margin and a border which has spacing: - loadFromURL(u"negative-page-border-no-margin.docx"); + loadFromFile(u"negative-page-border-no-margin.docx"); // Then make sure that the border distance is negative, so it can appear at the correct // position: diff --git a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx index e0d48f2726e5..1d1e1228f4f5 100644 --- a/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx +++ b/writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx @@ -32,7 +32,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testSdtRunRichText) { // Given a document with a rich text inline/run SDT: - loadFromURL(u"sdt-run-rich-text.docx"); + loadFromFile(u"sdt-run-rich-text.docx"); // Then make sure that formatting of the text inside the SDT is not lost: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunRichText) CPPUNIT_TEST_FIXTURE(Test, testSdtRunPlainText) { // Given a document with a plain text inline/run SDT: - loadFromURL(u"sdt-run-plain-text.docx"); + loadFromFile(u"sdt-run-plain-text.docx"); // Then make sure that the text inside the SDT is not rich: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunPlainText) CPPUNIT_TEST_FIXTURE(Test, testSdtRunCheckbox) { // Given a document with a checkbox inline/run SDT: - loadFromURL(u"sdt-run-checkbox.docx"); + loadFromFile(u"sdt-run-checkbox.docx"); // Then make sure that the doc model has a clickable checkbox content control: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunCheckbox) CPPUNIT_TEST_FIXTURE(Test, testSdtRunDropdown) { // Given a document with a dropdown inline/run SDT: - loadFromURL(u"sdt-run-dropdown.docx"); + loadFromFile(u"sdt-run-dropdown.docx"); // Then make sure that the doc model has a clickable dropdown content control: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -203,7 +203,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunDropdown) CPPUNIT_TEST_FIXTURE(Test, testSdtRunComboBox) { // Given a document with a combo box inline/run SDT: - loadFromURL(u"sdt-run-combobox.docx"); + loadFromFile(u"sdt-run-combobox.docx"); // Then make sure that the doc model has a clickable combo box content control: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -230,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSdtRunComboBox) CPPUNIT_TEST_FIXTURE(Test, testSdtRunPicture) { // Given a document with a dropdown inline/run SDT: - loadFromURL(u"sdt-run-picture.docx"); + loadFromFile(u"sdt-run-picture.docx"); // Then make sure that the doc model has a clickable picture content control: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/SettingsTable.cxx b/writerfilter/qa/cppunittests/dmapper/SettingsTable.cxx index a62283c98388..52814727f91c 100644 --- a/writerfilter/qa/cppunittests/dmapper/SettingsTable.cxx +++ b/writerfilter/qa/cppunittests/dmapper/SettingsTable.cxx @@ -32,7 +32,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDoNotBreakWrappedTables) { // Given a document with <w:doNotBreakWrappedTables>: // When importing that document: - loadFromURL(u"do-not-break-wrapped-tables.docx"); + loadFromFile(u"do-not-break-wrapped-tables.docx"); // Then make sure that the matching compat flag is set: uno::Reference<lang::XMultiServiceFactory> xDocument(mxComponent, uno::UNO_QUERY); @@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAllowTextAfterFloatingTableBreak) { // Given a document with <w:compatSetting w:name="allowTextAfterFloatingTableBreak">: // When importing that document: - loadFromURL(u"floattable-wrap-on-all-pages.docx"); + loadFromFile(u"floattable-wrap-on-all-pages.docx"); // Then make sure that the matching compat flag is set: uno::Reference<lang::XMultiServiceFactory> xDocument(mxComponent, uno::UNO_QUERY); @@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAddVerticalFrameOffsetsRTF) { // Given a document with a floating table, immediately followed by an inline table: // When importing that document: - loadFromURL(u"floattable-vertical-frame-offset.rtf"); + loadFromFile(u"floattable-vertical-frame-offset.rtf"); // Then make sure the floating and the inline tables don't overlap: uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/TableManager.cxx b/writerfilter/qa/cppunittests/dmapper/TableManager.cxx index 1f20ee1f8432..0f27633dce74 100644 --- a/writerfilter/qa/cppunittests/dmapper/TableManager.cxx +++ b/writerfilter/qa/cppunittests/dmapper/TableManager.cxx @@ -29,7 +29,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedCellStartDOCXImport) { // Given a document with a nested floating table at cell start and an other inner floating table: // When importing that document: - loadFromURL(u"floattable-nested-cellstart.docx"); + loadFromFile(u"floattable-nested-cellstart.docx"); // Then make sure that both inner tables are floating: uno::Reference<text::XTextFramesSupplier> xFramesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx b/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx index f31d9862a1ac..040fcf124488 100644 --- a/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx +++ b/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx @@ -29,7 +29,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testSemiTransparentText) { // Load a document with a single paragraph: second text portion has semi-transparent text. - loadFromURL(u"semi-transparent-text.docx"); + loadFromFile(u"semi-transparent-text.docx"); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); @@ -52,7 +52,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency) { // Load a document with a single paragraph. It has semi-transparent text and the color is // determined by a w14:schemeClr element. - loadFromURL(u"tdf152884_Char_Transparency.docx"); + loadFromFile(u"tdf152884_Char_Transparency.docx"); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/ooxml/ooxml.cxx b/writerfilter/qa/cppunittests/ooxml/ooxml.cxx index 8602ecd8e77d..32133df9ba7e 100644 --- a/writerfilter/qa/cppunittests/ooxml/ooxml.cxx +++ b/writerfilter/qa/cppunittests/ooxml/ooxml.cxx @@ -29,7 +29,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testFloatingTablesLost) { // Given a document with 2 floating tables, the 2nd has an inner floating table as well: - loadFromURL(u"floattable-tables-lost.docx"); + loadFromFile(u"floattable-tables-lost.docx"); // When counting the created Writer tables: uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableLeak) { // Given an outer table and 2 inner tables at B1 start: // When importing that document: - loadFromURL(u"floattable-leak.docx"); + loadFromFile(u"floattable-leak.docx"); // Then make sure the body text only contains a table and an empty final paragraph: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdispatchflag.cxx b/writerfilter/qa/cppunittests/rtftok/rtfdispatchflag.cxx index bca1d4aeb4fd..3b9e1dd1a592 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfdispatchflag.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfdispatchflag.cxx @@ -31,7 +31,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testFloatingTable) { // Given a document with a floating table, when importing that document: - loadFromURL(u"floating-table.rtf"); + loadFromFile(u"floating-table.rtf"); // Then make sure the floating table is there & has the expected properties: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -71,7 +71,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDoNotBreakWrappedTables) { // Given a document without \nobrkwrptbl: // When importing that document: - loadFromURL(u"do-not-break-wrapped-tables.rtf"); + loadFromFile(u"do-not-break-wrapped-tables.rtf"); // Then make sure that the matching compat flag is set: uno::Reference<lang::XMultiServiceFactory> xDocument(mxComponent, uno::UNO_QUERY); @@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTblOverlap) { // Given a document with 2 floating tables, the second is not allowed to overlap: // When importing that document: - loadFromURL(u"floattable-tbl-overlap.rtf"); + loadFromFile(u"floattable-tbl-overlap.rtf"); // Then make sure the second table is marked as "can't overlap": uno::Reference<text::XTextFramesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdispatchsymbol.cxx b/writerfilter/qa/cppunittests/rtftok/rtfdispatchsymbol.cxx index fa491121656a..8317e50824b5 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfdispatchsymbol.cxx @@ -30,7 +30,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testPage) { // Given a file with a \page and 2 \par tokens: - loadFromURL(u"page.rtf"); + loadFromFile(u"page.rtf"); // Then make sure we get exactly two paragraphs: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCenterAfterPage) { // Given a file with a \page, followed by a \qc: // When loading that file: - loadFromURL(u"center-after-page.rtf"); + loadFromFile(u"center-after-page.rtf"); // Then make sure that the last paragraph is centered: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdispatchvalue.cxx b/writerfilter/qa/cppunittests/rtftok/rtfdispatchvalue.cxx index 072071fbc32f..374c5246ca7a 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfdispatchvalue.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfdispatchvalue.cxx @@ -30,7 +30,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testFollowStyle) { // Given a file with \snext: - loadFromURL(u"follow-style.rtf"); + loadFromFile(u"follow-style.rtf"); // Then make sure we set the follow of the para style correctly: uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, @@ -53,7 +53,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFollowStyle) CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder) { // Given a document with a top margin and a border which has more spacing than the margin: - loadFromURL(u"negative-page-border.rtf"); + loadFromFile(u"negative-page-border.rtf"); // Then make sure that the border distance is negative, so it can appear at the correct // position: diff --git a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx index 1ddfbf87b835..4249b29040d4 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfdocumentimpl.cxx @@ -36,7 +36,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPicwPich) { // Given a document with a WMF file where picwgoal and picscalex is provided, so picw is not // relevant: - loadFromURL(u"picw-pich.rtf"); + loadFromFile(u"picw-pich.rtf"); // Then make sure the graphic's preferred size is correct: uno::Reference<drawing::XDrawPageSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPicwPich) CPPUNIT_TEST_FIXTURE(Test, testCharHiddenInTable) { // Given a document with a table, and a hidden \line in it: - loadFromURL(u"char-hidden-intbl.rtf"); + loadFromFile(u"char-hidden-intbl.rtf"); // Then make sure that line is indeed hidden: uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -79,7 +79,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCharHiddenInTable) CPPUNIT_TEST_FIXTURE(Test, testDuplicatedImage) { // Given a document with 2 images: - loadFromURL(u"duplicated-image.rtf"); + loadFromFile(u"duplicated-image.rtf"); // Then make sure no duplicated images are created: uno::Reference<drawing::XDrawPageSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDuplicatedImage) CPPUNIT_TEST_FIXTURE(Test, testOldParaNumLeftMargin) { // Given a document with 3 paragraphs, the third one with a left indent: - loadFromURL(u"old-para-num-left-margin.rtf"); + loadFromFile(u"old-para-num-left-margin.rtf"); // Then make sure that the third paragraph has a left indent: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx b/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx index 203db5182857..69b7fd994739 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx @@ -30,7 +30,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testPictureInTextframe) { - loadFromURL(u"picture-in-textframe.rtf"); + loadFromFile(u"picture-in-textframe.rtf"); uno::Reference<drawing::XDrawPageSupplier> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xTextDocument->getDrawPage(); uno::Reference<beans::XPropertySet> xInnerShape(xDrawPage->getByIndex(1), uno::UNO_QUERY); @@ -48,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermark) { // Given a document with a picture watermark, and the "washout" checkbox is ticked on the Word // UI: - loadFromURL(u"watermark.rtf"); + loadFromFile(u"watermark.rtf"); // Then make sure the watermark effect is not lost on import: uno::Reference<drawing::XDrawPageSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx b/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx index 2711d282ca64..f233fa89652e 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx @@ -29,7 +29,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testLeftMarginDedup) { - loadFromURL(u"left-margin-dedup.rtf"); + loadFromFile(u"left-margin-dedup.rtf"); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<container::XEnumerationAccess> xText(xTextDocument->getText(), uno::UNO_QUERY); uno::Reference<container::XEnumeration> xParagraphs = xText->createEnumeration(); diff --git a/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx b/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx index e760ab221ee8..8f0691872fa6 100644 --- a/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx +++ b/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx @@ -28,7 +28,7 @@ public: CPPUNIT_TEST_FIXTURE(Test, testInvalidHex) { // Given a document with a markup like "\'3?": - loadFromURL(u"invalid-hex.rtf"); + loadFromFile(u"invalid-hex.rtf"); // Then make sure the result matches Word, rather than just refusing to import the document: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index 86e7a4502ed3..f9780b42ab0b 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -68,7 +68,7 @@ void EPUBExportTest::createDoc(std::u16string_view rFile, const uno::Sequence<beans::PropertyValue>& rFilterData) { // Import the bugdoc and export as EPUB. - loadFromURL(rFile); + loadFromFile(rFile); uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; aMediaDescriptor["FilterName"] <<= OUString("EPUB"); diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx index 13c77387b054..8d89065d4438 100644 --- a/xmloff/qa/unit/draw.cxx +++ b/xmloff/qa/unit/draw.cxx @@ -88,7 +88,7 @@ uno::Reference<drawing::XShape> XmloffDrawTest::getShape(sal_uInt8 nShapeIndex) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss) { // Load a document that has a shape with a textbox in it. Save it to ODF and reload. - loadFromURL(u"textbox-loss.docx"); + loadFromFile(u"textbox-loss.docx"); saveAndReload("impress8"); // Make sure that the shape is still a textbox. @@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf141301_Extrusion_Angle) { // Load a document that has a custom shape with extrusion direction as set by LO as its default. - loadFromURL(u"tdf141301_Extrusion_Skew.odg"); + loadFromFile(u"tdf141301_Extrusion_Skew.odg"); // Prepare use of XPath save("draw8"); @@ -161,7 +161,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot) { // Execute ODP import: - loadFromURL(u"video-snapshot.odp"); + loadFromFile(u"video-snapshot.odp"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xDrawPagesSupplier.is()); @@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeImport) { // Given a document that has a master page with a theme associated: - loadFromURL(u"theme.fodp"); + loadFromFile(u"theme.fodp"); // Then make sure the doc model has a master page with a theme: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -271,7 +271,7 @@ void checkFillAndLineComplexColors(uno::Reference<drawing::XShape> const& xShape CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testFillAndLineThemeColorExportImport) { - loadFromURL(u"FillAndStrokeThemeColorTest.fodp"); + loadFromFile(u"FillAndStrokeThemeColorTest.fodp"); checkFillAndLineComplexColors(getShape(0)); @@ -285,7 +285,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testFillAndLineThemeColorExportImport) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport) { // Given a document that refers to a theme color: - loadFromURL(u"Reference-ThemeColors-TextAndFill.pptx"); + loadFromFile(u"Reference-ThemeColors-TextAndFill.pptx"); save("impress8"); // Make sure the export result has the theme reference: @@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextAndFillThemeColorExportImport) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeColor_ShapeFill) { - loadFromURL(u"ReferenceShapeFill.pptx"); + loadFromFile(u"ReferenceShapeFill.pptx"); save("impress8"); // reload load(maTempFile.GetURL()); @@ -484,7 +484,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTableInShape) { // Given a document with a shape with a "FrameX" parent style (starts with Frame, but is not // Frame): - loadFromURL(u"table-in-shape.fodt"); + loadFromFile(u"table-in-shape.fodt"); // Then make sure the table inside the shape is not lost: uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); @@ -527,7 +527,7 @@ void lcl_assertMetalProperties(std::string_view sInfo, uno::Reference<drawing::X CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeExtended) { - loadFromURL(u"tdf145700_3D_metal_type_MSCompatible.doc"); + loadFromFile(u"tdf145700_3D_metal_type_MSCompatible.doc"); // verify properties uno::Reference<drawing::XShape> xShape(getShape(0)); lcl_assertMetalProperties("from doc", xShape); @@ -551,7 +551,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeExtended) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeStrict) { - loadFromURL(u"tdf145700_3D_metal_type_MSCompatible.doc"); + loadFromFile(u"tdf145700_3D_metal_type_MSCompatible.doc"); // save ODF 1.3 strict and test, that new attribute is not written. Adapt when attribute is // added to ODF. @@ -588,7 +588,7 @@ void lcl_assertSpecularityProperty(std::string_view sInfo, uno::Reference<drawin CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularityExtended) { - loadFromURL(u"tdf147580_extrusion-specularity.doc"); + loadFromFile(u"tdf147580_extrusion-specularity.doc"); // verify property uno::Reference<drawing::XShape> xShape(getShape(0)); lcl_assertSpecularityProperty("from doc", xShape); @@ -612,7 +612,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularityExtended) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularity) { - loadFromURL(u"tdf147580_extrusion-specularity.doc"); + loadFromFile(u"tdf147580_extrusion-specularity.doc"); // The file has c3DSpecularAmt="80000" which results internally in specularity=122%. // Save to ODF 1.3 strict and make sure it does not produce a validation error. @@ -661,7 +661,7 @@ bool lcl_getShapeSegments(uno::Sequence<drawing::EnhancedCustomShapeSegment>& rS CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf148714_CurvedArrowsOld) { // Load a document with CurveArrow shapes with faulty path as written by older LO versions. - loadFromURL(u"tdf148714_CurvedArrowsOld.odp"); + loadFromFile(u"tdf148714_CurvedArrowsOld.odp"); // Make sure, that the error has been corrected on opening. for (sal_Int32 nShapeIndex = 0; nShapeIndex < 4; nShapeIndex++) @@ -699,7 +699,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf148714_CurvedArrowsOld) CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextRotationPlusPre) { - loadFromURL(u"tdf149551_verticalText.pptx"); + loadFromFile(u"tdf149551_verticalText.pptx"); // The file has a shape with attribute vert="vert" in <bodyPr> element. That generates a // TextPreRotateAngle attribute in CustomShapeGeometry. @@ -782,7 +782,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf157018_ThemeImportDraw) { // Similar to testThemeImport but for Draw. // Load document with custom color theme - loadFromURL(u"tdf157018_CustomTheme.fodg"); + loadFromFile(u"tdf157018_CustomTheme.fodg"); // First make sure the doc model has a master page with a theme: uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx index 3d30b0176ba1..178b0f216154 100644 --- a/xmloff/qa/unit/style.cxx +++ b/xmloff/qa/unit/style.cxx @@ -53,7 +53,7 @@ uno::Reference<drawing::XShape> XmloffStyleTest::getShape(sal_uInt8 nShapeIndex) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFillImageBase64) { // Load a flat ODG that has base64-encoded bitmap as a fill style. - loadFromURL(u"fill-image-base64.fodg"); + loadFromFile(u"fill-image-base64.fodg"); uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameContainer> xBitmaps( xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY); @@ -151,7 +151,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRtlGutter) { // Given a document with a gutter margin and an RTL writing mode: // When loading that document from ODF: - loadFromURL(u"rtl-gutter.fodt"); + loadFromFile(u"rtl-gutter.fodt"); // Then make sure the page style's RtlGutter property is true. uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, @@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR) // Load document. It has a frame style with writing-mode bt-lr. // In ODF 1.3 extended it is written as loext:writing-mode="bt-lr". // In ODF 1.3 strict, there must not be an attribute at all. - loadFromURL(u"tdf150407_WritingModeBTLR_style.odt"); + loadFromFile(u"tdf150407_WritingModeBTLR_style.odt"); Resetter _([]() { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -203,7 +203,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR) "writing-mode"_ostr, "bt-lr"); } - loadFromURL(u"tdf150407_WritingModeBTLR_style.odt"); + loadFromFile(u"tdf150407_WritingModeBTLR_style.odt"); // Save to ODF 1.3 strict. { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -227,7 +227,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin) // Load document. It has a frame position with vertical position relative to bottom margin. // In ODF 1.3 extended it is written as loext:vertical-rel="page-content-bottom". // In ODF 1.3 strict, there must not be an attribute at all. - loadFromURL(u"tdf150407_PosRelBottomMargin.docx"); + loadFromFile(u"tdf150407_PosRelBottomMargin.docx"); Resetter _([]() { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -259,7 +259,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin) "vertical-rel"_ostr, "page-content-bottom"); } - loadFromURL(u"tdf150407_PosRelBottomMargin.docx"); + loadFromFile(u"tdf150407_PosRelBottomMargin.docx"); // Save to ODF 1.3 strict. { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin) // Load document. It has a frame position with vertical position relative to top margin. // In ODF 1.3 extended it is written as loext:vertical-rel="page-content-top". // In ODF 1.3 strict, there must not be an attribute at all. - loadFromURL(u"tdf150407_PosRelTopMargin.docx"); + loadFromFile(u"tdf150407_PosRelTopMargin.docx"); Resetter _([]() { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -315,7 +315,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin) "vertical-rel"_ostr, "page-content-top"); } - loadFromURL(u"tdf150407_PosRelTopMargin.docx"); + loadFromFile(u"tdf150407_PosRelTopMargin.docx"); // Save to ODF 1.3 strict. { std::shared_ptr<comphelper::ConfigurationChanges> pBatch( @@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew) { // The file contains a shape with linear gradient fill from red #ff0000 to yellow #ffff00, // named 'red2yellow' - loadFromURL(u"MCGR_OldToNew.odg"); + loadFromFile(u"MCGR_OldToNew.odg"); // saveAndReload includes validation and must not fail with the new elements and attributes. saveAndReload("draw8"); @@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_OldToNew_opacity) { // The file contains a shape with solid fill and a radial transparency gradient with start 90%, // end 0%, border 20% and center at 50%|50%. There is only one draw:opacity element in file. - loadFromURL(u"MCGR_OldToNew_opacity.odg"); + loadFromFile(u"MCGR_OldToNew_opacity.odg"); // saveAndReload includes validation and must not fail with the new elements and attributes. saveAndReload("draw8"); @@ -452,7 +452,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMCGR_threeStops) { // The file contains a shape with square gradient fill from red #ff0000 over teal #0099bb to // yellow #ffff00, named 'threeStops'. It has 45deg rotation, center 0%|50%, border 10%. - loadFromURL(u"MCGR_threeStops.fodt"); + loadFromFile(u"MCGR_threeStops.fodt"); // saveAndReload includes validation and must not fail with the new elements and attributes. saveAndReload("draw8"); @@ -527,7 +527,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBorderRestoration) // exported to ODF with a border of 50%. // When gradient-stops are integrated in ODF strict, the test needs to be adapted. - loadFromURL(u"MCGR_Border_restoration.pptx"); + loadFromFile(u"MCGR_Border_restoration.pptx"); // Backup original ODF default version const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion()); @@ -565,7 +565,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testTransparencyBorderRestoration) // backward compatibility such gradient is exported with a border of 40% in the transparency // gradient. The color itself is the same for all gradient stops. // When transparency gradient-stops are integrated in ODF strict, the test needs to be adapted. - loadFromURL(u"MCGR_TransparencyBorder_restoration.pptx"); + loadFromFile(u"MCGR_TransparencyBorder_restoration.pptx"); // Backup original ODF default version const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(GetODFDefaultVersion()); @@ -604,7 +604,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialGradientCompatible) // ODF export writes an axial gradient. with colors A and B. // This test needs to be adapted when color stops are available in ODF strict and widely // supported in even older LibreOffice versions. - loadFromURL(u"tdf155549_MCGR_AxialGradientCompatible.odt"); + loadFromFile(u"tdf155549_MCGR_AxialGradientCompatible.odt"); //Round-trip through OOXML. // FixMe tdf#153183. Here "Attribute 'ID' is not allowed to appear in element 'v:rect'". @@ -636,7 +636,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAxialTransparencyCompatible) // axial transparency gradient that is same as in the original document. // This test needs to be adapted when color stops are available in ODF strict and widely // supported in even older LibreOffice versions. - loadFromURL(u"tdf155549_MCGR_AxialTransparencyCompatible.odt"); + loadFromFile(u"tdf155549_MCGR_AxialTransparencyCompatible.odt"); //Round-trip through OOXML. // FixMe tdf#153183, and error in charSpace and in CharacterSet diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx index 7462e23f7c39..e6433b2b70f9 100644 --- a/xmloff/qa/unit/text.cxx +++ b/xmloff/qa/unit/text.cxx @@ -47,7 +47,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMailMergeInEditeng) { // Without the accompanying fix in place, this test would have failed, as unexpected // <text:database-display> in editeng text aborted the whole import process. - loadFromURL(u"mail-merge-editeng.odt"); + loadFromFile(u"mail-merge-editeng.odt"); } CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty) @@ -181,13 +181,13 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentTableBorder) { // Without the accompanying fix in place, this failed to load, as a comment that started in a // table and ended outside a table aborted the whole importer. - loadFromURL(u"comment-table-border.fodt"); + loadFromFile(u"comment-table-border.fodt"); } CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParaStyleListLevel) { // Given a document with style:list-level="...": - loadFromURL(u"para-style-list-level.fodt"); + loadFromFile(u"para-style-list-level.fodt"); // Then make sure we map that to the paragraph style's numbering level: uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, @@ -217,7 +217,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParaStyleListLevel) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContinueNumberingWord) { // Given a document, which is produced by Word and contains text:continue-numbering="true": - loadFromURL(u"continue-numbering-word.odt"); + loadFromFile(u"continue-numbering-word.odt"); // Then make sure that the numbering from the 1st para is continued on the 3rd para: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -239,7 +239,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContinueNumberingWord) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId) { // Given a document with a simple list (no continue-list="..." attribute): - loadFromURL(u"list-id.fodt"); + loadFromFile(u"list-id.fodt"); // When storing that document as ODF: save("writer8"); @@ -255,7 +255,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId2) { // tdf#155823 Given a document with a list consisting of items having different list styles: - loadFromURL(u"differentListStylesInOneList.fodt"); + loadFromFile(u"differentListStylesInOneList.fodt"); auto xTextDocument(mxComponent.queryThrow<css::text::XTextDocument>()); auto xParaEnumAccess(xTextDocument->getText().queryThrow<css::container::XEnumerationAccess>()); @@ -361,7 +361,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdOnRestart) // and text:continue-list, but uses text:continue-numbering, and is imported correctly. // Given a document with a list with a restart after break: - loadFromURL(u"listRestartAfterBreak.fodt"); + loadFromFile(u"listRestartAfterBreak.fodt"); auto xTextDocument(mxComponent.queryThrow<css::text::XTextDocument>()); auto xParaEnumAccess(xTextDocument->getText().queryThrow<css::container::XEnumerationAccess>()); @@ -446,7 +446,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakImport) { // Given an ODF document with a clearing break: - loadFromURL(u"clearing-break.fodt"); + loadFromFile(u"clearing-break.fodt"); // Then make sure that the "clear" attribute is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -573,7 +573,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlImport) { // Given an ODF document with a content control: - loadFromURL(u"content-control.fodt"); + loadFromFile(u"content-control.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlImport) { // Given an ODF document with a checkbox content control: - loadFromURL(u"content-control-checkbox.fodt"); + loadFromFile(u"content-control-checkbox.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -733,7 +733,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlImport) { // Given an ODF document with a dropdown content control: - loadFromURL(u"content-control-dropdown.fodt"); + loadFromFile(u"content-control-dropdown.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -809,7 +809,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlImport) { // Given an ODF document with a picture content control: - loadFromURL(u"content-control-picture.fodt"); + loadFromFile(u"content-control-picture.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -871,7 +871,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlImport) { // Given an ODF document with a date content control: - loadFromURL(u"content-control-date.fodt"); + loadFromFile(u"content-control-date.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -935,7 +935,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlImport) { // Given an ODF document with a plain-text content control: - loadFromURL(u"content-control-plain-text.fodt"); + loadFromFile(u"content-control-plain-text.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -1027,7 +1027,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlImport) { // Given an ODF document with a plain-text content control: - loadFromURL(u"content-control-combo-box.fodt"); + loadFromFile(u"content-control-combo-box.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -1054,7 +1054,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlImport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlImport) { // Given an ODF document with a content control and its alias/tag: - loadFromURL(u"content-control-alias.fodt"); + loadFromFile(u"content-control-alias.fodt"); // Then make sure that the content control is not lost on import: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -1096,7 +1096,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlAutostyleExport) { // Given a document with a dropdown content control, and formatting that forms an autostyle in // ODT: - loadFromURL(u"content-control-dropdown.docx"); + loadFromFile(u"content-control-dropdown.docx"); // When saving that document to ODT, then make sure no assertion failure happens: uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); @@ -1111,7 +1111,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlAutostyleExport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthRedline) { // Given a document with change tracking enabled, one image is part of a delete redline: - loadFromURL(u"scale-width-redline.fodt"); + loadFromFile(u"scale-width-redline.fodt"); dispatchCommand(mxComponent, ".uno:TrackChanges", {}); dispatchCommand(mxComponent, ".uno:GoToEndOfLine", {}); dispatchCommand(mxComponent, ".uno:EndOfParaSel", {}); @@ -1209,7 +1209,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableImport) { // Given a document with a floating table (loext:may-break-between-pages="true"), when importing // that document: - loadFromURL(u"floattable.fodt"); + loadFromFile(u"floattable.fodt"); // Then make sure that the matching text frame property is set: uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); @@ -1224,7 +1224,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableImport) CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testParagraphScopedTabDistance) { // Given a document with paragraph scoped default tab stop distance (loext:tab-stop-distance="0.5cm") - loadFromURL(u"paragraph-tab-stop-distance.fodp"); + loadFromFile(u"paragraph-tab-stop-distance.fodp"); uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), @@ -1266,7 +1266,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testNestedSpans) // Given a document with a first paragraph that has a nested span, the outer span setting the // boldness: // When importing that document: - loadFromURL(u"nested-spans.odt"); + loadFromFile(u"nested-spans.odt"); // Then make sure the text portion is bold, not normal: uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/xmloff/qa/unit/text/txtprmap.cxx b/xmloff/qa/unit/text/txtprmap.cxx index f40b04b3fdd1..08c91c4c1a78 100644 --- a/xmloff/qa/unit/text/txtprmap.cxx +++ b/xmloff/qa/unit/text/txtprmap.cxx @@ -72,7 +72,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableWrapTextAtFlyStartImport) // Given a document with a floating table + wrap on all pages // (loext:may-break-between-pages="true" and loext:wrap-text-at-frame-start="true"), when // importing that document: - loadFromURL(u"floattable-wrap-all-pages2.fodt"); + loadFromFile(u"floattable-wrap-all-pages2.fodt"); // Then make sure that the matching text frame property is set: uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index e564e3761aeb..9f449d26d6bd 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -416,7 +416,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLRemoveAll) /// Test a typical ODF where all streams are signed. CPPUNIT_TEST_FIXTURE(SigningTest, testODFGood) { - loadFromURL(u"good.odt"); + loadFromFile(u"good.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -431,7 +431,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFGood) /// Test a typical broken ODF signature where one stream is corrupted. CPPUNIT_TEST_FIXTURE(SigningTest, testODFBroken) { - loadFromURL(u"bad.odt"); + loadFromFile(u"bad.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -443,7 +443,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFBroken) // Document has a signature stream, but no actual signatures. CPPUNIT_TEST_FIXTURE(SigningTest, testODFNo) { - loadFromURL(u"no.odt"); + loadFromFile(u"no.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFNo) // document has one signed timestamp and one unsigned timestamp CPPUNIT_TEST_FIXTURE(SigningTest, testODFUnsignedTimestamp) { - loadFromURL(u"02_doc_signed_by_trusted_person_manipulated.odt"); + loadFromFile(u"02_doc_signed_by_trusted_person_manipulated.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -480,7 +480,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFUnsignedTimestamp) CPPUNIT_TEST_FIXTURE(SigningTest, aaa_testODFX509CertificateChain) { - loadFromURL(u"signed_with_x509certificate_chain.odt"); + loadFromFile(u"signed_with_x509certificate_chain.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -503,7 +503,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, aaa_testODFX509CertificateChain) CPPUNIT_TEST_FIXTURE(SigningTest, testODFDoubleX509Data) { - loadFromURL(u"02_doc_signed_by_attacker_manipulated.odt"); + loadFromFile(u"02_doc_signed_by_attacker_manipulated.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -523,7 +523,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFDoubleX509Data) CPPUNIT_TEST_FIXTURE(SigningTest, testODFTripleX509Data) { - loadFromURL(u"02_doc_signed_by_attacker_manipulated_triple.odt"); + loadFromFile(u"02_doc_signed_by_attacker_manipulated_triple.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -543,7 +543,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFTripleX509Data) CPPUNIT_TEST_FIXTURE(SigningTest, testODFMacroDoubleX509Data) { - loadFromURL(u"02_doc_macros_signed_by_attacker_manipulated.odt"); + loadFromFile(u"02_doc_macros_signed_by_attacker_manipulated.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -563,7 +563,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFMacroDoubleX509Data) CPPUNIT_TEST_FIXTURE(SigningTest, testODFDoubleX509Certificate) { - loadFromURL(u"02_doc_signed_by_attacker_manipulated2.odt"); + loadFromFile(u"02_doc_signed_by_attacker_manipulated2.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -605,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDNCompatibility) /// Test a typical OOXML where a number of (but not all) streams are signed. CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLPartial) { - loadFromURL(u"partial.docx"); + loadFromFile(u"partial.docx"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -622,7 +622,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLPartial) /// Test a typical broken OOXML signature where one stream is corrupted. CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLBroken) { - loadFromURL(u"bad.docx"); + loadFromFile(u"bad.docx"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLBroken) /// Test a typical PDF where the signature is good. CPPUNIT_TEST_FIXTURE(SigningTest, testPDFGood) { - loadFromURL(u"good.pdf"); + loadFromFile(u"good.pdf"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFGood) /// Test a typical PDF where the signature is bad. CPPUNIT_TEST_FIXTURE(SigningTest, testPDFBad) { - loadFromURL(u"bad.pdf"); + loadFromFile(u"bad.pdf"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -675,7 +675,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFBad) CPPUNIT_TEST_FIXTURE(SigningTest, testPDFHideAndReplace) { - loadFromURL(u"hide-and-replace-shadow-file-signed-2.pdf"); + loadFromFile(u"hide-and-replace-shadow-file-signed-2.pdf"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -697,7 +697,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFHideAndReplace) /// Test a typical PDF which is not signed. CPPUNIT_TEST_FIXTURE(SigningTest, testPDFNo) { - loadFromURL(u"no.pdf"); + loadFromFile(u"no.pdf"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -778,7 +778,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFAddVisibleSignature) CPPUNIT_TEST_FIXTURE(SigningTest, test96097Calc) { - loadFromURL(u"tdf96097.ods"); + loadFromFile(u"tdf96097.ods"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT_MESSAGE("Failed to access document base model", pBaseModel); @@ -806,7 +806,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, test96097Calc) CPPUNIT_TEST_FIXTURE(SigningTest, test96097Doc) { - loadFromURL(u"tdf96097.odt"); + loadFromFile(u"tdf96097.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1084,7 +1084,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_OOXML) /// Works with an existing good XAdES signature. CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESGood) { - loadFromURL(u"good-xades.odt"); + loadFromFile(u"good-xades.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1126,7 +1126,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineOOXML) CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineODF) { - loadFromURL(u"signatureline.odt"); + loadFromFile(u"signatureline.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1148,7 +1148,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineODF) /// Test a typical ODF where all streams are GPG-signed. CPPUNIT_TEST_FIXTURE(SigningTest, testODFGoodGPG) { - loadFromURL(u"goodGPG.odt"); + loadFromFile(u"goodGPG.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1163,7 +1163,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFGoodGPG) /// Test a typical ODF where all streams are GPG-signed, but we don't trust the signature. CPPUNIT_TEST_FIXTURE(SigningTest, testODFUntrustedGoodGPG) { - loadFromURL(u"untrustedGoodGPG.odt"); + loadFromFile(u"untrustedGoodGPG.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1179,7 +1179,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFUntrustedGoodGPG) /// Test a typical broken ODF signature where one stream is corrupted. CPPUNIT_TEST_FIXTURE(SigningTest, testODFBrokenStreamGPG) { - loadFromURL(u"badStreamGPG.odt"); + loadFromFile(u"badStreamGPG.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1191,7 +1191,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFBrokenStreamGPG) /// Test a typical broken ODF signature where the XML dsig hash is corrupted. CPPUNIT_TEST_FIXTURE(SigningTest, testODFBrokenDsigGPG) { - loadFromURL(u"badDsigGPG.odt"); + loadFromFile(u"badDsigGPG.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); @@ -1206,14 +1206,14 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFBrokenDsigGPG) CPPUNIT_TEST_FIXTURE(SigningTest, testODFEncryptedGPG) { // ODF1.2 + loext flavour - loadFromURL(u"encryptedGPG.odt"); + loadFromFile(u"encryptedGPG.odt"); SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell(); CPPUNIT_ASSERT(pObjectShell); // ODF1.3 flavour - loadFromURL(u"encryptedGPG_odf13.odt"); + loadFromFile(u"encryptedGPG_odf13.odt"); pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); CPPUNIT_ASSERT(pBaseModel); pObjectShell = pBaseModel->GetObjectShell(); diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx index 832a414ff2bc..aef3c7f08885 100644 --- a/xmlsecurity/qa/unit/signing/signing2.cxx +++ b/xmlsecurity/qa/unit/signing/signing2.cxx @@ -43,7 +43,7 @@ SigningTest2::SigningTest2() /// Test if a macro signature from a ODF Database is preserved when saving CPPUNIT_TEST_FIXTURE(SigningTest2, testPreserveMacroSignatureODB) { - loadFromURL(u"odb_signed_macros.odb"); + loadFromFile(u"odb_signed_macros.odb"); // save as ODB save("StarOffice XML (Base)"); |