Skip to content

Commit 79b3286

Browse files
committed
soffice macro for user's fields update
docx reference files updates default .qmd header created fix for issue with table in IT Architecture Principles
1 parent ae62f47 commit 79b3286

File tree

9 files changed

+65
-63
lines changed

9 files changed

+65
-63
lines changed

_quarto.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project:
55
render:
66
- src/index.qmd
77
- src/guidelines/*.qmd
8+
- src/templates/*.qmd
89

910
resources:
1011
- assets/ # Ensure images are copied to _site/

macros/ConvertModule.xba

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@
77
Sub UpdateTOCAndExportToPDF()
88

99
Dim document As Object
10-
'Dim dispatcher As Object
10+
Dim dispatcher As Object
1111

1212
document = ThisComponent
1313

14-
' Update TOC and wait for TOC updates to complete
14+
'Unlock fields by disabling "Fixed Content" (IsFixed = False) to allow automatic updates
15+
UpdateDocProperties()
16+
17+
' Refresh all fields (TOC, DOCPROPERTY, etc.)
1518
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
1619
dispatcher.executeDispatch(document.CurrentController.Frame, ".uno:UpdateAll", "", 0, Array())
1720

18-
1921
' Generate PDF file path
2022
pdfURL = Replace(ThisComponent.URL, ".docx", ".pdf")
2123

22-
' If no valid file path, close document immediately
23-
If pdfURL = "" Then
24-
document.setModified(False)
25-
document.close(True)
26-
Exit Sub
27-
End If
24+
' If no valid file path, close document immediately
25+
If pdfURL = "" Then
26+
document.setModified(False)
27+
document.close(True)
28+
Exit Sub
29+
End If
2830

2931
' Ensure any existing PDF is deleted before exporting
3032
fileSystem = createUnoService("com.sun.star.ucb.SimpleFileAccess")
@@ -55,4 +57,24 @@
5557

5658
End Sub
5759

60+
Sub UpdateDocProperties()
61+
Dim doc As Object
62+
Dim textFields As Object
63+
Dim field As Object
64+
65+
' Loop through all text fields and uncheck 'isFixed' flag
66+
doc = ThisComponent
67+
textFields = doc.TextFields
68+
69+
For Each field In textFields
70+
On Error Resume Next
71+
If field.HasProperty("IsFixed") Then
72+
field.IsFixed = False ' Uncheck "Fixed Content"
73+
End If
74+
On Error GoTo 0
75+
Next field
76+
77+
End Sub
78+
79+
5880
</script:module>

metadata/default.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
documentclass: scrartcl
2+
toc: true # Enable the Table of Contents
3+
toc-title: "Index" # Customize the title of the table of contents
4+
toc-depth: 3 # Include headings up to level 3 (###)
5+
number-sections: true
6+
sitemap: true # Enables sitemap generation for web crawlers
7+
tbl-colwidths: auto
8+
format:
9+
html:
10+
code-fold: true # Allow code blocks to be foldable
11+
self-contained: true # Embed resources like CSS and images
12+
docx:
13+
toc-location: before-body
14+
toc-pagebreak: true
15+
data: false

src/guidelines/IT_Architecture_Principles_and_Implementation_Guidelines.qmd

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
title: "IT Architecture Principles and Implementation Guidelines"
33
subtitle: "Copernicus Land Monitoring Service"
44
author: "European Environment Agency (EEA)"
5-
version: "1.4a"
5+
version: "1.4a"
66
date: "2025-03-06"
7-
documentclass: scrartcl
87
product-name: IT Architecture Principles and Implementation Guidelines
9-
toc: true # Enable the Table of Contents
10-
toc-title: "Index" # Customize the title of the table of contents
11-
toc-depth: 3 # Include headings up to level 3 (###)
128
keywords: ["Copernicus Land Monitoring Service, CLMS IT Architecture, European Environment Agency, IT Principles and Guidelines, IT Ecosystem, IT Security, EUPL Licensing, Reproducibility, Reusability, Transparency, Scalability, Maintainability, Resilient IT Solutions, Modular IT Architecture, Continuous Integration"]
13-
number-sections: true
14-
sitemap: true #Enables sitemap generation for web crawlers
15-
tbl-colwidths: auto
9+
10+
11+
metadata-files:
12+
- ../../metadata/default.yml
13+
1614
format:
17-
html:
18-
css: ../styles/styles.css # Optional: Custom CSS file for styling
19-
code-fold: true # Allow code blocks to be foldable
20-
self-contained: true # Embed resources like CSS and images
15+
html:
16+
css: ../styles/styles.css
2117
docx:
2218
reference-doc: ../styles/template-guideline.docx
23-
toc-location: before-body
24-
toc-pagebreak: true
25-
data: false
26-
pdf: default
19+
pdf: default
2720
---
2821

2922
```{=html}
@@ -207,13 +200,11 @@ The CLMS is funded by the EU and supports its community with data and services.
207200

208201
| **Transparency 1:** | **Source code of client specific software to be supplied with IT solution** |
209202
|----------------:|:------------------------------------------------------|
210-
| **What:** | Source code of client specific IT solution is supplied as part of the deliverable and made publicly available under the EUPL-1.2[^1] license |
203+
| **What:** | Source code of client specific IT solution is supplied as part of the deliverable and made publicly available under the EUPL-1.2 license ^[(https://commission.europa.eu/content/european-union-public-licence_en)] |
211204
| **Why:** | To ensure transparency, it is essential to have clear insights into the client-specific software. This enables efficient future developments and modifications |
212205
| **Consequence:** | Source code of client specific software must be delivered with IT solution. The source code shall include Docker recipes and scripts for building the source code and be published under the EUPL-1.2 license |
213206
| **Example:** | *Source code of all the components of the specific IT solution must be delivered. Any updates or developments of the source code shall be reflected in the EEA GitHub repository, which is the main repository of the system. Moreover, the specific client IT solutions shall be published under the EUPL-1.2 license, so the openness and transparency are ensured* |
214207

215-
[^1]: [European Union Public Licence - European Commission](https://commission.europa.eu/content/european-union-public-licence_en)
216-
217208
| **Transparency 2:** | **Inline documentation of the source code** |
218209
|----------------:|:------------------------------------------------------|
219210
| **What:** | Source code of client specific IT solution must be documented in-line |

src/styles/template-atbd.docx

1.64 KB
Binary file not shown.

src/styles/template-guideline.docx

1.74 KB
Binary file not shown.

src/styles/template-pum.docx

-101 Bytes
Binary file not shown.

src/templates/CLMS_ATBD_Template.qmd

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,16 @@
22
title: "Product SHORT NAME ALGORITHM THEORETICAL BASIS DOCUMENT (ATBD)"
33
subtitle: "ATBD Copernicus Land Monitoring Service -- Product full name"
44
date: "2022-10-06"
5-
toc: true # Enable the Table of Contents
6-
toc-title: "Contents" # Customize the title of the table of contents
7-
toc-depth: 3 # Include headings up to level 3 (###)
85
version: Issue x.y (“(x) version of the document” + “.”+ “(y) version of the document update”)
9-
#lot: true
10-
number-sections: true
11-
sitemap: true
12-
keywords: []
13-
tbl-colwidths: auto
14-
fig-align: center
156
product-name: Product Name
7+
8+
metadata-files:
9+
- ../../metadata/default.yml
10+
1611
format:
17-
#html:
18-
# css: ../styles/styles.css # Optional: Custom CSS file for styling
19-
# code-fold: true # Allow code blocks to be foldable
20-
# self-contained: true # Embed resources like CSS and images
21-
pdf: default
2212
docx:
2313
reference-doc: ../styles/template-atbd.docx
24-
toc-location: before-body
25-
toc-pagebreak: true
26-
data: false
2714
hidden: true
28-
2915
---
3016

3117
```{=html}

src/templates/CLMS_PUM_Template.qmd

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,15 @@
22
title: "Product SHORT NAME Product User Manual (PUM)"
33
subtitle: "PUM Copernicus Land Monitoring Service - Product full name"
44
date: "2022-10-06"
5-
toc: true # Enable the Table of Contents
6-
toc-title: "Contents" # Customize the title of the table of contents
7-
toc-depth: 3 # Include headings up to level 3 (###)
85
version: Issue x.y (“(x) version of the document” + “.”+ “(y) version of the document update”) (first published version must start with 1.0)
9-
#lot: true
10-
number-sections: true
11-
sitemap: true
12-
keywords: []
13-
tbl-colwidths: auto
14-
fig-align: center
156
product-name: Product Name
7+
8+
metadata-files:
9+
- ../../metadata/default.yml
10+
1611
format:
17-
#html:
18-
# css: ../styles/styles.css # Optional: Custom CSS file for styling
19-
# code-fold: true # Allow code blocks to be foldable
20-
# self-contained: true # Embed resources like CSS and images
21-
pdf: default
2212
docx:
2313
reference-doc: ../styles/template-pum.docx
24-
toc-location: before-body
25-
toc-pagebreak: true
26-
data: false
2714
hidden: true
2815

2916
---

0 commit comments

Comments
 (0)