Kaydet (Commit) fe2b8ef1 authored tarafından Eike Rathke's avatar Eike Rathke

advance start of edit selection on a matching entry

... to allow continuous typing.

Change-Id: I4717e72e422037a441e582004bc87689ea7bc455
üst dbe8b3b6
......@@ -711,7 +711,24 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
{
const sal_Int32 nPos = GetEntryPos( aStr);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
// Advance start of full selection by one so the next character
// will already continue the string instead of having to type the
// same character again to start a new string. The selection
// includes formatting characters and is reverse when obtained from
// the Edit control.
Selection aSel( GetSelection());
if (aSel.Max() == 1)
{
OUString aText( GetText());
if (aSel.Min() == aText.getLength())
{
++aSel.Max();
SetSelection( aSel);
}
}
meEditedAndValid = EDITED_NO;
}
else
{
OUString aCanonicalized;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment