[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 12 16:20:45 UTC 2018
cui/source/dialogs/linkdlg.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 69fac8ac09a5777d8d74eb72822410a5a02536c2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 12 10:23:31 2018 +0000
show something for the link name if there is no link body
Change-Id: I9a445bed6072a48c2eca67ee403218e749ff3feb
Reviewed-on: https://gerrit.libreoffice.org/47800
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 6d61767457a5..b9edcfbf5518 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -628,7 +628,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool
if( aFileName.getLength() > aTxt.getLength() )
aTxt = aFileName;
- else if( aTxt.indexOf( aFileName, aTxt.getLength() - aFileName.getLength() ) == -1 )
+ else if (!aFileName.isEmpty() && aTxt.indexOf(aFileName, aTxt.getLength() - aFileName.getLength()) == -1)
// filename not in string
aTxt = aFileName;
More information about the Libreoffice-commits
mailing list