summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-11-07 15:01:53 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-11-10 08:30:40 +0100
commit7f4f536ca9195c7d53463527f00897b65d062486 (patch)
tree95a55542163672534eefbec4bb42ce14ae7b656b /cui
parent5a69fd3052bb638857f30a4cfd5913634275d23d (diff)
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 <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/chardlg.cxx5
-rw-r--r--cui/uiconfig/ui/positionpage.ui2
2 files changed, 5 insertions, 2 deletions
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<short>(nKern) );
rCTLFont.SetFixKerning( static_cast<short>(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<tools::Long>(m_xKerningMF->get_max(FieldUnit::POINT));
if(nVal < nKerning)
m_xKerningMF->set_max(nKerning, FieldUnit::POINT);
+ nVal = static_cast<tools::Long>(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 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
- <property name="lower">-2</property>
+ <property name="lower">-1000</property>
<property name="upper">1000</property>
<property name="step_increment">0.1</property>
<property name="page_increment">1</property>