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.<div>
<br><div><div class="gmail_quote">2012/3/26 Michael Meeks <span dir="ltr"><<a href="mailto:michael.meeks@suse.com">michael.meeks@suse.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Mon, 2012-03-26 at 13:12 +0200, khagaroth wrote:<br>
> LO can open WPS (Woks) files just fine. Don't know if it handles<br>
> Chines glyphs in WPS, but the English and Czech files I tried opened<br>
> and displayed correctly.<br>
<br>
Sure - so see the 'libwps' module with the parser for that.<br>
<div class="im"><br>
> > On Mon, Mar 26, 2012 at 03:17:19PM +0800, huqitu du <<a href="mailto:huqitu@gmail.com">huqitu@gmail.com</a>> wrote:<br>
> > The DLL function is when LO open a .wps file(this file format is very<br>
> > common in china and not supported in LO yet)<br>
<br>
</div> It's quite hard to build libreoffice without wps support ;-) but<br>
perhaps there is something unusual about the chinese files / encodint /<br>
glyphs that breaks autodetection and/or load.<br>
<br>
I'd play with libwps/src/conv/raw and the wps2raw or similar tool to<br>
see if you can work out what's happening in the underlying streams<br>
there.<br>
<br>
HTH,<br>
<br>
Michael.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="mailto:michael.meeks@suse.com">michael.meeks@suse.com</a> <><, Pseudo Engineer, itinerant idiot<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>内蒙古蒙科立公司<br>胡其图<br><a href="mailto:email%3Ahuqitu@gmail.com">email:huqitu@gmail.com</a><br>
</div></div>