summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-03 11:49:02 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-01-03 07:51:28 +0100
commita01a642ebbdb8c16f1b54b4634c277b9f665192f (patch)
treee0c598848fbb375ddbe9e1cf4db42df1e27746a9 /sd/qa/unit
parent8ecd20b447ab5e58fa77c19fce09c0f239d1fafc (diff)
UnoApiTest::loadFromURL -> UnoApiTest::loadFromFile
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/HtmlExportTest.cxx4
-rw-r--r--sd/qa/unit/PNGExportTests.cxx32
-rw-r--r--sd/qa/unit/SVGExportTests.cxx16
-rw-r--r--sd/qa/unit/SdrPdfImportTest.cxx4
-rw-r--r--sd/qa/unit/ThemeTest.cxx2
-rw-r--r--sd/qa/unit/import-tests.cxx2
-rw-r--r--sd/qa/unit/import-tests2.cxx2
-rw-r--r--sd/qa/unit/layout-tests.cxx2
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx4
-rw-r--r--sd/qa/unit/tiledrendering/LOKitSearchTest.cxx2
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx2
11 files changed, 36 insertions, 36 deletions
diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 34b262f6e76c..89f60e98f556 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -22,7 +22,7 @@ public:
void testHTMLExport()
{
- loadFromURL(u"HtmlExportTestDocument.odp");
+ loadFromFile(u"HtmlExportTestDocument.odp");
save("impress_html_Export");
htmlDocUniquePtr htmlDoc = parseHtml(maTempFile);
@@ -43,7 +43,7 @@ public:
void testTdf154989()
{
- loadFromURL(u"tdf154989.odg");
+ loadFromFile(u"tdf154989.odg");
save("XHTML Draw File");
xmlDocUniquePtr pXmlDoc = parseXml(maTempFile);
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index ed50b2adc78c..8b2926bbd896 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -42,7 +42,7 @@ static void assertColorsAreSimilar(const std::string& message, const BitmapColor
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998)
{
- loadFromURL(u"odp/tdf105998.odp");
+ loadFromFile(u"odp/tdf105998.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -103,7 +103,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319)
{
- loadFromURL(u"odg/tdf126319.odg");
+ loadFromFile(u"odg/tdf126319.odg");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632)
{
// Reuse existing file
- loadFromURL(u"odp/tdf105998.odp");
+ loadFromFile(u"odp/tdf105998.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -204,7 +204,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157652)
{
- loadFromURL(u"odp/tdf157652.odp");
+ loadFromFile(u"odp/tdf157652.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -252,7 +252,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157652)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808)
{
- loadFromURL(u"pptx/tdf156808.pptx");
+ loadFromFile(u"pptx/tdf156808.pptx");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf156808)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795)
{
- loadFromURL(u"odp/tdf157795.odp");
+ loadFromFile(u"odp/tdf157795.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157795)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362)
{
- loadFromURL(u"odp/tdf105362.odp");
+ loadFromFile(u"odp/tdf105362.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -401,7 +401,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105362)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157636)
{
- loadFromURL(u"ppt/tdf157636.ppt");
+ loadFromFile(u"ppt/tdf157636.ppt");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -452,7 +452,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157636)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793)
{
- loadFromURL(u"pptx/tdf157793.pptx");
+ loadFromFile(u"pptx/tdf157793.pptx");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -507,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635)
{
- loadFromURL(u"pptx/tdf157635.pptx");
+ loadFromFile(u"pptx/tdf157635.pptx");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -558,7 +558,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113163)
{
- loadFromURL(u"pptx/tdf113163.pptx");
+ loadFromFile(u"pptx/tdf113163.pptx");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -608,7 +608,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113163)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119)
{
- loadFromURL(u"odg/tdf147119.odg");
+ loadFromFile(u"odg/tdf147119.odg");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -657,7 +657,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113197)
{
- loadFromURL(u"odp/tdf113197.odp");
+ loadFromFile(u"odp/tdf113197.odp");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -708,7 +708,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf113197)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf93124)
{
- loadFromURL(u"ppt/tdf93124.ppt");
+ loadFromFile(u"ppt/tdf93124.ppt");
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
@@ -764,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729)
for (size_t i = 0; i < SAL_N_ELEMENTS(filenames); ++i)
{
// 1st check for new behaviour - having AnchoredTextOverflowLegacy compatibility flag set to false in settings.xml
- loadFromURL(filenames[i]);
+ loadFromFile(filenames[i]);
uno::Reference<uno::XComponentContext> xContext = getComponentContext();
CPPUNIT_ASSERT(xContext.is());
@@ -817,7 +817,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf99729)
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048)
{
- loadFromURL(u"odg/diagonalLine.fodg");
+ loadFromFile(u"odg/diagonalLine.fodg");
auto xGraphicExporter = drawing::GraphicExportFilter::create(getComponentContext());
CPPUNIT_ASSERT(xGraphicExporter);
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 03381bd8901e..b53f8c1d64c4 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -76,7 +76,7 @@ public:
void testSVGExportTextDecorations()
{
- loadFromURL(u"svg-export-text-decorations.odp");
+ loadFromFile(u"svg-export-text-decorations.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -99,7 +99,7 @@ public:
void testSVGExportJavascriptURL()
{
- loadFromURL(u"textbox-link-javascript.odp");
+ loadFromFile(u"textbox-link-javascript.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -114,7 +114,7 @@ public:
void testSVGExportSlideCustomBackground()
{
- loadFromURL(u"slide-custom-background.odp");
+ loadFromFile(u"slide-custom-background.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -125,7 +125,7 @@ public:
void testSVGExportTextFieldsInMasterPage()
{
- loadFromURL(u"text-fields.odp");
+ loadFromFile(u"text-fields.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -149,7 +149,7 @@ public:
void testSVGExportEmbeddedVideo()
{
- loadFromURL(u"slide-video-thumbnail.odp");
+ loadFromFile(u"slide-video-thumbnail.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -180,7 +180,7 @@ public:
void testSVGExportSlideBitmapBackground()
{
- loadFromURL(u"slide-bitmap-background.odp");
+ loadFromFile(u"slide-bitmap-background.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -209,7 +209,7 @@ public:
void testSVGExportSlideTileBitmapBackground()
{
- loadFromURL(u"slide-tile-background.odp");
+ loadFromFile(u"slide-tile-background.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
@@ -274,7 +274,7 @@ public:
aSettings.SetLanguageTag(aLangISO, true);
Application::SetSettings(aSettings);
- loadFromURL(u"text-fields.odp");
+ loadFromFile(u"text-fields.odp");
save("impress_svg_Export");
xmlDocUniquePtr svgDoc = parseXml(maTempFile);
diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx
index 5b6c0b4b43be..52388678df74 100644
--- a/sd/qa/unit/SdrPdfImportTest.cxx
+++ b/sd/qa/unit/SdrPdfImportTest.cxx
@@ -89,7 +89,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testImportSimpleText)
// We need to enable PDFium import (and make sure to disable after the test)
EnvVarGuard UsePDFiumGuard("LO_IMPORT_USE_PDFIUM", "1");
- loadFromURL(u"SimplePDF.pdf");
+ loadFromFile(u"SimplePDF.pdf");
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
CPPUNIT_ASSERT(pViewShell);
@@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
auto pPdfiumLibrary = vcl::pdf::PDFiumLibrary::get();
- loadFromURL(u"PdfWithAnnotation.pdf");
+ loadFromFile(u"PdfWithAnnotation.pdf");
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
CPPUNIT_ASSERT(pViewShell);
diff --git a/sd/qa/unit/ThemeTest.cxx b/sd/qa/unit/ThemeTest.cxx
index 3a12ce69ca35..eec1abe5dfd7 100644
--- a/sd/qa/unit/ThemeTest.cxx
+++ b/sd/qa/unit/ThemeTest.cxx
@@ -65,7 +65,7 @@ Color GetShapeFillColor(const uno::Reference<beans::XPropertySet>& xShape)
CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange)
{
// Given a document, with a first slide and blue shape text from theme:
- loadFromURL(u"theme.pptx");
+ loadFromFile(u"theme.pptx");
SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pXImpressDocument);
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 0003e8b408b1..c08e44ea2653 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -157,7 +157,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testDocumentLayout)
int const nUpdateMe
= -1; // index of test we want to update; supposedly only when the test is created
- loadFromURL(aFilesToCompare[i].sInput);
+ loadFromFile(aFilesToCompare[i].sInput);
if (!aFilesToCompare[i].sExportType.isEmpty())
saveAndReload(aFilesToCompare[i].sExportType);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent,
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 6b4e07cad33c..ac730a24d6bf 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1364,7 +1364,7 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testDescriptionImport)
CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf83247)
{
auto GetPause = [this](const OUString& sSrc) {
- loadFromURL(sSrc);
+ loadFromFile(sSrc);
uno::Reference<presentation::XPresentationSupplier> xPresentationSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPresentationProps(
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 81e5521ab308..a93584b62f67 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -21,7 +21,7 @@ public:
xmlDocUniquePtr load(const char* pName)
{
- loadFromURL(OUString::createFromAscii(pName));
+ loadFromFile(OUString::createFromAscii(pName));
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pModel);
SfxObjectShell* pShell = pModel->GetObjectShell();
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index f651419c776b..4f0d15c56474 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -51,7 +51,7 @@ public:
if (!pName)
load("private:factory/simpress");
else
- loadFromURL(OUString::createFromAscii(pName), pPassword);
+ loadFromFile(OUString::createFromAscii(pName), pPassword);
uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(
@@ -65,7 +65,7 @@ public:
if (!pName)
load("private:factory/sdraw");
else
- loadFromURL(OUString::createFromAscii(pName), pPassword);
+ loadFromFile(OUString::createFromAscii(pName), pPassword);
uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument"));
diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
index 0081fdfae938..35b32640b510 100644
--- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
+++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
@@ -112,7 +112,7 @@ void LOKitSearchTest::tearDown()
SdXImpressDocument*
LOKitSearchTest::createDoc(const char* pName, const uno::Sequence<beans::PropertyValue>& rArguments)
{
- loadFromURL(OUString::createFromAscii(pName));
+ loadFromFile(OUString::createFromAscii(pName));
SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pImpressDocument);
pImpressDocument->initializeForTiledRendering(rArguments);
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 2136cd378aba..31d61c1fb1a0 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -135,7 +135,7 @@ void SdTiledRenderingTest::tearDown()
SdXImpressDocument* SdTiledRenderingTest::createDoc(const char* pName, const uno::Sequence<beans::PropertyValue>& rArguments)
{
- loadFromURL(OUString::createFromAscii(pName));
+ loadFromFile(OUString::createFromAscii(pName));
SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pImpressDocument);
pImpressDocument->initializeForTiledRendering(rArguments);