Summary: | FILEOPEN DOCX Shapes vertically aligned to line imported incorrectly | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | NISZ LibreOffice Team <libreoffice> |
Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | aron.budea, jluth, rb.henschel, telesto |
Priority: | medium | Keywords: | filter:docx |
Version: | Inherited From OOo | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=117692 https://bugs.documentfoundation.org/show_bug.cgi?id=125872 https://bugs.documentfoundation.org/show_bug.cgi?id=149234 https://bugs.documentfoundation.org/show_bug.cgi?id=149235 |
||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 120466 | ||
Attachments: |
Example file from Word
Screenshot of the original document side by side in Word and Writer to Line by Word "to Line by Word" exported as doc by Word |
Description
NISZ LibreOffice Team
2021-06-15 11:42:35 UTC
Created attachment 172905 [details]
Screenshot of the original document side by side in Word and Writer
Repro Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community Build ID: 239b4bb27fd8db26e8416045b3015688a8b1b0ae 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 This was never fine, though before 7.1 the positioning of the squares were a bit closer to Word's, from left to right, vertical positions were: mid, below, above; except in LO the differences were much larger. Probably not useful information. I see the error: The alignment is imported as "to Line of Text". But that means relative to a line in the geometrical meaning at top of the characters. We need "to Character" here, which means the total area of the characters. You can see the difference between "to Line of Text" and "to Character" in the red lines in the preview in the Position&Size dialog, if you use a huge font size, 48pt for example. And I see in the Position&Size dialog always the item "Top", where it should be "Top", "Center", "Bottom". But that is likely an error of the dialog. The dialog doesn't open at all in my build, but LO crashes. I'll test whether current daily will crash too. Created attachment 173997 [details]
to Line by Word
I see a large confusion in the import/export code in regard to vertical alignment.
Our text:RelOrientation::Char corresponds to ooxml docx alignment "to Line".
Our text:RelOrientation::TEXT_LINE does not exists in ooxml docx, but belongs to the binary doc-Format.
Open attachment "to Line by Word" in Word and save it as doc. You will notice how Word changes the alignment to that one available in doc-Format. If you then open the doc file and save it as docx in compatibility mode and reopen that, you get an alignment, which differs from the original docx document.
Our code needs to not only distinguish between docx and doc, but between ooxml docx, and compatibility mode docx to produce similar rendering. "Bottom relative to Line" is different between ooxml docx, and compatibility docx, for example.
Created attachment 173998 [details]
"to Line by Word" exported as doc by Word
|