diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-07-13 20:17:35 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-07-18 16:31:25 +0100 |
commit | 3f690a79cdd7c89e4e49febf5200bd8dbe76b568 (patch) | |
tree | bdd4940c449d2dd3e74ce75628e1e7fac0fef719 | |
parent | 7ba8341008a53d1f96459c6a6e25d7e26a325dba (diff) |
Fix counting the paragraphs, fdo#36816.
Signed-off-by: Noel Power <noel.power@novell.com>
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
-rw-r--r-- | 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 22f7a2c0d548..cb371eb88efe 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() ) { |