[Libreoffice-commits] core.git: 2 commits - sw/source

Caolán McNamara caolanm at redhat.com
Fri Dec 16 10:50:43 UTC 2016


 sw/source/filter/ww8/ww8scan.cxx |   62 +++++++++++++++++++--------------------
 sw/source/filter/ww8/ww8scan.hxx |   48 +++++++++++++++---------------
 2 files changed, 55 insertions(+), 55 deletions(-)

New commits:
commit 980dce83b23793024977b23281e51eb295d9bf5e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 16 10:44:08 2016 +0000

    these sal_uLongs want to be sal_uInt64
    
    Change-Id: Ie1b17585cdb80836ad5ffed2b5ad787032b812e8

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 5bfa5ab..09f44c2 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5930,9 +5930,9 @@ void WW8Fib::WriteHeader(SvStream& rStrm)
     sal_uInt8 *pData = pDataPtr;
     memset( pData, 0, nUnencryptedHdr );
 
-    sal_uLong nPos = rStrm.Tell();
+    const sal_uInt64 nPos = rStrm.Tell();
     m_cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
-    rStrm.Seek( nPos );
+    rStrm.Seek(nPos);
 
     Set_UInt16( pData, m_wIdent );
     Set_UInt16( pData, m_nFib );
@@ -6018,9 +6018,9 @@ void WW8Fib::Write(SvStream& rStrm)
     sal_uInt8 *pData = pDataPtr;
     memset( pData, 0, m_fcMin - nUnencryptedHdr );
 
-    sal_uLong nPos = rStrm.Tell();
+    const sal_uInt64 nPos = rStrm.Tell();
     m_cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
-    rStrm.Seek( nPos );
+    rStrm.Seek(nPos);
 
     // ignore 2 longs, because they are unimportant
     pData += 2 * sizeof( sal_Int32);
commit c4d0e535ab64356104f258b345b858a46a09df2a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 16 10:42:28 2016 +0000

    these sal_uLongs want to be sal_uInt32
    
    Change-Id: I722a70d978bb353937f928e4359d47221bfd2a95

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 8c56b6b..5bfa5ab 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -945,7 +945,7 @@ sal_uInt32 WW8PLCFx_PCDAttrs::GetIdx() const
     return 0;
 }
 
-void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
+void WW8PLCFx_PCDAttrs::SetIdx(sal_uInt32)
 {
 }
 
@@ -1133,7 +1133,7 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
     delete pPcdI;
 }
 
-sal_uLong WW8PLCFx_PCD::GetIMax() const
+sal_uInt32 WW8PLCFx_PCD::GetIMax() const
 {
     return pPcdI ? pPcdI->GetIMax() : 0;
 }
@@ -1143,7 +1143,7 @@ sal_uInt32 WW8PLCFx_PCD::GetIdx() const
     return pPcdI ? pPcdI->GetIdx() : 0;
 }
 
-void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
+void WW8PLCFx_PCD::SetIdx(sal_uInt32 nIdx)
 {
     if (pPcdI)
         pPcdI->SetIdx( nIdx );
@@ -1371,7 +1371,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
 
     if( m_pPieceIter )    // Complex File ?
     {
-        sal_uLong nOldPos = m_pPieceIter->GetIdx();
+        sal_uInt32 nOldPos = m_pPieceIter->GetIdx();
 
         for (m_pPieceIter->SetIdx(0);
             m_pPieceIter->GetIdx() < m_pPieceIter->GetIMax(); m_pPieceIter->advance())
@@ -1789,7 +1789,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
 static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
 {
     void* pData;
-    sal_uLong nOldIdx = rPLCF.GetIdx();
+    sal_uInt32 nOldIdx = rPLCF.GetIdx();
 
     rF.nLen = rF.nId = rF.nOpt = 0;
     rF.bCodeNest = rF.bResNest = false;
@@ -2779,12 +2779,12 @@ long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
 }
 
 // ...Idx2: Default: ignore
-sal_uLong WW8PLCFx::GetIdx2() const
+sal_uInt32 WW8PLCFx::GetIdx2() const
 {
     return 0;
 }
 
-void WW8PLCFx::SetIdx2(sal_uLong )
+void WW8PLCFx::SetIdx2(sal_uInt32)
 {
 }
 
@@ -2912,7 +2912,7 @@ sal_uInt32 WW8PLCFx_Fc_FKP::GetIdx() const
     return u;
 }
 
-void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx(sal_uInt32 nIdx)
 {
     if( !( nIdx & 0xffffff00L ) )
     {
@@ -3127,7 +3127,7 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
     bLineEnd   = false;
 }
 
-sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uInt32 WW8PLCFx_Cp_FKP::GetPCDIdx() const
 {
     return pPcd ? pPcd->GetIdx() : 0;
 }
@@ -3178,9 +3178,9 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
         */
         if( !pPieceIter )
             return;
-        sal_uLong nOldPos = pPieceIter->GetIdx();
+        const sal_uInt32 nOldPos = pPieceIter->GetIdx();
         bool bOk = pPieceIter->SeekPos(nOrigCp);
-        pPieceIter->SetIdx( nOldPos );
+        pPieceIter->SetIdx(nOldPos);
         if (!bOk)
             return;
     }
@@ -3205,7 +3205,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
 
                 //We set the piece iterator to the piece that contains the
                 //character, now we have the correct piece for this character
-                sal_uLong nOldPos = pPieceIter->GetIdx();
+                sal_uInt32 nOldPos = pPieceIter->GetIdx();
                 p->nStartPos = nOrigCp;
                 pPieceIter->SeekPos( p->nStartPos);
 
@@ -3389,7 +3389,7 @@ sal_uInt32 WW8PLCFx_SEPX::GetIdx() const
     return pPLCF ? pPLCF->GetIdx() : 0;
 }
 
-void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
+void WW8PLCFx_SEPX::SetIdx(sal_uInt32 nIdx)
 {
     if( pPLCF ) pPLCF->SetIdx( nIdx );
 }
@@ -3574,7 +3574,7 @@ sal_uInt32 WW8PLCFx_SubDoc::GetIdx() const
     return 0;
 }
 
-void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
+void WW8PLCFx_SubDoc::SetIdx(sal_uInt32 nIdx)
 {
     if( pRef )
     {
@@ -3604,7 +3604,7 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
     if (!pRef)
         return;
 
-    sal_uLong nNr = pRef->GetIdx();
+    sal_uInt32 nNr = pRef->GetIdx();
 
     void *pData;
     WW8_CP nFoo;
@@ -3692,7 +3692,7 @@ sal_uInt32 WW8PLCFx_FLD::GetIdx() const
     return pPLCF ? pPLCF->GetIdx() : 0;
 }
 
-void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
+void WW8PLCFx_FLD::SetIdx(sal_uInt32 nIdx)
 {
     if( pPLCF )
         pPLCF->SetIdx( nIdx );
@@ -3977,18 +3977,18 @@ sal_uInt32 WW8PLCFx_Book::GetIdx() const
     return nIMax ? pBook[0]->GetIdx() : 0;
 }
 
-void WW8PLCFx_Book::SetIdx( sal_uLong nI )
+void WW8PLCFx_Book::SetIdx(sal_uInt32 nI)
 {
     if( nIMax )
         pBook[0]->SetIdx( nI );
 }
 
-sal_uLong WW8PLCFx_Book::GetIdx2() const
+sal_uInt32 WW8PLCFx_Book::GetIdx2() const
 {
     return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
 }
 
-void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
+void WW8PLCFx_Book::SetIdx2(sal_uInt32 nI)
 {
     if( nIMax )
     {
@@ -4230,13 +4230,13 @@ sal_uInt32 WW8PLCFx_AtnBook::GetIdx() const
     return nIMax ? m_pBook[0]->GetIdx() : 0;
 }
 
-void WW8PLCFx_AtnBook::SetIdx( sal_uLong nI )
+void WW8PLCFx_AtnBook::SetIdx(sal_uInt32 nI)
 {
     if( nIMax )
         m_pBook[0]->SetIdx( nI );
 }
 
-sal_uLong WW8PLCFx_AtnBook::GetIdx2() const
+sal_uInt32 WW8PLCFx_AtnBook::GetIdx2() const
 {
     if (nIMax)
         return m_pBook[1]->GetIdx() | ( m_bIsEnd ? 0x80000000 : 0 );
@@ -4244,7 +4244,7 @@ sal_uLong WW8PLCFx_AtnBook::GetIdx2() const
         return 0;
 }
 
-void WW8PLCFx_AtnBook::SetIdx2( sal_uLong nI )
+void WW8PLCFx_AtnBook::SetIdx2(sal_uInt32 nI)
 {
     if( nIMax )
     {
@@ -4362,13 +4362,13 @@ sal_uInt32 WW8PLCFx_FactoidBook::GetIdx() const
     return m_nIMax ? m_pBook[0]->GetIdx() : 0;
 }
 
-void WW8PLCFx_FactoidBook::SetIdx(sal_uLong nI)
+void WW8PLCFx_FactoidBook::SetIdx(sal_uInt32 nI)
 {
     if (m_nIMax)
         m_pBook[0]->SetIdx(nI);
 }
 
-sal_uLong WW8PLCFx_FactoidBook::GetIdx2() const
+sal_uInt32 WW8PLCFx_FactoidBook::GetIdx2() const
 {
     if (m_nIMax)
         return m_pBook[1]->GetIdx() | (m_bIsEnd ? 0x80000000 : 0);
@@ -4376,7 +4376,7 @@ sal_uLong WW8PLCFx_FactoidBook::GetIdx2() const
         return 0;
 }
 
-void WW8PLCFx_FactoidBook::SetIdx2(sal_uLong nI)
+void WW8PLCFx_FactoidBook::SetIdx2(sal_uInt32 nI)
 {
     if (m_nIMax)
     {
@@ -5248,12 +5248,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
     SetStartFc( rSave.nStartFC   );
 }
 
-sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uInt32 WW8PLCFx_Cp_FKP::GetIdx2() const
 {
     return GetPCDIdx();
 }
 
-void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2(sal_uInt32 nIdx)
 {
     if( pPcd )
         pPcd->SetIdx( nIdx );
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index f3e337e..eff6796 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -191,8 +191,8 @@ struct WW8FieldDesc
 
 struct WW8PLCFxSave1
 {
-    sal_uLong nPLCFxPos;
-    sal_uLong nPLCFxPos2;       ///< for PLCF_Cp_Fkp: PieceIter-Pos
+    sal_uInt32 nPLCFxPos;
+    sal_uInt32 nPLCFxPos2;       ///< for PLCF_Cp_Fkp: PieceIter-Pos
     long nPLCFxMemOfs;
     WW8_CP nStartCp;        ///< for cp based iterator like PAP and CHP
     long nCpOfs;
@@ -401,9 +401,9 @@ public:
     virtual ~WW8PLCFx() {}
     bool IsSprm() const { return bIsSprm; }
     virtual sal_uInt32 GetIdx() const = 0;
-    virtual void SetIdx( sal_uLong nIdx ) = 0;
-    virtual sal_uLong GetIdx2() const;
-    virtual void SetIdx2( sal_uLong nIdx );
+    virtual void SetIdx(sal_uInt32 nIdx) = 0;
+    virtual sal_uInt32 GetIdx2() const;
+    virtual void SetIdx2(sal_uInt32 nIdx);
     virtual bool SeekPos(WW8_CP nCpPos) = 0;
     virtual WW8_FC Where() = 0;
     virtual void GetSprms( WW8PLCFxDesc* p );
@@ -437,7 +437,7 @@ public:
     WW8PLCFx_PCDAttrs(const WW8Fib& rFib, WW8PLCFx_PCD* pPLCFx_PCD,
         const WW8ScannerBase* pBase );
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nI ) override;
+    virtual void SetIdx(sal_uInt32 nI) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual void GetSprms( WW8PLCFxDesc* p ) override;
@@ -460,9 +460,9 @@ public:
     WW8PLCFx_PCD(const WW8Fib& rFib, WW8PLCFpcd* pPLCFpcd,
         WW8_CP nStartCp, bool bVer67P);
     virtual ~WW8PLCFx_PCD() override;
-    sal_uLong GetIMax() const;
+    sal_uInt32 GetIMax() const;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nI ) override;
+    virtual void SetIdx(sal_uInt32 nI) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen ) override;
@@ -598,7 +598,7 @@ public:
         const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL );
     virtual ~WW8PLCFx_Fc_FKP() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_FC nFcPos) override;
     virtual WW8_FC Where() override;
     sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
@@ -629,9 +629,9 @@ public:
         const WW8ScannerBase& rBase,  ePLCFT ePl );
     virtual ~WW8PLCFx_Cp_FKP() override;
     void ResetAttrStartEnd();
