Kaydet (Commit) 2dba28fa authored tarafından Caolán McNamara's avatar Caolán McNamara

add string::strip, can replace EraseLeadingAndTrailingChars

üst 3869e10a
...@@ -237,6 +237,7 @@ public: ...@@ -237,6 +237,7 @@ public:
ByteString& EraseLeadingChars( sal_Char c = ' ' ); ByteString& EraseLeadingChars( sal_Char c = ' ' );
ByteString& EraseTrailingChars( sal_Char c = ' ' ); ByteString& EraseTrailingChars( sal_Char c = ' ' );
ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' ); ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' );
ByteString& ConvertLineEnd( LineEnd eLineEnd ); ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd() ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); } { return ConvertLineEnd( GetSystemLineEnd() ); }
......
...@@ -1620,8 +1620,8 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) ...@@ -1620,8 +1620,8 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
sal_uInt16 nPos = aLowerType.Search ("boundary="); sal_uInt16 nPos = aLowerType.Search ("boundary=");
ByteString aBoundary(aType.copy(nPos + 9)); ByteString aBoundary(aType.copy(nPos + 9));
aBoundary.EraseLeadingAndTrailingChars (' '); aBoundary = comphelper::string::strip(aBoundary, ' ');
aBoundary.EraseLeadingAndTrailingChars ('"'); aBoundary = comphelper::string::strip(aBoundary, '"');
// Save boundary. // Save boundary.
pMsg->SetMultipartBoundary (aBoundary); pMsg->SetMultipartBoundary (aBoundary);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment