This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch odf-devel
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 6517ea994776ef2c13739683c8b9f2d9baf086f5
Author: Jim Jagielski <[email protected]>
AuthorDate: Fri Oct 23 07:03:21 2026 -0400

    test/odf-validate: add fixtures for the xlink:type, office:version and 
redline fixes
---
 test/odf-validate/fixtures/auto-reload/TEST.odt    | Bin 0 -> 13803 bytes
 test/odf-validate/fixtures/auto-reload/checks.json |  10 +++++
 .../office-version/XMLSecurityFramework.sxw        | Bin 0 -> 187975 bytes
 .../fixtures/office-version/checks.json            |  12 ++++++
 .../fixtures/redline-stack/checks.json             |  43 +++++++++++++++++++++
 .../fixtures/redline-stack/test-review-stack.docx  | Bin 0 -> 10598 bytes
 .../fixtures/section-link/Writer_link.sxw          | Bin 0 -> 5188 bytes
 .../odf-validate/fixtures/section-link/checks.json |  14 +++++++
 test/odf-validate/fixtures/url-field/ToDo.ods      | Bin 0 -> 13276 bytes
 .../fixtures/url-field/checks-odp.json             |  14 +++++++
 .../fixtures/url-field/checks-ods.json             |  26 +++++++++++++
 test/odf-validate/fixtures/url-field/testinput.odp | Bin 0 -> 40660 bytes
 12 files changed, 119 insertions(+)

