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
593f0830
Kaydet (Commit)
593f0830
authored
Şub 25, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert enum _ImplINetRFC822MessageHeaderState to enum class
Change-Id: Ifbfbec8ee015d5f57f5c864a65d0aed0af9f5318
üst
63dc0b4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
46 deletions
+49
-46
inetmsg.cxx
tools/source/inet/inetmsg.cxx
+49
-46
No files found.
tools/source/inet/inetmsg.cxx
Dosyayı görüntüle @
593f0830
...
...
@@ -108,18 +108,21 @@ static const std::map<InetMessageField, const char *> ImplINetRFC822MessageHeade
{
InetMessageField
::
RETURN_RECEIPT_TO
,
"Return-Receipt-To"
}
,
};
enum
_ImplINetRFC822MessageHeaderState
/*
State of RFC822 header parsing
*/
enum
class
HeaderState
{
INETMSG_RFC822_
BEGIN
,
INETMSG_RFC822_
CHECK
,
INETMSG_RFC822_
OK
,
INETMSG_RFC822_
JUNK
,
INETMSG_RFC822_
TOKEN_RE
,
INETMSG_RFC822_
TOKEN_RETURNMINUS
,
INETMSG_RFC822_
TOKEN_XMINUS
,
INETMSG_RFC822_
LETTER_C
,
INETMSG_RFC822_
LETTER_S
BEGIN
,
CHECK
,
OK
,
JUNK
,
TOKEN_RE
,
TOKEN_RETURNMINUS
,
TOKEN_XMINUS
,
LETTER_C
,
LETTER_S
};
/* ParseDateField and local helper functions.
...
...
@@ -283,17 +286,17 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
const
sal_Char
*
pStop
=
pData
+
aName
.
getLength
()
+
1
;
const
sal_Char
*
check
=
""
;
InetMessageField
nIdx
=
static_cast
<
InetMessageField
>
(
CONTAINER_APPEND
);
int
eState
=
INETMSG_RFC822_
BEGIN
;
int
eOkState
=
INETMSG_RFC822_
OK
;
InetMessageField
nIdx
=
static_cast
<
InetMessageField
>
(
CONTAINER_APPEND
);
HeaderState
eState
=
HeaderState
::
BEGIN
;
HeaderState
eOkState
=
HeaderState
::
OK
;
while
(
pData
<
pStop
)
{
switch
(
eState
)
{
case
INETMSG_RFC822_
BEGIN
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
BEGIN
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -303,7 +306,7 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
break
;
case
'c'
:
eState
=
INETMSG_RFC822_
LETTER_C
;
eState
=
HeaderState
::
LETTER_C
;
break
;
case
'd'
:
...
...
@@ -333,11 +336,11 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
case
'r'
:
check
=
"e"
;
eOkState
=
INETMSG_RFC822_
TOKEN_RE
;
eOkState
=
HeaderState
::
TOKEN_RE
;
break
;
case
's'
:
eState
=
INETMSG_RFC822_
LETTER_S
;
eState
=
HeaderState
::
LETTER_S
;
break
;
case
't'
:
...
...
@@ -347,19 +350,19 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
case
'x'
:
check
=
"-"
;
eOkState
=
INETMSG_RFC822_
TOKEN_XMINUS
;
eOkState
=
HeaderState
::
TOKEN_XMINUS
;
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
TOKEN_RE
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
TOKEN_RE
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -375,19 +378,19 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
case
't'
:
check
=
"urn-"
;
eOkState
=
INETMSG_RFC822_
TOKEN_RETURNMINUS
;
eOkState
=
HeaderState
::
TOKEN_RETURNMINUS
;
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
TOKEN_RETURNMINUS
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
TOKEN_RETURNMINUS
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -402,15 +405,15 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
TOKEN_XMINUS
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
TOKEN_XMINUS
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -420,15 +423,15 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
LETTER_C
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
LETTER_C
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -443,15 +446,15 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
LETTER_S
:
eState
=
INETMSG_RFC822_
CHECK
;
eOkState
=
INETMSG_RFC822_
OK
;
case
HeaderState
:
:
LETTER_S
:
eState
=
HeaderState
::
CHECK
;
eOkState
=
HeaderState
::
OK
;
switch
(
ascii_toLowerCase
(
*
pData
))
{
...
...
@@ -466,13 +469,13 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
break
;
default
:
eState
=
INETMSG_RFC822_
JUNK
;
eState
=
HeaderState
::
JUNK
;
break
;
}
pData
++
;
break
;
case
INETMSG_RFC822_
CHECK
:
case
HeaderState
:
:
CHECK
:
if
(
*
check
)
{
while
(
*
pData
&&
*
check
&&
...
...
@@ -486,10 +489,10 @@ sal_uIntPtr INetMIMEMessage::SetRFC822HeaderField (
{
check
=
pData
;
}
eState
=
(
*
check
==
'\0'
)
?
eOkState
:
INETMSG_RFC822_
JUNK
;
eState
=
(
*
check
==
'\0'
)
?
eOkState
:
HeaderState
::
JUNK
;
break
;
case
INETMSG_RFC822_
OK
:
case
HeaderState
:
:
OK
:
pData
=
pStop
;
SetHeaderField_Impl
(
INetMessageHeader
(
ImplINetRFC822MessageHeaderData
.
at
(
nIdx
),
rHeader
.
GetValue
()
),
...
...
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