diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-10 12:11:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-14 19:19:00 +0100 |
commit | 38c008de39ef004a7f9089baba96bc408de67bae (patch) | |
tree | 43f37c4c36d8b1bf6786827ce112816f91bdf6fd /sw/source | |
parent | c2f67e6ed60554de8b02b499fb93a60e703d533a (diff) |
Stream::Tell returns sal_uInt64
Change-Id: I02e49d4f59c17a9868c4111ac91b5dd2715e689c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126630
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/tblafmt.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/WW8FFData.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par4.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dialog/ascfldlg.cxx | 4 |
21 files changed, 47 insertions, 47 deletions
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 35b502337f20..6385794aa620 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -1067,9 +1067,9 @@ bool SwTableAutoFormatTable::Load( SvStream& rStream ) (AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) ) { sal_uInt8 nChrSet, nCnt; - tools::Long nPos = rStream.Tell(); + sal_uInt64 nPos = rStream.Tell(); rStream.ReadUChar( nCnt ).ReadUChar( nChrSet ); - if( rStream.Tell() != sal_uLong(nPos + nCnt) ) + if( rStream.Tell() != nPos + nCnt ) { OSL_ENSURE( false, "The Header contains more or newer Data" ); rStream.Seek( nPos + nCnt ); diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx index 291cd845d439..ea7288e349ab 100644 --- a/sw/source/filter/ww8/WW8FFData.cxx +++ b/sw/source/filter/ww8/WW8FFData.cxx @@ -76,7 +76,7 @@ void WW8FFData::WriteOUString(SvStream * pDataStrm, const OUString & rStr, void WW8FFData::Write(SvStream * pDataStrm) { - sal_uLong nDataStt = pDataStrm->Tell(); + sal_uInt64 nDataStt = pDataStrm->Tell(); static const sal_uInt8 aHeader[] = { diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 0f1ca6ddb969..a3e4108cd06d 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -607,7 +607,7 @@ void DocxExport::OutputLinkedOLE( const OUString& ) // Nothing to implement here: WW8 only } -sal_uLong DocxExport::ReplaceCr( sal_uInt8 ) +sal_uInt64 DocxExport::ReplaceCr( sal_uInt8 ) { // Completely unused for Docx export... only here for code sharing // purpose with binary export diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index cdd18c9e4510..3970597316d6 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -183,7 +183,7 @@ public: virtual void DoFormText(const SwInputField * pField) override; - virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override; + virtual sal_uInt64 ReplaceCr( sal_uInt8 nChar ) override; /// Returns the relationd id OString OutputChart( css::uno::Reference< css::frame::XModel > const & xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const & m_pSerializer ); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 68fd898ab1ff..795f6c46b6de 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -376,7 +376,7 @@ void RtfExport::DoFormText(const SwInputField* pField) + "}}"); } -sal_uLong RtfExport::ReplaceCr(sal_uInt8 /*nChar*/) +sal_uInt64 RtfExport::ReplaceCr(sal_uInt8 /*nChar*/) { // Completely unused for Rtf export... only here for code sharing // purpose with binary export diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 36a735eb783a..0a495576ee6d 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -114,7 +114,7 @@ public: void DoFormText(const SwInputField* pField) override; - sal_uLong ReplaceCr(sal_uInt8 nChar) override; + sal_uInt64 ReplaceCr(sal_uInt8 nChar) override; ExportFormat GetExportFormat() const override { return ExportFormat::RTF; } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index c98f7689c4be..69528309fdd2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -433,7 +433,7 @@ void WW8Export::DoComboBox(const OUString &rName, OutputField(nullptr, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN), FieldFlags::Start | FieldFlags::CmdStart); // write the reference to the "picture" structure - sal_uLong nDataStt = pDataStrm->Tell(); + sal_uInt64 nDataStt = pDataStrm->Tell(); m_pChpPlc->AppendFkpEntry( Strm().Tell() ); WriteChar( 0x01 ); @@ -477,7 +477,7 @@ void WW8Export::DoFormText(const SwInputField * pField) OutputField(nullptr, ww::eFORMTEXT, FieldString(ww::eFORMTEXT), FieldFlags::Start | FieldFlags::CmdStart); // write the reference to the "picture" structure - sal_uLong nDataStt = pDataStrm->Tell(); + sal_uInt64 nDataStt = pDataStrm->Tell(); m_pChpPlc->AppendFkpEntry( Strm().Tell() ); WriteChar( 0x01 ); @@ -1410,7 +1410,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp aAttrIter.OutParaAttr(false); - sal_uLong nPos = Strm().Tell(); + sal_uInt64 nPos = Strm().Tell(); m_pPapPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() ); pO->clear(); @@ -1467,7 +1467,7 @@ void WW8Export::WriteEscher() { if (m_pEscher) { - sal_uLong nStart = pTableStrm->Tell(); + sal_uInt64 nStart = pTableStrm->Tell(); m_pEscher->WritePictures(); m_pEscher->FinishEscher(); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 4f3ca7f94305..bf6e6fb2ea3d 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1060,7 +1060,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget m_rWW8Export.OutputField( nullptr, ww::eHYPERLINK, sURL, FieldFlags::Start | FieldFlags::CmdStart ); // write the reference to the "picture" structure - sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell(); + sal_uInt64 nDataStt = m_rWW8Export.pDataStrm->Tell(); m_rWW8Export.m_pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() ); // WinWord 2000 doesn't write this - so it's a temp solution by W97 ? diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 72c171bacdff..4f121ccd7cd9 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -672,7 +672,7 @@ void WW8AttributeOutput::StartStyles() { WW8Fib& rFib = *m_rWW8Export.pFib; - sal_uLong nCurPos = m_rWW8Export.pTableStrm->Tell(); + sal_uInt64 nCurPos = m_rWW8Export.pTableStrm->Tell(); if ( nCurPos & 1 ) // start on even { m_rWW8Export.pTableStrm->WriteChar( char(0) ); // Address @@ -2047,7 +2047,7 @@ void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const OSL_ENSURE(m_SectionAttributes.size() == static_cast<size_t>(aSects.size()) , "WritePlcSed(): arrays out of sync!"); OSL_ENSURE( aCps.size() == aSects.size() + 1, "WrPlcSepx: DeSync" ); - sal_uLong nFcStart = rWrt.pTableStrm->Tell(); + sal_uInt64 nFcStart = rWrt.pTableStrm->Tell(); for( decltype(aSects)::size_type i = 0; i <= aSects.size(); i++ ) { @@ -2371,7 +2371,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStart, sal_Int32& rTextCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const { - sal_uLong nFcStart = rWrt.pTableStrm->Tell(); + sal_uInt64 nFcStart = rWrt.pTableStrm->Tell(); sal_uInt16 nLen = aCps.size(); if ( !nLen ) return; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index d179858fd3f3..0e495ab92af3 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -907,7 +907,7 @@ void WW8_WrMagicTable::Write( WW8Export& rWrt ) { if( WW8_WrPlc1::Count() <= 1 ) return; - sal_uLong nFcStart = rWrt.pTableStrm->Tell(); + sal_uInt64 nFcStart = rWrt.pTableStrm->Tell(); WW8_WrPlc1::Write( *rWrt.pTableStrm ); rWrt.pFib->m_fcPlcfTch = nFcStart; rWrt.pFib->m_lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart; @@ -990,7 +990,7 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pS *p++ = *pSprms++; nVarLen -= 2; - tools::Long nDataPos = rWrt.pDataStrm->Tell(); + sal_uInt64 nDataPos = rWrt.pDataStrm->Tell(); SwWW8Writer::WriteShort( *rWrt.pDataStrm, nVarLen ); rWrt.pDataStrm->WriteBytes(pSprms, nVarLen); @@ -1493,13 +1493,13 @@ void WW8Export::MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo) void WW8Export::AppendBookmark( const OUString& rName ) { - sal_uLong nSttCP = Fc2Cp( Strm().Tell() ); + sal_uInt64 nSttCP = Fc2Cp( Strm().Tell() ); m_pBkmks->Append( nSttCP, rName ); } void WW8Export::AppendBookmarkEndWithCorrection( const OUString& rName ) { - sal_uLong nEndCP = Fc2Cp( Strm().Tell() ); + sal_uInt64 nEndCP = Fc2Cp( Strm().Tell() ); m_pBkmks->Append( nEndCP - 1, rName ); } @@ -3296,11 +3296,11 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) namespace { - const sal_uLong WW_BLOCKSIZE = 0x200; + const sal_uInt64 WW_BLOCKSIZE = 0x200; ErrCode EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut) { - sal_uLong nLen = rIn.TellEnd(); + sal_uInt64 nLen = rIn.TellEnd(); rIn.Seek(0); sal_uInt8 in[WW_BLOCKSIZE]; diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 72e5a8d65e1e..875625576a14 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -809,7 +809,7 @@ public: // Compute the number format for WW dates bool GetNumberFormat(const SwField& rField, OUString& rStr); - virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0; + virtual sal_uInt64 ReplaceCr( sal_uInt8 nChar ) = 0; const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const; @@ -1090,7 +1090,7 @@ public: void WriteAsStringTable(const std::vector<OUString>&, sal_Int32& rfcSttbf, sal_Int32& rlcbSttbf); - virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override; + virtual sal_uInt64 ReplaceCr( sal_uInt8 nChar ) override; virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) override; void WriteChar( sal_Unicode c ) override; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index cbafa7a909a0..490f7f296757 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3839,13 +3839,13 @@ void WW8AttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize ) * * @return FilePos + 1 of the replaced CR or 0 if nothing was replaced. */ -sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar ) +sal_uInt64 WW8Export::ReplaceCr( sal_uInt8 nChar ) { OSL_ENSURE( nChar, "replaced with 0 crashes WW97/95" ); bool bReplaced = false; SvStream& rStrm = Strm(); - sal_uLong nRetPos = 0, nPos = rStrm.Tell(); + sal_uInt64 nRetPos = 0, nPos = rStrm.Tell(); //If there is at least two characters already output if (nPos - 2 >= o3tl::make_unsigned(pFib->m_fcMin)) { diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 35476fd90c34..edd44eb3cfd5 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1026,7 +1026,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, bool* pbContainsGraphics, SvxMSDffImportRec const * pRecord) { SwFrameFormat* pFlyFormat = nullptr; - sal_uLong nOld = m_pStrm->Tell(); + sal_uInt64 nOld = m_pStrm->Tell(); ManTypes eType = m_xPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX; @@ -2534,7 +2534,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( tools::Long nGrafAnchorCp ) if( m_bVer67 ) { - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); m_nDrawXOfs = m_nDrawYOfs = 0; ReadGrafLayer1(*pPF, nGrafAnchorCp); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9de1a301e0a5..be454d9e8ce2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1108,7 +1108,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, if (rSt.ReadBytes(aBuffer.data(), nBufferSize) == nBufferSize) { aMemStream.WriteBytes(aBuffer.data(), nBufferSize); - sal_uInt8 nStreamSize = aMemStream.TellEnd(); + sal_uInt64 nStreamSize = aMemStream.TellEnd(); aMemStream.Seek( STREAM_SEEK_TO_BEGIN ); bool bRet = 4 <= nStreamSize; sal_uInt16 nRawRecId,nRawRecSize; @@ -3689,7 +3689,7 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, tools::Long nCpOfs) bool bReadObj = IsInlineEscherHack(); if( bReadObj ) { - tools::Long nCurPos = m_pStrm->Tell(); + sal_uInt64 nCurPos = m_pStrm->Tell(); sal_uInt16 nWordCode(0); if( m_bIsUnicode ) @@ -4921,7 +4921,7 @@ void WW8Customizations::Import( SwDocShell* pShell ) try { Tcg aTCG; - tools::Long nCur = mpTableStream->Tell(); + sal_uInt64 nCur = mpTableStream->Tell(); if (!checkSeek(*mpTableStream, mWw8Fib.m_fcCmds)) // point at tgc record { SAL_WARN("sw.ww8", "** Seek to Customization data failed!!!! "); @@ -6266,7 +6266,7 @@ ErrCode SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss) // Test for own 97 fake! if (m_pStg && 0xa5ec == nMagic) { - sal_uLong nCurPos = m_pStrm->Tell(); + sal_uInt64 nCurPos = m_pStrm->Tell(); if (checkSeek(*m_pStrm, nCurPos + 2)) { sal_uInt32 nfcMin(0); @@ -6596,7 +6596,7 @@ bool SwMSDffManager::GetOLEStorageName(sal_uInt32 nOLEId, OUString& rStorageName // We should then find the EmbeddedField and the corresponding Sprms // in that Area. // We only need the Sprm for the Picture Id. - tools::Long nOldPos = rReader.m_pStrm->Tell(); + sal_uInt64 nOldPos = rReader.m_pStrm->Tell(); { // #i32596# - consider return value of method // <rReader.GetTxbxTextSttEndCp(..)>. If it returns false, method diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index cf07cb7cf038..002a85ce7e71 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3976,7 +3976,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr ) bool bOldNoImp = PrepareStyle(rSI, static_cast<ww::sti>(xStd->sti), nNr, xStd->istdNext); // if something is interpreted wrong, this should make it work again - tools::Long nPos = mpStStrm->Tell(); + sal_uInt64 nPos = mpStStrm->Tell(); //Variable parts of the STD start at even byte offsets, but "inside //the STD", which I take to meaning even in relation to the starting diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index aab719c99d7d..a3a01db9304b 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1164,7 +1164,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // create Arrays bool bLVLOk = true; - tools::Long nOriginalPos = rSt.Tell(); + sal_uInt64 nOriginalPos = rSt.Tell(); // 1. read PLCF LST and create list templates in Writer @@ -2105,7 +2105,7 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula, sal_uLong nOffset = m_nPicLocFc; aSave.Restore(this); - sal_uLong nOldPos = m_pDataStream->Tell(); + sal_uInt64 nOldPos = m_pDataStream->Tell(); WW8_PIC aPic; bool bValid = checkSeek(*m_pDataStream, nOffset) && PicRead(m_pDataStream, &aPic, m_bVer67); diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 99f2647db76b..ff6ea0490028 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -404,7 +404,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, if (bOleOk) { - sal_uLong nOldPos = m_pDataStream->Tell(); + sal_uInt64 nOldPos = m_pDataStream->Tell(); SvStream *pTmpData = nullptr; if (m_nObjLocFc < m_pDataStream->TellEnd()) { diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 85af5106bfaa..8bc9dbb75dbf 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -158,7 +158,7 @@ tools::Long SwWW8ImplReader::Read_Book(WW8PLCFManResult*) if( nLen > MAX_FIELDLEN ) nLen = MAX_FIELDLEN; - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); m_xSBase->WW8ReadString( *m_pStrm, aVal, pB->GetStartPos(), nLen, m_eStructCharSet ); m_pStrm->Seek( nOldPos ); @@ -957,7 +957,7 @@ tools::Long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes) if (aF.bResNest && !AcceptableNestedField(aF.nId)) return aF.nLen; // Result nested -> unusable - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); OUString aStr; aF.nLCode = m_xSBase->WW8ReadString( *m_pStrm, aStr, m_xPlcxMan->GetCpOfs()+ aF.nSCode, aF.nLCode, m_eTextCharSet ); @@ -1136,7 +1136,7 @@ void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const OUString& rTag WW8_CP SwWW8ImplReader::Read_F_Tag( WW8FieldDesc* pF ) { - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); WW8_CP nStart = pF->nSCode - 1; // starting with 0x19 WW8_CP nL = pF->nLen; // Total length with result and nest @@ -1196,7 +1196,7 @@ eF_ResT SwWW8ImplReader::Read_F_Input( WW8FieldDesc* pF, OUString& rStr ) // GetFieldResult allocates a string and reads the resulted field OUString SwWW8ImplReader::GetFieldResult( WW8FieldDesc const * pF ) { - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); WW8_CP nStart = pF->nSRes; // result start WW8_CP nL = pF->nLRes; // result length @@ -3680,7 +3680,7 @@ void SwWW8ImplReader::Read_FieldVanish( sal_uInt16, const sal_uInt8*, short nLen return; m_bIgnoreText = true; - tools::Long nOldPos = m_pStrm->Tell(); + sal_uInt64 nOldPos = m_pStrm->Tell(); WW8_CP nStartCp = m_xPlcxMan->Where() + m_xPlcxMan->GetCpOfs(); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index cf81cc434560..038f91ffbb9f 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -6221,7 +6221,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset): identify the values for PLCF and PLF LFO and PLCF for the textbox break descriptors */ - tools::Long nOldPos = rSt.Tell(); + sal_uInt64 nOldPos = rSt.Tell(); rSt.Seek( 0x02da ); rSt.ReadInt32( m_fcSttbFnm ); diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 168fcc068950..aca7004f086a 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -119,7 +119,7 @@ bool SwCTBWrapper::Read( SvStream& rS ) Tcg255SubStruct::Read( rS ); rS.ReadUInt16( reserved2 ).ReadUChar( reserved3 ).ReadUInt16( reserved4 ).ReadUInt16( reserved5 ); rS.ReadInt16( cbTBD ).ReadUInt16( cCust ).ReadInt32( cbDTBC ); - tools::Long nExpectedPos = rS.Tell() + cbDTBC; + sal_uInt64 nExpectedPos = rS.Tell() + cbDTBC; if ( cbDTBC ) { // cbDTBC is the size in bytes of the SwTBC array @@ -139,12 +139,12 @@ bool SwCTBWrapper::Read( SvStream& rS ) bytesToRead = cbDTBC - ( rS.Tell() - nStart ); } while ( bytesToRead > 0 ); } - if ( static_cast< tools::Long >( rS.Tell() ) != nExpectedPos ) + if ( rS.Tell() != nExpectedPos ) { // Strange error condition, shouldn't happen ( but does in at least // one test document ) In the case where it happens the SwTBC & // TBCHeader records seem blank??? ( and incorrect ) - SAL_WARN_IF( static_cast< tools::Long >(rS.Tell()) != nExpectedPos, "sw.ww8","### Error: Expected pos not equal to actual pos after reading rtbdc"); + SAL_WARN_IF( rS.Tell() != nExpectedPos, "sw.ww8","### Error: Expected pos not equal to actual pos after reading rtbdc"); SAL_INFO("sw.ww8","\tPos now is 0x" << std::hex << rS.Tell() << " should be 0x" << std::hex << nExpectedPos ); // seek to correct position after rtbdc rS.Seek( nExpectedPos ); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 2812cc3be8a5..20f76efc4f12 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -112,7 +112,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh, if( pStream ) { char aBuffer[ 4098 ]; - const sal_uLong nOldPos = pStream->Tell(); + const sal_uInt64 nOldPos = pStream->Tell(); const size_t nBytesRead = pStream->ReadBytes(aBuffer, 4096); pStream->Seek( nOldPos ); @@ -123,7 +123,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh, } bool bCR = false, bLF = false, bNullChar = false; - for( sal_uLong nCnt = 0; nCnt < nBytesRead; ++nCnt ) + for( sal_uInt64 nCnt = 0; nCnt < nBytesRead; ++nCnt ) switch( aBuffer[ nCnt ] ) { case 0x0: bNullChar = true; break; |