Bug 132372

Summary: EDITING DOCX: Consecutive spaces in table cell not ignored if they start at the beginning
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: buzea.bogdan, dgp-mail, nemeth
Priority: medium    
Version: 6.1 all versions   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103100    
Attachments: Example file from Word
Screenshot of the original document side by side in Word and Writer

Description NISZ LibreOffice Team 2020-04-24 07:09:36 UTC
Created attachment 159884 [details]
Example file from Word

If a table cells text is long, spanning multiple rows and centered, the line breaking behaves differently when it contains consecutive spaces: If they are between visible letters, they are hidden and have no effect on alignment.
But if they start the cell text, they are not hidden and are considered for alignment.

The hiding results in consistent behavior with Word, which ignores the consecutive spaces when calculating alignment. 
Probably Writer should do the hiding of spaces even if they start the cell content.


Steps to reproduce:
    1. Open attached document

Actual results:
First tables text looks different than in Word, 

Expected results:
Similar behavior to Word, so that Word-made files layout can match.

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: 94a7ceae287a7967e8f013d012673e26637c6bb5
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Also happens in older versions way back to 3.5.0
Comment 1 NISZ LibreOffice Team 2020-04-24 07:09:53 UTC
Created attachment 159885 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Dieter 2020-04-29 11:38:51 UTC
I confirm it with

Version: 7.0.0.0.alpha0+ (x64)Build ID: 8c8b3a4f83f67882b284ddc3b3fe10d3fe6dedf4CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI-Language: en-GBCalc: CL
Comment 3 BogdanB 2022-01-27 20:55:31 UTC
REPRO in 7.4

Retested with
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 2f4f4cbeb8e50081d607b86b0475b93971c40ab8
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 4 QA Administrators 2024-01-28 03:13:59 UTC Comment hidden (obsolete)
Comment 5 Dieter 2024-05-05 15:59:17 UTC
Can't reproduce with

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
=> RESOLVED WORKSFORME