[Libreoffice-commits] .: Branch 'libreoffice-3-4-2' - sw/source

Michael Meeks michael at kemper.freedesktop.org
Mon Jul 18 08:33:09 PDT 2011


 sw/source/core/txtnode/txtedt.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bae73094a02deaad5f23027869151a866e6287e7
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Jul 13 20:17:35 2011 +0200

    Fix counting the paragraphs, fdo#36816.
    
    Signed-off-by: Noel Power <noel.power at novell.com>
    Signed-off-by: Michael Meeks <michael.meeks at novell.com>

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() )
     {


More information about the Libreoffice-commits mailing list