Bug 63616 - Vertical ruler is unreadable
Summary: Vertical ruler is unreadable
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: Other macOS (All)
: low major
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0 target:4.1.0.2
Keywords: regression
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-04-16 23:42 UTC by Jorendc
Modified: 2013-06-20 13:37 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
(bad) behavior now on Mac OSX master (164.43 KB, image/png)
2013-04-16 23:42 UTC, Jorendc
Details
Good behavior on LibreOffice 4.0.2.2 (171.44 KB, image/png)
2013-04-16 23:43 UTC, Jorendc
Details
Very bad behaviour on 4.2.0 master (116.56 KB, image/png)
2013-06-16 04:37 UTC, Emir Sarı
Details
Non working patch (1.30 KB, patch)
2013-06-17 22:29 UTC, ⁨خالد حسني⁩
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorendc 2013-04-16 23:42:50 UTC
Created attachment 78115 [details]
(bad) behavior now on Mac OSX master

Seems VERY related to bug 50631 but I thought opening a new bug is the best way to report it.

Behavior: the vertical ruler isn't readable anymore (a screenshot says more than 1000 words, so I refer to my screenshot).

Tested using Mac OSX 10.8.3.
Reproducible using Version: 4.1.0.0.alpha0+ Build ID: 35c53bbcc8f0a7b8627a8d5a2e167d76dc52d1c

Compared to the attachments of Bug 50631 and the behavior in LibreOffice 4.0.2.2, the numbers are also rotated -90degrees. -> regression.

Kind regards,
Joren
Comment 1 Jorendc 2013-04-16 23:43:30 UTC
Created attachment 78116 [details]
Good behavior on LibreOffice 4.0.2.2
Comment 2 Jorendc 2013-04-16 23:44:41 UTC
@Emir: I think you can confirm this one :-)?
Comment 3 Emir Sarı 2013-04-17 00:21:34 UTC
Reproducible with Version: 4.1.0.0.alpha0+
Build ID: 092bc9b54c5b091d517315b61cbc0aa53d12737

And there is Bug 50631, these two issues are very similar, maybe this behaviour was also triggered by something related to this bug report. 

Hope this gets fixed soon.
Comment 4 Michael Meeks 2013-06-04 16:27:31 UTC
I'd love to know if this is an issue in 4.1 B2 with the coretext changes there thanks to Khaled's nice work there.
Comment 5 Emir Sarı 2013-06-11 07:40:34 UTC
@Michael,

Still reproducible with 4.1.0b2
Comment 6 Michael Meeks 2013-06-11 07:57:47 UTC
Abdulmajeed : any thoughts ? testing ?
Comment 7 abdulmajeed 2013-06-11 08:13:53 UTC
Michael: unfortunately i don't have a Mac near me:(  (usally i borrow my colleague's Mac)  
so i'll try to contact him and see what happen
Comment 8 Issa Alkurtass 2013-06-12 09:04:54 UTC
@Michael Still reproducible. 

Version: 4.2.0.0.alpha0+
Build ID: 638ecac30d04a0f13e55f2566a9e318b9dbf02f
Comment 9 ⁨خالد حسني⁩ 2013-06-12 15:00:47 UTC
I can try to debug it, but I need some pointers to the writer code that draws the digits of the rulers.
Comment 10 Michael Meeks 2013-06-15 17:09:06 UTC
So - I think this is basically down to the GetBoundRect impl. not doing rotation (according to kendy). This was a problem in all the text backends. This commit:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f5a9171ef2093fdae595674dc1b3ab2868cc8c8

Fixed this for the Mac rulers in the past. I guess we need to do this for coretext too: and rotate the text. The visual result looks like the expected x/y swap if this is missing. Shouldn't be so hard, but hard to test without a Mac ? :-)

Thanks !
Comment 11 Emir Sarı 2013-06-16 04:37:55 UTC
Created attachment 80889 [details]
Very bad behaviour on 4.2.0 master

This is a SS from the latest master, as you can see not only vertical rulers but also horizontal rulers are also broken...
Comment 12 ⁨خالد حسني⁩ 2013-06-17 22:29:26 UTC
Created attachment 80966 [details]
Non working patch

So, IIUC, the problem is that GetBoundRect() is returning the position of the non rotated text, so similar rotation as performed by DrawText() need to be done there too. The attached patch tries to do that, but it makes no difference, I’m attaching it just case it helps anyone find the real fix.
Comment 13 Jan Holesovsky 2013-06-18 10:46:09 UTC
Khaled: Terribly sorry for getting to you this late :-(

The drawing of the ruler happens here:

http://cgit.freedesktop.org/libreoffice/core/tree/svtools/source/control/ruler.cxx#n361

Please ping me on the IRC if you need any details...
Comment 14 Don't use this account, use tml@iki.fi 2013-06-19 12:16:10 UTC
Seems to be fixed by:


commit b9c46f46cebc0ebed5a91f8fbb9d0a01366f1f77
Author: Tor Lillqvist <tml@iki.fi>
Date:   Wed Jun 19 15:12:30 2013 +0300

    fdo#63616: Fix GetBoundRect for rotated text in CoreText backend
    
    Change-Id: I8c9ee84afd71481c2c6b002265b86e048f369f5c

 vcl/coretext/ctlayout.cxx | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)
Comment 15 Commit Notification 2013-06-19 12:19:51 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9c46f46cebc0ebed5a91f8fbb9d0a01366f1f77

fdo#63616: Fix GetBoundRect for rotated text in CoreText backend



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Don't use this account, use tml@iki.fi 2013-06-19 13:14:42 UTC
Actually this is fixed only on master so far, repoening.
Comment 17 Commit Notification 2013-06-20 11:24:06 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8d55b1b6ffd2de965ae3db0712fb2317a9310f1f&h=libreoffice-4-1

fdo#63616: Fix GetBoundRect for rotated text in CoreText backend


It will be available in LibreOffice 4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Emir Sarı 2013-06-20 13:37:07 UTC
Thank you @Tor, for fixing this bug. Verified that this is fixed. 

..Now only if someone could fix Bug 50506 :3