Bug 142948

Summary: DOCX align centered to margin is incompatible between Word (sometimes snap, usually bounding box) and Writer (snap)
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: libreoffice
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 120466    
Attachments: Examples centered in Word
The example file in Word and Writer side by side

Description Regina Henschel 2021-06-19 21:44:19 UTC
Created attachment 173021 [details]
Examples centered in Word

Open attached docx document in Word and in Writer. It has some shapes, which are horizontal aligned centered to margin. The red line marks the center. Compare the horizontal alignment between Word and Writer.

For most shape types, Word uses the bounding box, including fat strokes, shadow and callout extensions, and aligns the bounding box center with the page text area center.
For some shape types, Word uses the snap rectangle. That is the rectangle which has the handles to resize the object. I have found "chord", "arc", "pie" and "block arc", but there might exist more.
For some shape types, I do not see any rule, how Word centers the object, e.g. the shape type "half frame". The document contains a rotated "half frame".

LibreOffice uses the snap rectangle to position the object centered.

How should we handle this incompatibility? Change "center" to "from" on import and export? Or do nothing and inform the user, that this alignment type is incompatible? Where? Help or Wiki? Any other ideas?
Comment 1 NISZ LibreOffice Team 2021-06-21 06:48:11 UTC
Created attachment 173048 [details]
The example file in Word and Writer side by side
Comment 2 NISZ LibreOffice Team 2021-06-21 06:49:06 UTC
Confirming with:

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2a7e64da7f385de8dbba1802530e251cf29259fb
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL