About a month or so ago, I finally took the plunge and finished converting the last of my Windows machines to an Ubuntu Linux machine (it's running the latest version, 9.04 - I can't remember its animal name). As part of my Linux migration strategy, I made it a point of having a Windows XP virtual machine set up. After all, Linux is great for some stuff, but let's face it - it's still a Windows world. The BlackBerry sync application and iTunes, for example, don't have Linux versions. And yes, there are a couple of iTunes-esque music players out there, but they don't have access to the iTunes Store, so THERE. And although there is a Linux-based version of Picasa, it so happens that that version does not allow you to upload videos. The Windows version does. So, Windows VM it is. And for those of you wondering why I chose the VM route as opposed to dual-boot, it's simple: I want to be able to easily switch between Windows and Linux and access files between the two.
My VM app of choice was Sun's VirtualBox. VirtualBox was a royal pain in the ass to get set up because of USB support issues (more on that on another post). In the end, with the help of a second pair of eyes, my VM was working as I wanted it. Mission accomplished!
So, back to the original point of this post. Yesterday night, I was working on my annual review self-evaluation form for work. It was due today, and I was procrastinating. The annual review form is in the form of an MS Word document, and is formatted with a bunch of tables. Since OpenOffice supports Word docs, I decided to edit the doc in OpenOffice, rather than fire up the XP VM. The template looked good on OpenOffice. You couldn't even tell that it wasn't MS Word. I was pleased. I finished my write-up in about an hour or so, and sent it out.
Now, I'm paranoid about attachments, and I decided to check the attachment to make sure that I had the right version of the attachment in the e-mail. When I opened the doc, from the e-mail, I discovered, to my absolute HORROR, that the document's formatting was completely screwed up! Some of the tables appeared to have completely disappeared, and the ones that were visible looked messed up. I decided to open up the doc from Nautilus to make sure that it wasn't an e-mail attachment thing. Same problem. I then copied my original template file and opened it in OpenOffice, saved it, exited, and went back in. Yup. OpenOffice corrupted that template. After freaking out for about 20 minutes or so, I decided to hit ctrl+A followed by ctrl+c so that I could paste the doc's contents into GEdit. It turned out that in spite of the fact that the formatting was garbled in OpenOffice, the content was still intact, albeit not formatted.
Just to be sure, I fired up my XP VM to see if the doc opened up properly in Word. Alas, 'twas not so. It was just as garbled (if not more) in MS Word. So I went through the PAINSTAKING task of creating a new copy of the ungarbled template and pasting the content from GEdit into the right spots. Not an easy task when the data aren't really arranged in tabular format (the problem with GEdit being just a text editor). It took me an hour and a half to restore my document. I ended up going to bed really late because of this, but at least my review form was completed.
The moral of this story: OpenOffice SUCKS at editing Word docs in native .doc format. Next time, I will just fire up my VM and save myself the hassle.
CodeSOD: An Enterprise API
22 hours ago