Bug 141957 - "Characters per line" in the Text Grid is calculated without the header and footer
Summary: "Characters per line" in the Text Grid is calculated without the header and f...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords:
Depends on:
Blocks: CJK Vertical-Text Text-Grid CJK-Japanese
  Show dependency treegraph
 
Reported: 2021-04-29 06:36 UTC by Jun Nogata
Modified: 2021-10-14 16:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A file with 24 characters per line, but only 21 characters. (10.53 KB, application/vnd.oasis.opendocument.text)
2021-04-29 06:41 UTC, Jun Nogata
Details
Reproduction Procedure Video (4.79 MB, video/x-matroska)
2021-05-05 09:39 UTC, Jun Nogata
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jun Nogata 2021-04-29 06:36:31 UTC
Description:
"Characters per line" in the Text Grid is calculated without the header and footer, so the character count I entered is different from the real character count.

Steps to Reproduce:
Options:
    Language Settings:
    - Locale Settings: Japanese
    - Default Language Asian: Japanese

    LibreOffice Writer:
    - General
        - [x] Enable char unit
        - [x] Use square page mode for text grid


1. Open [Format] -> [Page Style]
2. Set the following settings for the page style and click the OK button

  Page Style settings

    Page tab:
    - Orientation: Landscape
    - Text direction: Right-to-left(vertical)

    Header tab:
    - [x] Header on

    Footer tab:
    - [x] Footer on

    Text grid tab:
    - Grid(lines and characters)
    - Grid Layout:
        - Lines per page: 20
        - Characters per line: 24

3. Enter "123456789012345678901234"(24 Double-byte characters) in Double-byte characters. 
4. Check the character count.


Actual Results:
One line is only 21 Double-byte characters, 3 Double-byte characters are wrapped around to the next line.

Expected Results:
Each line has 24 Double-byte characters.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.2.2 / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (C); UI: en-US
Calc: threaded
Comment 1 Jun Nogata 2021-04-29 06:41:33 UTC
Created attachment 171486 [details]
A file with 24 characters per line, but only 21 characters.
Comment 2 Jun Nogata 2021-05-05 09:39:38 UTC
Created attachment 171642 [details]
Reproduction Procedure Video
Comment 3 Shinji Enoki 2021-05-14 11:40:11 UTC
I reproduced it in my following environment. 

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: dbd4110cc36011042c98549d997daa79e8065aba
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-13_01:08:22
Calc: threaded

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 5 Commit Notification 2021-10-11 12:14:41 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8ac8a20ed15bb458e1ee5a8df2b97aef05ca4f7c

tdf#141957 include the size of header and footer.

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Mark Hung 2021-10-14 10:26:25 UTC
It seems that tdf#136283 and tdf#50901 duplicate this issue or vice versa.
Comment 7 Commit Notification 2021-10-14 14:44:47 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/b21880ab06e85fdb688c8e5d11453a9fb9d52896

tdf#141957 include the size of header and footer.

It will be available in 7.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2021-10-14 16:11:35 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e799d70c646748b90879d7b31c2b28fe8c0853d8

tdf#141957: sw: Add UItest

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.