[Libreoffice-commits] core.git: cui/source
Oliver Specht
oliver.specht at cib.de
Tue Apr 26 11:34:39 UTC 2016
cui/source/tabpages/chardlg.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit c3572701cf5481edc7432b062e0fa69697c212be
Author: Oliver Specht <oliver.specht at 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 <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at 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
More information about the Libreoffice-commits
mailing list