Description: FILESAVE DOCX/DOC: Highlighting inside textboxes not exported odt to DOCX conversion Steps to Reproduce: 1. Open the attached file 2. Save as DOCX/DOC 3. File reload This strange. If you save ODT to DOC there will be no highlighting. If you edit the doc with Word & save there is highlighting on import. If you edit the highlighting inside the textbox & save it works too. Highlighting in textboxes is supported for ODT since 4.4. Looks like an implementation error Actual Results: Notice there is no highlighting Expected Results: Highlighting Reproducible: Always User Profile Reset: No Additional Info: Version: 7.1.0.0.alpha0+ (x64) Build ID: <buildversion> CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
Created attachment 164345 [details] Example file
Adding bisect request.. to find the one who implemented it
Confirming with: Version: 7.1.0.0.alpha0+ (x64) Build ID: e0c72e31c1d455c26110c35e8780d420e17cdea6 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: CL This is an editeng textbox, upon exporting it there is this in the xml: <w:txbxContent> <w:p> <w:pPr> <w:bidi w:val="0"/> <w:rPr/> </w:pPr> <w:r> <w:rPr/> <w:t>sdsd</w:t> </w:r> </w:p> </w:txbxContent> If the saved version is edited in Word, it puts out correctly the tag (I used green highlight): <w:txbxContent> <w:p w:rsidR="00EE2C44" w:rsidRDefault="002529E3"> <w:r w:rsidRPr="00D85E2D"> <w:rPr> <w:highlight w:val="green"/> </w:rPr> <w:t>sdsd</w:t> </w:r> </w:p> </w:txbxContent> This is also retained by Writer on a new save, but this is now a Writer frame, so probably a bit different part of export core too.
Created attachment 166628 [details] attachment #164345 [details] saved by Writer as docx
Created attachment 166629 [details] 166628 saved by Word after adding highlight color
Created attachment 166630 [details] Second version of the example file in odt and docx Inserting a shape, adding textbox, adding text and highlighting it also saves correctly. Interesting...
Created attachment 166631 [details] Modified example file with shape containing highlighted text
(In reply to Telesto from comment #2) > Adding bisect request.. to find the one who implemented it If the question was when the highlight color in the sample was imported, it started with the following commit. However, at this point I see no way to set highlight color in the text box itself. https://cgit.freedesktop.org/libreoffice/core/commit/?id=3350fabd23859eb5fdbe77c6db9248866d4e2995 author Miklos Vajna <vmiklos@collabora.co.uk> 2014-06-30 13:46:04 +0200 committer Miklos Vajna <vmiklos@collabora.co.uk> 2014-07-01 13:30:12 +0200 SwXAutoStyle::GetPropertyValues_Impl: fix handling of CharAutoStyleName
Dear Telesto, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
When saving a DOCX file with highlighted text in LibreOffice 24.8.2, the color is displayed in Word 2010, but colors from LibreOffice's palette cannot be removed using Word's highlighting function. This is because LibreOffice uses the <w:shd> tag for shading, while Word relies on the <w:highlight> tag. Mybe to make this work correctly, LibreOffice should convert its color palette into Word's supported highlight colors and assign appropriate names. Test Result: I tested replacing the shading XML line manually in the file saved in LibreOffice, and the highlighting worked correctly in Word 2010. XML Example: LibreOffice Output: <w:rPr> <w:highlight w:val="none"/> <w:shd w:fill="FCFF2F" w:val="clear"/> </w:rPr> Word 2010 Output: <w:rPr> <w:highlight w:val="yellow"/> </w:rPr> Differences: LibreOffice uses <w:shd> for shading, while Word uses <w:highlight> for highlighting. Colors from LibreOffice's palette need to be converted into Word's predefined colors to ensure they can be applied and removed correctly in Word 2010. List of Supported Colors in Word 2010: 1 - yellow 2 - green 3 - cyan 4 - blue 5 - red 6 - magenta 7 - black 8 - darkGray 9 - lightGray 10 - turquoise 11 - pink 12 - orange 13 - dark Green 14 - dark Blue 15 - dark Red 16 - none (no highlight)
Additional Information: It appears that LibreOffice uses the "Shading" option from the "Paragraph" settings to apply background colors (via the <w:shd> tag), which is not recognized by Word as a proper text highlight. Word relies on the "Highlight" function, which is part of the "Font" settings, and uses the <w:highlight> tag to apply color to text. In LibreOffice, the color applied through "Shading" does not translate directly into Word’s highlight color, causing the text to display a background color rather than being properly highlighted. Therefore, it’s necessary for LibreOffice to convert these shading colors to Word’s predefined highlight colors when exporting to DOCX, ensuring compatibility and correct functionality in Word. Test Scenario: When I manually replace the <w:shd> tag in a LibreOffice-exported DOCX file with the appropriate <w:highlight> tag (matching Word’s supported highlight colors), the text highlight appears correctly in Word 2010. This suggests that LibreOffice needs to implement a conversion between its shading colors and Word’s highlight palette to ensure proper display and functionality of text highlights.
(In reply to Дмитрий from comment #11) For a more detailed review of the specification, I referred to the ISO/IEC 29500-1:2016 standard. It contains two sections (17.3.2.15 highlight (Text Highlighting) and 17.18.40 ST_HighlightColor (Text Highlight Colors)) that define the file structure for text highlighting. The specification is publicly available and can be accessed at the following address: https://standards.iso.org/ittf/PubliclyAvailableStandards/c071691_ISO_IEC_29500-1_2016.zip