Re: where can I load windows DLL file
I have finished the work, and thank you a lot. by the way, I did it by rewrite the DLL's function to the filter model, and when LO open a abc.wps file will invoke my translate function. 2012/3/27 huqitu du huq...@gmail.com I don't need detect the file format, I only need to know the file extension name and if it is .wps(for example abc.wps) when open file then lets my DLL function( the function can translate the wps file into LO file format) handle it, and the function will make a new file named .odt( for example abc.odt) and let's LO reopen the abc.odt file, that's all. 2012/3/26 Michael Meeks michael.me...@suse.com On Mon, 2012-03-26 at 13:12 +0200, khagaroth wrote: LO can open WPS (Woks) files just fine. Don't know if it handles Chines glyphs in WPS, but the English and Czech files I tried opened and displayed correctly. Sure - so see the 'libwps' module with the parser for that. On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du huq...@gmail.com wrote: The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet) It's quite hard to build libreoffice without wps support ;-) but perhaps there is something unusual about the chinese files / encodint / glyphs that breaks autodetection and/or load. I'd play with libwps/src/conv/raw and the wps2raw or similar tool to see if you can work out what's happening in the underlying streams there. HTH, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot -- 内蒙古蒙科立公司 胡其图 email:huq...@gmail.com -- 内蒙古蒙科立公司 胡其图 email:huq...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet), the DLL convert the .wps file into .odt format and open it. 2012/3/23 Tor Lillqvist t...@iki.fi I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. OK. Then you need to look into customization of LO using some extension and modification of the configuration so that what you say happens. I have no idea how to do that, let's hope somebody else follows up. You probably have a bit too optimistic view of how easy it is going to be... be warned that you will have to read into quite a lot of documentation, do a lot of experimentation, etc. Can you tell *why* you want to do this, by the way? What is the high-level goal? We might be ableto tell you better ways to achieve the same end result. Or, in case there is some reason for your users to want to avoid your code being called when they open a document, tell you how easy it will be for users to circumvent your attempts... --tml -- 内蒙古蒙科立公司 胡其图 email:huq...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du huq...@gmail.com wrote: The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet), the DLL convert the .wps file into .odt format and open it. So if you already have a parser for it, why don't you add it as an LO import filter properly? ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
LO can open WPS (Woks) files just fine. Don't know if it handles Chines glyphs in WPS, but the English and Czech files I tried opened and displayed correctly. On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du huq...@gmail.com wrote: The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
On Mon, 2012-03-26 at 13:12 +0200, khagaroth wrote: LO can open WPS (Woks) files just fine. Don't know if it handles Chines glyphs in WPS, but the English and Czech files I tried opened and displayed correctly. Sure - so see the 'libwps' module with the parser for that. On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du huq...@gmail.com wrote: The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet) It's quite hard to build libreoffice without wps support ;-) but perhaps there is something unusual about the chinese files / encodint / glyphs that breaks autodetection and/or load. I'd play with libwps/src/conv/raw and the wps2raw or similar tool to see if you can work out what's happening in the underlying streams there. HTH, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
I don't need detect the file format, I only need to know the file extension name and if it is .wps(for example abc.wps) when open file then lets my DLL function( the function can translate the wps file into LO file format) handle it, and the function will make a new file named .odt( for example abc.odt) and let's LO reopen the abc.odt file, that's all. 2012/3/26 Michael Meeks michael.me...@suse.com On Mon, 2012-03-26 at 13:12 +0200, khagaroth wrote: LO can open WPS (Woks) files just fine. Don't know if it handles Chines glyphs in WPS, but the English and Czech files I tried opened and displayed correctly. Sure - so see the 'libwps' module with the parser for that. On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du huq...@gmail.com wrote: The DLL function is when LO open a .wps file(this file format is very common in china and not supported in LO yet) It's quite hard to build libreoffice without wps support ;-) but perhaps there is something unusual about the chinese files / encodint / glyphs that breaks autodetection and/or load. I'd play with libwps/src/conv/raw and the wps2raw or similar tool to see if you can work out what's happening in the underlying streams there. HTH, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot -- 内蒙古蒙科立公司 胡其图 email:huq...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
Hello, Let me reply to this a bit more in length. On 27/03/12 02:45, huqitu du wrote: I don't need detect the file format, I only need to know the file extension name and if it is .wps(for example abc.wps) when open file then lets my DLL function( the function can translate the wps file into LO file format) handle it, and the function will make a new file named .odt( for example abc.odt) and let's LO reopen the abc.odt file, that's all. I assume that by WPS you mean Microsoft Works Wordprocessing file-format. For that one, LibreOffice has an import filter. If it is not the case, please specify what WPS means for you and we can investigate more. Since there is already a file-format that uses *.wps extension and that is handled by LibreOffice, detecting other unrelated file-format using the same extension cannot be made using the flat detection, aka extension only. You will have to first write a proper detection that will peek the file and unambiguously decide that it is a file your filter can handle. In general, having a filter that first converts a document into a temporary file and then loads the temporary file is not the best idea and it is indicated to avoid this as much as you can. We have one or two filters that work like this but it is purely because of licensing issues that they cannot be used in-process. Nevertheless, since your DLL as you say can produce a whole file in OpenDocument format, it should be reasonably easy to produce SAX messages in flat ODF format. There are helper functions inside LibreOffice that then allow to serialize such SAX messages and send then to LibreOffice importer interfaces. I would love to see where you code is located and can help you with advice how to integrate it. Nonetheless, if you are really writing converter for Microsoft Works, it would be the best to simply contribute to libwps instead of duplicating the work. Cheers Fridrich ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
I want to load some DLL files when Open File, how can I do this, please help! That doesn't make any sense, DLL files are not documents that could be opened in LibreOffice (or Microsoft Office, for that matter). Anyway, this is the developer list. Please ask on a user list or forum. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. 2012/3/23 Tor Lillqvist t...@iki.fi I want to load some DLL files when Open File, how can I do this, please help! That doesn't make any sense, DLL files are not documents that could be opened in LibreOffice (or Microsoft Office, for that matter). Anyway, this is the developer list. Please ask on a user list or forum. --tml -- 内蒙古蒙科立公司 胡其图 email:huq...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. OK. Then you need to look into customization of LO using some extension and modification of the configuration so that what you say happens. I have no idea how to do that, let's hope somebody else follows up. You probably have a bit too optimistic view of how easy it is going to be... be warned that you will have to read into quite a lot of documentation, do a lot of experimentation, etc. Can you tell *why* you want to do this, by the way? What is the high-level goal? We might be ableto tell you better ways to achieve the same end result. Or, in case there is some reason for your users to want to avoid your code being called when they open a document, tell you how easy it will be for users to circumvent your attempts... --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
On Fri, 2012-03-23 at 11:09 +0200, Tor Lillqvist wrote: I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. Hi That is a fairly common request - if you would move it to ask.libreoffice.org site, likely a better place for user questions, you should receive help pretty rapidly. Thanks //drew OK. Then you need to look into customization of LO using some extension and modification of the configuration so that what you say happens. I have no idea how to do that, let's hope somebody else follows up. You probably have a bit too optimistic view of how easy it is going to be... be warned that you will have to read into quite a lot of documentation, do a lot of experimentation, etc. Can you tell *why* you want to do this, by the way? What is the high-level goal? We might be ableto tell you better ways to achieve the same end result. Or, in case there is some reason for your users to want to avoid your code being called when they open a document, tell you how easy it will be for users to circumvent your attempts... --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
Can you tell *why* you want to do this, by the way? What is the high-level goal? We might be ableto tell you better ways to achieve the same end result. Or, in case there is some reason for your users to want to avoid your code being called when they open a document, tell you how easy it will be for users to circumvent your attempts... The funniest way (for real hackers) would be to add your DLL to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs and use a DLL injection technique. You don't even need to modify a single line of LibreOffice. Unfortunately the protected process on Vista+ make this techinique a lot more difficult. -- Jesús Corrius je...@softcatala.org ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
On 23/03/12 09:28, huqitu du wrote: I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. perhaps the GlobalEventBroadcaster can help you, its OnNew and OnLoad events look interesting but i don't know when exactly they are sent, see: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Document_Events ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: where can I load windows DLL file
On Fri, 2012-03-23 at 11:51 +0100, Michael Stahl wrote: On 23/03/12 09:28, huqitu du wrote: I don't open DLL files, I invoke DLL's function. for example, when LO open a .txt file, my program(DLL function) handle something first and then let's LO process continue. perhaps the GlobalEventBroadcaster can help you, its OnNew and OnLoad events look interesting but i don't know when exactly they are sent, see: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Document_Events Yes those are fine, but it depends on whether you want this to happen for all documents or only specific documents. The user will need to declare the functions before they can be called - but this gets into which scripting language they prefer to use. Basic is sufficient for this, but some of course raise their noses to that. Anyway, this is a common, if not particularly frequent request, one not yet asked and answered on the libreoffice resource. //drew ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice