Bug 104349 - FORMATTING: Text highlight color which differs from MS Office.
Summary: FORMATTING: Text highlight color which differs from MS Office.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Vitaliy
URL:
Whiteboard: target:5.4.0
Keywords: filter:docx
Depends on:
Blocks: DOCX
  Show dependency treegraph
 
Reported: 2016-12-02 10:56 UTC by Vitaliy
Modified: 2017-03-10 12:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of wrong highlighting (11.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-12-02 10:56 UTC, Vitaliy
Details
Comparison Word Viewer and LO (33.47 KB, application/unknown)
2016-12-02 12:32 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaliy 2016-12-02 10:56:00 UTC
Created attachment 129240 [details]
Example of wrong highlighting

Hello!

There is attachment with our problem. If a text have highlight of space chars and after it there is not a non-space char to end of the line then MS Office do not highlight it but Libreoffice do.
Comment 1 Telesto 2016-12-02 12:32:58 UTC
Created attachment 129249 [details]
Comparison Word Viewer and LO
Comment 2 Telesto 2016-12-02 12:33:29 UTC
Confirming.
Comment 3 Vitaliy 2016-12-02 12:57:27 UTC
Yes. This difference is problem of compatibility.
Comment 4 Buovjaga 2016-12-02 20:02:58 UTC
VA: does the file come from LibreOffice or MS Office?
Comment 5 Vitaliy 2016-12-05 06:29:37 UTC
The file was created in MSO but same for LO.
Comment 6 Vitaliy 2016-12-06 18:38:07 UTC
I want to support the project. I started to solve this problem.
Comment 7 Timur 2016-12-14 18:17:00 UTC
Good. I guess you're aware of Bug 64490.
Comment 8 Commit Notification 2016-12-21 09:02:47 UTC
Vitaliy Anderson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4a410dd147f7160c1d62e3e0b67388a178d5136c

tdf#104349 remove the difference between MSO and LO highlight chars

It will be available in 5.4.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 9 Mike Kaganski 2016-12-21 09:21:14 UTC
Is that really needs to be "fixed"???

This may be different with LO and MSO, but is our previous behavior wrong? Why should we not show the existing highlighting? Just because of some other software doesn't do that? Is there a specification somewhere with this requirement or a rationale for that? What if MS decides to change this tomorrow?
Comment 10 Vitaliy 2016-12-21 10:06:41 UTC
Yes. It is MS bug not LO. But it is big problem of migration to LO. If MS will change it their support will commit suicide when sees million emails with one question: why all our docs from 2003 to now became wrong displayed?

Same about LO migration problems. I often hear: "You have sent bad documents! It is not correctly displayed at the Word! Please correct it".

Ok. What we need? Buy Word? Use Google Docs? Not to do business with company which using MS Office?

Then what for LO exists?
Comment 11 Mike Kaganski 2016-12-21 10:28:05 UTC
(In reply to Vitaliy from comment #10)
> Yes. It is MS bug not LO.
> ...
> Then what for LO exists?

:) It exists e.g. to create and format documents.
But anyway, even if we decide that we must mimick Word's bugs, that doesn't mean that we may break *our* users' existing documents. So, I suggest you to do a follow-up commit that would add a compatibility flag that would allow old ODF documents to continue displaying the formatting, otherwise it looks like treating our users second-class citizens.
Comment 12 Mike Kaganski 2016-12-21 10:34:05 UTC
You may see an example of such a flag here: https://cgit.freedesktop.org/libreoffice/core/commit/?id=0cb200d000fad8ba31c7400e08cd031823f27308
Comment 13 Vitaliy 2016-12-21 11:23:33 UTC
(In reply to Mike Kaganski from comment #11)
> :) It exists e.g. to create and format documents.

It exists e.g. to create and format Libreoffice Edition documents? :)

Ok! What about Google Docs? They are doing as MS Office.

P.S.
Yes we can to create different versions of the same doc:
contract-LO.docx
contract-other.docx

Before sending we must to ask the company what is the document editor they are using. Also what is the flag of your LibreOffice package. Nice! What else? Version OS, Intel or AMD, Safari or FF, Oracle Java or Icedtea...

I guess millions of documents have created already and all editors must open it equally.
Comment 14 Mike Kaganski 2016-12-21 11:42:37 UTC
No-no-no. That's not OK to do like that. Your contribution solves your own problems, of course, but it makes e.g. my life harder. And if I relied on LO to behave that way for many years before, it is not your decision that should change that. I may feel OK to see all new documents to do it new way, but how can you require me to change my own multitude of documents because that's easier for you?

I don't stand against your contribution. But it's your part to change e.g. corporate standards to require all your employees to always create new documents, or to check if a checkbox is selected before sending, to mitigate your problems. You did create a way to handle this, don't make it something which will force others to create counter-commits.
Comment 15 Vitaliy 2016-12-21 11:59:11 UTC
Oh.. I see :) I add the flag some later.
Comment 16 Vitaliy 2016-12-21 12:39:24 UTC
Mike what about if I will add a checkbox of compatibility with viewing the MS Word docs in the open and new file dialogs? I guess it is a good way for both cases. (It can to remove in the future if most of documents will be to have one view)
Comment 17 Mike Kaganski 2016-12-21 12:59:36 UTC
Vitaliy: I suppose that it's not required to make such visible changes. It's OK if you just create the flag in the ODF, and that flag will be always set for each imported DOCs and each new ODF, but old ODF documents will not have it, so will continue to work as they were.

If you need an option to change that in existing document, then there is a compatibility page in Tools->Options for that.
Comment 18 Vitaliy 2016-12-21 13:05:52 UTC
Yes. You are right :) I will create the flag
Comment 19 Cor Nouws 2016-12-21 15:07:24 UTC
(In reply to Mike Kaganski from comment #9)
> Is that really needs to be "fixed"???
> 
> This may be different with LO and MSO, but is our previous behavior wrong?
> Why should we not show the existing highlighting? Just because of some other
> software [...]

If I may add: there is the do-as-if-I'm-a-typewriter-behavior of Word, that ignores spaces and tabs at the end of sentences (in many/all cases). Fun if you see what that does with documents where people were messing around in for example footers... ugh
Comment 20 jani 2017-01-16 07:04:30 UTC
Please do not set a bug to resolved before your patch has been merged to master

By setting it to resolved, the QA team will control it, which is lost time, since it is not available in the daily build
Comment 21 Commit Notification 2017-01-17 10:52:58 UTC
Vitaliy Anderson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7fa20da88a4778bdf20d6ca0491fe97ae03ab554

tdf#104349, tdf#104668 MS Word compatibility trailing blanks option

It will be available in 5.4.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 22 Commit Notification 2017-01-18 08:48:30 UTC
Vitaliy Anderson committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104349, tdf#104668 MS Word compatibility trailing blanks option part 2

It will be available in 5.4.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 23 Mike Kaganski 2017-01-18 14:54:15 UTC
The compatibility setting is currently duplicated in settings.xml: in view and in document-wide settings (as mst noticed in IRC). This should be addressed ASAP.
Comment 24 Vitaliy 2017-01-19 11:39:05 UTC
(In reply to Mike Kaganski from comment #23)
> The compatibility setting is currently duplicated in settings.xml: in view
> and in document-wide settings (as mst noticed in IRC). This should be
> addressed ASAP.

fixed by commit http://cgit.freedesktop.org/libreoffice/core/commit/?id=7667675397c98bb38cdd14dd689a32e9f8a986d3
Comment 25 Commit Notification 2017-02-15 12:18:12 UTC
Vitaliy Anderson committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104349, tdf#104668 MS Word compatibility trailing blanks option part 3

It will be available in 5.4.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.