Bug 143511 - Writer: Comment oversized and text missing when printed in margin in Linux
Summary: Writer: Comment oversized and text missing when printed in margin in Linux
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.beta1+
Hardware: All Linux (All)
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.3.0 target:7.2.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Weld-Writer-Comments
  Show dependency treegraph
 
Reported: 2021-07-23 11:49 UTC by Timur
Modified: 2022-01-05 14:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
what I get in 7.2 which looks ok (39.02 KB, application/pdf)
2021-11-04 12:52 UTC, Caolán McNamara
Details
(1) Wrongly printed comment (using the original attachment .odt). [If you try to highlight the invisible text in the comment, you see that there is some text, but it is invisible. (44.47 KB, application/pdf)
2021-11-13 18:34 UTC, Gerry
Details
(2) Correctly printed comment (using the original attachment .odt). (44.47 KB, application/pdf)
2021-11-13 18:42 UTC, Gerry
Details
(3) A new .odt file to test longer documents (I simply duplicated the text of the original attachment 168069 several times). (24.14 KB, application/vnd.oasis.opendocument.text)
2021-11-13 18:44 UTC, Gerry
Details
(4) Wrongly printed comments using attachment 176233 [you see that some comments are displayed correctly and others not]. (74.76 KB, application/pdf)
2021-11-13 19:01 UTC, Gerry
Details
(5) Correctly printed comments using attachment 176233 (after I scrolled through the entire document before printing. (74.77 KB, application/pdf)
2021-11-13 19:05 UTC, Gerry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2021-07-23 11:49:51 UTC
In addition to Linux comment bug 138826 (The shaded area of the commented range in main document area is offset), in LO 7.2 there's a change for comment itself: comment text in margin is missing and comment size is too big.
Should be tested with attachment 168069 [details].

Comment text is not printed in GTK3 only, printed in GEN and SKIA. Comment is oversized in all GTK3, GEN, SKIA.

This was OK in 6.4 and 7.0 and worsened twice: wrong comment text shade in 7.1, comment text missing and size wrong in 7.2 master.
Comment 1 Timur 2021-07-23 12:24:53 UTC
Linux 7.2:
commit 64bb6290805110805ac8c464f9272226504e3fde 69c546e1e7a697217f273baa7c1729ff823efd76
previous 2c61782812b1b8b382dd48a04a712da9eaeb4685

author	Caolán McNamara <caolanm@redhat.com>	2020-12-04 16:30:31 +0000
weld annotation window

Hi Caolán, please see this one.
I wrote there was wrong comment text shade in 7.1, but it was OK before this commit.
Comment 2 Timur 2021-07-23 12:58:18 UTC
Note: previous change in 7.2 from wrong comment text shade to comment text OK was: 
commit 35bb6d78aed20db4d5f3fdfc0fc53a0aff6a27b1
    source c3175687ed793c6a99eaf17a2e3e48b5d7891be7
    previous cc4446c87b02f93b2125a5fb3e4d4a301150a177

author	Caolán McNamara <caolanm@redhat.com>	2020-12-10 13:14:18 +0000
fix printing of 'margins in comment'
mangled since...
commit c200aa27ee4a0f5a89af6e970c2c22580029eded
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu May 21 15:54:15 2020 +0100
    remove Size arg from Window::Draw and depend on GetSizePixel
Comment 3 Caolán McNamara 2021-11-04 12:51:59 UTC
Leaving aside the "shared area of the commented range" problem of bug 138826 is there a remaining problem in 7.2 here? The comment is visible in the margin for me and the text looks the right size.
Comment 4 Caolán McNamara 2021-11-04 12:52:25 UTC
Created attachment 176104 [details]
what I get in 7.2 which looks ok
Comment 5 Caolán McNamara 2021-11-12 12:37:14 UTC
I'm going to assume what I see is good in trunk and 7.3 (the shared area aside which is also fixed in trunk) but feel free to reopen if I misunderstand
Comment 6 Gerry 2021-11-13 18:32:30 UTC
(In reply to Caolán McNamara from comment #4)
> Created attachment 176104 [details]
> what I get in 7.2 which looks ok

Thanks for looking into this bug. I still can confirm this bug in LO 7.2.2. The text in the comments is not printed on Linux (Ubuntu 21.10). I feel free to set this bug to REOPENED.

Although the bug appears most of the times, but it does not occur under certain conditions: 

I assume (not sure) that the bug always occurs if the comment was not rendered on screen. This means that if I scroll through the entire document and let all comments display on screen, LibreOffice will be able to print the comments correctly. However, if the comment was not rendered on screen before (because I did't scroll to that page), LibreOffice does not print the text of this/these comments.

In the following, I'll add 5 attachments:

(1) Wrongly printed comment (using the original attachment .odt). [If you try to highlight the invisible text in the comment, you see that there is some text, but it is invisible.
(2) Correctly printed comment (using the original attachment .odt).

(3) A new .odt file to test longer documents (I simply duplicated the text of the original attachment several times).
(4) Wrongly printed comments [you see that some comments are displayed correctly and others not.
(5) Correctly printed comments (after I scrolled through the entire document before printing. 



My system: 
Ubuntu 21.10 with Gnome Shell.

Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 1:7.2.2-0ubuntu0.21.10.1
Calc: threaded
Comment 7 Gerry 2021-11-13 18:34:28 UTC
Created attachment 176231 [details]
(1) Wrongly printed comment (using the original attachment .odt). [If you try to highlight the invisible text in the comment, you see that there is some text, but it is invisible.
Comment 8 Gerry 2021-11-13 18:42:23 UTC
Created attachment 176232 [details]
(2) Correctly printed comment (using the original attachment .odt).
Comment 9 Gerry 2021-11-13 18:44:20 UTC
Created attachment 176233 [details]
(3) A new .odt file to test longer documents (I simply duplicated the text of the original attachment 168069 [details] several times).
Comment 10 Gerry 2021-11-13 19:01:53 UTC
Created attachment 176234 [details]
(4) Wrongly printed comments using attachment 176233 [details] [you see that some comments are displayed correctly and others not].
Comment 11 Gerry 2021-11-13 19:05:00 UTC
Created attachment 176236 [details]
(5) Correctly printed comments using attachment 176233 [details] (after I scrolled through the entire document before printing.
Comment 12 Caolán McNamara 2021-11-15 12:58:10 UTC
indeed, I can reproduce it with such a longer example
Comment 13 Commit Notification 2021-11-16 10:27:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0659c488efb00e2a87fa98edf498288470688a9a

Resolves: tdf#143511 SysObj is clipped out if the widget is out of view

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 14 Caolán McNamara 2021-11-16 10:27:53 UTC
That seems to work well in trunk, backport to 7-2 in gerrit
Comment 15 Commit Notification 2021-11-16 14:59:44 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/0866a9e92ff0d301632d0600d6178c2fc2080f48

Resolves: tdf#143511 SysObj is clipped out if the widget is out of view

It will be available in 7.2.4.

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 16 Christian Lohmaier 2021-12-06 13:28:48 UTC
7.2.4 was a hotfix release, updating target in status-whiteboard
Comment 17 Timur 2022-01-05 14:41:18 UTC
Thanks Caolán for looking into this and sorry I couldn't comment earlier.
I tested in 7.3 master so I set Verified.