diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-04-25 10:16:05 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-04-26 11:34:13 +0000 |
commit | c3572701cf5481edc7432b062e0fa69697c212be (patch) | |
tree | df3ff72171d38f6eeb58b681517041344070163a /cui | |
parent | b308e7934002ff5d0fa1da9ae18384f674606dc9 (diff) |
tdf#89953: put zero kerning if item state has been invalid
Change-Id: I96d81ed7654dc310df68a7ff376bbcd2e1d5810b
Reviewed-on: https://gerrit.libreoffice.org/24361
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 4f1cd066434c..d278b35fa1f2 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -3178,10 +3178,11 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit ); nKerning = (short)m_pKerningMF->Denormalize( nVal ); + SfxItemState eOldKernState = rOldSet.GetItemState( nWhich, false ); if ( pOld ) { const SvxKerningItem& rItem = *static_cast<const SvxKerningItem*>(pOld); - if ( rItem.GetValue() == nKerning ) + if ( (eOldKernState >= SfxItemState::DEFAULT || m_pKerningMF->GetText().isEmpty()) && rItem.GetValue() == nKerning ) bChanged = false; } @@ -3190,7 +3191,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SvxKerningItem( nKerning, nWhich ) ); bModified = true; } - else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) + else if ( SfxItemState::DEFAULT == eOldKernState ) rSet->InvalidateItem(nWhich); // Pair-Kerning |