sc/source/filter/excel/xedbdata.cxx | 12 ++++++------ sc/source/filter/inc/xedbdata.hxx | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-)
New commits: commit 92049e8c51634a838d9dc7999415e5606a9dd3c5 Author: Akash Shetye <shetyeak...@gmail.com> Date: Thu Aug 1 23:05:43 2013 +0530 Used container.size instead of a separate count member Change-Id: I7715f865bc30aafd62b053f6f20f2fa3af9ae3ec diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx index 0b178ac..3a9509b 100644 --- a/sc/source/filter/excel/xedbdata.cxx +++ b/sc/source/filter/excel/xedbdata.cxx @@ -64,7 +64,7 @@ XclExpXmlDBDataColumns::XclExpXmlDBDataColumns( const XclExpRoot& rRoot, ScDBDat aRange.GetVars( anCol1, anRow1, anTab1, anCol2, anRow2, anTab2 ); anTotalCols = (anCol2 - anCol1) + 1; //addressing starts from 0 // Needs special handling for different tab ranges - miCount = anTotalCols; + //miCount = anTotalCols; OUString aColName = "Column"; for( int i = 1; i <= anTotalCols; i++ ) { @@ -76,7 +76,7 @@ XclExpXmlDBDataColumns::XclExpXmlDBDataColumns( const XclExpRoot& rRoot, ScDBDat void XclExpXmlDBDataColumns::SaveXml( XclExpXmlStream& rStrm ) { sax_fastparser::FSHelperPtr& rDBDataTable = rStrm.GetCurrentStream(); - rDBDataTable->startElement( XML_tableColumns, XML_count, OString::number( miCount ).getStr(), FSEND ); + rDBDataTable->startElement( XML_tableColumns, XML_count, OString::number( maDBDataColumnContainer.size() ).getStr(), FSEND ); for ( DBDataColumnContainer::iterator itr = maDBDataColumnContainer.begin(); itr != maDBDataColumnContainer.end(); ++itr ) { itr->SaveXml( rStrm ); @@ -112,7 +112,7 @@ void XclExpXmlDBDataTable::SaveXml( XclExpXmlStream& rStrm ) XclExpXmlDBDataTables::XclExpXmlDBDataTables( const XclExpRoot& rRoot ) : XclExpRoot( rRoot ) { - miCount = 0; + int nCount = 0; ScDBCollection* pDBCollection = rRoot.GetDoc().GetDBCollection(); if( pDBCollection ) { @@ -121,8 +121,8 @@ XclExpXmlDBDataTables::XclExpXmlDBDataTables( const XclExpRoot& rRoot ) ScDBCollection::NamedDBs::iterator itrEnd = aNamedDBs.end(); for(; itr!= itrEnd; ++itr) { - ++miCount; - maDBDataTableContainer.push_back( new XclExpXmlDBDataTable( rRoot, *itr, miCount ) ); + ++nCount; + maDBDataTableContainer.push_back( new XclExpXmlDBDataTable( rRoot, *itr, nCount ) ); } } } @@ -130,7 +130,7 @@ XclExpXmlDBDataTables::XclExpXmlDBDataTables( const XclExpRoot& rRoot ) void XclExpXmlDBDataTables::SaveXml( XclExpXmlStream& rStrm ) { // We only make the table folder is we do have any DB Data to write in - if( miCount != 0 ) + if( maDBDataTableContainer.size() != 0 ) { //Now parse through each of the DB Datas making an xml for each. int i = 1; diff --git a/sc/source/filter/inc/xedbdata.hxx b/sc/source/filter/inc/xedbdata.hxx index 187e8c3..1b23183 100644 --- a/sc/source/filter/inc/xedbdata.hxx +++ b/sc/source/filter/inc/xedbdata.hxx @@ -58,7 +58,6 @@ public: private: typedef boost::ptr_vector< XclExpXmlDBDataColumn > DBDataColumnContainer; DBDataColumnContainer maDBDataColumnContainer; - int miCount; }; // ============================================================================ @@ -88,7 +87,6 @@ public: private: typedef boost::ptr_vector< XclExpXmlDBDataTable > DBDataTableContainer; DBDataTableContainer maDBDataTableContainer; - int miCount; }; #endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits