summaryrefslogtreecommitdiffstats
path: root/sw/source/ui/shells/annotsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/annotsh.cxx')
-rw-r--r--sw/source/ui/shells/annotsh.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 431de8bda43e..5f9e7d3f9d9d 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -124,7 +124,7 @@
#include <app.hrc>
#include <comphelper/processfactory.hxx>
-
+#include <comphelper/string.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <langhelper.hxx>
@@ -966,8 +966,7 @@ void SwAnnotationShell::StateInsert(SfxItemSet &rSet)
{
String sSel(pOLV->GetSelected());
sSel.Erase(255);
- sSel.EraseTrailingChars();
- aHLinkItem.SetName(sSel);
+ aHLinkItem.SetName(comphelper::string::stripEnd(sSel, ' '));
}
sal_uInt16 nHtmlMode = ::GetHtmlMode(rView.GetDocShell());