PDA

View Full Version : OpenOffice file to QTextEdit (Unzip Problem)



patrik08
25th November 2006, 11:59
I have rewrite a xslt ( Extensible Stylesheet Language Transformations )
to convert the content.xml from a openoffice file to html
http://ppk.ciz.ch/format/xslt/sxw2xhtml_pulitzer_cms.xsl
is running ok test folder result http://ppk.ciz.ch/format/openoffice_test/ convertet on qt4 application http://sourceforge.net/projects/visual-xsltproc/ ....

But now how i can unzip filename.sxw to a tmp folder on qt...? to convert & read on QTextEdit..?

on a shell i make
mv filename.sxw filename.zip && unzip filename.zip

wysota
26th November 2006, 09:29
The obvious way is to use some library that uncompresses zip files (can libz handle that? maybe...).

patrik08
26th November 2006, 12:20
The obvious way is to use some library that uncompresses zip files (can libz handle that? maybe...).

I found http://osdab.sourceforge.net/ but decompress all normal zip but no swx (openoffice) error say unsupported format ... same if i rename to zip...
I search on openoffice site .... required lib to build openoffice ....
http://www.openoffice.org/FAQs/build_faq.html zlib-1.2.1 ....
How i can discover zlib format from file?

wysota
26th November 2006, 17:57
How i can discover zlib format from file?
What do you mean by that?

patrik08
27th November 2006, 08:36
What do you mean by that?

Discover zip archive version or this here... how find it?

PKZIP signatures:
PK\3\4 local file header
PK\6\8 archive extra data record
PK\1\2 central file header
PK\5\5 digital signature header
PK\6\6 ZIP64 end of central directory record
PK\6\7 ZIP64 end of central directory locator
PK\5\6 end of central directory record

wysota
27th November 2006, 09:35
I still don't understand, maybe others do...

patrik08
27th November 2006, 10:32
I still don't understand, maybe others do...

I found a super running unzip & zip qt libs....
http://quazip.sourceforge.net/

and this lib can read & open openoffice & normal pkzip file.....

insert to http://www.qtcentre.org/component/option,com_weblinks/catid,23/Itemid,23/
why? is running on all os.....