Hi,
https://bugs.freedesktop.org/show_bug.cgi?id=36816
The attached patch fixes that - in the original code we were
incrementing the number of paragraphs as the first thing, so I have just
moved the ++rStart.nPara to the original location.
Would be great to get 3 reviews to get it to 3.4.2 :-)
Regards,
Kendy
From 10d13645d3c7701271884eb06fdab90a3ea1fab2 Mon Sep 17 00:00:00 2001
From: Jan Holesovsky <kendy@suse.cz>
Date: Wed, 13 Jul 2011 20:17:35 +0200
Subject: [PATCH] Fix counting the paragraphs, fdo#36816.
---
sw/source/core/txtnode/txtedt.cxx | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 08d0c6b..d54875a 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1803,6 +1803,10 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
{ // not counting hidden paras
return;
}
+
+ // count of non-empty paras
+ ++rStat.nPara;
+
// Shortcut when counting whole paragraph and current count is clean
if ( isCountAll && !IsWordCountDirty() )
{
@@ -1842,8 +1846,6 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
sal_uInt32 nTmpChars = 0; // count of all chars
sal_uInt32 nTmpCharsExcludingSpaces = 0; // all non-white chars
- ++rStat.nPara; // count of non-empty paras
-
// count words in masked and expanded text:
if( pBreakIt->GetBreakIter().is() )
{
--
1.7.5.4
Context
- [Libreoffice] [REVIEW 3.4(.2)] The number of paragraphs always zerro · Jan Holesovsky
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.