ooo-build r11311 - trunk/patches/test



Author: kyoshida
Date: Thu Jan 17 22:41:21 2008
New Revision: 11311
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11311&view=rev

Log:
more progress on exporting encrypted excel document.

Modified:
   trunk/patches/test/sc-book-n-sheet-protection-test.diff

Modified: trunk/patches/test/sc-book-n-sheet-protection-test.diff
==============================================================================
--- trunk/patches/test/sc-book-n-sheet-protection-test.diff	(original)
+++ trunk/patches/test/sc-book-n-sheet-protection-test.diff	Thu Jan 17 22:41:21 2008
@@ -1049,7 +1049,7 @@
 retrieving revision 1.67
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.67 excdoc.cxx
 --- sc/source/filter/excel/excdoc.cxx	22 May 2007 19:44:28 -0000	1.67
-+++ sc/source/filter/excel/excdoc.cxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/excel/excdoc.cxx	17 Jan 2008 22:34:21 -0000
 @@ -35,7 +35,7 @@
  
  // MARKER(update_precomp.py): autogen include statement, do not remove
@@ -1068,7 +1068,7 @@
  
  static String lcl_GetVbaTabName( SCTAB n )
  {
-@@ -176,7 +178,22 @@
+@@ -176,7 +178,24 @@
  		Add( new ExcDummy_00 );
  	else
  	{
@@ -1084,15 +1084,27 @@
 +
 +        }
 +
-+		Add( new ExcDummy8_00a ); // 005C
++        Add( new XclExpInterfaceHdr );
++        Add( new XclExpMMS );
++        Add( new XclExpInterfaceEnd );
++        Add( new XclExpWriteAccess );
 +        Add( new XclExpCodePage );
 +        Add( new XclExpDSF );
-+        // TODO: code page 0x0042 (2)
-+        // TODO: DSF (2)
++        Add( new ExcDummy8_01c0 );
  		rR.pTabId = new XclExpChTrTabId( Max( nExcTabCount, nCodenames ) );
  		Add( rR.pTabId );
          if( HasVbaStorage() )
-@@ -206,9 +223,14 @@
+@@ -186,7 +205,8 @@
+             if( rCodeName.Len() )
+                 Add( new XclCodename( rCodeName ) );
+ 		}
+-		Add( new ExcDummy8_00b );
++
++        Add( new XclExpFnGroupCount );
+ 	}
+ 
+ 	// erst Namen- und Tabellen-Eintraege aufbauen
+@@ -206,15 +226,29 @@
          aRecList.AppendRecord( CreateRecord( EXC_ID_NAME ) );
      }
  
@@ -1109,8 +1121,37 @@
 +    }
  
      if( GetBiff() == EXC_BIFF8 )
-         Add( new ExcDummy8_040 );
-@@ -346,8 +368,14 @@
+-        Add( new ExcDummy8_040 );
++    {
++        Add( new XclExpProt4Rev );
++        Add( new XclExpProt4RevPass );
++    }
+ 
+     aRecList.AppendNewRecord( new XclExpWindow1( GetRoot() ) );
+ 
++    if ( GetBiff() == EXC_BIFF8 )
++    {
++        Add( new XclExpBoolRecord(0x0040, false) ); // BACKUP
++        Add( new XclExpBoolRecord(0x008D, false) ); // HIDEOBJ
++    }
++
+     if( GetBiff() <= EXC_BIFF5 )
+     {
+ 		Add( new ExcDummy_040 );
+@@ -223,9 +257,11 @@
+     }
+     else
+     {
++        // BIFF8
+         Add( new Exc1904( rDoc ) );
+         Add( new XclExpBoolRecord( 0x000E, !rDoc.GetDocOptions().IsCalcAsShown() ) );
+-        Add( new ExcDummy8_041 );
++        Add( new XclExpBoolRecord(0x01B7, false) ); // REFRESHALL
++        Add( new XclExpBoolRecord(0x00DA, false) ); // BOOKBOOL
+     }
+ 
+     // Formatting: FONT, FORMAT, XF, STYLE, PALETTE
+@@ -346,8 +382,14 @@
      // page settings (SETUP and various other records)
      aRecList.AppendRecord( xPageSett );
  
@@ -1127,7 +1168,7 @@
  
      // local link table: EXTERNCOUNT, EXTERNSHEET
      if( eBiff <= EXC_BIFF5 )
-@@ -393,6 +421,9 @@
+@@ -393,6 +435,9 @@
  
      if( eBiff == EXC_BIFF8 )
  	{
@@ -1183,10 +1224,9 @@
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/excel/excrecds.cxx,v
 retrieving revision 1.87
-retrieving revision 1.87.126.1
-diff -u -b -I $Revision.*$ -I $Author.*$ -r1.87 -r1.87.126.1
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.87 excrecds.cxx
 --- sc/source/filter/excel/excrecds.cxx	22 May 2007 19:45:31 -0000	1.87
-+++ sc/source/filter/excel/excrecds.cxx	5 Jan 2008 06:16:08 -0000	1.87.126.1
++++ sc/source/filter/excel/excrecds.cxx	17 Jan 2008 22:34:21 -0000
 @@ -117,7 +117,7 @@
  
  #include "xcl97rec.hxx"
@@ -1196,18 +1236,26 @@
  
  //--------------------------------------------------------- class ExcDummy_00 -
  const BYTE		ExcDummy_00::pMyData[] = {
-@@ -519,13 +519,30 @@
- 
- // XclExpDocProtection ===============================================================
+@@ -513,15 +513,32 @@
+ // XclExpWindowProtection ===============================================================
  
--XclExpDocProtection::XclExpDocProtection(bool bValue) :
-+XclExpProtection::XclExpProtection(bool bValue) :
- 	XclExpBoolRecord(EXC_ID_PROTECT,bValue)
+ XclExpWindowProtection::XclExpWindowProtection(bool bValue) :
+-	XclExpBoolRecord(EXC_ID_WINDOWPROTECT,bValue)
++	XclExpBoolRecord(EXC_ID_WINDOWPROTECT, bValue)
  {
  }
  
- // ============================================================================
+ // XclExpDocProtection ===============================================================
  
+-XclExpDocProtection::XclExpDocProtection(bool bValue) :
+-	XclExpBoolRecord(EXC_ID_PROTECT,bValue)
++XclExpProtection::XclExpProtection(bool bValue) :
++	XclExpBoolRecord(EXC_ID_PROTECT, bValue)
++{
++}
++
++// ============================================================================
++
 +XclExpPassHash::XclExpPassHash(const Sequence<sal_Int8>& aHash) :
 +    XclExpRecord(EXC_ID_PASSWORD, 2),
 +    mnHash(aHash.getLength() >= 2 ? ((aHash[0] << 8) | aHash[1]) : 0x0000)
@@ -1219,15 +1267,11 @@
 +}
 +
 +void XclExpPassHash::WriteBody(XclExpStream& rStrm)
-+{
-+    rStrm << mnHash;
-+}
-+
-+// ============================================================================
-+
- XclExpFiltermode::XclExpFiltermode() :
-     XclExpEmptyRecord( EXC_ID_FILTERMODE )
  {
++    rStrm << mnHash;
+ }
+ 
+ // ============================================================================
 Index: sc/source/filter/excel/impop.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/excel/impop.cxx,v
@@ -1381,22 +1425,24 @@
 retrieving revision 1.9
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.9 xerecord.cxx
 --- sc/source/filter/excel/xerecord.cxx	22 May 2007 19:48:13 -0000	1.9
-+++ sc/source/filter/excel/xerecord.cxx	17 Jan 2008 04:07:06 -0000
-@@ -164,6 +164,7 @@
-     // EOF record
-     rStrm.StartRecord( EXC_ID_EOF, 0 );
-     rStrm.EndRecord();
++++ sc/source/filter/excel/xerecord.cxx	17 Jan 2008 22:34:21 -0000
+@@ -85,7 +85,9 @@
+ void XclExpRecord::Save( XclExpStream& rStrm )
+ {
+     DBG_ASSERT( mnRecId != EXC_ID_UNKNOWN, "XclExpRecord::Save - record ID uninitialized" );
 +    rStrm.DisableEncryption();
+     rStrm.StartRecord( mnRecId, mnRecSize );
++    rStrm.EnableEncryption();
+     WriteBody( rStrm );
+     rStrm.EndRecord();
  }
- 
- // ============================================================================
 Index: sc/source/filter/excel/xeroot.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/excel/xeroot.cxx,v
 retrieving revision 1.22
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.22 xeroot.cxx
 --- sc/source/filter/excel/xeroot.cxx	23 Oct 2007 14:44:34 -0000	1.22
-+++ sc/source/filter/excel/xeroot.cxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/excel/xeroot.cxx	17 Jan 2008 22:34:21 -0000
 @@ -40,9 +40,9 @@
  #include "xeroot.hxx"
  #endif
@@ -1451,8 +1497,16 @@
 retrieving revision 1.10
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.10 xestream.cxx
 --- sc/source/filter/excel/xestream.cxx	27 Feb 2007 12:25:23 -0000	1.10
-+++ sc/source/filter/excel/xestream.cxx	17 Jan 2008 04:07:06 -0000
-@@ -97,6 +97,67 @@
++++ sc/source/filter/excel/xestream.cxx	17 Jan 2008 22:34:22 -0000
+@@ -47,6 +47,7 @@
+ #include "xeroot.hxx"
+ #endif
+ 
++using ::std::vector;
+ 
+ // ============================================================================
+ 
+@@ -97,6 +98,68 @@
      mnSliceSize = 0;
  }
  
@@ -1466,7 +1520,10 @@
 +XclExpStream& XclExpStream::operator<<( sal_uInt8 nValue )
 +{
 +    PrepareWrite( 1 );
-+    mrStrm << nValue;
++    if (mbUseEncrypter && HasValidEncrypter())
++        mxEncrypter->Encrypt(mrStrm, nValue);
++    else
++        mrStrm << nValue;
 +    return *this;
 +}
 +
@@ -1481,9 +1538,7 @@
 +{
 +    PrepareWrite( 2 );
 +    if (mbUseEncrypter && HasValidEncrypter())
-+    {
 +        mxEncrypter->Encrypt(mrStrm, nValue);
-+    }
 +    else
 +        mrStrm << nValue;
 +    return *this;
@@ -1520,7 +1575,7 @@
  sal_Size XclExpStream::Write( const void* pData, sal_Size nBytes )
  {
      sal_Size nRet = 0;
-@@ -249,6 +310,26 @@
+@@ -249,6 +312,26 @@
      Write( &rBuffer[ 0 ], rBuffer.size() );
  }
  
@@ -1547,7 +1602,7 @@
  sal_Size XclExpStream::SetSvStreamPos( sal_Size nPos )
  {
      DBG_ASSERT( !mbInRec, "XclExpStream::SetSvStreamPos - not allowed inside of a record" );
-@@ -327,6 +408,7 @@
+@@ -327,6 +410,7 @@
  
  void XclExpStream::WriteRawZeroBytes( sal_Size nBytes )
  {
@@ -1555,7 +1610,7 @@
      const sal_uInt32 nData = 0;
      sal_Size nBytesLeft = nBytes;
      while( nBytesLeft >= sizeof( nData ) )
-@@ -340,3 +422,178 @@
+@@ -340,3 +424,144 @@
  
  // ============================================================================
  
@@ -1629,82 +1684,19 @@
 +    return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
 +}
 +
-+void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt16& nData )
++void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData )
++{
++    vector<sal_uInt8> aByte(1);
++    aByte[0] = nData;
++    EncryptBytes(rStrm, aByte);
++}
++
++void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt16 nData )
 +{
-+    fprintf(stdout, "XclExpBiff8Encrypter::Encrypt: stream pos = %ld\n", rStrm.Tell());fflush(stdout);
-+    maCodec.InitCipher(0);
-+    maCodec.Skip(214);
 +    ::std::vector<sal_uInt8> pnBytes(2);
 +    pnBytes[0] = nData & 0xFF;
 +    pnBytes[1] = (nData >> 8) & 0xFF;
-+    fprintf(stdout, "RAW: ");
-+    for (sal_uInt16 i = 0; i < 2; ++i)
-+        fprintf(stdout, "%2.2X ", pnBytes[i]);
-+    fprintf(stdout, "\n");
-+
-+    if (!maCodec.Encode(&pnBytes[0], 2, &pnBytes[0], 2))
-+    {
-+        fprintf(stdout, "XclExpBiff8Encrypter::Encrypt: encoding failed\n");fflush(stdout);
-+        return;
-+    }
-+
-+    fprintf(stdout, "ENC: ");
-+    for (sal_uInt16 i = 0; i < 2; ++i)
-+    {
-+        fprintf(stdout, "%2.2X ", pnBytes[i]);
-+        rStrm << pnBytes[i];
-+    }
-+    fprintf(stdout, "\n");
-+#if 0    
-+    sal_uInt8* pnCurrData = pnData;
-+    sal_uInt16 nBytesLeft = nBytes;
-+    while ( nBytesLeft )
-+    {
-+        sal_uInt16 nBlockLeft = EXC_ENCR_BLOCKSIZE - GetOffset( rStrm.Tell() );
-+        sal_uInt16 nDecBytes = ::std::min< sal_uInt16 >( nBytesLeft, nBlockLeft );
-+//      fprintf(stdout, "XclImpBiff8Decrypter::OnRead:   nDecBytes = %d\n", nDecBytes);fflush(stdout);
-+
-+        // read the block from stream
-+        nRet = nRet + static_cast< sal_uInt16 >( rStrm.Read( pnCurrData, nDecBytes ) );
-+//      fprintf(stdout, "RAW: ");
-+//      for (sal_uInt16 i = 0; i < nDecBytes; ++i)
-+//          fprintf(stdout, "%2.2x ", pnCurrData[i]);
-+//      fprintf(stdout, "\n");
-+
-+        // decode the block inplace
-+        maCodec.Decode( pnCurrData, nDecBytes, pnCurrData, nDecBytes );
-+        fprintf(stdout, "DEC: ");
-+        for (sal_uInt16 i = 0; i < nDecBytes; ++i)
-+            fprintf(stdout, "%2.2x ", pnCurrData[i]);
-+        fprintf(stdout, "\n");
-+
-+//      if (nDecBytes)
-+//      {
-+//          ::std::vector<sal_uInt8> pnEncData(nDecBytes);
-+//          bool result = maCodec2.Encode(pnCurrData, nDecBytes, &pnEncData[0], nDecBytes);
-+//          if (result)
-+//          {
-+//              fprintf(stdout, "re-encoded bytes:\n");
-+//              for (sal_uInt16 i = 0; i < nDecBytes; ++i)
-+//                  fprintf(stdout, "%2.2x ", pnEncData.at(i));
-+//              fprintf(stdout, "\n");
-+//          }
-+//          else
-+//          {
-+//              fprintf(stdout, "re-encoding failed\n");
-+//          }
-+//      }
-+
-+        if ( GetOffset( rStrm.Tell() ) == 0 )
-+        {
-+            maCodec.InitCipher( GetBlock( rStrm.Tell() ) );
-+            maCodec2.InitCipher( GetBlock( rStrm.Tell() ) );
-+        }
-+
-+        pnCurrData += nDecBytes;
-+        nBytesLeft = nBytesLeft - nDecBytes;
-+    }
-+#endif    
++    EncryptBytes(rStrm, pnBytes);
 +}
 +
 +void XclExpBiff8Encrypter::Init( const String& aPass, const sal_uInt8 nDocId[16],
@@ -1734,6 +1726,52 @@
 +    fprintf(stdout, "XclExpBiff8Encrypter::Init: is valid? (%s)\n", bValid?"yes":"no");fflush(stdout);
 +    mbValid = bValid;
 +}
++
++void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBytes )
++{
++    fprintf(stdout, "XclExpBiff8Encrypter::EncryptBytes: stream pos = %ld\n", rStrm.Tell());fflush(stdout);
++    sal_Size nSize = aBytes.size();
++    if (nSize == 0)
++        return;
++
++    maCodec.InitCipher(0);
++    maCodec.Skip(rStrm.Tell());
++    fprintf(stdout, "RAW: ");
++    for (sal_uInt16 i = 0; i < nSize; ++i)
++        fprintf(stdout, "%2.2X ", aBytes[i]);
++    fprintf(stdout, "\n");
++
++    if (!maCodec.Encode(&aBytes[0], nSize, &aBytes[0], nSize))
++    {
++        fprintf(stdout, "XclExpBiff8Encrypter::Encrypt: encoding failed\n");
++        fflush(stdout);
++    }
++
++    fprintf(stdout, "ENC: ");
++    for (sal_uInt16 i = 0; i < nSize; ++i)
++    {
++        fprintf(stdout, "%2.2X ", aBytes[i]);
++        rStrm << aBytes[i];
++    }
++    fprintf(stdout, "\n");
++}
+Index: sc/source/filter/excel/xestyle.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/excel/xestyle.cxx,v
+retrieving revision 1.30
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.30 xestyle.cxx
+--- sc/source/filter/excel/xestyle.cxx	18 Jul 2007 11:55:28 -0000	1.30
++++ sc/source/filter/excel/xestyle.cxx	17 Jan 2008 22:34:22 -0000
+@@ -1241,7 +1241,9 @@
+     else
+         aExpStr.Assign( rFormatStr );
+ 
++    rStrm.DisableEncryption();
+     rStrm.StartRecord( EXC_ID4_FORMAT, 2 + aExpStr.GetSize() );
++    rStrm.EnableEncryption();
+     rStrm << nXclNumFmt << aExpStr;
+     rStrm.EndRecord();
+ }
 Index: sc/source/filter/excel/xetable.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/excel/xetable.cxx,v
@@ -1754,7 +1792,7 @@
 retrieving revision 1.29
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.29 xicontent.cxx
 --- sc/source/filter/excel/xicontent.cxx	2 Aug 2007 13:31:10 -0000	1.29
-+++ sc/source/filter/excel/xicontent.cxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/excel/xicontent.cxx	17 Jan 2008 22:34:23 -0000
 @@ -147,6 +147,13 @@
  #endif
  
@@ -1769,7 +1807,19 @@
  
  // Shared string table ========================================================
  
-@@ -1026,8 +1033,20 @@
+@@ -160,7 +167,11 @@
+     sal_uInt32 nStrCount;
+     rStrm.Ignore( 4 );
+     rStrm >> nStrCount;
++    fprintf(stdout, "XclImpSst::ReadSst: string count = %ld\n", nStrCount);fflush(stdout);
+     maStrings.clear();
++    // TODO: temporarily disable further processing when the string count is too large.
++    if (nStrCount > 1000000)
++        return;
+     maStrings.reserve( static_cast< size_t >( nStrCount ) );
+     while( (nStrCount > 0) && rStrm.IsValid() )
+     {
+@@ -1026,8 +1037,20 @@
          sal_uInt8 pnSaltData[ 16 ];
          sal_uInt8 pnSaltHash[ 16 ];
          rStrm.Read( pnDocId, 16 );
@@ -1790,7 +1840,7 @@
          xDecr.reset( new XclImpBiff8Decrypter(
              rStrm.GetRoot(), pnDocId, pnSaltData, pnSaltHash ) );
      }
-@@ -1084,6 +1103,7 @@
+@@ -1084,6 +1107,7 @@
  
  ErrCode XclImpDecryptHelper::ReadFilepass( XclImpStream& rStrm )
  {
@@ -1798,7 +1848,7 @@
      XclImpDecrypterRef xDecr;
      rStrm.DisableDecryption();
  
-@@ -1100,9 +1120,177 @@
+@@ -1100,9 +1124,177 @@
      rStrm.SetDecrypter( xDecr );
      // remember encryption for export
      rStrm.GetRoot().GetExtDocOptions().GetDocSettings().mbEncrypted = true;
@@ -1977,6 +2027,21 @@
 +
  // ============================================================================
  
+Index: sc/source/filter/excel/xilink.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/excel/xilink.cxx,v
+retrieving revision 1.22
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.22 xilink.cxx
+--- sc/source/filter/excel/xilink.cxx	27 Jun 2007 12:44:39 -0000	1.22
++++ sc/source/filter/excel/xilink.cxx	17 Jan 2008 22:34:23 -0000
+@@ -288,6 +288,7 @@
+     DBG_ASSERT_BIFF( rStrm.GetRoot().GetBiff() == EXC_BIFF8 );
+     if( rStrm.GetRoot().GetBiff() == EXC_BIFF8 )
+     {
++        rStrm.EnableDecryption();
+         sal_Size nReadCount = rStrm.GetRecLeft() / 2;
+         DBG_ASSERT( nReadCount <= 0xFFFF, "XclImpTabInfo::ReadTabid - record too long" );
+         maTabIdVec.clear();
 Index: sc/source/filter/excel/xiroot.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/excel/xiroot.cxx,v
@@ -2019,7 +2084,7 @@
 retrieving revision 1.21
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.21 xistream.cxx
 --- sc/source/filter/excel/xistream.cxx	27 Feb 2007 12:28:06 -0000	1.21
-+++ sc/source/filter/excel/xistream.cxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/excel/xistream.cxx	17 Jan 2008 22:34:23 -0000
 @@ -49,6 +49,9 @@
  #include "xiroot.hxx"
  #endif
@@ -2284,13 +2349,79 @@
  	void					Note( void );					// 0x1C
  	void					Columndefault( void );			// 0x20
  	void					Array25( void );				// 0x21
+Index: sc/source/filter/inc/xcl97dum.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/inc/xcl97dum.hxx,v
+retrieving revision 1.10
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.10 xcl97dum.hxx
+--- sc/source/filter/inc/xcl97dum.hxx	22 Jan 2007 13:20:35 -0000	1.10
++++ sc/source/filter/inc/xcl97dum.hxx	17 Jan 2008 22:34:23 -0000
+@@ -42,40 +42,7 @@
+ 
+ // --- class ExcDummy8_xx --------------------------------------------
+ 
+-class ExcDummy8_00a : public ExcDummyRec
+-{
+-private:
+-    static const BYTE       pMyData[];
+-    static const sal_Size   nMyLen;
+-public:
+-    virtual sal_Size        GetLen() const;
+-    virtual const BYTE*     GetData() const;
+-};
+-
+-
+-class ExcDummy8_00b : public ExcDummyRec
+-{
+-private:
+-    static const BYTE       pMyData[];
+-    static const sal_Size   nMyLen;
+-public:
+-    virtual sal_Size        GetLen() const;
+-    virtual const BYTE*     GetData() const;
+-};
+-
+-
+-class ExcDummy8_040 : public ExcDummyRec
+-{
+-private:
+-    static const BYTE       pMyData[];
+-    static const sal_Size   nMyLen;
+-public:
+-    virtual sal_Size        GetLen() const;
+-    virtual const BYTE*     GetData() const;
+-};
+-
+-
+-class ExcDummy8_041 : public ExcDummyRec
++class ExcDummy8_02 : public ExcDummyRec
+ {
+ private:
+     static const BYTE       pMyData[];
+@@ -85,8 +52,9 @@
+     virtual const BYTE*     GetData() const;
+ };
+ 
++// ============================================================================
+ 
+-class ExcDummy8_02 : public ExcDummyRec
++class ExcDummy8_01c0 : public ExcDummyRec
+ {
+ private:
+     static const BYTE       pMyData[];
+@@ -96,5 +64,4 @@
+     virtual const BYTE*     GetData() const;
+ };
+ 
+-
+ #endif // _XCL97DUM_HXX
 Index: sc/source/filter/inc/xcl97rec.hxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/inc/xcl97rec.hxx,v
 retrieving revision 1.47
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.47 xcl97rec.hxx
 --- sc/source/filter/inc/xcl97rec.hxx	22 Jan 2007 13:20:49 -0000	1.47
-+++ sc/source/filter/inc/xcl97rec.hxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/inc/xcl97rec.hxx	17 Jan 2008 22:34:23 -0000
 @@ -43,6 +43,8 @@
  #include "xlstyle.hxx"
  #endif
@@ -2336,7 +2467,7 @@
  
  class XclCalccount : public ExcRecord
  {
-@@ -564,5 +567,43 @@
+@@ -564,5 +567,132 @@
                                  XclRefmode( const ScDocument& );
  };
  
@@ -2357,6 +2488,71 @@
 +
 +// ============================================================================
 +
++class XclExpFnGroupCount : public XclExpRecord
++{
++public:
++    explicit XclExpFnGroupCount();
++    virtual ~XclExpFnGroupCount();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
++/** Beginning of User Interface Records */
++class XclExpInterfaceHdr : public XclExpRecord
++{
++public:
++    explicit XclExpInterfaceHdr();
++    virtual ~XclExpInterfaceHdr();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
++/** Beginning of User Interface Records */
++class XclExpInterfaceEnd : public XclExpRecord
++{
++public:
++    explicit XclExpInterfaceEnd();
++    virtual ~XclExpInterfaceEnd();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
++/** ADDMENU/DELMENU Record Group Count */
++class XclExpMMS : public XclExpRecord
++{
++public:
++    explicit XclExpMMS();
++    virtual ~XclExpMMS();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
++/** Write Access User Name - This record contains the user name, which is
++    the name you type when you install Excel. */
++class XclExpWriteAccess : public XclExpRecord
++{
++public:
++    explicit XclExpWriteAccess();
++    virtual ~XclExpWriteAccess();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
 +class XclExpCodePage : public XclExpRecord
 +{
 +public:
@@ -2378,15 +2574,59 @@
 +private:
 +    virtual void WriteBody( XclExpStream& rStrm );
 +};
++
++// ============================================================================
++
++class XclExpProt4Rev : public XclExpRecord
++{
++public:
++    explicit XclExpProt4Rev();
++    virtual ~XclExpProt4Rev();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
++
++// ============================================================================
++
++class XclExpProt4RevPass : public XclExpRecord
++{
++public:
++    explicit XclExpProt4RevPass();
++    virtual ~XclExpProt4RevPass();
++
++private:
++    virtual void WriteBody( XclExpStream& rStrm );
++};
  
  #endif // _XCL97REC_HXX
+Index: sc/source/filter/inc/xerecord.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/inc/xerecord.hxx,v
+retrieving revision 1.13
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.13 xerecord.hxx
+--- sc/source/filter/inc/xerecord.hxx	22 May 2007 19:56:16 -0000	1.13
++++ sc/source/filter/inc/xerecord.hxx	17 Jan 2008 22:34:23 -0000
+@@ -278,8 +278,12 @@
+     {
+         // inlining prevents warning in wntmsci10
+         for( typename RecordVec::iterator aIt = maRecs.begin(), aEnd = maRecs.end(); aIt != aEnd; ++aIt )
++        {
++            // disable encryption unless each record explicitly enables it.
++            rStrm.DisableEncryption();
+             (*aIt)->Save( rStrm );
+     }
++    }
+ 
+ private:
+     typedef ::std::vector< RecordRefType > RecordVec;
 Index: sc/source/filter/inc/xeroot.hxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/inc/xeroot.hxx,v
 retrieving revision 1.20
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.20 xeroot.hxx
 --- sc/source/filter/inc/xeroot.hxx	19 Dec 2006 13:24:06 -0000	1.20
-+++ sc/source/filter/inc/xeroot.hxx	17 Jan 2008 04:07:06 -0000
++++ sc/source/filter/inc/xeroot.hxx	17 Jan 2008 22:34:23 -0000
 @@ -161,6 +161,10 @@
          @param nRecId  Identifier that specifies which record is returned. */
      XclExpRecordRef     CreateRecord( sal_uInt16 nRecId ) const;
@@ -2404,17 +2644,18 @@
 retrieving revision 1.7
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.7 xestream.hxx
 --- sc/source/filter/inc/xestream.hxx	10 Jul 2006 13:56:03 -0000	1.7
-+++ sc/source/filter/inc/xestream.hxx	17 Jan 2008 04:07:06 -0000
-@@ -41,6 +41,8 @@
++++ sc/source/filter/inc/xestream.hxx	17 Jan 2008 22:34:23 -0000
+@@ -41,6 +41,9 @@
  #ifndef SC_XLSTREAM_HXX
  #include "xlstream.hxx"
  #endif
 +#include <stdio.h>
 +#include <svx/mscodec.hxx>
++#include <vector>
  
  /* ============================================================================
  Output stream class for Excel export
-@@ -49,6 +51,8 @@
+@@ -49,6 +52,8 @@
  ============================================================================ */
  
  class XclExpRoot;
@@ -2423,7 +2664,7 @@
  
  /** This class is used to export Excel record streams.
      @descr  An instance is constructed with an SvStream and the maximum size of Excel
-@@ -107,14 +111,14 @@
+@@ -107,14 +112,14 @@
      /** Sets data slice length. 0 = no slices. */
      void                SetSliceSize( sal_uInt16 nSize );
  
@@ -2446,7 +2687,7 @@
  
      /** Writes nBytes bytes from memory. */
      sal_Size            Write( const void* pData, sal_Size nBytes );
-@@ -155,6 +159,29 @@
+@@ -155,6 +160,29 @@
      /** Returns the absolute position of the system stream. */
      inline sal_Size     GetSvStreamPos() const { return mrStrm.Tell(); }
  
@@ -2476,7 +2717,7 @@
  private:
      /** Writes header data, internal setup. */
      void                InitRecord( sal_uInt16 nRecId );
-@@ -177,6 +204,9 @@
+@@ -177,6 +205,9 @@
      SvStream&           mrStrm;         /// Reference to the system output stream.
      const XclExpRoot&   mrRoot;         /// Filter root data.
  
@@ -2486,7 +2727,7 @@
                          // length data
      sal_uInt16          mnMaxRecSize;   /// Maximum size of record content.
      sal_uInt16          mnMaxContSize;  /// Maximum size of CONTINUE content.
-@@ -194,64 +224,39 @@
+@@ -194,64 +225,44 @@
  
  // ----------------------------------------------------------------------------
  
@@ -2496,34 +2737,42 @@
 -    mrStrm << nValue;
 -    return *this;
 -}
--
+ 
 -inline XclExpStream& XclExpStream::operator<<( sal_uInt8 nValue )
 -{
 -    PrepareWrite( 1 );
 -    mrStrm << nValue;
 -    return *this;
 -}
--
++// ============================================================================
+ 
 -inline XclExpStream& XclExpStream::operator<<( sal_Int16 nValue )
--{
++class XclExpBiff8Encrypter
+ {
 -    PrepareWrite( 2 );
 -    mrStrm << nValue;
 -    return *this;
 -}
--
++public:
++    explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16], 
++                                   const sal_uInt8 nSalt[16], const sal_uInt8 nSaltHash[16] );
++    ~XclExpBiff8Encrypter();
+ 
 -inline XclExpStream& XclExpStream::operator<<( sal_uInt16 nValue )
 -{
 -    PrepareWrite( 2 );
 -    mrStrm << nValue;
 -    return *this;
 -}
--
++    bool IsValid() const;
+ 
 -inline XclExpStream& XclExpStream::operator<<( sal_Int32 nValue )
 -{
 -    PrepareWrite( 4 );
 -    mrStrm << nValue;
 -    return *this;
 -}
++    void Update( SvStream& rStrm, sal_uInt16 nRecSize );
  
 -inline XclExpStream& XclExpStream::operator<<( sal_uInt32 nValue )
 -{
@@ -2531,41 +2780,33 @@
 -    mrStrm << nValue;
 -    return *this;
 -}
--
++    void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize );
++    sal_uInt32 GetBlock( sal_Size nStrmPos ) const;
++    sal_uInt16 GetOffset( sal_Size nStrmPos ) const;
+ 
 -inline XclExpStream& XclExpStream::operator<<( float fValue )
 -{
 -    PrepareWrite( 4 );
 -    mrStrm << fValue;
 -    return *this;
 -}
-+// ============================================================================
  
 -inline XclExpStream& XclExpStream::operator<<( double fValue )
-+class XclExpBiff8Encrypter
- {
+-{
 -    PrepareWrite( 8 );
 -    mrStrm << fValue;
 -    return *this;
 -}
-+public:
-+    explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16], 
-+                                   const sal_uInt8 nSalt[16], const sal_uInt8 nSaltHash[16] );
-+    ~XclExpBiff8Encrypter();
-+
-+    bool IsValid() const;
-+
-+    void Update( SvStream& rStrm, sal_uInt16 nRecSize );
-+
-+    void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize );
-+    sal_uInt32 GetBlock( sal_Size nStrmPos ) const;
-+    sal_uInt16 GetOffset( sal_Size nStrmPos ) const;
-+    void Encrypt( SvStream& rStrm, sal_uInt16& nData );
++    void Encrypt( SvStream& rStrm, sal_uInt8  nData );
++    void Encrypt( SvStream& rStrm, sal_uInt16 nData );
  
 +private:
 +    void Init( const String& aPass, const sal_uInt8 nDocId[16], 
 +               const sal_uInt8 nSalt[16], const sal_uInt8 nSaltHash[16] );
  
 -// ============================================================================
++    void EncryptBytes( SvStream& rStrm, ::std::vector<sal_uInt8>& aBytes );
++
 +private:
 +    ::svx::MSCodec_Std97 maCodec;       /// Crypto algorithm implementation.
 +    sal_uInt16          mnPassw[16];   /// Cached password data for copy construction.
@@ -2601,7 +2842,7 @@
 retrieving revision 1.14
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.14 xicontent.hxx
 --- sc/source/filter/inc/xicontent.hxx	6 Jul 2007 12:38:28 -0000	1.14
-+++ sc/source/filter/inc/xicontent.hxx	17 Jan 2008 04:07:07 -0000
++++ sc/source/filter/inc/xicontent.hxx	17 Jan 2008 22:34:23 -0000
 @@ -53,6 +53,8 @@
  #include "xiroot.hxx"
  #endif
@@ -2744,7 +2985,7 @@
 retrieving revision 1.21
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.21 scflt.cxx
 --- sc/source/filter/starcalc/scflt.cxx	26 Nov 2007 14:42:17 -0000	1.21
-+++ sc/source/filter/starcalc/scflt.cxx	17 Jan 2008 04:07:07 -0000
++++ sc/source/filter/starcalc/scflt.cxx	17 Jan 2008 22:34:23 -0000
 @@ -1156,9 +1156,9 @@
  	//rStream.Read(&SheetProtect, sizeof(SheetProtect));
  	lcl_ReadSheetProtect(rStream, SheetProtect);
@@ -2772,31 +3013,180 @@
  
  		rStream >> TabNo;
  
+Index: sc/source/filter/xcl97/XclExpChangeTrack.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/xcl97/XclExpChangeTrack.cxx,v
+retrieving revision 1.25
+diff -u -b -I $Revision.*$ -I $Author.*$ -r1.25 XclExpChangeTrack.cxx
+--- sc/source/filter/xcl97/XclExpChangeTrack.cxx	27 Feb 2007 12:42:44 -0000	1.25
++++ sc/source/filter/xcl97/XclExpChangeTrack.cxx	17 Jan 2008 22:34:23 -0000
+@@ -507,6 +507,7 @@
+ 
+ void XclExpChTrTabId::SaveCont( XclExpStream& rStrm )
+ {
++    rStrm.EnableEncryption();
+ 	if( pBuffer )
+ 		for( sal_uInt16* pElem = pBuffer; pElem < (pBuffer + nTabCount); pElem++ )
+ 			rStrm << *pElem;
 Index: sc/source/filter/xcl97/xcl97dum.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/xcl97/xcl97dum.cxx,v
 retrieving revision 1.20
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.20 xcl97dum.cxx
 --- sc/source/filter/xcl97/xcl97dum.cxx	22 Jan 2007 13:22:46 -0000	1.20
-+++ sc/source/filter/xcl97/xcl97dum.cxx	17 Jan 2008 04:07:07 -0000
-@@ -64,9 +64,7 @@
- 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++++ sc/source/filter/xcl97/xcl97dum.cxx	17 Jan 2008 22:34:23 -0000
+@@ -44,60 +44,6 @@
+ 
+ // --- ExcDummy8_xx Data ---------------------------------------------
+ 
+-// ... (8+) := neu in Biff8, ... (8*) := anders in Biff8
+-
+-const BYTE ExcDummy8_00a::pMyData[] = {
+-	0xe1, 0x00, 0x02, 0x00,	0xb0, 0x04,						// INTERFACEHDR
+-	0xc1, 0x00, 0x02, 0x00, 0x00, 0x00,						// MMS
+-	0xe2, 0x00, 0x00, 0x00,									// INTERFACEEND
+-	0x5c, 0x00, 0x70, 0x00, 								// WRITEACCESS (8*)
+-    0x04, 0x00, 0x00,  'C',  'a',  'l',  'c', 0x20,         // "Calc"
+-    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+-	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 -	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 -	0x42, 0x00, 0x02, 0x00, 0xb0, 0x04,						// CODEPAGE
 -	0x61, 0x01, 0x02, 0x00, 0x00, 0x00						// DSF (8+)
-+	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
- };
- const sal_Size ExcDummy8_00a::nMyLen = sizeof(ExcDummy8_00a::pMyData);
+-};
+-const sal_Size ExcDummy8_00a::nMyLen = sizeof(ExcDummy8_00a::pMyData);
+-
+-															// TABID (8+): ExcTabid
+-
+-const BYTE ExcDummy8_00b::pMyData[] = {
+-	0x9c, 0x00, 0x02, 0x00, 0x0e, 0x00						// FNGROUPCOUNT
+-};
+-const sal_Size ExcDummy8_00b::nMyLen = sizeof(ExcDummy8_00b::pMyData);
+-
+-
+-const BYTE ExcDummy8_040::pMyData[] = {
+-	0xaf, 0x01, 0x02, 0x00, 0x00, 0x00,						// PROT4REV (8+)
+-	0xbc, 0x01, 0x02, 0x00, 0x00, 0x00,						// PROT4REVPASS (8+)
+-//	0x3d, 0x00, 0x12, 0x00, 0xe0, 0x01, 0x5a, 0x00, 0xcf,	// WINDOW1
+-//	0x3f, 0x4e, 0x2a, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+-//	0x01, 0x00, 0x58, 0x02,
+-	0x40, 0x00, 0x02, 0x00, 0x00, 0x00,						// BACKUP
+-	0x8d, 0x00, 0x02, 0x00, 0x00, 0x00						// HIDEOBJ
+-};
+-const sal_Size ExcDummy8_040::nMyLen = sizeof(ExcDummy8_040::pMyData);
+-
+-
+-const BYTE ExcDummy8_041::pMyData[] = {
+-	0xb7, 0x01, 0x02, 0x00, 0x00, 0x00,						// REFRESHALL (8+)
+-	0xda, 0x00, 0x02, 0x00, 0x00, 0x00						// BOOKBOOL
+-};
+-const sal_Size ExcDummy8_041::nMyLen = sizeof(ExcDummy8_041::pMyData);
+-
+-
+-
+ const BYTE ExcDummy8_02::pMyData[] = {
+     0x5f, 0x00, 0x02, 0x00, 0x01, 0x00                      // SAVERECALC
+ 	};
+@@ -106,65 +52,31 @@
+ 
+ // --- class ExcDummy8_xx --------------------------------------------
+ 
+-sal_Size ExcDummy8_00a::GetLen() const
+-{
+-	return nMyLen;
+-}
+-
+-
+-const BYTE* ExcDummy8_00a::GetData() const
+-{
+-	return pMyData;
+-}
+-
+-
+-
+-sal_Size ExcDummy8_00b::GetLen() const
+-{
+-	return nMyLen;
+-}
+-
+-
+-const BYTE* ExcDummy8_00b::GetData() const
+-{
+-	return pMyData;
+-}
+-
+-
+-
+-sal_Size ExcDummy8_040::GetLen() const
++sal_Size ExcDummy8_02::GetLen() const
+ {
+ 	return nMyLen;
+ }
+ 
+ 
+-const BYTE* ExcDummy8_040::GetData() const
++const BYTE* ExcDummy8_02::GetData() const
+ {
+ 	return pMyData;
+ }
+ 
++// ============================================================================
+ 
++const BYTE ExcDummy8_01c0::pMyData[] = {
++	0xC0, 0x01, 0x00, 0x00
++};
  
+-sal_Size ExcDummy8_041::GetLen() const
+-{
+-	return nMyLen;
+-}
+-
+-
+-const BYTE* ExcDummy8_041::GetData() const
+-{
+-	return pMyData;
+-}
+-
+-
++const sal_Size ExcDummy8_01c0::nMyLen = sizeof(ExcDummy8_01c0::pMyData);
+ 
+-sal_Size ExcDummy8_02::GetLen() const
++sal_Size ExcDummy8_01c0::GetLen() const
+ {
+ 	return nMyLen;
+ }
+ 
+-
+-const BYTE* ExcDummy8_02::GetData() const
++const BYTE* ExcDummy8_01c0::GetData() const
+ {
+ 	return pMyData;
+ }
 Index: sc/source/filter/xcl97/xcl97rec.cxx
 ===================================================================
 RCS file: /cvs/sc/sc/source/filter/xcl97/xcl97rec.cxx,v
 retrieving revision 1.86
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.86 xcl97rec.cxx
 --- sc/source/filter/xcl97/xcl97rec.cxx	10 May 2007 16:52:00 -0000	1.86
-+++ sc/source/filter/xcl97/xcl97rec.cxx	17 Jan 2008 04:07:08 -0000
++++ sc/source/filter/xcl97/xcl97rec.cxx	17 Jan 2008 22:34:24 -0000
+@@ -36,7 +36,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sc.hxx"
+ 
+-
++#include <stdio.h>
+ 
+ #ifndef _SVDPOOL_HXX //autogen wg. SdrItemPool
+ #include <svx/svdpool.hxx>
 @@ -134,6 +134,7 @@
  #include "scextopt.hxx"
  #include "docoptio.hxx"
@@ -2893,7 +3283,7 @@
  
  
  
-@@ -1393,3 +1434,84 @@
+@@ -1393,3 +1434,213 @@
      XclExpBoolRecord( 0x000F, rDoc.GetAddressConvention() != ScAddress::CONV_XL_R1C1 )
  {
  }
@@ -2945,6 +3335,105 @@
 +
 +// ============================================================================
 +
++XclExpFnGroupCount::XclExpFnGroupCount() :
++    XclExpRecord(0x009C, 2)
++{
++}
++
++XclExpFnGroupCount::~XclExpFnGroupCount()
++{
++}
++
++void XclExpFnGroupCount::WriteBody( XclExpStream& rStrm )
++{
++    rStrm << static_cast<sal_uInt16>(14);
++}
++
++// ============================================================================
++
++XclExpInterfaceHdr::XclExpInterfaceHdr() :
++    XclExpRecord(0x00E1, 2)
++{
++}
++
++XclExpInterfaceHdr::~XclExpInterfaceHdr()
++{
++}
++
++void XclExpInterfaceHdr::WriteBody( XclExpStream& rStrm )
++{
++    // The value must be the same value as the CODEPAGE record.
++    rStrm.DisableEncryption();
++    rStrm << static_cast<sal_uInt16>(0x04B0);
++}
++
++// ============================================================================
++
++XclExpInterfaceEnd::XclExpInterfaceEnd() :
++    XclExpRecord(0x00E2, 0)
++{
++}
++
++XclExpInterfaceEnd::~XclExpInterfaceEnd()
++{
++}
++
++void XclExpInterfaceEnd::WriteBody( XclExpStream& /*rStrm*/ )
++{
++}
++
++// ============================================================================
++
++XclExpMMS::XclExpMMS() :
++    XclExpRecord(0x00C1, 2)
++{
++}
++
++XclExpMMS::~XclExpMMS()
++{
++}
++
++void XclExpMMS::WriteBody( XclExpStream& rStrm )
++{
++    rStrm << static_cast<sal_uInt16>(0x0000);
++}
++
++// ============================================================================
++
++XclExpWriteAccess::XclExpWriteAccess() :
++    XclExpRecord(0x005C, 112)
++{
++}
++
++XclExpWriteAccess::~XclExpWriteAccess()
++{
++}
++
++void XclExpWriteAccess::WriteBody( XclExpStream& rStrm )
++{
++    static const sal_uInt8 aData[] = {
++        0x04, 0x00, 0x00,  'C',  'a',  'l',  'c', 0x20,
++        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
++    	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 };
++
++    sal_Size nDataSize = sizeof(aData);
++    for (sal_Size i = 0; i < nDataSize; ++i)
++        rStrm << aData[i];
++}
++
++// ============================================================================
++
 +XclExpCodePage::XclExpCodePage() :
 +    XclExpRecord(0x0042, 2)
 +{
@@ -2957,7 +3446,6 @@
 +void XclExpCodePage::WriteBody( XclExpStream& rStrm )
 +{
 +    // 0x04B0 : UTF-16 (BIFF8)
-+    rStrm.EnableEncryption();
 +    rStrm << static_cast<sal_uInt16>(0x04B0);
 +}
 +
@@ -2974,7 +3462,38 @@
 +
 +void XclExpDSF::WriteBody( XclExpStream& rStrm )
 +{
-+    rStrm.EnableEncryption();
++    rStrm << static_cast<sal_uInt16>(0x0000);
++}
++
++// ============================================================================
++
++XclExpProt4Rev::XclExpProt4Rev() :
++    XclExpRecord(0x01AF, 2)
++{
++}
++
++XclExpProt4Rev::~XclExpProt4Rev()
++{
++}
++
++void XclExpProt4Rev::WriteBody( XclExpStream& rStrm )
++{
++    rStrm << static_cast<sal_uInt16>(0x0000);
++}
++
++// ============================================================================
++
++XclExpProt4RevPass::XclExpProt4RevPass() :
++    XclExpRecord(0x01BC, 2)
++{
++}
++
++XclExpProt4RevPass::~XclExpProt4RevPass()
++{
++}
++
++void XclExpProt4RevPass::WriteBody( XclExpStream& rStrm )
++{
 +    rStrm << static_cast<sal_uInt16>(0x0000);
 +}
 +
@@ -3367,7 +3886,7 @@
 retrieving revision 1.93
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.93 docsh.cxx
 --- sc/source/ui/docshell/docsh.cxx	23 Oct 2007 14:45:22 -0000	1.93
-+++ sc/source/ui/docshell/docsh.cxx	17 Jan 2008 04:07:08 -0000
++++ sc/source/ui/docshell/docsh.cxx	17 Jan 2008 22:34:24 -0000
 @@ -1809,6 +1809,8 @@
                  aDocument.SetExtDocOptions( pExtDocOpt = new ScExtDocOptions );
              pViewShell->GetViewData()->WriteExtOptions( *pExtDocOpt );
@@ -4730,7 +5249,7 @@
 retrieving revision 1.5
 diff -u -b -I $Revision.*$ -I $Author.*$ -r1.5 mscodec.cxx
 --- svx/source/msfilter/mscodec.cxx	12 Oct 2006 12:58:20 -0000	1.5
-+++ svx/source/msfilter/mscodec.cxx	17 Jan 2008 04:08:08 -0000
++++ svx/source/msfilter/mscodec.cxx	17 Jan 2008 22:35:15 -0000
 @@ -44,6 +44,10 @@
  #include <algorithm>
  #include <tools/solar.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]