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
This commit is contained in:
parent
62caf690ce
commit
6318254d63
14 changed files with 69 additions and 47 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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). */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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).
|
||||
};
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue