Kaydet (Commit) 796cc06c authored tarafından Andre Fischer's avatar Andre Fischer

#i120102# Guard vector access by ensuring vector is not empty.

üst 12d9dd72
......@@ -507,6 +507,9 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
CellPropertyValuesSeq_t aCellProperties( m_aCellProperties.size() );
if ( ! m_aCellProperties.empty())
{
// std::vector< std::vector<PropertyMapPtr> > m_aCellProperties
PropertyMapVector2::const_iterator aRowOfCellsIterator = m_aCellProperties.begin();
PropertyMapVector2::const_iterator aRowOfCellsIteratorEnd = m_aCellProperties.end();
......@@ -516,6 +519,8 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
//it's a uno::Sequence< beans::PropertyValues >*
RowPropertyValuesSeq_t* pCellProperties = aCellProperties.getArray();
while( aRowOfCellsIterator != aRowOfCellsIteratorEnd )
{
if ( ! aRowOfCellsIterator->empty())
{
//aRowOfCellsIterator points to a vector of PropertyMapPtr
PropertyMapVector1::const_iterator aCellIterator = aRowOfCellsIterator->begin();
......@@ -646,6 +651,8 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
++nRow;
++aRowOfCellsIterator;
}
}
}
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
dmapper_logger->endElement("getCellProperties");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment