Kaydet (Commit) f3798fa1 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

line spacing: Honor the current setting of units.

Plus fixes of some warnings.

Change-Id: I877e08e4b60c1b654e371c6786cc3ad33e79c583
üst caa4c09c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment