sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdl
commitcff4a8943cd7bfd5b0e77dbc7e614a61de41276e
authorCaolán McNamara <caolanm@redhat.com>
Mon, 27 Jun 2022 13:28:58 +0000 (27 14:28 +0100)
committerXisco Fauli <xiscofauli@libreoffice.org>
Mon, 27 Jun 2022 19:40:26 +0000 (27 21:40 +0200)
tree4ea0cb1f9aade016acaa7f4cfa363db1a1302127
parent2368f4de682edfff5092b5a4bf68d947706ef1e7
sw: avoid divide by zero in SwTextGridPage::CharorLineChangedHdl

See https://crashreport.libreoffice.org/stats/signature/SwTextGridPage::CharorLineChangedHdl(weld::SpinButton%20&)

disable the offending widget if the value is zero.

crash reproducible under gen with CJK features enabled by: format, page
style, text grid, grid (lines and characters), max base text size of
1000 and then click in "characters per line" and then click in "lines
per page".

Change-Id: Ic0f8131955ab01412dd54bdd5d3bffe518938fb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136470
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
sw/source/ui/misc/pggrid.cxx