Bug 143076 - [EMF+] StringFormat Lead/Trail margins and StringAlign Center
Summary: [EMF+] StringFormat Lead/Trail margins and StringAlign Center
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2021-06-26 02:58 UTC by Valek Filippov
Modified: 2021-07-02 21:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
EMF sample with combinations of margins and aligns (1.69 KB, image/x-emf)
2021-06-26 02:59 UTC, Valek Filippov
Details
Screenshot of the sample opened in LO7.3alpha and MS Paint (10.41 KB, image/png)
2021-06-26 03:01 UTC, Valek Filippov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-06-26 02:58:17 UTC
Description:
LO should consider trailing margin when StringAlign is set to Center.

Steps to Reproduce:
Open attached EMF sample.

Actual Results:
LO shows "HCVB" between vertical red lines and "HCVT"/"HCVC" with right red line through letter "V".

Expected Results:
"HCVC" should be placed between vertical red lines.
For "HCVT" vertical red line should go between "V" and "T", for "HCVB" -- between "H" and "C". 


Reproducible: Always


User Profile Reset: No



Additional Info:
"HL*" is left-aligned, "HC" is centered, "HR" is right-aligned.
"*VT" has lead margin of 1.
"*VC" has both lead and trail margins of 1.
"*VB" has trail margin of 1.
Comment 1 Valek Filippov 2021-06-26 02:59:25 UTC
Created attachment 173211 [details]
EMF sample with combinations of margins and aligns
Comment 2 Valek Filippov 2021-06-26 03:01:05 UTC
Created attachment 173212 [details]
Screenshot of the sample opened in LO7.3alpha and MS Paint
Comment 3 Commit Notification 2021-07-01 21:51:08 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/574dc1e8ff6ea4214fefd91216fca5146a4ff13e

EMF+ tdf#142995 tdf#142997 tdf#143076 Add alignment support for DrawString

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 4 Commit Notification 2021-07-02 10:51:46 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

EMF+ tdf#142995 tdf#142997 tdf#143076 Add alignment support for DrawString

It will be available in 7.2.0.0.beta2.

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.