summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index e3685146b6f5..3da72391476a 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -67,7 +67,30 @@ TextCharacterSpacingControl::TextCharacterSpacingControl(TextCharacterSpacingPop
void TextCharacterSpacingControl::GrabFocus()
{
- mxVeryTight->grab_focus();
+ tools::Long nKerning = mxEditKerning->get_value(FieldUnit::NONE);
+ switch (nKerning)
+ {
+ case SPACING_VERY_TIGHT:
+ mxVeryTight->grab_focus();
+ break;
+ case SPACING_TIGHT:
+ mxTight->grab_focus();
+ break;
+ case SPACING_NORMAL:
+ mxNormal->grab_focus();
+ break;
+ case SPACING_LOOSE:
+ mxLoose->grab_focus();
+ break;
+ case SPACING_VERY_LOOSE:
+ mxVeryLoose->grab_focus();
+ break;
+ default:
+ if (nKerning == mnCustomKern)
+ mxLastCustom->grab_focus();
+ else
+ mxEditKerning->grab_focus();
+ }
}
TextCharacterSpacingControl::~TextCharacterSpacingControl()