summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-23 17:24:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 23:16:44 +0000
commit2dba28faae2266e72c05d8f3d55bfbc3e5771adb (patch)
tree64eebedb8619ef684ab8eef6efbaadbef68e1dd0 /tools
parent3869e10a30a22a8cf47986d4216d9edd8e501c5f (diff)
add string::strip, can replace EraseLeadingAndTrailingChars
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/string.hxx1
-rw-r--r--tools/source/inet/inetstrm.cxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index fb373b2c3632..c9258bea0117 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -237,6 +237,7 @@ public:
ByteString& EraseLeadingChars( sal_Char c = ' ' );
ByteString& EraseTrailingChars( sal_Char c = ' ' );
ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' );
+
ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index a11f22d4712c..eadeec566a2e 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -1620,8 +1620,8 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
sal_uInt16 nPos = aLowerType.Search ("boundary=");
ByteString aBoundary(aType.copy(nPos + 9));
- aBoundary.EraseLeadingAndTrailingChars (' ');
- aBoundary.EraseLeadingAndTrailingChars ('"');
+ aBoundary = comphelper::string::strip(aBoundary, ' ');
+ aBoundary = comphelper::string::strip(aBoundary, '"');
// Save boundary.
pMsg->SetMultipartBoundary (aBoundary);