From 7f4f536ca9195c7d53463527f00897b65d062486 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Mon, 7 Nov 2022 15:01:53 +0100 Subject: tdf#107405 Allow kerning less than -2 Fallout from 9a745d54a5c7470180f41494283983a3b8b84a51 Change-Id: Ied4d83eb614830718cf304e7010f17516e4a9429 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142388 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- cui/source/tabpages/chardlg.cxx | 5 ++++- cui/uiconfig/ui/positionpage.ui | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'cui') diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index e34eca07485c..3d77e2a338fb 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2775,10 +2775,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) rCJKFont.SetFixKerning( static_cast(nKern) ); rCTLFont.SetFixKerning( static_cast(nKern) ); - //the attribute value must be displayed also if it's above the maximum allowed value + //the attribute value must be displayed also if it's above/below the maximum allowed value tools::Long nVal = static_cast(m_xKerningMF->get_max(FieldUnit::POINT)); if(nVal < nKerning) m_xKerningMF->set_max(nKerning, FieldUnit::POINT); + nVal = static_cast(m_xKerningMF->get_min(FieldUnit::POINT)); + if (nVal > nKerning) + m_xKerningMF->set_min(nKerning, FieldUnit::POINT); m_xKerningMF->set_value(nKerning, FieldUnit::POINT); } else diff --git a/cui/uiconfig/ui/positionpage.ui b/cui/uiconfig/ui/positionpage.ui index 23d476bbe282..ad962316a73d 100644 --- a/cui/uiconfig/ui/positionpage.ui +++ b/cui/uiconfig/ui/positionpage.ui @@ -17,7 +17,7 @@ 10 - -2 + -1000 1000 0.1 1 -- cgit