quick search:
 

Using ExternalEditor with OpenOffice - extending EE to use webdav

Submitted by: enno
Last Edited: 2004-10-14

Category: CMF

Average rating is: 4.33 out of 5 (3 ratings)

Description:
I was trying to use OpenOffice with the Zope ExternalEditor. ExternalEditor downloads the OOo file from the zope site, then runs soffice.exe, waits for it to finish, and if I've edited the file, copies it back to my zope site. That would be nice, but doesn't work:

The soffice.exe process forks and then detaches itself, so ExternalEditor doesn't know when you're finished editing. Other programs have command line switches to stop that detaching - OOo does not.



Source (Text):
I've put the source files on my web page, because the changes are a bit more extensive.

Explanation:
OOo can do Webdav natively, so I cooked up a webdav option for ExternalEditor.
Here's the files I changed (based on the 2003-1103 version 0.7 of ExternalEditor):

http://eressea.upb.de/~enno/plone/zopeedit.py
I made some changes to make it possible to pass webdav urls to a plugin.

http://eressea.upb.de/~enno/plone/__init.py__
This file goes in the plugins/ directory and adds 'import soffice' to the list of imports.

http://eressea.upb.de/~enno/plone/soffice.py
This file goes in the plugins/ directory. it's the plugin that starts openoffice (hard-coded executable names in here).

In addition, I had to hack ExternalEditor/ExternalEditor.py to send me a url that includes the webdav port (8070 on my server). This is something I'd like to do in a cleaner fashion:
http://eressea.upb.de/~enno/plone/externaleditor.txt


Comments:

OO only forks when already running by longsleep - 2004-10-14
> The soffice.exe process forks and then detaches itself, so 
> ExternalEditor doesn't know when you're finished editing. Other 
> programs have command line switches to stop that detaching - OOo 
> does not.

The openoffice application only forks when it already runs in background  (also when the quickstarter is active on windows) .. When no openoffice runs in background when ExternalEditor works fine without additions.

-- longsleep
 
Re: OO only forks when already running by enno - 2004-10-14
Problem is that ExternalEditor cannot really know that. 
Plus, on Windows the installation process sets up a "QuickStart" 
task, so soffice gets started with windows and all subsequent 
executions will terminate right away.