[Libreoffice-bugs] [Bug 53399] New: word count inconsistent and wrong with non-breaking space

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 12 12:00:41 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=53399

             Bug #: 53399
           Summary: word count inconsistent and wrong with non-breaking
                    space
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.6.0.4 release
          Platform: x86-64 (AMD64)
        OS/Version: Windows (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Writer
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: stephanhennig at arcor.de


Created attachment 65456
  --> https://bugs.freedesktop.org/attachment.cgi?id=65456
word count test document

Non-breaking spaces are handles incorrectly by word count, giving wrong and
inconsistent results.

Recipe:

1. Open the attached document wordcount-sample.odt containing a text consisting
of 6 words.  Word count is correct in this case, both, in the status line as
well as in the word count window (file wordcount-sample-1.png).

2. Replace the space between the fourth and fifth word with a non-breaking
space, but don't move the cursor (file wordcount-sample-2.png).

  Inconsistent behaviour:  Word count in status line switches to 4 whereas word
count in explicit windows switches to 5.

  Wrong results:  Both word counts are wrong as the number of words didn't
change.

3. Move the cursor (file wordcount-sample-3.png).

  Wrong results:  Word count in explicit windows now also switches to 4 and
'characters excluding spaces' decrease from 24 down to 16.

It looks like non-breaking spaces are treated like end-of-file markers by the
word count algorithm.  Still, that doesn't explain why multiple inconsistent
word count statistics are displayed in status line and the explicit word count
window.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list