diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 13:15:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-11 14:46:46 +0100 |
commit | 8f5629fd5aafc85e509a4160a11a285b0a66e7c0 (patch) | |
tree | 143883c85467b5ce9f5c665338e0f8a25067a0cd /svx | |
parent | callcatcher: update unused code (diff) | |
download | core-8f5629fd5aafc85e509a4160a11a285b0a66e7c0.tar.gz core-8f5629fd5aafc85e509a4160a11a285b0a66e7c0.zip |
remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/passwd.cxx | 5 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 8 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/filtnav.cxx | 7 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 4 |
9 files changed, 22 insertions, 22 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index a7e09d212189..32685fab68ce 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -35,9 +35,10 @@ #include "docrecovery.hrc" #include <comphelper/componentcontext.hxx> +#include <comphelper/configurationhelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> -#include <comphelper/configurationhelper.hxx> +#include <comphelper/string.hxx> #include <svtools/imagemgr.hxx> #include <svtools/xtextedt.hxx> #include <tools/urlobj.hxx> @@ -1522,7 +1523,7 @@ sal_Bool BrokenRecoveryDialog::isExecutionNeeded() //=============================================== IMPL_LINK_NOARG(BrokenRecoveryDialog, OkButtonHdl) { - String sPhysicalPath = m_aSaveDirED.GetText().EraseLeadingChars().EraseTrailingChars(); + String sPhysicalPath = comphelper::string::strip(m_aSaveDirED.GetText(), ' '); rtl::OUString sURL; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPhysicalPath, sURL ); m_sSavePath = sURL; diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index ac3be2c794a5..5773bb38bbe7 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -26,6 +26,7 @@ * ************************************************************************/ +#include <comphelper/string.hxx> #include <tools/shl.hxx> #include <vcl/msgbox.hxx> @@ -73,9 +74,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl) { if ( !bEmpty ) { - String aPasswd = aRepeatPasswdED.GetText(); - aPasswd.EraseLeadingChars().EraseTrailingChars(); - + String aPasswd = comphelper::string::strip(aRepeatPasswdED.GetText(), ' '); if ( !aPasswd.Len() && aOKBtn.IsEnabled() ) aOKBtn.Disable(); else if ( aPasswd.Len() && !aOKBtn.IsEnabled() ) diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index c4119fd1fbc2..8bc620b669de 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -68,6 +68,7 @@ #include <comphelper/numbers.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> +#include <comphelper/string.hxx> #include <connectivity/dbtools.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> @@ -574,10 +575,9 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) for ( size_t i=0; i<2; ++i ) { - sPurePostfix = aPostfix[i]; - sPurePostfix.EraseLeadingChars(' '); - sPurePostfix.EraseLeadingChars('('); - sPurePostfix.EraseTrailingChars(')'); + sPurePostfix = comphelper::string::stripStart(aPostfix[i], ' '); + sPurePostfix = comphelper::string::stripStart(sPurePostfix, '('); + sPurePostfix = comphelper::string::stripEnd(sPurePostfix, ')'); sRealName = sFieldName; sRealName += '_'; sRealName += sPurePostfix; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index bd3bf23abbdd..a015f6cce669 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -57,6 +57,7 @@ #include <comphelper/numbers.hxx> #include <comphelper/property.hxx> #include <comphelper/servicehelper.hxx> +#include <comphelper/string.hxx> #include <connectivity/formattedcolumnvalue.hxx> #include <cppuhelper/typeprovider.hxx> #include <i18npool/lang.h> @@ -2976,8 +2977,7 @@ sal_Bool DbFilterField::commitControl() if (m_aText != aText) { // check the text with the SQL-Parser - String aNewText(aText); - aNewText.EraseTrailingChars(); + String aNewText(comphelper::string::stripEnd(aText, ' ')); if (aNewText.Len() != 0) { ::rtl::OUString aErrorMsg; diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 08f3cf88c026..cbee3dfdc90c 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -63,6 +63,7 @@ #include <com/sun/star/xml/dom/DOMException.hpp> #include <com/sun/star/form/binding/XValueBinding.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <rtl/logfile.hxx> using namespace ::com::sun::star::beans; @@ -3116,7 +3117,7 @@ namespace svxform //------------------------------------------------------------------------ IMPL_LINK_NOARG(AddConditionDialog, ResultHdl) { - String sCondition = m_aConditionED.GetText().EraseLeadingChars().EraseTrailingChars(); + String sCondition = comphelper::string::strip(m_aConditionED.GetText(), ' '); String sResult; if ( sCondition.Len() > 0 ) { diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 0c69784cca00..0b278843aa82 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -44,9 +44,9 @@ /** === end UNO includes === **/ #include <comphelper/processfactory.hxx> -#include <svx/fmtools.hxx> #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> +#include <comphelper/string.hxx> #include <comphelper/uno3.hxx> #include <connectivity/dbtools.hxx> #include <cppuhelper/implbase1.hxx> @@ -59,6 +59,7 @@ #include <sfx2/request.hxx> #include <svx/dialmgr.hxx> #include <svx/fmshell.hxx> +#include <svx/fmtools.hxx> #include <svx/svxids.hrc> #include <tools/shl.hxx> #include <vcl/wrkwin.hxx> @@ -1233,9 +1234,7 @@ sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStrin DBG_ASSERT(((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem), "FmFilterNavigator::EditedEntry() wrong entry"); - UniString aText(rNewText); - aText.EraseTrailingChars(); - aText.EraseLeadingChars(); + UniString aText(comphelper::string::strip(rNewText, ' ')); if (aText.Len() == 0) { // deleting the entry asynchron diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index f3daa69e0656..d3d644f00111 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2562,8 +2562,8 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn } } - strFieldList.EraseTrailingChars(';'); - sFieldDisplayNames.EraseTrailingChars(';'); + strFieldList = comphelper::string::stripEnd(strFieldList, ';'); + sFieldDisplayNames = comphelper::string::stripEnd(sFieldDisplayNames, ';'); if (pfmscContextInfo->arrFields.empty()) { diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index b274da8a219d..05fdbedeab54 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -27,6 +27,7 @@ ************************************************************************/ +#include <comphelper/string.hxx> #include <svx/svdotext.hxx> #include "svx/svditext.hxx" #include <svx/svdpagv.hxx> // for the request in Paint to see whether @@ -998,8 +999,7 @@ void SdrTextObj::TakeObjNameSingul(XubString& rName) const if(pOutlinerParaObject && eTextKind != OBJ_OUTLINETEXT) { // shouldn't currently cause any problems at OUTLINETEXT - XubString aStr2(pOutlinerParaObject->GetTextObject().GetText(0)); - aStr2.EraseLeadingChars(); + XubString aStr2(comphelper::string::stripStart(pOutlinerParaObject->GetTextObject().GetText(0), ' ')); // avoid non expanded text portions in object name // (second condition is new) diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 221c674b41ae..135733074ed5 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -26,7 +26,7 @@ * ************************************************************************/ - +#include <comphelper/string.hxx> #include <svl/style.hxx> #include <svx/svdotext.hxx> #include "svx/svditext.hxx" @@ -282,7 +282,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() String aFam = pName->Copy(0, pName->Len() - 6); aFam.Erase(0,1); - aFam.EraseTrailingChars(); + aFam = comphelper::string::stripEnd(aFam, ' '); sal_uInt16 nFam = (sal_uInt16)aFam.ToInt32(); |