summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-12 10:23:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-12 17:20:15 +0100
commit69fac8ac09a5777d8d74eb72822410a5a02536c2 (patch)
treed82308d0134cb1be4b96f7c4a34fd68aeaf3e624 /cui
parent7f063b77da6db00806d9e6c60239a59d75ae3cee (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/linkdlg.cxx2
1 files changed, 1 insertions, 1 deletions
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;