summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-03 11:49:02 +0600
committerMichael Stahl <michael.stahl@allotropia.de>2024-01-10 13:26:43 +0100
commit496386d34ba5f55a6a7724929e83374f6a4a9eef (patch)
tree920caa576537bbeaf85cf744ef31afadf80e8d53 /sw
parentc0f8ebe8554f55489e22820e3f230e937243289c (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161888 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/fields/fields.cxx8
-rw-r--r--sw/qa/core/macros-test.cxx10
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport20.cxx4
4 files changed, 13 insertions, 13 deletions
diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx
index 8e6a1488fa3a..b783dc0cf3e9 100644
--- a/sw/qa/core/fields/fields.cxx
+++ b/sw/qa/core/fields/fields.cxx
@@ -159,7 +159,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChapterFieldsFollowedBy)
CPPUNIT_TEST_FIXTURE(Test, testTdf86790)
{
- loadFromURL(u"tdf86790.docx");
+ loadFromFile(u"tdf86790.docx");
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(
@@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFootnoteStyleRef)
/// STYLEREFs with the REFFLDFLAG_HIDE_NON_NUMERICAL flag should hide all characters that are not numerical or delimiters
CPPUNIT_TEST_FIXTURE(Test, testNumericalStyleRef)
{
- loadFromURL(u"suppress-non-numerical.docx");
+ loadFromFile(u"suppress-non-numerical.docx");
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(
@@ -416,7 +416,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumericalStyleRef)
/// this docx only has such stylerefs to avoid confusion)
CPPUNIT_TEST_FIXTURE(Test, testOOXMLStyleRefFlags)
{
- loadFromURL(u"styleref-flags.docx");
+ loadFromFile(u"styleref-flags.docx");
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(
@@ -447,7 +447,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLStyleRefFlags)
/// this docx only has such stylerefs to avoid confusion)
CPPUNIT_TEST_FIXTURE(Test, testODFStyleRef)
{
- loadFromURL(u"styleref.odt");
+ loadFromFile(u"styleref.odt");
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index e79271ac764e..19e2c81a0690 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -139,7 +139,7 @@ void SwMacrosTest::testVba()
for (auto const & [ sFileBaseName, sMacroUrl ] : testInfo)
{
OUString sFileName("docm/" + sFileBaseName);
- loadFromURL(sFileName);
+ loadFromFile(sFileName);
uno::Any aRet = executeMacro(sMacroUrl);
OUString aStringRes;
@@ -157,7 +157,7 @@ void SwMacrosTest::testModernVBADelete()
};
OUString sFileName("docm/" + testInfo.sFileBaseName);
- loadFromURL(sFileName);
+ loadFromFile(sFileName);
SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -244,7 +244,7 @@ void SwMacrosTest::testBookmarkDeleteTdf90816()
void SwMacrosTest::testControlShapeGrouping()
{
- loadFromURL(u"odt/testControlShapeGrouping.odt");
+ loadFromFile(u"odt/testControlShapeGrouping.odt");
uno::Reference<frame::XModel> const xModel(mxComponent, UNO_QUERY);
CPPUNIT_ASSERT(xModel.is());
@@ -344,7 +344,7 @@ void SwMacrosTest::testControlShapeGrouping()
void SwMacrosTest::testTdf151846()
{
- loadFromURL(u"odt/tdf151846.odt");
+ loadFromFile(u"odt/tdf151846.odt");
// Without the fix in place, this test would have failed with
// Property or method not found: createDiagramByDataSource.
@@ -393,7 +393,7 @@ void SwMacrosTest::testFdo55289()
void SwMacrosTest::testFdo68983()
{
- loadFromURL(u"odt/fdo68983.odt");
+ loadFromFile(u"odt/fdo68983.odt");
Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
saveAndReload("writer8");
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 96bdfab66b60..1bd883be111f 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -301,8 +301,8 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo81276)
CPPUNIT_TEST_FIXTURE(HtmlExportTest, testFdo62336)
{
// The problem was essentially a crash during table export as docx/rtf/html
- // If calc-layout is enabled, the crash does not occur, that's why loadFromURL/save is used
- loadFromURL(u"fdo62336.docx");
+ // If calc-layout is enabled, the crash does not occur, that's why loadFromFile/save is used
+ loadFromFile(u"fdo62336.docx");
save("HTML (StarWriter)");
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index 4324976879f8..2fdfcaf66bdc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -1026,7 +1026,7 @@ CPPUNIT_TEST_FIXTURE(Test, testtdf158044)
CPPUNIT_TEST_FIXTURE(Test, testTdf158855)
{
// Given a table immediately followed by a section break
- loadFromURL(u"section_break_after_table.docx");
+ loadFromFile(u"section_break_after_table.docx");
// Check that the import doesn't produce an extra empty paragraph before a page break
CPPUNIT_ASSERT_EQUAL(2, getPages()); // was 3
@@ -1045,7 +1045,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158855)
CPPUNIT_TEST_FIXTURE(Test, testTdf158971)
{
// Given a section break and an SDT in the following paragraph
- loadFromURL(u"sdt_after_section_break.docx");
+ loadFromFile(u"sdt_after_section_break.docx");
// Check that the import doesn't introduce unwanted character properties in the paragraph after
// the section break