Fix Writer: insert link - broken after save & re-load

Change-Id: I7675e808ab132cfe9f8afa75d34a71bd3acb730d
Reviewed-on: https://gerrit.libreoffice.org/85450
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
This commit is contained in:
Muhammet Kara 2019-12-19 01:52:21 +03:00
parent c231d68eb4
commit b84c980df8

View file

@ -435,6 +435,13 @@ L.Map.include({
return parser.parseFromString(html, 'text/html').documentElement.getElementsByTagName('body')[0].textContent;
},
makeURLFromStr: function(str) {
if (!(str.startsWith('http://') || str.startsWith('https://'))) {
str = 'http://' + str;
}
return str;
},
showHyperlinkDialog: function() {
var map = this;
var text = '';
@ -466,7 +473,7 @@ L.Map.include({
},
'Hyperlink.URL': {
type: 'string',
value: data.link
value: map.makeURLFromStr(data.link)
}
};
map.sendUnoCommand('.uno:SetHyperlink', command);