-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch changes the behavior of the line counting in the Word Count
dialog.  Now empty paragraphs are counted as lines, but not as paragraphs.
therefore, this document fragment

<p>fun with paragraphs</p>
<p></p>
<p>more fun</p>

has two paragraphs and three lines.  If anyone thinks this is incorrect
behavior, please speak up.  
           
                                sam th               
                                [EMAIL PROTECTED]
                                http://bur-jud-118-039.rh.uchicago.edu                 
                 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE40k0jt+kM0Mq9M/wRAkl1AJ9hcsxx1LaTddK98ub7821wK9WfxQCguZqu
plNKwF9Fe/GV8ZfNOH8/dZw=
=VSQi
-----END PGP SIGNATURE-----

Index: src/text/fmt/xp/fv_View.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.247
diff -u -r1.247 fv_View.cpp
--- src/text/fmt/xp/fv_View.cpp 2000/03/12 04:15:27     1.247
+++ src/text/fmt/xp/fv_View.cpp 2000/03/17 15:15:36
@@ -4996,27 +4996,30 @@
                                
                                if (newWord)
                                        wCount.word++;
+                       
                        }
+
+               
+                       // count lines
+
+                       fp_Line * pLine = pBL->getFirstLine();
+                       while (pLine)
+                       {
+                               wCount.line++;
+                               pLine = pLine->getNext();
+                       }
                        
                        if (isPara)
-                       {
+                       {
                                wCount.para++;
                                isPara = UT_FALSE;
-
-                               // count lines
-                               fp_Line * pLine = pBL->getFirstLine();
-                               while (pLine)
-                               {
-                                       wCount.line++;
-                                       pLine = pLine->getNext();
-                               }
                        }
-
+       
                        pBL = pBL->getNext();
                }
                pSL = pSL->getNext();
+
        }
-       
        // count pages
        wCount.page = m_pLayout->countPages();
        

Reply via email to