cui/source/tabpages/chardlg.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit c3572701cf5481edc7432b062e0fa69697c212be Author: Oliver Specht <oliver.spe...@cib.de> Date: Mon Apr 25 10:16:05 2016 +0200 tdf#89953: put zero kerning if item state has been invalid Change-Id: I96d81ed7654dc310df68a7ff376bbcd2e1d5810b Reviewed-on: https://gerrit.libreoffice.org/24361 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 4f1cd06..d278b35 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits