summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/editsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/editsh.cxx')
-rw-r--r--sc/source/ui/view/editsh.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index ef0308f6cd6c..e5e03c1393d4 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -27,7 +27,7 @@
************************************************************************/
#include <com/sun/star/linguistic2/XThesaurus.hpp>
-
+#include <comphelper/string.hxx>
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
@@ -692,8 +692,7 @@ void ScEditShell::GetState( SfxItemSet& rSet )
// use selected text as name for urls
String sReturn = pActiveView->GetSelected();
sReturn.Erase(255);
- sReturn.EraseTrailingChars();
- aHLinkItem.SetName(sReturn);
+ aHLinkItem.SetName(comphelper::string::stripEnd(sReturn, ' '));
}
rSet.Put(aHLinkItem);
}