[Libreoffice-commits] core.git: svx/source
Eike Rathke
erack at redhat.com
Fri Feb 13 08:07:09 PST 2015
svx/source/dialog/langbox.cxx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 92cfa66f3b8dc3a3b984632bfa4d010a235c6c50
Author: Eike Rathke <erack at redhat.com>
Date: Fri Feb 13 16:38:29 2015 +0100
set edit selection only if necessary
No visible effect, just that it's unnecessary in other cases.
Change-Id: I4f40dbaea5ea647347f7e20f8e233837f7dbd8cb
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 8b31ee4..b6259c3 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;
}
More information about the Libreoffice-commits
mailing list