summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-07-10 00:12:04 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-07-10 01:48:08 +0200
commit2f2f4767089512c34514896bc37823f9310e9dd4 (patch)
tree8b337d4eee8f1e4bc11b152e7a9be3b3fcafa656 /sc
parent691e9427117f909273f648d167465802580ec770 (diff)
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@fbihome.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx5
1 files changed, 3 insertions, 2 deletions
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);