sw/source/ui/dialog/wordcountdialog.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 233f4651d9baafe9dbd5a41a83a018c6560bc214 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Dec 31 15:12:21 2023 +0000 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Jan 4 15:52:54 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 <[email protected]> (cherry picked from commit 7cf623ae1771f448ab4f82c175156a7e776fa964) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161552 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index a96e1c50b3be..d4cbc1fa6b6f 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -65,9 +65,10 @@ void SwWordCountFloatDlg::SetValues(const SwDocStat& rCurrent, const SwDocStat& setValue(*m_xDocCharacterExcludingSpacesFT, rDoc.nCharExcludingSpaces, rLocaleData); setValue(*m_xDocCjkcharsFT, rDoc.nAsianWord, 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,
