Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Changes #10

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6e96e46
Merge pull request #4 from dgaspary/master
joecare99 Oct 30, 2019
356d956
Merge pull request #5 from joecare99/master
joecare99 Oct 30, 2019
b1769e2
Included the "include-files"
joecare99 Oct 31, 2019
d6b6b84
Included the other projects
joecare99 Oct 31, 2019
a810877
Re-renamed FindStyle back to Find. (with refractoring)
joecare99 Oct 31, 2019
5e625ea
Documentation about Find method
joecare99 Oct 31, 2019
4f7554e
Excluded *.lps and *.bak from project (*.lps contain User-configurati…
joecare99 Oct 31, 2019
30fc043
New Demo-part Tabulators (to show AddTab)
joecare99 Oct 31, 2019
2b7d65a
Minor change in tst_fpOdfBasics.pas
joecare99 Oct 31, 2019
d43b8a7
Ignore: *.lps *.bak (explained before)
joecare99 Oct 31, 2019
3ac117a
ignore: *.lps
joecare99 Oct 31, 2019
df49cec
Merge pull request #6 from dgaspary/master
joecare99 Oct 31, 2019
df2c3eb
Merge branch 'master' into NewFeatures_1
joecare99 Oct 31, 2019
568cc20
Merge pull request #8 from joecare99/NewFeatures_1
joecare99 Oct 31, 2019
e5f9beb
Create Repo-Sync.yml
joecare99 Nov 11, 2019
3a53b46
Update Repo-Sync.yml
joecare99 Nov 11, 2019
5641b40
Merge branch 'master' into MasterChanges
joecare99 Nov 18, 2019
65dd9f3
Merge pull request #12 from joecare99/MasterChanges
joecare99 Nov 18, 2019
f0b2281
Merge pull request #13 from joecare99/MasterChanges
joecare99 Nov 19, 2019
79cb1c6
Merge pull request #14 from dgaspary/master
joecare99 Sep 5, 2020
1b44f5f
joecare99 Mar 23, 2021
da0ca9b
Merge pull request #15 from dgaspary/master
joecare99 May 5, 2021
7c3b016
Merge pull request #16 from joecare99/MasterChanges
joecare99 May 5, 2021
befa368
Add files via upload
joecare99 May 5, 2021
79bf8f7
Merged and reworked Changes (Image, Table, Tests)
joecare99 Jun 19, 2024
2f73e42
Merge pull request #17 from joecare99/Merge_Changes
joecare99 Jun 19, 2024
2722ae8
Create readme.md
joecare99 Jun 21, 2024
5ec5f76
Some example-images to show off the capabilities
joecare99 Jun 21, 2024
71c60b8
Merge pull request #18 from joecare99/Examples
joecare99 Jun 21, 2024
ed8a362
Update readme.md
joecare99 Jun 21, 2024
779dc85
Update README.md
joecare99 Jun 21, 2024
5a8269d
Update README.md
joecare99 Jun 21, 2024
c211ca1
Update readme.md
joecare99 Jun 21, 2024
4534be0
Small reworks
joecare99 Jun 21, 2024
e7a4a70
Merge pull request #19 from joecare99/Merge_Changes
joecare99 Jun 21, 2024
17ed1e7
Merge pull request #20 from joecare99/master
joecare99 Jun 21, 2024
635b951
More comments & documentation
joecare99 Jun 21, 2024
31cb49e
Merge pull request #21 from joecare99/Merge_Changes
joecare99 Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/Repo-Sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# File: .github/workflows/repo-sync.yml
name: Repo-Sync

on:
schedule:
- cron: "35 */3 * * *"
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: repo-sync
uses: repo-sync/github-sync@v2
with:
source_repo: "dgaspary/fpOdf"
source_branch: "master"
destination_branch: "MasterChanges"
github_token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.svn
/bin
/output
*.lps
*.bak
12 changes: 12 additions & 0 deletions FPdoc/improveddemo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
</element><element name="Execute"><short>Execute the demo. First write the chapters in separate files, then write all chapters in one file.</short>
</element><element name="Done"><short>Cleanup after the execution.</short>
</element>
<element name="COutout1"><short>Name of the first output-file (some styles)</short>
</element><element name="COutout2"><short>Name of the second output files (styles bookmarks and links)</short>
</element><element name="COutout3"><short>Name of the third output-file (fonts)</short>
</element><element name="COutout4"><short>Name of the fourth output-file (colors)</short>
</element><element name="COutout5"><short>Name of the fifth output-file (tabs)</short>
</element><element name="COutoutAll"><short>Name of the complete document with all parts</short>
</element><element name="cStyleName"><short>standard paragraph style-name</short>
</element><element name="COutPut"><short>Name of the output-directory</short>
</element><element name="Init.i"><short>iteration variable </short>
</element><element name="TextWithTabulators"><short>Generate a chapter of the document with a table created with tabulators.</short>
</element><element name="TextWithTabulators.RandomText"><short>Generate a random word with a given maximum length</short>
</element>
</module>
</package>
</fpdoc-descriptions>
52 changes: 52 additions & 0 deletions FPdoc/odf_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,58 @@
</element><element name="TBookMark"><short>BookMark is a point in the text the reader can jump to. (see also Hyperlink)</short>
</element><element name="TOdfTextDocument"><short>OdfTextDocument is the class to use to open, close &amp; modify OpenDocument-Files</short>
</element><short>fpOdf is a library used to help users to create and to modify OpenDocument Files (ODF)</short>
<element name="TOdfElement.Find"><short>Find is a general method to find named items when the name of the item is in the attributes</short>
</element><element name="TOdfTextDocument.Clear"><short>Erase all content and create a new document</short>
</element><element name="TOdfTextDocument.AddHeadline"><short>Add a heading of a given level </short>
</element><element name="TOdfContent.AppendText"><short>Appends a text to a content-block</short>
</element><element name="TOdfTextDocument.AddParagraph"><short>Append a new paragraph of a given style</short>
</element><element name="TOdfContent.AddSpan" link="TSpan"><short>Add a span to the paragraph</short><descr>A Span is a continuous part of the text with equal style.
</descr><seealso>TSpan
</seealso>
</element><element name="TOdfContent.AddLineBreak"><short>Appends a (manual) Line-break to the text.</short><descr>a <b>Line-break</b> stops the text at the current position in the line and continues the text at the start of the next line, but all in the same paragraph.
</descr>
</element><element name="TOdfParagraph.AddBookmark"><short>Adds a bookmark to the paragraph</short>
</element><element name="TOdfContent.AddLink"><short>appends a link (Hyperlink) to a bookmark</short>
</element><element name="TOdfContent.AddTab"><short>Appends a tabulator</short>
</element>
<element name="TOdfElement.CreateDomElement"><short>creates a DOM element of the specified type</short>
</element><element name="TOdfElement.GetElementType"><short>GetElementType returns the element type based on an index. </short>
</element><element name="TOdfElement.GetDocument"><short>the TOdfDocument associated with this element</short>
</element><element name="TOdfElement.CreateOdfElement"><short>creates an ODF element of the specified type</short>
</element><element name="TOdfElement.OdfGetElementType"><short>Returns the ODF element type for a given DOM element.</short>
</element><element name="TOdfElement.SameType"><short>Checks if two DOM elements have the same type.</short>
</element><element name="TOdfElement.SetAttribute"><short>Sets an attribute value for the parent element.</short>
</element><element name="TOdfElement.OdfGetFirstElement"><short>Returns the first child ODF element of the specified type.</short>
</element><element name="TOdfElement.SetOrDeleteAttributes"><short>Sets or deletes attributes based on the specified array. </short>
</element><element name="TOdfElement.SetAttributes"><short>Sets multiple attributes with corresponding values. </short>
</element><element name="TOdfElement.DeleteAttributes"><short>Deletes multiple attributes specified in the array. </short>
</element><element name="TOdfElement.RemoveAttribute"><short>Removes the attribute of the specified type.</short>
</element><element name="TOdfElement.HasAttribute"><short>Checks if the element has the specified attribute.</short>
</element><element name="TOdfElement.GetAttributeString"><short>Retrieves the attribute value as a string.</short>
</element><element name="TOdfElement.GetAttribute"><short>Retrieves the attribute of the specified type.</short>
</element><element name="TOdfElement.FindStyle"><short>Finds an ODF element with the given style name. </short>
</element><element name="TOdfElement.HasOdfElement"><short>Checks if the ODF element of the specified type exists. </short>
</element><element name="TOdfElement.FindOdfElement"><short>Finds and returns the first ODF element of the specified type.</short>
</element><element name="TTextSequenceDecls"><short>Defines a Delaration for a Text-sequence</short>
</element><element name="TConfigConfigItemSet"><short>Defines a set of Config-Config-items</short>
</element><element name="TConfigConfigItemSet.ConfigName"><short>the name of the config</short>
</element><element name="TOdfColor"><short>A color-record with three base-colors</short>
</element><element name="TOdfFont"><short>Font-definition for odf-files</short>
</element><element name="TOdfSection"><short>Section is collection of Paragraphes of the same formatting</short>
</element><element name="TDefaultStyle"><short>a text-style as default</short>
</element><element name="cCharSpace"><short>The space/blank character</short>
</element><element name="cNone"><short>the None-Tag</short>
</element><element name="cFileContent"><short>Name of the content-file</short>
</element><element name="cFileStyles"><short>name of the style-file</short>
</element><element name="cIsoDateFormat"><short>the date-format in the file</short>
</element><element name="cMetaGenerator"><short>the generator-name and version</short>
</element><element name="cUrnOpenDocument"><short>odf-namespace-definition</short>
</element><element name="cUrlOasis"><short>Url: Oasis</short>
</element><element name="cUriOffice12Meta"><short>url: Office</short>
</element><element name="cUriOdfMeta"><short>Url: Odf-Meta</short>
</element><element name="cUrlW3"><short>Url: W3</short>
</element><element name="cOwnerAttr"><short>The 'Owner' attribute</short>
</element>
</module>
</package>
</fpdoc-descriptions>
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
fpOdf
=====

A library to help freepascal developers to generate and perform modifications to ODF(OASIS OpenDocument) files.
A library to help freepascal developers to generate and perform modifications to ODF(OASIS OpenDocument) files.<br/>

[Show off (Examples)](examples)
--------
<img width="200" src="Resources/ShowStyles.PNG"><img width="200" src="Resources/ShowImage.PNG"><img width="200" src="Resources/ShowLinks.PNG"><br/>
<img width="600" src="Resources/ShowColor.PNG"><br/>
[[Demo.pdf]](Resources/AllParts.pdf) and [[German Demo Familybook[pdf]]](Resources/Muster_GEDCOM_UTF-8.pdf)
Binary file added Resources/AllParts.pdf
Binary file not shown.
Binary file added Resources/BoldText.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions Resources/BoldText.fodt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" Owner="22503072" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"><office:meta xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"><meta:creation-date>2021-03-23T19:45:47</meta:creation-date><meta:generator>fpOdf 0.1</meta:generator>
</office:meta><office:settings/><office:scripts/><office:font-face-decls><style:font-face style:name="Liberation Mono" svg:font-family="'Liberation Mono'" style:font-family-generic="modern" style:font-pitch="fixed"/><style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans Narrow" svg:font-family="'Liberation Sans Narrow'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
</office:font-face-decls><office:styles><style:default-style style:family="paragraph"><style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.25095cm" style:writing-mode="page"/><style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
</style:default-style><style:style style:name="Standard" style:family="paragraph"/>
</office:styles><office:automatic-styles><style:style style:name="TA0" style:family="text"><style:text-properties/>
</style:style><style:style style:name="TA1" style:family="text"><style:text-properties fo:font-weight="bold"/>
</style:style><style:style style:name="TA2" style:family="text"><style:text-properties fo:font-style="italic"/>
</style:style><style:style style:name="TA3" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic"/>
</style:style><style:style style:name="TA4" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA5" style:family="text"><style:text-properties fo:font-weight="bold" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA6" style:family="text"><style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA7" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA8" style:family="text"><style:text-properties style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA9" style:family="text"><style:text-properties fo:font-weight="bold" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA10" style:family="text"><style:text-properties fo:font-style="italic" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA11" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA12" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA13" style:family="text"><style:text-properties fo:font-weight="bold" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA14" style:family="text"><style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA15" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style>
</office:automatic-styles><office:master-styles/><office:body><office:text><text:p xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" text:style-name="Standard">A <text:span text:style-name="TA1">bold</text:span><text:span text:style-name="TA0"> text</text:span>
</text:p>
</office:text>
</office:body>
</office:document>
Binary file added Resources/HelloWorld.odt
Binary file not shown.
Binary file added Resources/Image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Muster_GEDCOM_UTF-8.pdf
Binary file not shown.
Binary file added Resources/ReplaceFieldsExample.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions Resources/ReplaceFieldsExample.fodt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" Owner="23096832" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"><office:meta xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"><meta:creation-date>2021-03-23T19:45:53</meta:creation-date><meta:generator>fpOdf 0.1</meta:generator>
</office:meta><office:settings/><office:scripts/><office:font-face-decls><style:font-face style:name="Liberation Mono" svg:font-family="'Liberation Mono'" style:font-family-generic="modern" style:font-pitch="fixed"/><style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Liberation Sans Narrow" svg:font-family="'Liberation Sans Narrow'" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
</office:font-face-decls><office:styles><style:default-style style:family="paragraph"><style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.25095cm" style:writing-mode="page"/><style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
</style:default-style><style:style style:name="Standard" style:family="paragraph"/>
</office:styles><office:automatic-styles><style:style style:name="TA0" style:family="text"><style:text-properties/>
</style:style><style:style style:name="TA1" style:family="text"><style:text-properties fo:font-weight="bold"/>
</style:style><style:style style:name="TA2" style:family="text"><style:text-properties fo:font-style="italic"/>
</style:style><style:style style:name="TA3" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic"/>
</style:style><style:style style:name="TA4" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA5" style:family="text"><style:text-properties fo:font-weight="bold" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA6" style:family="text"><style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA7" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style><style:style style:name="TA8" style:family="text"><style:text-properties style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA9" style:family="text"><style:text-properties fo:font-weight="bold" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA10" style:family="text"><style:text-properties fo:font-style="italic" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA11" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA12" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA13" style:family="text"><style:text-properties fo:font-weight="bold" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA14" style:family="text"><style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style><style:style style:name="TA15" style:family="text"><style:text-properties fo:font-weight="bold" fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:text-line-through-style="solid" style:text-line-through-type="single"/>
</style:style>
</office:automatic-styles><office:master-styles/><office:body><office:text><text:p xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" text:style-name="Standard"><text:span text:style-name="Standard">Name:</text:span><text:tab/><text:text-input text:description="Name">Arthur</text:text-input>
</text:p><text:p xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" text:style-name="Standard"><text:span text:style-name="Standard">Age:</text:span><text:tab/><text:text-input text:description="Age">35</text:text-input>
</text:p>
</office:text>
</office:body>
</office:document>
Binary file added Resources/ShowColor.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading