[Libreoffice-commits] core.git: sw/qa
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 27 15:33:43 UTC 2019
sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit e49d35c1f4f86e27a4a6603e5e7a60350ed400d0
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 27 15:11:18 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Aug 27 17:32:06 2019 +0200
"HyperLinkURL" already is a URL here
...at least in all cases encountered during CppunitTest_sw_ooxmllinks, so why
bother going via an assumed filesystem pathname? (Rather, add some
CPPUNIT_ASSERT to clarify expectations.) This code had originally been added
with 2b2f1352c72280dd25ed3bef090a3c708ee4b964 "tdf#86087 Save relative links in
DOCX".
Change-Id: I03e4389338e5549ad3a530bed054a17518f21c96
Reviewed-on: https://gerrit.libreoffice.org/78196
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
index 6bfeb8cda870..d559242d505c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
@@ -38,13 +38,10 @@
\
/* Get original link */ \
OUString sOriginalFileName = getProperty<OUString>(xText, "HyperLinkURL"); \
- INetURLObject aOriginalURL; \
- bool bOk = aOriginalURL.setFSysPath(sOriginalFileName, FSysStyle::Detect); \
- if (!bOk) \
- aOriginalURL = INetURLObject(sOriginalFileName); \
- OUString sFileName = aOriginalURL.GetLastName().isEmpty() \
- ? sOriginalFileName \
- : aOriginalURL.GetLastName(); \
+ INetURLObject aOriginalURL(sOriginalFileName); \
+ CPPUNIT_ASSERT(!aOriginalURL.HasError()); \
+ OUString sFileName = aOriginalURL.GetLastName(); \
+ CPPUNIT_ASSERT(!sFileName.isEmpty()); \
\
/* Get temp path */ \
OUString sTempDir = utl::TempFile::GetTempNameBaseDirectory(); \
More information about the Libreoffice-commits
mailing list