Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1291

Writer • Re: Disable popups when OO thinks a document is corrupt

$
0
0
a .doxc
It's DOCX not DOXC.

The reason it thinks this is because I batch renamed them to .odt files (previously .doxc). I had to do this because, as you might know, you can't save over a .doxc directly, you can only "save as" a new file.
I want to make this clear right away. OpenOffice is not capable of saving in DOCX format! The programming required to do that does not exist in OpenOffice. You can try all the tricks you want, but OpenOffice will never create files in DOCX format because it can't. LibreOffice can save in that format. OpenOffice cannot. If you need to save in DOCX format you must use LIbreOffice.

OpenOffice is designed for ODT (Open Document Text) format files. When it writes an ODT file, it creates the content of the file in a specific way. OpenOffice can read (but not write) documents in DOCX format. The content of DOCX documents is completely different from the content of an ODT document.

Now let me explain what you did. You opened the DOCX document. OpenOffice read it and allowed you to use Writer. Then you told Writer to save it as an ODT document. Writer created the file the way an ODT document is structured. Next you changed the extension from ODT to DOCX. This was very bad! The change to the name of the file was all that happened. The content of the document stayed in ODT format. So now you have a file which claims (via its extension) to have DOCX content, even though it actually contains ODT content. When you tell OpenOffice to read the mangled file it is confused. It is expecting the file to contain data as it would be structured for a DOCX document. It can't understand the expected content because that isn't what's in the file. So OpenOffice rightly tells you that the document is corrupt. The warning pop-up from opening a mangled file is appropriate and can't be disabled.

You should never change file extensions unless you fully understand what will happen, and based on your actions it is clear that you do not understand that. All operating systems have a setting, usually the default setting, to hide filename extensions. You should enable that option to prevent trouble like you created for yourself.

Yes, you can save over a .docx file directly.
Note that jaragon is using LibreOffice. OpenOffice cannot create documents in that format.

But if there's some reason you've been working in Word .docx format, you don't have to switch.
I say: good luck with that. Internally, LibreOffice always works with ODT content. When you open a DOCX document, LibreOffice has to translate that content to ODT content. Then when you save to a DOCX document, LibreOffice has to translate ODT content back to DOCX content. The two contents are structured differently. Some DOCX content has no exact equivalent in ODT. Some of the ODT content has no exact equivalent in DOCX. The basics are more-or-less the same, but more advanced formatting may be difficult to translate. LibreOffice does the best it can. But making repeated translations from/to DOCX is just asking for trouble. If you need to work reliably with documents in DOCX format, MS Office is the one and only product for you because it is designed to support that content directly, without translation.

Statistics: Posted by MrProgrammer — Thu May 30, 2024 1:54 am



Viewing all articles
Browse latest Browse all 1291

Trending Articles