Hello, reader!
As promised , I continue to test various document formats in MS Office 2010 and LibreOffice 3.5. During the writing of this post, I managed to check the odt and docx formats in my work - unfortunately, I was disappointed. But let's not get ahead; under the cut how these formats are processed in MSO and LO, as well as a small surprise for testers: how to automate the process of generating tests for such an unusual area as document formats.
Expectations
In the comments to the
previous post , as elsewhere on the Internet, they talked a lot about the docx and odt formats as replacing the old and (as it turned out) not very good doc. Talked a lot about the standard doc, remembered a lot about the quality of formulas in odt, it was a sin not to test these formats in action. To be honest, I expected that odt would open here and there without any problems, docx will show results worse than odt, but much better than doc. But dreams did not come true ...
Test Generator
I prepared the doc tests for about a day. According to the logic, I needed as much for docx and another day for odt. Three days to write the same tests, but in different formats! What programmer can it do? The basis of my idea is the following observation: if you save any components in odt under LO, they will not change when reopened in LO. This means that all the tests initially needed to be written in the odt format, then they only needed to be re-saved in the doc and docx formats, which would give us three tests instead of one. Fortunately, soffice has the --convert-to option, which I used for automation.
So, how to automate the creation of tests:
- We write all tests in odt
- We write a small sh to convert odt to any format.
converter.shsoffice --headless --convert-to $2 $1
- We write one more sh to automate the process of converting all available odt tests.
create.sh for i in `seq 12`; do cd $i; ../converter.sh "*.odt" doc; ../converter.sh "*.odt" docx; cd .. done
- Just in case, we write sh to remove all doc and docx
clean.sh for i in `seq 12`; do rm $i/*.doc* $i/*/*.doc*; rm $i/*.docx* $i/*/*.docx*; done;
')
As a result, we get a test generator from odt to doc and docx + completely rewritten tests for all three formats in one day!
In addition to the formats
New formats are good, but I did not forget about the requests of readers and added formulas and footnotes to the tests. As it turned out, things are not as bad as they said. Most of the components are displayed
correctly .
Also slightly changed the log. Added some statistics to find the most "good" format, which would be well displayed in most cases on both editors.
results
Pages
All formats work correctly with page sizes, their orientation, margins and borders. It is better not to use the background color of pages at all, as well as indents from borders (it is replaced by margins or indents of paragraphs).
Footers
If you need to specify the height of footers (in LO - interval) or add page numbers, then no problems in any of the formats will not arise. But here borders and side margins are not very well processed, tables in footers in docx format are just as poorly processed, they are deleted in LO (oddly, but even deleted they are visible in MSO).
Columns
There are no problems anywhere.
Paragraph
Indents, spacing, and alignment in all formats and editors are displayed in the same way, as are colors with different selections. Borders can also be used without fear, but you should forget about such exotic as vertical alignment relative to the baseline, MSO simply does not know about it. The parameters "Do not break a paragraph" and "Do not tear off from the next" are also correctly displayed in all formats and editors.
Characters
There are no problems except for two:
- You can forget about overwriting
- Hyperlinks are deleted when opening odt via MSO
Lists
All is well in doc and docx too. In odt offset lists are shifted.
Images
In short - use doc. There will be no problems with the images in your documents.
Tables
Similar to the previous paragraph - doc showed itself here as well.
Review
If you love odt, you can forget about portability! MSO removes all change data from a document without your consent.
Fields
It seems that everything is correct everywhere, but after long tests I came to the conclusion - do not use special fields in your documents (except for the number and number of pages, of course).
Formulas
Here docx out of competition. Excellent display of formulas and the ability to edit (though with left-sided indices is not very - they simply do not exist).
Footnotes
All formats proved to be good, only docx decided to use numbers with letter numbering of footnotes, but this is not terrible, is it?
My verdict
If you need a contract, a letter and similar business documentation, use doc. Both text formatting and various inserts (except for formulas) are perfectly handled.
Need to write a report, thesis or coursework? Use docx and you won't have any problems with formulas.
Do you have red eyes of a linuksoid and you are moving the cursor to the side “Don't like it” with thoughts - “odt forever !!!”? It is not my fault that odt showed itself worse than others. For some reason, all the odt files did not want to open normally in MSO and demanded "Recover Document". What it can be connected with - I don’t know, I created the documents by the rules, I didn’t arrange any dances with a tambourine over the used LO. Maybe it's in the version (I have LO 3.5)?