summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-11-13 14:50:41 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-21 18:05:37 +0100
commit79a1fafadb1ac54b8212bc164d8b85d798c74937 (patch)
tree65d51a92e9578377d902eb2fb15ce5776b26e340
parentddcfaf0e51dbc2d60e6ada9aa236e04dee431ab5 (diff)
tdf#128775 Writer Hyperlink dialog: fix encoding of inserted target URL
text, also its preview in the dialog window, when the URL contains anchor at the end. Change-Id: Ibedb86238f660177b3dd476cd6a13f1ca5f05e12 Reviewed-on: https://gerrit.libreoffice.org/82654 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
-rw-r--r--cui/source/dialogs/hldoctp.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 4fb9aad812f8..55548e99835a 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -105,7 +105,10 @@ OUString SvxHyperlinkDocTp::GetCurrentURL () const
if ( aURL.GetProtocol() != INetProtocol::NotValid ) // maybe the path is already a valid
aStrURL = aStrPath; // hyperlink, then we can use this path directly
else
+ {
osl::FileBase::getFileURLFromSystemPath( aStrPath, aStrURL );
+ aStrURL = INetURLObject::decode(aStrURL, INetURLObject::DecodeMechanism::ToIUri, RTL_TEXTENCODING_UTF8);
+ }
//#105788# always create a URL even if it is not valid
if( aStrURL.isEmpty() )