Keep the integer type in sync and remove unused data members.
Change-Id: Iaaf1ebddd3b946b3211952729d41b01f0967f374
This commit is contained in:
@@ -74,30 +74,26 @@ class FormulaBuffer : public WorkbookHelper
|
|||||||
TokenRangeAddressItem( const TokenAddressItem& rTokenAndAddress, const ::com::sun::star::table::CellRangeAddress& rCellRangeAddress ) : maTokenAndAddress( rTokenAndAddress ), maCellRangeAddress( rCellRangeAddress ) {}
|
TokenRangeAddressItem( const TokenAddressItem& rTokenAndAddress, const ::com::sun::star::table::CellRangeAddress& rCellRangeAddress ) : maTokenAndAddress( rTokenAndAddress ), maCellRangeAddress( rCellRangeAddress ) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef ::std::map< sal_Int32, std::vector< TokenAddressItem > > FormulaDataMap;
|
typedef ::std::map< SCTAB, std::vector<TokenAddressItem> > FormulaDataMap;
|
||||||
typedef ::std::map< sal_Int32, std::vector< TokenRangeAddressItem > > ArrayFormulaDataMap;
|
typedef ::std::map< SCTAB, std::vector<TokenRangeAddressItem> > ArrayFormulaDataMap;
|
||||||
// sheet -> list of shared formula descriptions
|
// sheet -> list of shared formula descriptions
|
||||||
typedef ::std::map< sal_Int32, std::vector< SharedFormulaDesc > > SheetToSharedFormulaid;
|
typedef ::std::map< SCTAB, std::vector<SharedFormulaDesc> > SheetToSharedFormulaid;
|
||||||
// sheet -> stuff needed to create shared formulae
|
// sheet -> stuff needed to create shared formulae
|
||||||
typedef ::std::map< sal_Int32, std::vector< SharedFormulaEntry > > SheetToFormulaEntryMap;
|
typedef ::std::map< SCTAB, std::vector<SharedFormulaEntry> > SheetToFormulaEntryMap;
|
||||||
// sharedId -> tokedId
|
|
||||||
typedef ::std::map< sal_Int32, sal_Int32 > SharedIdToTokenIndex;
|
typedef ::std::pair< ::com::sun::star::table::CellAddress, double > ValueAddressPair;
|
||||||
typedef ::std::map< sal_Int32, SharedIdToTokenIndex > SheetToSharedIdToTokenIndex;
|
typedef ::std::map< SCTAB, std::vector<ValueAddressPair> > FormulaValueMap;
|
||||||
typedef ::std::pair< ::com::sun::star::table::CellAddress, double > ValueAddressPair;
|
|
||||||
typedef ::std::map< sal_Int32, std::vector< ValueAddressPair > > FormulaValueMap;
|
|
||||||
|
|
||||||
com::sun::star::uno::Reference< com::sun::star::sheet::XSpreadsheet > mxCurrSheet;
|
|
||||||
FormulaDataMap maCellFormulas;
|
FormulaDataMap maCellFormulas;
|
||||||
ArrayFormulaDataMap maCellArrayFormulas;
|
ArrayFormulaDataMap maCellArrayFormulas;
|
||||||
SheetToFormulaEntryMap maSharedFormulas;
|
SheetToFormulaEntryMap maSharedFormulas;
|
||||||
SheetToSharedFormulaid maSharedFormulaIds;
|
SheetToSharedFormulaid maSharedFormulaIds;
|
||||||
SheetToSharedIdToTokenIndex maTokenIndexes;
|
|
||||||
FormulaValueMap maCellFormulaValues;
|
FormulaValueMap maCellFormulaValues;
|
||||||
|
|
||||||
void applyArrayFormulas( const std::vector< TokenRangeAddressItem >& rVector );
|
void applyArrayFormulas( const std::vector< TokenRangeAddressItem >& rVector );
|
||||||
void applyCellFormulas( const std::vector< TokenAddressItem >& rVector );
|
void applyCellFormulas( const std::vector< TokenAddressItem >& rVector );
|
||||||
void applyCellFormulaValues( const std::vector< ValueAddressPair >& rVector );
|
void applyCellFormulaValues( const std::vector< ValueAddressPair >& rVector );
|
||||||
void applySharedFormulas( sal_Int32 nTab );
|
void applySharedFormulas( SCTAB nTab );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FormulaBuffer( const WorkbookHelper& rHelper );
|
explicit FormulaBuffer( const WorkbookHelper& rHelper );
|
||||||
|
@@ -54,13 +54,11 @@ void FormulaBuffer::finalizeImport()
|
|||||||
ISegmentProgressBarRef xFormulaBar = getProgressBar().createSegment( getProgressBar().getFreeLength() );
|
ISegmentProgressBarRef xFormulaBar = getProgressBar().createSegment( getProgressBar().getFreeLength() );
|
||||||
|
|
||||||
ScDocument& rDoc = getScDocument();
|
ScDocument& rDoc = getScDocument();
|
||||||
Reference< XIndexAccess > xSheets( getDocument()->getSheets(), UNO_QUERY_THROW );
|
|
||||||
rDoc.SetAutoNameCache( new ScAutoNameCache( &rDoc ) );
|
rDoc.SetAutoNameCache( new ScAutoNameCache( &rDoc ) );
|
||||||
for ( sal_Int32 nTab = 0, nElem = xSheets->getCount(); nTab < nElem; ++nTab )
|
for (SCTAB nTab = 0, nElem = rDoc.GetTableCount(); nTab < nElem; ++nTab)
|
||||||
{
|
{
|
||||||
double fPosition = static_cast< double> (nTab + 1) /static_cast<double>(nElem);
|
double fPosition = static_cast< double> (nTab + 1) /static_cast<double>(nElem);
|
||||||
xFormulaBar->setPosition( fPosition );
|
xFormulaBar->setPosition( fPosition );
|
||||||
mxCurrSheet = getSheetFromDoc( nTab );
|
|
||||||
|
|
||||||
applySharedFormulas(nTab);
|
applySharedFormulas(nTab);
|
||||||
|
|
||||||
@@ -122,7 +120,7 @@ void FormulaBuffer::applyCellFormulaValues( const std::vector< ValueAddressPair
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormulaBuffer::applySharedFormulas( sal_Int32 nTab )
|
void FormulaBuffer::applySharedFormulas( SCTAB nTab )
|
||||||
{
|
{
|
||||||
SheetToFormulaEntryMap::const_iterator itShared = maSharedFormulas.find(nTab);
|
SheetToFormulaEntryMap::const_iterator itShared = maSharedFormulas.find(nTab);
|
||||||
if (itShared == maSharedFormulas.end())
|
if (itShared == maSharedFormulas.end())
|
||||||
|
Reference in New Issue
Block a user