Bug 142995 - [EMF+] StringFormat LineAlign is not supported
Summary: [EMF+] StringFormat LineAlign is not supported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
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-23 02:44 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 StringFormat LineAlign set to 'Center' (496 bytes, image/x-emf)
2021-06-23 02:45 UTC, Valek Filippov
Details
Screenshot of the sample EMF file opened in LO 7.3alpha and MS Paint (7.73 KB, image/png)
2021-06-23 02:47 UTC, Valek Filippov
Details
Sample with all combinations of near/center/far for LineAlign and StringAlign (1.68 KB, image/x-emf)
2021-06-24 19:26 UTC, Valek Filippov
Details
How the sample with all combinations should look like (6.84 KB, image/png)
2021-06-24 19:27 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-23 02:44:12 UTC
Description:
LO seems to ignore LineAlign value of the EmfPlusStringFormat Object. 

Steps to Reproduce:
Open attached EMF sample.

Actual Results:
LO shows text string at the top of the filled rectangle.

Expected Results:
The string should be in the middle of the rectangle.


Reproducible: Always


User Profile Reset: No



Additional Info:
Minified from AOO i#74168
Comment 1 Valek Filippov 2021-06-23 02:45:39 UTC
Created attachment 173093 [details]
EMF sample with StringFormat LineAlign set to 'Center'
Comment 2 Valek Filippov 2021-06-23 02:47:18 UTC
Created attachment 173094 [details]
Screenshot of the sample EMF file opened in LO 7.3alpha and  MS Paint
Comment 3 Valek Filippov 2021-06-24 19:26:35 UTC
Created attachment 173181 [details]
Sample with all combinations of near/center/far for LineAlign and StringAlign

As per Bartosz request.
Comment 4 Valek Filippov 2021-06-24 19:27:39 UTC
Created attachment 173182 [details]
How the sample with all combinations should look like
Comment 5 Commit Notification 2021-07-01 21:50:55 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 6 Commit Notification 2021-07-02 10:51:25 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.