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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user