summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/PivotChartTest.cxx10
-rw-r--r--chart2/qa/extras/uichart.cxx10
-rw-r--r--dbaccess/qa/extras/dialog-save.cxx2
-rw-r--r--dbaccess/qa/extras/empty-stdlib-save.cxx2
-rw-r--r--dbaccess/qa/extras/nolib-save.cxx2
-rw-r--r--dbaccess/qa/extras/rowsetclones.cxx2
-rw-r--r--dbaccess/qa/unit/dbtest_base.cxx4
-rw-r--r--embeddedobj/qa/cppunit/general.cxx9
-rw-r--r--embeddedobj/qa/cppunit/msole.cxx2
-rw-r--r--filter/qa/pdf.cxx20
-rw-r--r--filter/qa/unit/svg.cxx6
-rw-r--r--filter/qa/unit/textfilterdetect.cxx6
-rw-r--r--framework/qa/cppunit/dispatchtest.cxx3
-rw-r--r--include/test/unoapi_test.hxx2
-rw-r--r--sc/qa/extras/scannotationshapeobj.cxx2
-rw-r--r--sc/qa/extras/scarealinkobj.cxx2
-rw-r--r--sc/qa/extras/scarealinksobj.cxx2
-rw-r--r--sc/qa/extras/scautoformatobj.cxx2
-rw-r--r--sc/qa/extras/scautoformatsobj.cxx2
-rw-r--r--sc/qa/extras/sccellfieldsobj.cxx2
-rw-r--r--sc/qa/extras/sccellformatsenumeration.cxx2
-rw-r--r--sc/qa/extras/sccellformatsobj.cxx2
-rw-r--r--sc/qa/extras/sccellobj.cxx2
-rw-r--r--sc/qa/extras/sccellrangesobj.cxx2
-rw-r--r--sc/qa/extras/sccellsearchobj.cxx2
-rw-r--r--sc/qa/extras/sccellsenumeration.cxx2
-rw-r--r--sc/qa/extras/sccellsobj.cxx2
-rw-r--r--sc/qa/extras/scchartobj.cxx2
-rw-r--r--sc/qa/extras/scchartsobj.cxx2
-rw-r--r--sc/qa/extras/sccheck_data_pilot_field.cxx2
-rw-r--r--sc/qa/extras/sccheck_data_pilot_table.cxx2
-rw-r--r--sc/qa/extras/sccheck_xcell_ranges_query.cxx2
-rw-r--r--sc/qa/extras/scconsolidationdescriptorobj.cxx2
-rw-r--r--sc/qa/extras/scdatabaserangesobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldgroupitemobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldgroupobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldgroupsobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldsobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotitemobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotitemsobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilottablesobj.cxx2
-rw-r--r--sc/qa/extras/scddelinkobj.cxx2
-rw-r--r--sc/qa/extras/scddelinksobj.cxx2
-rw-r--r--sc/qa/extras/scdocumentconfigurationobj.cxx2
-rw-r--r--sc/qa/extras/scdrawpageobj.cxx2
-rw-r--r--sc/qa/extras/scdrawpagesobj.cxx2
-rw-r--r--sc/qa/extras/sceditfieldobj_cell.cxx2
-rw-r--r--sc/qa/extras/sceditfieldobj_header.cxx2
-rw-r--r--sc/qa/extras/scfilterdescriptorbase.cxx2
-rw-r--r--sc/qa/extras/scfunctiondescriptionobj.cxx2
-rw-r--r--sc/qa/extras/scfunctionlistobj.cxx2
-rw-r--r--sc/qa/extras/scheaderfieldsobj.cxx2
-rw-r--r--sc/qa/extras/scheaderfootercontentobj.cxx2
-rw-r--r--sc/qa/extras/scimportdescriptorbaseobj.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_cellannotationsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_cellarealinksenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_databaserangesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_datapilotfieldsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_datapilotitemsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_datapilottablesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_ddelinksenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_functiondescriptionenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_labelrangesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_namedrangesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_scenariosenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_sheetcellrangesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_sheetlinksenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_spreadsheetsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_spreadsheetviewpanesenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_tableautoformatenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_tablechartsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_tablecolumnsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_tableconditionalentryenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_tablerowsenumeration.cxx2
-rw-r--r--sc/qa/extras/scindexenumeration_textfieldenumeration.cxx2
-rw-r--r--sc/qa/extras/sclabelrangeobj.cxx2
-rw-r--r--sc/qa/extras/sclabelrangesobj.cxx2
-rw-r--r--sc/qa/extras/scpdfexport.cxx6
-rw-r--r--sc/qa/extras/screcentfunctionsobj.cxx2
-rw-r--r--sc/qa/extras/screcordchanges.cxx2
-rw-r--r--sc/qa/extras/scscenariosobj.cxx2
-rw-r--r--sc/qa/extras/scshapeobj.cxx2
-rw-r--r--sc/qa/extras/scsheetlinkobj.cxx2
-rw-r--r--sc/qa/extras/scsheetlinksobj.cxx2
-rw-r--r--sc/qa/extras/scsortdescriptorbaseobj.cxx2
-rw-r--r--sc/qa/extras/scspreadsheetsettings.cxx2
-rw-r--r--sc/qa/extras/scspreadsheetsettingsobj.cxx2
-rw-r--r--sc/qa/extras/scstylefamiliesobj.cxx2
-rw-r--r--sc/qa/extras/scstylefamilyobj.cxx2
-rw-r--r--sc/qa/extras/scstyleobj.cxx2
-rw-r--r--sc/qa/extras/scsubtotaldescriptorbase.cxx2
-rw-r--r--sc/qa/extras/scsubtotalfieldobj.cxx2
-rw-r--r--sc/qa/extras/sctablecolumnobj.cxx2
-rw-r--r--sc/qa/extras/sctablecolumnsobj.cxx2
-rw-r--r--sc/qa/extras/sctableconditionalentryobj.cxx2
-rw-r--r--sc/qa/extras/sctableconditionalformat.cxx2
-rw-r--r--sc/qa/extras/sctablerowobj.cxx2
-rw-r--r--sc/qa/extras/sctablerowsobj.cxx2
-rw-r--r--sc/qa/extras/sctablevalidationobj.cxx2
-rw-r--r--sc/qa/extras/sctabviewobj.cxx2
-rw-r--r--sc/qa/extras/scuniquecellformatsenumeration.cxx2
-rw-r--r--sc/qa/extras/scuniquecellformatsobj.cxx2
-rw-r--r--sc/qa/extras/scviewpaneobj.cxx2
-rw-r--r--sc/qa/extras/vba-macro-test.cxx18
-rw-r--r--sc/qa/unit/ThemeImportExportTest.cxx2
-rw-r--r--sc/qa/unit/anchor.cxx2
-rw-r--r--sc/qa/unit/helper/qahelper.cxx2
-rw-r--r--sd/qa/filter/eppt/eppt.cxx2
-rw-r--r--sd/qa/unit/SdrPdfImportTest.cxx2
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx4
-rw-r--r--sfx2/qa/cppunit/doc.cxx9
-rw-r--r--sfx2/qa/cppunit/test_classification.cxx6
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx7
-rw-r--r--starmath/qa/extras/mmlexport-test.cxx10
-rw-r--r--svx/qa/unit/svdraw.cxx6
-rw-r--r--svx/qa/unit/table.cxx3
-rw-r--r--svx/qa/unit/unodraw.cxx9
-rw-r--r--svx/qa/unit/xoutdev.cxx3
-rw-r--r--sw/qa/api/SwXBodyText.cxx3
-rw-r--r--sw/qa/api/SwXBookmark.cxx3
-rw-r--r--sw/qa/api/SwXBookmarks.cxx3
-rw-r--r--sw/qa/api/SwXChapterNumbering.cxx3
-rw-r--r--sw/qa/api/SwXDocumentIndex.cxx3
-rw-r--r--sw/qa/api/SwXDocumentIndexMark.cxx3
-rw-r--r--sw/qa/api/SwXDocumentIndexes.cxx3
-rw-r--r--sw/qa/api/SwXDocumentSettings.cxx3
-rw-r--r--sw/qa/api/SwXFieldEnumeration.cxx3
-rw-r--r--sw/qa/api/SwXFootnote.cxx3
-rw-r--r--sw/qa/api/SwXFootnoteProperties.cxx3
-rw-r--r--sw/qa/api/SwXFootnoteText.cxx3
-rw-r--r--sw/qa/api/SwXFootnotes.cxx3
-rw-r--r--sw/qa/api/SwXFrames.cxx3
-rw-r--r--sw/qa/api/SwXHeadFootText.cxx3
-rw-r--r--sw/qa/api/SwXNumberingRules.cxx3
-rw-r--r--sw/qa/api/SwXParagraphEnumeration.cxx3
-rw-r--r--sw/qa/api/SwXReferenceMark.cxx3
-rw-r--r--sw/qa/api/SwXReferenceMarks.cxx3
-rw-r--r--sw/qa/api/SwXStyleFamilies.cxx3
-rw-r--r--sw/qa/api/SwXTableCellText.cxx3
-rw-r--r--sw/qa/api/SwXTextEmbeddedObjects.cxx3
-rw-r--r--sw/qa/api/SwXTextField.cxx3
-rw-r--r--sw/qa/api/SwXTextFieldMasters.cxx3
-rw-r--r--sw/qa/api/SwXTextFieldTypes.cxx3
-rw-r--r--sw/qa/api/SwXTextFrame.cxx3
-rw-r--r--sw/qa/api/SwXTextSections.cxx3
-rw-r--r--sw/qa/api/SwXTextTable.cxx3
-rw-r--r--sw/qa/api/SwXTextTables.cxx3
-rw-r--r--sw/qa/core/macros-test.cxx5
-rw-r--r--sw/qa/extras/accessibility/accessible_relation_set.cxx3
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx3
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx8
-rw-r--r--sw/qa/extras/layout/layout2.cxx5
-rw-r--r--sw/qa/extras/mailmerge/mailmergetestbase.cxx5
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx5
-rw-r--r--sw/qa/extras/pdf/HybridPdfTest.cxx3
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx17
-rw-r--r--sw/qa/extras/uiwriter/uiwriter7.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter8.cxx2
-rw-r--r--sw/qa/uibase/uiview/uiview.cxx3
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx2
-rw-r--r--sw/qa/writerfilter/dmapper/DomainMapper.cxx3
-rw-r--r--sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx3
-rw-r--r--sw/qa/writerfilter/dmapper/NumberingManager.cxx3
-rw-r--r--sw/qa/writerfilter/dmapper/PropertyMap.cxx3
-rw-r--r--test/source/unoapi_test.cxx7
-rw-r--r--unoxml/qa/unit/rdftest.cxx4
-rw-r--r--vcl/qa/cppunit/filter/ipdf/ipdf.cxx3
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport2.cxx14
-rw-r--r--xmloff/qa/unit/draw.cxx6
-rw-r--r--xmloff/qa/unit/style.cxx2
-rw-r--r--xmloff/qa/unit/text.cxx34
-rw-r--r--xmloff/qa/unit/text/txtprmap.cxx2
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx26
-rw-r--r--xmlsecurity/qa/unit/signing/signing2.cxx4
-rw-r--r--xmlsecurity/qa/xmlsec/xmlsec.cxx2
176 files changed, 274 insertions, 343 deletions
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx
index 51210bc5a693..30cd8c656526 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -540,7 +540,7 @@ void PivotChartTest::testPivotChartWithOneColumnField()
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -624,7 +624,7 @@ void PivotChartTest::testPivotChartWithOneRowField()
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -684,7 +684,7 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -791,7 +791,7 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -923,7 +923,7 @@ void PivotChartTest::testPivotChartWithDateRowField()
{
// SETUP DATA and PIVOT TABLE
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx
index 78de20f09955..fe0c53a73bcf 100644
--- a/chart2/qa/extras/uichart.cxx
+++ b/chart2/qa/extras/uichart.cxx
@@ -50,7 +50,7 @@ void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocu
dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
@@ -129,7 +129,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf99969)
dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091)
dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new writer document
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
@@ -288,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf98690)
dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
@@ -519,7 +519,7 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf153706)
dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
// create a new document
- load(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
// Paste; this must create a chart with own data source having a proper copy of the data
dispatchCommand(mxComponent, u".uno:Paste"_ustr, {});
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
index 56093548914a..02a706e7d7e3 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -44,7 +44,7 @@ void DialogSaveTest::test()
{
createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 67550492c258..708ce86c9eed 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -42,7 +42,7 @@ void DialogSaveTest::test()
{
createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx
index 89dc9f036dff..2ad68714528e 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -42,7 +42,7 @@ void DialogSaveTest::test()
{
createTempCopy(u"testDialogSave.odb");
{
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
uno::Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
uno::Reference< document::XEmbeddedScripts > xDocScr(mxComponent, UNO_QUERY_THROW);
uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries());
diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx
index 053b58199a78..8ffaeea202b2 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -47,7 +47,7 @@ RowSetClones::RowSetClones()
void RowSetClones::test()
{
createTempCopy(u"RowSetClones.odb");
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW);
diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index 0208649906ad..86197b89cfb4 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -51,7 +51,7 @@ public:
};
uno::Reference<XOfficeDatabaseDocument> DBTestBase::getDocumentForUrl(OUString const & url) {
- mxComponent = loadFromDesktop(url);
+ loadFromURL(url);
uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, UNO_QUERY_THROW);
return xDocument;
}
@@ -81,7 +81,7 @@ void DBTestBase::createDBDocument(const OUString& rDriverURL)
xStorable->storeAsURL(maTempFile.GetURL(), uno::Sequence< beans::PropertyValue >());
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
CPPUNIT_ASSERT(mxComponent);
}
diff --git a/embeddedobj/qa/cppunit/general.cxx b/embeddedobj/qa/cppunit/general.cxx
index 82bd2844388c..1c681b3137a9 100644
--- a/embeddedobj/qa/cppunit/general.cxx
+++ b/embeddedobj/qa/cppunit/general.cxx
@@ -46,8 +46,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfig)
pBatchReset);
pBatchReset->commit();
});
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// Insert a file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
@@ -79,8 +78,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigVsdx)
officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::set(true, pBatchReset);
pBatchReset->commit();
});
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// Insert a file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
@@ -112,8 +110,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigPdf)
officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, pBatchReset);
pBatchReset->commit();
});
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// Insert a PDF file as an embedded object.
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
diff --git a/embeddedobj/qa/cppunit/msole.cxx b/embeddedobj/qa/cppunit/msole.cxx
index 187472b0a79a..2aacb1ad2ffd 100644
--- a/embeddedobj/qa/cppunit/msole.cxx
+++ b/embeddedobj/qa/cppunit/msole.cxx
@@ -105,7 +105,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSaveOnThread)
comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")),
comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")),
};
- mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", aLoadProperties);
+ loadWithParams(aURL, aLoadProperties);
// When saving that document on a thread:
OdtExportThread aThread(mxComponent, maTempFile.GetURL());
diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx
index 293d79a46368..1fdd75baf886 100644
--- a/filter/qa/pdf.cxx
+++ b/filter/qa/pdf.cxx
@@ -71,8 +71,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName)
}
// Given an empty document:
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting to PDF, and referring to a certificate using a subject name:
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
@@ -106,8 +105,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPdfDecompositionSize)
return;
// Given an empty Writer document:
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When inserting a 267 points wide PDF image into the document:
uno::Sequence<beans::PropertyValue> aArgs = {
@@ -189,8 +187,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermarkColor)
std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
if (!pPDFium)
return;
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting that as PDF with a red watermark:
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
@@ -234,8 +231,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermarkFontHeight)
std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
if (!pPDFium)
return;
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting that as PDF with a 100pt-sized watermark:
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
@@ -280,8 +276,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermarkFontName)
std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
if (!pPDFium)
return;
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting that as PDF with a serif watermark:
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
@@ -326,8 +321,7 @@ CPPUNIT_TEST_FIXTURE(Test, testWatermarkRotateAngle)
std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
if (!pPDFium)
return;
- mxComponent.set(
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting that as PDF with a rotated watermark:
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
@@ -405,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificatePEM)
comphelper::makePropertyValue("SignCertificateKeyPem", aKeyPem),
comphelper::makePropertyValue("aSignCertificateCaPem", aCaPem),
};
- mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+ loadFromURL(u"private:factory/swriter"_ustr);
// When exporting to PDF, and referring to a certificate using a cert/key/ca PEM, which is not
// in the NSS database:
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index f8bbe04fe92b..61372d1442f6 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -149,8 +149,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentMultiParaText)
{
// Given a shape with semi-transparent, multi-paragraph text:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.drawing.DrawingDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance(u"com.sun.star.drawing.TextShape"_ustr), uno::UNO_QUERY);
@@ -266,8 +265,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, attributeRedefinedTest)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testTab)
{
// Given a shape with "A\tB" text:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance(u"com.sun.star.drawing.TextShape"_ustr), uno::UNO_QUERY);
diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx
index 2a5af96f47de..8c13da5461fd 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testHybridPDFFile)
CPPUNIT_ASSERT_EQUAL(
osl::FileBase::E_None,
osl::File::copy(createFileURL(u"hybrid_writer.pdf"), nonAsciiName.GetURL()));
- load(nonAsciiName.GetURL());
+ loadFromURL(nonAsciiName.GetURL());
// Make sure it opens in Writer.
// Without the accompanying fix in place, this test would have failed on Windows, as it was
// opened in Draw instead.
@@ -218,7 +218,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testHybridPDFFile)
CPPUNIT_ASSERT_EQUAL(
osl::FileBase::E_None,
osl::File::copy(createFileURL(u"hybrid_calc.pdf"), nonAsciiName.GetURL()));
- load(nonAsciiName.GetURL());
+ loadFromURL(nonAsciiName.GetURL());
// Make sure it opens in Calc.
CPPUNIT_ASSERT(supportsService(mxComponent, "com.sun.star.sheet.SpreadsheetDocument"));
}
@@ -230,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testHybridPDFFile)
CPPUNIT_ASSERT_EQUAL(
osl::FileBase::E_None,
osl::File::copy(createFileURL(u"hybrid_impress.pdf"), nonAsciiName.GetURL()));
- load(nonAsciiName.GetURL());
+ loadFromURL(nonAsciiName.GetURL());
// Make sure it opens in Impress.
CPPUNIT_ASSERT(
supportsService(mxComponent, "com.sun.star.presentation.PresentationDocument"));
diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx
index a6c7ccd20a69..3e9710910970 100644
--- a/framework/qa/cppunit/dispatchtest.cxx
+++ b/framework/qa/cppunit/dispatchtest.cxx
@@ -151,8 +151,7 @@ public:
CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception)
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xModel.is());
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index a28784543c9f..f09499bf2c5a 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -35,7 +35,7 @@ public:
OUString createFileURL(std::u16string_view aFileBase);
OUString createFilePath(std::u16string_view aFileBase);
- void load(const OUString& rURL, const char* pPassword = nullptr);
+ void loadFromURL(const OUString& rURL, const char* pPassword = nullptr);
void loadWithParams(const OUString& rURL,
const css::uno::Sequence<css::beans::PropertyValue>& rParams);
OUString loadFromFile(std::u16string_view aFileBase, const char* pPassword = nullptr);
diff --git a/sc/qa/extras/scannotationshapeobj.cxx b/sc/qa/extras/scannotationshapeobj.cxx
index 2346c47b9107..bee2158e82d0 100644
--- a/sc/qa/extras/scannotationshapeobj.cxx
+++ b/sc/qa/extras/scannotationshapeobj.cxx
@@ -100,7 +100,7 @@ ScAnnotationShapeObj::ScAnnotationShapeObj()
void ScAnnotationShapeObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
void ScAnnotationShapeObj::tearDown()
diff --git a/sc/qa/extras/scarealinkobj.cxx b/sc/qa/extras/scarealinkobj.cxx
index 03e9ec37977b..d79a5f831cb1 100644
--- a/sc/qa/extras/scarealinkobj.cxx
+++ b/sc/qa/extras/scarealinkobj.cxx
@@ -92,7 +92,7 @@ uno::Reference<uno::XInterface> ScAreaLinkObj::init()
void ScAreaLinkObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScAreaLinkObj);
diff --git a/sc/qa/extras/scarealinksobj.cxx b/sc/qa/extras/scarealinksobj.cxx
index cf371347d60d..0464b0a13e46 100644
--- a/sc/qa/extras/scarealinksobj.cxx
+++ b/sc/qa/extras/scarealinksobj.cxx
@@ -86,7 +86,7 @@ uno::Reference<uno::XInterface> ScAreaLinksObj::init()
void ScAreaLinksObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScAreaLinksObj);
diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx
index d3fa6ecc008e..57f9fcb3b875 100644
--- a/sc/qa/extras/scautoformatobj.cxx
+++ b/sc/qa/extras/scautoformatobj.cxx
@@ -104,7 +104,7 @@ uno::Reference<uno::XInterface> ScAutoFormatObj::init()
void ScAutoFormatObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScAutoFormatObj);
diff --git a/sc/qa/extras/scautoformatsobj.cxx b/sc/qa/extras/scautoformatsobj.cxx
index 84fd31f397f4..d000ee4a51ab 100644
--- a/sc/qa/extras/scautoformatsobj.cxx
+++ b/sc/qa/extras/scautoformatsobj.cxx
@@ -119,7 +119,7 @@ void ScAutoFormatsObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScAutoFormatsObj);
diff --git a/sc/qa/extras/sccellfieldsobj.cxx b/sc/qa/extras/sccellfieldsobj.cxx
index 5cde219c0dd7..3eafa094ea39 100644
--- a/sc/qa/extras/sccellfieldsobj.cxx
+++ b/sc/qa/extras/sccellfieldsobj.cxx
@@ -89,7 +89,7 @@ uno::Reference<uno::XInterface> ScCellFieldsObj::init()
void ScCellFieldsObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellFieldsObj);
diff --git a/sc/qa/extras/sccellformatsenumeration.cxx b/sc/qa/extras/sccellformatsenumeration.cxx
index 9e887571e8bf..a1b6d4944c83 100644
--- a/sc/qa/extras/sccellformatsenumeration.cxx
+++ b/sc/qa/extras/sccellformatsenumeration.cxx
@@ -67,7 +67,7 @@ uno::Reference<uno::XInterface> ScCellFormatsEnumeration::init()
void ScCellFormatsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellFormatsEnumeration);
diff --git a/sc/qa/extras/sccellformatsobj.cxx b/sc/qa/extras/sccellformatsobj.cxx
index 160d63b082de..92ce9b6671c6 100644
--- a/sc/qa/extras/sccellformatsobj.cxx
+++ b/sc/qa/extras/sccellformatsobj.cxx
@@ -80,7 +80,7 @@ uno::Reference<uno::XInterface> ScCellFormatsObj::init()
void ScCellFormatsObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellFormatsObj);
diff --git a/sc/qa/extras/sccellobj.cxx b/sc/qa/extras/sccellobj.cxx
index 922acd55328d..9a0c74888508 100644
--- a/sc/qa/extras/sccellobj.cxx
+++ b/sc/qa/extras/sccellobj.cxx
@@ -129,7 +129,7 @@ uno::Reference<uno::XInterface> ScCellObj::getXSpreadsheet()
void ScCellObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellObj);
diff --git a/sc/qa/extras/sccellrangesobj.cxx b/sc/qa/extras/sccellrangesobj.cxx
index 0c32b1edc609..337796095134 100644
--- a/sc/qa/extras/sccellrangesobj.cxx
+++ b/sc/qa/extras/sccellrangesobj.cxx
@@ -134,7 +134,7 @@ void ScCellRangesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellRangesObj);
diff --git a/sc/qa/extras/sccellsearchobj.cxx b/sc/qa/extras/sccellsearchobj.cxx
index 1493a461d9a3..53ddcd3271a8 100644
--- a/sc/qa/extras/sccellsearchobj.cxx
+++ b/sc/qa/extras/sccellsearchobj.cxx
@@ -88,7 +88,7 @@ void ScCellSearchObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellSearchObj);
diff --git a/sc/qa/extras/sccellsenumeration.cxx b/sc/qa/extras/sccellsenumeration.cxx
index e3cee9bb4589..bea5a9b129a8 100644
--- a/sc/qa/extras/sccellsenumeration.cxx
+++ b/sc/qa/extras/sccellsenumeration.cxx
@@ -80,7 +80,7 @@ uno::Reference<uno::XInterface> ScCellsEnumeration::init()
void ScCellsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellsEnumeration);
diff --git a/sc/qa/extras/sccellsobj.cxx b/sc/qa/extras/sccellsobj.cxx
index be2ff14a37d9..ba00d3a5420a 100644
--- a/sc/qa/extras/sccellsobj.cxx
+++ b/sc/qa/extras/sccellsobj.cxx
@@ -87,7 +87,7 @@ uno::Reference<uno::XInterface> ScCellsObj::init()
void ScCellsObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScCellsObj);
diff --git a/sc/qa/extras/scchartobj.cxx b/sc/qa/extras/scchartobj.cxx
index 450362024b6b..9bae55ee6aef 100644
--- a/sc/qa/extras/scchartobj.cxx
+++ b/sc/qa/extras/scchartobj.cxx
@@ -169,7 +169,7 @@ void ScChartObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScChartObj);
diff --git a/sc/qa/extras/scchartsobj.cxx b/sc/qa/extras/scchartsobj.cxx
index 27f74dbeae4e..378fd325c19a 100644
--- a/sc/qa/extras/scchartsobj.cxx
+++ b/sc/qa/extras/scchartsobj.cxx
@@ -171,7 +171,7 @@ void ScChartsObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScChartsObj);
diff --git a/sc/qa/extras/sccheck_data_pilot_field.cxx b/sc/qa/extras/sccheck_data_pilot_field.cxx
index 343d702d398b..a6094a9b26e8 100644
--- a/sc/qa/extras/sccheck_data_pilot_field.cxx
+++ b/sc/qa/extras/sccheck_data_pilot_field.cxx
@@ -75,7 +75,7 @@ uno::Reference<uno::XInterface> CheckDataPilotField::init()
// create a calc document
if (!mxComponent.is())
// Load an empty document.
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
else
return mxObject;
diff --git a/sc/qa/extras/sccheck_data_pilot_table.cxx b/sc/qa/extras/sccheck_data_pilot_table.cxx
index e864de6e0d02..9a7b02000ace 100644
--- a/sc/qa/extras/sccheck_data_pilot_table.cxx
+++ b/sc/qa/extras/sccheck_data_pilot_table.cxx
@@ -79,7 +79,7 @@ uno::Reference<uno::XInterface> CheckDataPilotTable::init()
// create a calc document
if (!mxComponent.is())
// Load an empty document.
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
else
return mxObject;
diff --git a/sc/qa/extras/sccheck_xcell_ranges_query.cxx b/sc/qa/extras/sccheck_xcell_ranges_query.cxx
index 82b4d5555e45..03079bf5f999 100644
--- a/sc/qa/extras/sccheck_xcell_ranges_query.cxx
+++ b/sc/qa/extras/sccheck_xcell_ranges_query.cxx
@@ -55,7 +55,7 @@ uno::Reference<uno::XInterface> CheckXCellRangesQuery::init()
// create a calc document
if (!mxComponent.is())
// Load an empty document.
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scconsolidationdescriptorobj.cxx b/sc/qa/extras/scconsolidationdescriptorobj.cxx
index 96bd1e45bff7..99a008d2698d 100644
--- a/sc/qa/extras/scconsolidationdescriptorobj.cxx
+++ b/sc/qa/extras/scconsolidationdescriptorobj.cxx
@@ -66,7 +66,7 @@ void ScConsolidationDescriptorObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScConsolidationDescriptorObj);
diff --git a/sc/qa/extras/scdatabaserangesobj.cxx b/sc/qa/extras/scdatabaserangesobj.cxx
index bd7953fb3c42..ae0df82889ed 100644
--- a/sc/qa/extras/scdatabaserangesobj.cxx
+++ b/sc/qa/extras/scdatabaserangesobj.cxx
@@ -102,7 +102,7 @@ void ScDatabaseRangesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDatabaseRangesObj);
diff --git a/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx b/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx
index 8ad6b575696f..c461d6e7b563 100644
--- a/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx
@@ -174,7 +174,7 @@ void ScDataPilotFieldGroupItemObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldGroupItemObj);
diff --git a/sc/qa/extras/scdatapilotfieldgroupobj.cxx b/sc/qa/extras/scdatapilotfieldgroupobj.cxx
index 78282f2717b1..e80da20f14a3 100644
--- a/sc/qa/extras/scdatapilotfieldgroupobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldgroupobj.cxx
@@ -198,7 +198,7 @@ void ScDataPilotFieldGroupObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldGroupObj);
diff --git a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
index b068f3a1c5ea..d221ab9fd3ee 100644
--- a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx
@@ -204,7 +204,7 @@ void ScDataPilotFieldGroupsObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldGroupsObj);
diff --git a/sc/qa/extras/scdatapilotfieldsobj.cxx b/sc/qa/extras/scdatapilotfieldsobj.cxx
index f473f0344dd4..80eafb625914 100644
--- a/sc/qa/extras/scdatapilotfieldsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldsobj.cxx
@@ -116,7 +116,7 @@ void ScDataPilotFieldsObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotFieldsObj);
diff --git a/sc/qa/extras/scdatapilotitemobj.cxx b/sc/qa/extras/scdatapilotitemobj.cxx
index b0bda678f4b6..c8ed93f3ff02 100644
--- a/sc/qa/extras/scdatapilotitemobj.cxx
+++ b/sc/qa/extras/scdatapilotitemobj.cxx
@@ -118,7 +118,7 @@ void ScDataPilotItemObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotItemObj);
diff --git a/sc/qa/extras/scdatapilotitemsobj.cxx b/sc/qa/extras/scdatapilotitemsobj.cxx
index ad0f81a93597..419e33f0da60 100644
--- a/sc/qa/extras/scdatapilotitemsobj.cxx
+++ b/sc/qa/extras/scdatapilotitemsobj.cxx
@@ -144,7 +144,7 @@ void ScDataPilotItemsObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotItemsObj);
diff --git a/sc/qa/extras/scdatapilottablesobj.cxx b/sc/qa/extras/scdatapilottablesobj.cxx
index 725e98dc3b1d..79c662e3613d 100644
--- a/sc/qa/extras/scdatapilottablesobj.cxx
+++ b/sc/qa/extras/scdatapilottablesobj.cxx
@@ -129,7 +129,7 @@ void ScDataPilotTablesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDataPilotTablesObj);
diff --git a/sc/qa/extras/scddelinkobj.cxx b/sc/qa/extras/scddelinkobj.cxx
index 5ee38298638e..3132e3ba8efd 100644
--- a/sc/qa/extras/scddelinkobj.cxx
+++ b/sc/qa/extras/scddelinkobj.cxx
@@ -95,7 +95,7 @@ void ScDDELinkObj::setUp()
Application::SetAppName(u"soffice"_ustr); // Enable DDE
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
createTempCopy(u"ScDDELinksObj.ods");
}
diff --git a/sc/qa/extras/scddelinksobj.cxx b/sc/qa/extras/scddelinksobj.cxx
index 7b6d25e39da7..b57ecc2dacf5 100644
--- a/sc/qa/extras/scddelinksobj.cxx
+++ b/sc/qa/extras/scddelinksobj.cxx
@@ -117,7 +117,7 @@ void ScDDELinksObj::setUp()
Application::SetAppName(u"soffice"_ustr); // Enable DDE
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDDELinksObj);
diff --git a/sc/qa/extras/scdocumentconfigurationobj.cxx b/sc/qa/extras/scdocumentconfigurationobj.cxx
index 136b6c05bceb..8161daee6e86 100644
--- a/sc/qa/extras/scdocumentconfigurationobj.cxx
+++ b/sc/qa/extras/scdocumentconfigurationobj.cxx
@@ -55,7 +55,7 @@ void ScDocumentConfigurationObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDocumentConfigurationObj);
diff --git a/sc/qa/extras/scdrawpageobj.cxx b/sc/qa/extras/scdrawpageobj.cxx
index 95345434cff5..dedc726e9007 100644
--- a/sc/qa/extras/scdrawpageobj.cxx
+++ b/sc/qa/extras/scdrawpageobj.cxx
@@ -107,7 +107,7 @@ void ScDrawPageObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDrawPageObj);
diff --git a/sc/qa/extras/scdrawpagesobj.cxx b/sc/qa/extras/scdrawpagesobj.cxx
index 009372140492..6119bf2b08c8 100644
--- a/sc/qa/extras/scdrawpagesobj.cxx
+++ b/sc/qa/extras/scdrawpagesobj.cxx
@@ -87,7 +87,7 @@ void ScDrawPagesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScDrawPagesObj);
diff --git a/sc/qa/extras/sceditfieldobj_cell.cxx b/sc/qa/extras/sceditfieldobj_cell.cxx
index da7f66a701d3..4c13bdc4db8d 100644
--- a/sc/qa/extras/sceditfieldobj_cell.cxx
+++ b/sc/qa/extras/sceditfieldobj_cell.cxx
@@ -101,7 +101,7 @@ void ScEditFieldObj_Cell::setUp()
{
UnoApiTest::setUp();
// Load an empty document.
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
void ScEditFieldObj_Cell::tearDown()
diff --git a/sc/qa/extras/sceditfieldobj_header.cxx b/sc/qa/extras/sceditfieldobj_header.cxx
index 4e60441134ab..6d744f236e56 100644
--- a/sc/qa/extras/sceditfieldobj_header.cxx
+++ b/sc/qa/extras/sceditfieldobj_header.cxx
@@ -98,7 +98,7 @@ void ScEditFieldObj_Header::setUp()
{
UnoApiTest::setUp();
// Load an empty document.
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
void ScEditFieldObj_Header::tearDown()
diff --git a/sc/qa/extras/scfilterdescriptorbase.cxx b/sc/qa/extras/scfilterdescriptorbase.cxx
index 47d3d46e9dfb..a86d1f9d95c1 100644
--- a/sc/qa/extras/scfilterdescriptorbase.cxx
+++ b/sc/qa/extras/scfilterdescriptorbase.cxx
@@ -99,7 +99,7 @@ void ScFilterDescriptorBase::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScFilterDescriptorBase);
diff --git a/sc/qa/extras/scfunctiondescriptionobj.cxx b/sc/qa/extras/scfunctiondescriptionobj.cxx
index 47777320cd0a..b58aaee1bb06 100644
--- a/sc/qa/extras/scfunctiondescriptionobj.cxx
+++ b/sc/qa/extras/scfunctiondescriptionobj.cxx
@@ -67,7 +67,7 @@ void ScFunctionDescriptionObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScFunctionDescriptionObj);
diff --git a/sc/qa/extras/scfunctionlistobj.cxx b/sc/qa/extras/scfunctionlistobj.cxx
index f5260744a220..43ffd0dada67 100644
--- a/sc/qa/extras/scfunctionlistobj.cxx
+++ b/sc/qa/extras/scfunctionlistobj.cxx
@@ -95,7 +95,7 @@ void ScFunctionListObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScFunctionListObj);
diff --git a/sc/qa/extras/scheaderfieldsobj.cxx b/sc/qa/extras/scheaderfieldsobj.cxx
index fa9f1c936d96..afbaf826136a 100644
--- a/sc/qa/extras/scheaderfieldsobj.cxx
+++ b/sc/qa/extras/scheaderfieldsobj.cxx
@@ -101,7 +101,7 @@ void ScHeaderFieldsObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
void ScHeaderFieldsObj::tearDown()
diff --git a/sc/qa/extras/scheaderfootercontentobj.cxx b/sc/qa/extras/scheaderfootercontentobj.cxx
index 908a68e29e9c..d70cebb43054 100644
--- a/sc/qa/extras/scheaderfootercontentobj.cxx
+++ b/sc/qa/extras/scheaderfootercontentobj.cxx
@@ -81,7 +81,7 @@ void ScHeaderFooterContentObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScHeaderFooterContentObj);
diff --git a/sc/qa/extras/scimportdescriptorbaseobj.cxx b/sc/qa/extras/scimportdescriptorbaseobj.cxx
index 43a22f2396d1..4abf5c5fe628 100644
--- a/sc/qa/extras/scimportdescriptorbaseobj.cxx
+++ b/sc/qa/extras/scimportdescriptorbaseobj.cxx
@@ -75,7 +75,7 @@ void ScImportDescriptorBaseObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScImportDescriptorBaseObj);
diff --git a/sc/qa/extras/scindexenumeration_cellannotationsenumeration.cxx b/sc/qa/extras/scindexenumeration_cellannotationsenumeration.cxx
index c479e03e1e5e..5f12835d667b 100644
--- a/sc/qa/extras/scindexenumeration_cellannotationsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_cellannotationsenumeration.cxx
@@ -73,7 +73,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_CellAnnotationsEnumeration::i
void ScIndexEnumeration_CellAnnotationsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_CellAnnotationsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_cellarealinksenumeration.cxx b/sc/qa/extras/scindexenumeration_cellarealinksenumeration.cxx
index a11a77efd87d..a5775d28d353 100644
--- a/sc/qa/extras/scindexenumeration_cellarealinksenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_cellarealinksenumeration.cxx
@@ -66,7 +66,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_CellAreaLinksEnumeration::ini
void ScIndexEnumeration_CellAreaLinksEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_CellAreaLinksEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_databaserangesenumeration.cxx b/sc/qa/extras/scindexenumeration_databaserangesenumeration.cxx
index 0281e83b0ad1..9b18ecd75392 100644
--- a/sc/qa/extras/scindexenumeration_databaserangesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_databaserangesenumeration.cxx
@@ -64,7 +64,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DatabaseRangesEnumeration::in
void ScIndexEnumeration_DatabaseRangesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_DatabaseRangesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_datapilotfieldsenumeration.cxx b/sc/qa/extras/scindexenumeration_datapilotfieldsenumeration.cxx
index f07179cc0cfa..3b9fb09c6a90 100644
--- a/sc/qa/extras/scindexenumeration_datapilotfieldsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_datapilotfieldsenumeration.cxx
@@ -87,7 +87,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotFieldsEnumeration::i
void ScIndexEnumeration_DataPilotFieldsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_DataPilotFieldsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_datapilotitemsenumeration.cxx b/sc/qa/extras/scindexenumeration_datapilotitemsenumeration.cxx
index a7ec46bc828c..b6b6b387fc6d 100644
--- a/sc/qa/extras/scindexenumeration_datapilotitemsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_datapilotitemsenumeration.cxx
@@ -120,7 +120,7 @@ void ScIndexEnumeration_DataPilotItemsEnumeration::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_DataPilotItemsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_datapilottablesenumeration.cxx b/sc/qa/extras/scindexenumeration_datapilottablesenumeration.cxx
index 021a58c9f2e7..3dc3199ad256 100644
--- a/sc/qa/extras/scindexenumeration_datapilottablesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_datapilottablesenumeration.cxx
@@ -86,7 +86,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DataPilotTablesEnumeration::i
void ScIndexEnumeration_DataPilotTablesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_DataPilotTablesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_ddelinksenumeration.cxx b/sc/qa/extras/scindexenumeration_ddelinksenumeration.cxx
index 90aad1959f96..ae42513aaff0 100644
--- a/sc/qa/extras/scindexenumeration_ddelinksenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_ddelinksenumeration.cxx
@@ -75,7 +75,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_DDELinksEnumeration::init()
void ScIndexEnumeration_DDELinksEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_DDELinksEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_functiondescriptionenumeration.cxx b/sc/qa/extras/scindexenumeration_functiondescriptionenumeration.cxx
index f6049742d803..ee3cb8d21065 100644
--- a/sc/qa/extras/scindexenumeration_functiondescriptionenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_functiondescriptionenumeration.cxx
@@ -62,7 +62,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_FunctionDescriptionEnumeratio
void ScIndexEnumeration_FunctionDescriptionEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_FunctionDescriptionEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_labelrangesenumeration.cxx b/sc/qa/extras/scindexenumeration_labelrangesenumeration.cxx
index d38234251aab..223ef3db0f29 100644
--- a/sc/qa/extras/scindexenumeration_labelrangesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_labelrangesenumeration.cxx
@@ -66,7 +66,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_LabelRangesEnumeration::init(
void ScIndexEnumeration_LabelRangesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_LabelRangesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_namedrangesenumeration.cxx b/sc/qa/extras/scindexenumeration_namedrangesenumeration.cxx
index 18257e74810e..d072bbdb0adf 100644
--- a/sc/qa/extras/scindexenumeration_namedrangesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_namedrangesenumeration.cxx
@@ -71,7 +71,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_NamedRangesEnumeration::init(
void ScIndexEnumeration_NamedRangesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_NamedRangesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_scenariosenumeration.cxx b/sc/qa/extras/scindexenumeration_scenariosenumeration.cxx
index 487d903b7783..e22ef5333150 100644
--- a/sc/qa/extras/scindexenumeration_scenariosenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_scenariosenumeration.cxx
@@ -80,7 +80,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_ScenariosEnumeration::init()
void ScIndexEnumeration_ScenariosEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_ScenariosEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_sheetcellrangesenumeration.cxx b/sc/qa/extras/scindexenumeration_sheetcellrangesenumeration.cxx
index dccef6edca68..9e799d032574 100644
--- a/sc/qa/extras/scindexenumeration_sheetcellrangesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_sheetcellrangesenumeration.cxx
@@ -98,7 +98,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SheetCellRangesEnumeration::i
void ScIndexEnumeration_SheetCellRangesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_SheetCellRangesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_sheetlinksenumeration.cxx b/sc/qa/extras/scindexenumeration_sheetlinksenumeration.cxx
index c87e7d1c8be4..e39ca0bc4c01 100644
--- a/sc/qa/extras/scindexenumeration_sheetlinksenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_sheetlinksenumeration.cxx
@@ -76,7 +76,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SheetLinksEnumeration::init()
void ScIndexEnumeration_SheetLinksEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_SheetLinksEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_spreadsheetsenumeration.cxx b/sc/qa/extras/scindexenumeration_spreadsheetsenumeration.cxx
index b14172f1f465..d85d0e190a83 100644
--- a/sc/qa/extras/scindexenumeration_spreadsheetsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_spreadsheetsenumeration.cxx
@@ -58,7 +58,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SpreadsheetsEnumeration::init
void ScIndexEnumeration_SpreadsheetsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_SpreadsheetsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_spreadsheetviewpanesenumeration.cxx b/sc/qa/extras/scindexenumeration_spreadsheetviewpanesenumeration.cxx
index 27a9bdd4e115..b89f477d575b 100644
--- a/sc/qa/extras/scindexenumeration_spreadsheetviewpanesenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_spreadsheetviewpanesenumeration.cxx
@@ -67,7 +67,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SpreadsheetViewPanesEnumerati
void ScIndexEnumeration_SpreadsheetViewPanesEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_SpreadsheetViewPanesEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx b/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx
index de19501a727d..e44399384df0 100644
--- a/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx
@@ -74,7 +74,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SubTotalFieldsEnumeration::in
void ScIndexEnumeration_SubTotalFieldsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_SubTotalFieldsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_tableautoformatenumeration.cxx b/sc/qa/extras/scindexenumeration_tableautoformatenumeration.cxx
index f4e641ada011..2253a7172962 100644
--- a/sc/qa/extras/scindexenumeration_tableautoformatenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_tableautoformatenumeration.cxx
@@ -60,7 +60,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TableAutoFormatEnumeration::i
void ScIndexEnumeration_TableAutoFormatEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TableAutoFormatEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_tablechartsenumeration.cxx b/sc/qa/extras/scindexenumeration_tablechartsenumeration.cxx
index 15b6d1b8abc8..2e6ab305db5c 100644
--- a/sc/qa/extras/scindexenumeration_tablechartsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_tablechartsenumeration.cxx
@@ -138,7 +138,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TableChartsEnumeration::init(
void ScIndexEnumeration_TableChartsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TableChartsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_tablecolumnsenumeration.cxx b/sc/qa/extras/scindexenumeration_tablecolumnsenumeration.cxx
index 3f91b411f148..7b8c8914ee06 100644
--- a/sc/qa/extras/scindexenumeration_tablecolumnsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_tablecolumnsenumeration.cxx
@@ -69,7 +69,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TableColumnsEnumeration::init
void ScIndexEnumeration_TableColumnsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TableColumnsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_tableconditionalentryenumeration.cxx b/sc/qa/extras/scindexenumeration_tableconditionalentryenumeration.cxx
index 2d32aee2a4da..606b4fa015e3 100644
--- a/sc/qa/extras/scindexenumeration_tableconditionalentryenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_tableconditionalentryenumeration.cxx
@@ -95,7 +95,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TableConditionalEntryEnumerat
void ScIndexEnumeration_TableConditionalEntryEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TableConditionalEntryEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_tablerowsenumeration.cxx b/sc/qa/extras/scindexenumeration_tablerowsenumeration.cxx
index 4411604f2d85..702d59bc98c8 100644
--- a/sc/qa/extras/scindexenumeration_tablerowsenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_tablerowsenumeration.cxx
@@ -73,7 +73,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TableRowsEnumeration::init()
void ScIndexEnumeration_TableRowsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TableRowsEnumeration);
diff --git a/sc/qa/extras/scindexenumeration_textfieldenumeration.cxx b/sc/qa/extras/scindexenumeration_textfieldenumeration.cxx
index 1011b9433046..1ae8033be217 100644
--- a/sc/qa/extras/scindexenumeration_textfieldenumeration.cxx
+++ b/sc/qa/extras/scindexenumeration_textfieldenumeration.cxx
@@ -78,7 +78,7 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_TextFieldEnumeration::init()
void ScIndexEnumeration_TextFieldEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScIndexEnumeration_TextFieldEnumeration);
diff --git a/sc/qa/extras/sclabelrangeobj.cxx b/sc/qa/extras/sclabelrangeobj.cxx
index 5a540fbeaddc..76d8b38c40d3 100644
--- a/sc/qa/extras/sclabelrangeobj.cxx
+++ b/sc/qa/extras/sclabelrangeobj.cxx
@@ -68,7 +68,7 @@ void ScLabelRangeObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScLabelRangeObj);
diff --git a/sc/qa/extras/sclabelrangesobj.cxx b/sc/qa/extras/sclabelrangesobj.cxx
index b17af2e324ad..616204db51de 100644
--- a/sc/qa/extras/sclabelrangesobj.cxx
+++ b/sc/qa/extras/sclabelrangesobj.cxx
@@ -88,7 +88,7 @@ void ScLabelRangesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScLabelRangesObj);
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
index ec763d59b289..a0037a36341e 100644
--- a/sc/qa/extras/scpdfexport.cxx
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -259,7 +259,7 @@ void ScPDFExportTest::testPopupRectangleSize_Tdf162955()
void ScPDFExportTest::testExportRange_Tdf120161()
{
// create test document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_SET_THROW);
@@ -319,7 +319,7 @@ void ScPDFExportTest::testExportRange_Tdf120161()
void ScPDFExportTest::testExportFitToPage_Tdf103516()
{
// create test document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_SET_THROW);
@@ -775,7 +775,7 @@ void ScPDFExportTest::testTdf120190()
return;
}
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/sc/qa/extras/screcentfunctionsobj.cxx b/sc/qa/extras/screcentfunctionsobj.cxx
index 0cb20b1be0d4..290f400529d0 100644
--- a/sc/qa/extras/screcentfunctionsobj.cxx
+++ b/sc/qa/extras/screcentfunctionsobj.cxx
@@ -56,7 +56,7 @@ void ScRecentFunctionsObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScRecentFunctionsObj);
diff --git a/sc/qa/extras/screcordchanges.cxx b/sc/qa/extras/screcordchanges.cxx
index 6dadf2215866..683265798198 100644
--- a/sc/qa/extras/screcordchanges.cxx
+++ b/sc/qa/extras/screcordchanges.cxx
@@ -35,7 +35,7 @@ public:
void ScRecordChangesTest::testSetRecordChanges()
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xDocSettingsPropSet(xDoc, UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scscenariosobj.cxx b/sc/qa/extras/scscenariosobj.cxx
index b0befc49a0b3..ac9da8d0b529 100644
--- a/sc/qa/extras/scscenariosobj.cxx
+++ b/sc/qa/extras/scscenariosobj.cxx
@@ -115,7 +115,7 @@ void ScScenariosObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScScenariosObj);
diff --git a/sc/qa/extras/scshapeobj.cxx b/sc/qa/extras/scshapeobj.cxx
index 0b02aae22468..d9a5d9e48159 100644
--- a/sc/qa/extras/scshapeobj.cxx
+++ b/sc/qa/extras/scshapeobj.cxx
@@ -112,7 +112,7 @@ void ScShapeObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScShapeObj);
diff --git a/sc/qa/extras/scsheetlinkobj.cxx b/sc/qa/extras/scsheetlinkobj.cxx
index 1a8139d3d4df..1606ab462aae 100644
--- a/sc/qa/extras/scsheetlinkobj.cxx
+++ b/sc/qa/extras/scsheetlinkobj.cxx
@@ -88,7 +88,7 @@ void ScSheetLinkObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSheetLinkObj);
diff --git a/sc/qa/extras/scsheetlinksobj.cxx b/sc/qa/extras/scsheetlinksobj.cxx
index 4490a2051762..4964e2a7a6ee 100644
--- a/sc/qa/extras/scsheetlinksobj.cxx
+++ b/sc/qa/extras/scsheetlinksobj.cxx
@@ -101,7 +101,7 @@ void ScSheetLinksObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSheetLinksObj);
diff --git a/sc/qa/extras/scsortdescriptorbaseobj.cxx b/sc/qa/extras/scsortdescriptorbaseobj.cxx
index 3e39468027ec..65216bb840fe 100644
--- a/sc/qa/extras/scsortdescriptorbaseobj.cxx
+++ b/sc/qa/extras/scsortdescriptorbaseobj.cxx
@@ -61,7 +61,7 @@ void ScSortDescriptorBaseObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSortDescriptorBaseObj);
diff --git a/sc/qa/extras/scspreadsheetsettings.cxx b/sc/qa/extras/scspreadsheetsettings.cxx
index f8e950d8a122..3b5c52d85362 100644
--- a/sc/qa/extras/scspreadsheetsettings.cxx
+++ b/sc/qa/extras/scspreadsheetsettings.cxx
@@ -74,7 +74,7 @@ void ScSpreadsheetSettings::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettings);
diff --git a/sc/qa/extras/scspreadsheetsettingsobj.cxx b/sc/qa/extras/scspreadsheetsettingsobj.cxx
index 611d44927f55..64712bc58a44 100644
--- a/sc/qa/extras/scspreadsheetsettingsobj.cxx
+++ b/sc/qa/extras/scspreadsheetsettingsobj.cxx
@@ -65,7 +65,7 @@ void ScSpreadsheetSettingsObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSpreadsheetSettingsObj);
diff --git a/sc/qa/extras/scstylefamiliesobj.cxx b/sc/qa/extras/scstylefamiliesobj.cxx
index c5955c5a64a8..9c2634949538 100644
--- a/sc/qa/extras/scstylefamiliesobj.cxx
+++ b/sc/qa/extras/scstylefamiliesobj.cxx
@@ -118,7 +118,7 @@ void ScStyleFamiliesObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
m_xSrcComponent = loadFromDesktop(getTestURL());
}
diff --git a/sc/qa/extras/scstylefamilyobj.cxx b/sc/qa/extras/scstylefamilyobj.cxx
index c6d1ff1a300c..fce3eb6a619e 100644
--- a/sc/qa/extras/scstylefamilyobj.cxx
+++ b/sc/qa/extras/scstylefamilyobj.cxx
@@ -121,7 +121,7 @@ void ScStyleFamilyObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScStyleFamilyObj);
diff --git a/sc/qa/extras/scstyleobj.cxx b/sc/qa/extras/scstyleobj.cxx
index 7ba9721a9ba2..b8a220126673 100644
--- a/sc/qa/extras/scstyleobj.cxx
+++ b/sc/qa/extras/scstyleobj.cxx
@@ -126,7 +126,7 @@ void ScStyleObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScStyleObj);
diff --git a/sc/qa/extras/scsubtotaldescriptorbase.cxx b/sc/qa/extras/scsubtotaldescriptorbase.cxx
index 70a3f7949225..b888e5241f8a 100644
--- a/sc/qa/extras/scsubtotaldescriptorbase.cxx
+++ b/sc/qa/extras/scsubtotaldescriptorbase.cxx
@@ -113,7 +113,7 @@ void ScSubTotalDescriptorBase::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSubTotalDescriptorBase);
diff --git a/sc/qa/extras/scsubtotalfieldobj.cxx b/sc/qa/extras/scsubtotalfieldobj.cxx
index 98c2e25e7eae..15e907cc7b6f 100644
--- a/sc/qa/extras/scsubtotalfieldobj.cxx
+++ b/sc/qa/extras/scsubtotalfieldobj.cxx
@@ -76,7 +76,7 @@ void ScSubTotalFieldObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScSubTotalFieldObj);
diff --git a/sc/qa/extras/sctablecolumnobj.cxx b/sc/qa/extras/sctablecolumnobj.cxx
index f82a205571ff..c68f3fa6fd6e 100644
--- a/sc/qa/extras/sctablecolumnobj.cxx
+++ b/sc/qa/extras/sctablecolumnobj.cxx
@@ -138,7 +138,7 @@ void ScTableColumnObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableColumnObj);
diff --git a/sc/qa/extras/sctablecolumnsobj.cxx b/sc/qa/extras/sctablecolumnsobj.cxx
index 7a1f5beca8f9..8dcf7a0cf4bf 100644
--- a/sc/qa/extras/sctablecolumnsobj.cxx
+++ b/sc/qa/extras/sctablecolumnsobj.cxx
@@ -126,7 +126,7 @@ void ScTableColumnsObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableColumnsObj);
diff --git a/sc/qa/extras/sctableconditionalentryobj.cxx b/sc/qa/extras/sctableconditionalentryobj.cxx
index 87890fbfc0cc..e8e540565ea7 100644
--- a/sc/qa/extras/sctableconditionalentryobj.cxx
+++ b/sc/qa/extras/sctableconditionalentryobj.cxx
@@ -98,7 +98,7 @@ void ScTableConditionalEntryObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableConditionalEntryObj);
diff --git a/sc/qa/extras/sctableconditionalformat.cxx b/sc/qa/extras/sctableconditionalformat.cxx
index cca582242d6d..34ee81dbdd64 100644
--- a/sc/qa/extras/sctableconditionalformat.cxx
+++ b/sc/qa/extras/sctableconditionalformat.cxx
@@ -135,7 +135,7 @@ void ScTableConditionalFormat::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableConditionalFormat);
diff --git a/sc/qa/extras/sctablerowobj.cxx b/sc/qa/extras/sctablerowobj.cxx
index 5cb76f631708..2a57224c9eec 100644
--- a/sc/qa/extras/sctablerowobj.cxx
+++ b/sc/qa/extras/sctablerowobj.cxx
@@ -127,7 +127,7 @@ void ScTableRowObj::setUp()
{
UnoApiTest::setUp();
// create calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableRowObj);
diff --git a/sc/qa/extras/sctablerowsobj.cxx b/sc/qa/extras/sctablerowsobj.cxx
index 57fb39f3944c..ffc9766f7ae0 100644
--- a/sc/qa/extras/sctablerowsobj.cxx
+++ b/sc/qa/extras/sctablerowsobj.cxx
@@ -114,7 +114,7 @@ uno::Reference<uno::XInterface> ScTableRowsObj::getXCellRange()
void ScTableRowsObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableRowsObj);
diff --git a/sc/qa/extras/sctablevalidationobj.cxx b/sc/qa/extras/sctablevalidationobj.cxx
index 14cb1ee60832..ab1de153f275 100644
--- a/sc/qa/extras/sctablevalidationobj.cxx
+++ b/sc/qa/extras/sctablevalidationobj.cxx
@@ -101,7 +101,7 @@ void ScTableValidationObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableValidationObj);
diff --git a/sc/qa/extras/sctabviewobj.cxx b/sc/qa/extras/sctabviewobj.cxx
index a7f3c5cb2879..c9b8e4c7986a 100644
--- a/sc/qa/extras/sctabviewobj.cxx
+++ b/sc/qa/extras/sctabviewobj.cxx
@@ -120,7 +120,7 @@ uno::Reference<uno::XInterface> ScTabViewObj::getXSpreadsheet(const sal_Int16 nN
void ScTabViewObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTabViewObj);
diff --git a/sc/qa/extras/scuniquecellformatsenumeration.cxx b/sc/qa/extras/scuniquecellformatsenumeration.cxx
index 241f68d3bd6c..5cce6c5222f4 100644
--- a/sc/qa/extras/scuniquecellformatsenumeration.cxx
+++ b/sc/qa/extras/scuniquecellformatsenumeration.cxx
@@ -100,7 +100,7 @@ uno::Reference<uno::XInterface> ScUniqueCellFormatsEnumeration::init()
void ScUniqueCellFormatsEnumeration::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
void ScUniqueCellFormatsEnumeration::changeColor(const uno::Reference<sheet::XSpreadsheet>& xSheet,
diff --git a/sc/qa/extras/scuniquecellformatsobj.cxx b/sc/qa/extras/scuniquecellformatsobj.cxx
index fdb47f751ce5..3486968e366d 100644
--- a/sc/qa/extras/scuniquecellformatsobj.cxx
+++ b/sc/qa/extras/scuniquecellformatsobj.cxx
@@ -79,7 +79,7 @@ uno::Reference<uno::XInterface> ScUniqueCellFormatsObj::init()
void ScUniqueCellFormatsObj::setUp()
{
UnoApiTest::setUp();
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScUniqueCellFormatsObj);
diff --git a/sc/qa/extras/scviewpaneobj.cxx b/sc/qa/extras/scviewpaneobj.cxx
index c1d062d9a5b6..09fea1844d2b 100644
--- a/sc/qa/extras/scviewpaneobj.cxx
+++ b/sc/qa/extras/scviewpaneobj.cxx
@@ -117,7 +117,7 @@ void ScViewPaneObj::setUp()
{
UnoApiTest::setUp();
// create a calc document
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScViewPaneObj);
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx
index d6816dc72ac1..4dc1f0fe93c4 100644
--- a/sc/qa/extras/vba-macro-test.cxx
+++ b/sc/qa/extras/vba-macro-test.cxx
@@ -445,7 +445,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVba)
CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf149579)
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
css::uno::Reference<css::document::XEmbeddedScripts> xDocScr(mxComponent, uno::UNO_QUERY_THROW);
auto xLibs = xDocScr->getBasicLibraries();
@@ -478,7 +478,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf149579)
CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVbaRangeSort)
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
css::uno::Reference<css::document::XEmbeddedScripts> xDocScr(mxComponent, uno::UNO_QUERY_THROW);
auto xLibs = xDocScr->getBasicLibraries();
@@ -688,10 +688,10 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf118247)
CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf126457)
{
- auto xComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
// Save a copy of the file to get its URL
- uno::Reference<frame::XStorable> xDocStorable(xComponent, uno::UNO_QUERY);
+ uno::Reference<frame::XStorable> xDocStorable(mxComponent, uno::UNO_QUERY);
utl::TempFileNamed aTempFile(u"testWindowsActivate", true, u".ods");
aTempFile.EnableKillingFile();
uno::Sequence<beans::PropertyValue> descSaveAs(
@@ -699,7 +699,7 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf126457)
xDocStorable->storeAsURL(aTempFile.GetURL(), descSaveAs);
// Insert initial library
- css::uno::Reference<css::document::XEmbeddedScripts> xDocScr(xComponent, uno::UNO_QUERY_THROW);
+ css::uno::Reference<css::document::XEmbeddedScripts> xDocScr(mxComponent, uno::UNO_QUERY_THROW);
auto xLibs = xDocScr->getBasicLibraries();
auto xLibrary = xLibs->createLibrary(u"TestLibrary"_ustr);
xLibrary->insertByName(
@@ -729,12 +729,12 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf126457)
uno::Sequence<sal_Int16> aOutParamIndex;
uno::Sequence<uno::Any> aOutParam;
- SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
+ SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
ScDocShell* pDocSh = static_cast<ScDocShell*>(pFoundShell);
CPPUNIT_ASSERT(pDocSh);
ErrCode result
- = SfxObjectShell::CallXScript(xComponent,
+ = SfxObjectShell::CallXScript(mxComponent,
u"vnd.sun.Star.script:TestLibrary.TestModule."
"TestWindowsActivate?language=Basic&location=document"_ustr,
{}, aRet, aOutParamIndex, aOutParam);
@@ -744,13 +744,11 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf126457)
sal_Int16 nReturnValue;
aRet >>= nReturnValue;
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nReturnValue);
-
- pDocSh->DoClose();
}
CPPUNIT_TEST_FIXTURE(VBAMacroTest, testVbaPDFExport)
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
// Save a copy of the file to get its URL
uno::Reference<frame::XStorable> xDocStorable(mxComponent, uno::UNO_QUERY);
diff --git a/sc/qa/unit/ThemeImportExportTest.cxx b/sc/qa/unit/ThemeImportExportTest.cxx
index db1069bceea0..f2c7e8b0639a 100644
--- a/sc/qa/unit/ThemeImportExportTest.cxx
+++ b/sc/qa/unit/ThemeImportExportTest.cxx
@@ -34,7 +34,7 @@ public:
CPPUNIT_TEST_FIXTURE(ThemeImportExportTest, testThemeExportAndImport)
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
{
uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/sc/qa/unit/anchor.cxx b/sc/qa/unit/anchor.cxx
index d5f5975f5e45..6c4cf87a3921 100644
--- a/sc/qa/unit/anchor.cxx
+++ b/sc/qa/unit/anchor.cxx
@@ -159,7 +159,7 @@ void ScAnchorTest::testUndoAnchor()
void ScAnchorTest::testTdf76183()
{
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
ScDocShell* pDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
ScDocument& rDoc = pDocSh->GetDocument();
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index bde09d28b14a..b24072714cb5 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -572,7 +572,7 @@ void ScUcalcTestBase::tearDown()
void ScModelTestBase::createScDoc(const char* pName, const char* pPassword, bool bCheckWarningError)
{
if (!pName)
- load(u"private:factory/scalc"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
else
loadFromFile(OUString::createFromAscii(pName), pPassword);
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx
index ef84dfc46cb1..0d3c554e4b76 100644
--- a/sd/qa/filter/eppt/eppt.cxx
+++ b/sd/qa/filter/eppt/eppt.cxx
@@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
{
// Given a document with a master slide and a theme, lt1 is set to 0x000002:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
{
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx
index b6ee1b41c3d8..da4298d5fe7c 100644
--- a/sd/qa/unit/SdrPdfImportTest.cxx
+++ b/sd/qa/unit/SdrPdfImportTest.cxx
@@ -238,7 +238,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
pPDFAnnotation2->getSubType()); // Pop-up annotation
// Load document again
- mxComponent = loadFromDesktop(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
auto pNewImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pNewViewShell = pNewImpressDocument->GetDocShell()->GetViewShell();
CPPUNIT_ASSERT(pNewViewShell);
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 18b1488ec340..000e5992fa6d 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -49,7 +49,7 @@ public:
void createSdImpressDoc(const char* pName = nullptr, const char* pPassword = nullptr)
{
if (!pName)
- load(u"private:factory/simpress"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
else
loadFromFile(OUString::createFromAscii(pName), pPassword);
@@ -63,7 +63,7 @@ public:
void createSdDrawDoc(const char* pName = nullptr, const char* pPassword = nullptr)
{
if (!pName)
- load(u"private:factory/sdraw"_ustr);
+ loadFromURL(u"private:factory/sdraw"_ustr);
else
loadFromFile(OUString::createFromAscii(pName), pPassword);
diff --git a/sfx2/qa/cppunit/doc.cxx b/sfx2/qa/cppunit/doc.cxx
index 92bfadd363e9..b16c078ef412 100644
--- a/sfx2/qa/cppunit/doc.cxx
+++ b/sfx2/qa/cppunit/doc.cxx
@@ -41,7 +41,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNoGrabBagShape)
// Load a document and select the first shape.
css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue(
u"ReadOnly"_ustr, true) };
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, u""_ustr, aArgs);
+ loadWithParams(u"private:factory/simpress"_ustr, aArgs);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xModel, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDrawPage(
@@ -65,7 +65,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNoGrabBagShape)
CPPUNIT_TEST_FIXTURE(Test, testTempFilePath)
{
// Create a test file in a directory that contains the URL-encoded "testÿ" string.
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
auto pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
OUString aTargetDir
@@ -75,10 +75,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTempFilePath)
css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue(
u"FilterName"_ustr, u"writer8"_ustr) };
pBaseModel->storeAsURL(aTargetFile, aArgs);
- mxComponent->dispose();
// Load it and export to PDF.
- mxComponent = loadFromDesktop(aTargetFile);
+ loadFromURL(aTargetFile);
pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
OUString aPdfTarget = aTargetDir + "/test.pdf";
css::uno::Sequence<css::beans::PropertyValue> aPdfArgs{ comphelper::makePropertyValue(
@@ -93,7 +92,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTempFilePath)
CPPUNIT_TEST_FIXTURE(Test, testSetDocumentPropertiesUpdate)
{
// Given a document with 3 custom props, 2 Zotero ones and one other:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
auto pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
uno::Reference<document::XDocumentProperties> xDP = pBaseModel->getDocumentProperties();
diff --git a/sfx2/qa/cppunit/test_classification.cxx b/sfx2/qa/cppunit/test_classification.cxx
index d94d52ef5eb1..d2adb072ad03 100644
--- a/sfx2/qa/cppunit/test_classification.cxx
+++ b/sfx2/qa/cppunit/test_classification.cxx
@@ -82,7 +82,7 @@ void ClassificationTest::testClassification()
void ClassificationTest::testWriter()
{
// Test SID_CLASSIFICATION_APPLY handling in SwDocShell::Execute().
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// This resulted in a beans::UnknownPropertyException when the request wasn't handled.
testClassification();
}
@@ -90,7 +90,7 @@ void ClassificationTest::testWriter()
void ClassificationTest::testCalc()
{
// Test SID_CLASSIFICATION_APPLY handling in ScFormatShell::ExecuteStyle().
- mxComponent = loadFromDesktop(u"private:factory/scalc"_ustr, u"com.sun.star.sheet.SpreadsheetDocument"_ustr);
+ loadFromURL(u"private:factory/scalc"_ustr);
// This resulted in a beans::UnknownPropertyException when the request wasn't handled.
testClassification();
}
@@ -98,7 +98,7 @@ void ClassificationTest::testCalc()
void ClassificationTest::testImpress()
{
// Test SID_CLASSIFICATION_APPLY handling in sd::DrawViewShell::FuTemporary().
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr, u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
// This resulted in a beans::UnknownPropertyException when the request wasn't handled.
testClassification();
}
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 019490d2c352..f8fc88722aa7 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -545,7 +545,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
int nRet = link(aOld.getStr(), aNew.getStr());
CPPUNIT_ASSERT_EQUAL(0, nRet);
- mxComponent = loadFromDesktop(aURL, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(aURL);
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
xStorable->store();
@@ -580,7 +580,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testtestOverwriteReadOnly)
aFile.open(osl_File_OpenFlag_Create);
aFile.close();
osl::File::setAttributes(aURL, osl_File_Attribute_OwnRead);
- mxComponent = loadFromDesktop(aURL, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(aURL);
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
bool bFail = false;
@@ -604,8 +604,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testtestOverwriteReadOnly)
CPPUNIT_TEST_FIXTURE(MiscTest, testOverwrite)
{
// tdf#60237 - try to overwrite an existing file using the different settings of the Overwrite option
- mxComponent
- = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(maTempFile.GetURL());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xStorable.is());
diff --git a/starmath/qa/extras/mmlexport-test.cxx b/starmath/qa/extras/mmlexport-test.cxx
index ff9bbd121c38..c0b34afa3f76 100644
--- a/starmath/qa/extras/mmlexport-test.cxx
+++ b/starmath/qa/extras/mmlexport-test.cxx
@@ -55,7 +55,7 @@ void MathMLExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
void MathMLExportTest::testBlank()
{
- mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
+ loadFromURL(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(u"x`y~~z"_ustr);
@@ -68,7 +68,7 @@ void MathMLExportTest::testBlank()
void MathMLExportTest::testTdf97049()
{
- mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
+ loadFromURL(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(u"intd {{1 over x} dx}"_ustr);
@@ -107,7 +107,7 @@ void MathMLExportTest::checkMathVariant(SmDocShell& rDocShell, bool bCapital, bo
void MathMLExportTest::testTdf101022()
{
- mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
+ loadFromURL(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
@@ -122,7 +122,7 @@ void MathMLExportTest::testTdf101022()
void MathMLExportTest::testMaj()
{
- mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
+ loadFromURL(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(
@@ -136,7 +136,7 @@ void MathMLExportTest::testMaj()
void MathMLExportTest::testHadd()
{
- mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
+ loadFromURL(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr);
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index 38953cea741b..12cdd6093f20 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -89,7 +89,7 @@ xmlDocUniquePtr lcl_dumpAndParseFirstObjectWithAssert(SdrPage* pSdrPage)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
{
// Create a new Draw document with a rectangle.
- mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
+ loadFromURL(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY);
@@ -130,7 +130,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
{
// Given a path object:
- mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
+ loadFromURL(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance(u"com.sun.star.drawing.ClosedBezierShape"_ustr), uno::UNO_QUERY);
@@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale)
CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
{
// Given a document with a groupshape, which has 2 children.
- mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
+ loadFromURL(u"private:factory/sdraw"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xRect1(
xFactory->createInstance(u"com.sun.star.drawing.RectangleShape"_ustr), uno::UNO_QUERY);
diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx
index 23bebef0a315..8a1349f3e02c 100644
--- a/svx/qa/unit/table.cxx
+++ b/svx/qa/unit/table.cxx
@@ -105,8 +105,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur)
CPPUNIT_TEST_FIXTURE(Test, testSvxTableControllerSetAttrToSelectedShape)
{
// Given a document with a table shape, editing cell text:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Sequence<beans::PropertyValue> aArgs
= { comphelper::makePropertyValue(u"Rows"_ustr, sal_Int32(2)),
comphelper::makePropertyValue(u"Columns"_ustr, sal_Int32(2)) };
diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index f18f51e29094..4bf5c6bf29a2 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -103,8 +103,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998)
CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
{
// Create an Impress document an insert a table shape.
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance(u"com.sun.star.drawing.TableShape"_ustr), uno::UNO_QUERY);
@@ -160,8 +159,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
{
// Create a title shape with 2 paragraphs in it.
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPages> xDrawPages = xSupplier->getDrawPages();
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPages->getByIndex(0), uno::UNO_QUERY);
@@ -193,8 +191,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
CPPUNIT_TEST_FIXTURE(UnodrawTest, testPngExport)
{
// Given an empty Impress document:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
// When exporting that document to PNG with a JSON size:
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY_THROW);
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index 781835069985..a5412ae8d490 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -93,8 +93,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testTdf60684)
CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi)
{
// Given an empty Impress document with a (title) shape:
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr,
- u"com.sun.star.presentation.PresentationDocument"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
// When setting the theme index of the shape's fill color:
uno::Reference<drawing::XDrawPagesSupplier> xPagesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/api/SwXBodyText.cxx b/sw/qa/api/SwXBodyText.cxx
index 7dd479c43eac..3d727d9910ad 100644
--- a/sw/qa/api/SwXBodyText.cxx
+++ b/sw/qa/api/SwXBodyText.cxx
@@ -68,8 +68,7 @@ SwXBodyText::SwXBodyText()
Reference<XInterface> SwXBodyText::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXBookmark.cxx b/sw/qa/api/SwXBookmark.cxx
index a92528d6f201..d2233c9b9ace 100644
--- a/sw/qa/api/SwXBookmark.cxx
+++ b/sw/qa/api/SwXBookmark.cxx
@@ -41,8 +41,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXBookmarks.cxx b/sw/qa/api/SwXBookmarks.cxx
index c2f37bcc676b..25ef2a0e29e3 100644
--- a/sw/qa/api/SwXBookmarks.cxx
+++ b/sw/qa/api/SwXBookmarks.cxx
@@ -44,8 +44,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXChapterNumbering.cxx b/sw/qa/api/SwXChapterNumbering.cxx
index c6e302362ddb..f2ba5d0fd09c 100644
--- a/sw/qa/api/SwXChapterNumbering.cxx
+++ b/sw/qa/api/SwXChapterNumbering.cxx
@@ -43,8 +43,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<text::XChapterNumberingSupplier> xCNSupplier(xTextDocument, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXDocumentIndex.cxx b/sw/qa/api/SwXDocumentIndex.cxx
index 7e1e5f9d673e..548acfb18470 100644
--- a/sw/qa/api/SwXDocumentIndex.cxx
+++ b/sw/qa/api/SwXDocumentIndex.cxx
@@ -57,8 +57,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
mxTextDocument = Reference<text::XTextDocument>(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxTextDocument, UNO_QUERY_THROW);
Reference<text::XDocumentIndex> xDocumentIndex(
diff --git a/sw/qa/api/SwXDocumentIndexMark.cxx b/sw/qa/api/SwXDocumentIndexMark.cxx
index 1d0e28a9e737..fa764c7ff527 100644
--- a/sw/qa/api/SwXDocumentIndexMark.cxx
+++ b/sw/qa/api/SwXDocumentIndexMark.cxx
@@ -68,8 +68,7 @@ SwXDocumentIndexMark::SwXDocumentIndexMark()
Reference<XInterface> SwXDocumentIndexMark::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXDocumentIndexes.cxx b/sw/qa/api/SwXDocumentIndexes.cxx
index 7ba73bba26ff..a94eae58ddc2 100644
--- a/sw/qa/api/SwXDocumentIndexes.cxx
+++ b/sw/qa/api/SwXDocumentIndexes.cxx
@@ -45,8 +45,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXDocumentSettings.cxx b/sw/qa/api/SwXDocumentSettings.cxx
index f88b6a1e60a9..83fd9ee9dc49 100644
--- a/sw/qa/api/SwXDocumentSettings.cxx
+++ b/sw/qa/api/SwXDocumentSettings.cxx
@@ -52,8 +52,7 @@ public:
uno::Reference<uno::XInterface> SwXDocumentSettings::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<lang::XMultiServiceFactory> xFactory(xTextDocument, uno::UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXFieldEnumeration.cxx b/sw/qa/api/SwXFieldEnumeration.cxx
index cb9998a4e094..8f1a379b646e 100644
--- a/sw/qa/api/SwXFieldEnumeration.cxx
+++ b/sw/qa/api/SwXFieldEnumeration.cxx
@@ -40,8 +40,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXFootnote.cxx b/sw/qa/api/SwXFootnote.cxx
index 686494312ddc..d98dfce0b77a 100644
--- a/sw/qa/api/SwXFootnote.cxx
+++ b/sw/qa/api/SwXFootnote.cxx
@@ -83,8 +83,7 @@ SwXFootnote::SwXFootnote()
Reference<XInterface> SwXFootnote::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
Reference<text::XFootnote> xFootnote(xMSF->createInstance(u"com.sun.star.text.Footnote"_ustr),
diff --git a/sw/qa/api/SwXFootnoteProperties.cxx b/sw/qa/api/SwXFootnoteProperties.cxx
index a7572fa573ab..b616a5c5ba99 100644
--- a/sw/qa/api/SwXFootnoteProperties.cxx
+++ b/sw/qa/api/SwXFootnoteProperties.cxx
@@ -52,8 +52,7 @@ SwXFootnoteProperties::SwXFootnoteProperties()
Reference<XInterface> SwXFootnoteProperties::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXFootnoteText.cxx b/sw/qa/api/SwXFootnoteText.cxx
index d552aa386ba3..6e359af7733b 100644
--- a/sw/qa/api/SwXFootnoteText.cxx
+++ b/sw/qa/api/SwXFootnoteText.cxx
@@ -77,8 +77,7 @@ SwXFootnoteText::SwXFootnoteText()
Reference<XInterface> SwXFootnoteText::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXFootnotes.cxx b/sw/qa/api/SwXFootnotes.cxx
index fae9d6938587..36ff83966da3 100644
--- a/sw/qa/api/SwXFootnotes.cxx
+++ b/sw/qa/api/SwXFootnotes.cxx
@@ -44,8 +44,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXFrames.cxx b/sw/qa/api/SwXFrames.cxx
index b9745d9af20a..80cfe1840c96 100644
--- a/sw/qa/api/SwXFrames.cxx
+++ b/sw/qa/api/SwXFrames.cxx
@@ -45,8 +45,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXHeadFootText.cxx b/sw/qa/api/SwXHeadFootText.cxx
index 3059af980b33..4d19bfdcd9cc 100644
--- a/sw/qa/api/SwXHeadFootText.cxx
+++ b/sw/qa/api/SwXHeadFootText.cxx
@@ -79,8 +79,7 @@ SwXHeadFootText::SwXHeadFootText()
Reference<XInterface> SwXHeadFootText::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXNumberingRules.cxx b/sw/qa/api/SwXNumberingRules.cxx
index aecc71c9022f..983341953efb 100644
--- a/sw/qa/api/SwXNumberingRules.cxx
+++ b/sw/qa/api/SwXNumberingRules.cxx
@@ -51,8 +51,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<container::XIndexAccess> xIndexAccess;
diff --git a/sw/qa/api/SwXParagraphEnumeration.cxx b/sw/qa/api/SwXParagraphEnumeration.cxx
index e3a2b3d45e92..f579ae414daf 100644
--- a/sw/qa/api/SwXParagraphEnumeration.cxx
+++ b/sw/qa/api/SwXParagraphEnumeration.cxx
@@ -41,8 +41,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXReferenceMark.cxx b/sw/qa/api/SwXReferenceMark.cxx
index 0f56a07c29ee..92e547c8ab98 100644
--- a/sw/qa/api/SwXReferenceMark.cxx
+++ b/sw/qa/api/SwXReferenceMark.cxx
@@ -43,8 +43,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXReferenceMarks.cxx b/sw/qa/api/SwXReferenceMarks.cxx
index d359f7cdddf3..57ebda368c31 100644
--- a/sw/qa/api/SwXReferenceMarks.cxx
+++ b/sw/qa/api/SwXReferenceMarks.cxx
@@ -47,8 +47,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(xTextDocument, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXStyleFamilies.cxx b/sw/qa/api/SwXStyleFamilies.cxx
index 6928896a430b..7b48a4318a53 100644
--- a/sw/qa/api/SwXStyleFamilies.cxx
+++ b/sw/qa/api/SwXStyleFamilies.cxx
@@ -47,8 +47,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTableCellText.cxx b/sw/qa/api/SwXTableCellText.cxx
index 6ac75ab2ac70..c6820f975e04 100644
--- a/sw/qa/api/SwXTableCellText.cxx
+++ b/sw/qa/api/SwXTableCellText.cxx
@@ -48,8 +48,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextEmbeddedObjects.cxx b/sw/qa/api/SwXTextEmbeddedObjects.cxx
index 27ee002c4a72..e3165493134e 100644
--- a/sw/qa/api/SwXTextEmbeddedObjects.cxx
+++ b/sw/qa/api/SwXTextEmbeddedObjects.cxx
@@ -50,8 +50,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx
index c02de9f134cb..fc3882ef7c00 100644
--- a/sw/qa/api/SwXTextField.cxx
+++ b/sw/qa/api/SwXTextField.cxx
@@ -53,8 +53,7 @@ struct SwXTextField final : public UnoApiTest,
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextFieldMasters.cxx b/sw/qa/api/SwXTextFieldMasters.cxx
index fb07a53933e3..50d88404af62 100644
--- a/sw/qa/api/SwXTextFieldMasters.cxx
+++ b/sw/qa/api/SwXTextFieldMasters.cxx
@@ -44,8 +44,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<text::XTextFieldsSupplier> xTFS;
diff --git a/sw/qa/api/SwXTextFieldTypes.cxx b/sw/qa/api/SwXTextFieldTypes.cxx
index 6ac1cad4749a..eaf44ca2df67 100644
--- a/sw/qa/api/SwXTextFieldTypes.cxx
+++ b/sw/qa/api/SwXTextFieldTypes.cxx
@@ -44,8 +44,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<text::XTextFieldsSupplier> xTFS;
diff --git a/sw/qa/api/SwXTextFrame.cxx b/sw/qa/api/SwXTextFrame.cxx
index 970011d64aef..4b11138cba8c 100644
--- a/sw/qa/api/SwXTextFrame.cxx
+++ b/sw/qa/api/SwXTextFrame.cxx
@@ -38,8 +38,7 @@ public:
uno::Reference<uno::XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextFrame> xTextFrame(
diff --git a/sw/qa/api/SwXTextSections.cxx b/sw/qa/api/SwXTextSections.cxx
index 60502dfcc801..c870a619cad1 100644
--- a/sw/qa/api/SwXTextSections.cxx
+++ b/sw/qa/api/SwXTextSections.cxx
@@ -48,8 +48,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextTable.cxx b/sw/qa/api/SwXTextTable.cxx
index c0bd7226de56..83971f2c3eaf 100644
--- a/sw/qa/api/SwXTextTable.cxx
+++ b/sw/qa/api/SwXTextTable.cxx
@@ -50,8 +50,7 @@ void SwXTextTable::triggerDesktopTerminate() { mxDesktop->terminate(); }
Reference<XInterface> SwXTextTable::init()
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
Reference<text::XText> xText = xTextDocument->getText();
diff --git a/sw/qa/api/SwXTextTables.cxx b/sw/qa/api/SwXTextTables.cxx
index d89546805170..b16e36adf2f8 100644
--- a/sw/qa/api/SwXTextTables.cxx
+++ b/sw/qa/api/SwXTextTables.cxx
@@ -45,8 +45,7 @@ public:
Reference<XInterface> init() override
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
Reference<text::XTextDocument> xTextDocument(mxComponent, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(mxComponent, UNO_QUERY_THROW);
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index e34a94a7f101..22d8126fa039 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -424,7 +424,7 @@ void SwMacrosTest::testFdo68983()
void SwMacrosTest::testFdo87530()
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
{
// insert initial password protected library
@@ -481,8 +481,7 @@ void SwMacrosTest::testFdo87530()
void SwMacrosTest::testFindReplace()
{
// we need a full document with view and layout etc. because ::GetNode()
- mxComponent =
- loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx b/sw/qa/extras/accessibility/accessible_relation_set.cxx
index 020c9256b92a..29f6961859ab 100644
--- a/sw/qa/extras/accessibility/accessible_relation_set.cxx
+++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx
@@ -62,8 +62,7 @@ void AccessibleRelationSet::init(uno::Reference<css::accessibility::XAccessible>
uno::Reference<css::accessibility::XAccessible>& para2,
uno::Reference<css::accessibility::XAccessible>& para3)
{
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDoc(mxComponent, uno::UNO_QUERY);
css::uno::Reference<text::XText> oText(xTextDoc->getText(), uno::UNO_SET_THROW);
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index fa60bf574f66..19ffaaee929c 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -1019,8 +1019,7 @@ void Test::testODF13()
assertXPath(pStylesXml, "/office:document-styles/office:master-styles/style:master-page/style:footer-first", 0);
// reload
- mxComponent->dispose();
- mxComponent = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(maTempFile.GetURL());
// check model
verifyText13("1.2 Extended reload");
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 8a820edc950f..b1f11a2c4bca 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -2769,7 +2769,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_PreserveSpaces)
// Test import
setImportFilterName(u"HTML (StarWriter)"_ustr);
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
CPPUNIT_ASSERT_EQUAL(paraText, getParagraph(1)->getString());
}
@@ -2798,7 +2798,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_PreserveSpaces)
setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
setImportFilterName(u"HTML (StarWriter)"_ustr);
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
CPPUNIT_ASSERT_EQUAL(paraText, getParagraph(1)->getString());
}
@@ -2863,7 +2863,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_NoPreserveSpaces)
// Test import
setImportFilterName(u"HTML (StarWriter)"_ustr);
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
CPPUNIT_ASSERT_EQUAL(u"No special spaces"_ustr, getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(u" Leading space"_ustr, getParagraph(2)->getString());
@@ -2928,7 +2928,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_NoPreserveSpaces)
setImportFilterOptions(u"xhtmlns=reqif-xhtml"_ustr);
setImportFilterName(u"HTML (StarWriter)"_ustr);
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
CPPUNIT_ASSERT_EQUAL(u"No special spaces"_ustr, getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(u" Leading space"_ustr, getParagraph(2)->getString());
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 3e6609931c0b..5b5e066e1ad5 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -2495,12 +2495,11 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf121509)
aNewAnch.SetAnchor(aCursor.Start());
CPPUNIT_ASSERT(pTriangleShapeFormat->SetFormatAttr(aNewAnch));
- // Reload (docx)
- // FIXME: if we use 'reload' here, it fails with
- // Assertion `!m_pFirst && !m_pLast && "There are still indices registered"' failed.
save(u"Office Open XML Text"_ustr);
// The second part: check if the reloaded doc has flys inside a fly
+ // FIXME: if we use 'saveAndReload' or 'loadFromURL' here, it fails with
+ // Assertion `!m_pFirst && !m_pLast && "There are still indices registered"' failed.
loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
auto pSecondDoc = getSwDoc();
auto pSecondFormats = pSecondDoc->GetSpzFrameFormats();
diff --git a/sw/qa/extras/mailmerge/mailmergetestbase.cxx b/sw/qa/extras/mailmerge/mailmergetestbase.cxx
index fc6e084ac21a..72e3ddfdb588 100644
--- a/sw/qa/extras/mailmerge/mailmergetestbase.cxx
+++ b/sw/qa/extras/mailmerge/mailmergetestbase.cxx
@@ -261,12 +261,9 @@ public:
void loadMailMergeDocument(const OUString& filename)
{
assert(mnCurOutputType == text::MailMergeType::FILE);
- if (mxComponent.is())
- mxComponent->dispose();
// Output name early, so in the case of a hang, the name of the hanging input file is visible.
std::cout << filename << ",";
- mxComponent = loadFromDesktop(msMailMergeOutputURL + "/" + filename,
- u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(msMailMergeOutputURL + "/" + filename);
calcLayout();
}
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 9c824c92b985..fb8a065eba29 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -1541,10 +1541,9 @@ CPPUNIT_TEST_FIXTURE(Test, testBrokenPackage_Tdf159474)
// Given an invalid ODF having a stream not referenced in manifest.xml
const OUString url = createFileURL(u"unreferenced_stream.odt");
// It expectedly fails to load normally:
- CPPUNIT_ASSERT_ASSERTION_FAIL(loadFromDesktop(url, {}, {}));
+ CPPUNIT_ASSERT_ASSERTION_FAIL(loadFromURL(url));
// importing it must succeed with RepairPackage set to true.
- mxComponent
- = loadFromDesktop(url, {}, { comphelper::makePropertyValue(u"RepairPackage"_ustr, true) });
+ loadWithParams(url, { comphelper::makePropertyValue(u"RepairPackage"_ustr, true) });
// The document imports in repair mode; the original broken package is used as a template,
// and the loaded document has no URL:
CPPUNIT_ASSERT(mxComponent.queryThrow<frame::XModel>()->getURL().isEmpty());
diff --git a/sw/qa/extras/pdf/HybridPdfTest.cxx b/sw/qa/extras/pdf/HybridPdfTest.cxx
index 840de3298474..0ec4e7ae385b 100644
--- a/sw/qa/extras/pdf/HybridPdfTest.cxx
+++ b/sw/qa/extras/pdf/HybridPdfTest.cxx
@@ -35,8 +35,7 @@ public:
void HybridPdfTest::testNoHybridDataInPDF()
{
// Load PDF document without attached ODT document
- UnoApiXmlTest::load(createFileURL(u"PDFOnly.pdf"), nullptr);
- CPPUNIT_ASSERT(mxComponent.is());
+ loadFromFile(u"PDFOnly.pdf");
uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW);
// Draw document is expected in this case - default when importing PDF
CPPUNIT_ASSERT(xServiceInfo->supportsService(u"com.sun.star.drawing.DrawingDocument"_ustr));
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 2e3904450545..b706ac813440 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -376,22 +376,17 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testPasteTableAtFlyAnchor)
CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak)
{
- {
- createSwDoc("pagebreak-source.fodt");
-
- SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
- CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+ createSwDoc("pagebreak-source.fodt");
- pWrtShell->SelAll();
- dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
- mxComponent->dispose();
- mxComponent.clear();
- }
+ pWrtShell->SelAll();
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
createSwDoc("pagebreak-target.fodt");
SwDoc* pDoc = getSwDoc();
- SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell = getSwDocShell()->GetWrtShell();
CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
CPPUNIT_ASSERT_EQUAL(u"WithMargin"_ustr, getProperty<OUString>(getParagraph(1), u"PageDescName"_ustr));
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx
index ad6e69661717..429fe7ce931d 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -2199,7 +2199,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testEmbeddedDataSource)
CPPUNIT_ASSERT(!xDatabaseContext->hasByName(u"calc-data-source"_ustr));
// Now open again the saved result, and instead of 'save as', just 'save'.
- mxComponent = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(maTempFile.GetURL());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
xStorable->store();
}
@@ -2807,7 +2807,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf117225)
OUString aTargetFile = aTargetDirectory + "tdf117225.odt";
OUString aSourceFile = createFileURL(u"tdf117225.odt");
osl::File::copy(aSourceFile, aTargetFile);
- mxComponent = loadFromDesktop(aTargetFile);
+ loadFromURL(aTargetFile);
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
int nExpected = CountFilesInDirectory(aTargetDirectory);
xStorable->store();
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx
index 58052fcf8146..5c9414792920 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -2719,6 +2719,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128106)
= comphelper::InitPropertySequence({ { "FileName", css::uno::Any(maTempFile.GetURL()) } });
dispatchCommand(mxComponent, u".uno:NewGlobalDoc"_ustr, aPropertyValues);
+ // Use loadFromDesktop instead of loadFromURL to avoid calling mxComponent->dispose()
+ // Otherwise it fails with 'DeInitVCL: some top Windows are still alive'
mxComponent = loadFromDesktop(maTempFile.GetURL());
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
diff --git a/sw/qa/uibase/uiview/uiview.cxx b/sw/qa/uibase/uiview/uiview.cxx
index fe4540e64e81..331795649a0f 100644
--- a/sw/qa/uibase/uiview/uiview.cxx
+++ b/sw/qa/uibase/uiview/uiview.cxx
@@ -96,8 +96,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUiviewTest, testUpdateReplacementNosetting)
// Load a copy of the document in hidden mode.
OUString aSourceURL = createFileURL(u"update-replacement-nosetting.odt");
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, osl::File::copy(aSourceURL, maTempFile.GetURL()));
- mxComponent = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.text.TextDocument"_ustr,
- { comphelper::makePropertyValue(u"Hidden"_ustr, true) });
+ loadWithParams(maTempFile.GetURL(), { comphelper::makePropertyValue(u"Hidden"_ustr, true) });
// Update "everything" (including object replacements) and save it.
dispatchCommand(mxComponent, u".uno:UpdateAll"_ustr, {});
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index 91aace9350f9..72fedf58f4a4 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -381,7 +381,7 @@ void SwModelTestBase::loadURL(OUString const& rURL, const char* pPassword)
// Output name at load time, so in the case of a hang, the name of the hanging input file is visible.
std::cout << rURL << ":\n";
- UnoApiXmlTest::load(rURL, pPassword);
+ loadFromURL(rURL, pPassword);
CPPUNIT_ASSERT(!getSwDocShell()->GetMedium()->GetWarningError());
diff --git a/sw/qa/writerfilter/dmapper/DomainMapper.cxx b/sw/qa/writerfilter/dmapper/DomainMapper.cxx
index 05e6029c8c21..c9a44648d660 100644
--- a/sw/qa/writerfilter/dmapper/DomainMapper.cxx
+++ b/sw/qa/writerfilter/dmapper/DomainMapper.cxx
@@ -194,8 +194,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableStyleParaBorder)
CPPUNIT_TEST_FIXTURE(Test, testRTFStylePaste)
{
// Given an empty Writer document:
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// When pasting RTF that has unreferenced paragraph styles:
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx
index 82224635543a..8bbf6035a40b 100644
--- a/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/qa/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -233,8 +233,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPTab)
CPPUNIT_TEST_FIXTURE(Test, testPasteOle)
{
// Given an empty document:
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// When pasting RTF into that document:
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/writerfilter/dmapper/NumberingManager.cxx b/sw/qa/writerfilter/dmapper/NumberingManager.cxx
index 8c60033a74d7..481e34acf273 100644
--- a/sw/qa/writerfilter/dmapper/NumberingManager.cxx
+++ b/sw/qa/writerfilter/dmapper/NumberingManager.cxx
@@ -35,8 +35,7 @@ public:
CPPUNIT_TEST_FIXTURE(Test, testPasteBulletListStyleName)
{
// Given a document with a WWNum1 list style:
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
diff --git a/sw/qa/writerfilter/dmapper/PropertyMap.cxx b/sw/qa/writerfilter/dmapper/PropertyMap.cxx
index 83a3b660c3c9..be80c9d398bb 100644
--- a/sw/qa/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/qa/writerfilter/dmapper/PropertyMap.cxx
@@ -148,8 +148,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorderNoMargin)
CPPUNIT_TEST_FIXTURE(Test, testPasteHeaderDisable)
{
// Given an empty document with a turned on header:
- mxComponent
- = loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index af6506c525f3..3a7f6e2d16f0 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -80,7 +80,7 @@ void UnoApiTest::setTestInteractionHandler(const char* pPassword,
rPropertyValue.Value <<= xInteraction;
}
-void UnoApiTest::load(OUString const& rURL, const char* pPassword)
+void UnoApiTest::loadFromURL(OUString const& rURL, const char* pPassword)
{
std::vector<beans::PropertyValue> aFilterOptions;
@@ -129,7 +129,7 @@ void UnoApiTest::loadWithParams(OUString const& rURL,
OUString UnoApiTest::loadFromFile(std::u16string_view aFileBase, const char* pPassword)
{
OUString aFileName = createFileURL(aFileBase);
- load(aFileName, pPassword);
+ loadFromURL(aFileName, pPassword);
return aFileName;
}
@@ -216,8 +216,7 @@ void UnoApiTest::saveWithParams(const uno::Sequence<beans::PropertyValue>& rPara
void UnoApiTest::saveAndReload(const OUString& rFilter, const char* pPassword)
{
save(rFilter, pPassword);
-
- load(maTempFile.GetURL(), pPassword);
+ loadFromURL(maTempFile.GetURL(), pPassword);
}
std::unique_ptr<vcl::pdf::PDFiumDocument> UnoApiTest::parsePDFExport(const OString& rPassword)
diff --git a/unoxml/qa/unit/rdftest.cxx b/unoxml/qa/unit/rdftest.cxx
index 198a42bf92a8..3b6de1d02006 100644
--- a/unoxml/qa/unit/rdftest.cxx
+++ b/unoxml/qa/unit/rdftest.cxx
@@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(RDFStreamTest, testCVE_2012_0037)
CPPUNIT_TEST_FIXTURE(RDFStreamTest, testRDFa)
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
uno::UNO_QUERY);
@@ -962,7 +962,7 @@ CPPUNIT_TEST_FIXTURE(RDFStreamTest, testTdf123293)
CPPUNIT_TEST_FIXTURE(RDFStreamTest, testDocumentMetadataAccess)
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(mxComponent,
uno::UNO_QUERY);
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
index b2594058dd36..606d9ae64a79 100644
--- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
+++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
@@ -67,8 +67,7 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testPDFAddVisibleSignatureLastPage)
// Open it.
uno::Sequence<beans::PropertyValue> aArgs
= { comphelper::makePropertyValue(u"ReadOnly"_ustr, true) };
- mxComponent
- = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.drawing.DrawingDocument"_ustr, aArgs);
+ loadWithParams(maTempFile.GetURL(), aArgs);
SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index f9dbb0500934..9a1a314ad3e7 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testLargePage)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
{
// Create an empty document.
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testDefaultVersion)
{
// Create an empty document.
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// Save as PDF.
aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
@@ -716,7 +716,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testDefaultVersion)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testVersion15)
{
// Create an empty document.
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// Save as PDF.
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
@@ -1555,7 +1555,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152235)
{ "WatermarkFontName", uno::Any(u"Liberation Sans"_ustr) },
{ "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
saveWithParams(aMediaDescriptor.getAsConstPropertyValueList());
vcl::filter::PDFDocument aDocument;
@@ -4003,7 +4003,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf142129)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageRotate180)
{
// Create an empty document.
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -4238,7 +4238,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
// Create an empty document.
// Note: The test harness gets very upset if we try and create multiple
// documents, or recreate it; so reuse one instance for all the links
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -4330,7 +4330,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageAnnots)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageEncryption)
{
// Given an empty document, with an inserted PDF image:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 3644945efb7d..0d0db156b86b 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -122,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf141301_Extrusion_Angle)
CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
{
// Create an Impress document which has a master page which has a theme associated with it.
- mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
+ loadFromURL(u"private:factory/simpress"_ustr);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
@@ -279,7 +279,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testFillAndLineThemeColorExportImport)
save(u"impress8"_ustr);
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
checkFillAndLineComplexColors(getShape(0));
}
@@ -734,7 +734,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTdf156975_ThemeExport)
// Without fix for tdf#156975 it was not written at all.
// The test needs to be adapted, when themes are available in ODF.
- mxComponent = loadFromDesktop(u"private:factory/sdraw"_ustr);
+ loadFromURL(u"private:factory/sdraw"_ustr);
// generate a theme to be sure we have got one and know the values
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index 4961989aeb2a..486dd7bb8bc1 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -90,7 +90,7 @@ Color asColor(com::sun::star::rendering::RGBColor const& rRGBColor)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFontSorting)
{
// Given an empty document with default fonts (Liberation Sans, Lucida Sans, etc):
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// When saving that document to ODT:
save(u"writer8"_ustr);
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index 6a1d7eb9af50..2ef9e2673360 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -52,7 +52,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMailMergeInEditeng)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty)
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Sequence<beans::PropertyValue> aCommentProps = comphelper::InitPropertySequence({
{ "Text", uno::Any(u"comment"_ustr) },
});
@@ -92,7 +92,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCommentProperty)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyLocalUrl)
{
// Given a document with a biblio field, with non-empty LocalURL:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xField(
xFactory->createInstance(u"com.sun.star.text.TextField.Bibliography"_ustr), uno::UNO_QUERY);
@@ -134,7 +134,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyLocalUrl)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testBibliographyTargetURL1)
{
// Given a document with a biblio field, with non-empty LocalURL:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xField(
xFactory->createInstance(u"com.sun.star.text.TextField.Bibliography"_ustr), uno::UNO_QUERY);
@@ -326,7 +326,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdState)
{
// tdf#149668: given a document with 3 paragraphs: an outer numbering on para 1 & 3, an inner
// numbering on para 2:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
auto xTextDocument(mxComponent.queryThrow<text::XTextDocument>());
auto xText(xTextDocument->getText());
xText->insertControlCharacter(xText->getEnd(), css::text::ControlCharacter::PARAGRAPH_BREAK,
@@ -420,7 +420,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListIdOnRestart)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakExport)
{
// Given a document with a clearing break:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xLineBreak(
@@ -480,7 +480,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRelativeWidth)
{
// Given a document with an 50% wide text frame:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies
@@ -518,7 +518,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthAndHeight)
{
// Given a broken document where both IsSyncHeightToWidth and IsSyncWidthToHeight are set to
// true:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextContent> xTextFrame(
@@ -547,7 +547,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthAndHeight)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlExport)
{
// Given a document with a content control around one or more text portions:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -606,7 +606,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlExport)
{
// Given a document with a checkbox content control around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -679,7 +679,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlExport)
{
// Given a document with a dropdown content control around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -776,7 +776,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlExport)
{
// Given a document with a picture content control around an as-char image:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -835,7 +835,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlExport)
{
// Given a document with a date content control around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -905,7 +905,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlExport)
{
// Given a document with a plain text content control around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -960,7 +960,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlImport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlExport)
{
// Given a document with a combo box content control around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -988,7 +988,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlExport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport)
{
// Given a document with a content control and its alias around a text portion:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -1130,7 +1130,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthRedline)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testThemeExport)
{
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1173,7 +1173,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testThemeExport)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFloatingTableExport)
{
// Given a document with a floating table:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// Insert a table:
uno::Sequence<beans::PropertyValue> aArgs = {
comphelper::makePropertyValue(u"Rows"_ustr, static_cast<sal_Int32>(1)),
diff --git a/xmloff/qa/unit/text/txtprmap.cxx b/xmloff/qa/unit/text/txtprmap.cxx
index 1896ec4e4fda..e650ff649bad 100644
--- a/xmloff/qa/unit/text/txtprmap.cxx
+++ b/xmloff/qa/unit/text/txtprmap.cxx
@@ -34,7 +34,7 @@ Test::Test()
CPPUNIT_TEST_FIXTURE(Test, testFloatingTableWrapTextAtFlyStartExport)
{
// Given a document with a floating table:
- mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
// Insert a table:
uno::Sequence<beans::PropertyValue> aArgs = {
comphelper::makePropertyValue(u"Rows"_ustr, static_cast<sal_Int32>(1)),
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index e4498f449150..11197a9bf6fa 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -138,7 +138,7 @@ SigningTest::getCertificate(DocumentSignatureManager& rSignatureManager,
CPPUNIT_TEST_FIXTURE(SigningTest, testDescription)
{
// Create an empty document and store it to a tempfile, finally load it as a storage.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"writer8"_ustr);
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDescription)
CPPUNIT_TEST_FIXTURE(SigningTest, testECDSA)
{
// Create an empty document and store it to a tempfile, finally load it as a storage.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"writer8"_ustr);
@@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSA)
CPPUNIT_TEST_FIXTURE(SigningTest, testECDSAOOXML)
{
// Create an empty document and store it to a tempfile, finally load it as a storage.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"MS Word 2007 XML"_ustr);
@@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSAPDF)
{
// Create an empty document and store it to a tempfile, finally load it as
// a stream.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"writer_pdf_Export"_ustr);
@@ -280,7 +280,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSAPDF)
CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLDescription)
{
// Create an empty document and store it to a tempfile, finally load it as a storage.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"MS Word 2007 XML"_ustr);
@@ -893,7 +893,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESNotype)
CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES)
{
// Create an empty document, store it to a tempfile and load it as a storage.
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"writer8"_ustr);
@@ -946,7 +946,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES)
CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT)
{
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"writer8"_ustr);
{
@@ -1008,7 +1008,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT)
Scheduler::ProcessEventsToIdle();
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
@@ -1019,7 +1019,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT)
CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_OOXML)
{
- load(u"private:factory/swriter"_ustr);
+ loadFromURL(u"private:factory/swriter"_ustr);
save(u"MS Word 2007 XML"_ustr);
{
@@ -1079,7 +1079,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_OOXML)
Scheduler::ProcessEventsToIdle();
- load(maTempFile.GetURL());
+ loadFromURL(maTempFile.GetURL());
SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
@@ -1373,7 +1373,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPreserveMacroTemplateSignature12_ODF)
SignatureState::OK, ODFVER_012_TEXT);
// create new document from template
- load(aURL);
+ loadFromURL(aURL);
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
@@ -1428,7 +1428,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDropMacroTemplateSignature)
SignatureState::NOTVALIDATED, OUString());
// create new document from template
- load(aURL);
+ loadFromURL(aURL);
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
@@ -1485,7 +1485,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPreserveMacroTemplateSignature10)
SignatureState::NOTVALIDATED, OUString());
// create new document from template
- load(aURL);
+ loadFromURL(aURL);
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx
index e7f0dad50658..1854c9e013a0 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPreserveMacroSignatureODB)
CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODF13)
{
// load ODF 1.3 encrypted document
- load(createFileURL(u"encrypted_scriptsig_odf13.odt"), "password");
+ loadFromFile(u"encrypted_scriptsig_odf13.odt", "password");
{
uno::Reference<text::XTextDocument> xTextDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(u"secret"_ustr, xTextDoc->getText()->getString());
@@ -229,7 +229,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODF13)
CPPUNIT_TEST_FIXTURE(SigningTest2, testPasswordPreserveMacroSignatureODFWholesomeLO242)
{
// load wholesome ODF (extended) encrypted document
- load(createFileURL(u"encrypted_scriptsig_lo242.odt"), "password");
+ loadFromFile(u"encrypted_scriptsig_lo242.odt", "password");
{
uno::Reference<text::XTextDocument> xTextDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(u"secret"_ustr, xTextDoc->getText()->getString());
diff --git a/xmlsecurity/qa/xmlsec/xmlsec.cxx b/xmlsecurity/qa/xmlsec/xmlsec.cxx
index a078ec912d39..d36bce860e0e 100644
--- a/xmlsecurity/qa/xmlsec/xmlsec.cxx
+++ b/xmlsecurity/qa/xmlsec/xmlsec.cxx
@@ -50,7 +50,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertPrivateKey)
= xml::crypto::SEInitializer::create(getComponentContext());
uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
= mxSEInitializer->createSecurityContext(OUString());
- load("private:factory/swriter");
+ loadFromURL("private:factory/swriter");
save("writer8");
DocumentSignatureManager aManager(getComponentContext(), DocumentSignatureMode::Content);
CPPUNIT_ASSERT(aManager.init());