simplify and ensure valid miAutoPosColumn in all cases, fdo#78838 related

Unconditionally set miAutoPosColumn at the end of all operations so it
is also valid in case of pColumnData->clear() and no entries inserted
after pDoc->GetDataEntries().

Change-Id: I689632f696091fd9ce8e93c06d7918e5eaf05ab4
This commit is contained in:
Eike Rathke
2014-05-20 11:38:46 +02:00
parent df973e6e95
commit 23e9f36a21

View File

@@ -1409,19 +1409,15 @@ void ScInputHandler::GetColData()
if ( pColumnData )
pColumnData->clear();
else
{
pColumnData = new ScTypedCaseStrSet;
miAutoPosColumn = pColumnData->end();
}
std::vector<ScTypedStrData> aEntries;
pDoc->GetDataEntries(
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), true, aEntries, true);
if (!aEntries.empty())
{
pColumnData->insert(aEntries.begin(), aEntries.end());
miAutoPosColumn = pColumnData->end();
}
miAutoPosColumn = pColumnData->end();
}
}