diff options
author | Eike Rathke <erack@redhat.com> | 2015-02-13 16:38:29 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-02-13 17:06:14 +0100 |
commit | 92cfa66f3b8dc3a3b984632bfa4d010a235c6c50 (patch) | |
tree | c5a2200a434e2841a979d69553adb398ba96f20a /svx/source | |
parent | f4f064da1aec45bb17d01cef59577191923c8ae4 (diff) |
set edit selection only if necessary
No visible effect, just that it's unnecessary in other cases.
Change-Id: I4f40dbaea5ea647347f7e20f8e233837f7dbd8cb
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/langbox.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 8b31ee4cd78c..b6259c359acd 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -719,8 +719,14 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ ) // invalidates the Edit Selection thus has to happen between // obtaining the Selection and setting the new Selection. sal_Int32 nSelPos = ImplGetSelectEntryPos(); - if (nSelPos != nPos) + bool bSetEditSelection; + if (nSelPos == nPos) + bSetEditSelection = false; + else + { ImplSelectEntryPos( nPos, true); + bSetEditSelection = true; + } // If typing into the Edit control led us here, advance start of a // full selection by one so the next character will already @@ -731,10 +737,14 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ ) { OUString aText( GetText()); if (aSel.Min() == aText.getLength()) + { ++aSel.Max(); + bSetEditSelection = true; + } } - SetSelection( aSel); + if (bSetEditSelection) + SetSelection( aSel); meEditedAndValid = EDITED_NO; } |