summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-21 16:55:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-08-21 20:00:47 +0200
commiteaf9565c84017ae3f162b3b6fd229b9772bf513e (patch)
treefd14c5d504c706541c6d5bafe8aa39146a5a0a29 /cui
parent8bf1542f856bd2b8617d7a0870824a3a2ada4b6c (diff)
Avoid extra calls to INetURLObject::decode
Change-Id: I700c4093213395a12342534fb7685969b5e5b220 Reviewed-on: https://gerrit.libreoffice.org/77891 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/linkdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index be1f5e288f27..33f7529516da 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -559,8 +559,8 @@ void SvBaseLinksDlg::InsertEntry(const SvBaseLink& rLink, int nPos, bool bSelect
auto nWidthPixel = m_xTbLinks->get_column_width(0);
OUString aTxt = m_xVirDev->GetEllipsisString(sFileNm, nWidthPixel, DrawTextFlags::PathEllipsis);
INetURLObject aPath( sFileNm, INetProtocol::File );
- OUString aFileName = aPath.getName();
- aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous);
+ OUString aFileName = aPath.getName(
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::Unambiguous);
if( aFileName.getLength() > aTxt.getLength() )
aTxt = aFileName;