xref: /trunk/test/odf-validate/fixtures/ole-text-edge/checks.json (revision 0e16a31d78a652c56c5c0fc79c752f48b9048df9)
1[
2 {
3  "name": "ole_text",
4  "expr": "[[s.ShapeType.split('.')[-1], s.String, s.CLSID] for s in [doc.DrawPages.getByIndex(0).getByIndex(i) for i in range(doc.DrawPages.getByIndex(0).Count)]]",
5  "expect": [
6   [
7    "OLE2Shape",
8    "",
9    "078B7ABA-54FC-457F-8551-6147e776a997"
10   ],
11   [
12    "OLE2Shape",
13    "OLE label",
14    "078B7ABA-54FC-457F-8551-6147e776a997"
15   ],
16   [
17    "OLE2Shape",
18    " ",
19    "078B7ABA-54FC-457F-8551-6147e776a997"
20   ],
21   [
22    "OLE2Shape",
23    "\n",
24    "078B7ABA-54FC-457F-8551-6147e776a997"
25   ],
26   [
27    "OLE2Shape",
28    "1/3/1",
29    "078B7ABA-54FC-457F-8551-6147e776a997"
30   ]
31  ]
32 },
33 {
34  "name": "ole_paragraphs",
35  "expr": "[[(lambda en: [p.String for p in [en.nextElement() for _ in iter(en.hasMoreElements, False)]])(s.createEnumeration())] for s in [doc.DrawPages.getByIndex(0).getByIndex(i) for i in range(doc.DrawPages.getByIndex(0).Count)]]",
36  "expect": [
37   [
38    [
39     ""
40    ]
41   ],
42   [
43    [
44     "OLE label"
45    ]
46   ],
47   [
48    [
49     " "
50    ]
51   ],
52   [
53    [
54     "",
55     ""
56    ]
57   ],
58   [
59    [
60     "1/3/1"
61    ]
62   ]
63  ]
64 },
65 {
66  "name": "ole_has_field",
67  "expr": "[any(pt.TextPortionType == 'TextField' for pt in (lambda en: [en.nextElement() for _ in iter(en.hasMoreElements, False)])(par.createEnumeration())) for s in [doc.DrawPages.getByIndex(0).getByIndex(i) for i in range(doc.DrawPages.getByIndex(0).Count)] for par in (lambda en: [en.nextElement() for _ in iter(en.hasMoreElements, False)])(s.createEnumeration())]",
68  "expect": [
69   false,
70   false,
71   false,
72   false,
73   false,
74   true
75  ]
76 }
77]
78