sw/source/ui/dialog/wordcountdialog.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 15e5f503c2c7e84eb424d265ed472cc2c5b1dc69 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Dec 31 15:12:21 2023 +0000 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Jan 3 10:36:48 2024 +0100 cid#1559993 Division or modulo by float zero Change-Id: I071d576fc998022c76364778423e0346f69cb051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161500 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit 7cf623ae1771f448ab4f82c175156a7e776fa964) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161425 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index b0b92a6ae1a7..1277545c6e12 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -67,9 +67,10 @@ void SwWordCountFloatDlg::SetValues(const SwDocStat& rCurrent, const SwDocStat& setValue(*m_xDocCjkcharsFT, rDoc.nAsianWord, rLocaleData); setValue(*m_xDocComments, rCurrent.nComments, rLocaleData); - if (m_xStandardizedPagesLabelFT->get_visible()) + const sal_Int64 nCharsPerStandardizedPage = m_xStandardizedPagesLabelFT->get_visible() ? + officecfg::Office::Writer::WordCount::StandardizedPageSize::get() : 0; + if (nCharsPerStandardizedPage) { - sal_Int64 nCharsPerStandardizedPage = officecfg::Office::Writer::WordCount::StandardizedPageSize::get(); setDoubleValue(*m_xCurrentStandardizedPagesFT, static_cast<double>(rCurrent.nChar) / nCharsPerStandardizedPage); setDoubleValue(*m_xDocStandardizedPagesFT,