Bug 135796 - FILESAVE DOCX/DOC: Highlighting inside textboxes not exported with a odt to DOC/DOCX conversion
Summary: FILESAVE DOCX/DOC: Highlighting inside textboxes not exported with a odt to D...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: Highlight-Color Shape-ODF-OOXML-export
  Show dependency treegraph
 
Reported: 2020-08-16 09:53 UTC by Telesto
Modified: 2020-11-07 19:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file (8.36 KB, application/vnd.oasis.opendocument.text)
2020-08-16 09:54 UTC, Telesto
Details
attachment #164345 saved by Writer as docx (4.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-22 13:24 UTC, NISZ LibreOffice Team
Details
166628 saved by Word after adding highlight color (14.05 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-22 13:28 UTC, NISZ LibreOffice Team
Details
Second version of the example file in odt and docx (50.82 KB, image/png)
2020-10-22 13:37 UTC, NISZ LibreOffice Team
Details
Modified example file with shape containing highlighted text (9.77 KB, application/vnd.oasis.opendocument.text)
2020-10-22 13:38 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-16 09:53:51 UTC
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
Comment 1 Telesto 2020-08-16 09:54:24 UTC
Created attachment 164345 [details]
Example file
Comment 2 Telesto 2020-08-16 09:55:08 UTC
Adding bisect request.. to find the one who implemented it
Comment 3 NISZ LibreOffice Team 2020-10-22 13:23:48 UTC
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.
Comment 4 NISZ LibreOffice Team 2020-10-22 13:24:32 UTC
Created attachment 166628 [details]
attachment #164345 [details] saved by Writer as docx
Comment 5 NISZ LibreOffice Team 2020-10-22 13:28:29 UTC
Created attachment 166629 [details]
166628 saved by Word after adding highlight color
Comment 6 NISZ LibreOffice Team 2020-10-22 13:37:55 UTC
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...
Comment 7 NISZ LibreOffice Team 2020-10-22 13:38:54 UTC
Created attachment 166631 [details]
Modified example file with shape containing highlighted text
Comment 8 Aron Budea 2020-11-07 19:16:16 UTC
(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