diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-27 15:11:18 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-27 17:32:06 +0200 |
commit | e49d35c1f4f86e27a4a6603e5e7a60350ed400d0 (patch) | |
tree | c80afa6353c7df7e6d478a0972badf44fc8dd515 | |
parent | df905f41a33d0d7d2cde7fad80c5b3dc3c837c10 (diff) |
"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@redhat.com>
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmllinks.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
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(); \ |