Bug 158409 - FILEOPEN: RTF field results do not respect current character properties
Summary: FILEOPEN: RTF field results do not respect current character properties
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords:
Depends on:
Blocks: RTF-Fields
  Show dependency treegraph
 
Reported: 2023-11-28 07:25 UTC by Vasily Melenchuk (CIB)
Modified: 2024-02-07 21:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample RTF file (103 bytes, application/msword)
2023-11-28 07:25 UTC, Vasily Melenchuk (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily Melenchuk (CIB) 2023-11-28 07:25:56 UTC
Created attachment 191070 [details]
Sample RTF file

RTF filter on import is using default style font or current style font instead of current inline font for field name and field results.

Attached testcase is demonstrating given problem: field text result is 36pt instead of expected 8pt (like in MS Word).

Seems deduplication of props is missing for fields.
Comment 1 Commit Notification 2024-02-06 12:27:12 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1b0b11db497f76faf576d28e11860c3502f8deb2

tdf#158409: RTF import: use current run props for fields

It will be available in 24.8.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 2 Xisco Faulí 2024-02-06 15:51:19 UTC
Verified in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 94f0744648539f1dc4efd42ea55a1e533364ff07
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Vasily, thanks for fixing this issue!!
Comment 3 Commit Notification 2024-02-06 15:51:37 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#158409: RTF import: use current run props for fields

It will be available in 24.2.1.

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.