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
3939b6d6
Kaydet (Commit)
3939b6d6
authored
Şub 11, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fold INetMessage into INetRFC822Message
Change-Id: I89ba13c02954364044b215ba7df7c563720b92f9
üst
d8f74fb1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
151 deletions
+94
-151
inetmsg.hxx
include/tools/inetmsg.hxx
+38
-72
inetstrm.hxx
include/tools/inetstrm.hxx
+9
-9
inetmsg.cxx
tools/source/inet/inetmsg.cxx
+43
-66
inetstrm.cxx
tools/source/inet/inetstrm.cxx
+4
-4
No files found.
include/tools/inetmsg.hxx
Dosyayı görüntüle @
3939b6d6
...
@@ -81,7 +81,25 @@ public:
...
@@ -81,7 +81,25 @@ public:
typedef
::
std
::
vector
<
INetMessageHeader
*
>
HeaderList_impl
;
typedef
::
std
::
vector
<
INetMessageHeader
*
>
HeaderList_impl
;
class
INetMessage
#define INETMSG_RFC822_BCC 0
#define INETMSG_RFC822_CC 1
#define INETMSG_RFC822_COMMENTS 2
#define INETMSG_RFC822_DATE 3
#define INETMSG_RFC822_FROM 4
#define INETMSG_RFC822_IN_REPLY_TO 5
#define INETMSG_RFC822_KEYWORDS 6
#define INETMSG_RFC822_MESSAGE_ID 7
#define INETMSG_RFC822_REFERENCES 8
#define INETMSG_RFC822_REPLY_TO 9
#define INETMSG_RFC822_RETURN_PATH 10
#define INETMSG_RFC822_SENDER 11
#define INETMSG_RFC822_SUBJECT 12
#define INETMSG_RFC822_TO 13
#define INETMSG_RFC822_X_MAILER 14
#define INETMSG_RFC822_RETURN_RECEIPT_TO 15
#define INETMSG_RFC822_NUMHDR 16
class
TOOLS_DLLPUBLIC
INetRFC822Message
{
{
HeaderList_impl
m_aHeaderList
;
HeaderList_impl
m_aHeaderList
;
...
@@ -90,7 +108,9 @@ class INetMessage
...
@@ -90,7 +108,9 @@ class INetMessage
SvLockBytesRef
m_xDocLB
;
SvLockBytesRef
m_xDocLB
;
void
ListCleanup_Impl
();
void
ListCleanup_Impl
();
void
ListCopy
(
const
INetMessage
&
rMsg
);
void
ListCopy
(
const
INetRFC822Message
&
rMsg
);
sal_uIntPtr
m_nIndex
[
INETMSG_RFC822_NUMHDR
];
protected
:
protected
:
OUString
GetHeaderName_Impl
(
OUString
GetHeaderName_Impl
(
...
@@ -139,25 +159,11 @@ protected:
...
@@ -139,25 +159,11 @@ protected:
virtual
SvStream
&
operator
>>
(
SvStream
&
rStrm
);
virtual
SvStream
&
operator
>>
(
SvStream
&
rStrm
);
public
:
public
:
INetMessage
()
:
m_nDocSize
(
0
)
{}
INetRFC822Message
();
virtual
~
INetMessage
();
INetRFC822Message
(
const
INetRFC822Message
&
rMsg
);
virtual
~
INetRFC822Message
();
INetMessage
(
const
INetMessage
&
rMsg
)
:
m_nDocSize
(
rMsg
.
m_nDocSize
),
m_aDocName
(
rMsg
.
m_aDocName
),
m_xDocLB
(
rMsg
.
m_xDocLB
)
{
ListCopy
(
rMsg
);
}
INetMessage
&
operator
=
(
const
INetMessage
&
rMsg
)
INetRFC822Message
&
operator
=
(
const
INetRFC822Message
&
rMsg
);
{
m_nDocSize
=
rMsg
.
m_nDocSize
;
m_aDocName
=
rMsg
.
m_aDocName
;
m_xDocLB
=
rMsg
.
m_xDocLB
;
ListCopy
(
rMsg
);
return
*
this
;
}
sal_uIntPtr
GetHeaderCount
()
const
{
return
m_aHeaderList
.
size
();
}
sal_uIntPtr
GetHeaderCount
()
const
{
return
m_aHeaderList
.
size
();
}
...
@@ -194,61 +200,9 @@ public:
...
@@ -194,61 +200,9 @@ public:
SvLockBytes
*
GetDocumentLB
()
const
{
return
m_xDocLB
;
}
SvLockBytes
*
GetDocumentLB
()
const
{
return
m_xDocLB
;
}
void
SetDocumentLB
(
SvLockBytes
*
pDocLB
)
{
m_xDocLB
=
pDocLB
;
}
void
SetDocumentLB
(
SvLockBytes
*
pDocLB
)
{
m_xDocLB
=
pDocLB
;
}
friend
SvStream
&
WriteINetMessage
(
SvStream
&
rStrm
,
const
INetMessage
&
rMsg
)
{
return
rMsg
.
operator
<<
(
rStrm
);
}
friend
SvStream
&
ReadINetMessage
(
SvStream
&
rStrm
,
INetMessage
&
rMsg
)
{
return
rMsg
.
operator
>>
(
rStrm
);
}
};
#define INETMSG_RFC822_BCC 0
#define INETMSG_RFC822_CC 1
#define INETMSG_RFC822_COMMENTS 2
#define INETMSG_RFC822_DATE 3
#define INETMSG_RFC822_FROM 4
#define INETMSG_RFC822_IN_REPLY_TO 5
#define INETMSG_RFC822_KEYWORDS 6
#define INETMSG_RFC822_MESSAGE_ID 7
#define INETMSG_RFC822_REFERENCES 8
#define INETMSG_RFC822_REPLY_TO 9
#define INETMSG_RFC822_RETURN_PATH 10
#define INETMSG_RFC822_SENDER 11
#define INETMSG_RFC822_SUBJECT 12
#define INETMSG_RFC822_TO 13
#define INETMSG_RFC822_X_MAILER 14
#define INETMSG_RFC822_RETURN_RECEIPT_TO 15
#define INETMSG_RFC822_NUMHDR 16
class
TOOLS_DLLPUBLIC
INetRFC822Message
:
public
INetMessage
{
sal_uIntPtr
m_nIndex
[
INETMSG_RFC822_NUMHDR
];
protected
:
virtual
SvStream
&
operator
<<
(
SvStream
&
rStrm
)
const
SAL_OVERRIDE
;
virtual
SvStream
&
operator
>>
(
SvStream
&
rStrm
)
SAL_OVERRIDE
;
public
:
INetRFC822Message
();
INetRFC822Message
(
const
INetRFC822Message
&
rMsg
);
virtual
~
INetRFC822Message
();
INetRFC822Message
&
operator
=
(
const
INetRFC822Message
&
rMsg
);
static
bool
ParseDateField
(
static
bool
ParseDateField
(
const
OUString
&
rDateField
,
DateTime
&
rDateTime
);
const
OUString
&
rDateField
,
DateTime
&
rDateTime
);
using
INetMessage
::
SetHeaderField
;
virtual
sal_uIntPtr
SetHeaderField
(
const
INetMessageHeader
&
rHeader
,
sal_uIntPtr
nIndex
=
((
sal_uIntPtr
)
-
1
)
)
SAL_OVERRIDE
;
// Header fields.
// Header fields.
OUString
GetBCC
()
const
OUString
GetBCC
()
const
...
@@ -358,6 +312,18 @@ public:
...
@@ -358,6 +312,18 @@ public:
// Stream operators.
// Stream operators.
friend
SvStream
&
WriteINetMessage
(
SvStream
&
rStrm
,
const
INetRFC822Message
&
rMsg
)
{
return
rMsg
.
operator
<<
(
rStrm
);
}
friend
SvStream
&
ReadINetMessage
(
SvStream
&
rStrm
,
INetRFC822Message
&
rMsg
)
{
return
rMsg
.
operator
>>
(
rStrm
);
}
friend
SvStream
&
operator
<<
(
friend
SvStream
&
operator
<<
(
SvStream
&
rStrm
,
const
INetRFC822Message
&
rMsg
)
SvStream
&
rStrm
,
const
INetRFC822Message
&
rMsg
)
{
{
...
...
include/tools/inetstrm.hxx
Dosyayı görüntüle @
3939b6d6
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include <sal/types.h>
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
class
INetMessage
;
class
INet
RFC822
Message
;
class
INetMIMEMessage
;
class
INetMIMEMessage
;
class
SvMemoryStream
;
class
SvMemoryStream
;
class
SvStream
;
class
SvStream
;
...
@@ -81,7 +81,7 @@ enum INetMessageStreamState
...
@@ -81,7 +81,7 @@ enum INetMessageStreamState
/// Message Generator Interface.
/// Message Generator Interface.
class
INetMessageIStream
:
public
INetIStream
class
INetMessageIStream
:
public
INetIStream
{
{
INet
Message
*
pSourceMsg
;
INet
RFC822Message
*
pSourceMsg
;
bool
bHeaderGenerated
;
bool
bHeaderGenerated
;
sal_uIntPtr
nBufSiz
;
sal_uIntPtr
nBufSiz
;
...
@@ -106,8 +106,8 @@ public:
...
@@ -106,8 +106,8 @@ public:
INetMessageIStream
(
sal_uIntPtr
nBufferSize
=
2048
);
INetMessageIStream
(
sal_uIntPtr
nBufferSize
=
2048
);
virtual
~
INetMessageIStream
(
void
);
virtual
~
INetMessageIStream
(
void
);
INetMessage
*
GetSourceMessage
(
void
)
const
{
return
pSourceMsg
;
}
INet
RFC822
Message
*
GetSourceMessage
(
void
)
const
{
return
pSourceMsg
;
}
void
SetSourceMessage
(
INetMessage
*
pMsg
)
{
pSourceMsg
=
pMsg
;
}
void
SetSourceMessage
(
INet
RFC822
Message
*
pMsg
)
{
pSourceMsg
=
pMsg
;
}
void
GenerateHeader
(
bool
bGen
=
true
)
{
bHeaderGenerated
=
!
bGen
;
}
void
GenerateHeader
(
bool
bGen
=
true
)
{
bHeaderGenerated
=
!
bGen
;
}
bool
IsHeaderGenerated
(
void
)
const
{
return
bHeaderGenerated
;
}
bool
IsHeaderGenerated
(
void
)
const
{
return
bHeaderGenerated
;
}
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
/// Message Parser Interface.
/// Message Parser Interface.
class
INetMessageOStream
:
public
INetOStream
class
INetMessageOStream
:
public
INetOStream
{
{
INet
Message
*
pTargetMsg
;
INet
RFC822Message
*
pTargetMsg
;
bool
bHeaderParsed
;
bool
bHeaderParsed
;
INetMessageStreamState
eOState
;
INetMessageStreamState
eOState
;
...
@@ -135,8 +135,8 @@ public:
...
@@ -135,8 +135,8 @@ public:
INetMessageOStream
(
void
);
INetMessageOStream
(
void
);
virtual
~
INetMessageOStream
(
void
);
virtual
~
INetMessageOStream
(
void
);
INetMessage
*
GetTargetMessage
(
void
)
const
{
return
pTargetMsg
;
}
INet
RFC822
Message
*
GetTargetMessage
(
void
)
const
{
return
pTargetMsg
;
}
void
SetTargetMessage
(
INetMessage
*
pMsg
)
{
pTargetMsg
=
pMsg
;
}
void
SetTargetMessage
(
INet
RFC822
Message
*
pMsg
)
{
pTargetMsg
=
pMsg
;
}
void
ParseHeader
(
bool
bParse
=
true
)
{
bHeaderParsed
=
!
bParse
;
}
void
ParseHeader
(
bool
bParse
=
true
)
{
bHeaderParsed
=
!
bParse
;
}
bool
IsHeaderParsed
(
void
)
const
{
return
bHeaderParsed
;
}
bool
IsHeaderParsed
(
void
)
const
{
return
bHeaderParsed
;
}
...
@@ -193,7 +193,7 @@ public:
...
@@ -193,7 +193,7 @@ public:
using
INetMessageIStream
::
SetSourceMessage
;
using
INetMessageIStream
::
SetSourceMessage
;
void
SetSourceMessage
(
INetMIMEMessage
*
pMsg
)
void
SetSourceMessage
(
INetMIMEMessage
*
pMsg
)
{
{
INetMessageIStream
::
SetSourceMessage
((
INetMessage
*
)
pMsg
);
INetMessageIStream
::
SetSourceMessage
((
INet
RFC822
Message
*
)
pMsg
);
}
}
INetMIMEMessage
*
GetSourceMessage
(
void
)
const
INetMIMEMessage
*
GetSourceMessage
(
void
)
const
{
{
...
@@ -203,7 +203,7 @@ public:
...
@@ -203,7 +203,7 @@ public:
using
INetMessageOStream
::
SetTargetMessage
;
using
INetMessageOStream
::
SetTargetMessage
;
void
SetTargetMessage
(
INetMIMEMessage
*
pMsg
)
void
SetTargetMessage
(
INetMIMEMessage
*
pMsg
)
{
{
INetMessageOStream
::
SetTargetMessage
((
INetMessage
*
)
pMsg
);
INetMessageOStream
::
SetTargetMessage
((
INet
RFC822
Message
*
)
pMsg
);
}
}
INetMIMEMessage
*
GetTargetMessage
(
void
)
const
INetMIMEMessage
*
GetTargetMessage
(
void
)
const
{
{
...
...
tools/source/inet/inetmsg.cxx
Dosyayı görüntüle @
3939b6d6
...
@@ -48,12 +48,7 @@ inline sal_Unicode ascii_toLowerCase( sal_Unicode ch )
...
@@ -48,12 +48,7 @@ inline sal_Unicode ascii_toLowerCase( sal_Unicode ch )
return
ch
;
return
ch
;
}
}
INetMessage
::~
INetMessage
()
void
INetRFC822Message
::
ListCleanup_Impl
()
{
ListCleanup_Impl
();
}
void
INetMessage
::
ListCleanup_Impl
()
{
{
// Cleanup.
// Cleanup.
sal_uIntPtr
i
,
n
=
m_aHeaderList
.
size
();
sal_uIntPtr
i
,
n
=
m_aHeaderList
.
size
();
...
@@ -62,7 +57,7 @@ void INetMessage::ListCleanup_Impl()
...
@@ -62,7 +57,7 @@ void INetMessage::ListCleanup_Impl()
m_aHeaderList
.
clear
();
m_aHeaderList
.
clear
();
}
}
void
INet
Message
::
ListCopy
(
const
INet
Message
&
rMsg
)
void
INet
RFC822Message
::
ListCopy
(
const
INetRFC822
Message
&
rMsg
)
{
{
if
(
!
(
this
==
&
rMsg
))
if
(
!
(
this
==
&
rMsg
))
{
{
...
@@ -79,7 +74,7 @@ void INetMessage::ListCopy (const INetMessage &rMsg)
...
@@ -79,7 +74,7 @@ void INetMessage::ListCopy (const INetMessage &rMsg)
}
}
}
}
void
INetMessage
::
SetHeaderField_Impl
(
void
INet
RFC822
Message
::
SetHeaderField_Impl
(
INetMIME
::
HeaderFieldType
eType
,
INetMIME
::
HeaderFieldType
eType
,
const
OString
&
rName
,
const
OString
&
rName
,
const
OUString
&
rValue
,
const
OUString
&
rValue
,
...
@@ -92,57 +87,6 @@ void INetMessage::SetHeaderField_Impl (
...
@@ -92,57 +87,6 @@ void INetMessage::SetHeaderField_Impl (
INetMessageHeader
(
rName
,
aSink
.
takeBuffer
()),
rnIndex
);
INetMessageHeader
(
rName
,
aSink
.
takeBuffer
()),
rnIndex
);
}
}
sal_uIntPtr
INetMessage
::
SetHeaderField
(
const
INetMessageHeader
&
rHeader
,
sal_uIntPtr
nIndex
)
{
sal_uIntPtr
nResult
=
nIndex
;
SetHeaderField_Impl
(
rHeader
,
nResult
);
return
nResult
;
}
SvStream
&
INetMessage
::
operator
<<
(
SvStream
&
rStrm
)
const
{
rStrm
.
WriteUInt32
(
m_nDocSize
);
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
rStrm
,
m_aDocName
,
RTL_TEXTENCODING_UTF8
);
sal_uIntPtr
i
,
n
=
m_aHeaderList
.
size
();
rStrm
.
WriteUInt32
(
n
);
for
(
i
=
0
;
i
<
n
;
i
++
)
WriteINetMessageHeader
(
rStrm
,
*
(
m_aHeaderList
[
i
]
)
);
return
rStrm
;
}
SvStream
&
INetMessage
::
operator
>>
(
SvStream
&
rStrm
)
{
// Cleanup.
m_nDocSize
=
0
;
m_xDocLB
.
Clear
();
ListCleanup_Impl
();
sal_uInt32
nTemp
;
// Copy.
rStrm
.
ReadUInt32
(
nTemp
);
m_nDocSize
=
nTemp
;
m_aDocName
=
read_uInt16_lenPrefixed_uInt8s_ToOUString
(
rStrm
,
RTL_TEXTENCODING_UTF8
);
sal_uIntPtr
i
,
n
=
0
;
rStrm
.
ReadUInt32
(
nTemp
);
n
=
nTemp
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
INetMessageHeader
*
p
=
new
INetMessageHeader
();
ReadINetMessageHeader
(
rStrm
,
*
p
);
m_aHeaderList
.
push_back
(
p
);
}
// Done.
return
rStrm
;
}
static
const
char
*
ImplINetRFC822MessageHeaderData
[]
=
static
const
char
*
ImplINetRFC822MessageHeaderData
[]
=
{
{
"BCC"
,
"BCC"
,
...
@@ -178,15 +122,18 @@ enum _ImplINetRFC822MessageHeaderState
...
@@ -178,15 +122,18 @@ enum _ImplINetRFC822MessageHeaderState
};
};
INetRFC822Message
::
INetRFC822Message
()
INetRFC822Message
::
INetRFC822Message
()
:
INetMessage
(
)
:
m_nDocSize
(
0
)
{
{
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
m_nIndex
[
i
]
=
CONTAINER_ENTRY_NOTFOUND
;
m_nIndex
[
i
]
=
CONTAINER_ENTRY_NOTFOUND
;
}
}
INetRFC822Message
::
INetRFC822Message
(
const
INetRFC822Message
&
rMsg
)
INetRFC822Message
::
INetRFC822Message
(
const
INetRFC822Message
&
rMsg
)
:
INetMessage
(
rMsg
)
:
m_nDocSize
(
rMsg
.
m_nDocSize
),
m_aDocName
(
rMsg
.
m_aDocName
),
m_xDocLB
(
rMsg
.
m_xDocLB
)
{
{
ListCopy
(
rMsg
);
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
m_nIndex
[
i
]
=
rMsg
.
m_nIndex
[
i
];
m_nIndex
[
i
]
=
rMsg
.
m_nIndex
[
i
];
}
}
...
@@ -195,8 +142,10 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
...
@@ -195,8 +142,10 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
{
{
if
(
this
!=
&
rMsg
)
if
(
this
!=
&
rMsg
)
{
{
INetMessage
::
operator
=
(
rMsg
);
m_nDocSize
=
rMsg
.
m_nDocSize
;
m_aDocName
=
rMsg
.
m_aDocName
;
m_xDocLB
=
rMsg
.
m_xDocLB
;
ListCopy
(
rMsg
);
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
m_nIndex
[
i
]
=
rMsg
.
m_nIndex
[
i
];
m_nIndex
[
i
]
=
rMsg
.
m_nIndex
[
i
];
}
}
...
@@ -205,6 +154,7 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
...
@@ -205,6 +154,7 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
INetRFC822Message
::~
INetRFC822Message
()
INetRFC822Message
::~
INetRFC822Message
()
{
{
ListCleanup_Impl
();
}
}
/* ParseDateField and local helper functions.
/* ParseDateField and local helper functions.
...
@@ -584,7 +534,7 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
...
@@ -584,7 +534,7 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
default
:
// INETMSG_RFC822_JUNK
default
:
// INETMSG_RFC822_JUNK
pData
=
pStop
;
pData
=
pStop
;
nNewIndex
=
INetMessage
::
SetHeaderField
(
rHeader
,
nNewIndex
);
SetHeaderField_Impl
(
rHeader
,
nNewIndex
);
break
;
break
;
}
}
}
}
...
@@ -593,7 +543,14 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
...
@@ -593,7 +543,14 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
SvStream
&
INetRFC822Message
::
operator
<<
(
SvStream
&
rStrm
)
const
SvStream
&
INetRFC822Message
::
operator
<<
(
SvStream
&
rStrm
)
const
{
{
INetMessage
::
operator
<<
(
rStrm
);
rStrm
.
WriteUInt32
(
m_nDocSize
);
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
rStrm
,
m_aDocName
,
RTL_TEXTENCODING_UTF8
);
sal_uIntPtr
n
=
m_aHeaderList
.
size
();
rStrm
.
WriteUInt32
(
n
);
for
(
sal_uIntPtr
i
=
0
;
i
<
n
;
i
++
)
WriteINetMessageHeader
(
rStrm
,
*
(
m_aHeaderList
[
i
]
)
);
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
rStrm
.
WriteUInt32
(
m_nIndex
[
i
]
);
rStrm
.
WriteUInt32
(
m_nIndex
[
i
]
);
...
@@ -603,9 +560,29 @@ SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
...
@@ -603,9 +560,29 @@ SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
SvStream
&
INetRFC822Message
::
operator
>>
(
SvStream
&
rStrm
)
SvStream
&
INetRFC822Message
::
operator
>>
(
SvStream
&
rStrm
)
{
{
INetMessage
::
operator
>>
(
rStrm
);
// Cleanup.
m_nDocSize
=
0
;
m_xDocLB
.
Clear
();
ListCleanup_Impl
();
sal_uInt32
nTemp
;
sal_uInt32
nTemp
;
// Copy.
rStrm
.
ReadUInt32
(
nTemp
);
m_nDocSize
=
nTemp
;
m_aDocName
=
read_uInt16_lenPrefixed_uInt8s_ToOUString
(
rStrm
,
RTL_TEXTENCODING_UTF8
);
sal_uIntPtr
n
=
0
;
rStrm
.
ReadUInt32
(
nTemp
);
n
=
nTemp
;
for
(
sal_uIntPtr
i
=
0
;
i
<
n
;
i
++
)
{
INetMessageHeader
*
p
=
new
INetMessageHeader
();
ReadINetMessageHeader
(
rStrm
,
*
p
);
m_aHeaderList
.
push_back
(
p
);
}
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
INETMSG_RFC822_NUMHDR
;
i
++
)
{
{
rStrm
.
ReadUInt32
(
nTemp
);
rStrm
.
ReadUInt32
(
nTemp
);
...
...
tools/source/inet/inetstrm.cxx
Dosyayı görüntüle @
3939b6d6
...
@@ -485,7 +485,7 @@ INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl(void)
...
@@ -485,7 +485,7 @@ INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl(void)
int
INetMessageEncodeQPStream_Impl
::
GetMsgLine
(
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
int
INetMessageEncodeQPStream_Impl
::
GetMsgLine
(
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
{
{
INetMessage
*
pMsg
=
GetSourceMessage
();
INet
RFC822
Message
*
pMsg
=
GetSourceMessage
();
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
->
GetDocumentLB
()
==
NULL
)
return
0
;
if
(
pMsg
->
GetDocumentLB
()
==
NULL
)
return
0
;
...
@@ -693,7 +693,7 @@ INetMessageDecodeQPStream_Impl::~INetMessageDecodeQPStream_Impl(void)
...
@@ -693,7 +693,7 @@ INetMessageDecodeQPStream_Impl::~INetMessageDecodeQPStream_Impl(void)
int
INetMessageDecodeQPStream_Impl
::
PutMsgLine
(
const
sal_Char
*
pData
,
int
INetMessageDecodeQPStream_Impl
::
PutMsgLine
(
const
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
sal_uIntPtr
nSize
)
{
{
INetMessage
*
pMsg
=
GetTargetMessage
();
INet
RFC822
Message
*
pMsg
=
GetTargetMessage
();
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
SvOpenLockBytes
*
pLB
=
PTR_CAST
(
SvOpenLockBytes
,
pMsg
->
GetDocumentLB
());
SvOpenLockBytes
*
pLB
=
PTR_CAST
(
SvOpenLockBytes
,
pMsg
->
GetDocumentLB
());
...
@@ -807,7 +807,7 @@ INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl(void)
...
@@ -807,7 +807,7 @@ INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl(void)
int
INetMessageEncode64Stream_Impl
::
GetMsgLine
(
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
int
INetMessageEncode64Stream_Impl
::
GetMsgLine
(
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
{
{
INetMessage
*
pMsg
=
GetSourceMessage
();
INet
RFC822
Message
*
pMsg
=
GetSourceMessage
();
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
->
GetDocumentLB
()
==
NULL
)
return
0
;
if
(
pMsg
->
GetDocumentLB
()
==
NULL
)
return
0
;
...
@@ -993,7 +993,7 @@ INetMessageDecode64Stream_Impl::~INetMessageDecode64Stream_Impl(void)
...
@@ -993,7 +993,7 @@ INetMessageDecode64Stream_Impl::~INetMessageDecode64Stream_Impl(void)
int
INetMessageDecode64Stream_Impl
::
PutMsgLine
(
const
sal_Char
*
pData
,
int
INetMessageDecode64Stream_Impl
::
PutMsgLine
(
const
sal_Char
*
pData
,
sal_uIntPtr
nSize
)
sal_uIntPtr
nSize
)
{
{
INetMessage
*
pMsg
=
GetTargetMessage
();
INet
RFC822
Message
*
pMsg
=
GetTargetMessage
();
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
if
(
pMsg
==
NULL
)
return
INETSTREAM_STATUS_ERROR
;
SvOpenLockBytes
*
pLB
=
PTR_CAST
(
SvOpenLockBytes
,
pMsg
->
GetDocumentLB
());
SvOpenLockBytes
*
pLB
=
PTR_CAST
(
SvOpenLockBytes
,
pMsg
->
GetDocumentLB
());
...
...
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