summaryrefslogtreecommitdiffstats
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optdict.cxx3
-rw-r--r--cui/source/options/optgenrl.cxx5
-rw-r--r--cui/source/options/optjava.cxx9
3 files changed, 7 insertions, 10 deletions
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index e300424756e1..b1f3dc6afe33 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -127,8 +127,7 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent,
IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
{
- String sDict = aNameEdit.GetText();
- sDict.EraseTrailingChars();
+ String sDict = comphelper::string::stripEnd(aNameEdit.GetText(), ' ');
// add extension for personal dictionaries
sDict.AppendAscii(".dic");
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 093358db607f..2454f17725fe 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -44,7 +44,7 @@
#include <svx/strarray.hxx>
#include <svx/svxids.hrc> // SID_FIELD_GRABFOCUS
-#define TRIM(s) s.EraseLeadingChars().EraseTrailingChars()
+#define TRIM(s) comphelper::string::strip(s, ' ')
// struct GeneralTabPage_Impl --------------------------------------------
@@ -346,8 +346,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
String aTxt = pEdit->GetText();
sal_Unicode cChar = ( aTxt.Len() > 0 ) ? aTxt.GetChar(0) : ' ';
aShortStr.SetChar( nPos, cChar );
- aShortStr.EraseTrailingChars();
- aShortName.SetText( aShortStr );
+ aShortName.SetText(comphelper::string::stripEnd(aShortStr, ' '));
}
return 0;
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 2e0a2f381668..843514b1a7eb 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -53,7 +53,6 @@
// define ----------------------------------------------------------------
#define CLASSPATH_DELIMITER SAL_PATHSEPARATOR
-#define STRIM( s ) s.EraseLeadingChars().EraseTrailingChars()
#define BUTTON_BORDER 2
#define RESET_TIMEOUT 300
@@ -745,8 +744,8 @@ SvxJavaParameterDlg::~SvxJavaParameterDlg()
IMPL_LINK_NOARG(SvxJavaParameterDlg, ModifyHdl_Impl)
{
- String sParam = STRIM( m_aParameterEdit.GetText() );
- m_aAssignBtn.Enable( sParam.Len() > 0 );
+ rtl::OUString sParam = comphelper::string::strip(m_aParameterEdit.GetText(), ' ');
+ m_aAssignBtn.Enable(!sParam.isEmpty());
return 0;
}
@@ -755,8 +754,8 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, ModifyHdl_Impl)
IMPL_LINK_NOARG(SvxJavaParameterDlg, AssignHdl_Impl)
{
- String sParam = STRIM( m_aParameterEdit.GetText() );
- if ( sParam.Len() > 0 )
+ rtl::OUString sParam = comphelper::string::strip(m_aParameterEdit.GetText(), ' ');
+ if (!sParam.isEmpty())
{
sal_uInt16 nPos = m_aAssignedList.GetEntryPos( sParam );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )