Bug 44498 - All OpenDocument files created with LibO 3.4 or 3.5 are considered as invalid by Microsoft Office
Summary: All OpenDocument files created with LibO 3.4 or 3.5 are considered as invalid...
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.5.0 Beta2
Hardware: All All
: medium blocker
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2012-01-05 09:18 UTC by William Gathoye
Modified: 2012-07-23 20:40 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Recovered ODT Writer document displayed in Word and Writer (362.76 KB, image/png)
2012-01-05 09:18 UTC, William Gathoye
Details
simple test document created by LO-3.5.0-beta2 that is considered as invalid by MS Office 2010 (8.55 KB, application/vnd.oasis.opendocument.text)
2012-01-06 05:56 UTC, Petr Mladek
Details
trivial test doc from LO master, ODF 1.1 (8.23 KB, application/vnd.oasis.opendocument.text)
2012-01-09 06:14 UTC, Michael Stahl (allotropia)
Details
test1.1, but changed all office:version from 1.1 to 1.2 (7.83 KB, application/vnd.oasis.opendocument.text)
2012-01-09 06:17 UTC, Michael Stahl (allotropia)
Details
same as previous, but removed the text:outline-style element (7.74 KB, application/vnd.oasis.opendocument.text)
2012-01-09 06:19 UTC, Michael Stahl (allotropia)
Details
same as previous, but add the manifest:version="1.2" attribute (7.80 KB, application/vnd.oasis.opendocument.text)
2012-01-09 06:21 UTC, Michael Stahl (allotropia)
Details
Untouched new ODT document created directly with Word 2010 (4.12 KB, application/vnd.oasis.opendocument.text)
2012-01-09 07:22 UTC, William Gathoye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Gathoye 2012-01-05 09:18:07 UTC
Created attachment 55177 [details]
Recovered ODT Writer document displayed in Word and Writer

All OpenDocument files created with LibO 3.4 or 3.5 are considered as invalid by Microsoft Office

The ODT documents I've created with LibO 3.4 and 3.5 are still considered as
invalid by Microsoft Office 2010. Word 2010 offers to recover the file content. If we let it do, most of the file content is recovered.
After saving the recovered document in Word (still as OpenDocument format), the
borders I had applied on titles and paragraphs are removed.
If I reopen this recovered document in Word, it's no more considered as invalid, but the borders have disappeared.


If I re-add the missing borders in Word and open again the document in LibO 3.4 or 3.5 or Word : the content is well displayed.
This feature is thus managed by Word.

If I save this document with LibO, Word considers it as invalid, but after a second recovery the borders are displayed in Word !


I reproduced this invalid behavior with .ODS, .ODP, .ODT, but not with .RTF.


Can someone confirm this problem with Microsoft Office 2007 SP2 (Microsoft Office 2007 can manage OpenDocument format only from the SP2) ?
Comment 1 Petr Mladek 2012-01-06 05:56:12 UTC
Created attachment 55214 [details]
simple test document created by LO-3.5.0-beta2 that is considered as invalid by MS Office 2010

I opened new document in Writer and just entered the word "Hello".
Comment 2 Petr Mladek 2012-01-06 06:05:33 UTC
It would affect many users => added to most annoying bugs.

William, it would be great if you could attach your more complex document with the borders and tables that is considered wrong by MS Office. I am afraid that there might be more incompatibilities that are not visible by the simple hello.odt.

If your document includes sensitive data, please remove most of it and replace the remaining strings with random words. We do not need the many elements repeated. For example, one table and one modified border should be enough to detect problems with them.
Comment 3 Michael Stahl (allotropia) 2012-01-06 06:33:58 UTC
i'm not sure this is an OOo/LO problem:

AFAIK MS Office only supports ODF 1.1, while OOo/LO write ODF 1.2 extended by default.

i don't have any MS Office around, can somebody check if it works when you set the ODF version to ODF 1.2 or ODF 1.1 in Tools->Options->Load/Save->General?

maybe MS Office thinks that any ODF document with a version > 1.1 is invalid, and we can't do anything about that.
Comment 4 Michael Stahl (allotropia) 2012-01-06 06:35:58 UTC
oh, forgot to mention that the ODF Toolkit validator says the attached hello.odt is valid ODF 1.2.
Comment 5 William Gathoye 2012-01-07 04:19:56 UTC
I've tried to change the ODF version. My conslusions are:

- 1.2 (non-extended) : non-managed by MSO 2010 (document still considered as invalid).
- used 1.0, 1.1 format option : MSO 2010 can read it, no invalid dialog displayed

But I don't know if this document is saved as 1.0 or 1.1 version. How can I use the ODF toolkit validator to see which version of ODF it is used?


Despite I saved the ODF file as 1.0 or 1.1 version, the borders I applied on paragraphs or titles are still missing when opened in MSO 2010.
Comment 6 Petr Mladek 2012-01-09 03:02:42 UTC
The .odt document is a zip archive. You might uncompress it. You might try to add the extension .zip instead of .odt. Or open it using an unzip application. Then you could check the included file 

I see 'manifest:version="1.2"' in META-INF/manifest.xml when the file is in the format 1.2.

I am not sure if this is the right and best way but it looks reasonable.
Comment 7 Petr Mladek 2012-01-09 03:06:32 UTC
The missing borders is a particular import/export problem. Please, open separate issue for this. I wonder if it has been solved last week as the bug 44322 and the bug 43862.
Comment 8 Michael Stahl (allotropia) 2012-01-09 04:07:20 UTC
the ODF Toolkit validator is now an Apache project:
http://incubator.apache.org/odftoolkit/conformance/ODFValidator.html

but the web service on the ODF Toolkit site doesn't seem to work;
Google found me this site, which does work:
http://odf-validator.rhcloud.com/

of course the validator has a command line interface as well,
so downloading the source is also an option;
there doesn't seem to be a binary download yet.

OOo and LO cannot actually save ODF version 1.0 files,
the oldest version is ODF 1.1.
but that shouldn't cause any problems in practice because
ODF 1.1 just adds some accessibility stuff that can just be ignored.
(in contrast, for ODF 1.2 there are some new and different ways
of doing things that would be unsupported by an ODF 1.0/1.1 reader).
Comment 9 Michael Stahl (allotropia) 2012-01-09 05:21:01 UTC
i just found that the ODF 1.1 schema has a bug:
there are several attributes in the 3.1.18 Document Statistics that are missing the meta: namespace prefix; this causes ODF 1.1 strict validation to spuriously fail with:
 unexpected attribute "meta:non-whitespace-character-count"
Comment 10 Michael Stahl (allotropia) 2012-01-09 06:14:38 UTC
Created attachment 55328 [details]
trivial test doc from LO master, ODF 1.1
Comment 11 Michael Stahl (allotropia) 2012-01-09 06:17:26 UTC
Created attachment 55329 [details]
test1.1, but changed all office:version from 1.1 to 1.2

this does not validate as ODF 1.2
Comment 12 Michael Stahl (allotropia) 2012-01-09 06:19:05 UTC
Created attachment 55330 [details]
same as previous, but removed the text:outline-style element

this removes un-necessary text:outline-style from the previous attachment,
which brings it a step closer to being valid ODF 1.2
Comment 13 Michael Stahl (allotropia) 2012-01-09 06:21:00 UTC
Created attachment 55331 [details]
same as previous, but add the manifest:version="1.2" attribute

