cui/source/dialogs/linkdlg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 69fac8ac09a5777d8d74eb72822410a5a02536c2 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits