summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-05 14:55:21 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-06 20:40:23 -0500
commit1d996cee76a50a5a6aa74e21eec89e03a05772e7 (patch)
tree3f6f1d259bd67217b3365e12fc0e9232d77eee9c /sc/source/filter
parent7045802f27f3efe74b4ed9146d33abe253df043a (diff)
Keep the integer type in sync and remove unused data members.
Change-Id: Iaaf1ebddd3b946b3211952729d41b01f0967f374
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/inc/formulabuffer.hxx18
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx6
2 files changed, 9 insertions, 15 deletions
diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx
index dbb77bb4ebcc..f9e5229e9836 100644
--- a/sc/source/filter/inc/formulabuffer.hxx
+++ b/sc/source/filter/inc/formulabuffer.hxx
@@ -74,30 +74,26 @@ class FormulaBuffer : public WorkbookHelper
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< sal_Int32, std::vector< TokenRangeAddressItem > > ArrayFormulaDataMap;
+ typedef ::std::map< SCTAB, std::vector<TokenAddressItem> > FormulaDataMap;
+ typedef ::std::map< SCTAB, std::vector<TokenRangeAddressItem> > ArrayFormulaDataMap;
// 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
- typedef ::std::map< sal_Int32, std::vector< SharedFormulaEntry > > SheetToFormulaEntryMap;
- // sharedId -> tokedId
- typedef ::std::map< sal_Int32, sal_Int32 > SharedIdToTokenIndex;
- typedef ::std::map< sal_Int32, SharedIdToTokenIndex > SheetToSharedIdToTokenIndex;
+ typedef ::std::map< SCTAB, std::vector<SharedFormulaEntry> > SheetToFormulaEntryMap;
+
typedef ::std::pair< ::com::sun::star::table::CellAddress, double > ValueAddressPair;
- typedef ::std::map< sal_Int32, std::vector< ValueAddressPair > > FormulaValueMap;
+ typedef ::std::map< SCTAB, std::vector<ValueAddressPair> > FormulaValueMap;
- com::sun::star::uno::Reference< com::sun::star::sheet::XSpreadsheet > mxCurrSheet;
FormulaDataMap maCellFormulas;
ArrayFormulaDataMap maCellArrayFormulas;
SheetToFormulaEntryMap maSharedFormulas;
SheetToSharedFormulaid maSharedFormulaIds;
- SheetToSharedIdToTokenIndex maTokenIndexes;
FormulaValueMap maCellFormulaValues;
void applyArrayFormulas( const std::vector< TokenRangeAddressItem >& rVector );
void applyCellFormulas( const std::vector< TokenAddressItem >& rVector );
void applyCellFormulaValues( const std::vector< ValueAddressPair >& rVector );
- void applySharedFormulas( sal_Int32 nTab );
+ void applySharedFormulas( SCTAB nTab );
public:
explicit FormulaBuffer( const WorkbookHelper& rHelper );
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 68e1d2ec14ac..04be13985219 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -54,13 +54,11 @@ void FormulaBuffer::finalizeImport()
ISegmentProgressBarRef xFormulaBar = getProgressBar().createSegment( getProgressBar().getFreeLength() );
ScDocument& rDoc = getScDocument();
- Reference< XIndexAccess > xSheets( getDocument()->getSheets(), UNO_QUERY_THROW );
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);
xFormulaBar->setPosition( fPosition );
- mxCurrSheet = getSheetFromDoc( 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);
if (itShared == maSharedFormulas.end())