summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2011-03-23 13:22:51 +0100
committerKatarina Machalkova <kmachalkova@suse.cz>2011-03-23 13:22:51 +0100
commit6318254d63ef5c62bbd504c063791c611d6bd1e5 (patch)
treecb5f6d3c8c2f46907837a6eba66f4fb2bfa86c22 /sc/source/filter
parent62caf690ce3663f8284fb0165dbeb9863559f032 (diff)
Calc xlsx export row limit++ (bnc#504623, fdo#32106)
re-introducing the ability to export sheets with more than 65k rows which disappeared with shared bin+OOXML filter transition
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/excel/xeformula.cxx6
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx6
-rw-r--r--sc/source/filter/excel/xestream.cxx10
-rw-r--r--sc/source/filter/excel/xetable.cxx18
-rw-r--r--sc/source/filter/excel/xeview.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx4
-rw-r--r--sc/source/filter/excel/xladdress.cxx18
-rw-r--r--sc/source/filter/excel/xlescher.cxx8
-rw-r--r--sc/source/filter/inc/xetable.hxx18
-rw-r--r--sc/source/filter/inc/xeview.hxx2
-rw-r--r--sc/source/filter/inc/xladdress.hxx14
-rw-r--r--sc/source/filter/inc/xlconst.hxx4
-rw-r--r--sc/source/filter/inc/xlescher.hxx4
14 files changed, 69 insertions, 47 deletions
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index ca09bbde016b..f15dc3c9750d 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1821,7 +1821,7 @@ void XclExpFmlaCompImpl::ConvertRefData(
rnScRow = mnMaxAbsRow;
else if( (rnScRow < 0) || (rnScRow > mnMaxAbsRow) )
rRefData.SetRowDeleted( sal_True );
- rXclPos.mnRow = static_cast< sal_uInt16 >( rnScRow ) & mnMaxRowMask;
+ rXclPos.mnRow = static_cast< sal_uInt32 >( rnScRow ) & mnMaxRowMask;
}
else
{
@@ -1833,7 +1833,7 @@ void XclExpFmlaCompImpl::ConvertRefData(
// convert row index (2-step-cast ScsROW->sal_Int16->sal_uInt16 to get all bits correctly)
sal_Int16 nXclRelRow = static_cast< sal_Int16 >( rRefData.IsRowRel() ? rRefData.nRelRow : rRefData.nRow );
- rXclPos.mnRow = static_cast< sal_uInt16 >( nXclRelRow ) & mnMaxRowMask;
+ rXclPos.mnRow = static_cast< sal_uInt32 >( nXclRelRow ) & mnMaxRowMask;
// resolve relative tab index if possible
if( rRefData.IsTabRel() && !IsInGlobals() && (GetCurrScTab() < GetDoc().GetTableCount()) )
@@ -1849,9 +1849,11 @@ void XclExpFmlaCompImpl::ConvertRefData(
}
else
{
+#if 0 // FIXME : doesn't build in xlsx
sal_uInt16& rnRelField = (meBiff <= EXC_BIFF5) ? rXclPos.mnRow : rXclPos.mnCol;
::set_flag( rnRelField, EXC_TOK_REF_COLREL, rRefData.IsColRel() );
::set_flag( rnRelField, EXC_TOK_REF_ROWREL, rRefData.IsRowRel() );
+#endif
}
}
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 90743a7ffb28..77b81686432f 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -157,7 +157,7 @@ namespace {
inline void lclFillAddress( XclAddress& rXclPos, SCCOL nScCol, SCROW nScRow )
{
rXclPos.mnCol = static_cast< sal_uInt16 >( nScCol );
- rXclPos.mnRow = static_cast< sal_uInt16 >( nScRow );
+ rXclPos.mnRow = static_cast< sal_uInt32 >( nScRow );
}
} // namespace
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 36e58c780c98..ad3526899309 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1631,9 +1631,9 @@ void XclExpPivotTable::Finalize()
// update output range (initialized in ctor)
sal_uInt16& rnXclCol1 = maPTInfo.maOutXclRange.maFirst.mnCol;
- sal_uInt16& rnXclRow1 = maPTInfo.maOutXclRange.maFirst.mnRow;
+ sal_uInt32& rnXclRow1 = maPTInfo.maOutXclRange.maFirst.mnRow;
sal_uInt16& rnXclCol2 = maPTInfo.maOutXclRange.maLast.mnCol;
- sal_uInt16& rnXclRow2 = maPTInfo.maOutXclRange.maLast.mnRow;
+ sal_uInt32& rnXclRow2 = maPTInfo.maOutXclRange.maLast.mnRow;
// exclude page fields from output range
rnXclRow1 = rnXclRow1 + maPTInfo.mnPageFields;
// exclude filter button from output range
@@ -1645,7 +1645,7 @@ void XclExpPivotTable::Finalize()
// data area
sal_uInt16& rnDataXclCol = maPTInfo.maDataXclPos.mnCol;
- sal_uInt16& rnDataXclRow = maPTInfo.maDataXclPos.mnRow;
+ sal_uInt32& rnDataXclRow = maPTInfo.maDataXclPos.mnRow;
rnDataXclCol = rnXclCol1 + maPTInfo.mnRowFields;
rnDataXclRow = rnXclRow1 + maPTInfo.mnColFields + 1;
if( maDataFields.empty() )
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 89eca3871186..b54b3bfe4bd2 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -810,8 +810,9 @@ static ScAddress lcl_ToAddress( const XclAddress& rAddress )
// For some reason, ScRange::Format() returns omits row numbers if
// the row is >= MAXROW or the column is >= MAXCOL, and Excel doesn't
// like "A:IV" (i.e. no row numbers). Prevent this.
- aAddress.SetRow( std::min<sal_Int32>( rAddress.mnRow, MAXROW-1 ) );
- aAddress.SetCol( static_cast<sal_Int16>(std::min<sal_Int32>( rAddress.mnCol, MAXCOL-1 )) );
+ // KOHEI: Find out if the above comment is still true.
+ aAddress.SetRow( std::min<sal_Int32>( rAddress.mnRow, MAXROW ) );
+ aAddress.SetCol( static_cast<sal_Int16>(std::min<sal_Int32>( rAddress.mnCol, MAXCOL )) );
return aAddress;
}
@@ -1120,6 +1121,11 @@ bool XclExpXmlStream::exportDocument() throw()
XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, *pDoc, RTL_TEXTENCODING_DONTKNOW );
aData.meOutput = EXC_OUTPUT_XML_2007;
+ aData.maXclMaxPos.Set( EXC_MAXCOL_XML_2007, EXC_MAXROW_XML_2007, EXC_MAXTAB_XML_2007 );
+ aData.maMaxPos.SetCol( ::std::min( aData.maScMaxPos.Col(), aData.maXclMaxPos.Col() ) );
+ aData.maMaxPos.SetRow( ::std::min( aData.maScMaxPos.Row(), aData.maXclMaxPos.Row() ) );
+ aData.maMaxPos.SetTab( ::std::min( aData.maScMaxPos.Tab(), aData.maXclMaxPos.Tab() ) );
+
XclExpRoot aRoot( aData );
mpRoot = &aRoot;
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index ac86a0b065c4..08cdb0d77499 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -96,7 +96,7 @@ XclExpRangeFmlaBase::XclExpRangeFmlaBase(
maBaseXclPos = maXclRange.maFirst;
}
-bool XclExpRangeFmlaBase::IsBasePos( sal_uInt16 nXclCol, sal_uInt16 nXclRow ) const
+bool XclExpRangeFmlaBase::IsBasePos( sal_uInt16 nXclCol, sal_uInt32 nXclRow ) const
{
return (maBaseXclPos.mnCol == nXclCol) && (maBaseXclPos.mnRow == nXclRow);
}
@@ -104,7 +104,7 @@ bool XclExpRangeFmlaBase::IsBasePos( sal_uInt16 nXclCol, sal_uInt16 nXclRow ) co
void XclExpRangeFmlaBase::Extend( const ScAddress& rScPos )
{
sal_uInt16 nXclCol = static_cast< sal_uInt16 >( rScPos.Col() );
- sal_uInt16 nXclRow = static_cast< sal_uInt16 >( rScPos.Row() );
+ sal_uInt32 nXclRow = static_cast< sal_uInt32 >( rScPos.Row() );
maXclRange.maFirst.mnCol = ::std::min( maXclRange.maFirst.mnCol, nXclCol );
maXclRange.maFirst.mnRow = ::std::min( maXclRange.maFirst.mnRow, nXclRow );
maXclRange.maLast.mnCol = ::std::max( maXclRange.maLast.mnCol, nXclCol );
@@ -566,7 +566,8 @@ void XclExpSingleCellBase::Save( XclExpStream& rStrm )
void XclExpSingleCellBase::WriteBody( XclExpStream& rStrm )
{
- rStrm << GetXclRow() << GetXclCol() << maXFId.mnXFIndex;
+ //Bubli's row limit
+ rStrm << static_cast<sal_uInt16> (GetXclRow()) << GetXclCol() << maXFId.mnXFIndex;
WriteContents( rStrm );
}
@@ -1053,7 +1054,8 @@ void XclExpMultiCellBase::Save( XclExpStream& rStrm )
if( bIsMulti ) nTotalSize += 2;
rStrm.StartRecord( bIsMulti ? mnMulRecId : GetRecId(), nTotalSize );
- rStrm << GetXclRow() << nBegXclCol;
+ //Bubli's row limit
+ rStrm << static_cast<sal_uInt16> (GetXclRow()) << nBegXclCol;
sal_uInt16 nRelCol = nBegXclCol - GetXclCol();
for( XclExpMultiXFIdDeq::const_iterator aIt = aRangeBeg; aIt != aRangeEnd; ++aIt )
@@ -1709,7 +1711,7 @@ void XclExpDefrowheight::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
-XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
+XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt32 nXclRow,
XclExpRowOutlineBuffer& rOutlineBfr, bool bAlwaysEmpty ) :
XclExpRecord( EXC_ID3_ROW, 16 ),
XclExpRoot( rRoot ),
@@ -1960,7 +1962,7 @@ void XclExpRow::InsertCell( XclExpCellRef xCell, size_t nPos, bool bIsMergedBase
void XclExpRow::WriteBody( XclExpStream& rStrm )
{
- rStrm << mnXclRow
+ rStrm << static_cast< sal_uInt16 >(mnXclRow)
<< GetFirstUsedXclCol()
<< GetFirstFreeXclCol()
<< mnHeight
@@ -2148,7 +2150,7 @@ XclExpDimensions* XclExpRowBuffer::GetDimensions()
return &maDimensions;
}
-XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt16 nXclRow, bool bRowAlwaysEmpty )
+XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty )
{
RowMap::iterator itr = maRowMap.find(nXclRow);
if (itr == maRowMap.end())
@@ -2237,7 +2239,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
SCCOL nLastScCol = aIt.GetEndCol();
ScAddress aScPos( nScCol, nScRow, nScTab );
- XclAddress aXclPos( static_cast< sal_uInt16 >( nScCol ), static_cast< sal_uInt16 >( nScRow ) );
+ XclAddress aXclPos( static_cast< sal_uInt16 >( nScCol ), static_cast< sal_uInt32 >( nScRow ) );
sal_uInt16 nLastXclCol = static_cast< sal_uInt16 >( nLastScCol );
const ScBaseCell* pScCell = aIt.GetCell();
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index df69840081cb..47175656f06e 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -353,7 +353,7 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
maData.mnSplitX = static_cast< sal_uInt16 >( nFreezeScCol ) - maData.maFirstXclPos.mnCol;
SCROW nFreezeScRow = rTabSett.maFreezePos.Row();
if( (0 < nFreezeScRow) && (nFreezeScRow <= GetXclMaxPos().Row()) )
- maData.mnSplitY = static_cast< sal_uInt16 >( nFreezeScRow ) - maData.maFirstXclPos.mnRow;
+ maData.mnSplitY = static_cast< sal_uInt32 >( nFreezeScRow ) - maData.maFirstXclPos.mnRow;
// if both splits are left out (address overflow), remove the frozen flag
maData.mbFrozenPanes = maData.IsSplit();
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 34a02e028070..7fd1dd17e65a 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -51,7 +51,7 @@
namespace {
/** Fills the passed Calc address with the passed Excel cell coordinates without checking any limits. */
-inline void lclFillAddress( ScAddress& rScPos, sal_uInt16 nXclCol, sal_uInt16 nXclRow, SCTAB nScTab )
+inline void lclFillAddress( ScAddress& rScPos, sal_uInt16 nXclCol, sal_uInt32 nXclRow, SCTAB nScTab )
{
rScPos.SetCol( static_cast< SCCOL >( nXclCol ) );
rScPos.SetRow( static_cast< SCROW >( nXclRow ) );
@@ -119,7 +119,7 @@ bool XclImpAddressConverter::ConvertRange( ScRange& rScRange,
// check & correct end position
sal_uInt16 nXclCol2 = rXclRange.maLast.mnCol;
- sal_uInt16 nXclRow2 = rXclRange.maLast.mnRow;
+ sal_uInt32 nXclRow2 = rXclRange.maLast.mnRow;
if( !CheckAddress( rXclRange.maLast, bWarn ) )
{
nXclCol2 = ::std::min( nXclCol2, mnMaxCol );
diff --git a/sc/source/filter/excel/xladdress.cxx b/sc/source/filter/excel/xladdress.cxx
index 64cd88908f22..98c727df48c9 100644
--- a/sc/source/filter/excel/xladdress.cxx
+++ b/sc/source/filter/excel/xladdress.cxx
@@ -37,7 +37,9 @@
void XclAddress::Read( XclImpStream& rStrm, bool bCol16Bit )
{
- rStrm >> mnRow;
+ //Bubli's row limit ... uff ???
+ //rStrm >> mnRow;
+ mnRow = rStrm.ReaduInt16();
if( bCol16Bit )
rStrm >> mnCol;
else
@@ -46,7 +48,8 @@ void XclAddress::Read( XclImpStream& rStrm, bool bCol16Bit )
void XclAddress::Write( XclExpStream& rStrm, bool bCol16Bit ) const
{
- rStrm << mnRow;
+ //Bubli's row limit
+ rStrm << static_cast<sal_uInt16> (mnRow);
if( bCol16Bit )
rStrm << mnCol;
else
@@ -63,7 +66,11 @@ bool XclRange::Contains( const XclAddress& rPos ) const
void XclRange::Read( XclImpStream& rStrm, bool bCol16Bit )
{
- rStrm >> maFirst.mnRow >> maLast.mnRow;
+ //Bubli's row limit
+ //rStrm >> maFirst.mnRow >> maLast.mnRow;
+ maFirst.mnRow = rStrm.ReaduInt16();
+ maLast.mnRow = rStrm.ReaduInt16();
+
if( bCol16Bit )
rStrm >> maFirst.mnCol >> maLast.mnCol;
else
@@ -75,7 +82,8 @@ void XclRange::Read( XclImpStream& rStrm, bool bCol16Bit )
void XclRange::Write( XclExpStream& rStrm, bool bCol16Bit ) const
{
- rStrm << maFirst.mnRow << maLast.mnRow;
+ //Bubli's row limit
+ rStrm << static_cast<sal_uInt16>(maFirst.mnRow) << static_cast<sal_uInt16>(maLast.mnRow);
if( bCol16Bit )
rStrm << maFirst.mnCol << maLast.mnCol;
else
@@ -140,7 +148,7 @@ XclAddressConverterBase::XclAddressConverterBase( XclTracer& rTracer, const ScAd
mbTabTrunc( false )
{
DBG_ASSERT( static_cast< size_t >( rMaxPos.Col() ) <= SAL_MAX_UINT16, "XclAddressConverterBase::XclAddressConverterBase - invalid max column" );
- DBG_ASSERT( static_cast< size_t >( rMaxPos.Row() ) <= SAL_MAX_UINT16, "XclAddressConverterBase::XclAddressConverterBase - invalid max row" );
+ DBG_ASSERT( static_cast< size_t >( rMaxPos.Row() ) <= SAL_MAX_UINT32, "XclAddressConverterBase::XclAddressConverterBase - invalid max row" );
}
XclAddressConverterBase::~XclAddressConverterBase()
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index bc693923532f..67141e73f0ce 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -130,8 +130,8 @@ void lclGetColFromX(
/** Calculates an object row position from a drawing layer Y position (in twips). */
void lclGetRowFromY(
- ScDocument& rDoc, SCTAB nScTab, sal_uInt16& rnXclRow,
- sal_uInt16& rnOffset, sal_uInt16 nXclStartRow, sal_uInt16 nXclMaxRow,
+ ScDocument& rDoc, SCTAB nScTab, sal_uInt32& rnXclRow,
+ sal_uInt32& rnOffset, sal_uInt32 nXclStartRow, sal_uInt32 nXclMaxRow,
long& rnStartH, long nY, double fScale )
{
// rnStartH in conjunction with nXclStartRow is used as buffer for previously calculated height
@@ -143,7 +143,7 @@ void lclGetRowFromY(
nRowH = rDoc.GetRowHeight( nRow, nScTab );
if( rnStartH + nRowH > nTwipsY )
{
- rnXclRow = static_cast< sal_uInt16 >( nRow );
+ rnXclRow = static_cast< sal_uInt32 >( nRow );
bFound = true;
break;
}
@@ -151,7 +151,7 @@ void lclGetRowFromY(
}
if( !bFound )
rnXclRow = nXclMaxRow;
- rnOffset = static_cast< sal_uInt16 >( nRowH ? ((nTwipsY - rnStartH) * 256.0 / nRowH + 0.5) : 0 );
+ rnOffset = static_cast< sal_uInt32 >( nRowH ? ((nTwipsY - rnStartH) * 256.0 / nRowH + 0.5) : 0 );
}
/** Mirrors a rectangle (from LTR to RTL layout or vice versa). */
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index bb3f182768f6..33b7b2c2fa77 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -74,7 +74,7 @@ class XclExpRangeFmlaBase : public XclExpRecord
{
public:
/** Returns true, if the passed cell position is equal to own base position. */
- bool IsBasePos( sal_uInt16 nXclCol, sal_uInt16 nXclRow ) const;
+ bool IsBasePos( sal_uInt16 nXclCol, sal_uInt32 nXclRow ) const;
/** Derived classes create the token array for a corresponding FORMULA cell record. */
virtual XclTokenArrayRef CreateCellTokenArray( const XclExpRoot& rRoot ) const = 0;
@@ -241,9 +241,9 @@ private:
SCTAB mnScTab; /// Sheet index of this record.
sal_uInt16 mnLastAppXclCol;/// Column index of last appended cell.
sal_uInt16 mnColInpXclCol; /// Column index of column input cell.
- sal_uInt16 mnColInpXclRow; /// Row index of column input cell.
+ sal_uInt32 mnColInpXclRow; /// Row index of column input cell.
sal_uInt16 mnRowInpXclCol; /// Column index of row input cell.
- sal_uInt16 mnRowInpXclRow; /// Row index of row input cell.
+ sal_uInt32 mnRowInpXclRow; /// Row index of row input cell.
sal_uInt8 mnScMode; /// Type of the multiple operation (Calc constant).
bool mbValid; /// true = Contains valid references.
};
@@ -290,7 +290,7 @@ public:
/** Returns the (first) Excel column index of the cell(s). */
inline sal_uInt16 GetXclCol() const { return maXclPos.mnCol; }
/** Returns the Excel row index of the cell. */
- inline sal_uInt16 GetXclRow() const { return maXclPos.mnRow; }
+ inline sal_uInt32 GetXclRow() const { return maXclPos.mnRow; }
/** Derived classes return the column index of the last contained cell. */
virtual sal_uInt16 GetLastXclCol() const = 0;
@@ -318,7 +318,7 @@ protected:
/** Sets this record to a new column position. */
inline void SetXclCol( sal_uInt16 nXclCol ) { maXclPos.mnCol = nXclCol; }
/** Sets this record to a new row position. */
- inline void SetXclRow( sal_uInt16 nXclRow ) { maXclPos.mnRow = nXclRow; }
+ inline void SetXclRow( sal_uInt32 nXclRow ) { maXclPos.mnRow = nXclRow; }
private:
XclAddress maXclPos; /// Address of the cell.
@@ -879,11 +879,11 @@ public:
/** Constructs the ROW record and converts the Calc row settings.
@param bAlwaysEmpty true = This row will not be filled with blank cells
in the Finalize() function. */
- explicit XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
+ explicit XclExpRow( const XclExpRoot& rRoot, sal_uInt32 nXclRow,
XclExpRowOutlineBuffer& rOutlineBfr, bool bAlwaysEmpty );
/** Returns the excel row index of this ROW record. */
- inline sal_uInt16 GetXclRow() const { return mnXclRow; }
+ inline sal_uInt32 GetXclRow() const { return mnXclRow; }
/** Returns the height of the row in twips. */
inline sal_uInt16 GetHeight() const { return mnHeight; }
/** Returns true, if this row does not contain at least one valid cell. */
@@ -938,7 +938,7 @@ private:
typedef XclExpRecordList< XclExpCellBase > XclExpCellList;
XclExpCellList maCellList; /// List of cell records for this row.
- sal_uInt16 mnXclRow; /// Excel row index of this row.
+ sal_uInt32 mnXclRow; /// Excel row index of this row.
sal_uInt16 mnHeight; /// Row height in twips.
sal_uInt16 mnFlags; /// Flags for the ROW record.
sal_uInt16 mnXFIndex; /// Default row formatting.
@@ -981,7 +981,7 @@ private:
/** Returns access to the specified ROW record. Inserts preceding missing ROW records.
@param bRowAlwaysEmpty true = Created rows will not be filled with blank cells
in the XclExpRow::Finalize() function. */
- XclExpRow& GetOrCreateRow( sal_uInt16 nXclRow, bool bRowAlwaysEmpty );
+ XclExpRow& GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty );
private:
typedef ::boost::shared_ptr<XclExpRow> RowRef;
diff --git a/sc/source/filter/inc/xeview.hxx b/sc/source/filter/inc/xeview.hxx
index eb1bf5c403f8..db81d34ad60e 100644
--- a/sc/source/filter/inc/xeview.hxx
+++ b/sc/source/filter/inc/xeview.hxx
@@ -109,7 +109,7 @@ private:
private:
sal_uInt16 mnSplitX; /// Split X position, or frozen column.
- sal_uInt16 mnSplitY; /// Split Y position, or frozen row.
+ sal_uInt32 mnSplitY; /// Split Y position, or frozen row.
XclAddress maSecondXclPos; /// First visible cell in additional panes.
sal_uInt8 mnActivePane; /// Active pane (with cell cursor).
};
diff --git a/sc/source/filter/inc/xladdress.hxx b/sc/source/filter/inc/xladdress.hxx
index 2152c19913c2..9722b3dbe1ff 100644
--- a/sc/source/filter/inc/xladdress.hxx
+++ b/sc/source/filter/inc/xladdress.hxx
@@ -42,13 +42,13 @@ class XclExpStream;
struct XclAddress
{
sal_uInt16 mnCol;
- sal_uInt16 mnRow;
+ sal_uInt32 mnRow;
inline explicit XclAddress( ScAddress::Uninitialized ) {}
inline explicit XclAddress() : mnCol( 0 ), mnRow( 0 ) {}
- inline explicit XclAddress( sal_uInt16 nCol, sal_uInt16 nRow ) : mnCol( nCol ), mnRow( nRow ) {}
+ inline explicit XclAddress( sal_uInt16 nCol, sal_uInt32 nRow ) : mnCol( nCol ), mnRow( nRow ) {}
- inline void Set( sal_uInt16 nCol, sal_uInt16 nRow ) { mnCol = nCol; mnRow = nRow; }
+ inline void Set( sal_uInt16 nCol, sal_uInt32 nRow ) { mnCol = nCol; mnRow = nRow; }
void Read( XclImpStream& rStrm, bool bCol16Bit = true );
void Write( XclExpStream& rStrm, bool bCol16Bit = true ) const;
@@ -88,16 +88,16 @@ struct XclRange
inline explicit XclRange() {}
inline explicit XclRange( const XclAddress& rPos ) : maFirst( rPos ), maLast( rPos ) {}
inline explicit XclRange( const XclAddress& rFirst, const XclAddress& rLast ) : maFirst( rFirst ), maLast( rLast ) {}
- inline explicit XclRange( sal_uInt16 nCol1, sal_uInt16 nRow1, sal_uInt16 nCol2, sal_uInt16 nRow2 ) :
+ inline explicit XclRange( sal_uInt16 nCol1, sal_uInt32 nRow1, sal_uInt16 nCol2, sal_uInt32 nRow2 ) :
maFirst( nCol1, nRow1 ), maLast( nCol2, nRow2 ) {}
inline void Set( const XclAddress& rFirst, const XclAddress& rLast )
{ maFirst = rFirst; maLast = rLast; }
- inline void Set( sal_uInt16 nCol1, sal_uInt16 nRow1, sal_uInt16 nCol2, sal_uInt16 nRow2 )
+ inline void Set( sal_uInt16 nCol1, sal_uInt32 nRow1, sal_uInt16 nCol2, sal_uInt32 nRow2 )
{ maFirst.Set( nCol1, nRow1 ); maLast.Set( nCol2, nRow2 ); }
inline sal_uInt16 GetColCount() const { return maLast.mnCol - maFirst.mnCol + 1; }
- inline sal_uInt16 GetRowCount() const { return maLast.mnRow - maFirst.mnRow + 1; }
+ inline sal_uInt32 GetRowCount() const { return maLast.mnRow - maFirst.mnRow + 1; }
bool Contains( const XclAddress& rPos ) const;
void Read( XclImpStream& rStrm, bool bCol16Bit = true );
@@ -186,7 +186,7 @@ protected:
XclTracer& mrTracer; /// Tracer for invalid addresses.
ScAddress maMaxPos; /// Default maximum position.
sal_uInt16 mnMaxCol; /// Maximum column index, as 16-bit value.
- sal_uInt16 mnMaxRow; /// Maximum row index, as 16-bit value.
+ sal_uInt32 mnMaxRow; /// Maximum row index.
bool mbColTrunc; /// Flag for "columns truncated" warning box.
bool mbRowTrunc; /// Flag for "rows truncated" warning box.
bool mbTabTrunc; /// Flag for "tables truncated" warning box.
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index 207d8cb392b8..c86f1577f04d 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -75,6 +75,10 @@ const SCCOL EXC_MAXCOL8 = EXC_MAXCOL5;
const SCROW EXC_MAXROW8 = 65535;
const SCTAB EXC_MAXTAB8 = EXC_MAXTAB5;
+const SCCOL EXC_MAXCOL_XML_2007 = 16383;
+const SCROW EXC_MAXROW_XML_2007 = 1048575;
+const SCTAB EXC_MAXTAB_XML_2007 = 1023;
+
const sal_uInt16 EXC_NOTAB = SAL_MAX_UINT16; /// An invalid Excel sheet index, for common use.
const SCTAB SCTAB_INVALID = SCTAB_MAX; /// An invalid Calc sheet index, for common use.
const SCTAB SCTAB_GLOBAL = SCTAB_MAX; /// A Calc sheet index for the workbook globals.
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx
index b0c41ff320ee..2bd8bcb104d2 100644
--- a/sc/source/filter/inc/xlescher.hxx
+++ b/sc/source/filter/inc/xlescher.hxx
@@ -315,9 +315,9 @@ bool operator<( const XclObjId& rL, const XclObjId& rR );
struct XclObjAnchor : public XclRange
{
sal_uInt16 mnLX; /// X offset in left column (1/1024 of column width).
- sal_uInt16 mnTY; /// Y offset in top row (1/256 of row height).
+ sal_uInt32 mnTY; /// Y offset in top row (1/256 of row height).
sal_uInt16 mnRX; /// X offset in right column (1/1024 of column width).
- sal_uInt16 mnBY; /// Y offset in bottom row (1/256 of row height).
+ sal_uInt32 mnBY; /// Y offset in bottom row (1/256 of row height).
explicit XclObjAnchor();