diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-16 14:18:59 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-16 12:43:46 +0000 |
commit | e837ddd75a6d2b6edc41ba05ded6215d63e3be5c (patch) | |
tree | 9a9db169b9a71621c2c0f7edc7a0033d3a0f4e3f /svx | |
parent | 26fa322583147f87511b2d77e8701228838f8c73 (diff) |
tdf#85949 Add 1.15 to the Line Spacing dropdown
Change-Id: I45b63522c43086f62f451ea0a17e8bdd15911ea1
Reviewed-on: https://gerrit.libreoffice.org/26369
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 33 | ||||
-rw-r--r-- | svx/uiconfig/ui/paralinespacingcontrol.ui | 1 |
2 files changed, 20 insertions, 14 deletions
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 82f8ca57b9bb..98594af8e1cb 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -34,15 +34,13 @@ // values of the mpLineDist listbox #define LLINESPACE_1 0 -#define LLINESPACE_15 1 -#define LLINESPACE_2 2 -#define LLINESPACE_PROP 3 -#define LLINESPACE_MIN 4 -#define LLINESPACE_DURCH 5 -#define LLINESPACE_FIX 6 - -// special case; should not conflict with the mpLinDist values -#define LLINESPACE_115 7 +#define LLINESPACE_115 1 +#define LLINESPACE_15 2 +#define LLINESPACE_2 3 +#define LLINESPACE_PROP 4 +#define LLINESPACE_MIN 5 +#define LLINESPACE_DURCH 6 +#define LLINESPACE_FIX 7 #define MIN_FIXED_DISTANCE 28 @@ -143,6 +141,10 @@ void ParaLineSpacingControl::Initialize() { SelectEntryPos(LLINESPACE_1); } + else if ( LINESPACE_115 == currSPItem->GetPropLineSpace() ) + { + SelectEntryPos(LLINESPACE_115); + } else if ( LINESPACE_15 == currSPItem->GetPropLineSpace() ) { SelectEntryPos(LLINESPACE_15); @@ -244,6 +246,7 @@ void ParaLineSpacingControl::UpdateMetricFields() switch (mpLineDist->GetSelectEntryPos()) { case LLINESPACE_1: + case LLINESPACE_115: case LLINESPACE_15: case LLINESPACE_2: if (mpActLineDistFld == mpLineDistAtPercentBox) @@ -342,6 +345,7 @@ void ParaLineSpacingControl::ExecuteLineSpace() switch ( nPos ) { case LLINESPACE_1: + case LLINESPACE_115: case LLINESPACE_15: case LLINESPACE_2: SetLineSpace(aSpacing, nPos); @@ -374,6 +378,11 @@ void ParaLineSpacingControl::SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_In rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; + case LLINESPACE_115: + rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; + rLineSpace.SetPropLineSpace( LINESPACE_115 ); + break; + case LLINESPACE_15: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; rLineSpace.SetPropLineSpace( LINESPACE_15 ); @@ -431,11 +440,7 @@ void ParaLineSpacingControl::ExecuteLineSpacing(sal_Int32 nEntry) { SvxLineSpacingItem aSpacing(DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE); - // special-case the 1.15 line spacing - if (nEntry == LLINESPACE_115) - SetLineSpace(aSpacing, LLINESPACE_PROP, mpLineDistAtPercentBox->Denormalize(LINESPACE_115)); - else - SetLineSpace(aSpacing, nEntry); + SetLineSpace(aSpacing, nEntry); SfxViewFrame::Current()->GetBindings().GetDispatcher()->ExecuteList( SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing }); diff --git a/svx/uiconfig/ui/paralinespacingcontrol.ui b/svx/uiconfig/ui/paralinespacingcontrol.ui index 67ca9c1d1fce..e5accdbfcca3 100644 --- a/svx/uiconfig/ui/paralinespacingcontrol.ui +++ b/svx/uiconfig/ui/paralinespacingcontrol.ui @@ -180,6 +180,7 @@ <property name="id_column">1</property> <items> <item translatable="yes">Single</item> + <item translatable="yes">1.15 Lines</item> <item translatable="yes">1.5 Lines</item> <item translatable="yes">Double</item> <item translatable="yes">Proportional</item> |