diff options
Diffstat (limited to 'sw/source/ui/shells/textsh.cxx')
-rw-r--r-- | sw/source/ui/shells/textsh.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 07b562214fdb..3ad1e1ff61cb 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -30,7 +30,7 @@ #define _SW_FRMVALID_HXX #include <hintids.hxx> - +#include <comphelper/string.hxx> #include <svl/globalnameitem.hxx> #include <svl/ownlist.hxx> #include <sfx2/frmdescr.hxx> @@ -850,8 +850,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) { String sReturn = rSh.GetSelTxt(); sReturn.Erase(255); - sReturn.EraseTrailingChars(); - aHLinkItem.SetName(sReturn); + aHLinkItem.SetName(comphelper::string::stripEnd(sReturn, ' ')); } aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() | |