diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-11-04 17:02:15 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-04 20:26:21 +0100 |
commit | f3798fa1584dd63b8547eec00c92584d906f6979 (patch) | |
tree | ff7ecb5ffaecbd0422854dc4fc0c80f5330a61c6 | |
parent | caa4c09ce4407dcbcbcf38117db63f68f022bc53 (diff) |
line spacing: Honor the current setting of units.
Plus fixes of some warnings.
Change-Id: I877e08e4b60c1b654e371c6786cc3ad33e79c583
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 0328dce086f7..4f92378e737f 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -82,6 +82,7 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId) aLink = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl ); mpLineDistAtPercentBox->SetModifyHdl( aLink ); mpLineDistAtMetricBox->SetModifyHdl( aLink ); + SetFieldUnit(*mpLineDistAtMetricBox, SfxModule::GetCurrentFieldUnit()); initialize(); } @@ -97,11 +98,6 @@ void ParaLineSpacingControl::initialize() const SvxLineSpacingItem* currSPItem = static_cast<const SvxLineSpacingItem*>(pItem); - /* TODO - according to the current units setting - FieldUnit currMetricUnit = FUNIT_CM; - SetFieldUnit(*mpLineDistAtMetricBox, currMetricUnit); - */ - mpLineDist->Enable(); if( eState >= SfxItemState::DEFAULT ) @@ -300,7 +296,7 @@ void ParaLineSpacingControl::SelectEntryPos(sal_Int32 nPos) UpdateMetricFields(); } -IMPL_LINK( ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox*, pBox ) +IMPL_LINK(ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox*, /*pBox*/) { UpdateMetricFields(); ExecuteLineSpace(); @@ -417,7 +413,7 @@ void ParaLineSpacingControl::ExecuteLineSpacing(sal_uInt16 nEntry) // special-case the 1.15 line spacing if (nEntry == LLINESPACE_115) - SetLineSpace(aSpacing, LLINESPACE_PROP, mpLineDistAtPercentBox->Denormalize(115L)); + SetLineSpace(aSpacing, LLINESPACE_PROP, mpLineDistAtPercentBox->Denormalize(LINESPACE_115)); else SetLineSpace(aSpacing, nEntry); |