The case of vim and vimdiff is different. That way the application is able to know the way it has been called(in c/c++ you can use argv[0] to do that), but in the case of openoffice, the binary is called in the same way and no special parameters are passed to it.