Bug 115067 - (ODT --> DOCX) Non-breaking spaces vanish while in centered paragraphs
Summary: (ODT --> DOCX) Non-breaking spaces vanish while in centered paragraphs
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Vitaliy
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-01-17 11:58 UTC by Denis Yurashku
Modified: 2018-10-29 18:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Case of vanished non-breaking spaces (14.50 KB, image/png)
2018-01-17 12:01 UTC, Denis Yurashku
Details
Same case in another font (11.95 KB, image/png)
2018-01-17 12:57 UTC, Denis Yurashku
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Yurashku 2018-01-17 11:58:36 UTC
Description:
After I put non-breaking space (NBSP) into text, then I center it – NBSP vanishes (doesn't show up).

Steps to Reproduce:
1. Enter some text.
2. Put non-breaking space in it.
3. Center it.

Actual Results:  
Non-breaking space vanishes

Expected Results:
Non-breaking space shows up in its place.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: ru
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36 Vivaldi/1.95.1064.3
Comment 1 Denis Yurashku 2018-01-17 12:01:22 UTC
Created attachment 139146 [details]
Case of vanished non-breaking spaces

I've put nbsp between "с" and "16" and between "по" and "31".
Comment 2 Mike Kaganski 2018-01-17 12:30:32 UTC
Cannot reproduce with Version: 6.0.0.2 (x64)
Build ID: 06b618bb6f431d27fd2def25aa19c833e29b61cd
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: 

Please attach a sample file. Maybe it's a font issue?
Comment 3 Denis Yurashku 2018-01-17 12:57:12 UTC
Created attachment 139149 [details]
Same case in another font

The same header with "Times New Roman".
Comment 4 Mike Kaganski 2018-01-17 13:23:55 UTC
http://youtu.be/xTuxqbm_QGs?hd=1 is a screencast. So - no matter how many screenshots you upload: without more details, or a document, it's not easy to reproduce.
Comment 5 Denis Yurashku 2018-01-17 15:06:46 UTC
I couldn't record, but I can refine the "Description".

This case has place when you export ODT into DOCX.

Steps to reproduce:
1. Enter some text.
2. Put non-breaking space in it.
3. Center it.
4. Save as ODT.
5. "Save As..." into DOCX. Use "Miscrosoft Word 2007-2013 XML".
6. Close Writer.
7. Open exported DOCX. Recover if needed. You'll see NBSPs as regular spaces.
8. Try to insert NBSP.
9. Voilà: they are vanished!
10. This conduct persists even if you export the document back to ODT. I.e. you can close it, open again, but NBSP are still vanished.
Comment 6 Mike Kaganski 2018-01-17 15:46:11 UTC
This is a bug. It is caused by compatibility option "MS Word-compatible trailing blanks" (see Options-LibreOffice Writer-Compatibility) - see bug 104349 and bug 104668.

CCing the setting implementation's author. Vitaliy, could you please take a look?
Comment 7 Vitaliy 2018-01-17 16:15:14 UTC
Mike of course :) I`ll try to fix it in the near time
Comment 8 Vitaliy 2018-01-22 16:02:59 UTC
Bibisect isn't needed. The regression in my patch:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=1c1747ac13a9d895df0fcba2fbb1bd266dccd74b

Steps to repro:
1. Just enable the compatibility option "MS Word-compatible trailing blanks"
2. Center your text with nbps spaces

I am working on fixing the problem
Comment 9 Commit Notification 2018-04-20 17:44:08 UTC
Vitaliy Anderson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0be3db28a4db4d2c81a5cb2edd48711eec55b51b

tdf#115067: We need to differentiate NBSP blank portions

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Xisco Faulí 2018-05-29 09:32:42 UTC
A polite ping to Vitaliy:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 11 Vitaliy 2018-05-29 09:58:04 UTC
Oh sorry! Yes the bug is fixed. Close it.