Recent

Author Topic: Problems with OpenDocument  (Read 3228 times)

JD

  • Hero Member
  • *****
  • Posts: 1848
Problems with OpenDocument
« on: November 08, 2018, 04:07:15 pm »
Hi there everyone,

I just installed the OpenDocument package from the OPM because I want to generate Odt documents from code.

However I cannot get any of the examples to work because of a missing package called fpOdf.

How do I get round this problem?

Thanks a lot,

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Problems with OpenDocument
« Reply #1 on: November 08, 2018, 04:29:05 pm »

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Problems with OpenDocument
« Reply #2 on: November 08, 2018, 04:57:50 pm »
This one? https://github.com/dgaspary/fpOdf

I've seen that already. The package structure and contents is identical to the OpenDocument package which leads me to believe that the fpOdf is the old name for OpenDocument but the test examples STILL have a dependency on fpOdf and removing this dependency does not solve the problem either.  :o

Now it is missing an identifier "T" in odf_types.pas

JD
« Last Edit: November 08, 2018, 05:24:49 pm by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Problems with OpenDocument
« Reply #3 on: November 09, 2018, 06:14:48 pm »
Not sure but maybe that "T" should be "TElementType" ( %)?)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Problems with OpenDocument
« Reply #4 on: November 09, 2018, 06:26:22 pm »
I just cloned the git repo from the site given above, and got it to compile after fixing these:
  • Remove required package "stax"
  • Undefine UseStaxWriter in unit odf_xmlutils (the compiler will find it because the stax package is not found)
  • In odf_types, add unit LazFileUtils to uses.
After these changes I can run the demo OdtHelloWorld.

[EDIT]
The stax package is here: https://github.com/dgaspary/fpStax
After cloning fpStax and compiling it, the original fpOdf package can be compiled, too (LazFileUtils still has to be "used").
« Last Edit: November 09, 2018, 06:47:28 pm by wp »

 

TinyPortal © 2005-2018