summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-05-20 11:38:46 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-20 05:08:38 -0500
commit51a868729b5adfa402095f5c08fa889bddcd1b34 (patch)
treeb961bfcf52d8166184f4a0657830349b20baa038
parentbb8acc29e4ad4fb8245b2ed47e60c6cac641ddb1 (diff)
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 (cherry picked from commit 23e9f36a21f7daa6175f53fd244677b9c2e2a660) Reviewed-on: https://gerrit.libreoffice.org/9412 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index ed5e352b7357..0041f3cc40fc 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1527,19 +1527,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();
}
}