Mathias Bauer wrote:

Matthew L. Avizinis wrote:



I am writing a macro in which I open other Writer text documents via
ftp either in a new frame or same frame as the currently open document.
I am using beta 1.9.100. I am using currently loadComponentFromURL()
and there are problems with opening the new document in read/write mode,
that is they tend to open read only (btw, this wasn't an issue in 1.1.4
and it has been suggested to me the perhaps it is now due to permissions
issues that are not addressed in the macro.



You should be more clear: do they get opened readonly *always*?
If yes: it could be a problem in OOo.
If no (means: only sometimes): I'm a little bit clueless.


Sorry about that.  Yes always.

If permission issues forced OOo to open the file "readonly" they should
have been present in OOo1.1.4 also. Hm, maybe the ftp content provider
was improved in OOo2.0 and now pays attention to this, but didn't do it
on OOo1.1.4? Have to check that.



Also I did not rewrite the macro much for the new beta except to
clean up a couple lines that do things that are apparently fixed in
the new version).



Sorry, I don't understand this.
Or should that only mean that you don't expect your macro being the
culprit? I don't expect that either (see above).


Not being an OOo programmer really yet still a logical person, you are correct again interpreting my possibly cryptic statement -- I don't expect it is the macro causing the behavior.



what, if any, methods are there to load/open files other than with
loadComponentFromURL()? And, if so, please give me example code, if
possible. I have looked through the SDK1.1 and haven't seen anything,
but there is so much material and there really isn't a good search
mechanism to go through it all and maybe I've missed something.



I don't think that anything like this will fix your problem. We should try to find out what's going wrong.



Here is the function code snippet edited for brevity:



( code snipped - looks OK to me )



Secondly and secondarily, if I create new regular Writer text documents
with a new extension, e.g. filename.gleim, how do I set up the
association within Oo such that whenever a file with that extension is
opened it will be recognized as of type .odt?



You don't need any special extension for this, OOo recognizes its own file types anyway. If you open an OOo file from the OOo file dialog it will be loaded correctly regardless which extension it has. Extensions are only a crutch for the Windows desktop.

But I assume that you found a problem in a particular use case I don't
see ATM. Can you explain where you want to see such a "recognition"?


Basically, what I set up in version 1.1.4 was that a set of .sxw and .xml (same content with differing formats) files is created on a server here in a user's sandbox. The first file is opened via a link in a browser window which is presented to the user. Once the file is opened, the toolbars and other menu functions of OOo have to be customized to restrict the user from using certain functions (because an XSLT export function I've written can't handle yet the objects those functions would insert in the document, but that's not relevant to this discussion). So I figured that if I changed the extension the interface could be made to automatically customize via an OOo configuration file when the user opens files of that type and still be OOo text documents.
What happens when the user is done editing the current file, there is a set of toolbar buttons also presented which are clicked to initiate macros that save (to the OOo format) and also export (to the xml format) the current document and then navigate OOo to the next, previous, or a designated document in the data set on the server.
So essentially, I have to issues which need to be resolved:
1) the ftp issue and
2) the file extension customization thing -- the current behavior in 1.1.4 stable is that Writer does not automatically recognize the extension and asks the user which type the file should be opened as.


I hope that improves the picture and I can give even more detail as you might need.
I sincerely appreciate your help with these issues as I'd like to be able to use version 2.0 as soon as possible for my users when it's released because of the many improvements it provides, not the least of which is simplification of the document structure needed for nested tables in Writer files.
I look forward to hearing from you again,
Matthew


Best regards,
Mathias



Reply via email to