sw/source/filter/ww8/ww8par5.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
New commits: commit f8857f30cbf7124ca01355f32998c11cb1843950 Author: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> Date: Thu Oct 13 14:42:33 2016 +0200 Related: tdf#90700, fix the link validity check in ww8 sw filter As written, it would never have worked with http links. This function seems only used in DOC import documents. Change-Id: Ibc02f41245ea4c9e9155fc838e67404b34c5fa8f Reviewed-on: https://gerrit.libreoffice.org/29772 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 4868450..327368f 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2328,10 +2328,21 @@ bool CanUseRemoteLink(const OUString &rGrfName) ::ucbhelper::Content aCnt(rGrfName, static_cast< ucb::XCommandEnvironment* >(pCommandEnv), comphelper::getProcessComponentContext()); - OUString aTitle; - aCnt.getPropertyValue("Title") >>= aTitle; - bUseRemote = !aTitle.isEmpty(); + if ( !INetURLObject( rGrfName ).isAnyKnownWebDAVScheme() ) + { + OUString aTitle; + aCnt.getPropertyValue("Title") >>= aTitle; + bUseRemote = !aTitle.isEmpty(); + } + else + { + // is a link to a WebDAV resource + // need to use MediaType to check for link usability + OUString aMediaType; + aCnt.getPropertyValue("MediaType") >>= aMediaType; + bUseRemote = !aMediaType.isEmpty(); + } } catch ( ... ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits