Re: Subj: Problem controlling Writer remotely -- Please help
On Friday, August 16, 2013 15:34:02 Stephan Bergmann wrote: On 08/07/2013 02:16 PM, Lars Doelle wrote: Not sure I get your scenario right. What i want to do is to setup a TCP-server from within LibreOffice ... You can't do that with LibreOffice BASIC, but could do it with a LibreOffice extension written in some language that allows to spawn additional threads. [...] Ah, now I think I understand your original mail better---your problem with incompatible Python versions means you want to replace the URP communication between the two applications with something not using UNO. Exactly, this is the point. We're already using our own RPC stuff for outgoing communication and were using URP as a string tunnel for the incoming calls only because we didn't manage to get a server going from within BASIC. Thus the transport is asymmetric right now, which is not so nice from aesthetical point of view, but worked well so far. Now the URP stuff broke for some python embedded in a proprietary application, so its time to put things straight. In which case, forget what I wrote about --accept, and rather try to create an extension as outlined above. Stephan, thank you very much for your reply. Now i think it's clear for us, which way to go :^) Kind regards Lars ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Subj: Problem controlling Writer remotely -- Please help
Hi Stephan, thanks for your reply. Seeking a solution, i write to ask for help to this mail-list. Two solutions appear to be possible (in order of preference): 1) Use com.sun.star.connection.Acceptor to create a TCP-server within LibreOffice. Our problem is how to make this event-driven. Is is this possible at all? Not sure I get your scenario right. What i want to do is to setup a TCP-server from within LibreOffice that is able to read and send raw data over the wire using some Basic routine processing it in between. Now my question is how to use the LibreOffice-infrastructure best to create a TCP-server? Can it be done from Basic using the Acceptor interface at all? Should i better use a python-script, create a listening thread and then call the processing Basic-macro, or what else? If you want the LibreOffice (soffice) process to accept incoming connections, just start it with an --accept=... command line argument. (The resulting css.connection.Acceptor is running in its own thread then, to not block anything else while waiting for connections, see desktop/source/offacc/acceptor.{hxx,cxx}.) If you say above some '--accept=parameter' magic would already create a silly TCP-server that passes all connections accepted to some Basic routine for further read and write i would definitely love to learn more about this trick. Unfortunately, i didn't find any syntax or options for the 'parameter'. We're using --accept=socket,host=0,port=2002;urp;, but this implies UNO-marshalling, which we want to get rid of for reasons outlined in the original mail. Right now i hesitate to download the sources to check the file you've pointed me at, mainly because LibreOffice is so huge. If the acceptor.[ch]xx files really contain the relevant information for my purpose, please simply confirm, that this is the way to go. -- Lars ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Subj: Problem controlling Writer remotely -- Please help
Hi Stephan, thanks for your reply. Seeking a solution, i write to ask for help to this mail-list. Two solutions appear to be possible (in order of preference): 1) Use com.sun.star.connection.Acceptor to create a TCP-server within LibreOffice. Our problem is how to make this event-driven. Is is this possible at all? Not sure I get your scenario right. What i want to do is to setup a TCP-server from within LibreOffice that is able to read and send raw data over the wire using some Basic routine processing it in between. Now my question is how to use the LibreOffice-infrastructure best to create a TCP-server? Can it be done from Basic using the Acceptor interface at all? Should i better use a python-script, create a listening thread and then call the processing Basic-macro, or what else? If you want the LibreOffice (soffice) process to accept incoming connections, just start it with an --accept=... command line argument. (The resulting css.connection.Acceptor is running in its own thread then, to not block anything else while waiting for connections, see desktop/source/offacc/acceptor.{hxx,cxx}.) If you say above some '--accept=parameter' magic would already create a silly TCP-server that passes all connections accepted to some Basic routine for further read and write i would definitely love to learn more about this trick. Unfortunately, i didn't find any syntax or options for the 'parameter'. We're using --accept=socket,host=0,port=2002;urp;, but this implies UNO-marshalling, which we want to get rid of for reasons outlined in the original mail. Right now i hesitate to download the sources to check the file you've pointed me at, mainly because LibreOffice is so huge. If the acceptor.[ch]xx files really contain the relevant information for my purpose, please simply confirm, that this is the way to go. -- Lars ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[REPOST] Control elements in a partially formal document
Hi All, sometimes applications are used in way different from that they were originally designed for and this might be one of the cases. For reports on analysis in mechanics, libreoffice is connected to a FEM system (https://en.wikipedia.org/wiki/Finite_element_method), both to receive pictures and tables from it as well as to feed parameters mentioned in the document to it and to control (re)doing calculations. The overall contruction is a more common use and could loosely be described as a partial-formal document, i.e. one, in which certain parts have highly defined formal structure that could be described by means of data types together with operations on them. These parts are embedded in and distributed over the document. Now to my question. We're currently renew the application and i write to learn if new means to improve the user interface became available for this task. For now we're using the following elements: a) Menu entries to trigger actions b) The cursor position c) (I think) The right mouse button menu on frames around some pictures. What i'm looking for, are means for a more fine grane control. E.g. the formalized part of the document requieres certain rubrics, i.e. sections, subsections, etc. A user control element that could be of use with such would be: a) To be able to cheaply recognize that the cursor is in such title. b) To offer extra control, e.g. right mouse button menu c) to change the cursor or otherwise indicate special features. Some years ago, we looked over the full API for such opportunities, but found only the few currently used and some, too low-level IMHO, in the accessibility branch. As a related topic aside, i'm aware that the idea, that libreoffice has about the structure of a document becomes more weaker, the more one drives apart from raw layout. Technically, this general problem is well-addressed in XML via name spaces. Thus my second question about means to add to the documents idea of structure. Please, if i write to the wrong mail-list, help me to find the right one. Kind regards Lars Dölle ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Control elements in a partially formal document
Hi All, sometimes applications are used in way different from that they were originally designed for and this might be one of the cases. For reports on analysis in mechanics, libreoffice is connected to a FEM system (https://en.wikipedia.org/wiki/Finite_element_method), both to receive pictures and tables from it as well as to feed parameters mentioned in the document to it and to control (re)doing calculations. The overall contruction is a more common use and could loosely be described as a partial-formal document, i.e. one, in which certain parts have highly defined formal structure that could be described by means of data types together with operations on them. These parts are embedded in and distributed over the document. Now to my question. We're currently renew the application and i write to learn if new means to improve the user interface became available for this task. For now we're using the following elements: a) Menu entries to trigger actions b) The cursor position c) (I think) The right mouse button menu on frames around some pictures. What i'm looking for, are means for a more fine grane control. E.g. the formalized part of the document requieres certain rubrics, i.e. sections, subsections, etc. A user control element that could be of use with such would be: a) To be able to cheaply recognize that the cursor is in such title. b) To offer extra control, e.g. right mouse button menu c) to change the cursor or otherwise indicate special features. Some years ago, we looked over the full API for such opportunities, but found only the few currently used and some, too low-level IMHO, in the accessibility branch. As a related topic aside, i'm aware that the idea, that libreoffice has about the structure of a document becomes more weaker, the more one drives apart from raw layout. Technically, this general problem is well-addressed in XML via name spaces. Thus my second question about means to add to the documents idea of structure. Please, if i write to the wrong mail-list, help me to find the right one. Kind regards Lars Dölle ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice