summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/drwtxtex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/drwtxtex.cxx')
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 910497d489e4..c30db2c2c476 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -137,11 +137,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_THES:
{
- String aReplaceText;
+ OUString aReplaceText;
SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
if (pItem2)
aReplaceText = pItem2->GetValue();
- if (aReplaceText.Len() > 0)
+ if (!aReplaceText.isEmpty())
ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
break;
}
@@ -1012,8 +1012,8 @@ void SwDrawTextShell::StateInsert(SfxItemSet &rSet)
}
else
{
- String sSel(pOLV->GetSelected());
- sSel.Erase(255);
+ OUString sSel(pOLV->GetSelected());
+ sSel = sSel.copy(0, std::min(255, sSel.getLength()));
aHLinkItem.SetName(comphelper::string::stripEnd(sSel, ' '));
}