[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jul 17 13:33:44 PDT 2009


 patches/dev300/calc-xls-import-array-size.diff |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit bc75b2d57c0fb8187c908c4e4839cc03e3d0fc16
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Jul 17 16:32:00 2009 -0400

    Fixed my previous fix for in-line array import from xls docs.
    
    My previous fix broke arrays that are defined in range names.
    
    * patches/dev300/calc-xls-import-array-size.diff:

diff --git a/patches/dev300/calc-xls-import-array-size.diff b/patches/dev300/calc-xls-import-array-size.diff
index 3a1188f..885b946 100644
--- a/patches/dev300/calc-xls-import-array-size.diff
+++ b/patches/dev300/calc-xls-import-array-size.diff
@@ -31,7 +31,7 @@ index e412270..e71c60e 100644
                      SCSIZE nC = nByte ? nByte : 256;
                      SCSIZE nR = nUINT16;
 diff --git sc/source/filter/excel/excform8.cxx sc/source/filter/excel/excform8.cxx
-index 4edef1a..27ded11 100644
+index 4edef1a..9b6931f 100644
 --- sc/source/filter/excel/excform8.cxx
 +++ sc/source/filter/excel/excform8.cxx
 @@ -97,7 +97,8 @@ bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLas
@@ -44,7 +44,7 @@ index 4edef1a..27ded11 100644
  {
      BYTE					nOp, nLen, nByte;
      UINT16                  nUINT16;
-@@ -393,12 +394,9 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
+@@ -393,12 +394,17 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
              case 0x20: // Array Constant						[317 268]
                  aIn >> nByte >> nUINT16;
                  aIn.Ignore( 4 );
@@ -55,7 +55,15 @@ index 4edef1a..27ded11 100644
 -                    SCSIZE nR = nUINT16 + 1;
 -
 -                    aStack << aPool.StoreMatrix( nC, nR );
-+                    aStack << aPool.StoreMatrix(rParam.mnArrayColSize, rParam.mnArrayRowSize);
++                    SCSIZE nC = rParam.mnArrayColSize;
++                    SCSIZE nR = rParam.mnArrayRowSize;
++                    if (!nC || !nR)
++                    {
++                        // Stored array size is invalid.  Get that from the formula.
++                        nC = nByte + 1;
++                        nR = nUINT16 + 1;
++                    }
++                    aStack << aPool.StoreMatrix(nC, nR);
                      aExtensions.push_back( EXTENSION_ARRAY );
                  }
                  else


More information about the ooo-build-commit mailing list