include/tools/inetmsg.hxx | 14 +++++++------- include/tools/inetstrm.hxx | 10 +++++----- tools/source/inet/inetmsg.cxx | 4 ++-- tools/source/inet/inetstrm.cxx | 18 +++++++++--------- 4 files changed, 23 insertions(+), 23 deletions(-)
New commits: commit 5de99031fa31eaf78d92cf5aa8de6cac8f2f8782 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Dec 11 12:02:35 2017 +0200 sal_IntPtr->sal_uInt32 in INetMIMEMessageStream Change-Id: I5c57b0bf28a395a0617d1c16ccaeff759915974e Reviewed-on: https://gerrit.libreoffice.org/46225 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx index ba6f6aa14744..f3e7ae325c90 100644 --- a/include/tools/inetstrm.hxx +++ b/include/tools/inetstrm.hxx @@ -43,21 +43,21 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream bool done; - sal_uIntPtr nChildIndex; + sal_uInt32 nChildIndex; INetMIMEMessageStream *pChildStrm; INetMIMEMessageStream (const INetMIMEMessageStream& rStrm) = delete; INetMIMEMessageStream& operator= (const INetMIMEMessageStream& rStrm) = delete; - int GetHeaderLine(sal_Char *pData, sal_uIntPtr nSize); - int GetBodyLine(sal_Char *pData, sal_uIntPtr nSize); - int GetMsgLine(sal_Char *pData, sal_uIntPtr nSize); + int GetHeaderLine(sal_Char *pData, sal_uInt32 nSize); + int GetBodyLine(sal_Char *pData, sal_uInt32 nSize); + int GetMsgLine(sal_Char *pData, sal_uInt32 nSize); public: explicit INetMIMEMessageStream(INetMIMEMessage *pMsg, bool headerGenerated); ~INetMIMEMessageStream(); - int Read (sal_Char *pData, sal_uIntPtr nSize); + int Read (sal_Char *pData, sal_uInt32 nSize); }; #endif diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 73b3afc1e5ac..7949b5f94108 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -28,11 +28,11 @@ #include <tools/inetmsg.hxx> #include <tools/inetstrm.hxx> -int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uIntPtr nSize) +int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uInt32 nSize) { sal_Char* pWBuf = pData; - sal_uIntPtr i, n; + sal_uInt32 i, n; if (maMsgBuffer.Tell() == 0) { @@ -71,7 +71,7 @@ int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uIntPtr nSize) return (pWBuf - pData); } -int INetMIMEMessageStream::GetBodyLine(sal_Char* pData, sal_uIntPtr nSize) +int INetMIMEMessageStream::GetBodyLine(sal_Char* pData, sal_uInt32 nSize) { sal_Char* pWBuf = pData; sal_Char* pWEnd = pData + nSize; @@ -81,14 +81,14 @@ int INetMIMEMessageStream::GetBodyLine(sal_Char* pData, sal_uIntPtr nSize) if (pMsgStrm == nullptr) pMsgStrm = new SvStream (pSourceMsg->GetDocumentLB()); - sal_uIntPtr nRead = pMsgStrm->ReadBytes(pWBuf, (pWEnd - pWBuf)); + sal_uInt32 nRead = pMsgStrm->ReadBytes(pWBuf, (pWEnd - pWBuf)); pWBuf += nRead; } return (pWBuf - pData); } -int INetMIMEMessageStream::GetMsgLine(sal_Char* pData, sal_uIntPtr nSize) +int INetMIMEMessageStream::GetMsgLine(sal_Char* pData, sal_uInt32 nSize) { // Check for header or body. if (!bHeaderGenerated) @@ -252,7 +252,7 @@ INetMIMEMessageStream::~INetMIMEMessageStream() delete pMsgStrm; } -int INetMIMEMessageStream::Read(sal_Char* pData, sal_uIntPtr nSize) +int INetMIMEMessageStream::Read(sal_Char* pData, sal_uInt32 nSize) { sal_Char* pWBuf = pData; sal_Char* pWEnd = pData + nSize; @@ -260,13 +260,13 @@ int INetMIMEMessageStream::Read(sal_Char* pData, sal_uIntPtr nSize) while (pWBuf < pWEnd) { // Caller's buffer not yet filled. - sal_uIntPtr n = pRead - pWrite; + sal_uInt32 n = pRead - pWrite; if (n > 0) { // Bytes still in buffer. - sal_uIntPtr m = pWEnd - pWBuf; + sal_uInt32 m = pWEnd - pWBuf; if (m < n) n = m; - for (sal_uIntPtr i = 0; i < n; i++) *pWBuf++ = *pWrite++; + for (sal_uInt32 i = 0; i < n; i++) *pWBuf++ = *pWrite++; } else { commit ef5471959f21ebc4599146d672165513d92d344a Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Dec 11 11:59:04 2017 +0200 sal_uIntPtr->sal_uInt32 in m_nMIMEIndex Change-Id: I1373f11f07679569ef338178e56ffd269baf3c30 Reviewed-on: https://gerrit.libreoffice.org/46224 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx index e1b26dbe43b7..445c3a60922c 100644 --- a/include/tools/inetmsg.hxx +++ b/include/tools/inetmsg.hxx @@ -78,14 +78,14 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage SvLockBytesRef m_xDocLB; - ::std::map<InetMessageMime, sal_uIntPtr> m_nMIMEIndex; + ::std::map<InetMessageMime, sal_uInt32> m_nMIMEIndex; INetMIMEMessage* pParent; ::std::vector< std::unique_ptr<INetMIMEMessage> > aChildren; OString m_aBoundary; OUString GetHeaderValue_Impl ( - sal_uIntPtr nIndex) const + sal_uInt32 nIndex) const { if ( nIndex < m_aHeaderList.size() ) { return INetMIME::decodeHeaderFieldBody(m_aHeaderList[ nIndex ]->GetValue()); @@ -95,7 +95,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage } void SetHeaderField_Impl ( - const INetMessageHeader &rHeader, sal_uIntPtr &rnIndex) + const INetMessageHeader &rHeader, sal_uInt32 &rnIndex) { INetMessageHeader *p = new INetMessageHeader (rHeader); if (m_aHeaderList.size() <= rnIndex) @@ -112,7 +112,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage void SetHeaderField_Impl ( const OString &rName, const OUString &rValue, - sal_uIntPtr &rnIndex); + sal_uInt32 &rnIndex); bool IsMessage() const { @@ -127,9 +127,9 @@ public: INetMIMEMessage(); ~INetMIMEMessage(); - sal_uIntPtr GetHeaderCount() const { return m_aHeaderList.size(); } + sal_uInt32 GetHeaderCount() const { return m_aHeaderList.size(); } - INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const + INetMessageHeader GetHeaderField (sal_uInt32 nIndex) const { if ( nIndex < m_aHeaderList.size() ) { return *m_aHeaderList[ nIndex ]; @@ -169,7 +169,7 @@ public: return aType.matchIgnoreAsciiCase("multipart/"); } - INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const + INetMIMEMessage* GetChild (sal_uInt32 nIndex) const { return ( nIndex < aChildren.size() ) ? aChildren[ nIndex ].get() : nullptr; } diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx index b3dc426ad7b6..82b23232441f 100644 --- a/tools/source/inet/inetmsg.cxx +++ b/tools/source/inet/inetmsg.cxx @@ -30,7 +30,7 @@ void INetMIMEMessage::SetHeaderField_Impl ( const OString &rName, const OUString &rValue, - sal_uIntPtr &rnIndex) + sal_uInt32 &rnIndex) { SetHeaderField_Impl ( INetMessageHeader (rName, rValue.toUtf8()), rnIndex); @@ -213,7 +213,7 @@ INetMIMEMessage::INetMIMEMessage() : pParent(nullptr) { for (sal_uInt16 i = 0; i < static_cast<int>(InetMessageMime::NUMHDR); i++) - m_nMIMEIndex[static_cast<InetMessageMime>(i)] = CONTAINER_ENTRY_NOTFOUND; + m_nMIMEIndex[static_cast<InetMessageMime>(i)] = SAL_MAX_UINT32; } INetMIMEMessage::~INetMIMEMessage() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits