[Libreoffice-commits] core.git: sc/source

Michael Stahl mstahl at redhat.com
Sat Mar 29 06:45:51 PDT 2014


 sc/source/filter/excel/excrecds.cxx          |   14 +++++++-------
 sc/source/filter/excel/xestream.cxx          |    4 ++--
 sc/source/filter/excel/xistream.cxx          |    2 +-
 sc/source/filter/inc/excrecds.hxx            |    6 +++---
 sc/source/filter/inc/xestream.hxx            |    6 +++---
 sc/source/filter/inc/xistream.hxx            |    2 +-
 sc/source/filter/xcl97/XclImpChangeTrack.cxx |    2 +-
 sc/source/filter/xcl97/xcl97rec.cxx          |    2 +-
 8 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 8cc3ab84b97f2dc110f95476267e8f0a386c9466
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sat Mar 29 14:29:36 2014 +0100

    sc: adapt Excel filter to SvStream changes
    
    STREAM_SEEK_TO_END is apparently used to initialize variables and signal
    failure here, which is odd.
    
    Change-Id: I324a85b441dc377757f7c32eec2ad8a2c9a8c2eb

diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index b7e6df7..5097c80 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -355,8 +355,8 @@ void Exc1904::SaveXml( XclExpXmlStream& rStrm )
 //------------------------------------------------------ class ExcBundlesheet -
 
 ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTabNum ) :
-    nStrPos( STREAM_SEEK_TO_END ),
-    nOwnPos( STREAM_SEEK_TO_END ),
+    m_nStrPos( STREAM_SEEK_TO_END ),
+    m_nOwnPos( STREAM_SEEK_TO_END ),
     nGrbit( rRootData.pER->GetTabInfo().IsVisibleTab( nTabNum ) ? 0x0000 : 0x0001 ),
     nTab( nTabNum )
 {
@@ -364,8 +364,8 @@ ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTabNum ) :
 
 
 ExcBundlesheetBase::ExcBundlesheetBase() :
-    nStrPos( STREAM_SEEK_TO_END ),
-    nOwnPos( STREAM_SEEK_TO_END ),
+    m_nStrPos( STREAM_SEEK_TO_END ),
+    m_nOwnPos( STREAM_SEEK_TO_END ),
     nGrbit( 0x0000 ),
     nTab( SCTAB_GLOBAL )
 {
@@ -374,9 +374,9 @@ ExcBundlesheetBase::ExcBundlesheetBase() :
 
 void ExcBundlesheetBase::UpdateStreamPos( XclExpStream& rStrm )
 {
-    rStrm.SetSvStreamPos( nOwnPos );
+    rStrm.SetSvStreamPos( m_nOwnPos );
     rStrm.DisableEncryption();
-    rStrm << static_cast<sal_uInt32>(nStrPos);
+    rStrm << static_cast<sal_uInt32>(m_nStrPos);
     rStrm.EnableEncryption();
 }
 
@@ -400,7 +400,7 @@ ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) :
 
 void ExcBundlesheet::SaveCont( XclExpStream& rStrm )
 {
-    nOwnPos = rStrm.GetSvStreamPos();
+    m_nOwnPos = rStrm.GetSvStreamPos();
     rStrm   << (sal_uInt32) 0x00000000              // dummy (stream position of the sheet)
             << nGrbit;
     rStrm.WriteByteString(aName);             // 8 bit length, max 255 chars
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 289fc62..fc511a0 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -376,7 +376,7 @@ void XclExpStream::DisableEncryption()
     EnableEncryption(false);
 }
 
-sal_Size XclExpStream::SetSvStreamPos( sal_Size nPos )
+sal_Size XclExpStream::SetSvStreamPos(sal_uInt64 const nPos)
 {
     OSL_ENSURE( !mbInRec, "XclExpStream::SetSvStreamPos - not allowed inside of a record" );
     return mbInRec ? 0 : mrStrm.Seek( nPos );
@@ -599,7 +599,7 @@ sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( sal_Size nStrmPos ) const
 
 void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBytes )
 {
-    sal_Size nStrmPos = rStrm.Tell();
+    sal_uInt64 nStrmPos = rStrm.Tell();
     sal_uInt16 nBlockOffset = GetOffsetInBlock(nStrmPos);
     sal_uInt32 nBlockPos = GetBlockPos(nStrmPos);
 
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 75662a1..5f98314 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -79,7 +79,7 @@ void XclImpDecrypter::Update( SvStream& rStrm, sal_uInt16 nRecSize )
 {
     if( IsValid() )
     {
-        sal_Size nNewPos = rStrm.Tell();
+        sal_uInt64 const nNewPos = rStrm.Tell();
         if( (mnOldPos != nNewPos) || (mnRecSize != nRecSize) )
         {
             OnUpdate( mnOldPos, nNewPos, nRecSize );
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 2f19679..22892b1 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -260,8 +260,8 @@ private:
 class ExcBundlesheetBase : public ExcRecord
 {
 protected:
-    sal_Size                nStrPos;
-    sal_Size                nOwnPos;    // Position NACH # und Len
+    sal_uInt64              m_nStrPos;
+    sal_uInt64              m_nOwnPos;    // Position after # and Len
     sal_uInt16                  nGrbit;
     SCTAB                   nTab;
 
@@ -270,7 +270,7 @@ protected:
 public:
                             ExcBundlesheetBase( RootData& rRootData, SCTAB nTab );
 
-    inline void             SetStreamPos( sal_Size nNewStrPos ) { nStrPos = nNewStrPos; }
+    inline void             SetStreamPos(sal_uInt64 const nStrPos) { m_nStrPos = nStrPos; }
     void                    UpdateStreamPos( XclExpStream& rStrm );
 
     virtual sal_uInt16          GetNum() const SAL_OVERRIDE;
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index f1482c7..5971bc4 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -145,9 +145,9 @@ public:
     // *** SvStream access ***
 
     /** Sets position of system stream (only allowed outside of records). */
-    sal_Size            SetSvStreamPos( sal_Size nPos );
+    sal_uInt64          SetSvStreamPos(sal_uInt64 nPos);
     /** Returns the absolute position of the system stream. */
-    inline sal_Size     GetSvStreamPos() const { return mrStrm.Tell(); }
+    inline sal_uInt64   GetSvStreamPos() const { return mrStrm.Tell(); }
 
     void                SetEncrypter( XclExpEncrypterRef xEncrypter );
 
@@ -236,7 +236,7 @@ private:
     sal_uInt8           mpnSalt[16];
     sal_uInt8           mpnSaltDigest[16];
 
-    sal_Size            mnOldPos;      /// Last known stream position
+    sal_uInt64          mnOldPos;      /// Last known stream position
     bool                mbValid;
 };
 
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index 8d551e3..ec238da 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -86,7 +86,7 @@ private:
 
 private:
     ErrCode             mnError;        /// Decrypter error code.
-    sal_Size            mnOldPos;       /// Last known stream position.
+    sal_uInt64          mnOldPos;       /// Last known stream position.
     sal_uInt16          mnRecSize;      /// Current record size.
 };
 
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 808f74c..6dd47bc 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -54,7 +54,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
     if( xInStrm.Is() )
     {
         xInStrm->Seek( STREAM_SEEK_TO_END );
-        sal_uLong nStreamLen = xInStrm->Tell();
+        sal_uInt64 const nStreamLen = xInStrm->Tell();
         if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) )
         {
             xInStrm->Seek( STREAM_SEEK_TO_BEGIN );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 661f873..cb2f996 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1098,7 +1098,7 @@ XclExpString ExcBundlesheet8::GetName() const
 
 void ExcBundlesheet8::SaveCont( XclExpStream& rStrm )
 {
-    nOwnPos = rStrm.GetSvStreamPos();
+    m_nOwnPos = rStrm.GetSvStreamPos();
     // write dummy position, real position comes later
     rStrm.DisableEncryption();
     rStrm << sal_uInt32(0);


More information about the Libreoffice-commits mailing list