sw/inc/ndtxt.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 08d788f5ff0dfd8cbfed1eb1b8b625a83516d076 Author: codemaestro <[email protected]> AuthorDate: Mon Oct 27 10:18:28 2025 +0530 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Thu Nov 6 14:50:39 2025 +0100 tdf#114441: Convert use of sal_uLong to better integer types SwTextNode represents a single paragraph. ParagraphIdleData stores word and character counts. Each paragraph's text is limited by the underlying text buffer (OUString) index, which is sal_Int32 (~2.1B chars). Using sal_uInt32 (4.3B capacity) safely covers all possible characters per paragraph, voids overflow and halves memory compared to 64-bit counters. Change-Id: I421e3b455ea5019d955db7c25edcac99eb927dbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193012 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <[email protected]> diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 93dfd3068996..247682b260ba 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -98,9 +98,9 @@ struct ParagraphIdleData std::unique_ptr<SwWrongList> pWrong; // for spell checking std::unique_ptr<SwGrammarMarkUp> pGrammarCheck; // for grammar checking / proof reading std::unique_ptr<SwWrongList> pSmartTags; - sal_uLong nNumberOfWords = 0; - sal_uLong nNumberOfAsianWords = 0; - sal_uLong nNumberOfChars = 0; + sal_uInt32 nNumberOfWords = 0; + sal_uInt32 nNumberOfAsianWords = 0; + sal_uInt32 nNumberOfChars = 0; sal_uLong nNumberOfCharsExcludingSpaces = 0; bool bWordCountDirty = true; WrongState eWrongDirty = WrongState::TODO; ///< online spell checking needed/done?
