Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

Preparing for the GSoC project, I wanted to decide what is an easy way
to test an import filter. Given that the new RTF filter will be in
writerfilter, testing docx import is a good example, I guess.

So opening a docx document and checking the visual result is one way,
though in case it goes wrong, I don't think it's helpful. One method is
to export to odt, AFAIK that's lossless. So here is what I tried (build
from master, I pulled and did an incremental build today):

- exporting to RTF (just to see the docx import part is fine):

$ ./soffice.bin --headless --convert-to rtf --outdir ../../../lo-test-files/writer 
../../../lo-test-files/writer/hello.docx
convert /home/vmiklos/git/libreoffice/lo-test-files/writer/hello.docx -> 
/home/vmiklos/git/libreoffice/lo-test-files/writer/hello.rtf using Rich Text Format

  That sounds OK.

- exporting to ODT:

$ ./soffice.bin --headless --convert-to odt --outdir ../../../lo-test-files/writer 
../../../lo-test-files/writer/hello.docx
convert /home/vmiklos/git/libreoffice/lo-test-files/writer/hello.docx -> 
/home/vmiklos/git/libreoffice/lo-test-files/writer/hello.odt using OpenDocument Text Flat XML
Error: Please reverify input parameters...

  That does not seem to work.

- export to "foo" (non-existing format):

$ ./soffice.bin --headless --convert-to foo --outdir ../../../lo-test-files/writer 
../../../lo-test-files/writer/hello.docx
convert /home/vmiklos/git/libreoffice/lo-test-files/writer/hello.docx -> 
/home/vmiklos/git/libreoffice/lo-test-files/writer/hello.foo using

  and in case I rename that .foo to .odt when I have the result in .odt.

Now I can live with this workaround, but I wanted to ask if this is the
best way to test import result, or you have something better. :)

(I already heard of the xml dumper for the rendered layout, is there
something similar for the internal document model?)

Thanks.

Attachment: pgpITsOpY_Yyp.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.