On 09/02/2010 10:33 PM, Knut Olav Bøhmer wrote:
Hi,

I'm working with an activeX component that does not work when used with
larges files in OpenOfice.org. When it takes more then two seconds to save
the file, it does not work. When it is less then two seconds to save the
file, it works most of the time.

The activeX component enables a user of a website to edit a document on the
website through other applications like OpenOffice.org.
The activeX component downloads the file to a temporary directory, and
starts the application used to edit the component. Then it polls every 2
seconds to see if the file file is changed and if the application is still
running.

When OpenOffice.org saves the file, the activeX component dies, and the
result file is not saved back to the webserver.

To fix this I need to know how OpenOffice.org saves the file. Does it create
a temporary file, deletes the original file and then moves the temp file to
the original file.

OOo creates a temporary file, saves to it, truncates the original file and then streams the temporary file over it. This is the only way to preserve file access rights in every case.

Or maybe someone has any idea on why the activeX component fails (probably
difficult with so little information).

Maybe the component recognizes the truncation but can't deal with the fact that OOo is still writing to the file.

In general your attempt is very fragile. You should write an OOo extension that reacts on document events.

Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "nospamfor...@gmx.de".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to