How do I convert files created with SRC680 snapshot builds, prior to m64, to a current format?

From Apache OpenOffice Wiki
Jump to: navigation, search



How do I convert files created with SRC680 snapshot builds, prior to m64, to a current format?


Documents saved with SRC680 builds, prior to m64, cannot be opened by 2.0Beta or later. This especially applies to Writer documents. To be able to open them, files need to be coverted. Convert each file using the following procedure:

  1. Create a backup of the document.
  2. Rename the document to a file with the same name but an extensions that has the 2nd "o" replaced with a "d". For instance, test.oot becomes test.odt. For drawing documents, use the extension "odg". For templates,only the extension of drawing templates has to be changed to "otg".
  3. Unzip the sub documents "mimetype" and "META-INF/manifest.xml" from the document using an arbitrary zip tool.
  4. Within the unzipped "mimetype" and "META-INF/manifest.xml" files, replace all occurencies of "x-vnd.oasis.openoffice" with "vnd.oasis.opendocument".
  5. Add the "mimetype" file uncompressed to the document.
  6. Add "META-INF/manifest.xml" to the document.
  7. Load the document into OpenOffice.org and resave it.

For example, you have a file called 'test.oot' on Unix/Solaris. Use the following commands to convert the file:

$ cp test.oot test.odt
$ unzip test.odt mimetype META-INF/manifest.xml
$ mv mimetype mimetype.bak
$ sed -e"s/x-vnd\.oasis\.openoffice/vnd.oasis.opendocument/" mimetype.bak >mimetype
$ zip -0 test.odt mimetype
$ mv META-INF/manifest.xml META-INF/manifest.xml.bak
$ sed -e"s/x-vnd\.oasis\.openoffice/vnd.oasis.opendocument/" META-INF/manifest.xml.bak >META-INF/manifest.xml
$ zip test.odt META-INF/manifest.xml
$ [start OpenOffice.org, load file and save it again]

See also: 1.9 m65 Snapshot Release Notes

Personal tools