diff options
Diffstat (limited to 'sw/source/ui/shells')
-rw-r--r-- | sw/source/ui/shells/annotsh.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtex.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh.cxx | 5 |
3 files changed, 6 insertions, 8 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()); diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index be020a989bb2..321ce0aec7e4 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <i18npool/mslangid.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> @@ -940,8 +941,7 @@ void SwDrawTextShell::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(GetView().GetDocShell()); 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() | |