Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
54ddc13b
Kaydet (Commit)
54ddc13b
authored
Eyl 17, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fold INetMIMEStringOutputSink into INetMIMEOutputSink base
Change-Id: I675e656b57fca90e42be2d924c102a995168984d
üst
717de023
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
45 deletions
+21
-45
inetmime.hxx
include/tools/inetmime.hxx
+10
-27
inetmime.cxx
tools/source/inet/inetmime.cxx
+10
-17
inetmsg.cxx
tools/source/inet/inetmsg.cxx
+1
-1
No files found.
include/tools/inetmime.hxx
Dosyayı görüntüle @
54ddc13b
...
@@ -632,16 +632,15 @@ public:
...
@@ -632,16 +632,15 @@ public:
private
:
private
:
sal_uInt32
m_nColumn
;
sal_uInt32
m_nColumn
;
sal_uInt32
m_nLineLengthLimit
;
sal_uInt32
m_nLineLengthLimit
;
OStringBuffer
m_aBuffer
;
protected
:
/** Write a sequence of octets.
/** Write a sequence of octets.
@param pBegin Points to the start of the sequence, must not be null.
@param pBegin Points to the start of the sequence, must not be null.
@param pEnd Points past the end of the sequence, must be >= pBegin.
@param pEnd Points past the end of the sequence, must be >= pBegin.
*/
*/
virtual
void
writeSequence
(
const
sal_Char
*
pBegin
,
void
writeSequence
(
const
sal_Char
*
pBegin
,
const
sal_Char
*
pEnd
);
const
sal_Char
*
pEnd
)
=
0
;
/** Write a null terminated sequence of octets (without the terminating
/** Write a null terminated sequence of octets (without the terminating
null).
null).
...
@@ -667,11 +666,11 @@ protected:
...
@@ -667,11 +666,11 @@ protected:
const
sal_Unicode
*
pEnd
);
const
sal_Unicode
*
pEnd
);
public
:
public
:
INetMIMEOutputSink
(
sal_uInt32
nTheColumn
,
sal_uInt32
nTheLineLengthLimit
)
:
INetMIMEOutputSink
(
sal_uInt32
nTheColumn
=
0
,
sal_uInt32
nTheLineLengthLimit
=
INetMIME
::
SOFT_LINE_LENGTH_LIMIT
)
:
m_nColumn
(
nTheColumn
),
m_nLineLengthLimit
(
nTheLineLengthLimit
)
{}
m_nColumn
(
nTheColumn
),
m_nLineLengthLimit
(
nTheLineLengthLimit
)
{}
virtual
~
INetMIMEOutputSink
()
{}
/** Get the current column.
/** Get the current column.
@return The current column (starting from zero).
@return The current column (starting from zero).
...
@@ -737,6 +736,11 @@ public:
...
@@ -737,6 +736,11 @@ public:
*/
*/
void
writeLineEnd
();
void
writeLineEnd
();
OString
takeBuffer
()
{
return
m_aBuffer
.
makeStringAndClear
();
}
/** A manipulator function that writes a line end (CR LF).
/** A manipulator function that writes a line end (CR LF).
@param rSink Some sink.
@param rSink Some sink.
...
@@ -785,27 +789,6 @@ inline void INetMIME::writeEscapeSequence(INetMIMEOutputSink & rSink,
...
@@ -785,27 +789,6 @@ inline void INetMIME::writeEscapeSequence(INetMIMEOutputSink & rSink,
<<
sal_uInt8
(
getHexDigit
(
nChar
&
15
));
<<
sal_uInt8
(
getHexDigit
(
nChar
&
15
));
}
}
class
INetMIMEStringOutputSink
:
public
INetMIMEOutputSink
{
OStringBuffer
m_aBuffer
;
using
INetMIMEOutputSink
::
writeSequence
;
virtual
void
writeSequence
(
const
sal_Char
*
pBegin
,
const
sal_Char
*
pEnd
)
SAL_OVERRIDE
;
public
:
inline
INetMIMEStringOutputSink
(
sal_uInt32
nColumn
=
0
,
sal_uInt32
nLineLengthLimit
=
INetMIME
::
SOFT_LINE_LENGTH_LIMIT
)
:
INetMIMEOutputSink
(
nColumn
,
nLineLengthLimit
)
{}
OString
takeBuffer
()
{
return
m_aBuffer
.
makeStringAndClear
();
}
};
class
INetMIMEEncodedWordOutputSink
class
INetMIMEEncodedWordOutputSink
{
{
public
:
public
:
...
...
tools/source/inet/inetmime.cxx
Dosyayı görüntüle @
54ddc13b
...
@@ -861,7 +861,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
...
@@ -861,7 +861,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
}
}
if
(
pParameters
)
if
(
pParameters
)
{
{
INetMIME
String
OutputSink
INetMIMEOutputSink
aSink
(
0
,
INetMIMEOutputSink
::
NO_LINE_LENGTH_LIMIT
);
aSink
(
0
,
INetMIMEOutputSink
::
NO_LINE_LENGTH_LIMIT
);
while
(
p
!=
pEnd
)
while
(
p
!=
pEnd
)
{
{
...
@@ -890,7 +890,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
...
@@ -890,7 +890,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
else
if
(
p
!=
pEnd
&&
*
p
==
'"'
)
else
if
(
p
!=
pEnd
&&
*
p
==
'"'
)
if
(
pParameters
)
if
(
pParameters
)
{
{
INetMIME
String
OutputSink
INetMIMEOutputSink
aSink
(
0
,
INetMIMEOutputSink
::
NO_LINE_LENGTH_LIMIT
);
aSink
(
0
,
INetMIMEOutputSink
::
NO_LINE_LENGTH_LIMIT
);
bool
bInvalid
=
false
;
bool
bInvalid
=
false
;
for
(
++
p
;;)
for
(
++
p
;;)
...
@@ -2838,9 +2838,15 @@ OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
...
@@ -2838,9 +2838,15 @@ OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
return
sDecoded
;
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
INetMIMEOutputSink
::
writeSequence
(
const
sal_Char
*
pSequence
)
{
{
sal_Size
nLength
=
rtl_str_getLength
(
pSequence
);
sal_Size
nLength
=
rtl_str_getLength
(
pSequence
);
...
@@ -2848,7 +2854,6 @@ sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence)
...
@@ -2848,7 +2854,6 @@ sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence)
return
nLength
;
return
nLength
;
}
}
// virtual
void
INetMIMEOutputSink
::
writeSequence
(
const
sal_Unicode
*
pBegin
,
void
INetMIMEOutputSink
::
writeSequence
(
const
sal_Unicode
*
pBegin
,
const
sal_Unicode
*
pEnd
)
const
sal_Unicode
*
pEnd
)
{
{
...
@@ -2874,18 +2879,6 @@ void INetMIMEOutputSink::writeLineEnd()
...
@@ -2874,18 +2879,6 @@ void INetMIMEOutputSink::writeLineEnd()
m_nColumn
=
0
;
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
// INetMIMEEncodedWordOutputSink
static
const
sal_Char
aEscape
[
128
]
static
const
sal_Char
aEscape
[
128
]
...
...
tools/source/inet/inetmsg.cxx
Dosyayı görüntüle @
54ddc13b
...
@@ -46,7 +46,7 @@ void INetMIMEMessage::SetHeaderField_Impl (
...
@@ -46,7 +46,7 @@ void INetMIMEMessage::SetHeaderField_Impl (
const
OUString
&
rValue
,
const
OUString
&
rValue
,
sal_uIntPtr
&
rnIndex
)
sal_uIntPtr
&
rnIndex
)
{
{
INetMIME
String
OutputSink
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
(
INetMIME
::
writeHeaderFieldBody
(
aSink
,
eType
,
rValue
,
osl_getThreadTextEncoding
(),
false
);
aSink
,
eType
,
rValue
,
osl_getThreadTextEncoding
(),
false
);
SetHeaderField_Impl
(
SetHeaderField_Impl
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment