[Libreoffice-commits] core.git: Branch 'feature/gsoc-calc-enhanced-db-range' - sc/source

Akash Shetye shetyeakash at gmail.com
Thu Aug 1 12:17:23 PDT 2013


 sc/source/filter/excel/xedbdata.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit a50945b419c5748375681f10a9279519c1ddb60b
Author: Akash Shetye <shetyeakash at gmail.com>
Date:   Fri Aug 2 00:46:04 2013 +0530

    Minor tweak about using container.size
    
    Change-Id: I0987646c007e5a94f7bf83398ef911a8fb9ec9d7

diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index 3a9509b..a2e7c5e 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -64,7 +64,6 @@ 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;
     OUString aColName = "Column";
     for( int i = 1; i <= anTotalCols; i++ )
     {
@@ -112,7 +111,6 @@ void XclExpXmlDBDataTable::SaveXml( XclExpXmlStream& rStrm )
 XclExpXmlDBDataTables::XclExpXmlDBDataTables( const XclExpRoot& rRoot )
     : XclExpRoot( rRoot )
 {
-    int nCount = 0;
     ScDBCollection* pDBCollection = rRoot.GetDoc().GetDBCollection();
     if( pDBCollection )
     {
@@ -121,8 +119,7 @@ XclExpXmlDBDataTables::XclExpXmlDBDataTables( const XclExpRoot& rRoot )
         ScDBCollection::NamedDBs::iterator itrEnd = aNamedDBs.end();
         for(; itr!= itrEnd; ++itr)
         {
-            ++nCount;
-            maDBDataTableContainer.push_back( new XclExpXmlDBDataTable( rRoot, *itr, nCount ) );
+            maDBDataTableContainer.push_back( new XclExpXmlDBDataTable( rRoot, *itr, (maDBDataTableContainer.size() + 1) ) );// Tables are ID'ed 1 - based
         }
     }
 }


More information about the Libreoffice-commits mailing list