diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-09-17 15:18:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-09-17 16:57:36 +0200 |
commit | 54ddc13bd2cffea7e8be9cc32083acda3fde9ddd (patch) | |
tree | 6a1873c222b25e618cbdda049cb337d9116d573f /tools | |
parent | 717de02367f842a49431b0003eab4f99afec8ab1 (diff) |
Fold INetMIMEStringOutputSink into INetMIMEOutputSink base
Change-Id: I675e656b57fca90e42be2d924c102a995168984d
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/inet/inetmime.cxx | 27 | ||||
-rw-r--r-- | tools/source/inet/inetmsg.cxx | 2 |
2 files changed, 11 insertions, 18 deletions
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index faf350297025..bf22a5297aff 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -861,7 +861,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, } if (pParameters) { - INetMIMEStringOutputSink + INetMIMEOutputSink aSink(0, INetMIMEOutputSink::NO_LINE_LENGTH_LIMIT); while (p != pEnd) { @@ -890,7 +890,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, else if (p != pEnd && *p == '"') if (pParameters) { - INetMIMEStringOutputSink + INetMIMEOutputSink aSink(0, INetMIMEOutputSink::NO_LINE_LENGTH_LIMIT); bool bInvalid = false; for (++p;;) @@ -2838,9 +2838,15 @@ OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, return sDecoded; } -// INetMIMEOutputSink +void INetMIMEOutputSink::writeSequence(const sal_Char * pBegin, + const sal_Char * pEnd) +{ + OSL_ENSURE(pBegin && pBegin <= pEnd, + "INetMIMEOutputSink::writeSequence(): Bad sequence"); + + m_aBuffer.append(pBegin, pEnd - pBegin); +} -// virtual sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence) { sal_Size nLength = rtl_str_getLength(pSequence); @@ -2848,7 +2854,6 @@ sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence) return nLength; } -// virtual void INetMIMEOutputSink::writeSequence(const sal_Unicode * pBegin, const sal_Unicode * pEnd) { @@ -2874,18 +2879,6 @@ void INetMIMEOutputSink::writeLineEnd() m_nColumn = 0; } -// INetMIMEStringOutputSink - -// virtual -void INetMIMEStringOutputSink::writeSequence(const sal_Char * pBegin, - const sal_Char * pEnd) -{ - OSL_ENSURE(pBegin && pBegin <= pEnd, - "INetMIMEStringOutputSink::writeSequence(): Bad sequence"); - - m_aBuffer.append(pBegin, pEnd - pBegin); -} - // INetMIMEEncodedWordOutputSink static const sal_Char aEscape[128] diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx index 099e6bf4915f..5debdf934c2f 100644 --- a/tools/source/inet/inetmsg.cxx +++ b/tools/source/inet/inetmsg.cxx @@ -46,7 +46,7 @@ void INetMIMEMessage::SetHeaderField_Impl ( const OUString &rValue, sal_uIntPtr &rnIndex) { - INetMIMEStringOutputSink aSink (0, 32767); /* weird the mime standard says that aline MUST not be longeur that 998 */ + INetMIMEOutputSink aSink (0, 32767); /* weird the mime standard says that aline MUST not be longeur that 998 */ INetMIME::writeHeaderFieldBody ( aSink, eType, rValue, osl_getThreadTextEncoding(), false); SetHeaderField_Impl ( |