Summary: | docx 16-color char highlight lost in round trip through odt format | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Luke Deller <luke> |
Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | minor | CC: | buzea.bogdan, jluth |
Priority: | lowest | ||
Version: | 7.0.0.3 release | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=131920 https://bugs.documentfoundation.org/show_bug.cgi?id=141228 |
||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | 131920 | ||
Bug Blocks: | 113731 | ||
Attachments: |
highlighting.docx
highlighting-via-odt.docx produced with LO 7.1.5.2 (linux x64 deb) |
Description
Luke Deller
2021-07-27 01:35:02 UTC
Created attachment 173871 [details]
highlighting.docx
I tested with version Version: 7.1.5.2 (x64) / LibreOffice Community Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5 CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: ro-RO (ro_RO); UI: en-US Calc: threaded No problem with any of the file. All of the versions have highlight. -<w:p> -<w:pPr> <w:pStyle w:val="Normal"/> -<w:rPr> <w:lang w:val="en-US"/> </w:rPr> </w:pPr> -<w:r> -<w:rPr> <w:lang w:val="en-US"/> </w:rPr> <w:t xml:space="preserve">Example of highlighting: </w:t> </w:r> -<w:r> -<w:rPr> <w:highlight w:val="yellow"/> <w:lang w:val="en-US"/> </w:rPr> <w:t>this text is highlighted yellow</w:t> </w:r> </w:p> Created attachment 173875 [details] highlighting-via-odt.docx produced with LO 7.1.5.2 (linux x64 deb) Thanks for testing BogdanB! I just retried the "steps to reproduce" from scratch to double check, and can still reproduce the issue (see new attachment highlighting-via-odt.docx) The build I am using is the Linux deb downloaded from libreoffice.org: Version: 7.1.5.2 / LibreOffice Community Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5 CPU threads: 16; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Some things to check to narrow down the difference: * This XML snippet in your comment is from highlighting-via-odt.docx produced at step 6, right? Are you sure the document was fully closed at step 4? * do you have the following setting: Tools -> Options -> Load/Save -> Microsoft Office -> Character Highlighting set to "Shading"? (This is the default when testing with a new empty profile) * My sample document highlighting.docx has an example of shading following the example of highlighting. Did you see that one come through correctly *not* as highlighting in the output? Confirm with Version: 7.1.5.2 / LibreOffice Community Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded How I tested? Very easy in 7.1.5 with Style Inspector. In the original document for the highlighted text we had: ------------------------- Char Highlight 16776960 Char Locale en-US And for the shading: Char Back Color 0xdddff Char Back Transparent false Char Locale en-US Char Shading Value 0 ------------------------- After step 7 we have: ------------------------- Char Back Color 0xffff00 Char Back Transparent false Char Locale en-US Char Shading Value 0 And for the shading: Char Back Color 0xdddff Char Back Transparent false Char Locale en-US Char Shading Value 0 ------------------------- So, this is a confirmation of the transformation of highlight into a shading. This is what the ODT file looks like: <style:style style:name="T2" style:family="text"> <style:text-properties fo:background-color="#ffff00"/> </style:style> <style:style style:name="T3" style:family="text"> <style:text-properties fo:background-color="#ddddff" loext:char-shading-value="0"/> </style:style> ODF doesn't (and hopefully never will) have a concept of a 16-color highlight character property. So not much can be done here unless someone does that evil thing. So, here should be given an idea how to achieve this or it's NotOurBug or WontFix. (In reply to Timur from comment #8) > So, here should be given an idea how to achieve this or it's NotOurBug or > WontFix. It probably comes automatically when depends-on bug 131920 is "fixed". So let's keep as Lowest. (In reply to Justin L from comment #7) > ODF doesn't (and hopefully never will) have a concept of a 16-color > highlight character property. So not much can be done here unless someone > does that evil thing. Which element did you feel was evil: supporting the concept of character highlighting as distinct from background shading, or the fact that Word only offers 16 choices for the highlight colour? I agree the limitation of colour choice is quite evil, probably a relic of the past. The same limitation used to exist elsewhere, eg table border colour was limited to 16 colours until MS Word 2000. However the concept of highlighting might have merit: I have seen it employed by Word users differently than background shading, with semantics matching a physical highlighter pen. Indeed the online Word documentation says: > Word contains many highlighters to make your text pop off the screen just > as if you were highlighting paper with a fluorescent marker ( from https://support.microsoft.com/en-us/office/apply-or-remove-highlighting-1747d808-6db7-4d49-86ac-1f0c3cc87e2e ) What do you think of adding a loext: (extension) attribute to persist the highlighting information that LibreOffice currently holds in memory in this case? I could maybe look at a patch for that if the concept sounds reasonable. (In reply to Luke Deller from comment #11) > Which element did you feel was evil: supporting the concept of character > highlighting as distinct from background shading Having two properties that do the exact same thing is atrocious. > However the concept of highlighting might have merit: Highlighting is exactly the same as character background shading - the only difference is that it is a separate property (with a separate tool in MSO) and is limited to 16-ish colours. Otherwise they are identical (other than implementation quirks like handling differently for number formatting and not being eligible for a character style). > What do you think of adding a loext: (extension) attribute to persist the > highlighting information that LibreOffice currently holds in memory in this > case? You already have the situation where a LO highlight edit will save as shading (although yes, there is a user setting for that). So MSWord users just need to learn that "paragraph shading" has nothing to do with paragraphs at all. The whole idea of maintaining compatibility MSO->ODF->MSO is rather too far fetched to merit any effort in order to support a horrible MSO "feature". |