avoid autocorrection misreplacing

takes the last token in case of chained "." instead of the first one

to avoid

aa.b.
autocorrects (wrongly) to
aaaa.

Change-Id: Ibca68850282a0d3aec67ca518bdcbf1da676e155
Reviewed-on: https://gerrit.libreoffice.org/17858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Laurent Godard 2015-08-19 16:15:16 +02:00 committed by Caolán McNamara
parent 930c7fb43a
commit 47d1cb09e6

View File

@ -861,7 +861,7 @@ void EditorWindow::HandleCodeCompletion()
if( aVect.empty() )//nothing to do
return;
OUString sBaseName = aVect[0];//variable name
OUString sBaseName = aVect[aVect.size()-1];//variable name
OUString sVarType = aCodeCompleteCache.GetVarType( sBaseName );
if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectOn() )