[ooo-build-commit] patches/dev300

René Engelhard rene at kemper.freedesktop.org
Sun Oct 11 17:28:27 PDT 2009


 patches/dev300/apply                                           |    8 -
 patches/dev300/calc-xls-export-encryption-condfmt-fix-m60.diff |   79 ++++++++++
 patches/dev300/calc-xls-export-encryption-condfmt-fix.diff     |    2 
 patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff    |    4 
 4 files changed, 88 insertions(+), 5 deletions(-)

New commits:
commit 270113f37831bd02973bb486b6a637f279cbc293
Author: Rene Engelhard <rene at debian.org>
Date:   Mon Oct 12 02:23:01 2009 +0200

    fix build in sc
    
    * patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff: fix
    * patches/dev300/calc-xls-export-encryption-condfmt-fix-m60.diff: rotate
    * patches/dev300/calc-xls-export-encryption-condfmt-fix.diff: adapt for state
      after we readd the function
    * patches/dev300/apply: adapt

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c8f4150..0658f9f 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -818,15 +818,19 @@ calc-general-type-auto-decimal-sc.diff,      n#541973, i#46511, kohei
 calc-general-type-auto-decimal-svtools.diff, n#541973, i#46511, kohei
 
 [ CalcFixes >= dev300-m61 >= ooo320-m1 ]
-# FIXME. hack. readd clExpInterfaceEnd::WriteBody as in m60 as 
+# FIXME. hack. readd XclExpInterfaceEnd::WriteBody as in m60 as 
 # calc-xls-export-encryption-condfmt-fix.diff patches it. Kohei, please check
 # --rengelhard
 hack-readd-XclExpInterfaceEnd-WriteBody.diff
 
-[ CalcFixes ]
+[ CalcFixes >= dev300-m61 >= ooo320-m1 ]
 # Correctly encrypt zero bytes in the conditional formatting records.
 calc-xls-export-encryption-condfmt-fix.diff, n#541058, kohei
+[ CalcFixes < dev300-m61 < ooo320-m1 ]
+# Correctly encrypt zero bytes in the conditional formatting records.
+calc-xls-export-encryption-condfmt-fix-m60.diff, n#541058, kohei
 
+[ CalcFixes ]
 # Excel compatibility for handling of "string numbers".
 # LATER: I'll take care of this later. --kohei
 # sc-string-arg.diff, i#5658, kohei
diff --git a/patches/dev300/calc-xls-export-encryption-condfmt-fix-m60.diff b/patches/dev300/calc-xls-export-encryption-condfmt-fix-m60.diff
new file mode 100644
index 0000000..6041ecf
--- /dev/null
+++ b/patches/dev300/calc-xls-export-encryption-condfmt-fix-m60.diff
@@ -0,0 +1,79 @@
+diff --git sc/source/filter/xcl97/xcl97rec.cxx sc/source/filter/xcl97/xcl97rec.cxx
+index 97bd958..eea4ec0 100644
+--- sc/source/filter/xcl97/xcl97rec.cxx
++++ sc/source/filter/xcl97/xcl97rec.cxx
+@@ -1496,8 +1496,10 @@ XclExpInterfaceEnd::~XclExpInterfaceEnd()
+ {
+ }
+ 
+-void XclExpInterfaceEnd::WriteBody( XclExpStream& /*rStrm*/ )
++void XclExpInterfaceEnd::WriteBody( XclExpStream& rStrm )
+ {
++    // Don't forget to re-enable encryption.
++    rStrm.EnableEncryption();
+ }
+ 
+ // ============================================================================
+diff --git sc/source/filter/excel/xecontent.cxx sc/source/filter/excel/xecontent.cxx
+index ae987eb..4575fca 100644
+--- sc/source/filter/excel/xecontent.cxx
++++ sc/source/filter/excel/xecontent.cxx
+@@ -761,19 +761,19 @@ void XclExpCFImpl::WriteBody( XclExpStream& rStrm )
+             // font used flag for underline -> 0 = used, 1 = default
+             sal_uInt32 nFontFlags3 = mbUnderlUsed ? 0 : EXC_CF_FONT_UNDERL;
+ 
+-            rStrm.WriteZeroBytes( 64 );
++            rStrm.WriteZeroBytesToRecord( 64 );
+             rStrm   << nHeight
+                     << nStyle
+                     << maFontData.mnWeight
+                     << EXC_FONTESC_NONE
+                     << maFontData.mnUnderline;
+-            rStrm.WriteZeroBytes( 3 );
++            rStrm.WriteZeroBytesToRecord( 3 );
+             rStrm   << nColor
+                     << sal_uInt32( 0 )
+                     << nFontFlags1
+                     << EXC_CF_FONT_ESCAPEM      // escapement never used -> set the flag
+                     << nFontFlags3;
+-            rStrm.WriteZeroBytes( 16 );
++            rStrm.WriteZeroBytesToRecord( 16 );
+             rStrm   << sal_uInt16( 1 );         // must be 1
+         }
+ 
+diff --git sc/source/filter/excel/xestream.cxx sc/source/filter/excel/xestream.cxx
+index 0f8262c..2d10d80 100644
+--- sc/source/filter/excel/xestream.cxx
++++ sc/source/filter/excel/xestream.cxx
+@@ -258,6 +258,17 @@ void XclExpStream::WriteZeroBytes( sal_Size nBytes )
+         WriteRawZeroBytes( nBytes );
+ }
+ 
++void XclExpStream::WriteZeroBytesToRecord( sal_Size nBytes )
++{
++    if (!mbInRec)
++        // not in record.
++        return;
++
++    sal_uInt8 nZero = 0;
++    for (sal_Size i = 0; i < nBytes; ++i)
++        *this << nZero;
++}
++
+ sal_Size XclExpStream::CopyFromStream( SvStream& rInStrm, sal_Size nBytes )
+ {
+     sal_Size nStrmPos = rInStrm.Tell();
+diff --git sc/source/filter/inc/xestream.hxx sc/source/filter/inc/xestream.hxx
+index 84bf4ce..aaa56b2 100644
+--- sc/source/filter/inc/xestream.hxx
++++ sc/source/filter/inc/xestream.hxx
+@@ -126,6 +126,9 @@ public:
+     sal_Size            Write( const void* pData, sal_Size nBytes );
+     /** Writes a sequence of nBytes zero bytes (respects slice setting). */
+     void                WriteZeroBytes( sal_Size nBytes );
++
++    void                WriteZeroBytesToRecord( sal_Size nBytes );
++
+     /** Copies nBytes bytes from current position of the stream rInStrm.
+         @descr  Omitting the second parameter means: read to end of stream. */
+     sal_Size            CopyFromStream( SvStream& rInStrm, sal_Size nBytes = STREAM_SEEK_TO_END );
diff --git a/patches/dev300/calc-xls-export-encryption-condfmt-fix.diff b/patches/dev300/calc-xls-export-encryption-condfmt-fix.diff
index 6041ecf..4e2ae3c 100644
--- a/patches/dev300/calc-xls-export-encryption-condfmt-fix.diff
+++ b/patches/dev300/calc-xls-export-encryption-condfmt-fix.diff
@@ -3,7 +3,7 @@ index 97bd958..eea4ec0 100644
 --- sc/source/filter/xcl97/xcl97rec.cxx
 +++ sc/source/filter/xcl97/xcl97rec.cxx
 @@ -1496,8 +1496,10 @@ XclExpInterfaceEnd::~XclExpInterfaceEnd()
- {
+         rStrm << aData[i];
  }
  
 -void XclExpInterfaceEnd::WriteBody( XclExpStream& /*rStrm*/ )
diff --git a/patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff b/patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff
index cdeaa64..55ebbf1 100644
--- a/patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff
+++ b/patches/dev300/hack-readd-XclExpInterfaceEnd-WriteBody.diff
@@ -1,5 +1,5 @@
 --- sc/source/filter/xcl97/xcl97rec.cxx-old	2009-10-09 23:32:32.000000000 +0200
-+++ sc/source/filter/xcl97xcl97rec.cxx	2009-10-09 23:34:13.000000000 +0200
++++ sc/source/filter/xcl97/xcl97rec.cxx	2009-10-09 23:34:13.000000000 +0200
 @@ -1491,6 +1491,10 @@
          rStrm << aData[i];
  }
@@ -26,7 +26,7 @@
 +
 +private:
 +    virtual void WriteBody( XclExpStream& rStrm );
-+}
++};
 +
 +// ============================================================================
 +


More information about the ooo-build-commit mailing list