summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-11-13 16:10:49 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-11-13 18:23:43 +0100
commit3dee7948c732faf488846d4d3d1237e89afde28c (patch)
tree4b3237a12fa99081fae056791df5a7c67b77f950 /sw/qa/extras
parent6be596c282f84a3cb3a62edccfdfbf69663cf59e (diff)
More proper construction of vnd.sun.star.pkg URL
See commit bff8d843bd4e5dcca5dc1a60c2c7852b1b72a00b The SwUiWriterTest::testEmbeddedDataSource unit test is adjusted to test the paths with "#". Change-Id: I8d85147128915c7100ab9cc2888eb73c94fe6486 Reviewed-on: https://gerrit.libreoffice.org/44678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx2
-rw-r--r--sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods (renamed from sw/qa/extras/uiwriter/data/calc-data-source.ods)bin16055 -> 16055 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt (renamed from sw/qa/extras/uiwriter/data/embedded-data-source.odt)bin9554 -> 9554 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx3
4 files changed, 3 insertions, 2 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 09fe3589b9a8..3d791eca7a47 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -791,7 +791,7 @@ protected:
std::shared_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
xmlDocPtr pXmlDoc = parseXmlStream(pStream.get());
- pXmlDoc->name = reinterpret_cast<char *>(xmlStrdup(reinterpret_cast<xmlChar const *>(OUStringToOString(maTempFile.GetURL(), RTL_TEXTENCODING_UTF8).getStr())));
+ pXmlDoc->name = reinterpret_cast<char *>(xmlStrdup(reinterpret_cast<xmlChar const *>(OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr())));
return pXmlDoc;
}
diff --git a/sw/qa/extras/uiwriter/data/calc-data-source.ods b/sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods
index 0dec1df7db40..0dec1df7db40 100644
--- a/sw/qa/extras/uiwriter/data/calc-data-source.ods
+++ b/sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/embedded-data-source.odt b/sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt
index 2eb54c5fb4ce..2eb54c5fb4ce 100644
--- a/sw/qa/extras/uiwriter/data/embedded-data-source.odt
+++ b/sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 202c91cd9069..34f0e21466d1 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3681,7 +3681,8 @@ void SwUiWriterTest::testEmbeddedDataSource()
CPPUNIT_ASSERT(!xDatabaseContext->hasByName("calc-data-source"));
// Load: should have a component and a data source, too.
- load(DATA_DIRECTORY, "embedded-data-source.odt");
+ // Path with "#" must not cause issues
+ load(DATA_DIRECTORY + OUStringLiteral("hash%23path/"), "embedded-data-source.odt");
CPPUNIT_ASSERT(mxComponent.is());
CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));