* * *

Author Topic: Problems with OpenDocument  (Read 452 times)

JD

  • Hero Member
  • *****
  • Posts: 1730
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 (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

wp

  • Hero Member
  • *****
  • Posts: 5056
Re: Problems with OpenDocument
« Reply #1 on: November 08, 2018, 04:29:05 pm »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

JD

  • Hero Member
  • *****
  • Posts: 1730
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 (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 821
    • 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: 5056
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 »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus