diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 16:12:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 16:15:04 +0200 |
commit | 58d24271ffbbcfe299591b4592c653a7c41c20e6 (patch) | |
tree | 2d4f117a6e71ea9a0851c92f25c8fe4b2dc7c819 /connectivity | |
parent | Import bezier curves from .docx. (diff) | |
download | core-58d24271ffbbcfe299591b4592c653a7c41c20e6.tar.gz core-58d24271ffbbcfe299591b4592c653a7c41c20e6.zip |
Assuming the double iteration is a copy/paste snafu
...causes "error: attempt to increment a past-the-end iterator." with debug-mode
libstdc++.
Change-Id: I89af3944b04ad6ab4ef3561d2aa91b5bab1edf20
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mork/MQueryHelper.cxx | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index ffc2a5f5da7f..b4f14a5f05af 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -241,40 +241,37 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection) MorkRowMap *Rows = 0; MorkRowMap::iterator rowIter; + // Iterate all tables for ( tableIter = Tables->begin(); tableIter != Tables->end(); tableIter++ ) { - // Iterate all tables - for ( tableIter = Tables->begin(); tableIter != Tables->end(); tableIter++ ) + if (tableIter->first != 1) break; + Rows = xConnection->getMorkParser()->getRows( 0x80, &tableIter->second ); + if ( Rows ) { - if (tableIter->first != 1) break; - Rows = xConnection->getMorkParser()->getRows( 0x80, &tableIter->second ); - if ( Rows ) + // Iterate all rows + for ( rowIter = Rows->begin(); rowIter != Rows->end(); rowIter++ ) { - // Iterate all rows - for ( rowIter = Rows->begin(); rowIter != Rows->end(); rowIter++ ) + MQueryHelperResultEntry* entry = new MQueryHelperResultEntry(); + for (MorkCells::iterator CellsIter = rowIter->second.begin(); + CellsIter != rowIter->second.end(); CellsIter++ ) { - MQueryHelperResultEntry* entry = new MQueryHelperResultEntry(); - for (MorkCells::iterator CellsIter = rowIter->second.begin(); - CellsIter != rowIter->second.end(); CellsIter++ ) - { - std::string column = xConnection->getMorkParser()->getColumn(CellsIter->first); - std::string value = xConnection->getMorkParser()->getValue(CellsIter->second); - - //SAL_INFO("connectivity.mork", "key: " << column << " value: " << value); - - OString key(column.c_str(), static_cast<sal_Int32>(column.size())); - OString valueOString(value.c_str(), static_cast<sal_Int32>(value.size())); - rtl::OUString valueOUString = ::rtl::OStringToOUString( valueOString, RTL_TEXTENCODING_UTF8 ); - entry->setValue(key, valueOUString); - } - ::std::vector< sal_Bool > vector = entryMatchedByExpression(this, &m_aExpr, entry); - sal_Bool result = sal_True; - for (::std::vector<sal_Bool>::iterator iter = vector.begin(); iter != vector.end(); ++iter) { - result = result && *iter; - } - if (result) { - append(entry); - } + std::string column = xConnection->getMorkParser()->getColumn(CellsIter->first); + std::string value = xConnection->getMorkParser()->getValue(CellsIter->second); + + //SAL_INFO("connectivity.mork", "key: " << column << " value: " << value); + + OString key(column.c_str(), static_cast<sal_Int32>(column.size())); + OString valueOString(value.c_str(), static_cast<sal_Int32>(value.size())); + rtl::OUString valueOUString = ::rtl::OStringToOUString( valueOString, RTL_TEXTENCODING_UTF8 ); + entry->setValue(key, valueOUString); + } + ::std::vector< sal_Bool > vector = entryMatchedByExpression(this, &m_aExpr, entry); + sal_Bool result = sal_True; + for (::std::vector<sal_Bool>::iterator iter = vector.begin(); iter != vector.end(); ++iter) { + result = result && *iter; + } + if (result) { + append(entry); } } } |