Update to m13
[ooovba.git] / applied_patches / 0520-calc-xls-import-maxcol.diff
blobe1ebf4726a5702f984e877dde267ff94fad05d7a
1 diff --git sc/source/filter/excel/colrowst.cxx sc/source/filter/excel/colrowst.cxx
2 index af8d5d9..43df0d2 100644
3 --- sc/source/filter/excel/colrowst.cxx
4 +++ sc/source/filter/excel/colrowst.cxx
5 @@ -95,6 +95,12 @@ void XclImpColRowSettings::SetWidthRange( SCCOL nScCol1, SCCOL nScCol2, sal_uInt
7 DBG_ASSERT( (nScCol1 <= nScCol2) && ValidCol( nScCol2 ), "XclImpColRowSettings::SetColWidthRange - invalid column range" );
8 nScCol2 = ::std::min( nScCol2, MAXCOL );
9 + if (nScCol2 == 256)
10 + // In BIFF8, the column range is 0-255, and the use of 256 probably
11 + // means the range should extend to the max column if the loading app
12 + // support columns beyond 255.
13 + nScCol2 = MAXCOL;
15 nScCol1 = ::std::min( nScCol1, nScCol2 );
16 ::std::fill( maWidths.begin() + nScCol1, maWidths.begin() + nScCol2 + 1, nWidth );
17 for( ScfUInt8Vec::iterator aIt = maColFlags.begin() + nScCol1, aEnd = maColFlags.begin() + nScCol2 + 1; aIt != aEnd; ++aIt )