[Libreoffice-commits] core.git: sc/qa
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 9 23:49:21 UTC 2019
sc/qa/unit/subsequent_export-test.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 2f2f4767089512c34514896bc37823f9310e9dd4
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Wed Jul 10 00:12:04 2019 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Jul 10 01:48:08 2019 +0200
tdf#126255 compare the URL of the exported file
xDocSh contains the original loaded file.
Change-Id: Idfe15ebd637b55590ba25c521904fbb7406a6a9a
Reviewed-on: https://gerrit.libreoffice.org/75328
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ed7ad9df3269..82106d2bc0d2 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3089,7 +3089,8 @@ void ScExportTest::testRelativePathsODS()
ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
- xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "content.xml", FORMAT_ODS);
+ std::shared_ptr<utl::TempFile> pTempFile = exportTo(xDocSh.get(), FORMAT_ODS);
+ xmlDocPtr pDoc = XPathHelper::parseExport(pTempFile, m_xSFactory, "content.xml");
CPPUNIT_ASSERT(pDoc);
OUString aURL = getXPath(pDoc,
"/office:document-content/office:body/office:spreadsheet/table:table/table:table-row[2]/table:table-cell[2]/text:p/text:a", "href");
@@ -3098,7 +3099,7 @@ void ScExportTest::testRelativePathsODS()
// there is no way to get a relative URL for the link, because ../X:/ is undefined.
if (!aURL.startsWith(".."))
{
- sal_Unicode aDocDrive = lcl_getWindowsDrive(xDocSh->getDocumentBaseURL());
+ sal_Unicode aDocDrive = lcl_getWindowsDrive(pTempFile->GetURL());
sal_Unicode aLinkDrive = lcl_getWindowsDrive(aURL);
CPPUNIT_ASSERT_MESSAGE("document on the same drive but no relative link!",
aDocDrive != 0 && aLinkDrive != 0 && aDocDrive != aLinkDrive);
More information about the Libreoffice-commits
mailing list