summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-08-14 12:37:00 +0200
committerLászló Németh <nemeth@numbertext.org>2019-08-21 12:30:28 +0200
commitd053d573d8bb70ba02ed60eecc590485e2e19497 (patch)
treea1689ed5298d8eb9467bde88970edc5e8c4b524a /oox
parent5f979e05ff06e34a6914d76211e000fe7f7ec895 (diff)
tdf#127070 DOCX export:fix encoding of hyperlinks with non-ASCII letters
Non-ASCII file links in DOCX documents created with Microsoft Word didn't work in Word after export. non_ascii_link.docx: Test file from Word 2016. Change-Id: Ib8c4e2e7b0402b88419d200c55cc1b881a4cde86 Reviewed-on: https://gerrit.libreoffice.org/77450 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 54f8b9f6ca83..a5d565e93839 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -67,6 +67,7 @@
#include <oox/crypto/DocumentEncryption.hxx>
#include <tools/date.hxx>
#include <tools/datetime.hxx>
+#include <tools/urlobj.hxx>
#include <com/sun/star/util/Duration.hpp>
#include <sax/tools/converter.hxx>
#include <oox/token/namespacemap.hxx>
@@ -516,7 +517,7 @@ OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal
aEntry[0].First = "Type";
aEntry[0].Second = rType;
aEntry[1].First = "Target";
- aEntry[1].Second = rTarget;
+ aEntry[1].Second = INetURLObject::decode(rTarget, INetURLObject::DecodeMechanism::Unambiguous, RTL_TEXTENCODING_UTF8);
if( bExternal )
{
aEntry[2].First = "TargetMode";