https://bugs.documentfoundation.org/show_bug.cgi?id=152431

            Bug ID: 152431
           Summary: Line count resets to zero after 65535
           Product: LibreOffice
           Version: 7.5.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: hoss...@libreoffice.org

Created attachment 184058
  --> https://bugs.documentfoundation.org/attachment.cgi?id=184058&action=edit
Text file with 65535 non-blank lines

Description:
In LibreOffice Writer document statistics, the line number can not exceed 65535
and it resets to zero after that. This shows the usage of 16 bit unsigned
integer for the line count.

Steps to Reproduce:
1. Create a file containing 65535 non-blank lines. For example:
    for i in {1..65535}; do echo .; done > lines.txt
   Alternatively, you can download and use the attachment (lines.txt) from this
issue.
2. Open the file
3. Go to File > Properties > Statistics and click Update. See 65535 in the
lines.
4. Add a new non-blank line.
3. Count the statistics again, just like step 3.

Actual Results:
The line count is shown as 0.

Expected Results:
The line count should be 65536. Using a 32 bit unsigend integer can increase
the limit to 2^32-1=4,294,967,295 (~4.3 billion) which is much better, and is a
good practical limit.

Reproducible: Always


User Profile Reset: No


Additional Info:

Reproducible with the latst LO 7.5 dev master:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 95a3d7733c5b48c99b2b74b06c7eeee718fdcd03
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to