diff --git a/test/odf-validate/fixtures/auto-reload/TEST.odt 
b/test/odf-validate/fixtures/auto-reload/TEST.odt
new file mode 100644
index 0000000000..7c6f0b60f7
Binary files /dev/null and b/test/odf-validate/fixtures/auto-reload/TEST.odt 
differ
diff --git a/test/odf-validate/fixtures/auto-reload/checks.json 
b/test/odf-validate/fixtures/auto-reload/checks.json
new file mode 100644
index 0000000000..c8c8d44499
--- /dev/null
+++ b/test/odf-validate/fixtures/auto-reload/checks.json
@@ -0,0 +1,10 @@
+[
+ {
+  "name": "autoload",
+  "expr": "(doc.DocumentProperties.AutoloadURL, 
doc.DocumentProperties.AutoloadSecs)",
+  "expect": [
+   
"file:///Users/jim/src/asf/code/follow/aoo/openoffice/test/odf-validate/fixtures/auto-reload/TEST.odt",
+   0
+  ]
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/office-version/XMLSecurityFramework.sxw 
b/test/odf-validate/fixtures/office-version/XMLSecurityFramework.sxw
new file mode 100644
index 0000000000..c778e1c1ec
Binary files /dev/null and 
b/test/odf-validate/fixtures/office-version/XMLSecurityFramework.sxw differ
diff --git a/test/odf-validate/fixtures/office-version/checks.json 
b/test/odf-validate/fixtures/office-version/checks.json
new file mode 100644
index 0000000000..3d4103e99d
--- /dev/null
+++ b/test/odf-validate/fixtures/office-version/checks.json
@@ -0,0 +1,12 @@
+[
+ {
+  "name": "text",
+  "expr": "doc.Text.String",
+  "expect": "\n\nThe OpenOffice.org XML Security Framework\n\nVersion 1.2.1, 
March 2005\n\nMichael Mi\n\nTable of Contents\n1. Component Overview\t4\n1.1 
SAXWriter\t4\n1.2 SAXParser\t4\n1.3 XMLDocumentWrapper\t4\n1.4 
XMLExporter\t4\n1.5 XMLImporter\t5\n1.6 SignatureCreator\t5\n1.7 
SignatureVerifier\t5\n1.8 Encryptor\t5\n1.9 Decryptor\t5\n1.10 
SAXEventKeeper\t5\n1.11 XMLSignature\t6\n1.12 XMLEncryption\t6\n2. Use 
Cases\t7\n2.1 Generate A Signature (signature before the signed data)\t7\n2. 
[...]
+ },
+ {
+  "name": "paras",
+  "expr": "len(doc.Text.String.split('\\r'))",
+  "expect": 1
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/redline-stack/checks.json 
b/test/odf-validate/fixtures/redline-stack/checks.json
new file mode 100644
index 0000000000..97a4f8b59e
--- /dev/null
+++ b/test/odf-validate/fixtures/redline-stack/checks.json
@@ -0,0 +1,43 @@
+[
+ {
+  "name": "outer_changes",
+  "expr": "(lambda en: [(r.RedlineType, r.RedlineAuthor, 
r.RedlineDateTime.Year, r.RedlineDateTime.Month, r.RedlineDateTime.Day, 
r.RedlineDateTime.Hours, r.RedlineDateTime.Minutes, r.RedlineComment) for r in 
en(doc.Redlines.createEnumeration()) if r.RedlineAuthor != 'Unknown 
Author'])(lambda e:[e.nextElement() for _ in iter(e.hasMoreElements, False)])",
+  "expect": [
+   [
+    "Format",
+    "User 2",
+    2009,
+    3,
+    12,
+    11,
+    55,
+    ""
+   ],
+   [
+    "Delete",
+    "User 2",
+    2009,
+    3,
+    12,
+    11,
+    55,
+    ""
+   ],
+   [
+    "Format",
+    "User 2",
+    2009,
+    3,
+    12,
+    11,
+    55,
+    ""
+   ]
+  ]
+ },
+ {
+  "name": "text",
+  "expr": "doc.Text.String",
+  "expect": "Here is some added text.\n"
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/redline-stack/test-review-stack.docx 
b/test/odf-validate/fixtures/redline-stack/test-review-stack.docx
new file mode 100644
index 0000000000..18b3e3063e
Binary files /dev/null and 
b/test/odf-validate/fixtures/redline-stack/test-review-stack.docx differ
diff --git a/test/odf-validate/fixtures/section-link/Writer_link.sxw 
b/test/odf-validate/fixtures/section-link/Writer_link.sxw
new file mode 100644
index 0000000000..5e5c8bdcb8
Binary files /dev/null and 
b/test/odf-validate/fixtures/section-link/Writer_link.sxw differ
diff --git a/test/odf-validate/fixtures/section-link/checks.json 
b/test/odf-validate/fixtures/section-link/checks.json
new file mode 100644
index 0000000000..e98c3ea228
--- /dev/null
+++ b/test/odf-validate/fixtures/section-link/checks.json
@@ -0,0 +1,14 @@
+[
+ {
+  "name": "sections",
+  "expr": "[(n, doc.TextSections.getByName(n).FileLink.FileURL, 
doc.TextSections.getByName(n).FileLink.FilterName, 
doc.TextSections.getByName(n).LinkRegion) for n in 
doc.TextSections.ElementNames]",
+  "expect": [
+   [
+    "Section1",
+    "file:///C:/Documents%20and%20Settings/sw93809/My%20Documents/chinese.sxw",
+    "",
+    ""
+   ]
+  ]
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/url-field/ToDo.ods 
b/test/odf-validate/fixtures/url-field/ToDo.ods
new file mode 100644
index 0000000000..344a5c2e9f
Binary files /dev/null and b/test/odf-validate/fixtures/url-field/ToDo.ods 
differ
diff --git a/test/odf-validate/fixtures/url-field/checks-odp.json 
b/test/odf-validate/fixtures/url-field/checks-odp.json
new file mode 100644
index 0000000000..ac54adb80c
--- /dev/null
+++ b/test/odf-validate/fixtures/url-field/checks-odp.json
@@ -0,0 +1,14 @@
+[
+ {
+  "name": "shape_url_fields",
+  "expr": "(lambda en: [(i,j,t.TextField.URL,t.TextField.Representation) for i 
in range(doc.DrawPages.Count) for j in range(doc.DrawPages.getByIndex(i).Count) 
for s in [doc.DrawPages.getByIndex(i).getByIndex(j)] if 
hasattr(s,'createEnumeration') for p in en(s.createEnumeration()) for t in 
en(p.createEnumeration()) if t.TextPortionType=='TextField'])(lambda 
e:[e.nextElement() for _ in iter(e.hasMoreElements, False)])",
+  "expect": [
+   [
+    0,
+    1,
+    "http://download.openoffice.org/";,
+    "Hyperlink, this is"
+   ]
+  ]
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/url-field/checks-ods.json 
b/test/odf-validate/fixtures/url-field/checks-ods.json
new file mode 100644
index 0000000000..b97d10fcc3
--- /dev/null
+++ b/test/odf-validate/fixtures/url-field/checks-ods.json
@@ -0,0 +1,26 @@
+[
+ {
+  "name": "cell_url_fields",
+  "expr": "(lambda en: [(r,c,t.TextField.URL,t.TextField.Representation) for 
sh in [doc.Sheets.getByIndex(0)] for r in range(110) for c in range(11) for p 
in en(sh.getCellByPosition(c,r).Text.createEnumeration()) for t in 
en(p.createEnumeration()) if t.TextPortionType=='TextField'])(lambda 
e:[e.nextElement() for _ in iter(e.hasMoreElements, False)])",
+  "expect": [
+   [
+    14,
+    0,
+    "http://www.openoffice.org/issues/show_bug.cgi?id=29123";,
+    "29123"
+   ],
+   [
+    15,
+    0,
+    "http://www.openoffice.org/issues/show_bug.cgi?id=29234";,
+    "29234"
+   ],
+   [
+    16,
+    0,
+    "http://www.openoffice.org/issues/show_bug.cgi?id=29245";,
+    "29245"
+   ]
+  ]
+ }
+]
\ No newline at end of file
diff --git a/test/odf-validate/fixtures/url-field/testinput.odp 
b/test/odf-validate/fixtures/url-field/testinput.odp
new file mode 100644
index 0000000000..fe1ac44e8b
Binary files /dev/null and b/test/odf-validate/fixtures/url-field/testinput.odp 
differ

Reply via email to