only change is that this adds the ODF 1.2 required
manifest:version attribute,
and this now validates as ODF 1.2 (conforming).
Comment 14 Michael Stahl (allotropia) 2012-01-09 06:22:09 UTC
can somebody please test which of the 4 document i just attached are considered invalid by MS Office?
Comment 15 William Gathoye 2012-01-09 07:22:01 UTC
Created attachment 55334 [details]
Untouched new ODT document created directly with Word 2010
Comment 16 William Gathoye 2012-01-09 07:23:21 UTC
(In reply to comment #14)
> can somebody please test which of the 4 document i just attached are considered
> invalid by MS Office?

Well done for the idea of these tests :P

Only the 4th doc is considered as invalid by Word 2010.

I've just provided you an untouched ODT document I directly created from scratch with Word 2010. It will be helpful for you IMHO.

Regards.
Comment 17 Michael Stahl (allotropia) 2012-01-09 07:44:33 UTC
thanks, very interesting that the difference that makes MS Office
consider the document invalid is the manifest:version.

in ODF 1.2, the root element of the manifest has an attribute
manifest:version, which is mandatory and must have the value "1.2".

in ODF 1.1, this attribute does not exist.

in other words, there is no way anybody can write ODF 1.2 files
that are both valid and non-objectionable to MS Office 2010.

thus, resolving NOTOURBUG.
Comment 18 tester8 2012-01-11 11:22:58 UTC
>there is no way anybody can write ODF 1.2 files
>that are both valid and non-objectionable to MS Office 2010.

Ok. NOTOURBUG. But imagine user who doesn't know what the difference beetwen ODF 1.1 and 1.2, likely he doesn't know what is ODF (only .odt, etc.). He saves document and then this document can't be opened with MSO 2010. What he decided? "LO not working". I think in Tools->Options->Load/Save should be following

ODF format version
1.0/1.1 (compatible with MSO 2010)
1.2
1.2 Extended (recommended)

May be this option should be more noticeable, even as a question on first start.
Comment 19 Jacek 2012-01-11 23:35:54 UTC
This is a real LibOffice problem for me. I did some tests with writer from latest OOo release using three proposed ODF formats (1.0/1.1, 1.2, 1.2 extended). All saved documents are opened by Microsoft Word 2007 SP2.
I used the same formats with writer of LibOffice 3.4.4 and 3.5.0beta2. Only the documents saved following ODF 1.0/1.1 can be opened by Word. The documents saved following 1.2 and 1.2 extended are considered as invalid, but they are recupered correctly. As I exchange the documents with quite a lot of people, consideration of this issue as "NOTOURBUG" and "CLOSED" is discouraging for me. Sorry for saying that.
Comment 20 Michael Stahl (allotropia) 2012-01-12 02:46:14 UTC
the fact that OOo up to version 3.3 did not write the
manifest:version attribute was a bug:

https://issues.apache.org/ooo/show_bug.cgi?id=115789

the next release (as Apache OpenOffice) will have the fix for this included,
and now that it finally writes valid ODF 1.2, MS Office will claim that the documents it writes are invalid.  Microsoft's approach to implementing standards is discouraging to me.
Comment 21 Michael Meeks 2012-01-13 07:22:42 UTC
Here is the relevant ESC minute from our discussion yesterday:

* all docs created by LibO 3.4+ considered invalid by MS Office
        + we do the right thing: putting 1.2 in the manifest version (Thorsten)
                + recent bug-fix in a 3.4 CWS
        + ODF 1.2 makes the version mandatory, and must have value=1.2
        + if it is seen, MS Office will claim it is invalid.
        + it's not possible for us to write valid ODF 1.2 docs about
          which MS Office doesn't complain
                + MS Office offers to 'repair' & import it
                        + that looks scary.
                + it's not our bug
        + Need to release-note this:
                + avoid recommending the legacy 1.1 format due to
                  data loss concerns
Comment 22 vulcain 2012-01-15 13:18:25 UTC
Someone have send a mail to MS ?
I think if it will be better if it's an official people who send this mail and no a simple user. 
And a copy of this mail in this post could be a good idea. This post is open, MS could not say: we don't know.

If you ask me, i think we should wait. The goal of ODF is the interoperability. And the users of MS Office will be afraid of this advertisement and think ODF is not a good format.
Comment 23 Sebastian@SSpaeth.de 2012-06-03 03:08:11 UTC
I know this is not appropriate for a bug report. But... is there further information of what specific data loss can occur between odf 1.2 and odf 1.1? I am tempted to save docs as ODF 1.1 in order to remain compatible with my Office-using colleagues.

Any pointer would be appreciated, thanks
Comment 24 Eike Rathke 2012-06-06 14:22:27 UTC
@Sebastian:
An overview of changes is given at http://docs.oasis-open.org/office/v1.2/cs01/OpenDocument-v1.2-cs01-part1.html#__RefHeading__1420418_253892949
That, plus the entire OpenFormula specification of http://docs.oasis-open.org/office/v1.2/cs01/OpenDocument-v1.2-cs01-part2.html
However, MS-Office at least up to 2010 does not preserve spreadsheet formulas in ODF.
Comment 25 Adolfo Jayme Barrientos 2012-07-21 23:36:28 UTC
FWIW, MS Office 2013 (currently in beta) can open and edit ODF 1.2 files.
Comment 26 vulcain 2012-07-23 20:40:49 UTC
I confirm.
Resolved in MS Office 2013