summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorsahil <gautamsahil1947@gmail.com>2023-08-21 00:21:32 +0530
committerHossein <hossein@libreoffice.org>2023-09-12 02:36:35 +0200
commitf5bcc34580d02f92af01963155f2d54776a5249b (patch)
treee0eb81bf4deffd5521c8f86c568973bbfbb4d0c8 /lotuswordpro
parent4b2543693ed3ffb4d9f0d70f53f32127115c128d (diff)
tdf#114441 - Convert sal_uLong to better integer types
Change-Id: Idc6de0c0275ce9913e248548466b77aaef180d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155873 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/bencont.cxx4
-rw-r--r--lotuswordpro/source/filter/bento.hxx12
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx4
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx6
-rw-r--r--lotuswordpro/source/filter/tocread.cxx4
5 files changed, 15 insertions, 15 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 60e644ce212d..3677c7809a7a 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -71,7 +71,7 @@ const char gsBenMagicBytes[] = BEN_MAGIC_BYTES;
* @param pointer to pointer of Bento Container object
* @return error code
*/
-sal_uLong BenOpenContainer(LwpSvStream * pStream, std::unique_ptr<LtcBenContainer>* ppContainer)
+sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr<LtcBenContainer>* ppContainer)
{
*ppContainer = nullptr;
@@ -318,7 +318,7 @@ std::vector<sal_uInt8> LtcBenContainer::GetGraphicData(const char *pObjectName)
return aData;
}
-sal_uLong LtcBenContainer::remainingSize() const
+sal_uInt64 LtcBenContainer::remainingSize() const
{
return m_ulLength - cpStream->Tell();
}
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index d2c1cb90d703..acf7a6e21a38 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -135,7 +135,7 @@ typedef sal_uInt32 BenContainerPos;
typedef sal_uInt32 BenObjectID;
typedef sal_uInt32 BenGeneration;
-sal_uLong BenOpenContainer(LwpSvStream * pStream, std::unique_ptr<LtcBenContainer>* ppContainer);
+sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr<LtcBenContainer>* ppContainer);
class CBenIDListElmt : public CUtListElmt
{
@@ -175,7 +175,7 @@ public:
public: // Overridden methods
/* added by */
- sal_uLong GetSize() const { return m_ulValueLength; };
+ sal_uInt64 GetSize() const { return m_ulValueLength; };
protected: // Overridden methods
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
@@ -188,7 +188,7 @@ private: // Data
CBenValue * cpValue;
size_t cCurrentPosition;
- sal_uLong m_ulValueLength; // Added by , sum of length of all sub-valuesegments
+ sal_uInt64 m_ulValueLength; // Added by , sum of length of all sub-valuesegments
};
class LtcBenContainer
@@ -207,7 +207,7 @@ public: // Internal methods
explicit LtcBenContainer(LwpSvStream * pStream);
~LtcBenContainer();
- sal_uLong remainingSize() const;
+ sal_uInt64 remainingSize() const;
void Read(void * pBuffer, size_t MaxSize,
size_t* pAmtRead);
BenError ReadKnownSize(void * pBuffer, size_t Amt);
@@ -222,12 +222,12 @@ public: // Internal methods
LtcUtBenValueStream * FindValueStreamWithPropertyName(const char * sPropertyName);
std::vector<sal_uInt8> GetGraphicData(const char *pObjectName);
- sal_uLong GetSize() const { return m_ulLength; }
+ sal_uInt64 GetSize() const { return m_ulLength; }
private: // Data
CUtOwningList cObjects;
CUtList cNamedObjects;
LwpSvStream * cpStream;
- sal_uLong m_ulLength; // Added for TOCRead.cpp
+ sal_uInt64 m_ulLength; // Added for TOCRead.cpp
BenObjectID cNextAvailObjectID; // for new object
};
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index e8ba358ae8c7..5a8d4169a199 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -96,7 +96,7 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed)
LwpSvStream aLwpStream(pCompressed);
std::unique_ptr<OpenStormBento::LtcBenContainer> pBentoContainer;
{
- sal_uLong ulRet = BenOpenContainer(&aLwpStream, &pBentoContainer);
+ sal_uInt8 ulRet = BenOpenContainer(&aLwpStream, &pBentoContainer);
if (ulRet != BenErr_OK)
return false;
}
@@ -112,7 +112,7 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed)
if (0 != decompress.explode())
return false;
- sal_uInt32 nPos = aWordProData->GetSize();
+ sal_uInt64 nPos = aWordProData->GetSize();
nPos += 0x10;
pCompressed->Seek(nPos);
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 3c8f3d03a381..f17ea8e98f93 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -286,7 +286,7 @@ void LwpGraphicObject::CreateDrawObjects()
LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm;
std::unique_ptr<OpenStormBento::LtcBenContainer> pBentoContainer;
- sal_uLong ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
+ sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
if (ulRet != OpenStormBento::BenErr_OK)
return;
@@ -333,7 +333,7 @@ std::vector<sal_uInt8> LwpGraphicObject::GetRawGrafData()
std::unique_ptr<OpenStormBento::LtcBenContainer> pBentoContainer;
{
- sal_uLong ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
+ sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
if (ulRet != OpenStormBento::BenErr_OK)
return aGrafData;
}
@@ -359,7 +359,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(std::unique_ptr<sal_uInt8[]>& pGrafData
LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm;
std::unique_ptr<OpenStormBento::LtcBenContainer> pBentoContainer;
- sal_uLong ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
+ sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
if (ulRet != OpenStormBento::BenErr_OK)
return 0;
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index 2942005df391..b9bc3ac9277c 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -76,7 +76,7 @@ CBenTOCReader::ReadLabelAndTOC()
if ((Err = ReadLabel(&TOCOffset, &cTOCSize)) != BenErr_OK)
return Err;
- sal_uLong nLength = cpContainer->GetSize();
+ sal_uInt64 nLength = cpContainer->GetSize();
if (TOCOffset > nLength)
return BenErr_ReadPastEndOfTOC;
@@ -149,7 +149,7 @@ CBenTOCReader::SearchForLabel(BenByte * pLabel)
{
BenError Err;
- sal_uLong Length = cpContainer->GetSize();
+ sal_uInt64 Length = cpContainer->GetSize();
// Always ready to check for MagicBytes from
// CurrOffset - BEN_MAGIC_BYTES_SIZE to CurrOffset - 1