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:
parent
c231d68eb4
commit
b84c980df8
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue