= Bug = https://bugs.freedesktop.org/show_bug.cgi?id=46757 = Patch = https://bugs.freedesktop.org/attachment.cgi?id=62967 = Patch Review = https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=46757&attachment=62967 = Changes =We were ignoring redlined (deleted) text when counting characters, but not when counting words or characters without spaces. We now mask all redlined/hidden content from the
expanded node text before operating on it. = Open Issues = One problem that remains with this patch is document statistics. When you save the document, SwXMLExport::SwXMLExport disables redlining deleted changes (http://cgit.freedesktop.org/libreoffice/core/commit/?id=6af264883910fe31433b4164b1956f4f9ed75ecb), which leads to SwTxtNode::CountWords counting the deleted text instead of masking it. It appears that was done as a bug fix. Unfortunately, it was fixing a bug from 2001, and information on such bugs are not available anymore. The attached patch leaves the broken document statistics behavior as is, and I'll file a separate bug to track it. Regards, --Muhammad