[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann
sbergman at redhat.com
Mon Feb 9 02:34:27 PST 2015
connectivity/source/drivers/mork/MConnection.cxx | 6 +-
connectivity/source/drivers/mork/MQueryHelper.cxx | 8 +--
connectivity/source/drivers/mork/MorkParser.cxx | 46 +++++++++++-----------
connectivity/source/drivers/mork/MorkParser.hxx | 8 +--
connectivity/source/drivers/mork/mork_helper.cxx | 4 -
5 files changed, 36 insertions(+), 36 deletions(-)
New commits:
commit 110f77c52186aaf5539759292a8bfcadccdd9e47
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Feb 9 11:33:44 2015 +0100
Try work around MSVC warning C4503 (decorated name length exceeded)
Change-Id: I8ae5a7b5fd3d07b7beb16374f6bb4251ffdb3610
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 7225fc9..8112a16 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -159,11 +159,11 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
// check that we can retrieve the tables:
MorkTableMap *Tables = m_pBook->getTables( defaultScope );
- MorkTableMap::iterator tableIter;
+ MorkTableMap::Map::iterator tableIter;
if (Tables)
{
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
+ for ( tableIter = Tables->map.begin(); tableIter != Tables->map.end(); ++tableIter )
{
if ( 0 == tableIter->first ) continue;
SAL_INFO("connectivity.mork", "table->first : " << tableIter->first);
@@ -174,7 +174,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
if (Tables_hist)
{
// Iterate all tables
- for ( tableIter = Tables_hist->begin(); tableIter != Tables_hist->end(); ++tableIter )
+ for ( tableIter = Tables_hist->map.begin(); tableIter != Tables_hist->map.end(); ++tableIter )
{
if ( 0 == tableIter->first ) continue;
SAL_INFO("connectivity.mork", "table->first : " << tableIter->first);
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 6139d5e..610ef54 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -213,22 +213,22 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
std::string listTable = oStringTable.getStr();
xMork->getRecordKeysForListTable(listTable, listRecords);
}
- MorkTableMap::iterator tableIter;
+ MorkTableMap::Map::iterator tableIter;
MorkTableMap *Tables = xMork->getTables( 0x80 );
if (!Tables)
return -1;
MorkRowMap *Rows = 0;
- MorkRowMap::iterator rowIter;
+ MorkRowMap::Map::iterator rowIter;
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
+ for ( tableIter = Tables->map.begin(); tableIter != Tables->map.end(); ++tableIter )
{
if (tableIter->first != 1) break;
Rows = xMork->getRows( 0x80, &tableIter->second );
if ( Rows )
{
// Iterate all rows
- for ( rowIter = Rows->begin(); rowIter != Rows->end(); ++rowIter )
+ for ( rowIter = Rows->map.begin(); rowIter != Rows->map.end(); ++rowIter )
{
// list specific table
// only retrieve rowIds that belong to that list table.
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 2cfde00..040ad95 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -486,7 +486,7 @@ inline void MorkParser::setCurrentRow( int TableScope, int TableId, int RowScope
TableId = defaultTableId_;
}
- currentCells_ = &( mork_[ abs( TableScope ) ][ abs( TableId ) ][ abs( RowScope ) ][ abs( RowId ) ] );
+ currentCells_ = &( mork_.map[ abs( TableScope ) ].map[ abs( TableId ) ].map[ abs( RowScope ) ].map[ abs( RowId ) ] );
}
bool MorkParser::parseRow( int TableId, int TableScope )
@@ -556,10 +556,10 @@ bool MorkParser::parseMeta( char c )
MorkTableMap *MorkParser::getTables( int TableScope )
{
- TableScopeMap::iterator iter;
- iter = mork_.find( TableScope );
+ TableScopeMap::Map::iterator iter;
+ iter = mork_.map.find( TableScope );
- if ( iter == mork_.end() )
+ if ( iter == mork_.map.end() )
{
return 0;
}
@@ -569,10 +569,10 @@ MorkTableMap *MorkParser::getTables( int TableScope )
MorkRowMap *MorkParser::getRows( int RowScope, RowScopeMap *table )
{
- RowScopeMap::iterator iter;
- iter = table->find( RowScope );
+ RowScopeMap::Map::iterator iter;
+ iter = table->map.find( RowScope );
- if ( iter == table->end() )
+ if ( iter == table->map.end() )
{
return 0;
}
@@ -613,8 +613,8 @@ void MorkParser::retrieveLists(std::set<std::string>& lists)
MorkTableMap* tables = getTables(defaultScope_);
if (!tables) return;
- for (MorkTableMap::iterator TableIter = tables->begin();
- TableIter != tables->end(); ++TableIter )
+ for (MorkTableMap::Map::iterator TableIter = tables->map.begin();
+ TableIter != tables->map.end(); ++TableIter )
{
#ifdef VERBOSE
std::cout << "\t Table:"
@@ -623,8 +623,8 @@ void MorkParser::retrieveLists(std::set<std::string>& lists)
#endif
MorkRowMap* rows = getRows( defaultListScope_, &TableIter->second );
if (!rows) return;
- for ( MorkRowMap::iterator RowIter = rows->begin();
- RowIter != rows->end(); ++RowIter )
+ for ( MorkRowMap::Map::iterator RowIter = rows->map.begin();
+ RowIter != rows->map.end(); ++RowIter )
{
#ifdef VERBOSE
std::cout << "\t\t\t Row Id:"
@@ -655,8 +655,8 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
MorkTableMap* tables = getTables(defaultScope_);
if (!tables) return;
- for (MorkTableMap::iterator TableIter = tables->begin();
- TableIter != tables->end(); ++TableIter )
+ for (MorkTableMap::Map::iterator TableIter = tables->map.begin();
+ TableIter != tables->map.end(); ++TableIter )
{
#ifdef VERBOSE
std::cout << "\t Table:"
@@ -665,8 +665,8 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
#endif
MorkRowMap* rows = getRows( 0x81, &TableIter->second );
if (!rows) return;
- for ( MorkRowMap::iterator RowIter = rows->begin();
- RowIter != rows->end(); ++RowIter )
+ for ( MorkRowMap::Map::iterator RowIter = rows->map.begin();
+ RowIter != rows->map.end(); ++RowIter )
{
#ifdef VERBOSE
std::cout << "\t\t\t Row Id:"
@@ -739,26 +739,26 @@ void MorkParser::dump()
<< std::endl << std::endl;
//// Mork data
- for ( TableScopeMap::iterator iter = mork_.begin();
- iter != mork_.end(); ++iter )
+ for ( TableScopeMap::Map::iterator iter = mork_.map.begin();
+ iter != mork_.map.end(); ++iter )
{
std::cout << "\r\n Scope:" << iter->first << std::endl;
- for ( MorkTableMap::iterator TableIter = iter->second.begin();
- TableIter != iter->second.end(); ++TableIter )
+ for ( MorkTableMap::Map::iterator TableIter = iter->second.map.begin();
+ TableIter != iter->second.map.end(); ++TableIter )
{
std::cout << "\t Table:"
<< ( ( int ) TableIter->first < 0 ? "-" : " " )
<< TableIter->first << std::endl;
- for (RowScopeMap::iterator RowScopeIter = TableIter->second.begin();
- RowScopeIter != TableIter->second.end(); ++RowScopeIter )
+ for (RowScopeMap::Map::iterator RowScopeIter = TableIter->second.map.begin();
+ RowScopeIter != TableIter->second.map.end(); ++RowScopeIter )
{
std::cout << "\t\t RowScope:"
<< RowScopeIter->first << std::endl;
- for (MorkRowMap::iterator RowIter = RowScopeIter->second.begin();
- RowIter != RowScopeIter->second.end(); ++RowIter )
+ for (MorkRowMap::Map::iterator RowIter = RowScopeIter->second.map.begin();
+ RowIter != RowScopeIter->second.map.end(); ++RowIter )
{
std::cout << "\t\t\t Row Id:"
<< ((int) RowIter->first < 0 ? "-" : " ")
diff --git a/connectivity/source/drivers/mork/MorkParser.hxx b/connectivity/source/drivers/mork/MorkParser.hxx
index 18c9887..c430508 100644
--- a/connectivity/source/drivers/mork/MorkParser.hxx
+++ b/connectivity/source/drivers/mork/MorkParser.hxx
@@ -49,10 +49,10 @@
typedef std::map< int, std::string > MorkDict;
typedef std::map< int, int > MorkCells; // ColumnId : ValueId
-typedef std::map< int, MorkCells > MorkRowMap; // Row id
-typedef std::map< int, MorkRowMap > RowScopeMap; // Row scope
-typedef std::map< int, RowScopeMap > MorkTableMap; // Table id
-typedef std::map< int, MorkTableMap > TableScopeMap; // Table Scope
+struct MorkRowMap { typedef std::map< int, MorkCells > Map; Map map; }; // Row id
+struct RowScopeMap { typedef std::map< int, MorkRowMap > Map; Map map; }; // Row scope
+struct MorkTableMap { typedef std::map< int, RowScopeMap > Map; Map map; }; // Table id
+struct TableScopeMap { typedef std::map< int, MorkTableMap > Map; Map map; }; // Table Scope
// Error codes
enum MorkErrors
diff --git a/connectivity/source/drivers/mork/mork_helper.cxx b/connectivity/source/drivers/mork/mork_helper.cxx
index 6adf926..103cc47 100644
--- a/connectivity/source/drivers/mork/mork_helper.cxx
+++ b/connectivity/source/drivers/mork/mork_helper.cxx
@@ -14,12 +14,12 @@ bool openAddressBook(const std::string& path)
return false;
}
const int defaultScope = 0x80;
- MorkTableMap::iterator tableIter;
+ MorkTableMap::Map::iterator tableIter;
MorkTableMap *Tables = mork.getTables( defaultScope );
if ( Tables )
{
// Iterate all tables
- for ( tableIter = Tables->begin(); tableIter != Tables->end(); ++tableIter )
+ for ( tableIter = Tables->map.begin(); tableIter != Tables->map.end(); ++tableIter )
{
if ( 0 == tableIter->first ) continue;
SAL_INFO("connectivity.mork", "table->first : " << tableIter->first);
More information about the Libreoffice-commits
mailing list