-    sal_uLong GetPCDIdx() const;
-    virtual sal_uLong GetIdx2() const override;
-    virtual void  SetIdx2( sal_uLong nIdx ) override;
+    sal_uInt32 GetPCDIdx() const;
+    virtual sal_uInt32 GetIdx2() const override;
+    virtual void  SetIdx2(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_CP Where() override;
     virtual void GetSprms( WW8PLCFxDesc* p ) override;
@@ -659,7 +659,7 @@ public:
         WW8_CP nStartCp );
     virtual ~WW8PLCFx_SEPX() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual void GetSprms( WW8PLCFxDesc* p ) override;
@@ -687,7 +687,7 @@ public:
                     long nFcRef, long nLenRef, long nFcText, long nLenText, long nStruc);
     virtual ~WW8PLCFx_SubDoc() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
 
@@ -715,7 +715,7 @@ public:
     WW8PLCFx_FLD(SvStream* pSt, const WW8Fib& rMyFib, short nType);
     virtual ~WW8PLCFx_FLD() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual void GetSprms(WW8PLCFxDesc* p) override;
@@ -746,9 +746,9 @@ public:
     virtual ~WW8PLCFx_Book() override;
     long GetIMax() const { return nIMax; }
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nI ) override;
-    virtual sal_uLong GetIdx2() const override;
-    virtual void SetIdx2( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nI) override;
+    virtual sal_uInt32 GetIdx2() const override;
+    virtual void SetIdx2(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override;
@@ -783,9 +783,9 @@ public:
     WW8PLCFx_AtnBook(SvStream* pTableSt,const WW8Fib& rFib);
     virtual ~WW8PLCFx_AtnBook() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx( sal_uLong nI ) override;
-    virtual sal_uLong GetIdx2() const override;
-    virtual void SetIdx2( sal_uLong nIdx ) override;
+    virtual void SetIdx(sal_uInt32 nI) override;
+    virtual sal_uInt32 GetIdx2() const override;
+    virtual void SetIdx2(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override;
@@ -813,9 +813,9 @@ public:
     WW8PLCFx_FactoidBook(SvStream* pTableSt,const WW8Fib& rFib);
     virtual ~WW8PLCFx_FactoidBook() override;
     virtual sal_uInt32 GetIdx() const override;
-    virtual void SetIdx(sal_uLong nI) override;
-    virtual sal_uLong GetIdx2() const override;
-    virtual void SetIdx2(sal_uLong nIdx) override;
+    virtual void SetIdx(sal_uInt32 nI) override;
+    virtual sal_uInt32 GetIdx2() const override;
+    virtual void SetIdx2(sal_uInt32 nIdx) override;
     virtual bool SeekPos(WW8_CP nCpPos) override;
     virtual WW8_FC Where() override;
     virtual long GetNoSprms(WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen) override;


More information about the Libreoffice-commits mailing list