sc/source/ui/app/inputhdl.cxx | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
New commits: commit e704e4691186c23e52490817d6b710ef5bf68db6 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Aug 17 15:44:39 2012 -0400 fdo#48868: Allow Ctrl-TAB and Ctrl-Shift-TAB to cycle through candidates. This applies to two scenarios: 1) cycling through cell values, and 2) cycling through cell functions in a formula tip window. Both were broken and this commit fixes both. Change-Id: I7826efbada827b8ec3edc5f34a1876c84e5e6236 diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 05d1649..78fd03e 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -125,6 +125,7 @@ ScTypedCaseStrSet::const_iterator findText( size_t nPos = std::distance(rDataSet.begin(), itPos); size_t nRPos = rDataSet.size() - 1 - nPos; std::advance(it, nRPos); + ++it; } for (; it != itEnd; ++it) @@ -146,7 +147,10 @@ ScTypedCaseStrSet::const_iterator findText( { ScTypedCaseStrSet::const_iterator it = rDataSet.begin(), itEnd = rDataSet.end(); if (itPos != rDataSet.end()) + { it = itPos; + ++it; + } for (; it != itEnd; ++it) { @@ -1219,9 +1223,12 @@ void ScInputHandler::NextFormulaEntry( bool bBack ) if ( pActiveView && pFormulaData ) { rtl::OUString aNew; - miAutoPosFormula = findText(*pFormulaData, miAutoPosFormula, aAutoSearch, aNew, bBack); - if (miAutoPosFormula != pFormulaData->end()) - ShowTip( aNew ); // als QuickHelp anzeigen + ScTypedCaseStrSet::const_iterator itNew = findText(*pFormulaData, miAutoPosFormula, aAutoSearch, aNew, bBack); + if (itNew != pFormulaData->end()) + { + miAutoPosFormula = itNew; + ShowTip(aNew); // Display a quick help. + } } // bei Tab wird vorher immer HideCursor gerufen @@ -1630,9 +1637,13 @@ void ScInputHandler::NextAutoEntry( bool bBack ) if ( aSel.nEndPos == nParLen && aText.getLength() == aAutoSearch.getLength() + nSelLen ) { rtl::OUString aNew; - miAutoPosColumn = findText(*pColumnData, miAutoPosColumn, aAutoSearch, aNew, bBack); - if (miAutoPosColumn != pColumnData->end()) + ScTypedCaseStrSet::const_iterator itNew = + findText(*pColumnData, miAutoPosColumn, aAutoSearch, aNew, bBack); + + if (itNew != pColumnData->end()) { + // match found! + miAutoPosColumn = itNew; bInOwnChange = true; // disable ModifyHdl (reset below) lcl_RemoveLineEnd( aNew ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits