mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Compare commits
1011 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfb713df29 | ||
|
|
44598bd030 | ||
|
|
23369586da | ||
|
|
9d9865c9b8 | ||
|
|
e9e9612a1f | ||
|
|
1594baf696 | ||
|
|
839ce4a0f4 | ||
|
|
260b22fb09 | ||
|
|
ac4e3c199e | ||
|
|
a1f6f2786f | ||
|
|
b923655b43 | ||
|
|
6b72a2dff3 | ||
|
|
c7976440c3 | ||
|
|
811eb4a4a8 | ||
|
|
6ba4a1b050 | ||
|
|
4efa2b7162 | ||
|
|
139321c5e9 | ||
|
|
6a9224385e | ||
|
|
df5604a1d7 | ||
|
|
eafd6c04b8 | ||
|
|
e340f313bc | ||
|
|
bc02ef0703 | ||
|
|
692caf0f36 | ||
|
|
e96c9e17c0 | ||
|
|
55c1608a2d | ||
|
|
5338b17a8f | ||
|
|
c92c533d7a | ||
|
|
8d53613bcf | ||
|
|
62ae400993 | ||
|
|
ae3ed57baa | ||
|
|
8f149f51d0 | ||
|
|
ab196a7441 | ||
|
|
da3d64d9e3 | ||
|
|
04f4c1fa74 | ||
|
|
513a805c25 | ||
|
|
0ae15edb2c | ||
|
|
5eba199642 | ||
|
|
0de8ecd6a0 | ||
|
|
d1f3f9489f | ||
|
|
d1f0a88ea1 | ||
|
|
beab88fb0e | ||
|
|
66109187d1 | ||
|
|
c9b37678cc | ||
|
|
e54ba888e2 | ||
|
|
8df367310c | ||
|
|
58ac8d05f0 | ||
|
|
372388b7ed | ||
|
|
e3e04a641f | ||
|
|
d72e3a608c | ||
|
|
1910fff53e | ||
|
|
22531fe638 | ||
|
|
9c2f487c98 | ||
|
|
b09bf904d7 | ||
|
|
2acb5cf66a | ||
|
|
d60edd21a3 | ||
|
|
fd4d143d44 | ||
|
|
df2d5d62d9 | ||
|
|
8cdcda2873 | ||
|
|
18ef01295d | ||
|
|
ac4295deac | ||
|
|
d93a29ae67 | ||
|
|
1fc4f9e3b7 | ||
|
|
b401b92aea | ||
|
|
a5f5f4294e | ||
|
|
ba04c61188 | ||
|
|
f8a8189230 | ||
|
|
95b2a1cf1d | ||
|
|
017ff5f8f8 | ||
|
|
cc8b6d7591 | ||
|
|
6670c48c30 | ||
|
|
aead782eb2 | ||
|
|
c94e795f35 | ||
|
|
e9b33c0b08 | ||
|
|
befc941dcf | ||
|
|
ac989335d7 | ||
|
|
0ec4434f59 | ||
|
|
c28aec61d4 | ||
|
|
b195a3b9ed | ||
|
|
ddf71d0984 | ||
|
|
fb75600872 | ||
|
|
4dadb9d6cc | ||
|
|
e7515ba5e6 | ||
|
|
c1fac56998 | ||
|
|
3a56bbd73b | ||
|
|
6d42ff955a | ||
|
|
528591ba11 | ||
|
|
c703d00300 | ||
|
|
9e1afbbab1 | ||
|
|
3ac160b57d | ||
|
|
f2c52141c7 | ||
|
|
fd66689944 | ||
|
|
97a97bd75c | ||
|
|
338882ac88 | ||
|
|
2dd124eb42 | ||
|
|
fe3359bd79 | ||
|
|
6762b5a9fb | ||
|
|
037a001719 | ||
|
|
3a69605f4c | ||
|
|
08e9bb00d4 | ||
|
|
4fb34ebeae | ||
|
|
f476c64179 | ||
|
|
a9bc28a4bb | ||
|
|
0eb7135f2b | ||
|
|
4b3c688d51 | ||
|
|
e4e4582689 | ||
|
|
027927bfad | ||
|
|
2098df7467 | ||
|
|
40ca9bd085 | ||
|
|
88836e1614 | ||
|
|
e7620b7ce7 | ||
|
|
6d6089eee5 | ||
|
|
57ffd3aa12 | ||
|
|
2428265d35 | ||
|
|
3d9c243943 | ||
|
|
236784371b | ||
|
|
47d0e956b8 | ||
|
|
74bdee9c0d | ||
|
|
e5336586a9 | ||
|
|
2805093da6 | ||
|
|
2a2e4f095e | ||
|
|
5d8d3e77bf | ||
|
|
006e49765c | ||
|
|
c953a8ff22 | ||
|
|
f44ece137f | ||
|
|
97cef0a3e3 | ||
|
|
73d1fc53f5 | ||
|
|
614d7c7002 | ||
|
|
c51dadf703 | ||
|
|
c5c2540abb | ||
|
|
97ea97b5a2 | ||
|
|
6b6735a3c4 | ||
|
|
1dbfba9225 | ||
|
|
c4e0cde59c | ||
|
|
32d7a45b50 | ||
|
|
528b72d347 | ||
|
|
ccacd1540c | ||
|
|
22ff9e34b6 | ||
|
|
775da74dee | ||
|
|
b4326363d6 | ||
|
|
ed156e63c6 | ||
|
|
5a7cd39393 | ||
|
|
8f1cfa2eb3 | ||
|
|
2cb8c4020e | ||
|
|
4b38ab5401 | ||
|
|
e7c0389865 | ||
|
|
d83039cca7 | ||
|
|
62e12fdb1b | ||
|
|
53ceff13b2 | ||
|
|
fa95a3e522 | ||
|
|
031793ddaf | ||
|
|
e73c419a37 | ||
|
|
540f0e5617 | ||
|
|
9fb2c4b03e | ||
|
|
cb520e8046 | ||
|
|
ae0a17765e | ||
|
|
71b4b62a6d | ||
|
|
a2ed8fda3a | ||
|
|
2f5ec43601 | ||
|
|
b45b7095c0 | ||
|
|
9b7938bf81 | ||
|
|
789fcc29bb | ||
|
|
1c4f68f262 | ||
|
|
7ec1fc01d4 | ||
|
|
ad925ac0d1 | ||
|
|
7a36dfe031 | ||
|
|
a5d43073a6 | ||
|
|
c840e660b7 | ||
|
|
f258b2b26d | ||
|
|
90e5d5d998 | ||
|
|
7631eae9b2 | ||
|
|
3116668737 | ||
|
|
b770a35aba | ||
|
|
59e595b844 | ||
|
|
c6a621edc6 | ||
|
|
f774a638cb | ||
|
|
73b904f16d | ||
|
|
cd22293975 | ||
|
|
d486e50822 | ||
|
|
89fa331beb | ||
|
|
1604c410d1 | ||
|
|
61203972a5 | ||
|
|
709bfd4305 | ||
|
|
3b69442907 | ||
|
|
1d4f5d34bd | ||
|
|
bc2b1b0422 | ||
|
|
7b5fe9c42b | ||
|
|
dd0d6deb81 | ||
|
|
16ecbc7d48 | ||
|
|
323b5c8c6b | ||
|
|
41f4570c8f | ||
|
|
58ee3f732b | ||
|
|
7ec830f892 | ||
|
|
95b46731b9 | ||
|
|
b16a094bba | ||
|
|
a371cba0be | ||
|
|
25a2dd9227 | ||
|
|
207d67c12b | ||
|
|
e09a167bbb | ||
|
|
f632c29683 | ||
|
|
0dc32a8596 | ||
|
|
67c8284f35 | ||
|
|
1dcb799127 | ||
|
|
1aa1fd6273 | ||
|
|
70f8b15333 | ||
|
|
782d187b10 | ||
|
|
63c0bf9368 | ||
|
|
ea74954fcf | ||
|
|
b5221fac25 | ||
|
|
42193c57e4 | ||
|
|
7003357b79 | ||
|
|
dc2cfe0bfc | ||
|
|
f10f164c61 | ||
|
|
79d1630374 | ||
|
|
05f37a5204 | ||
|
|
0a17fa9e22 | ||
|
|
444a8a7214 | ||
|
|
22b78e1887 | ||
|
|
03fc1ddea1 | ||
|
|
7a124135de | ||
|
|
b50946307e | ||
|
|
f26ea2b777 | ||
|
|
14cd9a35c6 | ||
|
|
c048ba53fe | ||
|
|
2e375a76ea | ||
|
|
f2267c0668 | ||
|
|
e4a2cd1233 | ||
|
|
ca7e3330ed | ||
|
|
6bbd6fc177 | ||
|
|
18e0a37df3 | ||
|
|
49fd564023 | ||
|
|
2b7f7074a0 | ||
|
|
28cd548f6b | ||
|
|
d0e6830e44 | ||
|
|
559485a0fe | ||
|
|
2fbfe2ea7e | ||
|
|
aeb53ffe62 | ||
|
|
b0a4e1042a | ||
|
|
00c2a85c30 | ||
|
|
6647bc8c8b | ||
|
|
4493f3a5d6 | ||
|
|
dda424920a | ||
|
|
c5f3ab9d50 | ||
|
|
7a80eb6920 | ||
|
|
172e73a10b | ||
|
|
9f9ff14e56 | ||
|
|
c38f5f9577 | ||
|
|
732001c4ae | ||
|
|
061d6a3d0f | ||
|
|
54f1f5deac | ||
|
|
ac53afe307 | ||
|
|
bdb467e84e | ||
|
|
65747422b3 | ||
|
|
c0e6a9bed0 | ||
|
|
e98a5991e7 | ||
|
|
314bda66a4 | ||
|
|
3b011a0164 | ||
|
|
085c9ddb19 | ||
|
|
92565ea07c | ||
|
|
009b6501f2 | ||
|
|
86e80a9164 | ||
|
|
9d37011683 | ||
|
|
d81592022d | ||
|
|
bf4ee6a3b9 | ||
|
|
e97f1036f0 | ||
|
|
8df560eed2 | ||
|
|
75e9383a5c | ||
|
|
ae232b73d7 | ||
|
|
224201e1a2 | ||
|
|
e070250352 | ||
|
|
4a9c9271fe | ||
|
|
3240852e49 | ||
|
|
b50ce609ca | ||
|
|
fa573c72da | ||
|
|
a3cca6c017 | ||
|
|
8d71c1f2ff | ||
|
|
5c9bb13cd7 | ||
|
|
99fdda0dc0 | ||
|
|
9ebec77aca | ||
|
|
bcc7912c8d | ||
|
|
e18b5576f0 | ||
|
|
f73913cd84 | ||
|
|
659dcb5dea | ||
|
|
f1e6b9d11c | ||
|
|
ebad7593ff | ||
|
|
5642c122f3 | ||
|
|
a96c0d9d78 | ||
|
|
0b9bc5d0b4 | ||
|
|
e5b2fbb89b | ||
|
|
8fc2f7db41 | ||
|
|
c76be2df41 | ||
|
|
7c86c60f7c | ||
|
|
44da0ea183 | ||
|
|
f73a9e0875 | ||
|
|
6bc4a6ebd6 | ||
|
|
45a3e16e7e | ||
|
|
1a86f27e7b | ||
|
|
ca104f4be7 | ||
|
|
2d4ee2ebef | ||
|
|
cace66f52f | ||
|
|
cceccc4bae | ||
|
|
f3bf31ac5d | ||
|
|
73b2874824 | ||
|
|
d4fc5cd6c0 | ||
|
|
533fee47c8 | ||
|
|
94ff481ca9 | ||
|
|
22d2efaf5b | ||
|
|
1eee67fb8b | ||
|
|
fa9428511a | ||
|
|
cb0943970b | ||
|
|
4166350488 | ||
|
|
33d81ae7ef | ||
|
|
a1fa00e1d1 | ||
|
|
af4eae815d | ||
|
|
6d8f1901dc | ||
|
|
550be7c201 | ||
|
|
b5f67fca04 | ||
|
|
07fa0b88e0 | ||
|
|
e1d943e294 | ||
|
|
8fa36ff3df | ||
|
|
bbd404f343 | ||
|
|
0c3cc9a5e1 | ||
|
|
024f1d3348 | ||
|
|
ef16723148 | ||
|
|
f76089be67 | ||
|
|
8e5d6fe026 | ||
|
|
39e5ac2906 | ||
|
|
18fc855e66 | ||
|
|
f2df929adb | ||
|
|
5b8ff77997 | ||
|
|
2f66c63387 | ||
|
|
4fb39a6b09 | ||
|
|
eb91cfad93 | ||
|
|
6928a6ca2e | ||
|
|
102db731df | ||
|
|
d72b25d83b | ||
|
|
8c13001762 | ||
|
|
c88b9e0e76 | ||
|
|
7333f6a7d0 | ||
|
|
521aab62da | ||
|
|
10675900c6 | ||
|
|
e2a9a66428 | ||
|
|
631d8aecc4 | ||
|
|
67320b6453 | ||
|
|
b6f3fa0c42 | ||
|
|
73c4de16e4 | ||
|
|
c784266438 | ||
|
|
779358f309 | ||
|
|
f51cff5e76 | ||
|
|
2ceb5f9020 | ||
|
|
4080ab8f3f | ||
|
|
6605569862 | ||
|
|
9c08d29fcb | ||
|
|
adc6d13f3a | ||
|
|
d8b3934646 | ||
|
|
47f2d72d35 | ||
|
|
e5ac02f7d0 | ||
|
|
f6c1cbd229 | ||
|
|
d2cc0b770c | ||
|
|
92e7a8a417 | ||
|
|
d0ad6030d2 | ||
|
|
b5b489f7fd | ||
|
|
c5df00b0a7 | ||
|
|
c5ca5ae065 | ||
|
|
a6f65db642 | ||
|
|
c01228c331 | ||
|
|
2ca7114a8f | ||
|
|
6b968e64a5 | ||
|
|
8767e243e3 | ||
|
|
9e7873267a | ||
|
|
cf254c06f6 | ||
|
|
c8fc8a36a9 | ||
|
|
de1c2b67d7 | ||
|
|
c5af268cc9 | ||
|
|
9a4a4270ec | ||
|
|
17cb74b3ff | ||
|
|
378a0bed06 | ||
|
|
16b53a8bc7 | ||
|
|
d189f69333 | ||
|
|
35a6ae72be | ||
|
|
67b0dc3966 | ||
|
|
c1dc0c6130 | ||
|
|
3c7d8dc8bc | ||
|
|
6f1a81ac8c | ||
|
|
2880483f13 | ||
|
|
b461e98edb | ||
|
|
f298390ec3 | ||
|
|
426371301f | ||
|
|
5c6b59aea4 | ||
|
|
b76bbc866e | ||
|
|
62b351cbeb | ||
|
|
e17ddb0374 | ||
|
|
40beab6b6c | ||
|
|
51316e01d8 | ||
|
|
1b0f62a235 | ||
|
|
9df7326140 | ||
|
|
7363d0483a | ||
|
|
de0d120d69 | ||
|
|
cbf6577172 | ||
|
|
2f55495ba9 | ||
|
|
dce1a83169 | ||
|
|
ebd9a8bc9a | ||
|
|
3f9153c761 | ||
|
|
3ee613c336 | ||
|
|
85212023d6 | ||
|
|
39935860ed | ||
|
|
bbccb5217f | ||
|
|
1f6c32bd55 | ||
|
|
1b0632f3f1 | ||
|
|
783ebda7f3 | ||
|
|
7981ea397f | ||
|
|
6a68902aee | ||
|
|
8bac1b33f6 | ||
|
|
9f43059a37 | ||
|
|
9fafa45bac | ||
|
|
1d510c7fc3 | ||
|
|
a7231a3764 | ||
|
|
cdcc14d6e3 | ||
|
|
a56b68476f | ||
|
|
e867e371be | ||
|
|
eb89c043dc | ||
|
|
7aa4ae3bc1 | ||
|
|
c37b4ee0d5 | ||
|
|
9e30ffc0de | ||
|
|
22192ce2cc | ||
|
|
2052a9be7d | ||
|
|
68d6e0cf9f | ||
|
|
287d90ee8f | ||
|
|
f73f377af4 | ||
|
|
e458192cf2 | ||
|
|
fe0a4f1166 | ||
|
|
691c8baa5a | ||
|
|
712c484a65 | ||
|
|
421837d2c5 | ||
|
|
694538aed0 | ||
|
|
82aac8561f | ||
|
|
f9e692aa5d | ||
|
|
0036655df4 | ||
|
|
db61f5b4be | ||
|
|
3d66281e6d | ||
|
|
dda779c4a0 | ||
|
|
85aa74414c | ||
|
|
7c9a1ce89b | ||
|
|
121c5f2aaf | ||
|
|
be33cd61d1 | ||
|
|
5c82a0890c | ||
|
|
eaff2ac8ce | ||
|
|
993cc5a5b8 | ||
|
|
92d4a8d86d | ||
|
|
b3d0fe52d3 | ||
|
|
f2179098fe | ||
|
|
f91ff62a55 | ||
|
|
8bf71069cd | ||
|
|
6cbc6694ab | ||
|
|
7e3a404e4d | ||
|
|
78ed7db257 | ||
|
|
ae494ff2ef | ||
|
|
c6eb5b7b85 | ||
|
|
6cddf8be2d | ||
|
|
f5f985f469 | ||
|
|
618c129a98 | ||
|
|
fbd97d7672 | ||
|
|
e3bb8c3032 | ||
|
|
1f3d2a5c50 | ||
|
|
cdb8fad845 | ||
|
|
dbfe354b4a | ||
|
|
9a6bd3902d | ||
|
|
f90274e518 | ||
|
|
82784172b4 | ||
|
|
6096d55d23 | ||
|
|
d8a2bbb900 | ||
|
|
a076204fac | ||
|
|
9b800c82d7 | ||
|
|
42deaab12c | ||
|
|
c16e98e5b2 | ||
|
|
49aef015a8 | ||
|
|
70a69a4917 | ||
|
|
71dcabc947 | ||
|
|
82388de909 | ||
|
|
26883c2d8c | ||
|
|
2c8ab79a78 | ||
|
|
aa964c385d | ||
|
|
410653681e | ||
|
|
502a0f756e | ||
|
|
7babbd11a6 | ||
|
|
af040998f4 | ||
|
|
064225a488 | ||
|
|
9bef52fc6e | ||
|
|
40e7c815cf | ||
|
|
6d8bd2dcfa | ||
|
|
ac9d37875d | ||
|
|
ed47184865 | ||
|
|
9e64e029e0 | ||
|
|
5b12033b99 | ||
|
|
dbaf834459 | ||
|
|
7d87f1b5cd | ||
|
|
bd6fddbcc4 | ||
|
|
41d42717d4 | ||
|
|
3be17c823d | ||
|
|
961c83fb4e | ||
|
|
50dcbd390b | ||
|
|
f61dddea12 | ||
|
|
ca8014ebef | ||
|
|
694765368e | ||
|
|
8ad10c0ed7 | ||
|
|
3a3effca65 | ||
|
|
d6d403371a | ||
|
|
bff0b98095 | ||
|
|
ed744e15b4 | ||
|
|
219f43b4ee | ||
|
|
e33595b719 | ||
|
|
bc11cc335e | ||
|
|
d8ae576afa | ||
|
|
79e5e6ae16 | ||
|
|
0f560377be | ||
|
|
43aded3d9c | ||
|
|
e51877f5a6 | ||
|
|
72aa1f42a7 | ||
|
|
cc61ad565f | ||
|
|
1dbcea46d5 | ||
|
|
045a37f9c1 | ||
|
|
80fd35198d | ||
|
|
dd647b5d2d | ||
|
|
9c24944299 | ||
|
|
61f9b79647 | ||
|
|
ce19c3e761 | ||
|
|
c85e91e25c | ||
|
|
4962a04bbf | ||
|
|
9eda246398 | ||
|
|
0ab1ccc20a | ||
|
|
0f91df9577 | ||
|
|
86c0db4be1 | ||
|
|
43a15ffaf3 | ||
|
|
6befe2ad52 | ||
|
|
76617e9793 | ||
|
|
57afb34a18 | ||
|
|
edcbd87360 | ||
|
|
f873888301 | ||
|
|
a4097e05aa | ||
|
|
534d24dc74 | ||
|
|
38e7fe63a8 | ||
|
|
147c034cfd | ||
|
|
ae9355dcf4 | ||
|
|
c1f52674fd | ||
|
|
4f21f5280a | ||
|
|
3aad12021a | ||
|
|
d52f80eb79 | ||
|
|
2c74a961a4 | ||
|
|
4ca89e156f | ||
|
|
b0515e7493 | ||
|
|
116c32137d | ||
|
|
8d73b7ac2b | ||
|
|
91569bd826 | ||
|
|
018961ea77 | ||
|
|
75729edcea | ||
|
|
9951e8dfc1 | ||
|
|
3f4e7189b3 | ||
|
|
39f4085d6c | ||
|
|
2ebb2938b1 | ||
|
|
0c3ebbb1bc | ||
|
|
83e38afcdb | ||
|
|
1d5497f2c3 | ||
|
|
a40ab5a551 | ||
|
|
d7ca791ace | ||
|
|
b92a912e7d | ||
|
|
704e9a5439 | ||
|
|
be83ccf2ef | ||
|
|
ba6b755107 | ||
|
|
3755101b72 | ||
|
|
3ee979c767 | ||
|
|
6754be55a2 | ||
|
|
0e18766e1a | ||
|
|
50431fbbaa | ||
|
|
1065c69004 | ||
|
|
20cb040701 | ||
|
|
fde4545b3b | ||
|
|
c57f7a3b0e | ||
|
|
1700967d17 | ||
|
|
4f5d7781c1 | ||
|
|
33f944f922 | ||
|
|
3e0306d253 | ||
|
|
b8f975fb8f | ||
|
|
d4c6cb4b53 | ||
|
|
6fdbaa55f3 | ||
|
|
6d56d81f35 | ||
|
|
5874f55dcc | ||
|
|
edb9aeaca5 | ||
|
|
0d63f9a814 | ||
|
|
799aef54fe | ||
|
|
b788812546 | ||
|
|
f2b0e2f19a | ||
|
|
f5cb9588a0 | ||
|
|
ba79c4c3c1 | ||
|
|
a2af56511f | ||
|
|
924d8e7894 | ||
|
|
e400a0cc0d | ||
|
|
c17d78a182 | ||
|
|
7c881a408f | ||
|
|
c1f018f79c | ||
|
|
83384ccf90 | ||
|
|
8c77000e8d | ||
|
|
0f42425f8c | ||
|
|
0aa9e2bbb7 | ||
|
|
1df9b9c5cb | ||
|
|
8fe23195c6 | ||
|
|
7bc2dced2f | ||
|
|
1d620e8714 | ||
|
|
e132050d2e | ||
|
|
157512d437 | ||
|
|
b9eabbb477 | ||
|
|
02d2e6e82e | ||
|
|
613bf24ee7 | ||
|
|
5ba45570d6 | ||
|
|
df4bf119a5 | ||
|
|
0b758a45ba | ||
|
|
a43cc4a41a | ||
|
|
7ea956189d | ||
|
|
a185d08880 | ||
|
|
e1f7d4df4f | ||
|
|
9185ec02c5 | ||
|
|
69d935d4db | ||
|
|
c9c8653e6e | ||
|
|
a528d43590 | ||
|
|
7c17cc5e8f | ||
|
|
e896804683 | ||
|
|
db97cf001f | ||
|
|
468b423168 | ||
|
|
24452a2ecb | ||
|
|
822974aadc | ||
|
|
c5986447d1 | ||
|
|
fad6cae019 | ||
|
|
88a0d4ecf3 | ||
|
|
ab68210d2a | ||
|
|
f8bbec3104 | ||
|
|
f219a1a09f | ||
|
|
9b29308d6e | ||
|
|
6b9a099a69 | ||
|
|
da1939fd6a | ||
|
|
ad8b9f0b6d | ||
|
|
cab699001e | ||
|
|
720596a9ec | ||
|
|
c33f34b27c | ||
|
|
d034f954bd | ||
|
|
70aba4268b | ||
|
|
f1a5571a61 | ||
|
|
52039e220d | ||
|
|
a3d9bb7e35 | ||
|
|
2536f51646 | ||
|
|
8235db8758 | ||
|
|
0f5585d8e1 | ||
|
|
a139a17909 | ||
|
|
2ef8461f51 | ||
|
|
89ef0de42e | ||
|
|
e1379d3725 | ||
|
|
fb02a49df0 | ||
|
|
c51270d308 | ||
|
|
b6c67ae736 | ||
|
|
e788f0832b | ||
|
|
4dd22fa282 | ||
|
|
b0fa9e5e3e | ||
|
|
5a977d1a7b | ||
|
|
5b404ebc6b | ||
|
|
5fd1f28b4b | ||
|
|
d2866dae24 | ||
|
|
6464543fb2 | ||
|
|
7933b53287 | ||
|
|
f4ec85adb0 | ||
|
|
cb1f341bb9 | ||
|
|
a2289f4596 | ||
|
|
6a68645f62 | ||
|
|
41ea754510 | ||
|
|
abf153d6a4 | ||
|
|
41453f3916 | ||
|
|
f33b2cbd51 | ||
|
|
cbda6bccf4 | ||
|
|
295e1d0bc9 | ||
|
|
2d869111bc | ||
|
|
1ba795451e | ||
|
|
b0c67177ff | ||
|
|
c2945d86f9 | ||
|
|
571845c5b0 | ||
|
|
33260d51ee | ||
|
|
6c56c2d00f | ||
|
|
c82ebeab7d | ||
|
|
84824170d8 | ||
|
|
e4c617baba | ||
|
|
d681bcfcfb | ||
|
|
fdb8b41fe3 | ||
|
|
b737d6c03e | ||
|
|
ac02543cfe | ||
|
|
0559accac4 | ||
|
|
c05eebf415 | ||
|
|
889ba37ae9 | ||
|
|
6739970530 | ||
|
|
0dea4a301c | ||
|
|
0dac5680c3 | ||
|
|
7b15aefae8 | ||
|
|
cc4fbe1c4d | ||
|
|
264a215573 | ||
|
|
09fbfd5be4 | ||
|
|
9456261cba | ||
|
|
ebb9cde924 | ||
|
|
e75d2c6d9f | ||
|
|
a3d9c025e9 | ||
|
|
2582e5e0c1 | ||
|
|
719e7154a1 | ||
|
|
a971751238 | ||
|
|
e2044c958b | ||
|
|
5085e3d1b2 | ||
|
|
1a07ee8d6a | ||
|
|
04a956ab8f | ||
|
|
8be69305ca | ||
|
|
a042165133 | ||
|
|
fc17f113d8 | ||
|
|
7601beb592 | ||
|
|
148ac23c0d | ||
|
|
a0008d6764 | ||
|
|
302b43641f | ||
|
|
bfd4645a72 | ||
|
|
c1d6d0d4a1 | ||
|
|
894ef6e1bd | ||
|
|
397cee3a12 | ||
|
|
164c239a52 | ||
|
|
d090c6b77a | ||
|
|
750657064a | ||
|
|
e1c6168682 | ||
|
|
3d1375deee | ||
|
|
a78d594b73 | ||
|
|
559de96cc0 | ||
|
|
6e07ce50dd | ||
|
|
04c9d0a3c1 | ||
|
|
05c79326be | ||
|
|
3f246cc189 | ||
|
|
a12c95990b | ||
|
|
648a2e58b0 | ||
|
|
96fa957ef5 | ||
|
|
66f89c50d6 | ||
|
|
7e86ff1bb0 | ||
|
|
8a37350e94 | ||
|
|
03b0742ad3 | ||
|
|
600bf8c4b3 | ||
|
|
f8a990051b | ||
|
|
d879a94a15 | ||
|
|
527f26aac9 | ||
|
|
f8a949217b | ||
|
|
65443a93c6 | ||
|
|
bb541e3e7c | ||
|
|
a0abf65115 | ||
|
|
e8c0084606 | ||
|
|
434b1ab8e6 | ||
|
|
d530977347 | ||
|
|
461691ef0e | ||
|
|
2a47c185c6 | ||
|
|
ebc4c37e78 | ||
|
|
fac56eea48 | ||
|
|
ca64f86ff8 | ||
|
|
41ccb6fe30 | ||
|
|
a1a982a2fb | ||
|
|
f56eea8e45 | ||
|
|
160fc0122c | ||
|
|
3f243f65ab | ||
|
|
329a659739 | ||
|
|
f490e43442 | ||
|
|
72282b8780 | ||
|
|
5ecc959180 | ||
|
|
6ed4818996 | ||
|
|
19b9510bed | ||
|
|
156371540f | ||
|
|
7027eb5e8a | ||
|
|
5f7db27559 | ||
|
|
4565d31222 | ||
|
|
68478c8b8c | ||
|
|
af5d4b9f22 | ||
|
|
48305903b3 | ||
|
|
b91827e029 | ||
|
|
c0c70cac7a | ||
|
|
efce9ba930 | ||
|
|
c960ee6070 | ||
|
|
fa166a65d7 | ||
|
|
3800aa5418 | ||
|
|
91149769e4 | ||
|
|
e6a913c3bd | ||
|
|
238d002f34 | ||
|
|
601c5e2671 | ||
|
|
51242877e5 | ||
|
|
5813a6d2d3 | ||
|
|
48a69cd5df | ||
|
|
6936398b0a | ||
|
|
d4bcc2b3bb | ||
|
|
8c101982e0 | ||
|
|
d87ffbc1b0 | ||
|
|
ee525b6477 | ||
|
|
f335554254 | ||
|
|
6948f9031d | ||
|
|
ff7f1ea721 | ||
|
|
a0091652a5 | ||
|
|
1899bee1b9 | ||
|
|
5955dd75de | ||
|
|
eebb3717e0 | ||
|
|
d525d1a5b1 | ||
|
|
1fb1d57ca8 | ||
|
|
4a3b92b305 | ||
|
|
9453fa908a | ||
|
|
c4e8388742 | ||
|
|
51637fcc43 | ||
|
|
059595f021 | ||
|
|
1fe45e84b0 | ||
|
|
eee1ab84dc | ||
|
|
5984227b20 | ||
|
|
eccb6983b7 | ||
|
|
0e806d485c | ||
|
|
d8d1af03b5 | ||
|
|
c715f9ee1d | ||
|
|
bdff72668e | ||
|
|
f4af02bb24 | ||
|
|
08436ddf7f | ||
|
|
56692aa84c | ||
|
|
6e01fe6e2a | ||
|
|
45b2ecb20a | ||
|
|
d0a5b622ca | ||
|
|
baae7b0301 | ||
|
|
9d3531842b | ||
|
|
30ff717be4 | ||
|
|
a3488f6c39 | ||
|
|
db63599833 | ||
|
|
1c156c4005 | ||
|
|
9d14f3f9ee | ||
|
|
9e425e1c5b | ||
|
|
263171f80e | ||
|
|
6b40b7f966 | ||
|
|
2496ce5229 | ||
|
|
025c904695 | ||
|
|
05af0e0bf3 | ||
|
|
17c6a1ec50 | ||
|
|
e5e22bb1f2 | ||
|
|
e65e666ece | ||
|
|
39a1ced25e | ||
|
|
cb10857970 | ||
|
|
28fc73b046 | ||
|
|
386ddb8e6b | ||
|
|
1bb5f644f1 | ||
|
|
b7bf336453 | ||
|
|
b4a2bc084e | ||
|
|
3817f138f8 | ||
|
|
fded4957db | ||
|
|
d59d6b7d7d | ||
|
|
23ed93817f | ||
|
|
63899a8810 | ||
|
|
c871bb7b9f | ||
|
|
dc025d9365 | ||
|
|
99ec2c6c0f | ||
|
|
6a8994ee0e | ||
|
|
3b7a01b804 | ||
|
|
b5c1a6644c | ||
|
|
9994816676 | ||
|
|
2469b89ee6 | ||
|
|
e455798019 | ||
|
|
e0d446c533 | ||
|
|
3b5a9b07c4 | ||
|
|
1bfcae1ac3 | ||
|
|
1fd07c94af | ||
|
|
209e8fc659 | ||
|
|
e696053e23 | ||
|
|
147c96da67 | ||
|
|
fef87cfa0a | ||
|
|
98c52bcbbb | ||
|
|
274a7e24f3 | ||
|
|
7b7f10e657 | ||
|
|
b010f9c99c | ||
|
|
c868af2e57 | ||
|
|
1fa568916f | ||
|
|
f93306721f | ||
|
|
724fc526bf | ||
|
|
c3fd1d5731 | ||
|
|
cf5cd6fb6b | ||
|
|
a27029d1af | ||
|
|
d54c8f16e6 | ||
|
|
94ace1c4b0 | ||
|
|
4d175324f2 | ||
|
|
fb1aaf1e4e | ||
|
|
8507fdf371 | ||
|
|
28811d26df | ||
|
|
8e3b60f63d | ||
|
|
c63cb1846c | ||
|
|
e17f92ee3a | ||
|
|
a9ca01e3fd | ||
|
|
fb3f3ef26f | ||
|
|
2f25c1ab90 | ||
|
|
7e5e9fcc62 | ||
|
|
c7324182ad | ||
|
|
53cfc2cc96 | ||
|
|
399e99630c | ||
|
|
ffc4795258 | ||
|
|
4b84986671 | ||
|
|
f662657db1 | ||
|
|
2c838143ba | ||
|
|
ecc42ac4f2 | ||
|
|
6775bd259d | ||
|
|
d021e6bc5e | ||
|
|
fd9300d3b7 | ||
|
|
c8c8130ae3 | ||
|
|
497482d4dc | ||
|
|
25e2d5ca69 | ||
|
|
15dd62d659 | ||
|
|
c7329fbd38 | ||
|
|
f1589b8d66 | ||
|
|
9fda604fb8 | ||
|
|
e0b7dcda83 | ||
|
|
6e3d031e80 | ||
|
|
3f317f5b32 | ||
|
|
5b246ca080 | ||
|
|
f40c8ccafb | ||
|
|
3ab1c1a131 | ||
|
|
9e1e675fc3 | ||
|
|
ba84383764 | ||
|
|
8690df1d28 | ||
|
|
9c48dee4ea | ||
|
|
bcb451a416 | ||
|
|
b5da35ee4e | ||
|
|
d81223cd10 | ||
|
|
5d2f053769 | ||
|
|
9965dc74db | ||
|
|
386b2fcc78 | ||
|
|
e9710ead93 | ||
|
|
2d10477565 | ||
|
|
3d35361666 | ||
|
|
04a4dd179b | ||
|
|
676d0fdf3f | ||
|
|
219954c07c | ||
|
|
3b03ed58e4 | ||
|
|
8819952b2f | ||
|
|
e95a4d84d0 | ||
|
|
74151ffa5b | ||
|
|
726fa5c85e | ||
|
|
e83987b35d | ||
|
|
76b1a6fee4 | ||
|
|
c9506f0f39 | ||
|
|
a57344e585 | ||
|
|
1d24d0c476 | ||
|
|
69be873ff3 | ||
|
|
5533d35cef | ||
|
|
9acbe83d5b | ||
|
|
8142b56fb8 | ||
|
|
0d1644282f | ||
|
|
4cff905375 | ||
|
|
56eb1ccff6 | ||
|
|
5cc8b9958c | ||
|
|
ef743728ab | ||
|
|
6e680589de | ||
|
|
89ccbec1dd | ||
|
|
070393a06f | ||
|
|
e7358f8ff8 | ||
|
|
e94b284c59 | ||
|
|
ff5fc9d582 | ||
|
|
bcfd81f489 | ||
|
|
d4373c2d09 | ||
|
|
f64524916d | ||
|
|
fee050b391 | ||
|
|
1855186f85 | ||
|
|
9dec19ba00 | ||
|
|
0d57635607 | ||
|
|
c8d0332c60 | ||
|
|
0fe45fe899 | ||
|
|
7c5a3ee7fc | ||
|
|
efba2c39ce | ||
|
|
176a685e2d | ||
|
|
8759103c94 | ||
|
|
cf440d3c77 | ||
|
|
9a8ea4a165 | ||
|
|
e80ae0bb07 | ||
|
|
818091f54d | ||
|
|
0dd2b18b56 | ||
|
|
5035a531c5 | ||
|
|
08aa6d1730 | ||
|
|
5c9fb98bcf | ||
|
|
2f5a188497 | ||
|
|
236710df4e | ||
|
|
f869dc6f74 | ||
|
|
edef04dce7 | ||
|
|
dbddc32c1b | ||
|
|
b48de0fe42 | ||
|
|
fccf4a97fb | ||
|
|
ec099d769f | ||
|
|
6a3e6c2b2e | ||
|
|
bc870ab764 | ||
|
|
407bb3744c | ||
|
|
a227fa9443 | ||
|
|
638a9be903 | ||
|
|
2276c3571d | ||
|
|
e670061518 | ||
|
|
2bd84bf25c | ||
|
|
e43c1bc911 | ||
|
|
5cd4fa5488 | ||
|
|
eb11f3324f | ||
|
|
50b4da40b8 | ||
|
|
6fae5bbc18 | ||
|
|
c331c5d26a | ||
|
|
a42842841e | ||
|
|
42651f6eda | ||
|
|
e8e6f671ef | ||
|
|
a5b4a3504a | ||
|
|
360c05d9e3 | ||
|
|
105966cc29 | ||
|
|
5d36e0c450 | ||
|
|
8814a4bfb9 | ||
|
|
bbc98b5cd3 | ||
|
|
505ac31533 | ||
|
|
e720c27b71 | ||
|
|
8e20b5e9cd | ||
|
|
6c91c5f807 | ||
|
|
fdad7e1408 | ||
|
|
57e1f4b79e |
31
.asf.yaml
31
.asf.yaml
@ -1,7 +1,7 @@
|
||||
# https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
|
||||
# https://github.com/apache/infrastructure-asfyaml/blob/main/README.md
|
||||
|
||||
github:
|
||||
description: "Mirror of Apache POI subversion. The Java API for Microsoft Documents."
|
||||
description: "Mirror of Apache POI gitbox. The Java API for Microsoft Documents."
|
||||
homepage: https://poi.apache.org/
|
||||
labels:
|
||||
- poi
|
||||
@ -14,10 +14,35 @@ github:
|
||||
- powerpoint
|
||||
- visio
|
||||
|
||||
dependabot_alerts: true
|
||||
dependabot_updates: false
|
||||
|
||||
features:
|
||||
# Enable wiki for documentation
|
||||
wiki: false
|
||||
# Enable issue management
|
||||
issues: false
|
||||
issues: true
|
||||
# Enable projects for project management boards
|
||||
projects: false
|
||||
# Enable github discussions
|
||||
discussions: true
|
||||
|
||||
enabled_merge_buttons:
|
||||
squash: true
|
||||
merge: false
|
||||
rebase: true
|
||||
|
||||
protected_branches:
|
||||
trunk: {}
|
||||
5.5.x: {}
|
||||
asf-site: {}
|
||||
|
||||
notifications:
|
||||
commits: commits@poi.apache.org
|
||||
issues: dev@poi.apache.org
|
||||
pullrequests: dev@poi.apache.org
|
||||
discussions: dev@poi.apache.org
|
||||
jobs: dev@poi.apache.org
|
||||
|
||||
publish:
|
||||
whoami: asf-site
|
||||
|
||||
8
.github/workflows/test-gradle.yml
vendored
8
.github/workflows/test-gradle.yml
vendored
@ -5,9 +5,9 @@ name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ trunk ]
|
||||
branches: [ trunk, 5.5.x ]
|
||||
pull_request:
|
||||
branches: [ trunk ]
|
||||
branches: [ trunk, 5.5.x ]
|
||||
|
||||
permissions: {}
|
||||
|
||||
@ -17,10 +17,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
|
||||
84
KEYS
84
KEYS
@ -2545,14 +2545,12 @@ bpjAhwE2YmGQ7oB+3V798HtAmceRNf8AY0GWrZswJlg7xUn+WJNwQ9uIHI1fxYHx
|
||||
2Nr+AmDDs6ZOEI5zhwxioePw/Cg=
|
||||
=9lKb
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
pub rsa2048 2018-05-02 [SC] [expires: 2024-05-25]
|
||||
6BA4 DA8B 1C88 A494 28A2 9C3D 0C69 C1EF 4118 1E13
|
||||
uid [ultimate] PJ Fanning <fanningpj@yahoo.com>
|
||||
sig 3 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
|
||||
uid [ultimate] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org>
|
||||
sig 3 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
|
||||
sub rsa2048 2018-05-02 [E] [expires: 2024-05-25]
|
||||
sig 0C69C1EF41181E13 2022-04-06 PJ Fanning <fanningpj@yahoo.com>
|
||||
pub rsa2048 2018-05-02 [SC] [expires: 2026-05-11]
|
||||
6BA4DA8B1C88A49428A29C3D0C69C1EF41181E13
|
||||
uid [ unknown] PJ Fanning (http://www.apache.org/) <fanningpj@apache.org>
|
||||
uid [ unknown] PJ Fanning (GitHub noreply address) <pjfanning@users.noreply.github.com>
|
||||
uid [ unknown] PJ Fanning <fanningpj@yahoo.com>
|
||||
sub rsa2048 2018-05-02 [E] [expires: 2026-05-11]
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
@ -2561,37 +2559,45 @@ ARFmtFPnwYwLTdz3ECqWWsC3RkI62079DweNasXV8nBz9sUt6mQqSMx3W/s6389/
|
||||
k9iywPLvhHH7rpp05js8zwJoA8Fr1YwPtBjyhrxl58LQ5ihd/1f2ud2tnwQw1dI2
|
||||
8fuTS3QaKP4Zdx2diD5rYhkAecWaFRwxn1L7Tye5dfD1uPElPCHGKqfaeQXtl01u
|
||||
TOwYB1p9tKPHvfni1qgD3QLWUJ2oyBGSA9IgEF5rm8LtR6vADKQwORjg99a7HE2h
|
||||
lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0OlBKIEZhbm5pbmcgKGh0
|
||||
dHA6Ly93d3cuYXBhY2hlLm9yZy8pIDxmYW5uaW5ncGpAYXBhY2hlLm9yZz6JAVQE
|
||||
EwEIAD4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRrpNqLHIiklCiinD0M
|
||||
acHvQRgeEwUCYk2YRAUJC2h2bgAKCRAMacHvQRgeE7nTB/4tZq9/gQcpCKgPVKI8
|
||||
MKtY/NWOc9nRr5LrNjY/qFU2Z2gMoUQT1fIBm6gjd9iI92QgLMeekuR2fXBBOx3y
|
||||
JbiklXfQVGytEOochkemylwtaCZTHB61KWkemDfS+YeG3qBKwFa5B+zJvp7LqYdQ
|
||||
GrNFFgtHwkhNiviDN7JFxsMGM2IpopgvNYB72B35q3YnrDsgDNlD3eraKU25sMx7
|
||||
2vNHABrdHzd1ZnKDA1hSV6any5Ifw4NJsPaM0RrmwuwoWkL7WHPftbqkM0zy6RIe
|
||||
O+2tlKsJ6cKfOCYL9fbS7/UmkVVcrSLpJCCwmdsra3/57uha7TofDvl+R32CWzrv
|
||||
yWfXtCBQSiBGYW5uaW5nIDxmYW5uaW5ncGpAeWFob28uY29tPokBVAQTAQgAPgIb
|
||||
AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4T
|
||||
BQJiTZhKBQkLaHZuAAoJEAxpwe9BGB4T58UH/RBEOnA9TDTKTi7T4y+R1/q2SUp+
|
||||
tMzv91jhmlaDvNnA2lGVFNGj1tdy1O7xoCEEw9diKCVqVwHecuBQCaLI70r1W4Qw
|
||||
qixjKJwDDnPoMKfhjuvHEHRZV0Pg+uZ50DxkFNn+bPPlXABGelliAPTvetK3ELPJ
|
||||
EIRzVJkFsS0McHwXJgmIPAz8ZVlwd1/Xu21MIKOkPzgXML7uq4PN++L+mM4RmpGU
|
||||
phOetyxLO1xf6ZixCoUnA7Ayi0hAKUAhu9acuc8SoDacfKm1EQ26SHUhOTNm0YCH
|
||||
PPfucHJbUgqSUOYjkEftOtT0ZqVGWS7tR3iEIJu90MJ6SJRovag7khCsYY65AQ0E
|
||||
Wulz1gEIAORuS4e+Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7
|
||||
ri3isWgOleP+REJJPfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRP
|
||||
TaIOe9iQgfQzDw6mqsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdk
|
||||
EGO7qZTqNUCeH4Znm/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/Hd
|
||||
sjKIA0OpDyWE7Ek/SO+/CvkylwaOcmkuf33ADNjpF4BsBxn7L9XI1WJDtRaMkpbq
|
||||
MsymIxi35VUOGD+ms+72CcUStfYj4NEAEQEAAYkBPAQYAQgAJgIbDBYhBGuk2osc
|
||||
iKSUKKKcPQxpwe9BGB4TBQJiTZhrBQkLaHaVAAoJEAxpwe9BGB4TfjUH/24Q/H5u
|
||||
vXlb/Dpx4eFcyLhRVgREoMwwAlzM5GKInHO1W7SHeD7iVR8H1XQVHTgUBNBQ1bUd
|
||||
f2R2fyNAbSgCP9VooN6Q/+uTjRsm5gRD7KY5NHxjTC/SZMwKNy/haXQk/qSjDLUy
|
||||
cD/2fQovuSLgoqZrTvyvz9e4JhFPk0i1it7I6KWnyyLGOItKc3Cv4p/vkD1ldYKN
|
||||
XBhAxmErC9KHQK8pNi8y5z+F1JuZV74i3FRWa+3L2730qIDfR9K3jGIqOow59iqZ
|
||||
c8cQLjcGU9lL4dzHh5Hcph8OC5U2aZaJOuMpCndD6XXPvq5/3QQU5rMqP//6tuVi
|
||||
aAMwT8RaYPiJJPI=
|
||||
=2Ips
|
||||
lDBZi/tmu23fgWSioiy084fB5GqmApK/681DABEBAAG0SFBKIEZhbm5pbmcgKEdp
|
||||
dEh1YiBub3JlcGx5IGFkZHJlc3MpIDxwamZhbm5pbmdAdXNlcnMubm9yZXBseS5n
|
||||
aXRodWIuY29tPokBVwQTAQgAQQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIX
|
||||
gBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYbdBQkPGNgHAAoJEAxpwe9BGB4T
|
||||
5Z4H/3sDqi2QozHbsUy2dm+xS105bpmiNn3aDYzEyjOBggypDWpG5fmlD6ya3Yfd
|
||||
H172auahZ1SK6t7Q7u97QdtrvMKTVBBq+DahkHnvw4nsPwBI00aTy616of1+CirZ
|
||||
lDPo912aLrWlouizuy6qeJE0EfB0PGXtuZP3E0yZHqgmIOBrQw5fJQtrka5WWK3C
|
||||
AqO2Z1hZLh9ftheJtKSYX1gZnPEAWs3ZBG2tCk4+qAjB8y5kRvrJFpC36FkisYlg
|
||||
YTtAOSMHED/3YFsDsXFvLmrSkNBImjdAnRW59TD5XUgEMDZ9Dylz3/b4/gtNi2SX
|
||||
9WSYWC60/3Jgxh4u3cTUnUtW2yC0IFBKIEZhbm5pbmcgPGZhbm5pbmdwakB5YWhv
|
||||
by5jb20+iQFUBBMBCAA+AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEa6Ta
|
||||
ixyIpJQoopw9DGnB70EYHhMFAmYlhuUFCQ8Y2AcACgkQDGnB70EYHhOecwgApleV
|
||||
9IOazPAk8pF0WfkslRWNrGHzaGoqO+WVhMS4doxR8bjqkrHwuI4c8Z2vCCMnKqb1
|
||||
LF7djz9GXFGklvoyV7rQYrDx15bYWjtassvM4KExcnoPGxx9Kb7f0j0WSZwtwMUl
|
||||
XWvsrS0+BkbRz+PIpGtDJhlI++aRoZdWCz5j5st5HzmacC0GVuYGvRPj8uMW2LN5
|
||||
5HvGzlzqWIQ7l68KQPz7g5KIFKUrCPyzZS0m8Nj+gRWhF3+u3/1SY2hoCzobSMJj
|
||||
PNhEovdpi8h5qbUOpHn2OM7l8/nioRaJwAmcMTnmlh1lqeyxIFYnFIBT24o3aEtN
|
||||
N2d1xg/moXvzNTq7yrQ6UEogRmFubmluZyAoaHR0cDovL3d3dy5hcGFjaGUub3Jn
|
||||
LykgPGZhbm5pbmdwakBhcGFjaGUub3JnPokBVAQTAQgAPgIbAwULCQgHAgYVCgkI
|
||||
CwIEFgIDAQIeAQIXgBYhBGuk2osciKSUKKKcPQxpwe9BGB4TBQJmJYblBQkPGNgH
|
||||
AAoJEAxpwe9BGB4TgwMIAJj3aQYKSxt9iyIP5nFhIWAFSPZcZ0gRB6jYMuANVoJE
|
||||
yelbhIziN2dXLOjHWpia2x9p7krxY6ZLtogkL4MjfVpCaaXwsaYOq6LeuPN27/Pt
|
||||
9rRcDz7j5lA9u9MShc6O8lwNbVReCWR08H0oiEdS09xwZY3aiZniptRBeK+mcsNc
|
||||
Zw7kNmPHC79WaI6Rb/qnPLHJDD0l8vrVSShgmEeVJJoC/YjuVzKoiy2BmjSOpOLF
|
||||
d88NlquWbvLO6j2tzboUs+93Kc4MwG57hwRIqS7wfsENkecSRj23KQN0UOpxgwz7
|
||||
b0+ii9F9jsddEqqpXspcM8zaacf+FpIwO6rk7v1U8LG5AQ0EWulz1gEIAORuS4e+
|
||||
Ek+d+0gBMlnigNJ2HoQalKFaERf5K/iQZY4E6Z2ahJ4UFIj7ri3isWgOleP+REJJ
|
||||
PfeSrWQ5XgdklDlHHyv4O5iMkEFWQHttiaTuvdomDncQrNRPTaIOe9iQgfQzDw6m
|
||||
qsb7ZWd5ICA8Krd97BwNHjq/CZ9+WrU6GDc6ImissLVVGGdkEGO7qZTqNUCeH4Zn
|
||||
m/00mNMI4OH8xkwA2vzV5o3J5116zIuv29XQDtcSM+9NQ/HdsjKIA0OpDyWE7Ek/
|
||||
SO+/CvkylwaOcmkuf33ADNjpF4BsBxn7L9XI1WJDtRaMkpbqMsymIxi35VUOGD+m
|
||||
s+72CcUStfYj4NEAEQEAAYkBPAQYAQgAJgIbDBYhBGuk2osciKSUKKKcPQxpwe9B
|
||||
GB4TBQJmJYcPBQkPGNg5AAoJEAxpwe9BGB4TTswH/3RmARIBV2LV72Sqk3rBcKLG
|
||||
mY808npRuL6tQDVnrFPl9J8Q1/zItINYUc+2p8rHPW/N/5vyun4oVF9mT+Swqmuy
|
||||
FkciQ8vCTdPlocGsGmb8eIKSvkzyRb3B8RkiXq2btDQBCVqVWbB6fh3FSI8L5442
|
||||
r/IAQOKyd5wDGP2vDt1wGQ+0aV60gO2lWXOMi6U7dvt/+9vFaMciNdeZt7llNFIF
|
||||
OzQuaMAqRP8viuuA29GAsy59x92LWEhm6RRSyU6rMGqfhbHQEs6FZ0x6zuBq8Ru7
|
||||
T9wf/cc6uGGG6BqnjxFbWL/g9XJeU8gDxQ+ElJbYDXHT255g8kb92mHbJziPbxM=
|
||||
=WUaV
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
pub 2048R/1556F3A4 2016-10-04
|
||||
uid Greg Woolsey <gwoolsey@apache.org>
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
|
||||
Apache POI
|
||||
======================
|
||||
# Apache POI™
|
||||
|
||||
A Java library for reading and writing Microsoft Office binary and OOXML file formats.
|
||||
|
||||
@ -35,36 +33,45 @@ And lower-level, supporting components:
|
||||
| Components named H??F are for reading or writing OLE2 binary formats.
|
||||
| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats.
|
||||
|
||||
Getting started
|
||||
------------------
|
||||
# Getting started
|
||||
|
||||
Website: https://poi.apache.org/
|
||||
|
||||
`Mailing lists`_:
|
||||
[Mailing lists](https://poi.apache.org/mailinglists.html):
|
||||
|
||||
* `Developers`_
|
||||
* `Users`_
|
||||
* `General`_ (release announcements)
|
||||
* [Developers](https://lists.apache.org/list.html?dev@poi.apache.org)
|
||||
* [Users](https://lists.apache.org/list.html?user@poi.apache.org) Including Announcements
|
||||
* [General](https://lists.apache.org/list.html?general@poi.apache.org)
|
||||
|
||||
Bug tracker:
|
||||
## Bug trackers
|
||||
|
||||
* `Bugzilla`_
|
||||
* `GitHub pull requests`_
|
||||
* [Bugzilla](https://bz.apache.org/bugzilla/buglist.cgi?product=POI)
|
||||
* [GitHub](https://github.com/apache/poi/issues)
|
||||
|
||||
Source code:
|
||||
## Source code
|
||||
|
||||
* Official `Apache Subversion repo`_ at apache.org
|
||||
* `ViewVC repo browser`_ at apache.org
|
||||
* `GitHub git mirror`_ at github.com
|
||||
* https://github.com/apache/poi
|
||||
|
||||
Requires Java 1.8 or later.
|
||||
Requires Java 11 or later. `trunk` branch is used for 6.0.0 development. POI 4 and 5 releases require Java 8 or later.
|
||||
|
||||
Contributing
|
||||
------------------
|
||||
|
||||
* Download and install svn or git, Java JDK 1.8+, and Apache Ant 1.8+ or Gradle
|
||||
## Jars
|
||||
|
||||
* Check out the code from svn or git
|
||||
A good resource for finding the published jars and forming build tool dependency definitions is https://mvnrepository.com/artifact/org.apache.poi.
|
||||
|
||||
* poi - main jar, including shared interfaces
|
||||
* poi-scratchpad - extra classes to support legacy MS file formats (`H**F`)
|
||||
* poi-ooxml - support for newer OOXML file formats (`X**F`)
|
||||
* poi-ooxml-lite - generated classes based on MS XSDs used by poi-ooxml (only includes the most commonly used classes)
|
||||
* poi-ooxml-full - generated classes based on MS XSDs (can be used instead of poi-ooxml-lite if you need support for less commonly used features)
|
||||
* poi-excelant - tools for working with Excel files in Apache Ant scripts
|
||||
* poi-examples
|
||||
|
||||
# Contributing
|
||||
|
||||
* Download and install git, Java JDK 11+, and Apache Ant 1.8+ or Gradle
|
||||
|
||||
* Check out the code from git
|
||||
|
||||
* Import the project into Eclipse or your favorite IDE
|
||||
|
||||
@ -82,25 +89,12 @@ Contributing
|
||||
* Scratchpad (Binary formats): poi-scratchpad/src/main/java/org/apache/poi/
|
||||
* Examples: poi-examples/src/main/java/org/apache/poi/
|
||||
|
||||
* More info: `How To Build page`_ at apache.org
|
||||
* More info: [How To Build page](https://poi.apache.org/devel/)
|
||||
|
||||
Building jar files
|
||||
------------------
|
||||
# Building jar files
|
||||
|
||||
To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples::
|
||||
|
||||
./gradlew jar
|
||||
|
||||
gradlew jar
|
||||
|
||||
.. _Mailing lists: https://poi.apache.org/mailinglists.html
|
||||
.. _Developers: https://lists.apache.org/list.html?dev@poi.apache.org
|
||||
.. _Users: https://lists.apache.org/list.html?user@poi.apache.org
|
||||
.. _General: https://lists.apache.org/list.html?general@poi.apache.org
|
||||
.. _Bugzilla: https://bz.apache.org/bugzilla/buglist.cgi?product=POI
|
||||
.. _GitHub pull requests: https://github.com/apache/poi/pulls
|
||||
|
||||
.. _Apache Subversion repo: https://svn.apache.org/repos/asf/poi/trunk
|
||||
.. _ViewVC repo browser: https://svn.apache.org/viewvc/poi/trunk
|
||||
.. _GitHub git mirror: https://github.com/apache/poi
|
||||
.. _How To Build page: http://poi.apache.org/devel/
|
||||
@ -1,4 +1,9 @@
|
||||
# Security
|
||||
|
||||
If you suspect you have found a security vulnerability in Apache POI code, please read https://www.apache.org/security/
|
||||
for how to report the issue. Please do not report the details publicly until the report is reviewed.
|
||||
for how to report the issue. Please do not report the details publicly until the report is reviewed.
|
||||
|
||||
## Secure Processing
|
||||
|
||||
We strongly discourage users of Apache POI from using the lib to parse documents from untrusted sources. For more details,
|
||||
please read https://poi.apache.org/security.html.
|
||||
310
build.gradle
310
build.gradle
@ -24,26 +24,33 @@ import javax.xml.xpath.XPathFactory
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
maven { url = 'https://plugins.gradle.org/m2/' }
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'base'
|
||||
id 'com.dorongold.task-tree' version '2.1.1'
|
||||
id 'org.nosphere.apache.rat' version '0.8.0'
|
||||
id 'com.dorongold.task-tree' version '4.0.1'
|
||||
id 'org.nosphere.apache.rat' version '0.8.1'
|
||||
id 'distribution'
|
||||
id "com.github.spotbugs" version '5.0.14'
|
||||
id 'de.thetaphi.forbiddenapis' version '3.5.1'
|
||||
id 'org.sonarqube' version '4.0.0.2929'
|
||||
id 'org.cyclonedx.bom' version '1.7.4'
|
||||
id 'com.adarshr.test-logger' version '3.2.0'
|
||||
|
||||
// 6.2.0+ requires JDK 11
|
||||
// this is the version of the Gradle plugin, it usually includes a
|
||||
// different version of spotbugs itself
|
||||
// Latest spotbugs: https://github.com/spotbugs/spotbugs
|
||||
// Latest gradle plugin: https://plugins.gradle.org/plugin/com.github.spotbugs
|
||||
id 'com.github.spotbugs' version '6.4.8'
|
||||
|
||||
id 'de.thetaphi.forbiddenapis' version '3.10'
|
||||
id 'org.sonarqube' version '7.2.2.6593'
|
||||
id 'org.cyclonedx.bom' version '2.4.1'
|
||||
id 'com.adarshr.test-logger' version '4.0.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
//maven { url 'https://repository.apache.org/content/repositories/staging' }
|
||||
// maven { url 'https://repository.apache.org/content/repositories/staging' }
|
||||
}
|
||||
|
||||
// Only add the plugin for Sonar if enabled
|
||||
@ -52,7 +59,8 @@ if (project.hasProperty('enableSonar')) {
|
||||
apply plugin: 'org.sonarqube'
|
||||
}
|
||||
|
||||
boolean isCIBuild = false;
|
||||
boolean isCIBuild = false
|
||||
String dateSuffix = new Date().format('yyyyMMdd')
|
||||
|
||||
// For help converting an Ant build to a Gradle build, see
|
||||
// https://docs.gradle.org/current/userguide/ant.html
|
||||
@ -66,8 +74,8 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
antLibs("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
antLibs("org.apache.ant:ant-junitlauncher:1.10.14")
|
||||
antLibs("org.junit.jupiter:junit-jupiter:5.13.4")
|
||||
antLibs("org.apache.ant:ant-junitlauncher:1.10.15")
|
||||
}
|
||||
|
||||
ant.taskdef(name: "junit",
|
||||
@ -76,20 +84,9 @@ ant.taskdef(name: "junit",
|
||||
|
||||
|
||||
wrapper {
|
||||
gradleVersion = '8.3'
|
||||
gradleVersion = '8.14.3'
|
||||
}
|
||||
|
||||
task adjustWrapperPropertiesFile {
|
||||
doLast {
|
||||
ant.replaceregexp(match:'^#.*', replace:'', flags:'g', byline:true) {
|
||||
fileset(dir: project.projectDir, includes: 'gradle/wrapper/gradle-wrapper.properties')
|
||||
}
|
||||
new File(project.projectDir, 'gradle/wrapper/gradle-wrapper.properties').with { it.text = it.readLines().findAll { it }.sort().join('\n') }
|
||||
ant.fixcrlf(file: 'gradle/wrapper/gradle-wrapper.properties', eol: 'lf')
|
||||
}
|
||||
}
|
||||
wrapper.finalizedBy adjustWrapperPropertiesFile
|
||||
|
||||
group = 'org.apache.poi'
|
||||
|
||||
/**
|
||||
@ -99,7 +96,7 @@ allprojects {
|
||||
// apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
|
||||
version = '5.2.4'
|
||||
version = '6.0.0-SNAPSHOT'
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,56 +114,57 @@ subprojects {
|
||||
apply plugin: 'com.adarshr.test-logger'
|
||||
|
||||
ext {
|
||||
bouncyCastleVersion = '1.76'
|
||||
commonsCodecVersion = '1.16.0'
|
||||
commonsCompressVersion = '1.24.0'
|
||||
commonsIoVersion = '2.13.0'
|
||||
bouncyCastleVersion = '1.83'
|
||||
commonsCodecVersion = '1.21.0'
|
||||
commonsCompressVersion = '1.28.0'
|
||||
commonsIoVersion = '2.21.0'
|
||||
commonsMathVersion = '3.6.1'
|
||||
junitVersion = '5.10.0'
|
||||
log4jVersion = '2.20.0'
|
||||
mockitoVersion = '4.11.0'
|
||||
hamcrestVersion = '2.2'
|
||||
xmlbeansVersion = '5.1.1'
|
||||
batikVersion = '1.17'
|
||||
graphics2dVersion = '0.43'
|
||||
pdfboxVersion = '2.0.29'
|
||||
saxonVersion = '11.5'
|
||||
junitVersion = '5.13.4'
|
||||
log4jVersion = '2.25.3'
|
||||
mockitoVersion = '5.21.0'
|
||||
hamcrestVersion = '3.0'
|
||||
xmlbeansVersion = '5.3.0'
|
||||
batikVersion = '1.19'
|
||||
graphics2dVersion = '3.0.5'
|
||||
pdfboxVersion = '3.0.6'
|
||||
saxonVersion = '12.9'
|
||||
xmlSecVersion = '3.0.6'
|
||||
apiGuardianVersion = '1.1.2'
|
||||
|
||||
jdkVersion = (project.properties['jdkVersion'] ?: '8') as int
|
||||
jdkVersion = (project.properties['jdkVersion'] ?: '11') as int
|
||||
// see https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java
|
||||
jdkVendor = (project.properties['jdkVendor'] ?: '') as String
|
||||
|
||||
JAVA9_SRC = 'src/main/java9'
|
||||
JAVA9_OUT = "${buildDir}/classes/java9/main/"
|
||||
JAVA9_OUT = layout.buildDirectory.dir('classes/java9/main/').get().asFile.absolutePath
|
||||
TEST9_SRC = 'src/test/java9'
|
||||
TEST9_OUT = "${buildDir}/classes/java9/test/"
|
||||
VERSIONS9 = 'META-INF/versions/9'
|
||||
TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
|
||||
VERSIONS9 = '/META-INF/versions/9'
|
||||
|
||||
NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true")
|
||||
SAXON_TEST = (findProperty("saxon.test") == "true")
|
||||
}
|
||||
|
||||
configurations {
|
||||
all {
|
||||
configureEach {
|
||||
resolutionStrategy {
|
||||
force "commons-io:commons-io:${commonsIoVersion}"
|
||||
force 'org.slf4j:slf4j-api:2.0.9'
|
||||
force 'com.fasterxml.woodstox:woodstox-core:6.5.1'
|
||||
force 'org.slf4j:slf4j-api:2.0.17'
|
||||
force 'com.fasterxml.woodstox:woodstox-core:7.1.1'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
options.compilerArgs += '-Xlint:unchecked'
|
||||
options.deprecation = true
|
||||
options.incremental = true
|
||||
}
|
||||
tasks.withType(Test) {
|
||||
tasks.withType(Test).configureEach {
|
||||
systemProperty "file.encoding", "UTF-8"
|
||||
}
|
||||
tasks.withType(Javadoc) {
|
||||
tasks.withType(Javadoc).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
tasks.withType(AbstractArchiveTask).configureEach {
|
||||
@ -176,14 +174,18 @@ subprojects {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
//maven { url 'https://repository.apache.org/content/repositories/staging' }
|
||||
// maven { url 'https://repository.apache.org/content/repositories/staging' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
|
||||
api platform("org.apache.logging.log4j:log4j-bom:${log4jVersion}")
|
||||
api 'org.apache.logging.log4j:log4j-api'
|
||||
testImplementation platform("org.junit:junit-bom:${junitVersion}")
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
|
||||
testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}"
|
||||
testImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
|
||||
testImplementation 'org.apache.logging.log4j:log4j-core'
|
||||
|
||||
if (SAXON_TEST) {
|
||||
testRuntimeOnly("net.sf.saxon:Saxon-HE:${saxonVersion}") {
|
||||
@ -210,33 +212,93 @@ subprojects {
|
||||
|
||||
doFirst {
|
||||
options {
|
||||
if (jdkVersion > 8) addBooleanOption('html5', true)
|
||||
addBooleanOption('html5', true)
|
||||
addBooleanOption('Xdoclint:all,-missing', true)
|
||||
links 'https://poi.apache.org/apidocs/dev/'
|
||||
links 'https://docs.oracle.com/javase/8/docs/api/'
|
||||
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
|
||||
links 'https://xmlbeans.apache.org/docs/5.0.0/'
|
||||
links 'https://commons.apache.org/proper/commons-compress/apidocs/'
|
||||
links 'https://www.javadocs.dev/org.apache.commons/commons-compress/1.28.0/'
|
||||
use = true
|
||||
splitIndex = true
|
||||
source = "1.8"
|
||||
source = "11"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// helper-target to get a directory with all third-party libraries
|
||||
// this is used for mass-regression-testing
|
||||
task getDeps(type: Copy) {
|
||||
tasks.register('getDeps', Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'build/runtime/'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
duplicatesStrategy = 'fail'
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
tasks.withType(Jar).configureEach {
|
||||
duplicatesStrategy = DuplicatesStrategy.FAIL
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
doLast {
|
||||
ant.checksum(file: it.archivePath, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
|
||||
ant.checksum(file: it.archivePath, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
|
||||
// make sure we do not have distribution jar-files with different versions
|
||||
// in the build-dir as those lead to strange errors about "duplicate modules"
|
||||
// when building java9 JPMS class files ("java9")
|
||||
ant.delete(failOnError: true, verbose: true) {
|
||||
fileset(dir: "../build/dist/maven/${base.archivesName.get()}", erroronmissingdir: false) {
|
||||
include(name: '*.jar')
|
||||
exclude(name: "*${version}.jar")
|
||||
exclude(name: "*${version}-sources.jar")
|
||||
|
||||
include(name: '*.jar.asc')
|
||||
exclude(name: "*${version}.jar.asc")
|
||||
exclude(name: "*${version}-sources.jar.asc")
|
||||
|
||||
include(name: '*.jar.sha256')
|
||||
exclude(name: "*${version}.jar.sha256")
|
||||
exclude(name: "*${version}-sources.jar.sha256")
|
||||
|
||||
include(name: '*.jar.sha512')
|
||||
exclude(name: "*${version}.jar.sha512")
|
||||
exclude(name: "*${version}-sources.jar.sha512")
|
||||
|
||||
include(name: '*.pom')
|
||||
exclude(name: "*${version}.pom")
|
||||
|
||||
include(name: '*.pom.asc')
|
||||
exclude(name: "*${version}.pom.asc")
|
||||
}
|
||||
}
|
||||
// use failOnError=false for -javadoc and -tests as not all modules create this directory
|
||||
ant.delete(failOnError: false, verbose: true) {
|
||||
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-javadoc", erroronmissingdir: false) {
|
||||
include(name: '*-javadoc.jar')
|
||||
exclude(name: "*${version}-javadoc.jar")
|
||||
|
||||
include(name: '*-javadoc.jar.asc')
|
||||
exclude(name: "*${version}-javadoc.jar.asc")
|
||||
|
||||
include(name: '*-javadoc.jar.sha256')
|
||||
exclude(name: "*${version}-javadoc.jar.sha256")
|
||||
|
||||
include(name: '*-javadoc.jar.sha512')
|
||||
exclude(name: "*${version}-javadoc.jar.sha512")
|
||||
}
|
||||
}
|
||||
ant.delete(failOnError: false, verbose: true) {
|
||||
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-tests", erroronmissingdir: false) {
|
||||
include(name: '*-tests.jar')
|
||||
exclude(name: "*${version}-tests.jar")
|
||||
|
||||
include(name: '*-tests.jar.asc')
|
||||
exclude(name: "*${version}-tests.jar.asc")
|
||||
|
||||
include(name: '*-tests.jar.sha256')
|
||||
exclude(name: "*${version}-tests.jar.sha256")
|
||||
|
||||
include(name: '*-tests.jar.sha512')
|
||||
exclude(name: "*${version}-tests.jar.sha512")
|
||||
}
|
||||
}
|
||||
|
||||
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
|
||||
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,15 +326,19 @@ subprojects {
|
||||
javadocJar {
|
||||
// if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
|
||||
// in the module-path
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-javadoc")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-javadoc")
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
exclude 'META-INF/services/**'
|
||||
}
|
||||
|
||||
test {
|
||||
// use US locale for tests
|
||||
systemProperty "user.language", "en"
|
||||
systemProperty "user.country", "US"
|
||||
|
||||
// make XML test-results available for Jenkins CI
|
||||
useJUnitPlatform()
|
||||
reports {
|
||||
@ -309,10 +375,10 @@ subprojects {
|
||||
]
|
||||
|
||||
// detect if running on Jenkins/CI
|
||||
isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD"));
|
||||
isCIBuild |= Boolean.valueOf(System.getenv("CI_BUILD"))
|
||||
|
||||
if (isCIBuild) {
|
||||
System.out.println("Run with reduced parallelism for CI build");
|
||||
System.out.println("Run with reduced parallelism for CI build")
|
||||
|
||||
jvmArgs += [
|
||||
// Strictly serial
|
||||
@ -355,27 +421,25 @@ subprojects {
|
||||
systemProperties['java.locale.providers'] = 'JRE,CLDR'
|
||||
|
||||
doFirst {
|
||||
if (jdkVersion > 8) {
|
||||
// some options were removed in JDK 18
|
||||
if (jdkVersion < 18) {
|
||||
jvmArgs += [
|
||||
'--illegal-access=warn',
|
||||
]
|
||||
}
|
||||
|
||||
// some options were removed in JDK 18
|
||||
if (jdkVersion < 18) {
|
||||
jvmArgs += [
|
||||
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
|
||||
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
|
||||
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0'
|
||||
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
|
||||
|
||||
'-Dsun.reflect.debugModuleAccessChecks=true',
|
||||
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
|
||||
'--illegal-access=warn',
|
||||
]
|
||||
}
|
||||
|
||||
jvmArgs += [
|
||||
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
|
||||
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
|
||||
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2'
|
||||
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
|
||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
|
||||
|
||||
'-Dsun.reflect.debugModuleAccessChecks=true',
|
||||
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
|
||||
]
|
||||
}
|
||||
|
||||
jacoco {
|
||||
@ -388,7 +452,7 @@ subprojects {
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = '0.8.10'
|
||||
toolVersion = '0.8.13'
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
@ -407,7 +471,7 @@ subprojects {
|
||||
//
|
||||
// Some additional properties are currently set in the Jenkins-DSL, see jenkins/create_jobs.groovy
|
||||
//
|
||||
sonarqube {
|
||||
sonar {
|
||||
properties {
|
||||
// as we currently use build/<module>/ as project-basedir, we need to tell Sonar to use
|
||||
// the root-folder as "basedir" for the projects
|
||||
@ -434,21 +498,20 @@ subprojects {
|
||||
}
|
||||
|
||||
forbiddenApisTest {
|
||||
// forbiddenapis bundled signatures max supported version is 17
|
||||
// also see https://github.com/policeman-tools/forbidden-apis/issues/191
|
||||
targetCompatibility = (JavaVersion.VERSION_17.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_17)
|
||||
// forbiddenapis:3.8 bundled signatures max supported version is 23
|
||||
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
|
||||
}
|
||||
|
||||
forbiddenApisMain {
|
||||
signaturesFiles += files('../src/resources/devtools/forbidden-signatures-prod.txt')
|
||||
targetCompatibility = (JavaVersion.VERSION_17.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_17)
|
||||
targetCompatibility = (JavaVersion.VERSION_23.isCompatibleWith(JavaVersion.current()) ? JavaVersion.current() : JavaVersion.VERSION_23)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
POI(MavenPublication) {
|
||||
groupId 'org.apache.poi'
|
||||
artifactId project.archivesBaseName
|
||||
groupId = 'org.apache.poi'
|
||||
artifactId = base.archivesName.get()
|
||||
|
||||
from components.java
|
||||
|
||||
@ -529,9 +592,9 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
|
||||
generatePomFileForPOIPublication.destination = "../build/dist/maven/${base.archivesName.get()}/${base.archivesName.get()}-${project.version}.pom"
|
||||
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
@ -559,14 +622,14 @@ subprojects {
|
||||
}
|
||||
|
||||
// initial try to provide a combined JavaDoc, grouping is still missing here, though!
|
||||
task allJavaDoc(type: Javadoc) {
|
||||
var prj = [ project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad') ]
|
||||
tasks.register('allJavaDoc', Javadoc) {
|
||||
var prj = [project(':poi'), project(':poi-excelant'), project(':poi-ooxml'), project(':poi-scratchpad')]
|
||||
source prj.collect { it.sourceSets.main.allJava }
|
||||
|
||||
// for possible settings see https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html
|
||||
classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
|
||||
destinationDir = file("${buildDir}/docs/javadoc")
|
||||
maxMemory="2048M"
|
||||
destinationDir = layout.buildDirectory.dir('docs/javadoc').get().asFile
|
||||
maxMemory = "2048M"
|
||||
|
||||
// for possible options see https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
|
||||
options.use = true
|
||||
@ -581,7 +644,7 @@ task allJavaDoc(type: Javadoc) {
|
||||
options.group('SS - Common Spreadsheet Format', 'org.apache.poi.ss*')
|
||||
options.group('HSSF - Horrible Spreadsheet Format', 'org.apache.poi.hssf*')
|
||||
options.group('XSSF - Open Office XML Spreadsheet Format', 'org.apache.poi.xssf*')
|
||||
options.group('SL - Common Slideshow Format', 'org.apache.poi.sl*')
|
||||
options.group('SL - Common Slideshow Format', 'org.apache.poi.sl*')
|
||||
options.group('HSLF - Horrible Slideshow Format', 'org.apache.poi.hslf*', 'org.apache.poi.hwmf*', 'org.apache.poi.hemf*')
|
||||
options.group('XSLF - Open Office XML Slideshow Format', 'org.apache.poi.xslf*')
|
||||
options.group('HWPF - Horrible Word Processor Format', 'org.apache.poi.hwpf*')
|
||||
@ -642,7 +705,9 @@ rat {
|
||||
"osgi/README.md",
|
||||
"src/resources/ooxml-lite-report.*",
|
||||
// ignore svn conflict artifacts
|
||||
"**/module-info.*"
|
||||
"**/module-info.*",
|
||||
"poi-examples/src/main/groovy/settings.gradle",
|
||||
"poi-examples/src/main/groovy/.gradle/**"
|
||||
]
|
||||
|
||||
/*
|
||||
@ -657,21 +722,21 @@ rat {
|
||||
}
|
||||
|
||||
task jenkins(dependsOn: [
|
||||
'replaceVersion',
|
||||
subprojects.build,
|
||||
subprojects.check,
|
||||
subprojects.javadoc,
|
||||
subprojects.jacocoTestReport,
|
||||
subprojects.getDeps,
|
||||
'srcDistZip',
|
||||
'srcDistTar',
|
||||
rat
|
||||
'replaceVersion',
|
||||
subprojects.build,
|
||||
subprojects.check,
|
||||
subprojects.javadoc,
|
||||
subprojects.jacocoTestReport,
|
||||
subprojects.getDeps,
|
||||
'srcDistZip',
|
||||
'srcDistTar',
|
||||
rat
|
||||
]) {}
|
||||
|
||||
task jenkinsLite(dependsOn: [
|
||||
'replaceVersion',
|
||||
subprojects.build,
|
||||
subprojects.test
|
||||
'replaceVersion',
|
||||
subprojects.build,
|
||||
subprojects.test
|
||||
]) {}
|
||||
|
||||
/*task downloadJarsToLibs() {
|
||||
@ -685,14 +750,14 @@ task jenkinsLite(dependsOn: [
|
||||
|
||||
//compileJava.dependsOn 'downloadJarsToLibs'
|
||||
|
||||
task replaceVersion() {
|
||||
tasks.register('replaceVersion') {
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
var version = subprojects[0].version
|
||||
var tokens = [
|
||||
[ 'osgi', 'pom.xml', '(packaging>\\n\\s*<version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}" ],
|
||||
[ 'osgi', 'pom.xml', '(<poi.version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}" ]
|
||||
// [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ]
|
||||
['osgi', 'pom.xml', '(packaging>\\n\\s*<version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}"],
|
||||
['osgi', 'pom.xml', '(<poi.version>)[0-9.]+(?:-SNAPSHOT|-RC\\d+)?', "\\1${version}"]
|
||||
// [ '.', 'build.gradle', ' version = \'[0-9.]+(?:-SNAPSHOT)?\'', " version = '${version}'" ]
|
||||
]
|
||||
|
||||
doLast {
|
||||
@ -716,20 +781,13 @@ task zipJavadocs(type: Zip, dependsOn: allJavaDoc) {
|
||||
archiveExtension = 'jar'
|
||||
}
|
||||
|
||||
tasks.withType(Tar) {
|
||||
tasks.withType(Tar).configureEach {
|
||||
compression = Compression.GZIP
|
||||
archiveExtension = 'tgz'
|
||||
}
|
||||
|
||||
distributions {
|
||||
var version = subprojects[0].version
|
||||
var date = new Date().format('yyyyMMdd')
|
||||
|
||||
var poiDep = project(':poi').configurations.getAt('compileClasspath')
|
||||
var ooxmlImp = project(':poi-ooxml').configurations.getAt('compileClasspath')
|
||||
|
||||
src {
|
||||
distributionBaseName = "poi-src-${version}-${date}"
|
||||
contents {
|
||||
from('.') {
|
||||
exclude '*/build/**'
|
||||
@ -782,7 +840,7 @@ distributions {
|
||||
}
|
||||
}
|
||||
|
||||
task soLinkCheck() {
|
||||
tasks.register('soLinkCheck') {
|
||||
doLast {
|
||||
def path = ant.path {
|
||||
fileset(dir: '.', includes: '**/*.java') {
|
||||
@ -819,12 +877,14 @@ var srcDep = [
|
||||
':poi-ooxml-lite:generateModuleInfo'
|
||||
]
|
||||
|
||||
srcDistTar.setArchiveFileName("apache-poi-src-${subprojects[0].version}-${dateSuffix}.tgz")
|
||||
srcDistZip.setArchiveFileName("apache-poi-src-${subprojects[0].version}-${dateSuffix}.zip")
|
||||
srcDistTar.dependsOn srcDep
|
||||
srcDistZip.dependsOn srcDep
|
||||
soLinkCheck.dependsOn srcDep
|
||||
rat.dependsOn soLinkCheck
|
||||
|
||||
task fixDistDir {
|
||||
tasks.register('fixDistDir') {
|
||||
doLast {
|
||||
ant.mkdir(dir: 'build/dist')
|
||||
ant.move(todir: 'build/dist') {
|
||||
|
||||
559
build.xml
559
build.xml
@ -26,7 +26,7 @@ under the License.
|
||||
To build the documentation you will need to install forrest and set
|
||||
the FORREST_HOME environment variable.
|
||||
|
||||
Since POI 4.0 you will need JDK 1.8 or newer to build and run POI.
|
||||
Since POI 6.0 you will need JDK 11 or newer to build and run POI.
|
||||
|
||||
Some people may find the tests hang when run through Ant. If this
|
||||
happens to you, try giving Ant some more memory when you run it, eg:
|
||||
@ -42,7 +42,7 @@ under the License.
|
||||
|
||||
<description>The Apache POI project Ant build.</description>
|
||||
|
||||
<property name="version.id" value="5.2.4"/>
|
||||
<property name="version.id" value="6.0.0-SNAPSHOT"/>
|
||||
<property name="release.rc" value=""/>
|
||||
|
||||
<property environment="env"/>
|
||||
@ -60,8 +60,8 @@ under the License.
|
||||
|
||||
|
||||
<!-- compiler options -->
|
||||
<property name="jdk.version.source" value="1.8" description="JDK version of source code"/>
|
||||
<property name="jdk.version.class" value="1.8" description="JDK version of generated class files"/>
|
||||
<property name="jdk.version.source" value="11" description="JDK version of source code"/>
|
||||
<property name="jdk.version.class" value="11" description="JDK version of generated class files"/>
|
||||
<property name="compile.debug" value="true"/>
|
||||
|
||||
<condition property="isIBMVM">
|
||||
@ -69,7 +69,7 @@ under the License.
|
||||
</condition>
|
||||
|
||||
<condition property="isJava8" else="false">
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
<equals arg1="${ant.java.version}" arg2="11"/>
|
||||
</condition>
|
||||
|
||||
<!-- add addOpens parameter for Java 9 and higher -->
|
||||
@ -263,92 +263,95 @@ under the License.
|
||||
|
||||
|
||||
<!-- jars in the /lib directory, see the fetch-jars target-->
|
||||
<dependency prefix="main.commons-codec" artifact="commons-codec:commons-codec:1.16.0" usage="main"/>
|
||||
<dependency prefix="main.commons-collections4" artifact="org.apache.commons:commons-collections4:4.4" usage="main"/>
|
||||
<dependency prefix="main.commons-codec" artifact="commons-codec:commons-codec:1.19.0" usage="main"/>
|
||||
<dependency prefix="main.commons-collections4" artifact="org.apache.commons:commons-collections4:4.5.0" usage="main"/>
|
||||
<dependency prefix="main.commons-math3" artifact="org.apache.commons:commons-math3:3.6.1" usage="main"/>
|
||||
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.13.0" usage="main"/>
|
||||
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.20.0" usage="main"/>
|
||||
<dependency prefix="main.com.zaxxer" artifact="com.zaxxer:SparseBitSet:1.3" usage="main"/>
|
||||
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.20.0" usage="main"/>
|
||||
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.3" usage="main"/>
|
||||
|
||||
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-params" artifact="org.junit.jupiter:junit-jupiter-params:5.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.13.4" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.13.4" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-params" artifact="org.junit.jupiter:junit-jupiter-params:5.13.4" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-opentest4j" artifact="org.opentest4j:opentest4j:1.2.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-apiguardian" artifact="org.apiguardian:apiguardian-api:1.1.2" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-pcommons" artifact="org.junit.platform:junit-platform-commons:1.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-pengine" artifact="org.junit.platform:junit-platform-engine:1.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-plauncher" artifact="org.junit.platform:junit-platform-launcher:1.10.0" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-pcommons" artifact="org.junit.platform:junit-platform-commons:1.13.4" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-pengine" artifact="org.junit.platform:junit-platform-engine:1.13.4" usage="main-tests"/>
|
||||
<dependency prefix="main.junit-plauncher" artifact="org.junit.platform:junit-platform-launcher:1.13.4" usage="main-tests"/>
|
||||
|
||||
|
||||
<dependency prefix="main.jmh" artifact="org.openjdk.jmh:jmh-core:1.35" usage="main-tests"/>
|
||||
<dependency prefix="main.jmhAnnotation" artifact="org.openjdk.jmh:jmh-generator-annprocess:1.35" usage="main-tests"/>
|
||||
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:2.2" usage="main-tests"/>
|
||||
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.9.1" usage="main-tests"/>
|
||||
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:4.11.0" usage="main-tests"/>
|
||||
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.14.7" usage="main-tests"/>
|
||||
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.14.7" usage="main-tests"/>
|
||||
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:3.0" usage="main-tests"/>
|
||||
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.10.3" usage="main-tests"/>
|
||||
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:5.20.0" usage="main-tests"/>
|
||||
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.17.5" usage="main-tests"/>
|
||||
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.17.5" usage="main-tests"/>
|
||||
<dependency prefix="main.objenesis" artifact="org.objenesis:objenesis:3.1" usage="main-tests"/>
|
||||
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.20.0" usage="main-tests"/>
|
||||
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.3" usage="main-tests"/>
|
||||
<dependency prefix="main.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="main-tests"/>
|
||||
|
||||
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.14" usage="excelant"/>
|
||||
<dependency prefix="main.antlauncher" artifact="org.apache.ant:ant-launcher:1.10.14" usage="excelant"/>
|
||||
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.15" usage="excelant"/>
|
||||
<dependency prefix="main.antlauncher" artifact="org.apache.ant:ant-launcher:1.10.15" usage="excelant"/>
|
||||
|
||||
<!-- xml signature libs - not part of the distribution -->
|
||||
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.2" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.76" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.76" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.76" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.6" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.82" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.82" usage="ooxml-provided"/>
|
||||
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.82" usage="ooxml-provided"/>
|
||||
<!-- only used for signing the release - not used with the ooxml signatures -->
|
||||
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.76" usage="util"/>
|
||||
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.82" usage="util"/>
|
||||
<dependency prefix="ooxml.test.stax2" artifact="org.codehaus.woodstox:stax2-api:4.2.1" usage="ooxml-provided"/>
|
||||
|
||||
<!-- svg/batik/pdf libs - not part of the distribution - move batik to its own directory because of JPMS module-path issues -->
|
||||
<dependency prefix="svg.xml-apis-ext" artifact="xml-apis:xml-apis-ext:1.3.04" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.xmlgraphics-commons" artifact="org.apache.xmlgraphics:xmlgraphics-commons:2.7" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-anim" artifact="org.apache.xmlgraphics:batik-anim:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-awt-util" artifact="org.apache.xmlgraphics:batik-awt-util:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-bridge" artifact="org.apache.xmlgraphics:batik-bridge:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-codec" artifact="org.apache.xmlgraphics:batik-codec:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-constants" artifact="org.apache.xmlgraphics:batik-constants:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-css" artifact="org.apache.xmlgraphics:batik-css:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-dom" artifact="org.apache.xmlgraphics:batik-dom:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-ext" artifact="org.apache.xmlgraphics:batik-ext:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-gvt" artifact="org.apache.xmlgraphics:batik-gvt:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-i18n" artifact="org.apache.xmlgraphics:batik-i18n:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-parser" artifact="org.apache.xmlgraphics:batik-parser:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-script" artifact="org.apache.xmlgraphics:batik-script:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-shared-resources" artifact="org.apache.xmlgraphics:batik-shared-resources:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svg-dom" artifact="org.apache.xmlgraphics:batik-svg-dom:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svggen" artifact="org.apache.xmlgraphics:batik-svggen:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svgrasterizer" artifact="org.apache.xmlgraphics:batik-svgrasterizer:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-transcoder" artifact="org.apache.xmlgraphics:batik-transcoder:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-util" artifact="org.apache.xmlgraphics:batik-util:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-xml" artifact="org.apache.xmlgraphics:batik-xml:1.17" usage="ooxml-batik"/>
|
||||
<dependency prefix="pdf.pdfbox" artifact="org.apache.pdfbox:pdfbox:2.0.29" usage="ooxml-provided"/>
|
||||
<dependency prefix="pdf.fontbox" artifact="org.apache.pdfbox:fontbox:2.0.29" usage="ooxml-provided"/>
|
||||
<dependency prefix="pdf.graphics2d" artifact="de.rototor.pdfbox:graphics2d:0.43" usage="ooxml-provided"/>
|
||||
<dependency prefix="svg.xmlgraphics-commons" artifact="org.apache.xmlgraphics:xmlgraphics-commons:2.11" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-anim" artifact="org.apache.xmlgraphics:batik-anim:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-awt-util" artifact="org.apache.xmlgraphics:batik-awt-util:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-bridge" artifact="org.apache.xmlgraphics:batik-bridge:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-codec" artifact="org.apache.xmlgraphics:batik-codec:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-constants" artifact="org.apache.xmlgraphics:batik-constants:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-css" artifact="org.apache.xmlgraphics:batik-css:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-dom" artifact="org.apache.xmlgraphics:batik-dom:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-ext" artifact="org.apache.xmlgraphics:batik-ext:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-gvt" artifact="org.apache.xmlgraphics:batik-gvt:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-i18n" artifact="org.apache.xmlgraphics:batik-i18n:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-parser" artifact="org.apache.xmlgraphics:batik-parser:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-script" artifact="org.apache.xmlgraphics:batik-script:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-shared-resources" artifact="org.apache.xmlgraphics:batik-shared-resources:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svg-dom" artifact="org.apache.xmlgraphics:batik-svg-dom:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svggen" artifact="org.apache.xmlgraphics:batik-svggen:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-svgrasterizer" artifact="org.apache.xmlgraphics:batik-svgrasterizer:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-transcoder" artifact="org.apache.xmlgraphics:batik-transcoder:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-util" artifact="org.apache.xmlgraphics:batik-util:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="svg.batik-xml" artifact="org.apache.xmlgraphics:batik-xml:1.19" usage="ooxml-batik"/>
|
||||
<dependency prefix="pdf.pdfbox" artifact="org.apache.pdfbox:pdfbox:3.0.5" usage="ooxml-provided"/>
|
||||
<dependency prefix="pdf.pdfbox.io" artifact="org.apache.pdfbox:pdfbox-io:3.0.5" usage="ooxml-provided"/>
|
||||
<dependency prefix="pdf.fontbox" artifact="org.apache.pdfbox:fontbox:3.0.5" usage="ooxml-provided"/>
|
||||
<dependency prefix="pdf.graphics2d" artifact="de.rototor.pdfbox:graphics2d:3.0.3" usage="ooxml-provided"/>
|
||||
|
||||
<!-- jars in the ooxml-lib directory, see the fetch-ooxml-jars target-->
|
||||
<dependency prefix="ooxml.curvesapi" artifact="com.github.virtuald:curvesapi:1.08" usage="ooxml"/>
|
||||
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:5.1.1" usage="ooxml"/>
|
||||
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.24.0" usage="ooxml"/>
|
||||
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:5.3.0" usage="ooxml"/>
|
||||
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.28.0" usage="ooxml"/>
|
||||
<dependency prefix="ooxml.commons-lang3" artifact="org.apache.commons:commons-lang3:3.18.0" usage="ooxml"/>
|
||||
|
||||
<!-- jars in the ooxml-test-lib directory, see the fetch-ooxml-jars target-->
|
||||
<dependency prefix="ooxml.test.reflections" artifact="org.reflections:reflections:0.10.2" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.guava" artifact="com.google.guava:guava:32.1.1-jre" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.guava" artifact="com.google.guava:guava:33.4.8-jre" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.guava.failureaccess" artifact="com.google.guava:failureaccess:1.0.3" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.javassist" artifact="org.javassist:javassist:3.27.0-GA" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.9" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="ooxml-tests"/>
|
||||
<dependency prefix="ooxml.test.opczip" artifact="com.github.rzymek:opczip:1.2.0" usage="ooxml-tests"/>
|
||||
|
||||
<!-- coverage libs -->
|
||||
<dependency prefix="jacoco" artifact="org.jacoco:jacoco:0.8.10" usage="util" packaging="zip"/>
|
||||
<dependency prefix="jacoco" artifact="org.jacoco:jacoco:0.8.13" usage="util" packaging="zip"/>
|
||||
<dependency prefix="asm" artifact="org.ow2.asm:asm:9.5" usage="util"/>
|
||||
<dependency prefix="asm-commons" artifact="org.ow2.asm:asm-commons:9.5" usage="util"/>
|
||||
<dependency prefix="asm-tree" artifact="org.ow2.asm:asm-tree:9.5" usage="util"/>
|
||||
|
||||
<!-- license and api checks -->
|
||||
<dependency prefix="rat" artifact="org.apache.rat:apache-rat:0.15" usage="util"/>
|
||||
<dependency prefix="rat" artifact="org.apache.rat:apache-rat:0.16.1" usage="util"/>
|
||||
<dependency prefix="forbidden" artifact="de.thetaphi:forbiddenapis:3.5.1" usage="util"/>
|
||||
|
||||
<!-- See https://www.ecma-international.org/publications/standards/Ecma-376.htm -->
|
||||
@ -381,7 +384,7 @@ under the License.
|
||||
<property name="rat.report" value="${rat.reportdir}/report.txt"/>
|
||||
|
||||
<!-- build and distro settings -->
|
||||
<property name="jar.name" value="poi"/>
|
||||
<property name="jar.name" value="apache-poi"/>
|
||||
<property name="build.site" location="build/site"/>
|
||||
<property name="javadocs.report.dir" location="${build.site}/apidocs/dev"/>
|
||||
<property name="dist.dir" location="build/dist"/>
|
||||
@ -395,27 +398,6 @@ under the License.
|
||||
<!-- jars required for maven helper targets -->
|
||||
<dependency prefix="maven.ant" artifact="org.apache.maven:maven-ant-tasks:2.1.3" usage="util"/>
|
||||
|
||||
<!-- subclipse.tigris.org is gone - left-over is hosted at https://bintray.com/openmeetings/maven/org.tigris.subclipse.svnant -->
|
||||
<!-- request will be forwarded to d29vzk4ow07wi7.cloudfront.net which is an Atlassian Marketplace instance -->
|
||||
<dependency prefix="dist.svnant" artifact="org.tigris.subclipse:svnant:1.3.1" usage="util"
|
||||
repo="https://dl.bintray.com/openmeetings/maven"/>
|
||||
|
||||
<!-- hosted at https://bintray.com/subclipse/maven/svnclientadapter - https://github.com/subclipse/svnclientadapter -->
|
||||
<dependency prefix="dist.svnclientadapter-base" artifact="org.tigris.svnclientadapter:adapter-base:1.12.0" usage="util"
|
||||
repo="https://dl.bintray.com/subclipse/maven"/>
|
||||
<dependency prefix="dist.svnclientadapter-svnkit" artifact="org.tigris.svnclientadapter:adapter-svnkit:1.12.0" usage="util"
|
||||
repo="https://dl.bintray.com/subclipse/maven"/>
|
||||
<dependency prefix="dist.svnclientadapter-javahl" artifact="org.tigris.svnclientadapter:adapter-javahl:1.12.0" usage="util"
|
||||
repo="https://dl.bintray.com/subclipse/maven"/>
|
||||
<dependency prefix="dist.svnkit" artifact="org.tmatesoft.svnkit:svnkit:1.10.1" usage="util"/>
|
||||
<dependency prefix="dist.svnkit-javahl16" artifact="org.tmatesoft.svnkit:svnkit-javahl16:1.10.1" usage="util"/>
|
||||
<dependency prefix="dist.sqljet" artifact="org.tmatesoft.sqljet:sqljet:1.1.13" usage="util"/>
|
||||
<dependency prefix="dist.antlr" artifact="org.antlr:antlr-runtime:3.5.2" usage="util"/>
|
||||
<dependency prefix="dist.sequence-library" artifact="de.regnis.q.sequence:sequence-library:1.0.4" usage="util"/>
|
||||
<dependency prefix="dist.lz4-java" artifact="org.lz4:lz4-java:1.7.1" usage="util"/>
|
||||
|
||||
|
||||
|
||||
<propertyset id="junit.properties">
|
||||
<propertyref name="POI.testdata.path"/>
|
||||
<propertyref name="java.awt.headless"/>
|
||||
@ -478,9 +460,11 @@ under the License.
|
||||
<pathelement location="${ooxml.curvesapi.jar}"/>
|
||||
<pathelement location="${ooxml.xmlbeans.jar}"/>
|
||||
<pathelement location="${ooxml.commons-compress.jar}"/>
|
||||
<pathelement location="${ooxml.commons-lang3.jar}"/>
|
||||
<path refid="main.classpath"/>
|
||||
<pathelement location="${main.output.dir}"/>
|
||||
<pathelement location="${ooxml.test.guava.jar}"/>
|
||||
<pathelement location="${ooxml.test.guava.failureaccess.jar}"/>
|
||||
<pathelement location="${ooxml.test.opczip.jar}"/>
|
||||
<!-- classes are omitted on test cases outside the xml-dsign area to avoid classpath poisoning -->
|
||||
<!--path refid="ooxml.xmlsec.classpath"/-->
|
||||
@ -514,6 +498,7 @@ under the License.
|
||||
|
||||
<path id="pdfbox.classpath">
|
||||
<pathelement location="${pdf.pdfbox.jar}"/>
|
||||
<pathelement location="${pdf.pdfbox.io.jar}"/>
|
||||
<pathelement location="${pdf.fontbox.jar}"/>
|
||||
<pathelement location="${pdf.graphics2d.jar}"/>
|
||||
</path>
|
||||
@ -533,6 +518,7 @@ under the License.
|
||||
<path id="test.ooxml.reflections.classpath">
|
||||
<pathelement location="${ooxml.test.reflections.jar}"/>
|
||||
<pathelement location="${ooxml.test.guava.jar}"/>
|
||||
<pathelement location="${ooxml.test.guava.failureaccess.jar}"/>
|
||||
<pathelement location="${ooxml.test.javassist.jar}"/>
|
||||
</path>
|
||||
|
||||
@ -684,11 +670,7 @@ under the License.
|
||||
<fileset dir="${basedir}/lib/main-tests">
|
||||
<include name="byte-buddy-*1.12*.jar"/>
|
||||
<include name="mockito-core-3*.jar"/>
|
||||
<include name="mockito-core-4.0*.jar"/>
|
||||
<include name="mockito-core-4.2*.jar"/>
|
||||
<include name="mockito-core-4.5*.jar"/>
|
||||
<include name="mockito-core-4.6*.jar"/>
|
||||
<include name="mockito-core-4.8*.jar"/>
|
||||
<include name="mockito-core-4*.jar"/>
|
||||
<include name="hamcrest-core*"/>
|
||||
<include name="junit-4*.jar"/>
|
||||
<include name="*slf4j*.jar"/>
|
||||
@ -706,6 +688,7 @@ under the License.
|
||||
<include name="xmlbeans-4*.jar"/>
|
||||
<include name="xmlbeans-5.0*.jar"/>
|
||||
<include name="xmlbeans-5.1.0.jar"/>
|
||||
<include name="xmlbeans-5.2.2.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/lib/ooxml-provided">
|
||||
<include name="bc*-1.6*.jar"/>
|
||||
@ -714,6 +697,7 @@ under the License.
|
||||
<include name="batik*.jar"/>
|
||||
<include name="slf4j*-1.*.jar"/>
|
||||
<include name="xmlsec-2*.jar"/>
|
||||
<include name="xmlgraphics-commons-*.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/lib/ooxml-tests">
|
||||
<include name="guava-20.0.jar"/>
|
||||
@ -725,6 +709,8 @@ under the License.
|
||||
<include name="org.jacoco.*-0.8.5.*.jar"/>
|
||||
<include name="org.jacoco.*-0.8.6.*.jar"/>
|
||||
<include name="org.jacoco.*-0.8.8.*.jar"/>
|
||||
<include name="org.jacoco.*-0.8.10.*.jar"/>
|
||||
<include name="org.jacoco.*-0.8.11.*.jar"/>
|
||||
<include name="forbiddenapis-3.1.jar"/>
|
||||
<include name="forbiddenapis-3.4.jar"/>
|
||||
</fileset>
|
||||
@ -732,6 +718,8 @@ under the License.
|
||||
<include name="jacoco-0.8.5.zip"/>
|
||||
<include name="jacoco-0.8.6.zip"/>
|
||||
<include name="jacoco-0.8.8.zip"/>
|
||||
<include name="jacoco-0.8.10.zip"/>
|
||||
<include name="jacoco-0.8.11.zip"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/lib">
|
||||
<include name="jacoco-*.zip"/>
|
||||
@ -842,8 +830,10 @@ under the License.
|
||||
<available file="${ooxml.curvesapi.jar}"/>
|
||||
<available file="${ooxml.xmlbeans.jar}"/>
|
||||
<available file="${ooxml.commons-compress.jar}"/>
|
||||
<available file="${ooxml.commons-lang3.jar}"/>
|
||||
<available file="${ooxml.test.reflections.jar}"/>
|
||||
<available file="${ooxml.test.guava.jar}"/>
|
||||
<available file="${ooxml.test.guava.failureaccess.jar}"/>
|
||||
<available file="${ooxml.test.javassist.jar}"/>
|
||||
<available file="${ooxml.test.slf4j-api.jar}"/>
|
||||
<available file="${ooxml.test.opczip.jar}"/>
|
||||
@ -870,6 +860,7 @@ under the License.
|
||||
<available file="${svg.batik-xml.jar}"/>
|
||||
<available file="${svg.xmlgraphics-commons.jar}"/>
|
||||
<available file="${pdf.pdfbox.jar}"/>
|
||||
<available file="${pdf.pdfbox.io.jar}"/>
|
||||
<available file="${pdf.fontbox.jar}"/>
|
||||
<available file="${pdf.graphics2d.jar}"/>
|
||||
</and>
|
||||
@ -883,8 +874,10 @@ under the License.
|
||||
<downloadfile src="${ooxml.curvesapi.url}" dest="${ooxml.curvesapi.jar}"/>
|
||||
<downloadfile src="${ooxml.xmlbeans.url}" dest="${ooxml.xmlbeans.jar}"/>
|
||||
<downloadfile src="${ooxml.commons-compress.url}" dest="${ooxml.commons-compress.jar}"/>
|
||||
<downloadfile src="${ooxml.commons-lang3.url}" dest="${ooxml.commons-lang3.jar}"/>
|
||||
<downloadfile src="${ooxml.test.reflections.url}" dest="${ooxml.test.reflections.jar}"/>
|
||||
<downloadfile src="${ooxml.test.guava.url}" dest="${ooxml.test.guava.jar}"/>
|
||||
<downloadfile src="${ooxml.test.guava.failureaccess.url}" dest="${ooxml.test.guava.failureaccess.jar}"/>
|
||||
<downloadfile src="${ooxml.test.javassist.url}" dest="${ooxml.test.javassist.jar}"/>
|
||||
<downloadfile src="${ooxml.test.slf4j-api.url}" dest="${ooxml.test.slf4j-api.jar}"/>
|
||||
<downloadfile src="${ooxml.test.opczip.url}" dest="${ooxml.test.opczip.jar}"/>
|
||||
@ -911,42 +904,11 @@ under the License.
|
||||
<downloadfile src="${svg.xml-apis-ext.url}" dest="${svg.xml-apis-ext.jar}"/>
|
||||
<downloadfile src="${svg.xmlgraphics-commons.url}" dest="${svg.xmlgraphics-commons.jar}"/>
|
||||
<downloadfile src="${pdf.pdfbox.url}" dest="${pdf.pdfbox.jar}"/>
|
||||
<downloadfile src="${pdf.pdfbox.io.url}" dest="${pdf.pdfbox.io.jar}"/>
|
||||
<downloadfile src="${pdf.fontbox.url}" dest="${pdf.fontbox.jar}"/>
|
||||
<downloadfile src="${pdf.graphics2d.url}" dest="${pdf.graphics2d.jar}"/>
|
||||
</target>
|
||||
|
||||
<target name="check-svn-jars">
|
||||
<condition property="svn.jars.present">
|
||||
<or>
|
||||
<and>
|
||||
<available file="${dist.svnant.jar}"/>
|
||||
<available file="${dist.svnclientadapter-base.jar}"/>
|
||||
<available file="${dist.svnclientadapter-svnkit.jar}"/>
|
||||
<available file="${dist.svnclientadapter-javahl.jar}"/>
|
||||
<available file="${dist.svnkit.jar}"/>
|
||||
<available file="${dist.svnkit-javahl16.jar}"/>
|
||||
<available file="${dist.sqljet.jar}"/>
|
||||
<available file="${dist.antlr.jar}"/>
|
||||
<available file="${dist.sequence-library.jar}"/>
|
||||
<available file="${dist.lz4-java.jar}"/>
|
||||
</and>
|
||||
<isset property="disconnected"/>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="fetch-svn-jars" depends="check-svn-jars" unless="svn.jars.present">
|
||||
<!-- some jars are gone since bintray.dl is shutting down, so we started to include them in the sources for now -->
|
||||
<copy todir="lib/util">
|
||||
<fileset dir="lib.stored/" includes="*.jar"/>
|
||||
</copy>
|
||||
<downloadfile src="${dist.svnkit.url}" dest="${dist.svnkit.jar}"/>
|
||||
<downloadfile src="${dist.svnkit-javahl16.url}" dest="${dist.svnkit-javahl16.jar}"/>
|
||||
<downloadfile src="${dist.sqljet.url}" dest="${dist.sqljet.jar}"/>
|
||||
<downloadfile src="${dist.antlr.url}" dest="${dist.antlr.jar}"/>
|
||||
<downloadfile src="${dist.sequence-library.url}" dest="${dist.sequence-library.jar}"/>
|
||||
<downloadfile src="${dist.lz4-java.url}" dest="${dist.lz4-java.jar}"/>
|
||||
</target>
|
||||
|
||||
<target name="check-compiled-ooxml-xsds">
|
||||
<condition property="ooxml-compiled-xsds.present">
|
||||
<and>
|
||||
@ -976,7 +938,7 @@ under the License.
|
||||
<zipfileset src="${ooxml.xsds.izip.1}"/>
|
||||
<fileset dir="${ooxml.visio.xsd.dir}"/>
|
||||
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="ooxmlSchemas.xsdconfig,markup-compatibility.xsd,vmlDrawing.xsd"/>
|
||||
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="dml-drawing.xsd,word12.xsd,XAdES*.xsd,xlThreaded*.xsd,xmldsig*.xsd"/>
|
||||
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="dml-drawing.xsd,word10.xsd,word12.xsd,XAdES*.xsd,xlThreaded*.xsd,xmldsig*.xsd"/>
|
||||
<zipfileset src="${ooxml.xsds.izip.2}" includes="opc-digSig.xsd,opc-relationships.xsd"/>
|
||||
<fileset dir="${ooxml.security.xsd.dir}" includes="signatureInfo.xsd"/>
|
||||
</copy>
|
||||
@ -1021,7 +983,7 @@ under the License.
|
||||
</classpath>
|
||||
</javac>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/poi-ooxml-full/src/main/java9"
|
||||
destdir="${basedir}/poi-ooxml-full/src/main/java9"
|
||||
includeantruntime="false"
|
||||
@ -1121,7 +1083,7 @@ under the License.
|
||||
<echo message="Building java9+ classes for @{module}"/>
|
||||
|
||||
<!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/@{module}/src/main/java9"
|
||||
destdir="${basedir}/@{module}/src/main/java9"
|
||||
includeantruntime="false"
|
||||
@ -1160,7 +1122,7 @@ under the License.
|
||||
</jar>
|
||||
|
||||
<!-- compile the tests -->
|
||||
<javac release="8"
|
||||
<javac release="11"
|
||||
target="${jdk.version.class}"
|
||||
source="${jdk.version.source}"
|
||||
destdir="@{test-classes}"
|
||||
@ -1182,7 +1144,7 @@ under the License.
|
||||
<path location="@{test-classes}"/>
|
||||
</pathconvert>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/@{module}/src/test/java9"
|
||||
destdir="${basedir}/@{module}/src/test/java9"
|
||||
includeantruntime="false"
|
||||
@ -1310,7 +1272,7 @@ under the License.
|
||||
|
||||
<!-- create ooxml-lite-agent jar -->
|
||||
<mkdir dir="${ooxml.lite.output.dir}"/>
|
||||
<javac release="8"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java"
|
||||
destdir="${ooxml.lite.output.dir}"
|
||||
includeantruntime="false"
|
||||
@ -1321,7 +1283,7 @@ under the License.
|
||||
</classpath>
|
||||
</javac>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
||||
destdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
||||
includeantruntime="false"
|
||||
@ -1529,7 +1491,7 @@ under the License.
|
||||
</target>
|
||||
|
||||
<target name="compile-integration" depends="compile-scratchpad, compile-main, compile-ooxml, compile-examples">
|
||||
<javac release="8"
|
||||
<javac release="11"
|
||||
target="${jdk.version.class}"
|
||||
source="${jdk.version.source}"
|
||||
destdir="${integration.output.test.dir}"
|
||||
@ -1556,7 +1518,7 @@ under the License.
|
||||
|
||||
<mkdir dir="${integration.output.test.dir}/META-INF/versions/9"/>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/poi-integration/src/test/java9"
|
||||
destdir="${integration.output.test.dir}/META-INF/versions/9"
|
||||
includeantruntime="false"
|
||||
@ -1606,7 +1568,6 @@ under the License.
|
||||
<copy file="${main.version.template}" tofile="${main.version.java}" overwrite="true">
|
||||
<filterset>
|
||||
<filter token="VERSION" value="${version.id}"/>
|
||||
<filter token="DSTAMP" value="${DSTAMP}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
@ -1931,7 +1892,7 @@ under the License.
|
||||
|
||||
<echo output="${basedir}/poi-ooxml-lite/src/main/java9/module-info.java">${full.schema}${lite.exports}}</echo>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
||||
destdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
||||
includeantruntime="false"
|
||||
@ -2081,6 +2042,13 @@ under the License.
|
||||
unless="main.docs.notRequired" description="Builds the HTML pages of the POI website">
|
||||
<echo message="Using Apache Forrest from ${env.FORREST_HOME}"/>
|
||||
|
||||
<echo message="Adjusting http -> https in forrset itself"/>
|
||||
<replace dir="${env.FORREST_HOME}"
|
||||
token="'http://'"
|
||||
value="'https://'"
|
||||
summary="true"
|
||||
includes="**/*.xsl"/>
|
||||
|
||||
<exec executable="${env.FORREST_HOME}/bin/forrest" osfamily="unix"/>
|
||||
<exec executable="cmd" osfamily="windows">
|
||||
<arg value="/c"/>
|
||||
@ -2129,6 +2097,7 @@ under the License.
|
||||
|
||||
<!-- Generates the latest/development API documentation. -->
|
||||
<target name="javadocs"
|
||||
depends="compile-ooxml"
|
||||
description="Generates the API documentation">
|
||||
<echo message="Generating latest Javadocs in ${javadocs.report.dir}"/>
|
||||
<javadoc verbose="false" author="true" destdir="${javadocs.report.dir}"
|
||||
@ -2277,7 +2246,7 @@ under the License.
|
||||
|
||||
<echo message="Building maven-jar for @{module}, module-name: ${module-name} with isJava8: ${isJava8} and src: @{src}"/>
|
||||
|
||||
<javac release="9"
|
||||
<javac release="11"
|
||||
srcdir="${basedir}/@{module}/src/main/java9"
|
||||
destdir="@{src}/META-INF/versions/9"
|
||||
includeantruntime="false"
|
||||
@ -2452,7 +2421,7 @@ under the License.
|
||||
|
||||
<!-- continuous integration targets -->
|
||||
<target name="jenkins"
|
||||
depends="replaceVersion, compile, test-all, jar, javadocs, assemble, findbugs, release-notes, rat-check, forbidden-apis-check, help, fetch-svn-jars, maventask"
|
||||
depends="replaceVersion, compile, test-all, jar, javadocs, assemble, findbugs, release-notes, rat-check, forbidden-apis-check, help, maventask"
|
||||
description="Target run by Jenkins on a continuous basis. Builds and tests POI, generates artifacts and documentation, and searches for problems."/>
|
||||
|
||||
<target name="maventask" depends="init">
|
||||
@ -2474,7 +2443,11 @@ under the License.
|
||||
uri="antlib:org.apache.rat.anttasks"
|
||||
classpath="${rat.jar}" />
|
||||
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
|
||||
<fileset dir="poi-examples/src" excludes="main/java/org/apache/poi/**/*-chart-data.txt"/>
|
||||
<fileset dir="poi-examples/src">
|
||||
<exclude name="main/java/org/apache/poi/**/*-chart-data.txt" />
|
||||
<exclude name="main/groovy/settings.gradle" />
|
||||
<exclude name="main/groovy/.gradle/**" />
|
||||
</fileset>
|
||||
<fileset dir="poi-excelant/src"/>
|
||||
<fileset dir="poi-integration/src"/>
|
||||
<fileset dir="poi/src">
|
||||
@ -2600,30 +2573,31 @@ under the License.
|
||||
|
||||
<!-- findbugs successor, spotbugs ... need to use the dependencies used in the spotbugs release. -->
|
||||
<!-- compare with the entries found in the MANIFEST.MF of spotbugs.jar -->
|
||||
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.7.3" usage="${spotbugs.lib}" target="spotbugs.jar"/>
|
||||
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.7.3" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
|
||||
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.7.3" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
|
||||
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.9.8" usage="${spotbugs.lib}" target="spotbugs.jar"/>
|
||||
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.9.8" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
|
||||
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.9.8" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
|
||||
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.jsr305" artifact="com.google.code.findbugs:jsr305:3.0.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.1.3" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:1.2.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.5.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-lang3" artifact="org.apache.commons:commons-lang3:3.12.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.10.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.11" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.2.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:2.0.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.11.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-lang" artifact="org.apache.commons:commons-lang3:3.19.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.14.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.15" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-io" artifact="commons-io:commons-io:2.20.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.jcip-annotations" artifact="net.jcip:jcip-annotations:1.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.icu4j" artifact="com.ibm.icu:icu4j:68.2" usage="${spotbugs.lib}" target="icu4j-68.2.jar"/>
|
||||
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.17.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.17.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j18-impl:2.17.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:11.5" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:4.2.0" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j2-impl:2.25.2" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:12.9" usage="${spotbugs.lib}"/>
|
||||
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:5.2.2" usage="${spotbugs.lib}"/>
|
||||
|
||||
<mkdir dir="${basedir}${spotbugs.lib}/config"/>
|
||||
|
||||
@ -2634,9 +2608,10 @@ under the License.
|
||||
<downloadfile src="${spotbugs.jaxen.url}" dest="${spotbugs.jaxen.jar}"/>
|
||||
<downloadfile src="${spotbugs.bcel.url}" dest="${spotbugs.bcel.jar}"/>
|
||||
<downloadfile src="${spotbugs.slf4j-api.url}" dest="${spotbugs.slf4j-api.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-lang3.url}" dest="${spotbugs.commons-lang3.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-lang.url}" dest="${spotbugs.commons-lang.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-text.url}" dest="${spotbugs.commons-text.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-codec.url}" dest="${spotbugs.commons-codec.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-io.url}" dest="${spotbugs.commons-io.jar}"/>
|
||||
<downloadfile src="${spotbugs.commons-logging.url}" dest="${spotbugs.commons-logging.jar}"/>
|
||||
<downloadfile src="${spotbugs.jcip-annotations.url}" dest="${spotbugs.jcip-annotations.jar}"/>
|
||||
<downloadfile src="${spotbugs.jsr305.url}" dest="${spotbugs.jsr305.jar}"/>
|
||||
@ -2693,6 +2668,7 @@ under the License.
|
||||
<auxClasspath path="${ooxml.curvesapi.jar}" />
|
||||
<auxClasspath path="${ooxml.xmlbeans.jar}" />
|
||||
<auxClasspath path="${ooxml.commons-compress.jar}" />
|
||||
<auxClasspath path="${ooxml.commons-lang3.jar}" />
|
||||
<auxClasspath path="${main.commons-collections4.jar}" />
|
||||
<auxClasspath path="${main.commons-math3.jar}" />
|
||||
<auxClasspath path="${main.commons-io.jar}" />
|
||||
@ -2734,6 +2710,7 @@ under the License.
|
||||
<auxClasspath path="${svg.xml-apis-ext.jar}"/>
|
||||
<auxClasspath path="${svg.xmlgraphics-commons.jar}"/>
|
||||
<auxClasspath path="${pdf.pdfbox.jar}"/>
|
||||
<auxClasspath path="${pdf.pdfbox.io.jar}"/>
|
||||
<auxClasspath path="${pdf.fontbox.jar}"/>
|
||||
<auxClasspath path="${pdf.graphics2d.jar}"/>
|
||||
<sourcePath path="poi/src/main/java" />
|
||||
@ -2822,286 +2799,6 @@ under the License.
|
||||
</openpgp:signer>
|
||||
</target>
|
||||
|
||||
<target name="dist-nexus" depends="load-maven-server-settings,dist-checksum"
|
||||
description="upload build artifacts to nexus">
|
||||
<delete dir="build/repo"/>
|
||||
<delete dir="build/nexus-stage"/>
|
||||
<nexus-upload artifactId="poi"/>
|
||||
<nexus-upload artifactId="poi-examples"/>
|
||||
<nexus-upload artifactId="poi-excelant"/>
|
||||
<nexus-upload artifactId="poi-ooxml"/>
|
||||
<nexus-upload artifactId="poi-ooxml-lite"/>
|
||||
<nexus-upload artifactId="poi-ooxml-full"/>
|
||||
<nexus-upload artifactId="poi-scratchpad"/>
|
||||
</target>
|
||||
|
||||
<macrodef name="nexus-upload">
|
||||
<attribute name="artifactId"/>
|
||||
<sequential>
|
||||
<local name="repo"/>
|
||||
<property name="repo" location="build/repo/@{artifactId}"/>
|
||||
|
||||
<copy todir="${repo}">
|
||||
<mappedresources>
|
||||
<!-- add sha-512 when nexus rules are updated (1/2) -->
|
||||
<fileset dir="build/dist/maven" includes="@{artifactId}/**" excludes="**/*.sha512,**/*.sha256"/>
|
||||
<regexpmapper from="^([^/]+)/(.*)$$" to="org/apache/poi/\1/${version.id}/\2" handledirsep="true"/>
|
||||
</mappedresources>
|
||||
</copy>
|
||||
|
||||
<local name="lastUpdated"/>
|
||||
<tstamp>
|
||||
<format property="lastUpdated" pattern="yyyyMMddHHmmss" timezone="UTC"/>
|
||||
</tstamp>
|
||||
|
||||
<local name="metadir"/>
|
||||
<property name="metadir" location="${repo}/org/apache/poi/@{artifactId}"/>
|
||||
|
||||
<echo file="${metadir}/maven-metadata.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>@{artifactId}</artifactId>
|
||||
<versioning>
|
||||
<latest>${version.id}</latest>
|
||||
<release>${version.id}</release>
|
||||
<versions>
|
||||
<version>${version.id}</version>
|
||||
</versions>
|
||||
<lastUpdated>${lastUpdated}</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>]]></echo>
|
||||
<fixcrlf srcdir="${metadir}" includes="maven-metadata.xml" eol="unix" eof="remove" />
|
||||
<!-- add sha-512 when nexus rules are updated (2/2) -->
|
||||
<!--checksum algorithm="SHA-512" fileext=".sha512" format="MD5SUM">
|
||||
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
|
||||
</checksum-->
|
||||
<checksum algorithm="sha1" format="MD5SUM">
|
||||
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
|
||||
</checksum>
|
||||
<checksum algorithm="md5" format="MD5SUM">
|
||||
<fileset dir="${metadir}" includes="maven-metadata.xml"/>
|
||||
</checksum>
|
||||
|
||||
<fixcrlf srcDir="${metadir}" includes="*.md5,*.sha1,*.sha256,*.sha512" eol="unix"/>
|
||||
|
||||
<downloadfile src="${dist.nexus-staging.url}" dest="${dist.nexus-staging.jar}"/>
|
||||
<taskdef uri="antlib:org.sonatype.nexus.ant.staging" resource="org/sonatype/nexus/ant/staging/antlib.xml">
|
||||
<classpath><pathelement path="${dist.nexus-staging.jar}"/></classpath>
|
||||
</taskdef>
|
||||
|
||||
<staging:stageLocally description="@{artifactId} ${version.id}">
|
||||
<staging:nexusStagingInfo stagingDirectory="build/nexus-stage/@{artifactId}"/>
|
||||
<fileset dir="${repo}" />
|
||||
</staging:stageLocally>
|
||||
|
||||
<!-- if this throws a "... dh keypair ..." exception, use Java 7+ for executing the task -->
|
||||
<staging:stageRemotely description="@{artifactId} ${version.id}">
|
||||
<staging:nexusStagingInfo stagingDirectory="build/nexus-stage/@{artifactId}">
|
||||
<staging:projectInfo groupId="org.apache.poi" artifactId="@{artifactId}" version="${version.id}" />
|
||||
<staging:connectionInfo baseUrl="https://repository.apache.org/">
|
||||
<staging:authentication username="${settings.apache-id.username}" password="${settings.apache-id.password}" />
|
||||
</staging:connectionInfo>
|
||||
</staging:nexusStagingInfo>
|
||||
</staging:stageRemotely>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="-init-svn" depends="init,fetch-svn-jars,load-maven-server-settings">
|
||||
<!-- JAVA_HOME needs to point to a JRE/JDK7+, otherwise the svn/https connection throws a "Could not generate DH keypair"-->
|
||||
<fail message="Environment needs to point to Java 8+">
|
||||
<condition>
|
||||
<or>
|
||||
<equals arg1="${ant.java.version}" arg2="1.7"/>
|
||||
<equals arg1="${ant.java.version}" arg2="1.6"/>
|
||||
<equals arg1="${ant.java.version}" arg2="1.5"/>
|
||||
</or>
|
||||
</condition>
|
||||
</fail>
|
||||
|
||||
<path id="path.svnant">
|
||||
<pathelement location="${dist.svnant.jar}"/>
|
||||
<pathelement location="${dist.svnclientadapter-base.jar}"/>
|
||||
<pathelement location="${dist.svnclientadapter-svnkit.jar}"/>
|
||||
<pathelement location="${dist.svnclientadapter-javahl.jar}"/>
|
||||
<pathelement location="${dist.svnkit.jar}"/>
|
||||
<pathelement location="${dist.svnkit-javahl16.jar}"/>
|
||||
<pathelement location="${dist.sqljet.jar}"/>
|
||||
<pathelement location="${dist.antlr.jar}"/>
|
||||
<pathelement location="${dist.sequence-library.jar}"/>
|
||||
<pathelement location="${dist.lz4-java.jar}"/>
|
||||
</path>
|
||||
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant"/>
|
||||
|
||||
<svnSetting
|
||||
svnkit="true"
|
||||
javahl="false"
|
||||
username="${settings.apache-id.username}"
|
||||
password="${settings.apache-id.password}"
|
||||
id="svn.settings"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="release-prep0" depends="-init-svn" description="check to make sure the release tag doesn't exist yet">
|
||||
<!-- verify that svn username/password are valid ... -->
|
||||
<fail message="Unable to connect to SVN repo. Verify apache-id username and password. If these are correct, change the release-prep0 target to check over http, which would indicate a problem with your https setup.">
|
||||
<condition>
|
||||
<not><svnExists refid="svn.settings" target="https://svn.apache.org/repos/asf/poi/"/></not>
|
||||
</condition>
|
||||
</fail>
|
||||
|
||||
<!-- verify that the release tag that we're about to create in release-prep1 does not already exist (no overwriting tags!) -->
|
||||
<fail message="Cannot create release tag. https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG} already exists. Verify the requested release version (${version.id}).">
|
||||
<condition>
|
||||
<svnExists refid="svn.settings" target="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}/"/>
|
||||
</condition>
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<!-- experimental release preparation ... tbd. ... -->
|
||||
<target name="release-prep1" depends="-init-svn,release-prep0" description="update the documentation and create the svn tag - needs Java7+">
|
||||
<local name="tstamp_rel"/>
|
||||
<local name="tstamp_next"/>
|
||||
<local name="rel_next"/>
|
||||
<tstamp>
|
||||
<format property="tstamp_rel" pattern="yyyy-MM-dd" offset="7" unit="day"/>
|
||||
<format property="tstamp_next" pattern="yyyy-MM" offset="3" unit="month"/>
|
||||
</tstamp>
|
||||
|
||||
<taskdef name="NextRelease" classname="NextRelease" classpath="poi-excelant/build/poi-ant-contrib"/>
|
||||
<NextRelease property="rel_next"/>
|
||||
|
||||
<antcall target="-update-build.xml">
|
||||
<param name="version_id" value="${version.id}"/>
|
||||
</antcall>
|
||||
|
||||
<replaceregexp byline="true">
|
||||
<regexp pattern="<release.*date=".*\?\?">"/>
|
||||
<substitution expression="<!-- release version="${rel_next}" date="${tstamp_next}-??"> </release --> <release version="${version.id}" date="${tstamp_rel}">"/>
|
||||
<fileset dir="src/documentation/content/xdocs">
|
||||
<include name="changes.xml"/>
|
||||
</fileset>
|
||||
</replaceregexp>
|
||||
|
||||
<fixcrlf srcdir="." includes="src/documentation/content/xdocs/changes.xml" eol="unix" eof="remove" />
|
||||
|
||||
<!-- can't combine updating and pinning of the documentation ... so we need two commits -->
|
||||
<!-- (revision)properties can't be set and read within one svn block -->
|
||||
<echo message="updating build.xml and changes.xml"/>
|
||||
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - updating build.xml and changes.xml' build.xml src/documentation/content/xdocs/changes.xml"/>
|
||||
<svn refid="svn.settings">
|
||||
<!--<commit message="release prepare for ${version.id} - updating build.xml and changes.xml" recurse="false">
|
||||
<fileset dir="." includes="build.xml,src/documentation/content/xdocs/changes.xml"/>
|
||||
</commit>-->
|
||||
<update dir="." recurse="true"/>
|
||||
<status path="." revisionProperty="svn_version1"/>
|
||||
</svn>
|
||||
<echo message="pin documentation - release ${svn_version1}"/>
|
||||
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'release prepare for ${version.id} - pin documentation' src"/>
|
||||
<svn refid="svn.settings">
|
||||
<propset path="src" name="svn:externals" value="documentation -r${svn_version1} https://svn.apache.org/repos/asf/poi/site/src/documentation"/>
|
||||
<!-- <commit message="release prepare for ${version.id} - pin documentation" dir="src" recurse="false"/>-->
|
||||
<update dir="." recurse="true"/>
|
||||
<status path="." revisionProperty="svn_version2"/>
|
||||
</svn>
|
||||
<echo message="create release tag"/>
|
||||
<svn refid="svn.settings">
|
||||
<copy
|
||||
srcUrl="https://svn.apache.org/repos/asf/poi/trunk"
|
||||
destUrl="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}"
|
||||
message="tag r${svn_version2} as ${version.id}"/>
|
||||
</svn>
|
||||
|
||||
<!-- update build.xml to the next snapshot version -->
|
||||
<antcall target="-update-build.xml">
|
||||
<param name="version_id" value="${rel_next}"/>
|
||||
</antcall>
|
||||
|
||||
<!-- unpin documentation and commit next snapshot version -->
|
||||
<svn refid="svn.settings">
|
||||
<update dir="." recurse="true"/>
|
||||
<propset path="src" name="svn:externals" value="documentation https://svn.apache.org/repos/asf/poi/site/src/documentation"/>
|
||||
<!--<commit message="prepare for ${rel_next}" recurse="false">
|
||||
<fileset dir="." includes="build.xml"/>
|
||||
<dirset dir="src"/>
|
||||
</commit>-->
|
||||
</svn>
|
||||
<exec command="svn ci --username ${settings.apache-id.username} --password ${settings.apache-id.password} -m 'prepare for ${rel_next}' build.xml src poi*"/>
|
||||
|
||||
<mkdir dir="build/release"/>
|
||||
|
||||
<svn refid="svn.settings">
|
||||
<checkout url="https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}" destPath="build/release" ignoreExternals="false"/>
|
||||
</svn>
|
||||
</target>
|
||||
|
||||
<target name="release-prep2" depends="init" description="compile the freshly checked out svn tag and upload it to the nexus - needs a JDK6">
|
||||
<!-- JAVA_HOME needs to point to a JDK8, otherwise the ant invocation is failing on a missing javac -->
|
||||
<fail message="Environment needs to point to a Java 8 JDK">
|
||||
<condition>
|
||||
<not><equals arg1="${ant.java.version}" arg2="1.8"/></not>
|
||||
</condition>
|
||||
</fail>
|
||||
|
||||
<local name="DSTAMP"/>
|
||||
<tstamp>
|
||||
<format property="DSTAMP" pattern="yyyyMMdd" offset="7" unit="day"/>
|
||||
</tstamp>
|
||||
|
||||
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
|
||||
<property name="DSTAMP" value="${DSTAMP}"/>
|
||||
<target name="dist" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="release-prep3" depends="-init-svn" description="write the dist to the release candidate repo - needs Java7+">
|
||||
<ant dir="build/release" inheritAll="false" inheritRefs="false" useNativeBasedir="true">
|
||||
<target name="dist-nexus" />
|
||||
</ant>
|
||||
|
||||
<svn refid="svn.settings">
|
||||
<import path="build/release/build/dist"
|
||||
url="https://dist.apache.org/repos/dist/dev/poi"
|
||||
newEntry="${version.id}-${release.rc}"
|
||||
message="release candidate POI ${version.id}"/>
|
||||
</svn>
|
||||
</target>
|
||||
|
||||
<target name="release-finish" description="write the dist to the release candidate repo - needs Java7+">
|
||||
<!--svn refid="svn.settings">
|
||||
<update dir="." recurse="true"/>
|
||||
</svn-->
|
||||
<local name="rel_prev"/>
|
||||
<local name="file_date"/>
|
||||
<local name="file_date_iso"/>
|
||||
|
||||
<tstamp>
|
||||
<!-- usually overwritten by a command line argument -->
|
||||
<!-- for convenience this is kept in the same format as in the release-prep call -->
|
||||
<format property="file_date" pattern="yyyyMMdd" locale="US"/>
|
||||
</tstamp>
|
||||
|
||||
|
||||
<taskdef name="NextRelease" classname="NextRelease" classpath="poi-excelant/build/poi-ant-contrib"/>
|
||||
<NextRelease property="rel_prev" increment="-1"/>
|
||||
|
||||
<!-- we don't simply generate a new iso file date with tstamp,
|
||||
but potentially use the date given as an argument to ant -->
|
||||
<loadresource property="file_date_iso">
|
||||
<string>${file_date}</string>
|
||||
<filterchain>
|
||||
<replaceregex pattern="([0-9]{4})([0-9]{2})([0-9]{2})" replace="\1-\2-\3"/>
|
||||
</filterchain>
|
||||
</loadresource>
|
||||
|
||||
<replaceregexp file="build.gradle" match="( +version += +)'[^']+'" replace="\1'${version.id}'"/>
|
||||
<replaceregexp file="poi-examples/src/main/groovy/build.gradle" match="( *compile 'org.apache.poi:[^0-9]+)([0-9.]+)'" replace="\1${rel_prev}'" byline="true"/>
|
||||
<replaceregexp file="poi-examples/src/main/scala/build.sbt" match='( *org.apache.poi.* ")[0-9.]+(.+)' replace="\1${rel_prev}\2" byline="true"/>
|
||||
<replaceregexp file="osgi/pom.xml" match="version>${rel_prev}[^<]+" replace="version>${version.id}"/>
|
||||
<replaceregexp file="doap_POI.rdf" match="<release>" replace="<release> <Version> <name>Apache POI ${rel_prev}</name> <created>${file_date_iso}</created> <revision>${rel_prev}</revision> </Version> </release> <release>"/>
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<target name="-update-build.xml">
|
||||
<replaceregexp byline="true">
|
||||
<regexp pattern="(<property name="version.id" value=")[^"]+("/>)"/>
|
||||
|
||||
57
doap_POI.rdf
57
doap_POI.rdf
@ -35,6 +35,55 @@
|
||||
<programming-language>Java</programming-language>
|
||||
<category rdf:resource="https://projects.apache.org/category/content" />
|
||||
<category rdf:resource="https://projects.apache.org/category/library" />
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.5.1</name>
|
||||
<created>2025-11-30</created>
|
||||
<revision>5.5.1</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.5.0</name>
|
||||
<created>2025-11-15</created>
|
||||
<revision>5.5.0</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.4.1</name>
|
||||
<created>2025-04-06</created>
|
||||
<revision>5.4.1</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.4.0</name>
|
||||
<created>2025-01-08</created>
|
||||
<revision>5.4.0</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.3.0</name>
|
||||
<created>2024-07-02</created>
|
||||
<revision>5.3.0</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.2.5</name>
|
||||
<created>2023-11-25</created>
|
||||
<revision>5.2.5</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.2.4</name>
|
||||
<created>2023-09-28</created>
|
||||
<revision>5.2.4</revision>
|
||||
</Version>
|
||||
</release>
|
||||
<release>
|
||||
<Version>
|
||||
<name>Apache POI 5.2.3</name>
|
||||
@ -218,10 +267,10 @@
|
||||
</Version>
|
||||
</release>
|
||||
<repository>
|
||||
<SVNRepository>
|
||||
<location rdf:resource="https://svn.apache.org/repos/asf/poi/"/>
|
||||
<browse rdf:resource="https://svn.apache.org/viewvc/poi/"/>
|
||||
</SVNRepository>
|
||||
<GitRepository>
|
||||
<location rdf:resource="https://github.com/apache/poi.git"/>
|
||||
<browse rdf:resource="https://github.com/apache/poi/"/>
|
||||
</GitRepository>
|
||||
</repository>
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Less than 2G definitely slows things down. -XX:+HeapDumpOnOutOfMemoryError
|
||||
org.gradle.jvmargs=-Xmx2G -Dfile.encoding=UTF-8
|
||||
# Less than 2G definitely slows things down. Increased to 3G due to OOM issues on ci-builds.apache.org.
|
||||
# -XX:+HeapDumpOnOutOfMemoryError
|
||||
org.gradle.jvmargs=-Xmx3G -Dfile.encoding=UTF-8
|
||||
|
||||
# Activating will be much faster, but break the build of 'poi-ooxml-lite'
|
||||
# @todo: look into poi-ooxml-lite task generateModuleInfo and enforce running whatever is needed before
|
||||
org.gradle.caching=false
|
||||
org.gradle.caching=true
|
||||
|
||||
# Modularise your project and enable parallel build
|
||||
org.gradle.parallel=true
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
37
gradlew
vendored
37
gradlew
vendored
@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@ -112,20 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
|
||||
# Loop in case we encounter an error.
|
||||
for attempt in 1 2 3; do
|
||||
if [ ! -e "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" ]; then
|
||||
if ! curl -s -S --retry 3 -L -o "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" "https://raw.githubusercontent.com/gradle/gradle/v8.3/gradle/wrapper/gradle-wrapper.jar"; then
|
||||
rm -f "$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
|
||||
# Pause for a bit before looping in case the server throttled us.
|
||||
sleep 5
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@ -158,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@ -166,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@ -215,16 +204,16 @@ fi
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
186
gradlew.bat
vendored
186
gradlew.bat
vendored
@ -1,92 +1,94 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@ -1,3 +1,20 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
// This script is used as input to the Jenkins Job DSL plugin to create all the build-jobs that
|
||||
// Apache POI uses on the public Jenkins instance at https://ci-builds.apache.org/job/POI/
|
||||
//
|
||||
@ -14,42 +31,31 @@ def xercesUrl = 'https://repo1.maven.org/maven2/xerces/xercesImpl/2.6.1/xercesIm
|
||||
def xercesLib = './xercesImpl-2.6.1.jar'
|
||||
|
||||
def poijobs = [
|
||||
[ name: 'POI-DSL-1.8', trigger: 'H */12 * * *', jenkinsLite: true
|
||||
[ name: 'POI-DSL-1.8',
|
||||
jdk: '1.8',
|
||||
trigger: 'H */12 * * *',
|
||||
jenkinsLite: true,
|
||||
disabled: true // JDK 8 is no longer supported by POI 6
|
||||
],
|
||||
[ name: 'POI-DSL-OpenJDK', jdk: 'OpenJDK 1.8', trigger: 'H */12 * * *',
|
||||
// only a limited set of nodes still have OpenJDK 8 (on Ubuntu) installed
|
||||
slaves: 'ubuntu',
|
||||
skipcigame: true,
|
||||
jenkinsLite: true
|
||||
[ name: 'POI-DSL-1.8-branch-5.5.x',
|
||||
jdk: '1.8',
|
||||
branch: '5.5.x',
|
||||
trigger: 'H */12 * * *',
|
||||
jenkinsLite: true,
|
||||
],
|
||||
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true
|
||||
],
|
||||
[ name: 'POI-DSL-1.15', jdk: '1.15', trigger: triggerSundays, skipcigame: true,
|
||||
// let's save some CPU cycles here, 15 is not an LTS and JDK 16 is GA
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-DSL-1.16', jdk: '1.16', trigger: triggerSundays, skipcigame: true,
|
||||
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true
|
||||
],
|
||||
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
|
||||
[ name: 'POI-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
|
||||
// let's save some CPU cycles here, 18 is not a LTS and JDK 20 is out
|
||||
disabled: true
|
||||
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true
|
||||
],
|
||||
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
|
||||
[ name: 'POI-DSL-1.19', jdk: '1.19', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
|
||||
[ name: 'POI-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
||||
],
|
||||
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
|
||||
[ name: 'POI-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
|
||||
],
|
||||
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
|
||||
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true, skipSpotbugs: true
|
||||
],
|
||||
// Jenkins on ci-builds.apache.org does not support spotbugs with a new enough version of asm for Java18+
|
||||
[ name: 'POI-DSL-1.22', jdk: '1.22', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true
|
||||
[ name: 'POI-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
|
||||
// use Ant for building until Gradle supports JDK 25
|
||||
// see https://docs.gradle.org/current/userguide/compatibility.html
|
||||
// and https://github.com/gradle/gradle/issues/31625
|
||||
useAnt: true
|
||||
],
|
||||
// Use Ant-build for now as selecting IBM JDK via toolchain does not work (yet)
|
||||
[ name: 'POI-DSL-IBM-JDK', jdk: 'IBMJDK', trigger: triggerSundays, skipcigame: true, useAnt: true
|
||||
@ -60,17 +66,11 @@ def poijobs = [
|
||||
// the property triggers using Xerces as XML Parser and previously showed some exception that can occur
|
||||
properties: ["-Dadditionaljar=${xercesLib}"]
|
||||
],
|
||||
// [ name: 'POI-DSL-Maven', trigger: 'H */4 * * *', maven: true,
|
||||
// // not needed any more now that we use Gradle for SonarQube
|
||||
// disabled: true
|
||||
// ],
|
||||
[ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
|
||||
],
|
||||
// it was impossible to make this run stable in Gradle, thus disabling this for now
|
||||
[ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true, useAnt: true
|
||||
],
|
||||
// [ name: 'POI-DSL-Gradle', trigger: triggerSundays, email: 'centic@apache.org'
|
||||
// ],
|
||||
[ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true
|
||||
],
|
||||
[ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true
|
||||
@ -80,33 +80,30 @@ def poijobs = [
|
||||
// // replaced by Gradle-based build now
|
||||
// disabled: true
|
||||
// ],
|
||||
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.11', trigger: 'H 7 * * *', sonar: true, skipcigame: true
|
||||
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.17', trigger: 'H 7 * * *', sonar: true, skipcigame: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.8', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', jenkinsLite: true
|
||||
[ name: 'POI-DSL-Windows-1.8',
|
||||
trigger: 'H */12 * * *',
|
||||
windows: true,
|
||||
slaves: 'Windows',
|
||||
jenkinsLite: true,
|
||||
disabled: true // JDK 8 is no longer supported by POI 6
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays, windows: true, slaves: 'Windows',
|
||||
jenkinsLite: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.15', jdk: '1.15', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||
// let's save some CPU cycles here, 14 is not an LTS and JDK 15 is GA as of 15 September 2020
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.16', jdk: '1.16', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.17', jdk: '1.17', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.18', jdk: '1.18', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||
skipSpotbugs: true,
|
||||
// let's save some CPU cycles here, 18 is not an LTS and JDK 20 is out
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.20', jdk: '1.20', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.21', jdk: '1.21', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.22', jdk: '1.22', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true
|
||||
[ name: 'POI-DSL-Windows-1.24', jdk: '1.24', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-DSL-Windows-1.25', jdk: '1.25', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||
skipSpotbugs: true,
|
||||
// use Ant for building until Gradle supports JDK 24
|
||||
// see https://docs.gradle.org/current/userguide/compatibility.html
|
||||
// and https://github.com/gradle/gradle/issues/31625
|
||||
useAnt: true
|
||||
],
|
||||
[ name: 'POI-DSL-Github-PullRequests', trigger: '', skipcigame: true, disabled: true
|
||||
],
|
||||
@ -117,37 +114,25 @@ def xmlbeansjobs = [
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.16', jdk: '1.16', trigger: triggerSundays, skipcigame: true,
|
||||
// let's save some CPU cycles here, 16 is not an LTS and JDK 17 is GA
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *', skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true,
|
||||
// let's save some CPU cycles here, 18 is not an LTS and JDK 20 is out
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.19', jdk: '1.19', trigger: triggerSundays, skipcigame: true,
|
||||
// let's save some CPU cycles here, 19 is not an LTS
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.22', jdk: '1.22', trigger: triggerSundays, skipcigame: true,
|
||||
[ name: 'POI-XMLBeans-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
||||
disabled: true
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-1.20', jdk: '1.20', trigger: triggerSundays, skipcigame: true,
|
||||
[ name: 'POI-XMLBeans-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true,
|
||||
],
|
||||
[ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
|
||||
[ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.17', trigger: triggerSundays, skipcigame: true,
|
||||
sonar: true
|
||||
]
|
||||
]
|
||||
|
||||
def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk'
|
||||
def xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk'
|
||||
def gitBase = 'https://github.com/apache/poi.git'
|
||||
def xmlbeansGitBase = 'https://github.com/apache/xmlbeans.git'
|
||||
|
||||
def defaultJdk = '1.8'
|
||||
def defaultJdk = '1.11'
|
||||
def defaultBranch = 'trunk'
|
||||
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
|
||||
def defaultEmail = 'dev@poi.apache.org'
|
||||
def defaultAnt = 'ant_1.10_latest'
|
||||
@ -159,16 +144,12 @@ def defaultSlaves = '(ubuntu)&&!beam&&!cloud-slave&&!H29'
|
||||
def jdkMapping = [
|
||||
'1.8': [ jenkinsJdk: 'jdk_1.8_latest', jdkVersion: 8, jdkVendor: '' ],
|
||||
'1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: '' ],
|
||||
'1.15': [ jenkinsJdk: 'jdk_15_latest', jdkVersion: 15, jdkVendor: '' ],
|
||||
'1.16': [ jenkinsJdk: 'jdk_16_latest', jdkVersion: 16, jdkVendor: '' ],
|
||||
'1.17': [ jenkinsJdk: 'jdk_17_latest', jdkVersion: 17, jdkVendor: '' ],
|
||||
'1.18': [ jenkinsJdk: 'jdk_18_latest', jdkVersion: 18, jdkVendor: '' ],
|
||||
'1.19': [ jenkinsJdk: 'jdk_19_latest', jdkVersion: 19, jdkVendor: '' ],
|
||||
'1.20': [ jenkinsJdk: 'jdk_20_latest', jdkVersion: 20, jdkVendor: '' ],
|
||||
'1.21': [ jenkinsJdk: 'jdk_21_latest', jdkVersion: 21, jdkVendor: '' ],
|
||||
'1.22': [ jenkinsJdk: 'jdk_22_latest', jdkVersion: 22, jdkVendor: '' ],
|
||||
'OpenJDK 1.8': [ jenkinsJdk: 'adoptopenjdk_hotspot_8u282', jdkVersion: 8, jdkVendor: 'adoptopenjdk' ],
|
||||
'IBMJDK': [ jenkinsJdk: 'ibmjdk_1.8.0_261', jdkVersion: 8, jdkVendor: 'ibm' ]
|
||||
'1.24': [ jenkinsJdk: 'jdk_24_latest', jdkVersion: 24, jdkVendor: '' ],
|
||||
'1.25': [ jenkinsJdk: 'jdk_25_latest', jdkVersion: 25, jdkVendor: '' ],
|
||||
// one of the few IBM JDKs that is still supported on ci-builds.apache.org
|
||||
'IBMJDK': [ jenkinsJdk: 'ibm_semeru_21.0.2_13', jdkVersion: 21, jdkVendor: 'ibm' ]
|
||||
]
|
||||
|
||||
static def shellEx(def context, String cmd, def poijob) {
|
||||
@ -186,7 +167,7 @@ Apache POI - the Java API for Microsoft Documents
|
||||
</p>
|
||||
<p>
|
||||
<b>This is an automatically generated Job Config, do not edit it here!
|
||||
Instead change the Jenkins Job DSL at <a href="https://svn.apache.org/repos/asf/poi/trunk/jenkins">https://svn.apache.org/repos/asf/poi/trunk/jenkins</a>,
|
||||
Instead change the Jenkins Job DSL at <a href="https://github.com/apache/poi/blob/trunk/jenkins/">https://github.com/apache/poi/blob/trunk/jenkins/</a>,
|
||||
see <a href="https://github.com/jenkinsci/job-dsl-plugin/wiki">https://github.com/jenkinsci/job-dsl-plugin/wiki</a>
|
||||
for more details about the DSL.</b>
|
||||
</p>'''
|
||||
@ -216,10 +197,9 @@ def shellCmdsUnix =
|
||||
rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad build.javacheck.xml
|
||||
|
||||
# show which files are currently modified in the working copy
|
||||
svn status || true
|
||||
git status || true
|
||||
# make sure no changed module-class-files or ooxml-lite-report-files are lingering on
|
||||
svn revert poi*/src/*/java9/module-info.* || true
|
||||
svn revert src/resources/ooxml-lite-report.* || true
|
||||
git reset --hard || true
|
||||
|
||||
# print out information about which exact version of java we are using
|
||||
echo Java-Home: $JAVA_HOME
|
||||
@ -252,11 +232,9 @@ exit 0'''
|
||||
def shellCmdsWin =
|
||||
'''@echo off
|
||||
:: show which files are currently modified in the working copy
|
||||
svn status
|
||||
git status
|
||||
:: make sure no changed module-class-files are lingering on
|
||||
svn revert poi*\\src\\*\\java9\\module-info.*
|
||||
:: also revert some files directly as the wildcard-based revert seems to fail sometimes
|
||||
svn revert poi\\src\\main\\java9\\module-info.class poi\\src\\test\\java9\\module-info.class poi-examples\\src\\main\\java9\\module-info.class poi-excelant\\src\\main\\java9\\module-info.class poi-excelant\\src\\test\\java9\\module-info.class poi-integration\\src\\test\\java9\\module-info.class poi-ooxml\\src\\main\\java9\\module-info.class poi-ooxml\\src\\test\\java9\\module-info.class poi-ooxml-full\\src\\main\\java9\\module-info.class poi-ooxml-lite\\src\\main\\java9\\module-info.class poi-ooxml-lite\\src\\main\\java9\\module-info.java poi-ooxml-lite-agent\\src\\main\\java9\\module-info.class poi-scratchpad\\src\\main\\java9\\module-info.class poi-scratchpad\\src\\test\\java9\\module-info.class src\\resources\\ooxml-lite-report.clazz src\\resources\\ooxml-lite-report.xsb
|
||||
git reset --hard
|
||||
|
||||
:: print out information about which exact version of java we are using
|
||||
echo Java-Home: %JAVA_HOME%
|
||||
@ -274,6 +252,7 @@ poijobs.each { poijob ->
|
||||
def email = poijob.email ?: defaultEmail
|
||||
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
|
||||
def antRT = poijob.windows ? defaultAntWindows : defaultAnt
|
||||
def checkoutBranch = poijob.branch ?: defaultBranch
|
||||
|
||||
job('POI/' + poijob.name) {
|
||||
if (poijob.disabled) {
|
||||
@ -318,9 +297,11 @@ poijobs.each { poijob ->
|
||||
}
|
||||
jdk(jdkMapping.get(jdkKey).jenkinsJdk)
|
||||
scm {
|
||||
svn(svnBase) { svnNode ->
|
||||
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
|
||||
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
|
||||
git {
|
||||
remote {
|
||||
url(gitBase)
|
||||
}
|
||||
branch("*/${checkoutBranch}")
|
||||
}
|
||||
}
|
||||
checkoutRetryCount(3)
|
||||
@ -358,7 +339,7 @@ poijobs.each { poijob ->
|
||||
|
||||
gradle {
|
||||
switches('-PenableSonar')
|
||||
switches('-Dsonar.login=${POI_SONAR_TOKEN}')
|
||||
switches('-Dsonar.token=${POI_SONAR_TOKEN}')
|
||||
switches('-Dsonar.organization=apache')
|
||||
switches('-Dsonar.projectKey=poi-parent')
|
||||
switches('-Dsonar.host.url=https://sonarcloud.io')
|
||||
@ -369,7 +350,7 @@ poijobs.each { poijob ->
|
||||
tasks('clean')
|
||||
tasks('check')
|
||||
tasks('jacocoTestReport')
|
||||
tasks('sonarqube')
|
||||
tasks('sonar')
|
||||
useWrapper(true)
|
||||
}
|
||||
}
|
||||
@ -458,7 +439,7 @@ poijobs.each { poijob ->
|
||||
}
|
||||
}
|
||||
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results
|
||||
archiveArtifacts('build/dist/*.zip,build/dist/*.tgz,build/dist/maven/*/*.jar,build/coverage/**,*/build/reports/*.bom.*,build/hs_err*.log')
|
||||
archiveArtifacts('build/dist/*.zip,build/dist/*.tgz,build/dist/maven/*/*.jar,build/dist/maven/*/*.pom,build/dist/maven/*/*.asc,build/dist/maven/*/*.sha256,build/dist/maven/*/*.sha512,build/coverage/**,*/build/reports/*.bom.*,build/hs_err*.log')
|
||||
/* this plugin is currently missing on the Apache Jenkins instance
|
||||
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
|
||||
resolveRelativePaths()
|
||||
@ -509,8 +490,8 @@ xmlbeansjobs.each { xjob ->
|
||||
label(slaves)
|
||||
environmentVariables {
|
||||
env('LANG', 'en_US.UTF-8')
|
||||
if (jdkKey == '1.11' || jdkKey == '1.15' || jdkKey == '1.16' || jdkKey == '1.17'
|
||||
|| jdkKey == '1.18' || jdkKey == '1.19' || jdkKey == '1.20' || jdkKey == '1.21') {
|
||||
if (jdkKey == '1.11' || jdkKey == '1.17' || jdkKey == '1.21'
|
||||
|| jdkKey == '1.23' || jdkKey == '1.24' || jdkKey == '1.25') {
|
||||
env('ANT_OPTS', '--add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED')
|
||||
}
|
||||
// will be needed for forbidden-apis-check: env('ANT_HOME', xjob.windows ? 'f:\\jenkins\\tools\\ant\\latest' : '/usr/share/ant')
|
||||
@ -533,9 +514,11 @@ xmlbeansjobs.each { xjob ->
|
||||
}
|
||||
jdk(jdkMapping.get(jdkKey).jenkinsJdk)
|
||||
scm {
|
||||
svn(xmlbeansSvnBase) { svnNode ->
|
||||
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
|
||||
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
|
||||
git {
|
||||
remote {
|
||||
url(xmlbeansGitBase)
|
||||
}
|
||||
branch('*/trunk')
|
||||
}
|
||||
}
|
||||
checkoutRetryCount(3)
|
||||
@ -556,7 +539,7 @@ xmlbeansjobs.each { xjob ->
|
||||
gradle {
|
||||
if (xjob.sonar) {
|
||||
switches('-PenableSonar')
|
||||
switches('-Dsonar.login=${POI_SONAR_TOKEN}')
|
||||
switches('-Dsonar.token=${POI_SONAR_TOKEN}')
|
||||
switches('-Dsonar.organization=apache')
|
||||
switches('-Dsonar.projectKey=apache_xmlbeans')
|
||||
switches('-Dsonar.host.url=https://sonarcloud.io')
|
||||
@ -569,7 +552,7 @@ xmlbeansjobs.each { xjob ->
|
||||
tasks('jenkins')
|
||||
tasks('jacocoTestReport')
|
||||
if (xjob.sonar) {
|
||||
tasks('sonarqube')
|
||||
tasks('sonar')
|
||||
}
|
||||
useWrapper(true)
|
||||
}
|
||||
@ -628,26 +611,19 @@ Unfortunately we often see builds break because of changes/new machines...''')
|
||||
}
|
||||
axes {
|
||||
jdk(
|
||||
'jdk_1.8_latest',
|
||||
'jdk_8_latest',
|
||||
'jdk_11_latest',
|
||||
/* don't look for JDKs that are out of support
|
||||
'jdk_10_latest',
|
||||
'jdk_12_latest',
|
||||
'jdk_13_latest',
|
||||
'jdk_14_latest',
|
||||
'jdk_15_latest',
|
||||
'jdk_16_latest',*/
|
||||
'jdk_17_latest',
|
||||
'jdk_18_latest',
|
||||
'jdk_19_latest',
|
||||
'jdk_20_latest',
|
||||
'jdk_21_latest',
|
||||
'jdk_22_latest',
|
||||
'adoptopenjdk_hotspot_8u282',
|
||||
'ibmjdk_1.8.0_261'
|
||||
'jdk_23_latest',
|
||||
'jdk_24_latest',
|
||||
'jdk_25_latest',
|
||||
'jdk_26_latest',
|
||||
'ibm_semeru_21.0.2_13'
|
||||
)
|
||||
// Note H50 is reserved according to its node-description
|
||||
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60')
|
||||
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60',
|
||||
'jenkins-win-azr-1','jenkins-win-azr-2','jenkins-win-azr-3','jenkins-win-azr-4','jenkins-win-azr-5','jenkins-win-azr-6','jenkins-win-azr-7','jenkins-win-azr-8','jenkins-win-azr-10','jenkins-win-azr-11','jenkins-win-azr-12')
|
||||
}
|
||||
steps {
|
||||
conditionalSteps {
|
||||
@ -657,7 +633,7 @@ Unfortunately we often see builds break because of changes/new machines...''')
|
||||
runner('DontRun')
|
||||
steps {
|
||||
shell(
|
||||
'''which svn || true
|
||||
'''which git || true
|
||||
which javac
|
||||
javac -version
|
||||
echo '<?xml version="1.0"?><project name="POI Build" default="test"><target name="test"><echo>Using Ant: ${ant.version} from ${ant.home}</echo></target></project>' > build.xml
|
||||
@ -699,64 +675,3 @@ echo ^<?xml version=^"1.0^"?^>^<project name=^"POI Build^" default=^"test^"^>^<t
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* I tried to put the view into a sub-folder/sub-view, but failed, there are multiple related
|
||||
plugins so this is all a bit confusing :(, see also https://issues.apache.org/jira/browse/INFRA-14002
|
||||
dashboardView("P/POI-new") {
|
||||
columns {
|
||||
status()
|
||||
weather()
|
||||
configureProject()
|
||||
buildButton()
|
||||
cronTrigger()
|
||||
lastBuildConsole()
|
||||
name()
|
||||
lastSuccess()
|
||||
lastFailure()
|
||||
lastDuration()
|
||||
//lastSuccessDescription()
|
||||
jacoco()
|
||||
}
|
||||
description("<table>\n" +
|
||||
" <tr>\n" +
|
||||
" <td><img src=\"https://poi.apache.org/images/project-header.png\" /></td>\n" +
|
||||
" <td> \n" +
|
||||
" <p>Apache POI - the Java API for Microsoft Documents</p>\n" +
|
||||
" <p><b>Most of the POI Jobs are automatically generated by Jenkins Job DSL\n" +
|
||||
" at <a href=\"https://svn.apache.org/repos/asf/poi/trunk/jenkins\">https://svn.apache.org/repos/asf/poi/trunk/jenkins</a>,<br/>\n" +
|
||||
" see <a href=\"https://github.com/jenkinsci/job-dsl-plugin/wiki\">https://github.com/jenkinsci/job-dsl-plugin/wiki</a>\n" +
|
||||
" for more details about the DSL.</b>\n" +
|
||||
" </p>\n" +
|
||||
" <p>\n" +
|
||||
" <b><a href=\"job/POI-DSL-1.8/lastSuccessfulBuild/findbugsResult/\" target=\"_blank\">Findbugs report of latest build</a></b> -\n" +
|
||||
" <b><a href=\"https://sonarcloud.io/dashboard?id=poi-parent\" target=\"_blank\">Sonar reports</a></b> -\n" +
|
||||
" <b><a href=\"job/POI-DSL-1.8/lastSuccessfulBuild/artifact/build/coverage/index.html\" target=\"_blank\">Coverage of latest build</a></b>\n" +
|
||||
" </p>\n" +
|
||||
" </td>\n" +
|
||||
" </tr>\n" +
|
||||
"</table>")
|
||||
filterBuildQueue(false)
|
||||
filterExecutors(false)
|
||||
|
||||
// Job selection
|
||||
jobs {*/
|
||||
//regex(/.*POI.*/)
|
||||
/*}
|
||||
|
||||
// Layout
|
||||
topPortlets {
|
||||
jenkinsJobsList {
|
||||
displayName('POI jobs')
|
||||
}
|
||||
}
|
||||
leftPortlets {
|
||||
testStatisticsChart()
|
||||
}
|
||||
rightPortlets {
|
||||
testTrendChart()
|
||||
}
|
||||
bottomPortlets {
|
||||
testStatisticsGrid()
|
||||
buildStatistics()
|
||||
}
|
||||
}*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Apache POI
|
||||
Copyright 2003-2023 The Apache Software Foundation
|
||||
Copyright 2003-2026 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (https://www.apache.org/).
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -21,15 +21,15 @@ The bundle embeds all the jars from lib/main:
|
||||
Required to render WMF/EMF images. The OSGi bundle is provided by ServiceMix and available in Maven Central: https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.batik/1.14_1
|
||||
2. Saxon
|
||||
Required if using as the XSLT and XQuery Processor engine in XML Beans.
|
||||
Available in Maven Central (but version might be too old): https://mvnrepository.com/artifact/net.sf.saxon/saxon/8.9.0.4-osgi
|
||||
Available in Maven Central: https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE/12.3
|
||||
3. Apache XML Security for Java, Bouncy Castle and XML Commons Resolver
|
||||
These are required to sign or validate signed Office documents. The OSGi bundles are available in Maven Central:
|
||||
|
||||
- Apache XML Security for Java: https://mvnrepository.com/artifact/org.apache.santuario/xmlsec/3.0.2 (use v3.0.2 with POI v5.2.3)
|
||||
- Apache XML Security for Java: https://mvnrepository.com/artifact/org.apache.santuario/xmlsec/3.0.6
|
||||
|
||||
- XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
|
||||
|
||||
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.76, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.76
|
||||
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.82, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.82
|
||||
4. PDFBox and PDFBox Graphics2D
|
||||
Required to render to PDF documents.
|
||||
The required jars can be downloaded from:
|
||||
|
||||
14
osgi/pom.xml
14
osgi/pom.xml
@ -24,13 +24,13 @@
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-bundle</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<version>5.2.4</version>
|
||||
<version>6.0.0-SNAPSHOT</version>
|
||||
|
||||
<name>Apache POI OSGi bundle</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<poi.version>5.2.4</poi.version>
|
||||
<pax.exam.version>4.12.0</pax.exam.version>
|
||||
<poi.version>6.0.0-SNAPSHOT</poi.version>
|
||||
<pax.exam.version>4.14.0</pax.exam.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@ -39,8 +39,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>11</source>
|
||||
<target>11</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@ -176,7 +176,7 @@
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>4.13.1</version>
|
||||
<version>4.13.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Pax Exam -->
|
||||
@ -231,7 +231,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.20.0</version>
|
||||
<version>2.25.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@ -35,8 +35,6 @@ dependencies {
|
||||
implementation project(path: ':poi-scratchpad', configuration: 'archives')
|
||||
}
|
||||
|
||||
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
|
||||
|
||||
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
|
||||
if (NO_SCRATCHPAD) {
|
||||
exclude group: 'org.apache.poi', module: 'poi-scratchpad'
|
||||
@ -49,27 +47,27 @@ final String MODULE_NAME = 'org.apache.poi.examples'
|
||||
final Pattern MODULE_REGEX = ~'\\.jar$'
|
||||
final List MODULE_COMPILE_PATH = sourceSets.main.compileClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
|
||||
|
||||
task compileJava9(type: JavaCompile) {
|
||||
tasks.register('compileJava9', JavaCompile) {
|
||||
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MODULE_COMPILE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MODULE_COMPILE_PATH).asPath
|
||||
]
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn compileJava9
|
||||
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
manifest {
|
||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||
|
||||
@ -36,7 +36,7 @@ WorkbookFactory.create(f,null,true).withCloseable { workbook ->
|
||||
|
||||
def sheet = workbook.getSheetAt(sheetNum)
|
||||
sheet.each { row ->
|
||||
def nonEmptyCells = row.grep { c -> c.getCellType() != Cell.CELL_TYPE_BLANK }
|
||||
def nonEmptyCells = row.grep { c -> c.getCellType() != CellType.BLANK }
|
||||
println " Row ${row.getRowNum()} has ${nonEmptyCells.size()} non-empty cells:"
|
||||
nonEmptyCells.each { c ->
|
||||
def cRef = [c] as CellReference
|
||||
@ -52,7 +52,7 @@ WorkbookFactory.create(f,null,true).withCloseable { workbook ->
|
||||
ns1.createRow(1).createCell(0).setCellValue("TODO - Populate with data")
|
||||
|
||||
Sheet ns2 = workbook.createSheet("Generated 2")
|
||||
exportHeader(ns2, headerStyle, "This is a demo sheet",
|
||||
exportHeader(ns2, headerStyle, "This is a demo sheet",
|
||||
["ID","Title","Date","Author","Num"] as String[])
|
||||
ns2.createRow(2).createCell(0).setCellValue(1)
|
||||
ns2.createRow(3).createCell(0).setCellValue(4)
|
||||
|
||||
@ -21,10 +21,11 @@ apply plugin: 'groovy'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.codehaus.groovy:groovy-all:2.4.21'
|
||||
compile 'org.apache.poi:poi:5.2.2'
|
||||
compile 'org.apache.poi:poi-ooxml:5.2.2'
|
||||
implementation 'org.codehaus.groovy:groovy-all:2.4.21'
|
||||
implementation 'org.apache.poi:poi:5.3.0'
|
||||
implementation 'org.apache.poi:poi-ooxml:5.3.0'
|
||||
}
|
||||
|
||||
// Our files are in the current directory
|
||||
@ -33,11 +34,11 @@ sourceSets {
|
||||
}
|
||||
|
||||
// Run out read demo by default
|
||||
tasks.withType(JavaExec) {
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
tasks.withType(JavaExec).configureEach {
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
task runScript(type: JavaExec) {
|
||||
tasks.register('runScript', JavaExec) {
|
||||
mainClass = "SpreadSheetDemo"
|
||||
args = ["../../../test-data/spreadsheet/Simple.xls"]
|
||||
args = ["../../../../test-data/spreadsheet/Simple.xls"]
|
||||
}
|
||||
defaultTasks 'runScript'
|
||||
|
||||
1
poi-examples/src/main/groovy/settings.gradle
Normal file
1
poi-examples/src/main/groovy/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
// empty file required to have a standalone build
|
||||
@ -21,7 +21,7 @@ package org.apache.poi.examples.crypt;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Predicate;
|
||||
@ -72,7 +72,7 @@ public final class OOXMLPasswordsTry {
|
||||
};
|
||||
|
||||
// Try each password in turn, reporting progress
|
||||
try (Stream<String> lines = Files.lines(Paths.get(words))) {
|
||||
try (Stream<String> lines = Files.lines(Path.of(words))) {
|
||||
Optional<String> found = lines.filter(counter).filter(w -> isValid(d, w)).findFirst();
|
||||
System.out.println(found.map(s -> "Password found: " + s).orElse("Error - No password matched"));
|
||||
}
|
||||
|
||||
@ -253,6 +253,10 @@ public class XLS2CSVmra implements HSSFListener {
|
||||
|
||||
// Format
|
||||
thisStr = formatListener.formatNumberDateCell(numrec);
|
||||
if (thisStr.contains(",")) {
|
||||
thisStr = '"' + thisStr + '"';
|
||||
}
|
||||
|
||||
break;
|
||||
case RKRecord.sid:
|
||||
RKRecord rkrec = (RKRecord) record;
|
||||
|
||||
@ -23,7 +23,6 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
@ -32,6 +31,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
|
||||
/**
|
||||
* This class contains code that demonstrates how to insert plain, numbered
|
||||
@ -50,7 +50,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
*/
|
||||
@SuppressWarnings({"java:S106","java:S4823"})
|
||||
public class InCellLists {
|
||||
private static final Logger LOG = LogManager.getLogger(InCellLists.class);
|
||||
private static final Logger LOG = PoiLogManager.getLogger(InCellLists.class);
|
||||
|
||||
|
||||
// This character looks like a solid, black, loser case letter 'o'
|
||||
|
||||
@ -22,12 +22,12 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
|
||||
/**
|
||||
* Creates outlines.
|
||||
@ -35,7 +35,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
public class Outlines implements Closeable {
|
||||
public static void main(String[] args)
|
||||
throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
|
||||
Logger LOGGER = LogManager.getLogger(Outlines.class);
|
||||
Logger LOGGER = PoiLogManager.getLogger(Outlines.class);
|
||||
for (int i=1; i<=13; i++) {
|
||||
try (Outlines o = new Outlines()) {
|
||||
String log = (String) Outlines.class.getDeclaredMethod("test" + i).invoke(o);
|
||||
|
||||
@ -59,7 +59,7 @@ public final class Word2Forrest
|
||||
{
|
||||
Paragraph p = r.getParagraph (x);
|
||||
String text = p.text ();
|
||||
if (text.trim ().length () == 0)
|
||||
if (text.trim().isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ package org.apache.poi.examples.ss;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
@ -95,7 +95,7 @@ public final class ConditionalFormats {
|
||||
if (wb instanceof XSSFWorkbook) {
|
||||
file += "x";
|
||||
}
|
||||
try (OutputStream out = Files.newOutputStream(Paths.get(file))) {
|
||||
try (OutputStream out = Files.newOutputStream(Path.of(file))) {
|
||||
wb.write(out);
|
||||
}
|
||||
System.out.println("Generated: " + file);
|
||||
@ -203,7 +203,7 @@ public final class ConditionalFormats {
|
||||
if (rn%10 == 0) {
|
||||
str = str + "x10 ";
|
||||
}
|
||||
if (str.length() == 0) {
|
||||
if (str.isEmpty()) {
|
||||
str = "nothing special...";
|
||||
}
|
||||
r.createCell(1).setCellValue("It is " + str);
|
||||
|
||||
@ -28,8 +28,8 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellType;
|
||||
import org.apache.poi.ss.usermodel.DataFormatter;
|
||||
@ -134,7 +134,7 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
*/
|
||||
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
|
||||
public class ToCSV {
|
||||
private static final Logger LOG = LogManager.getLogger(ToCSV.class);
|
||||
private static final Logger LOG = PoiLogManager.getLogger(ToCSV.class);
|
||||
|
||||
private Workbook workbook;
|
||||
private ArrayList<ArrayList<String>> csvData;
|
||||
|
||||
@ -23,7 +23,7 @@ import org.apache.poi.util.DefaultTempFileCreationStrategy;
|
||||
import org.apache.poi.util.TempFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public final class TempFileUtils {
|
||||
private TempFileUtils() {
|
||||
@ -31,7 +31,7 @@ public final class TempFileUtils {
|
||||
|
||||
@SuppressWarnings("java:S106")
|
||||
public static void checkTempFiles() {
|
||||
File tempDir = Paths.get(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
|
||||
File tempDir = Path.of(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
|
||||
if(tempDir.exists()) {
|
||||
String[] tempFiles = tempDir.list();
|
||||
if(tempFiles != null && tempFiles.length > 0) {
|
||||
|
||||
@ -1,251 +1,251 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.apache.poi.xslf.usermodel;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||
import org.apache.poi.openxml4j.opc.PackagePartName;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||
import org.apache.poi.sl.usermodel.PictureData.PictureType;
|
||||
import org.apache.xmlbeans.XmlCursor;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
|
||||
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
|
||||
|
||||
import com.xuggle.mediatool.IMediaReader;
|
||||
import com.xuggle.mediatool.MediaListenerAdapter;
|
||||
import com.xuggle.mediatool.ToolFactory;
|
||||
import com.xuggle.mediatool.event.IVideoPictureEvent;
|
||||
import com.xuggle.xuggler.Global;
|
||||
import com.xuggle.xuggler.IContainer;
|
||||
import com.xuggle.xuggler.io.InputOutputStreamHandler;
|
||||
|
||||
/**
|
||||
* Adding multiple videos to a slide
|
||||
*
|
||||
* need the Xuggler 5.4 jars:
|
||||
* <repositories>
|
||||
* <repository>
|
||||
* <id>xuggle repo</id>
|
||||
* <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
|
||||
* </repository>
|
||||
* </repositories>
|
||||
* ...
|
||||
* <dependency>
|
||||
* <groupId>xuggle</groupId>
|
||||
* <artifactId>xuggle-xuggler</artifactId>
|
||||
* <version>5.4</version>
|
||||
* </dependency>
|
||||
*
|
||||
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
|
||||
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
|
||||
*/
|
||||
public class AddVideoToPptx {
|
||||
static DecimalFormat df_time = new DecimalFormat("0.####");
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
|
||||
// URL video = new URL("file:test-mpeg.mpg");
|
||||
|
||||
XMLSlideShow pptx = new XMLSlideShow();
|
||||
|
||||
// add video file
|
||||
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
|
||||
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
|
||||
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
|
||||
OutputStream partOs = part.getOutputStream();
|
||||
InputStream fis = video.openStream();
|
||||
byte buf[] = new byte[1024];
|
||||
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
|
||||
fis.close();
|
||||
partOs.close();
|
||||
|
||||
XSLFSlide slide1 = pptx.createSlide();
|
||||
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
|
||||
addVideo(pptx, slide1, part, pv1, 5);
|
||||
addTimingInfo(slide1, pv1);
|
||||
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
|
||||
addVideo(pptx, slide1, part, pv2, 9);
|
||||
addTimingInfo(slide1, pv2);
|
||||
|
||||
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
|
||||
pptx.write(fos);
|
||||
fos.close();
|
||||
|
||||
pptx.close();
|
||||
}
|
||||
|
||||
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
|
||||
// get preview after 5 sec.
|
||||
IContainer ic = IContainer.make();
|
||||
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
|
||||
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
|
||||
|
||||
IMediaReader mediaReader = ToolFactory.makeReader(ic);
|
||||
|
||||
// stipulate that we want BufferedImages created in BGR 24bit color space
|
||||
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
|
||||
|
||||
ImageSnapListener isl = new ImageSnapListener(seconds);
|
||||
mediaReader.addListener(isl);
|
||||
|
||||
// read out the contents of the media file and
|
||||
// dispatch events to the attached listener
|
||||
while (!isl.hasFired && mediaReader.readPacket() == null) ;
|
||||
|
||||
mediaReader.close();
|
||||
ic.close();
|
||||
|
||||
// add snapshot
|
||||
BufferedImage image1 = isl.image;
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ImageIO.write(image1, "jpeg", bos);
|
||||
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
|
||||
XSLFPictureShape pic1 = slide1.createPicture(snap);
|
||||
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
|
||||
return pic1;
|
||||
}
|
||||
|
||||
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
|
||||
|
||||
// add video shape
|
||||
PackagePartName partName = videoPart.getPartName();
|
||||
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
|
||||
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
|
||||
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
|
||||
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
|
||||
link1.setId("");
|
||||
link1.setAction("ppaction://media");
|
||||
|
||||
// add video relation
|
||||
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
|
||||
nvPr.addNewVideoFile().setLink(prsExec1.getId());
|
||||
CTExtension ext = nvPr.addNewExtLst().addNewExt();
|
||||
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
|
||||
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
|
||||
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
|
||||
|
||||
try (XmlCursor cur = ext.newCursor()) {
|
||||
cur.toEndToken();
|
||||
cur.beginElement(new QName(p14Ns, "media", "p14"));
|
||||
cur.insertNamespace("p14", p14Ns);
|
||||
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
|
||||
cur.beginElement(new QName(p14Ns, "trim", "p14"));
|
||||
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
|
||||
// add slide timing information, so video can be controlled
|
||||
CTSlide xslide = slide1.getXmlObject();
|
||||
CTTimeNodeList ctnl;
|
||||
if (!xslide.isSetTiming()) {
|
||||
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
|
||||
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
|
||||
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
|
||||
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
|
||||
ctnl = ctn.addNewChildTnLst();
|
||||
} else {
|
||||
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
|
||||
}
|
||||
|
||||
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
|
||||
cmedia.setVol(80000);
|
||||
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
|
||||
ctn.setFill(STTLTimeNodeFillType.HOLD);
|
||||
ctn.setDisplay(false);
|
||||
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
|
||||
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
|
||||
}
|
||||
|
||||
|
||||
static class ImageSnapListener extends MediaListenerAdapter {
|
||||
final double SECONDS_BETWEEN_FRAMES;
|
||||
final long MICRO_SECONDS_BETWEEN_FRAMES;
|
||||
boolean hasFired = false;
|
||||
BufferedImage image = null;
|
||||
|
||||
// The video stream index, used to ensure we display frames from one and
|
||||
// only one video stream from the media container.
|
||||
int mVideoStreamIndex = -1;
|
||||
|
||||
// Time of last frame write
|
||||
long mLastPtsWrite = Global.NO_PTS;
|
||||
|
||||
public ImageSnapListener(double seconds) {
|
||||
SECONDS_BETWEEN_FRAMES = seconds;
|
||||
MICRO_SECONDS_BETWEEN_FRAMES =
|
||||
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onVideoPicture(IVideoPictureEvent event) {
|
||||
|
||||
if (event.getStreamIndex() != mVideoStreamIndex) {
|
||||
// if the selected video stream id is not yet set, go ahead an
|
||||
// select this lucky video stream
|
||||
if (mVideoStreamIndex != -1) return;
|
||||
mVideoStreamIndex = event.getStreamIndex();
|
||||
}
|
||||
|
||||
long evtTS = event.getTimeStamp();
|
||||
|
||||
// if uninitialized, back date mLastPtsWrite to get the very first frame
|
||||
if (mLastPtsWrite == Global.NO_PTS)
|
||||
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
|
||||
|
||||
// if its time to write the next frame
|
||||
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
|
||||
if (!hasFired) {
|
||||
image = event.getImage();
|
||||
hasFired = true;
|
||||
}
|
||||
// update last write time
|
||||
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.apache.poi.xslf.usermodel;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||
import org.apache.poi.openxml4j.opc.PackagePartName;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||
import org.apache.poi.sl.usermodel.PictureData.PictureType;
|
||||
import org.apache.xmlbeans.XmlCursor;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
|
||||
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
|
||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
|
||||
|
||||
import com.xuggle.mediatool.IMediaReader;
|
||||
import com.xuggle.mediatool.MediaListenerAdapter;
|
||||
import com.xuggle.mediatool.ToolFactory;
|
||||
import com.xuggle.mediatool.event.IVideoPictureEvent;
|
||||
import com.xuggle.xuggler.Global;
|
||||
import com.xuggle.xuggler.IContainer;
|
||||
import com.xuggle.xuggler.io.InputOutputStreamHandler;
|
||||
|
||||
/**
|
||||
* Adding multiple videos to a slide
|
||||
*
|
||||
* need the Xuggler 5.4 jars:
|
||||
* <repositories>
|
||||
* <repository>
|
||||
* <id>xuggle repo</id>
|
||||
* <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
|
||||
* </repository>
|
||||
* </repositories>
|
||||
* ...
|
||||
* <dependency>
|
||||
* <groupId>xuggle</groupId>
|
||||
* <artifactId>xuggle-xuggler</artifactId>
|
||||
* <version>5.4</version>
|
||||
* </dependency>
|
||||
*
|
||||
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
|
||||
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
|
||||
*/
|
||||
public class AddVideoToPptx {
|
||||
static DecimalFormat df_time = new DecimalFormat("0.####");
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
|
||||
// URL video = new URL("file:test-mpeg.mpg");
|
||||
|
||||
XMLSlideShow pptx = new XMLSlideShow();
|
||||
|
||||
// add video file
|
||||
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
|
||||
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
|
||||
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
|
||||
OutputStream partOs = part.getOutputStream();
|
||||
InputStream fis = video.openStream();
|
||||
byte buf[] = new byte[1024];
|
||||
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
|
||||
fis.close();
|
||||
partOs.close();
|
||||
|
||||
XSLFSlide slide1 = pptx.createSlide();
|
||||
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
|
||||
addVideo(pptx, slide1, part, pv1, 5);
|
||||
addTimingInfo(slide1, pv1);
|
||||
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
|
||||
addVideo(pptx, slide1, part, pv2, 9);
|
||||
addTimingInfo(slide1, pv2);
|
||||
|
||||
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
|
||||
pptx.write(fos);
|
||||
fos.close();
|
||||
|
||||
pptx.close();
|
||||
}
|
||||
|
||||
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
|
||||
// get preview after 5 sec.
|
||||
IContainer ic = IContainer.make();
|
||||
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
|
||||
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
|
||||
|
||||
IMediaReader mediaReader = ToolFactory.makeReader(ic);
|
||||
|
||||
// stipulate that we want BufferedImages created in BGR 24bit color space
|
||||
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
|
||||
|
||||
ImageSnapListener isl = new ImageSnapListener(seconds);
|
||||
mediaReader.addListener(isl);
|
||||
|
||||
// read out the contents of the media file and
|
||||
// dispatch events to the attached listener
|
||||
while (!isl.hasFired && mediaReader.readPacket() == null) ;
|
||||
|
||||
mediaReader.close();
|
||||
ic.close();
|
||||
|
||||
// add snapshot
|
||||
BufferedImage image1 = isl.image;
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ImageIO.write(image1, "jpeg", bos);
|
||||
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
|
||||
XSLFPictureShape pic1 = slide1.createPicture(snap);
|
||||
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
|
||||
return pic1;
|
||||
}
|
||||
|
||||
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
|
||||
|
||||
// add video shape
|
||||
PackagePartName partName = videoPart.getPartName();
|
||||
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
|
||||
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
|
||||
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
|
||||
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
|
||||
link1.setId("");
|
||||
link1.setAction("ppaction://media");
|
||||
|
||||
// add video relation
|
||||
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
|
||||
nvPr.addNewVideoFile().setLink(prsExec1.getId());
|
||||
CTExtension ext = nvPr.addNewExtLst().addNewExt();
|
||||
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
|
||||
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
|
||||
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
|
||||
|
||||
try (XmlCursor cur = ext.newCursor()) {
|
||||
cur.toEndToken();
|
||||
cur.beginElement(new QName(p14Ns, "media", "p14"));
|
||||
cur.insertNamespace("p14", p14Ns);
|
||||
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
|
||||
cur.beginElement(new QName(p14Ns, "trim", "p14"));
|
||||
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
|
||||
// add slide timing information, so video can be controlled
|
||||
CTSlide xslide = slide1.getXmlObject();
|
||||
CTTimeNodeList ctnl;
|
||||
if (!xslide.isSetTiming()) {
|
||||
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
|
||||
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
|
||||
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
|
||||
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
|
||||
ctnl = ctn.addNewChildTnLst();
|
||||
} else {
|
||||
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
|
||||
}
|
||||
|
||||
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
|
||||
cmedia.setVol(80000);
|
||||
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
|
||||
ctn.setFill(STTLTimeNodeFillType.HOLD);
|
||||
ctn.setDisplay(false);
|
||||
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
|
||||
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
|
||||
}
|
||||
|
||||
|
||||
static class ImageSnapListener extends MediaListenerAdapter {
|
||||
final double SECONDS_BETWEEN_FRAMES;
|
||||
final long MICRO_SECONDS_BETWEEN_FRAMES;
|
||||
boolean hasFired = false;
|
||||
BufferedImage image = null;
|
||||
|
||||
// The video stream index, used to ensure we display frames from one and
|
||||
// only one video stream from the media container.
|
||||
int mVideoStreamIndex = -1;
|
||||
|
||||
// Time of last frame write
|
||||
long mLastPtsWrite = Global.NO_PTS;
|
||||
|
||||
public ImageSnapListener(double seconds) {
|
||||
SECONDS_BETWEEN_FRAMES = seconds;
|
||||
MICRO_SECONDS_BETWEEN_FRAMES =
|
||||
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onVideoPicture(IVideoPictureEvent event) {
|
||||
|
||||
if (event.getStreamIndex() != mVideoStreamIndex) {
|
||||
// if the selected video stream id is not yet set, go ahead an
|
||||
// select this lucky video stream
|
||||
if (mVideoStreamIndex != -1) return;
|
||||
mVideoStreamIndex = event.getStreamIndex();
|
||||
}
|
||||
|
||||
long evtTS = event.getTimeStamp();
|
||||
|
||||
// if uninitialized, back date mLastPtsWrite to get the very first frame
|
||||
if (mLastPtsWrite == Global.NO_PTS)
|
||||
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
|
||||
|
||||
// if its time to write the next frame
|
||||
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
|
||||
if (!hasFired) {
|
||||
image = event.getImage();
|
||||
hasFired = true;
|
||||
}
|
||||
// update last write time
|
||||
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -64,7 +64,7 @@ public final class BarChartDemo {
|
||||
}
|
||||
|
||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
||||
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
String seriesText = modelReader.readLine();
|
||||
|
||||
@ -26,7 +26,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -72,7 +72,7 @@ public final class ChartFromScratch {
|
||||
return;
|
||||
}
|
||||
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
String seriesText = modelReader.readLine();
|
||||
@ -180,6 +180,10 @@ public final class ChartFromScratch {
|
||||
chart.setTitleText(chartTitle);
|
||||
chart.setTitleOverlay(false);
|
||||
chart.setAutoTitleDeleted(false);
|
||||
|
||||
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
|
||||
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
|
||||
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
|
||||
}
|
||||
|
||||
private static final int COLUMN_LANGUAGES = 0;
|
||||
|
||||
@ -41,7 +41,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -64,7 +64,7 @@ public final class DoughnutChartFromScratch {
|
||||
return;
|
||||
}
|
||||
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
String seriesText = modelReader.readLine();
|
||||
|
||||
@ -25,7 +25,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -61,7 +61,7 @@ public final class PieChartDemo {
|
||||
}
|
||||
|
||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
||||
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
|
||||
try (XMLSlideShow pptx = new XMLSlideShow(argIS)) {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
10 languages with most speakers as first language
|
||||
countries,speakers,language
|
||||
58,315,العربية
|
||||
4,243,বাংলা
|
||||
38,1299,中文
|
||||
118,378,English
|
||||
4,260,हिन्दी
|
||||
2,128,日本語
|
||||
15,223,português
|
||||
6,119,ਪੰਜਾਬੀ
|
||||
18,154,Русский язык
|
||||
31,442,español
|
||||
10 languages with most speakers as first language
|
||||
countries,speakers,language
|
||||
58,315,العربية
|
||||
4,243,বাংলা
|
||||
38,1299,中文
|
||||
118,378,English
|
||||
4,260,हिन्दी
|
||||
2,128,日本語
|
||||
15,223,português
|
||||
6,119,ਪੰਜਾਬੀ
|
||||
18,154,Русский язык
|
||||
31,442,español
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
My Chart
|
||||
First 1.0
|
||||
Second 3.0
|
||||
My Chart
|
||||
First 1.0
|
||||
Second 3.0
|
||||
Third 4.0
|
||||
@ -136,7 +136,7 @@ public class FromHowTo {
|
||||
if(nextIsString && StringUtil.isNotBlank(lastContents)) {
|
||||
Integer idx = Integer.valueOf(lastContents);
|
||||
lastContents = lruCache.get(idx);
|
||||
if (lastContents == null && !lruCache.containsKey(idx)) {
|
||||
if (lastContents == null && !lruCache.containsKey(idx) && sst != null) {
|
||||
lastContents = sst.getItemAt(idx).getString();
|
||||
lruCache.put(idx, lastContents);
|
||||
}
|
||||
|
||||
@ -20,12 +20,12 @@
|
||||
package org.apache.poi.examples.xssf.eventusermodel;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.apache.poi.examples.xssf.usermodel.LoadPasswordProtectedXlsx;
|
||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||
import org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource;
|
||||
import org.apache.poi.xssf.eventusermodel.XSSFReader;
|
||||
import org.apache.poi.xssf.eventusermodel.XSSFReader.SheetIterator;
|
||||
|
||||
/**
|
||||
* An example that loads a password protected workbook and counts the sheets.
|
||||
@ -48,11 +48,12 @@ public final class LoadPasswordProtectedXlsxStreaming {
|
||||
try (AesZipFileZipEntrySource source = AesZipFileZipEntrySource.createZipEntrySource(inputStream);
|
||||
OPCPackage pkg = OPCPackage.open(source)) {
|
||||
XSSFReader reader = new XSSFReader(pkg);
|
||||
SheetIterator iter = (SheetIterator)reader.getSheetsData();
|
||||
Iterator<InputStream> iter = reader.getSheetsData();
|
||||
int count = 0;
|
||||
while(iter.hasNext()) {
|
||||
iter.next();
|
||||
count++;
|
||||
try (InputStream stream = iter.next()) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
System.out.println("sheet count: " + count);
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ public class XLSX2CSV {
|
||||
styles, null, strings, sheetHandler, formatter, false);
|
||||
sheetParser.setContentHandler(handler);
|
||||
sheetParser.parse(sheetSource);
|
||||
} catch(ParserConfigurationException e) {
|
||||
} catch (ParserConfigurationException e) {
|
||||
throw new RuntimeException("SAX parser appears to be broken - " + e.getMessage());
|
||||
}
|
||||
}
|
||||
@ -234,7 +234,12 @@ public class XLSX2CSV {
|
||||
String sheetName = iter.getSheetName();
|
||||
this.output.println();
|
||||
this.output.println(sheetName + " [index=" + index + "]:");
|
||||
processSheet(styles, strings, new SheetToCSV(), stream);
|
||||
|
||||
try {
|
||||
processSheet(styles, strings, new SheetToCSV(), stream);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IOException("Failed to parse sheet " + sheetName, e);
|
||||
}
|
||||
}
|
||||
++index;
|
||||
}
|
||||
|
||||
@ -53,12 +53,13 @@ public class DeferredGeneration {
|
||||
|
||||
try (FileOutputStream fileOut = new FileOutputStream("DeferredGeneration.xlsx")) {
|
||||
wb.write(fileOut);
|
||||
//writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
|
||||
//wb.writeAvoidingTempFiles(fileOut);
|
||||
} finally {
|
||||
//the dispose call is necessary to ensure temp files are removed
|
||||
wb.dispose();
|
||||
// writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
|
||||
// wb.writeAvoidingTempFiles(fileOut);
|
||||
}
|
||||
// finally {
|
||||
// the dispose call is no longer necessary to ensure temp files are removed
|
||||
// wb.dispose();
|
||||
// }
|
||||
System.out.println("wrote DeferredGeneration.xlsx");
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,10 +46,11 @@ public class Outlining {
|
||||
|
||||
try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) {
|
||||
wb2.write(fileOut);
|
||||
} finally {
|
||||
//the dispose call is necessary to ensure temp files are removed
|
||||
wb2.dispose();
|
||||
}
|
||||
// finally {
|
||||
// the dispose call is no longer necessary to ensure temp files are removed
|
||||
// wb2.dispose();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,8 +58,7 @@ public final class SavePasswordProtectedXlsx {
|
||||
TempFileUtils.checkTempFiles();
|
||||
String filename = args[0];
|
||||
String password = args[1];
|
||||
SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource();
|
||||
try {
|
||||
try (SXSSFWorkbookWithCustomZipEntrySource wb = new SXSSFWorkbookWithCustomZipEntrySource()) {
|
||||
for(int i = 0; i < 10; i++) {
|
||||
SXSSFSheet sheet = wb.createSheet("Sheet" + i);
|
||||
for(int r = 0; r < 1000; r++) {
|
||||
@ -78,10 +77,6 @@ public final class SavePasswordProtectedXlsx {
|
||||
} finally {
|
||||
tempData.dispose();
|
||||
}
|
||||
} finally {
|
||||
wb.close();
|
||||
//the dispose call is necessary to ensure temp files are removed
|
||||
wb.dispose();
|
||||
}
|
||||
TempFileUtils.checkTempFiles();
|
||||
}
|
||||
|
||||
@ -104,6 +104,10 @@ public final class BarChart {
|
||||
solidFillSeries(data, 0, PresetColor.CHARTREUSE);
|
||||
solidFillSeries(data, 1, PresetColor.TURQUOISE);
|
||||
|
||||
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
|
||||
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
|
||||
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
|
||||
|
||||
// Write the output to a file
|
||||
try (FileOutputStream fileOut = new FileOutputStream("ooxml-bar-chart.xlsx")) {
|
||||
wb.write(fileOut);
|
||||
|
||||
@ -35,8 +35,8 @@ import java.util.Random;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
||||
import org.apache.commons.compress.archivers.zip.ZipFile;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.openxml4j.opc.internal.ZipHelper;
|
||||
import org.apache.poi.ss.usermodel.DateUtil;
|
||||
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
@ -77,7 +77,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
* See <a href="https://poi.apache.org/spreadsheet/how-to.html#sxssf">SXSSF (Streaming Usermodel API)</a>.
|
||||
*/
|
||||
public final class BigGridDemo {
|
||||
private static final Logger LOG = LogManager.getLogger(BigGridDemo.class);
|
||||
private static final Logger LOG = PoiLogManager.getLogger(BigGridDemo.class);
|
||||
|
||||
private static final Random rnd = new Random();
|
||||
|
||||
|
||||
@ -105,6 +105,10 @@ public final class LineChart {
|
||||
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
|
||||
solidLineSeries(data, 1, PresetColor.TURQUOISE);
|
||||
|
||||
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
|
||||
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
|
||||
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
|
||||
|
||||
// Write the output to a file
|
||||
try (FileOutputStream fileOut = new FileOutputStream("ooxml-line-chart.xlsx")) {
|
||||
wb.write(fileOut);
|
||||
|
||||
@ -99,6 +99,10 @@ public final class ScatterChart {
|
||||
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
|
||||
solidLineSeries(data, 1, PresetColor.TURQUOISE);
|
||||
|
||||
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
|
||||
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
|
||||
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
|
||||
|
||||
// Write the output to a file
|
||||
try (FileOutputStream fileOut = new FileOutputStream("ooxml-scatter-chart.xlsx")) {
|
||||
wb.write(fileOut);
|
||||
|
||||
@ -26,7 +26,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -63,7 +63,7 @@ public final class BarChartExample {
|
||||
}
|
||||
|
||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
||||
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
String seriesText = modelReader.readLine();
|
||||
|
||||
@ -24,7 +24,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -67,7 +67,7 @@ public final class ChartFromScratch {
|
||||
return;
|
||||
}
|
||||
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
||||
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||
|
||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||
String seriesText = modelReader.readLine();
|
||||
@ -146,6 +146,10 @@ public final class ChartFromScratch {
|
||||
chart.setTitleText(chartTitle);
|
||||
chart.setTitleOverlay(false);
|
||||
chart.setAutoTitleDeleted(false);
|
||||
|
||||
// temporary workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
|
||||
if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
|
||||
if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
|
||||
}
|
||||
|
||||
private static final int COLUMN_LANGUAGES = 0;
|
||||
|
||||
@ -22,10 +22,10 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.poi.common.usermodel.PictureType;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.util.Units;
|
||||
import org.apache.poi.xwpf.usermodel.BreakType;
|
||||
import org.apache.poi.xwpf.usermodel.Document;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
@ -45,30 +45,30 @@ public final class SimpleImages {
|
||||
XWPFRun r = p.createRun();
|
||||
|
||||
for (String imgFile : args) {
|
||||
int format;
|
||||
PictureType format;
|
||||
|
||||
if (imgFile.endsWith(".emf")) {
|
||||
format = Document.PICTURE_TYPE_EMF;
|
||||
format = PictureType.EMF;
|
||||
} else if (imgFile.endsWith(".wmf")) {
|
||||
format = Document.PICTURE_TYPE_WMF;
|
||||
format = PictureType.WMF;
|
||||
} else if (imgFile.endsWith(".pict")) {
|
||||
format = Document.PICTURE_TYPE_PICT;
|
||||
format = PictureType.PICT;
|
||||
} else if (imgFile.endsWith(".jpeg") || imgFile.endsWith(".jpg")) {
|
||||
format = Document.PICTURE_TYPE_JPEG;
|
||||
format = PictureType.JPEG;
|
||||
} else if (imgFile.endsWith(".png")) {
|
||||
format = Document.PICTURE_TYPE_PNG;
|
||||
format = PictureType.PNG;
|
||||
} else if (imgFile.endsWith(".dib")) {
|
||||
format = Document.PICTURE_TYPE_DIB;
|
||||
format = PictureType.DIB;
|
||||
} else if (imgFile.endsWith(".gif")) {
|
||||
format = Document.PICTURE_TYPE_GIF;
|
||||
format = PictureType.GIF;
|
||||
} else if (imgFile.endsWith(".tiff")) {
|
||||
format = Document.PICTURE_TYPE_TIFF;
|
||||
format = PictureType.TIFF;
|
||||
} else if (imgFile.endsWith(".eps")) {
|
||||
format = Document.PICTURE_TYPE_EPS;
|
||||
format = PictureType.EPS;
|
||||
} else if (imgFile.endsWith(".bmp")) {
|
||||
format = Document.PICTURE_TYPE_BMP;
|
||||
format = PictureType.BMP;
|
||||
} else if (imgFile.endsWith(".wpg")) {
|
||||
format = Document.PICTURE_TYPE_WPG;
|
||||
format = PictureType.WPG;
|
||||
} else {
|
||||
System.err.println("Unsupported picture: " + imgFile +
|
||||
". Expected emf|wmf|pict|jpeg|png|dib|gif|tiff|eps|bmp|wpg");
|
||||
|
||||
@ -44,7 +44,7 @@ import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
* SpreadsheetML workbook embedded into the document.<p>
|
||||
*
|
||||
* This code was successfully tested with the following file from the POI test collection:
|
||||
* http://svn.apache.org/repos/asf/poi/trunk/test-data/document/EmbeddedDocument.docx
|
||||
* test-data/document/EmbeddedDocument.docx
|
||||
*/
|
||||
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
|
||||
public class UpdateEmbeddedDoc {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
10 languages with most speakers as first language
|
||||
countries,speakers,language
|
||||
58,315,العربية
|
||||
4,243,বাংলা
|
||||
38,1299,中文
|
||||
118,378,English
|
||||
4,260,हिन्दी
|
||||
2,128,日本語
|
||||
15,223,português
|
||||
6,119,ਪੰਜਾਬੀ
|
||||
18,154,Русский язык
|
||||
31,442,español
|
||||
10 languages with most speakers as first language
|
||||
countries,speakers,language
|
||||
58,315,العربية
|
||||
4,243,বাংলা
|
||||
38,1299,中文
|
||||
118,378,English
|
||||
4,260,हिन्दी
|
||||
2,128,日本語
|
||||
15,223,português
|
||||
6,119,ਪੰਜਾਬੀ
|
||||
18,154,Русский язык
|
||||
31,442,español
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
package org.apache.poi.examples.hssf.eventusermodel;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.apache.poi.hssf.HSSFTestDataSamples;
|
||||
import org.apache.poi.hssf.record.NumberRecord;
|
||||
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class TestXLS2CSVmra {
|
||||
@Test
|
||||
void test() throws Exception {
|
||||
XLS2CSVmra.main(new String[] { HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath() });
|
||||
}
|
||||
|
||||
@Test
|
||||
void testWithMinCols() throws Exception {
|
||||
XLS2CSVmra.main(new String[] { HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath(), "100" });
|
||||
}
|
||||
|
||||
@Test
|
||||
void testProcess() throws IOException {
|
||||
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
|
||||
PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
|
||||
XLS2CSVmra cvs = new XLS2CSVmra(
|
||||
new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath())),
|
||||
out, -1);
|
||||
|
||||
cvs.process();
|
||||
|
||||
outStream.flush();
|
||||
|
||||
assertEquals(sanitize("\n"
|
||||
+ "First Sheet [1]:\n"
|
||||
+ "\"Test spreadsheet\"\n"
|
||||
+ "\"2nd row\",\"2nd row 2nd column\"\n"
|
||||
+ "\n"
|
||||
+ "\"This one is red\"\n"
|
||||
+ "\n"
|
||||
+ "Sheet Number 2 [2]:\n"
|
||||
+ "\"Start of 2nd sheet\"\n"
|
||||
+ "\"Sheet 2 row 2\"\n"
|
||||
+ "\n"
|
||||
+ "\"I'm in bold blue, on a yellow background\"\n"
|
||||
+ "\n"
|
||||
+ "\"cb=1\",\"cb=10\",\"cb=2\",\"cb=sum\"\n"
|
||||
+ "1,10,2,13\n"
|
||||
+ "\n"
|
||||
+ "Sheet3 [3]:\n"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testProcessNumberRecord() throws IOException {
|
||||
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
|
||||
PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
|
||||
XLS2CSVmra cvs = new XLS2CSVmra(
|
||||
new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("empty.xls").getAbsolutePath())),
|
||||
out, -1);
|
||||
|
||||
// need to call process() first to initialize members
|
||||
cvs.process();
|
||||
|
||||
outStream.flush();
|
||||
|
||||
assertEquals(sanitize("\n"
|
||||
+ "Лист1 [1]:\n"
|
||||
+ "\n"
|
||||
+ "Лист2 [2]:\n"
|
||||
+ "\n"
|
||||
+ "Лист3 [3]:\n"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
|
||||
|
||||
|
||||
NumberRecord record = new NumberRecord();
|
||||
record.setValue(1.243);
|
||||
|
||||
cvs.processRecord(record);
|
||||
|
||||
outStream.flush();
|
||||
|
||||
assertEquals(sanitize("\n"
|
||||
+ "Лист1 [1]:\n"
|
||||
+ "\n"
|
||||
+ "Лист2 [2]:\n"
|
||||
+ "\n"
|
||||
+ "Лист3 [3]:\n"
|
||||
+ "1.243"), sanitize(new String(outStream.toByteArray(), StandardCharsets.UTF_8)));
|
||||
}
|
||||
|
||||
private String sanitize(String str) {
|
||||
return str.replace("\r\n", "\n");
|
||||
}
|
||||
}
|
||||
@ -18,9 +18,11 @@
|
||||
package org.apache.poi.integration;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -33,8 +35,11 @@ import org.apache.poi.openxml4j.opc.PackageAccess;
|
||||
import org.apache.poi.xssf.XSSFTestDataSamples;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import net.bytebuddy.utility.RandomString;
|
||||
|
||||
public class TestXLSX2CSV {
|
||||
private PrintStream err;
|
||||
private final UnsynchronizedByteArrayOutputStream errorBytes = UnsynchronizedByteArrayOutputStream.builder().get();
|
||||
@ -130,7 +135,87 @@ public class TestXLSX2CSV {
|
||||
assertEquals("", errorOutput);
|
||||
|
||||
String output = outputBytes.toString(StandardCharsets.UTF_8);
|
||||
assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output);
|
||||
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\","), "Had: " + output);
|
||||
assertTrue(output.contains("\"Lorem\",111,,,"), "Had: " + output);
|
||||
assertTrue(output.contains(",\"hello, xssf\",,\"hello, xssf\","), "Had: " + output);
|
||||
}
|
||||
|
||||
@Disabled("Used for local micro-benchmarking")
|
||||
@Test
|
||||
public void microBenchmark() {
|
||||
checkReplace("str");
|
||||
checkReplace("str.123");
|
||||
checkReplace("str.123,");
|
||||
checkReplace("str,,,.123,,,,");
|
||||
for (int i = 0; i < 1000;i++) {
|
||||
checkReplace(RandomString.make(20));
|
||||
}
|
||||
|
||||
for (int i = 0;i < 10;i++) {
|
||||
long start = System.currentTimeMillis();
|
||||
String str = RandomString.make(100) + "\"\"" + RandomString.make(100) + "\"\"" + RandomString.make(100);
|
||||
String expected = str.replace("\"", "\"\"");
|
||||
for (int j = 0;j < 300000;j++) {
|
||||
//assertEquals(expected, replaceString(str, "\"", "\"\""));
|
||||
assertEquals(expected, replaceDirect(str, "\"", "\"\""));
|
||||
}
|
||||
|
||||
System.out.println(" , " + (System.currentTimeMillis() - start));
|
||||
}
|
||||
|
||||
// Java 8: replaceString: 1001, 921, 1264, 1019, 1258, 990, 1089, 1430, 1153, 907
|
||||
// Java 8: replaceDirect: 375, 282, 240, 246, 264, 271, 258, 250, 263, 259
|
||||
// Java 11: replaceString: 510, 218, 202, 205, 202, 198, 202, 198, 208, 201
|
||||
// Java 11: replaceDirect: 384, 228, 204, 201, 201, 200, 206, 196, 200, 200
|
||||
//
|
||||
// => On Java 8, a custom implementation would make sense, however on Java 9
|
||||
// String.replace() was optimized so that it does not make any difference
|
||||
// anymore!
|
||||
}
|
||||
|
||||
private void checkReplace(String orig) {
|
||||
assertEquals(replaceString(orig, ",", "."), replaceDirect(orig, ",", "."),
|
||||
"Did have a difference with " + orig);
|
||||
}
|
||||
|
||||
public static String replaceString(String originalStr, String oldStr, String newStr) {
|
||||
return originalStr.replace(oldStr, newStr);
|
||||
}
|
||||
|
||||
public static String replaceDirect(String originalStr, String oldStr, String newStr) {
|
||||
int p = originalStr.indexOf(oldStr);
|
||||
if (p == -1) {
|
||||
return originalStr;
|
||||
} else {
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append(originalStr, 0, p);
|
||||
result.append(newStr);
|
||||
int q = p + oldStr.length();
|
||||
while ((p = originalStr.indexOf(oldStr, q)) != -1) {
|
||||
result.append(originalStr, q, p);
|
||||
result.append(newStr);
|
||||
q = p + oldStr.length();
|
||||
}
|
||||
result.append(originalStr, q, originalStr.length());
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeepFile() {
|
||||
// returns with some System.err
|
||||
try {
|
||||
assertThrows(IOException.class,
|
||||
() -> XLSX2CSV.main(new String[] { XSSFTestDataSamples.getSampleFile("deep-data.xlsx").getAbsolutePath() }));
|
||||
} catch (Throwable e) {
|
||||
// restore output-streams again to get proper error output
|
||||
System.setErr(err);
|
||||
|
||||
throw e;
|
||||
}
|
||||
|
||||
String output = errorBytes.toString(StandardCharsets.UTF_8);
|
||||
assertFalse(output.contains("Not found"), "Had: " + output);
|
||||
|
||||
System.out.println(output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'org.apache.ant:ant:1.10.14'
|
||||
api 'org.apache.ant:ant:1.10.15'
|
||||
|
||||
api project(':poi-ooxml')
|
||||
compileOnly project(path: ':poi-ooxml', configuration: 'archives')
|
||||
@ -41,9 +41,9 @@ dependencies {
|
||||
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
|
||||
exclude group: 'org.apache.poi', module: 'poi-scratchpad'
|
||||
}
|
||||
testImplementation 'com.google.guava:guava:32.1.1-jre'
|
||||
testImplementation 'com.google.guava:guava:33.5.0-jre'
|
||||
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
|
||||
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
|
||||
}
|
||||
|
||||
@ -57,36 +57,36 @@ final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-oo
|
||||
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||
|
||||
task compileJava9(type: JavaCompile) {
|
||||
tasks.register('compileJava9', JavaCompile) {
|
||||
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
]
|
||||
}
|
||||
|
||||
task compileTest9(type: JavaCompile) {
|
||||
tasks.register('compileTest9', JavaCompile) {
|
||||
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||
source = file(TEST9_SRC)
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(TEST_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(TEST_MODULE_PATH).asPath
|
||||
]
|
||||
classpath = files()
|
||||
}
|
||||
@ -95,7 +95,7 @@ task compileTest9(type: JavaCompile) {
|
||||
jar {
|
||||
dependsOn compileJava9
|
||||
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
manifest {
|
||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||
@ -119,11 +119,11 @@ sourcesJar {
|
||||
// Create a separate jar for test-code to depend on it in other projects
|
||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||
|
||||
setArchiveClassifier 'tests'
|
||||
// ignore second module-info.class from main
|
||||
duplicatesStrategy = 'exclude'
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
from sourceSets.test.output + sourceSets.main.output
|
||||
|
||||
@ -142,13 +142,9 @@ test {
|
||||
doFirst {
|
||||
jvmArgs += [
|
||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||
]
|
||||
if (jdkVersion > 8) {
|
||||
jvmArgs += [
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ import java.util.Map;
|
||||
*/
|
||||
public final class ExcelAntWorkbookUtilFactory {
|
||||
|
||||
private static Map<String, ExcelAntWorkbookUtil> workbookUtilMap;
|
||||
private static final Map<String, ExcelAntWorkbookUtil> workbookUtilMap = new HashMap<>();
|
||||
|
||||
private ExcelAntWorkbookUtilFactory() {
|
||||
}
|
||||
@ -41,16 +41,14 @@ public final class ExcelAntWorkbookUtilFactory {
|
||||
* a freshly instantiated one if none did exist before.
|
||||
*/
|
||||
public static ExcelAntWorkbookUtil getInstance(String fileName) {
|
||||
if(workbookUtilMap == null) {
|
||||
workbookUtilMap = new HashMap<>();
|
||||
}
|
||||
synchronized (workbookUtilMap) {
|
||||
if(workbookUtilMap.containsKey(fileName)) {
|
||||
return workbookUtilMap.get(fileName);
|
||||
}
|
||||
|
||||
if(workbookUtilMap.containsKey(fileName)) {
|
||||
return workbookUtilMap.get(fileName);
|
||||
ExcelAntWorkbookUtil wbu = new ExcelAntWorkbookUtil(fileName);
|
||||
workbookUtilMap.put(fileName, wbu);
|
||||
return wbu;
|
||||
}
|
||||
|
||||
ExcelAntWorkbookUtil wbu = new ExcelAntWorkbookUtil(fileName);
|
||||
workbookUtilMap.put(fileName, wbu);
|
||||
return wbu;
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
module org.apache.poi.excelant {
|
||||
|
||||
requires ant;
|
||||
requires transitive org.apache.poi.poi;
|
||||
requires org.apache.poi.ooxml;
|
||||
|
||||
exports org.apache.poi.ss.excelant;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -17,8 +15,10 @@ import java.util.regex.Pattern
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
final String TEST9_SRC = 'src/test/java9'
|
||||
final String TEST9_OUT = "${buildDir}/classes/java9/test/"
|
||||
final String TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
|
||||
final String VERSIONS9 = 'META-INF/versions/9'
|
||||
final boolean IBMVM = System.getProperty("java.vendor").contains("IBM")
|
||||
|
||||
@ -39,9 +39,9 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.apache.ant:ant:1.10.14'
|
||||
testImplementation 'org.apache.commons:commons-collections4:4.4'
|
||||
testImplementation 'com.google.guava:guava:32.1.1-jre'
|
||||
testImplementation 'org.apache.ant:ant:1.10.15'
|
||||
testImplementation 'org.apache.commons:commons-collections4:4.5.0'
|
||||
testImplementation 'com.google.guava:guava:33.5.0-jre'
|
||||
|
||||
misc(project(':poi-ooxml')) {
|
||||
capabilities {
|
||||
@ -76,7 +76,7 @@ dependencies {
|
||||
}
|
||||
testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives')
|
||||
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
|
||||
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
|
||||
}
|
||||
|
||||
@ -90,26 +90,26 @@ final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-oo
|
||||
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||
|
||||
task compileTest9(type: JavaCompile) {
|
||||
tasks.register('compileTest9', JavaCompile) {
|
||||
dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||
source = file(TEST9_SRC)
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(MODULE_COMPILE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(MODULE_COMPILE_PATH).asPath
|
||||
]
|
||||
classpath = files()
|
||||
}
|
||||
|
||||
|
||||
jar {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
manifest {
|
||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||
@ -119,11 +119,11 @@ jar {
|
||||
// Create a separate jar for test-code to depend on it in other projects
|
||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||
|
||||
setArchiveClassifier 'tests'
|
||||
// ignore second module-info.class from main
|
||||
duplicatesStrategy = 'exclude'
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
from sourceSets.test.output + sourceSets.main.output
|
||||
|
||||
@ -143,29 +143,26 @@ test {
|
||||
dependsOn { testJar }
|
||||
|
||||
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
||||
if (jdkVersion == 8) {
|
||||
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
|
||||
}
|
||||
|
||||
doFirst {
|
||||
jvmArgs += [
|
||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
|
||||
]
|
||||
if (jdkVersion > 8) {
|
||||
jvmArgs += [
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
|
||||
]
|
||||
}
|
||||
if (NO_SCRATCHPAD) {
|
||||
systemProperty 'scratchpad.ignore', 'true'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
javadoc { enabled(false) }
|
||||
javadoc {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
sourcesJar { enabled(false) }
|
||||
sourcesJar {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
generateMetadataFileForPOIPublication.enabled = false
|
||||
publishPOIPublicationToMavenLocal.enabled = false
|
||||
|
||||
@ -27,11 +27,14 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
<property name="dist" value="../build/dist"/>
|
||||
<property name="build" value="../build/distsourcebuild"/>
|
||||
|
||||
<condition property="gradle.executable" value="../gradlew.bat" else="../gradlew">
|
||||
<!-- Gradle is executed in ../build/poi-<version>, so three ".." are needed to use gradle from the root-dir -->
|
||||
<condition property="gradle.executable" value="../../../gradlew.bat" else="../../../gradlew">
|
||||
<os family="windows" />
|
||||
</condition>
|
||||
|
||||
<target name="init" depends="">
|
||||
<echo message="Using Ant: ${ant.version} from ${ant.home}, Ant detected Java ${ant.java.version} (may be different than actual Java sometimes...)" />
|
||||
<echo message="Using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}" />
|
||||
</target>
|
||||
|
||||
<target name="run" depends="init,runSourceBuild,runCompileTest"/>
|
||||
@ -48,14 +51,14 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
<date xmlns="antlib:org.apache.tools.ant.types.resources.comparators"/>
|
||||
<resources>
|
||||
<fileset dir="${dist}">
|
||||
<include name="poi-src-*.zip"/>
|
||||
<include name="apache-poi-src-*.zip"/>
|
||||
</fileset>
|
||||
</resources>
|
||||
</sort>
|
||||
</last>
|
||||
</pathconvert>
|
||||
|
||||
<echo message="Found source package at ${srcpackage}"/>
|
||||
<echo message="Found source package with pattern 'apache-poi-src-*.zip' in ${dist} at '${srcpackage}'. Run Gradle-task 'srcDistZip' in the main directory if it is missing"/>
|
||||
<unzip src="${srcpackage}" dest="${build}" failOnEmptyArchive="true"/>
|
||||
|
||||
<!-- look for name of sub-dir, do this dynamically as it changes with every (beta|rc)-release -->
|
||||
@ -74,7 +77,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
<!-- finally call Ant on the extracted source to check if we can build the packages -->
|
||||
<echo message="Building in temporary dir ${dirversion}/"/>
|
||||
<!--ant dir="${dirversion}" target="assemble" inheritAll="false" inheritRefs="false" useNativeBasedir="true"/-->
|
||||
<exec executable="${gradle.executable}" dir="." failonerror="true">
|
||||
<exec executable="${gradle.executable}" dir="${dirversion}" failonerror="true">
|
||||
<arg value="assemble" />
|
||||
</exec>
|
||||
</target>
|
||||
@ -91,9 +94,9 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
<sort>
|
||||
<resources>
|
||||
<fileset dir="${dist}">
|
||||
<include name="**/poi-5.*.jar"/>
|
||||
<include name="**/poi-ooxml-5.*.jar"/>
|
||||
<include name="**/poi-ooxml-lite-5.*.jar"/>
|
||||
<include name="**/poi-6.*.jar"/>
|
||||
<include name="**/poi-ooxml-6.*.jar"/>
|
||||
<include name="**/poi-ooxml-lite-6.*.jar"/>
|
||||
<exclude name="**/*-javadoc*"/>
|
||||
<exclude name="**/*-sources*"/>
|
||||
</fileset>
|
||||
@ -123,7 +126,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
|
||||
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
|
||||
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
||||
target="1.8" source="1.8" debug="true"
|
||||
target="11" source="11" debug="true"
|
||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
|
||||
classpath="${jarpackage}" classpathref="libs">
|
||||
@ -134,10 +137,10 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
<sort>
|
||||
<resources>
|
||||
<fileset dir="${dist}">
|
||||
<include name="**/poi-5.*.jar"/>
|
||||
<include name="**/poi-ooxml-5.*.jar"/>
|
||||
<include name="**/poi-ooxml-lite-5.*.jar"/>
|
||||
<include name="**/poi-scratchpad-5.*.jar"/>
|
||||
<include name="**/poi-6.*.jar"/>
|
||||
<include name="**/poi-ooxml-6.*.jar"/>
|
||||
<include name="**/poi-ooxml-lite-6.*.jar"/>
|
||||
<include name="**/poi-scratchpad-6.*.jar"/>
|
||||
<exclude name="**/*-javadoc*"/>
|
||||
<exclude name="**/*-sources*"/>
|
||||
</fileset>
|
||||
@ -147,7 +150,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
||||
|
||||
<echo message="Compiling all examples with the additional scratchpad.jar"/>
|
||||
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
||||
target="1.8" source="1.8" debug="true"
|
||||
target="11" source="11" debug="true"
|
||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||
classpath="${jarpackagescratchpad}" classpathref="libs">
|
||||
</javac>
|
||||
|
||||
@ -37,7 +37,6 @@ import org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor;
|
||||
import org.apache.poi.hssf.extractor.EventBasedExcelExtractor;
|
||||
import org.apache.poi.ooxml.POIXMLException;
|
||||
import org.apache.poi.ss.extractor.ExcelExtractor;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
|
||||
/**
|
||||
* Base class with things that can be run for any supported file handler
|
||||
@ -88,54 +87,78 @@ public abstract class AbstractFileHandler implements FileHandler {
|
||||
long length = file.length();
|
||||
long modified = file.lastModified();
|
||||
|
||||
POITextExtractor extractor = null;
|
||||
String fileAndParentName = file.getParentFile().getName() + "/" + file.getName();
|
||||
try {
|
||||
// fix windows absolute paths for exception message tracking
|
||||
String relPath = file.getPath().replaceAll(".*test-data", "test-data").replace('\\', '/');
|
||||
extractor = ExtractorFactory.createExtractor(file);
|
||||
assertNotNull(extractor, "Should get a POITextExtractor but had none for file " + relPath);
|
||||
|
||||
assertNotNull(extractor.getText(), "Should get some text but had none for file " + relPath);
|
||||
|
||||
// also try metadata
|
||||
@SuppressWarnings("resource")
|
||||
POITextExtractor metadataExtractor = extractor.getMetadataTextExtractor();
|
||||
assertNotNull(metadataExtractor.getText());
|
||||
|
||||
assertFalse(EXPECTED_EXTRACTOR_FAILURES.contains(fileAndParentName),
|
||||
"Expected Extraction to fail for file " + relPath + " and handler " + this + ", but did not fail!");
|
||||
|
||||
assertEquals(length, file.length(), "File should not be modified by extractor");
|
||||
assertEquals(modified, file.lastModified(), "File should not be modified by extractor");
|
||||
|
||||
handleExtractingAsStream(file);
|
||||
|
||||
if (extractor instanceof POIOLE2TextExtractor) {
|
||||
try (HPSFPropertiesExtractor hpsfExtractor = new HPSFPropertiesExtractor((POIOLE2TextExtractor) extractor)) {
|
||||
assertNotNull(hpsfExtractor.getDocumentSummaryInformationText());
|
||||
assertNotNull(hpsfExtractor.getSummaryInformationText());
|
||||
String text = hpsfExtractor.getText();
|
||||
//System.out.println(text);
|
||||
// fix windows absolute paths for exception message tracking
|
||||
String relPath = file.getPath().replaceAll(".*test-data", "test-data").replace('\\', '/');
|
||||
try (POITextExtractor extractor = ExtractorFactory.createExtractor(file)) {
|
||||
assertNotNull(extractor, "Should get a POITextExtractor but had none for file " + relPath);
|
||||
|
||||
assertNotNull(extractor.getText(), "Should get some text but had none for file " + relPath);
|
||||
|
||||
// also try metadata
|
||||
POITextExtractor metadataExtractor = extractor.getMetadataTextExtractor();
|
||||
assertNotNull(metadataExtractor.getText());
|
||||
|
||||
assertFalse(EXPECTED_EXTRACTOR_FAILURES.contains(fileAndParentName),
|
||||
"Expected Extraction to fail for file " + relPath + " and handler " + this + ", but did not fail!");
|
||||
|
||||
assertEquals(length, file.length(), "File should not be modified by extractor");
|
||||
assertEquals(modified, file.lastModified(), "File should not be modified by extractor");
|
||||
|
||||
if (extractor instanceof POIOLE2TextExtractor) {
|
||||
POIOLE2TextExtractor ole2Extractor = (POIOLE2TextExtractor) extractor;
|
||||
ole2Extractor.getRoot();
|
||||
if (!(ole2Extractor instanceof EventBasedExcelExtractor)) {
|
||||
ole2Extractor.getSummaryInformation();
|
||||
ole2Extractor.getDocSummaryInformation();
|
||||
}
|
||||
|
||||
try (HPSFPropertiesExtractor hpsfExtractor = new HPSFPropertiesExtractor(ole2Extractor)) {
|
||||
assertNotNull(hpsfExtractor.getDocumentSummaryInformationText());
|
||||
assertNotNull(hpsfExtractor.getSummaryInformationText());
|
||||
String text = hpsfExtractor.getText();
|
||||
//System.out.println(text);
|
||||
assertNotNull(text);
|
||||
}
|
||||
|
||||
if (ole2Extractor.getRoot() != null && !Boolean.getBoolean("scratchpad.ignore")) {
|
||||
POITextExtractor[] embedded = ExtractorFactory.getEmbeddedDocsTextExtractors(ole2Extractor);
|
||||
try {
|
||||
for (POITextExtractor poiTextExtractor : embedded) {
|
||||
poiTextExtractor.getText();
|
||||
poiTextExtractor.getDocument();
|
||||
poiTextExtractor.getFilesystem();
|
||||
POITextExtractor metaData = poiTextExtractor.getMetadataTextExtractor();
|
||||
metaData.getFilesystem();
|
||||
metaData.getText();
|
||||
}
|
||||
} finally {
|
||||
for (POITextExtractor embeddedExtractor : embedded) {
|
||||
embeddedExtractor.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// test again with including formulas and cell-comments as this caused some bugs
|
||||
if (extractor instanceof ExcelExtractor &&
|
||||
// comment-extraction and formula extraction are not well supported in event based extraction
|
||||
!(extractor instanceof EventBasedExcelExtractor)) {
|
||||
((ExcelExtractor) extractor).setFormulasNotResults(true);
|
||||
|
||||
String text = extractor.getText();
|
||||
assertNotNull(text);
|
||||
// */
|
||||
|
||||
((ExcelExtractor) extractor).setIncludeCellComments(true);
|
||||
|
||||
text = extractor.getText();
|
||||
assertNotNull(text);
|
||||
}
|
||||
}
|
||||
|
||||
// test again with including formulas and cell-comments as this caused some bugs
|
||||
if (extractor instanceof ExcelExtractor &&
|
||||
// comment-extraction and formula extraction are not well supported in event based extraction
|
||||
!(extractor instanceof EventBasedExcelExtractor)) {
|
||||
((ExcelExtractor) extractor).setFormulasNotResults(true);
|
||||
|
||||
String text = extractor.getText();
|
||||
assertNotNull(text);
|
||||
// */
|
||||
|
||||
((ExcelExtractor) extractor).setIncludeCellComments(true);
|
||||
|
||||
text = extractor.getText();
|
||||
assertNotNull(text);
|
||||
}
|
||||
} catch (IOException | POIXMLException e) {
|
||||
Exception prevE = e;
|
||||
Throwable cause;
|
||||
@ -159,8 +182,6 @@ public abstract class AbstractFileHandler implements FileHandler {
|
||||
if (!e.getMessage().contains("POI Scratchpad jar missing") || !Boolean.getBoolean("scratchpad.ignore")) {
|
||||
throw e;
|
||||
}
|
||||
} finally {
|
||||
IOUtils.closeQuietly(extractor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,6 +191,11 @@ public abstract class AbstractFileHandler implements FileHandler {
|
||||
assertNotNull(streamExtractor);
|
||||
|
||||
assertNotNull(streamExtractor.getText());
|
||||
|
||||
POITextExtractor metadataTextExtractor = streamExtractor.getMetadataTextExtractor();
|
||||
assertNotNull(metadataTextExtractor);
|
||||
|
||||
assertNotNull(metadataTextExtractor.getText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,8 @@ public enum FileHandlerKnown {
|
||||
HSLF,
|
||||
HSMF,
|
||||
HSSF,
|
||||
HEMF,
|
||||
HWMF,
|
||||
HWPF,
|
||||
OPC,
|
||||
POIFS,
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
package org.apache.poi.stress;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.apache.poi.hemf.record.emf.HemfRecord;
|
||||
import org.apache.poi.hemf.record.emf.HemfRecordType;
|
||||
import org.apache.poi.hemf.record.emf.HemfText;
|
||||
import org.apache.poi.hemf.usermodel.HemfPicture;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HEMFFileHandler implements FileHandler {
|
||||
|
||||
@Override
|
||||
public void handleExtracting(File file) throws Exception {
|
||||
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||
HemfPicture picture = new HemfPicture(stream);
|
||||
|
||||
// mimic a bit what e.g. Tika does to extract some information from .emf files
|
||||
for (HemfRecord record : picture.getRecords()) {
|
||||
if (record.getEmfRecordType().equals(HemfRecordType.extTextOutW)) {
|
||||
assertInstanceOf(HemfText.EmfExtTextOutW.class, record);
|
||||
HemfText.EmfExtTextOutW textOut = (HemfText.EmfExtTextOutW) record;
|
||||
textOut.getText(StandardCharsets.UTF_16LE);
|
||||
} else if (record.getEmfRecordType().equals(HemfRecordType.extTextOutA)) {
|
||||
assertInstanceOf(HemfText.EmfExtTextOutA.class, record);
|
||||
HemfText.EmfExtTextOutA textOut = (HemfText.EmfExtTextOutA) record;
|
||||
textOut.getText(StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleAdditional(File file) throws Exception {
|
||||
// no additional checks for now
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
HemfPicture picture = new HemfPicture(stream);
|
||||
|
||||
for (HemfRecord record : picture.getRecords()) {
|
||||
record.getEmfRecordType();
|
||||
record.getGenericRecordType();
|
||||
}
|
||||
|
||||
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
|
||||
picture.draw(dest.createGraphics(), new Rectangle2D.Double(0, 0, 256, 256));
|
||||
}
|
||||
|
||||
@Test
|
||||
void test() throws Exception {
|
||||
String file = "test-data/slideshow/wrench.emf";
|
||||
|
||||
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||
handleFile(stream, file);
|
||||
}
|
||||
|
||||
handleExtracting(new File(file));
|
||||
}
|
||||
}
|
||||
@ -23,15 +23,15 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.hslf.usermodel.HSLFSlideShow;
|
||||
import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HSLFFileHandler extends SlideShowHandler {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(HSLFFileHandler.class);
|
||||
private static final Logger LOGGER = PoiLogManager.getLogger(HSLFFileHandler.class);
|
||||
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
package org.apache.poi.stress;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import org.apache.poi.hwmf.record.HwmfFont;
|
||||
import org.apache.poi.hwmf.record.HwmfRecord;
|
||||
import org.apache.poi.hwmf.record.HwmfRecordType;
|
||||
import org.apache.poi.hwmf.record.HwmfText;
|
||||
import org.apache.poi.hwmf.usermodel.HwmfPicture;
|
||||
import org.apache.poi.util.LocaleUtil;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HWMFFileHandler implements FileHandler {
|
||||
|
||||
@Override
|
||||
public void handleExtracting(File file) throws Exception {
|
||||
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||
HwmfPicture picture = new HwmfPicture(stream);
|
||||
Charset charset = LocaleUtil.CHARSET_1252;
|
||||
|
||||
// mimic a bit what e.g. Tika does to extract some information from .wmf files
|
||||
for (HwmfRecord record : picture.getRecords()) {
|
||||
if (record.getWmfRecordType().equals(HwmfRecordType.createFontIndirect)) {
|
||||
HwmfFont font = ((HwmfText.WmfCreateFontIndirect) record).getFont();
|
||||
charset = (font.getCharset() == null || font.getCharset().getCharset() == null) ?
|
||||
LocaleUtil.CHARSET_1252 : font.getCharset().getCharset();
|
||||
}
|
||||
|
||||
if (record.getWmfRecordType().equals(HwmfRecordType.extTextOut)) {
|
||||
assertInstanceOf(HwmfText.WmfExtTextOut.class, record);
|
||||
HwmfText.WmfExtTextOut textOut = (HwmfText.WmfExtTextOut) record;
|
||||
textOut.getText(charset);
|
||||
} else if (record.getWmfRecordType().equals(HwmfRecordType.textOut)) {
|
||||
assertInstanceOf(HwmfText.WmfTextOut.class, record);
|
||||
HwmfText.WmfTextOut textOut = (HwmfText.WmfTextOut) record;
|
||||
textOut.getText(charset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleAdditional(File file) throws Exception {
|
||||
// no additional checks for now
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
HwmfPicture picture = new HwmfPicture(stream);
|
||||
|
||||
for (HwmfRecord record : picture.getRecords()) {
|
||||
record.getWmfRecordType();
|
||||
record.getGenericRecordType();
|
||||
}
|
||||
|
||||
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
|
||||
picture.draw(dest.createGraphics());
|
||||
}
|
||||
|
||||
@Test
|
||||
void test() throws Exception {
|
||||
String file = "test-data/slideshow/santa.wmf";
|
||||
|
||||
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||
handleFile(stream, file);
|
||||
}
|
||||
|
||||
handleExtracting(new File(file));
|
||||
}
|
||||
}
|
||||
@ -19,10 +19,11 @@ package org.apache.poi.stress;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.PushbackInputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.poi.openxml4j.opc.ContentTypes;
|
||||
@ -61,17 +62,13 @@ public class OPCFileHandler extends AbstractFileHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleExtracting(File file) {
|
||||
// text-extraction is not possible currently for these types of files
|
||||
}
|
||||
|
||||
// a test-case to test this locally without executing the full TestAllFiles
|
||||
@Test
|
||||
void test() throws Exception {
|
||||
File file = new File("test-data/diagram/test.vsdx");
|
||||
|
||||
try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {
|
||||
try (InputStream stream = new BufferedInputStream(
|
||||
new PushbackInputStream(Files.newInputStream(file.toPath()), 100000))) {
|
||||
handleFile(stream, file.getPath());
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ import java.lang.ref.WeakReference;
|
||||
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
|
||||
import org.apache.poi.sl.draw.Drawable;
|
||||
import org.apache.poi.sl.usermodel.GroupShape;
|
||||
import org.apache.poi.sl.usermodel.MasterSheet;
|
||||
import org.apache.poi.sl.usermodel.Notes;
|
||||
import org.apache.poi.sl.usermodel.PictureData;
|
||||
import org.apache.poi.sl.usermodel.Shape;
|
||||
@ -76,8 +77,11 @@ public abstract class SlideShowHandler extends POIFSFileHandler {
|
||||
}
|
||||
}
|
||||
|
||||
for (Shape<?,?> shape : s.getMasterSheet()) {
|
||||
readShapes(shape);
|
||||
MasterSheet<?, ?> masterSheet = s.getMasterSheet();
|
||||
if (masterSheet != null) {
|
||||
for (Shape<?,?> shape : masterSheet) {
|
||||
readShapes(shape);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,6 +37,8 @@ public abstract class SpreadsheetHandler extends AbstractFileHandler {
|
||||
// try to access some of the content
|
||||
readContent(wb);
|
||||
|
||||
extractEmbedded(wb);
|
||||
|
||||
// write out the file
|
||||
writeToArray(wb);
|
||||
|
||||
|
||||
@ -96,14 +96,19 @@ public class TestAllFiles {
|
||||
"poifs/protected_sha512.xlsx",
|
||||
"poifs/60320-protected.xlsx",
|
||||
"poifs/protected_sha512.xlsx",
|
||||
|
||||
// stress docs
|
||||
"document/deep-table-cell.docx",
|
||||
|
||||
// invalid files
|
||||
"spreadsheet/bug69769.xlsx",
|
||||
|
||||
// NOTE: Expected failures should usually be added in file "stress.xls" instead
|
||||
// of being listed here in order to also verify the expected exception details!
|
||||
};
|
||||
|
||||
// cheap workaround of skipping the few problematic files
|
||||
public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = {
|
||||
"**/.svn/**",
|
||||
"lost+found",
|
||||
"**/.git/**",
|
||||
"**/ExternalEntityInText.docx", //the DocType (DTD) declaration causes this to fail
|
||||
public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = concat(SCAN_EXCLUDES, new String[] {
|
||||
"**/right-to-left.xlsx", //the threaded comments in this file cause XSSF clone to fail
|
||||
"document/word2.doc",
|
||||
"document/cpansearch.perl.org_src_tobyink_acme-rundoc-0.001_word-lib_hello_world.docm",
|
||||
@ -130,17 +135,28 @@ public class TestAllFiles {
|
||||
"document/clusterfuzz-testcase-minimized-POIHWPFFuzzer-5418937293340672.doc",
|
||||
"document/clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
|
||||
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-5947849161179136.vsd",
|
||||
|
||||
// exclude files failing on windows nodes, because of limited JCE policies
|
||||
"document/bug53475-password-is-pass.docx",
|
||||
"poifs/60320-protected.xlsx",
|
||||
"poifs/protected_sha512.xlsx",
|
||||
"poifs/60320-protected.xlsx",
|
||||
"poifs/protected_sha512.xlsx",
|
||||
};
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-5436547081830400.xls",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4819588401201152.xls",
|
||||
"diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-4537225637134336.vsd",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-6537773940867072.xls",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4977868385681408.xls",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4651309315719168.xls",
|
||||
"document/clusterfuzz-testcase-POIHWPFFuzzer-5696094627495936.doc",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4657005060816896.xls",
|
||||
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-4913778037489664.vsd",
|
||||
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-6478389109981184.vsd",
|
||||
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
|
||||
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
|
||||
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4734163573080064.xls",
|
||||
"spreadsheet/rde.imf.ru_sites_default_files_rde_documents_vodootvedenie_2020.xlsb.xls",
|
||||
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
|
||||
});
|
||||
|
||||
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
|
||||
"document/truncated62886.docx"
|
||||
"document/truncated62886.docx",
|
||||
// this document fails with IBM JDK because of a different exception being thrown
|
||||
"spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx"
|
||||
);
|
||||
|
||||
public static Stream<Arguments> allfiles(String testName) throws IOException {
|
||||
@ -162,6 +178,7 @@ public class TestAllFiles {
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean found = false;
|
||||
for (FileHandlerKnown handler : sm.getHandler(file)) {
|
||||
ExcInfo info1 = sm.getExcInfo(file, testName, handler);
|
||||
if (info1 == null || info1.isValid(testName, handler.name())) {
|
||||
@ -172,8 +189,13 @@ public class TestAllFiles {
|
||||
(info1 != null) ? info1.getExClazz() : null,
|
||||
(info1 != null) ? info1.getExMessage() : null
|
||||
));
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
System.out.println("Could not find a handler for " + file);
|
||||
}
|
||||
}
|
||||
|
||||
return result.stream();
|
||||
@ -241,6 +263,9 @@ public class TestAllFiles {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
try {
|
||||
Thread.currentThread().setName("Additional - " + file + " - " + handler);
|
||||
if (StressTestUtils.excludeFile(file, EXPECTED_FAILURES))
|
||||
return;
|
||||
|
||||
System.out.println("Running additionals on "+file);
|
||||
FileHandler fileHandler = handler.getHandler();
|
||||
assertNotNull(fileHandler, "Did not find a handler for file " + file);
|
||||
@ -284,9 +309,10 @@ public class TestAllFiles {
|
||||
errPrefix + " for " + exClass + " expected message '" + exMessage + "' but had '" + actMsg + "': " + e);
|
||||
|
||||
if (actMsg != null &&
|
||||
// sometimes ArrayIndexOutOfBoundsException has null-message?!?
|
||||
// in newer JDK versions IndexOutOfBoundsException switch from empty message
|
||||
// to more useful content
|
||||
// so skip the check for this type of exception if expected message is null
|
||||
(exMessage != null || !ArrayIndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
|
||||
(exMessage != null || !IndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
|
||||
assertNotNull(exMessage,
|
||||
errPrefix + "Expected message was null, but actMsg wasn't: Message: " + actMsg + ": " + e);
|
||||
assertTrue(actMsg.contains(exMessage),
|
||||
@ -329,4 +355,11 @@ public class TestAllFiles {
|
||||
private static boolean isJava8() {
|
||||
return System.getProperty("java.version").startsWith("1.8");
|
||||
}
|
||||
|
||||
private static String[] concat(String[] a, String[] b) {
|
||||
String[] result = new String[a.length + b.length];
|
||||
System.arraycopy(a, 0, result, 0, a.length);
|
||||
System.arraycopy(b, 0, result, a.length, b.length);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public class XSSFBFileHandler extends AbstractFileHandler {
|
||||
XSSFBEventBasedExcelExtractor ex = new XSSFBEventBasedExcelExtractor(pkg);
|
||||
String txt = ex.getText();
|
||||
if (txt.length() < 1) {
|
||||
throw new RuntimeException("Should have gotten some text.");
|
||||
throw new IllegalArgumentException("Should have gotten some text.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
|
||||
XLSX2CSV.main(new String[]{file.getAbsolutePath()});
|
||||
ExcelComparator.main(new String[]{file.getAbsolutePath(), file.getAbsolutePath()});
|
||||
|
||||
assertFalse( EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
|
||||
assertFalse(EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
|
||||
|
||||
} catch (OLE2NotOfficeXmlFileException e) {
|
||||
// we have some files that are not actually OOXML and thus cannot be tested here
|
||||
|
||||
@ -22,6 +22,7 @@ import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.io.output.NullOutputStream;
|
||||
import org.apache.poi.ooxml.POIXMLException;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -41,6 +42,8 @@ public class XWPFFileHandler extends AbstractFileHandler {
|
||||
try (XWPFDocument doc = new XWPFDocument(stream)) {
|
||||
new POIXMLDocumentHandler().handlePOIXMLDocument(doc);
|
||||
POIXMLDocumentHandler.cursorRecursive(doc.getDocument());
|
||||
|
||||
doc.write(NullOutputStream.INSTANCE);
|
||||
} catch (POIXMLException e) {
|
||||
Exception cause = (Exception)e.getCause();
|
||||
throw cause == null ? e : cause;
|
||||
|
||||
@ -16,13 +16,14 @@
|
||||
==================================================================== */
|
||||
|
||||
module org.apache.poi.stress {
|
||||
requires org.apache.logging.log4j;
|
||||
requires org.junit.jupiter.api;
|
||||
requires org.junit.jupiter.params;
|
||||
requires net.bytebuddy;
|
||||
requires java.desktop;
|
||||
|
||||
requires org.apache.commons.collections4;
|
||||
requires org.apache.commons.io;
|
||||
requires transitive org.apache.poi.poi;
|
||||
requires org.apache.poi.examples;
|
||||
requires org.apache.poi.scratchpad;
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
<Logger name="org.apache.poi.xssf.usermodel.XSSFWorkbook" level="ERROR" />
|
||||
<Logger name="org.apache.poi.hslf.usermodel.HSLFGroupShape" level="WARN" />
|
||||
<Logger name="org.apache.poi.hslf.record.Record" level="ERROR" />
|
||||
<Logger name="org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor" level="FATAL" />
|
||||
|
||||
<!-- Change to DEBUG or another level to get log output -->
|
||||
<Root level="ERROR">
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -17,9 +15,11 @@ import java.util.regex.Pattern
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
final String MODULE_NAME = 'org.apache.poi.ooxml.schemas'
|
||||
final String BEANS_SRC = "${buildDir}/generated-sources"
|
||||
final String BEANS_RES = "${buildDir}/generated-resources"
|
||||
final String BEANS_SRC = layout.buildDirectory.dir('generated-sources').get().asFile.absolutePath
|
||||
final String BEANS_RES = layout.buildDirectory.dir('generated-resources').get().asFile.absolutePath
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@ -54,36 +54,36 @@ compileJava {
|
||||
options.forkOptions.jvmArgs += '-Xmx2G'
|
||||
}
|
||||
|
||||
task compileJava9(type: JavaCompile) {
|
||||
tasks.register('compileJava9', JavaCompile) {
|
||||
dependsOn 'compileJava'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
]
|
||||
}
|
||||
|
||||
task copy_xsds(type: Copy) {
|
||||
from ('src/main/xmlschema/org/apache/poi/xdgf')
|
||||
from ('src/main/xmlschema/org/apache/poi/schemas') {
|
||||
tasks.register('copy_xsds', Copy) {
|
||||
from('src/main/xmlschema/org/apache/poi/xdgf')
|
||||
from('src/main/xmlschema/org/apache/poi/schemas') {
|
||||
include 'XAdES*.xsd', '*.xsdconfig', 'xmldsig*.xsd', 'ooxmlSchemas.xsdconfig', 'markup-compatibility.xsd',
|
||||
'vmlDrawing.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd',
|
||||
'vmlDrawing.xsd', 'word10.xsd', 'word12.xsd', 'xlThreaded*.xsd', 'dml-drawing.xsd', 'drawing-chart2012.xsd',
|
||||
'chartEx.xsd'
|
||||
exclude '*.zip'
|
||||
}
|
||||
from ('src/main/xmlschema/org/apache/poi/poifs/crypt') {
|
||||
from('src/main/xmlschema/org/apache/poi/poifs/crypt') {
|
||||
include 'signatureInfo.xsd'
|
||||
}
|
||||
from (zipTree('src/main/xmlschema/org/apache/poi/schemas/OfficeOpenXML-XMLSchema-Transitional.zip'))
|
||||
from (zipTree('src/main/xmlschema/org/apache/poi/schemas/OpenPackagingConventions-XMLSchema.zip')) {
|
||||
from(zipTree('src/main/xmlschema/org/apache/poi/schemas/OfficeOpenXML-XMLSchema-Transitional.zip'))
|
||||
from(zipTree('src/main/xmlschema/org/apache/poi/schemas/OpenPackagingConventions-XMLSchema.zip')) {
|
||||
include 'opc-digSig.xsd', 'opc-relationships.xsd'
|
||||
}
|
||||
into 'build/xsds'
|
||||
@ -95,30 +95,30 @@ task generate_beans(dependsOn: copy_xsds) {
|
||||
|
||||
doLast {
|
||||
ant.uptodate(
|
||||
property: 'xmlbeans_uptodate',
|
||||
targetfile: 'build/generated-resources/org/apache/poi/schemas/ooxml/system/ooxml/TypeSystemHolder.class'
|
||||
property: 'xmlbeans_uptodate',
|
||||
targetfile: 'build/generated-resources/org/apache/poi/schemas/ooxml/system/ooxml/TypeSystemHolder.class'
|
||||
) {
|
||||
srcFiles(dir: 'build/xsds', includes: '*.xsd')
|
||||
}
|
||||
|
||||
ant.taskdef(
|
||||
name: 'xmlbean',
|
||||
classname: 'org.apache.xmlbeans.impl.tool.XMLBean',
|
||||
classpath: sourceSets.main.runtimeClasspath.asPath
|
||||
name: 'xmlbean',
|
||||
classname: 'org.apache.xmlbeans.impl.tool.XMLBean',
|
||||
classpath: sourceSets.main.runtimeClasspath.asPath
|
||||
)
|
||||
|
||||
if (!ant.properties.xmlbeans_uptodate) {
|
||||
ant.xmlbean(
|
||||
schema: 'build/xsds',
|
||||
srcgendir: BEANS_SRC,
|
||||
classgendir: BEANS_RES,
|
||||
destfile: 'build/xsds.jar',
|
||||
srconly: true,
|
||||
failonerror: true,
|
||||
fork: true,
|
||||
memoryMaximumSize: '1536m',
|
||||
typesystemname: 'ooxml',
|
||||
repackage: 'org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml'
|
||||
schema: 'build/xsds',
|
||||
srcgendir: BEANS_SRC,
|
||||
classgendir: BEANS_RES,
|
||||
destfile: 'build/xsds.jar',
|
||||
srconly: true,
|
||||
failonerror: true,
|
||||
fork: true,
|
||||
memoryMaximumSize: '1536m',
|
||||
typesystemname: 'ooxml',
|
||||
repackage: 'org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml'
|
||||
) {
|
||||
classpath = sourceSets.main.runtimeClasspath.asPath
|
||||
}
|
||||
@ -126,7 +126,7 @@ task generate_beans(dependsOn: copy_xsds) {
|
||||
}
|
||||
}
|
||||
|
||||
task sourceJar(type: Jar) {
|
||||
tasks.register('sourceJar', Jar) {
|
||||
setArchiveClassifier 'sources'
|
||||
from sourceSets.main.allJava
|
||||
}
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_CertificateKeyEncryptor">
|
||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
|
||||
</xs:schema>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_CertificateKeyEncryptor">
|
||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
|
||||
</xs:schema>
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
|
||||
|
||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
|
||||
|
||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||
|
||||
</xb:config>
|
||||
@ -1,259 +1,259 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
|
||||
<xs:simpleType name="ST_SaltSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_BlockSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="2"/>
|
||||
<xs:maxInclusive value="4096"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_KeyBits">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="8"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_HashSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_SpinCount">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="10000000"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_CipherAlgorithm">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="AES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RC2">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RC4">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST NOT be used.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DESX">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="3DES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="3DES_112">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see 3DES</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_CipherChaining">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="ChainingModeCBC">
|
||||
<xs:annotation>
|
||||
<xs:documentation>block chaining (CBC)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ChainingModeCFB">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_HashAlgorithm">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="SHA1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA256">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA384">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA512">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD5">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to MD5.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD4">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD2">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RIPEMD-128">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RIPEMD-160">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WHIRLPOOL">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_KeyData">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
|
||||
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
|
||||
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
|
||||
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
|
||||
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
|
||||
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
|
||||
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
|
||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_DataIntegrity">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_KeyEncryptor">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:choice>
|
||||
<xs:element ref="p:encryptedKey"/>
|
||||
<xs:element ref="c:encryptedKey"/>
|
||||
</xs:choice>
|
||||
<xs:attribute name="uri">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_KeyEncryptors">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_Encryption">
|
||||
<xs:sequence>
|
||||
<xs:element name="keyData" type="CT_KeyData"/>
|
||||
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryption" type="CT_Encryption"/>
|
||||
</xs:schema>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
|
||||
<xs:simpleType name="ST_SaltSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_BlockSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="2"/>
|
||||
<xs:maxInclusive value="4096"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_KeyBits">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="8"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_HashSize">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_SpinCount">
|
||||
<xs:annotation>
|
||||
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:unsignedInt">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="10000000"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_CipherAlgorithm">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="AES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RC2">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RC4">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST NOT be used.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DESX">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="3DES">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="3DES_112">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see 3DES</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_CipherChaining">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="ChainingModeCBC">
|
||||
<xs:annotation>
|
||||
<xs:documentation>block chaining (CBC)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ChainingModeCFB">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ST_HashAlgorithm">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="SHA1">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA256">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA384">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SHA512">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see SHA1</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD5">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to MD5.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD4">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD2">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RIPEMD-128">
|
||||
<xs:annotation>
|
||||
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RIPEMD-160">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WHIRLPOOL">
|
||||
<xs:annotation>
|
||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_KeyData">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
|
||||
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
|
||||
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
|
||||
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
|
||||
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
|
||||
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
|
||||
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
|
||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_DataIntegrity">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_KeyEncryptor">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:choice>
|
||||
<xs:element ref="p:encryptedKey"/>
|
||||
<xs:element ref="c:encryptedKey"/>
|
||||
</xs:choice>
|
||||
<xs:attribute name="uri">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_KeyEncryptors">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="CT_Encryption">
|
||||
<xs:sequence>
|
||||
<xs:element name="keyData" type="CT_KeyData"/>
|
||||
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>modified for POI</xs:appinfo>
|
||||
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryption" type="CT_Encryption"/>
|
||||
</xs:schema>
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||
|
||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||
|
||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||
|
||||
</xb:config>
|
||||
@ -1,66 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_PasswordKeyEncryptor">
|
||||
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
|
||||
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
|
||||
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
|
||||
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
|
||||
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
|
||||
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
|
||||
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
|
||||
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
|
||||
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
|
||||
</xs:schema>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="CT_PasswordKeyEncryptor">
|
||||
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
|
||||
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
|
||||
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
|
||||
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
|
||||
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
|
||||
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
|
||||
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
|
||||
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
|
||||
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
|
||||
</xs:schema>
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||
|
||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||
|
||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||
|
||||
</xb:config>
|
||||
@ -1,103 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:simpleType name="ST_PositiveInteger">
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureComments">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="255"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureProviderUrl">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="2083"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureText">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="100"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureType">
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:enumeration value="1"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_Version">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="64"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:group name="EG_RequiredChildren">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
|
||||
<xsd:element name="SignatureText" type="ST_SignatureText"/>
|
||||
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
|
||||
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
|
||||
<xsd:element name="WindowsVersion" type="ST_Version"/>
|
||||
<xsd:element name="OfficeVersion" type="ST_Version"/>
|
||||
<xsd:element name="ApplicationVersion" type="ST_Version"/>
|
||||
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
|
||||
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
|
||||
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
|
||||
<xsd:element name="SignatureType" type="ST_SignatureType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:group name="EG_OptionalChildren">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
|
||||
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
|
||||
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
|
||||
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:group name="EG_OptionalChildrenV2">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Address1" type="xsd:string"/>
|
||||
<xsd:element name="Address2" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_SignatureInfoV1">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_RequiredChildren"/>
|
||||
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_SignatureInfoV2">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
|
||||
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:simpleType name="ST_PositiveInteger">
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minExclusive value="0"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureComments">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="255"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureProviderUrl">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="2083"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureText">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="100"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_SignatureType">
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:enumeration value="1"/>
|
||||
<xsd:enumeration value="2"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_Version">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:maxLength value="64"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:group name="EG_RequiredChildren">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
|
||||
<xsd:element name="SignatureText" type="ST_SignatureText"/>
|
||||
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
|
||||
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
|
||||
<xsd:element name="WindowsVersion" type="ST_Version"/>
|
||||
<xsd:element name="OfficeVersion" type="ST_Version"/>
|
||||
<xsd:element name="ApplicationVersion" type="ST_Version"/>
|
||||
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
|
||||
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
|
||||
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
|
||||
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
|
||||
<xsd:element name="SignatureType" type="ST_SignatureType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:group name="EG_OptionalChildren">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
|
||||
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
|
||||
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
|
||||
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:group name="EG_OptionalChildrenV2">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Address1" type="xsd:string"/>
|
||||
<xsd:element name="Address2" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_SignatureInfoV1">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_RequiredChildren"/>
|
||||
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_SignatureInfoV2">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
|
||||
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
|
||||
</xsd:schema>
|
||||
@ -1,466 +1,466 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
|
||||
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
|
||||
EncapsulatedPKIDataType and containers for time-stamp tokens -->
|
||||
<!-- Start AnyType -->
|
||||
<xsd:element name="Any" type="AnyType"/>
|
||||
<xsd:complexType name="AnyType" mixed="true">
|
||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:any namespace="##any" processContents="lax"/>
|
||||
</xsd:sequence>
|
||||
<xsd:anyAttribute namespace="##any"/>
|
||||
</xsd:complexType>
|
||||
<!-- End AnyType -->
|
||||
<!-- Start ObjectIdentifierType-->
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
|
||||
<xsd:complexType name="ObjectIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Identifier" type="IdentifierType"/>
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IdentifierType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:anyURI">
|
||||
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="QualifierType">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="OIDAsURI"/>
|
||||
<xsd:enumeration value="OIDAsURN"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="DocumentationReferencesType">
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End ObjectIdentifierType-->
|
||||
<!-- Start EncapsulatedPKIDataType-->
|
||||
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:complexType name="EncapsulatedPKIDataType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:base64Binary">
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- End EncapsulatedPKIDataType -->
|
||||
<!-- Start time-stamp containers types -->
|
||||
<!-- Start GenericTimeStampType -->
|
||||
<xsd:element name="Include" type="IncludeType"/>
|
||||
<xsd:complexType name="IncludeType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
|
||||
<xsd:complexType name="ReferenceInfoType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod"/>
|
||||
<xsd:element ref="ds:DigestValue"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="GenericTimeStampType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End GenericTimeStampType -->
|
||||
<!-- Start XAdESTimeStampType -->
|
||||
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:complexType name="XAdESTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End XAdESTimeStampType -->
|
||||
<!-- Start OtherTimeStampType -->
|
||||
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
|
||||
<xsd:complexType name="OtherTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice>
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End OtherTimeStampType -->
|
||||
<!-- End time-stamp containers types -->
|
||||
<!-- End auxiliary types definitions-->
|
||||
<!-- Start container types -->
|
||||
<!-- Start QualifyingProperties -->
|
||||
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
|
||||
<xsd:complexType name="QualifyingPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingProperties -->
|
||||
<!-- Start SignedProperties-->
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
|
||||
<xsd:complexType name="SignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedProperties-->
|
||||
<!-- Start UnsignedProperties-->
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
|
||||
<xsd:complexType name="UnsignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedProperties-->
|
||||
<!-- Start SignedSignatureProperties-->
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
|
||||
<xsd:complexType name="SignedSignaturePropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
|
||||
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedSignatureProperties-->
|
||||
<!-- Start SignedDataObjectProperties-->
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
|
||||
<xsd:complexType name="SignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedDataObjectProperties-->
|
||||
<!-- Start UnsignedSignatureProperties-->
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
|
||||
<xsd:complexType name="UnsignedSignaturePropertiesType">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:any namespace="##other"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedSignatureProperties-->
|
||||
<!-- Start UnsignedDataObjectProperties-->
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
|
||||
<xsd:complexType name="UnsignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedDataObjectProperties-->
|
||||
<!-- Start QualifyingPropertiesReference-->
|
||||
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
|
||||
<xsd:complexType name="QualifyingPropertiesReferenceType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingPropertiesReference-->
|
||||
<!-- End container types -->
|
||||
<!-- Start SigningTime element -->
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime"/>
|
||||
<!-- End SigningTime element -->
|
||||
<!-- Start SigningCertificate -->
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType"/>
|
||||
<xsd:complexType name="CertIDListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertIDType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DigestAlgAndValueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod"/>
|
||||
<xsd:element ref="ds:DigestValue"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SigningCertificate -->
|
||||
<!-- Start SignaturePolicyIdentifier -->
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
|
||||
<xsd:complexType name="SignaturePolicyIdentifierType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
|
||||
<xsd:element name="SignaturePolicyImplied"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SignaturePolicyIdType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
|
||||
<xsd:element ref="ds:Transforms" minOccurs="0"/>
|
||||
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SigPolicyQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="SPURI" type="xsd:anyURI"/>
|
||||
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
|
||||
<xsd:complexType name="SPUserNoticeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
|
||||
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="NoticeReferenceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Organization" type="xsd:string"/>
|
||||
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IntegerListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignaturePolicyIdentifier -->
|
||||
<!-- Start CounterSignature -->
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||
<xsd:complexType name="CounterSignatureType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:Signature"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CounterSignature -->
|
||||
<!-- Start DataObjectFormat -->
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
|
||||
<xsd:complexType name="DataObjectFormatType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
|
||||
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<!-- End DataObjectFormat -->
|
||||
<!-- Start CommitmentTypeIndication -->
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
|
||||
<xsd:complexType name="CommitmentTypeIndicationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
|
||||
<xsd:choice>
|
||||
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
|
||||
<xsd:element name="AllSignedDataObjects"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CommitmentTypeQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CommitmentTypeIndication -->
|
||||
<!-- Start SignatureProductionPlace -->
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
|
||||
<xsd:complexType name="SignatureProductionPlaceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignatureProductionPlace -->
|
||||
<!-- Start SignerRole -->
|
||||
<xsd:element name="SignerRole" type="SignerRoleType"/>
|
||||
<xsd:complexType name="SignerRoleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
|
||||
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClaimedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertifiedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignerRole -->
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||
<!-- Start CompleteCertificateRefs -->
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:complexType name="CompleteCertificateRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertRefs" type="CertIDListType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteCertificateRefs -->
|
||||
<!-- Start CompleteRevocationRefs-->
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:complexType name="CompleteRevocationRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
|
||||
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
|
||||
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Issuer" type="xsd:string"/>
|
||||
<xsd:element name="IssueTime" type="xsd:dateTime"/>
|
||||
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ResponderIDType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="ByName" type="xsd:string"/>
|
||||
<xsd:element name="ByKey" type="xsd:base64Binary"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ResponderID" type="ResponderIDType"/>
|
||||
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteRevocationRefs-->
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||
<xsd:complexType name="CertificateValuesType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="OtherCertificate" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End CertificateValues -->
|
||||
<!-- Start RevocationValues-->
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:complexType name="RevocationValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
|
||||
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
|
||||
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End RevocationValues-->
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||
</xsd:schema>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
|
||||
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
|
||||
EncapsulatedPKIDataType and containers for time-stamp tokens -->
|
||||
<!-- Start AnyType -->
|
||||
<xsd:element name="Any" type="AnyType"/>
|
||||
<xsd:complexType name="AnyType" mixed="true">
|
||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:any namespace="##any" processContents="lax"/>
|
||||
</xsd:sequence>
|
||||
<xsd:anyAttribute namespace="##any"/>
|
||||
</xsd:complexType>
|
||||
<!-- End AnyType -->
|
||||
<!-- Start ObjectIdentifierType-->
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
|
||||
<xsd:complexType name="ObjectIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Identifier" type="IdentifierType"/>
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IdentifierType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:anyURI">
|
||||
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="QualifierType">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="OIDAsURI"/>
|
||||
<xsd:enumeration value="OIDAsURN"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="DocumentationReferencesType">
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End ObjectIdentifierType-->
|
||||
<!-- Start EncapsulatedPKIDataType-->
|
||||
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:complexType name="EncapsulatedPKIDataType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:base64Binary">
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- End EncapsulatedPKIDataType -->
|
||||
<!-- Start time-stamp containers types -->
|
||||
<!-- Start GenericTimeStampType -->
|
||||
<xsd:element name="Include" type="IncludeType"/>
|
||||
<xsd:complexType name="IncludeType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
|
||||
<xsd:complexType name="ReferenceInfoType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod"/>
|
||||
<xsd:element ref="ds:DigestValue"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="GenericTimeStampType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End GenericTimeStampType -->
|
||||
<!-- Start XAdESTimeStampType -->
|
||||
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:complexType name="XAdESTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End XAdESTimeStampType -->
|
||||
<!-- Start OtherTimeStampType -->
|
||||
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
|
||||
<xsd:complexType name="OtherTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||
<xsd:choice>
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End OtherTimeStampType -->
|
||||
<!-- End time-stamp containers types -->
|
||||
<!-- End auxiliary types definitions-->
|
||||
<!-- Start container types -->
|
||||
<!-- Start QualifyingProperties -->
|
||||
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
|
||||
<xsd:complexType name="QualifyingPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingProperties -->
|
||||
<!-- Start SignedProperties-->
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
|
||||
<xsd:complexType name="SignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedProperties-->
|
||||
<!-- Start UnsignedProperties-->
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
|
||||
<xsd:complexType name="UnsignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedProperties-->
|
||||
<!-- Start SignedSignatureProperties-->
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
|
||||
<xsd:complexType name="SignedSignaturePropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
|
||||
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedSignatureProperties-->
|
||||
<!-- Start SignedDataObjectProperties-->
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
|
||||
<xsd:complexType name="SignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End SignedDataObjectProperties-->
|
||||
<!-- Start UnsignedSignatureProperties-->
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
|
||||
<xsd:complexType name="UnsignedSignaturePropertiesType">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:any namespace="##other"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedSignatureProperties-->
|
||||
<!-- Start UnsignedDataObjectProperties-->
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
|
||||
<xsd:complexType name="UnsignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedDataObjectProperties-->
|
||||
<!-- Start QualifyingPropertiesReference-->
|
||||
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
|
||||
<xsd:complexType name="QualifyingPropertiesReferenceType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingPropertiesReference-->
|
||||
<!-- End container types -->
|
||||
<!-- Start SigningTime element -->
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime"/>
|
||||
<!-- End SigningTime element -->
|
||||
<!-- Start SigningCertificate -->
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType"/>
|
||||
<xsd:complexType name="CertIDListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertIDType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DigestAlgAndValueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod"/>
|
||||
<xsd:element ref="ds:DigestValue"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SigningCertificate -->
|
||||
<!-- Start SignaturePolicyIdentifier -->
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
|
||||
<xsd:complexType name="SignaturePolicyIdentifierType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
|
||||
<xsd:element name="SignaturePolicyImplied"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SignaturePolicyIdType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
|
||||
<xsd:element ref="ds:Transforms" minOccurs="0"/>
|
||||
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SigPolicyQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="SPURI" type="xsd:anyURI"/>
|
||||
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
|
||||
<xsd:complexType name="SPUserNoticeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
|
||||
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="NoticeReferenceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Organization" type="xsd:string"/>
|
||||
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IntegerListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignaturePolicyIdentifier -->
|
||||
<!-- Start CounterSignature -->
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||
<xsd:complexType name="CounterSignatureType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:Signature"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CounterSignature -->
|
||||
<!-- Start DataObjectFormat -->
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
|
||||
<xsd:complexType name="DataObjectFormatType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
|
||||
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<!-- End DataObjectFormat -->
|
||||
<!-- Start CommitmentTypeIndication -->
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
|
||||
<xsd:complexType name="CommitmentTypeIndicationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
|
||||
<xsd:choice>
|
||||
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
|
||||
<xsd:element name="AllSignedDataObjects"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CommitmentTypeQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CommitmentTypeIndication -->
|
||||
<!-- Start SignatureProductionPlace -->
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
|
||||
<xsd:complexType name="SignatureProductionPlaceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignatureProductionPlace -->
|
||||
<!-- Start SignerRole -->
|
||||
<xsd:element name="SignerRole" type="SignerRoleType"/>
|
||||
<xsd:complexType name="SignerRoleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
|
||||
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClaimedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertifiedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignerRole -->
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||
<!-- Start CompleteCertificateRefs -->
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:complexType name="CompleteCertificateRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertRefs" type="CertIDListType"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteCertificateRefs -->
|
||||
<!-- Start CompleteRevocationRefs-->
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:complexType name="CompleteRevocationRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
|
||||
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
|
||||
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
|
||||
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Issuer" type="xsd:string"/>
|
||||
<xsd:element name="IssueTime" type="xsd:dateTime"/>
|
||||
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ResponderIDType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="ByName" type="xsd:string"/>
|
||||
<xsd:element name="ByKey" type="xsd:base64Binary"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ResponderID" type="ResponderIDType"/>
|
||||
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteRevocationRefs-->
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||
<xsd:complexType name="CertificateValuesType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
|
||||
<xsd:element name="OtherCertificate" type="AnyType"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<!-- End CertificateValues -->
|
||||
<!-- Start RevocationValues-->
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:complexType name="RevocationValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
|
||||
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
|
||||
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End RevocationValues-->
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||
</xsd:schema>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
|
||||
<xsd:complexType name="ValidationDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
|
||||
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
|
||||
</xsd:schema>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
|
||||
<xsd:complexType name="ValidationDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
|
||||
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
|
||||
</xsd:schema>
|
||||
|
||||
@ -1,50 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
|
||||
<xb:package>com.microsoft.schemas.office.office</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
|
||||
<xb:package>com.microsoft.schemas.office.excel</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
|
||||
<xb:package>com.microsoft.schemas.office.word</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
|
||||
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:vml">
|
||||
<xb:package>com.microsoft.schemas.vml</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
|
||||
<xb:package>com.microsoft.schemas.compatibility</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
|
||||
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
-->
|
||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
|
||||
<xb:package>com.microsoft.schemas.office.office</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
|
||||
<xb:package>com.microsoft.schemas.office.excel</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
|
||||
<xb:package>com.microsoft.schemas.office.word</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
|
||||
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-microsoft-com:vml">
|
||||
<xb:package>com.microsoft.schemas.vml</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
|
||||
<xb:package>com.microsoft.schemas.compatibility</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
|
||||
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
|
||||
</xb:namespace>
|
||||
|
||||
</xb:config>
|
||||
@ -0,0 +1,562 @@
|
||||
<xsd:schema attributeFormDefault="qualified" blockDefault="#all" elementFormDefault="qualified"
|
||||
targetNamespace="http://schemas.microsoft.com/office/word/2010/wordml"
|
||||
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
|
||||
xmlns:w06="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
||||
xmlns:od06st="http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://schemas.microsoft.com/office/word/2010/wordml">
|
||||
<xsd:complexType name="CT_LongHexNumber">
|
||||
<xsd:attribute name="val" type="w06:ST_LongHexNumber" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_OnOff">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="true"/>
|
||||
<xsd:enumeration value="false"/>
|
||||
<xsd:enumeration value="0"/>
|
||||
<xsd:enumeration value="1"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_OnOff">
|
||||
<xsd:attribute name="val" type="ST_OnOff"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="docId" type="CT_LongHexNumber"/>
|
||||
<xsd:element name="conflictMode" type="CT_OnOff"/>
|
||||
<xsd:attributeGroup name="AG_Parids">
|
||||
<xsd:attribute name="paraId" type="w06:ST_LongHexNumber"/>
|
||||
<xsd:attribute name="textId" type="w06:ST_LongHexNumber"/>
|
||||
</xsd:attributeGroup>
|
||||
<xsd:attribute name="anchorId" type="w06:ST_LongHexNumber"/>
|
||||
<xsd:attribute name="noSpellErr" type="od06st:ST_OnOff"/>
|
||||
<xsd:element name="customXmlConflictInsRangeStart" type="w06:CT_TrackChange"/>
|
||||
<xsd:element name="customXmlConflictInsRangeEnd" type="w06:CT_Markup"/>
|
||||
<xsd:element name="customXmlConflictDelRangeStart" type="w06:CT_TrackChange"/>
|
||||
<xsd:element name="customXmlConflictDelRangeEnd" type="w06:CT_Markup"/>
|
||||
<xsd:group name="EG_RunLevelConflicts">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="conflictIns" type="w06:CT_RunTrackChange" minOccurs="0"/>
|
||||
<xsd:element name="conflictDel" type="w06:CT_RunTrackChange" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:group name="EG_Conflicts">
|
||||
<xsd:choice>
|
||||
<xsd:element name="conflictIns" type="w06:CT_TrackChange" minOccurs="0"/>
|
||||
<xsd:element name="conflictDel" type="w06:CT_TrackChange" minOccurs="0"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_Percentage">
|
||||
<xsd:attribute name="val" type="a:ST_Percentage" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_PositiveFixedPercentage">
|
||||
<xsd:attribute name="val" type="a:ST_PositiveFixedPercentage" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_PositivePercentage">
|
||||
<xsd:attribute name="val" type="a:ST_PositivePercentage" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_SchemeColorVal">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="bg1"/>
|
||||
<xsd:enumeration value="tx1"/>
|
||||
<xsd:enumeration value="bg2"/>
|
||||
<xsd:enumeration value="tx2"/>
|
||||
<xsd:enumeration value="accent1"/>
|
||||
<xsd:enumeration value="accent2"/>
|
||||
<xsd:enumeration value="accent3"/>
|
||||
<xsd:enumeration value="accent4"/>
|
||||
<xsd:enumeration value="accent5"/>
|
||||
<xsd:enumeration value="accent6"/>
|
||||
<xsd:enumeration value="hlink"/>
|
||||
<xsd:enumeration value="folHlink"/>
|
||||
<xsd:enumeration value="dk1"/>
|
||||
<xsd:enumeration value="lt1"/>
|
||||
<xsd:enumeration value="dk2"/>
|
||||
<xsd:enumeration value="lt2"/>
|
||||
<xsd:enumeration value="phClr"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_RectAlignment">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="none"/>
|
||||
<xsd:enumeration value="tl"/>
|
||||
<xsd:enumeration value="t"/>
|
||||
<xsd:enumeration value="tr"/>
|
||||
<xsd:enumeration value="l"/>
|
||||
<xsd:enumeration value="ctr"/>
|
||||
<xsd:enumeration value="r"/>
|
||||
<xsd:enumeration value="bl"/>
|
||||
<xsd:enumeration value="b"/>
|
||||
<xsd:enumeration value="br"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_PathShadeType">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="shape"/>
|
||||
<xsd:enumeration value="circle"/>
|
||||
<xsd:enumeration value="rect"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_LineCap">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="rnd"/>
|
||||
<xsd:enumeration value="sq"/>
|
||||
<xsd:enumeration value="flat"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_PresetLineDashVal">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="solid"/>
|
||||
<xsd:enumeration value="dot"/>
|
||||
<xsd:enumeration value="sysDot"/>
|
||||
<xsd:enumeration value="dash"/>
|
||||
<xsd:enumeration value="sysDash"/>
|
||||
<xsd:enumeration value="lgDash"/>
|
||||
<xsd:enumeration value="dashDot"/>
|
||||
<xsd:enumeration value="sysDashDot"/>
|
||||
<xsd:enumeration value="lgDashDot"/>
|
||||
<xsd:enumeration value="lgDashDotDot"/>
|
||||
<xsd:enumeration value="sysDashDotDot"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_PenAlignment">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="ctr"/>
|
||||
<xsd:enumeration value="in"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_CompoundLine">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="sng"/>
|
||||
<xsd:enumeration value="dbl"/>
|
||||
<xsd:enumeration value="thickThin"/>
|
||||
<xsd:enumeration value="thinThick"/>
|
||||
<xsd:enumeration value="tri"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_RelativeRect">
|
||||
<xsd:attribute name="l" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="t" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="r" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="b" use="optional" type="a:ST_Percentage"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_ColorTransform">
|
||||
<xsd:choice>
|
||||
<xsd:element name="tint" type="CT_PositiveFixedPercentage"/>
|
||||
<xsd:element name="shade" type="CT_PositiveFixedPercentage"/>
|
||||
<xsd:element name="alpha" type="CT_PositiveFixedPercentage"/>
|
||||
<xsd:element name="hueMod" type="CT_PositivePercentage"/>
|
||||
<xsd:element name="sat" type="CT_Percentage"/>
|
||||
<xsd:element name="satOff" type="CT_Percentage"/>
|
||||
<xsd:element name="satMod" type="CT_Percentage"/>
|
||||
<xsd:element name="lum" type="CT_Percentage"/>
|
||||
<xsd:element name="lumOff" type="CT_Percentage"/>
|
||||
<xsd:element name="lumMod" type="CT_Percentage"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_SRgbColor">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorTransform" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="val" type="od06st:ST_HexColorRGB" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_SchemeColor">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorTransform" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="val" type="ST_SchemeColorVal" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_ColorChoice">
|
||||
<xsd:choice>
|
||||
<xsd:element name="srgbClr" type="CT_SRgbColor"/>
|
||||
<xsd:element name="schemeClr" type="CT_SchemeColor"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_Color">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorChoice"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_GradientStop">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorChoice"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="pos" type="a:ST_PositiveFixedPercentage" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_GradientStopList">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="gs" type="CT_GradientStop" minOccurs="2" maxOccurs="10"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_LinearShadeProperties">
|
||||
<xsd:attribute name="ang" type="a:ST_PositiveFixedAngle" use="optional"/>
|
||||
<xsd:attribute name="scaled" type="ST_OnOff" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_PathShadeProperties">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="fillToRect" type="CT_RelativeRect" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="path" type="ST_PathShadeType" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_ShadeProperties">
|
||||
<xsd:choice>
|
||||
<xsd:element name="lin" type="CT_LinearShadeProperties"/>
|
||||
<xsd:element name="path" type="CT_PathShadeProperties"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_SolidColorFillProperties">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorChoice" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_GradientFillProperties">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="gsLst" type="CT_GradientStopList" minOccurs="0"/>
|
||||
<xsd:group ref="EG_ShadeProperties" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_FillProperties">
|
||||
<xsd:choice>
|
||||
<xsd:element name="noFill" type="w06:CT_Empty"/>
|
||||
<xsd:element name="solidFill" type="CT_SolidColorFillProperties"/>
|
||||
<xsd:element name="gradFill" type="CT_GradientFillProperties"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_PresetLineDashProperties">
|
||||
<xsd:attribute name="val" type="ST_PresetLineDashVal" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_LineDashProperties">
|
||||
<xsd:choice>
|
||||
<xsd:element name="prstDash" type="CT_PresetLineDashProperties"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:complexType name="CT_LineJoinMiterProperties">
|
||||
<xsd:attribute name="lim" type="a:ST_PositivePercentage" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_LineJoinProperties">
|
||||
<xsd:choice>
|
||||
<xsd:element name="round" type="w06:CT_Empty"/>
|
||||
<xsd:element name="bevel" type="w06:CT_Empty"/>
|
||||
<xsd:element name="miter" type="CT_LineJoinMiterProperties"/>
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
<xsd:simpleType name="ST_PresetCameraType">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="legacyObliqueTopLeft"/>
|
||||
<xsd:enumeration value="legacyObliqueTop"/>
|
||||
<xsd:enumeration value="legacyObliqueTopRight"/>
|
||||
<xsd:enumeration value="legacyObliqueLeft"/>
|
||||
<xsd:enumeration value="legacyObliqueFront"/>
|
||||
<xsd:enumeration value="legacyObliqueRight"/>
|
||||
<xsd:enumeration value="legacyObliqueBottomLeft"/>
|
||||
<xsd:enumeration value="legacyObliqueBottom"/>
|
||||
<xsd:enumeration value="legacyObliqueBottomRight"/>
|
||||
<xsd:enumeration value="legacyPerspectiveTopLeft"/>
|
||||
<xsd:enumeration value="legacyPerspectiveTop"/>
|
||||
<xsd:enumeration value="legacyPerspectiveTopRight"/>
|
||||
<xsd:enumeration value="legacyPerspectiveLeft"/>
|
||||
<xsd:enumeration value="legacyPerspectiveFront"/>
|
||||
<xsd:enumeration value="legacyPerspectiveRight"/>
|
||||
<xsd:enumeration value="legacyPerspectiveBottomLeft"/>
|
||||
<xsd:enumeration value="legacyPerspectiveBottom"/>
|
||||
<xsd:enumeration value="legacyPerspectiveBottomRight"/>
|
||||
<xsd:enumeration value="orthographicFront"/>
|
||||
<xsd:enumeration value="isometricTopUp"/>
|
||||
<xsd:enumeration value="isometricTopDown"/>
|
||||
<xsd:enumeration value="isometricBottomUp"/>
|
||||
<xsd:enumeration value="isometricBottomDown"/>
|
||||
<xsd:enumeration value="isometricLeftUp"/>
|
||||
<xsd:enumeration value="isometricLeftDown"/>
|
||||
<xsd:enumeration value="isometricRightUp"/>
|
||||
<xsd:enumeration value="isometricRightDown"/>
|
||||
<xsd:enumeration value="isometricOffAxis1Left"/>
|
||||
<xsd:enumeration value="isometricOffAxis1Right"/>
|
||||
<xsd:enumeration value="isometricOffAxis1Top"/>
|
||||
<xsd:enumeration value="isometricOffAxis2Left"/>
|
||||
<xsd:enumeration value="isometricOffAxis2Right"/>
|
||||
<xsd:enumeration value="isometricOffAxis2Top"/>
|
||||
<xsd:enumeration value="isometricOffAxis3Left"/>
|
||||
<xsd:enumeration value="isometricOffAxis3Right"/>
|
||||
<xsd:enumeration value="isometricOffAxis3Bottom"/>
|
||||
<xsd:enumeration value="isometricOffAxis4Left"/>
|
||||
<xsd:enumeration value="isometricOffAxis4Right"/>
|
||||
<xsd:enumeration value="isometricOffAxis4Bottom"/>
|
||||
<xsd:enumeration value="obliqueTopLeft"/>
|
||||
<xsd:enumeration value="obliqueTop"/>
|
||||
<xsd:enumeration value="obliqueTopRight"/>
|
||||
<xsd:enumeration value="obliqueLeft"/>
|
||||
<xsd:enumeration value="obliqueRight"/>
|
||||
<xsd:enumeration value="obliqueBottomLeft"/>
|
||||
<xsd:enumeration value="obliqueBottom"/>
|
||||
<xsd:enumeration value="obliqueBottomRight"/>
|
||||
<xsd:enumeration value="perspectiveFront"/>
|
||||
<xsd:enumeration value="perspectiveLeft"/>
|
||||
<xsd:enumeration value="perspectiveRight"/>
|
||||
<xsd:enumeration value="perspectiveAbove"/>
|
||||
<xsd:enumeration value="perspectiveBelow"/>
|
||||
<xsd:enumeration value="perspectiveAboveLeftFacing"/>
|
||||
<xsd:enumeration value="perspectiveAboveRightFacing"/>
|
||||
<xsd:enumeration value="perspectiveContrastingLeftFacing"/>
|
||||
<xsd:enumeration value="perspectiveContrastingRightFacing"/>
|
||||
<xsd:enumeration value="perspectiveHeroicLeftFacing"/>
|
||||
<xsd:enumeration value="perspectiveHeroicRightFacing"/>
|
||||
<xsd:enumeration value="perspectiveHeroicExtremeLeftFacing"/>
|
||||
<xsd:enumeration value="perspectiveHeroicExtremeRightFacing"/>
|
||||
<xsd:enumeration value="perspectiveRelaxed"/>
|
||||
<xsd:enumeration value="perspectiveRelaxedModerately"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_Camera">
|
||||
<xsd:attribute name="prst" use="required" type="ST_PresetCameraType"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_SphereCoords">
|
||||
<xsd:attribute name="lat" type="a:ST_PositiveFixedAngle" use="required"/>
|
||||
<xsd:attribute name="lon" type="a:ST_PositiveFixedAngle" use="required"/>
|
||||
<xsd:attribute name="rev" type="a:ST_PositiveFixedAngle" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_LightRigType">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="legacyFlat1"/>
|
||||
<xsd:enumeration value="legacyFlat2"/>
|
||||
<xsd:enumeration value="legacyFlat3"/>
|
||||
<xsd:enumeration value="legacyFlat4"/>
|
||||
<xsd:enumeration value="legacyNormal1"/>
|
||||
<xsd:enumeration value="legacyNormal2"/>
|
||||
<xsd:enumeration value="legacyNormal3"/>
|
||||
<xsd:enumeration value="legacyNormal4"/>
|
||||
<xsd:enumeration value="legacyHarsh1"/>
|
||||
<xsd:enumeration value="legacyHarsh2"/>
|
||||
<xsd:enumeration value="legacyHarsh3"/>
|
||||
<xsd:enumeration value="legacyHarsh4"/>
|
||||
<xsd:enumeration value="threePt"/>
|
||||
<xsd:enumeration value="balanced"/>
|
||||
<xsd:enumeration value="soft"/>
|
||||
<xsd:enumeration value="harsh"/>
|
||||
<xsd:enumeration value="flood"/>
|
||||
<xsd:enumeration value="contrasting"/>
|
||||
<xsd:enumeration value="morning"/>
|
||||
<xsd:enumeration value="sunrise"/>
|
||||
<xsd:enumeration value="sunset"/>
|
||||
<xsd:enumeration value="chilly"/>
|
||||
<xsd:enumeration value="freezing"/>
|
||||
<xsd:enumeration value="flat"/>
|
||||
<xsd:enumeration value="twoPt"/>
|
||||
<xsd:enumeration value="glow"/>
|
||||
<xsd:enumeration value="brightRoom"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="ST_LightRigDirection">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="tl"/>
|
||||
<xsd:enumeration value="t"/>
|
||||
<xsd:enumeration value="tr"/>
|
||||
<xsd:enumeration value="l"/>
|
||||
<xsd:enumeration value="r"/>
|
||||
<xsd:enumeration value="bl"/>
|
||||
<xsd:enumeration value="b"/>
|
||||
<xsd:enumeration value="br"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_LightRig">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rot" type="CT_SphereCoords" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="rig" type="ST_LightRigType" use="required"/>
|
||||
<xsd:attribute name="dir" type="ST_LightRigDirection" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_BevelPresetType">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="relaxedInset"/>
|
||||
<xsd:enumeration value="circle"/>
|
||||
<xsd:enumeration value="slope"/>
|
||||
<xsd:enumeration value="cross"/>
|
||||
<xsd:enumeration value="angle"/>
|
||||
<xsd:enumeration value="softRound"/>
|
||||
<xsd:enumeration value="convex"/>
|
||||
<xsd:enumeration value="coolSlant"/>
|
||||
<xsd:enumeration value="divot"/>
|
||||
<xsd:enumeration value="riblet"/>
|
||||
<xsd:enumeration value="hardEdge"/>
|
||||
<xsd:enumeration value="artDeco"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_Bevel">
|
||||
<xsd:attribute name="w" type="a:ST_PositiveCoordinate" use="optional"/>
|
||||
<xsd:attribute name="h" type="a:ST_PositiveCoordinate" use="optional"/>
|
||||
<xsd:attribute name="prst" type="ST_BevelPresetType" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_PresetMaterialType">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="legacyMatte"/>
|
||||
<xsd:enumeration value="legacyPlastic"/>
|
||||
<xsd:enumeration value="legacyMetal"/>
|
||||
<xsd:enumeration value="legacyWireframe"/>
|
||||
<xsd:enumeration value="matte"/>
|
||||
<xsd:enumeration value="plastic"/>
|
||||
<xsd:enumeration value="metal"/>
|
||||
<xsd:enumeration value="warmMatte"/>
|
||||
<xsd:enumeration value="translucentPowder"/>
|
||||
<xsd:enumeration value="powder"/>
|
||||
<xsd:enumeration value="dkEdge"/>
|
||||
<xsd:enumeration value="softEdge"/>
|
||||
<xsd:enumeration value="clear"/>
|
||||
<xsd:enumeration value="flat"/>
|
||||
<xsd:enumeration value="softmetal"/>
|
||||
<xsd:enumeration value="none"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_Glow">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorChoice"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="rad" use="optional" type="a:ST_PositiveCoordinate"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_Shadow">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_ColorChoice"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="blurRad" use="optional" type="a:ST_PositiveCoordinate"/>
|
||||
<xsd:attribute name="dist" use="optional" type="a:ST_PositiveCoordinate"/>
|
||||
<xsd:attribute name="dir" use="optional" type="a:ST_PositiveFixedAngle"/>
|
||||
<xsd:attribute name="sx" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="sy" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="kx" use="optional" type="a:ST_FixedAngle"/>
|
||||
<xsd:attribute name="ky" use="optional" type="a:ST_FixedAngle"/>
|
||||
<xsd:attribute name="algn" use="optional" type="ST_RectAlignment"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_Reflection">
|
||||
<xsd:attribute name="blurRad" use="optional" type="a:ST_PositiveCoordinate"/>
|
||||
<xsd:attribute name="stA" use="optional" type="a:ST_PositiveFixedPercentage"/>
|
||||
<xsd:attribute name="stPos" use="optional" type="a:ST_PositiveFixedPercentage"/>
|
||||
<xsd:attribute name="endA" use="optional" type="a:ST_PositiveFixedPercentage"/>
|
||||
<xsd:attribute name="endPos" use="optional" type="a:ST_PositiveFixedPercentage"/>
|
||||
<xsd:attribute name="dist" use="optional" type="a:ST_PositiveCoordinate"/>
|
||||
<xsd:attribute name="dir" use="optional" type="a:ST_PositiveFixedAngle"/>
|
||||
<xsd:attribute name="fadeDir" use="optional" type="a:ST_PositiveFixedAngle"/>
|
||||
<xsd:attribute name="sx" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="sy" use="optional" type="a:ST_Percentage"/>
|
||||
<xsd:attribute name="kx" use="optional" type="a:ST_FixedAngle"/>
|
||||
<xsd:attribute name="ky" use="optional" type="a:ST_FixedAngle"/>
|
||||
<xsd:attribute name="algn" use="optional" type="ST_RectAlignment"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_FillTextEffect">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_FillProperties" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_TextOutlineEffect">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="EG_FillProperties" minOccurs="0"/>
|
||||
<xsd:group ref="EG_LineDashProperties" minOccurs="0"/>
|
||||
<xsd:group ref="EG_LineJoinProperties" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="w" use="optional" type="a:ST_LineWidth"/>
|
||||
<xsd:attribute name="cap" use="optional" type="ST_LineCap"/>
|
||||
<xsd:attribute name="cmpd" use="optional" type="ST_CompoundLine"/>
|
||||
<xsd:attribute name="algn" use="optional" type="ST_PenAlignment"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_Scene3D">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="camera" type="CT_Camera"/>
|
||||
<xsd:element name="lightRig" type="CT_LightRig"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_Props3D">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="bevelT" type="CT_Bevel" minOccurs="0"/>
|
||||
<xsd:element name="bevelB" type="CT_Bevel" minOccurs="0"/>
|
||||
<xsd:element name="extrusionClr" type="CT_Color" minOccurs="0"/>
|
||||
<xsd:element name="contourClr" type="CT_Color" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="extrusionH" type="a:ST_PositiveCoordinate" use="optional"/>
|
||||
<xsd:attribute name="contourW" type="a:ST_PositiveCoordinate" use="optional"/>
|
||||
<xsd:attribute name="prstMaterial" type="ST_PresetMaterialType" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_RPrTextEffects">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="glow" minOccurs="0" type="CT_Glow"/>
|
||||
<xsd:element name="shadow" minOccurs="0" type="CT_Shadow"/>
|
||||
<xsd:element name="reflection" minOccurs="0" type="CT_Reflection"/>
|
||||
<xsd:element name="textOutline" minOccurs="0" type="CT_TextOutlineEffect"/>
|
||||
<xsd:element name="textFill" minOccurs="0" type="CT_FillTextEffect"/>
|
||||
<xsd:element name="scene3d" minOccurs="0" type="CT_Scene3D"/>
|
||||
<xsd:element name="props3d" minOccurs="0" type="CT_Props3D"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:simpleType name="ST_Ligatures">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="none"/>
|
||||
<xsd:enumeration value="standard"/>
|
||||
<xsd:enumeration value="contextual"/>
|
||||
<xsd:enumeration value="historical"/>
|
||||
<xsd:enumeration value="discretional"/>
|
||||
<xsd:enumeration value="standardContextual"/>
|
||||
<xsd:enumeration value="standardHistorical"/>
|
||||
<xsd:enumeration value="contextualHistorical"/>
|
||||
<xsd:enumeration value="standardDiscretional"/>
|
||||
<xsd:enumeration value="contextualDiscretional"/>
|
||||
<xsd:enumeration value="historicalDiscretional"/>
|
||||
<xsd:enumeration value="standardContextualHistorical"/>
|
||||
<xsd:enumeration value="standardContextualDiscretional"/>
|
||||
<xsd:enumeration value="standardHistoricalDiscretional"/>
|
||||
<xsd:enumeration value="contextualHistoricalDiscretional"/>
|
||||
<xsd:enumeration value="all"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_Ligatures">
|
||||
<xsd:attribute name="val" type="ST_Ligatures" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_NumForm">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="default"/>
|
||||
<xsd:enumeration value="lining"/>
|
||||
<xsd:enumeration value="oldStyle"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_NumForm">
|
||||
<xsd:attribute name="val" type="ST_NumForm" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="ST_NumSpacing">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="default"/>
|
||||
<xsd:enumeration value="proportional"/>
|
||||
<xsd:enumeration value="tabular"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="CT_NumSpacing">
|
||||
<xsd:attribute name="val" type="ST_NumSpacing" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_StyleSet">
|
||||
<xsd:attribute name="id" type="od06st:ST_UnsignedDecimalNumber" use="required"/>
|
||||
<xsd:attribute name="val" type="ST_OnOff" use="optional"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_StylisticSets">
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="styleSet" minOccurs="0" maxOccurs="unbounded" type="CT_StyleSet"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:group name="EG_RPrOpenType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ligatures" minOccurs="0" type="CT_Ligatures"/>
|
||||
<xsd:element name="numForm" minOccurs="0" type="CT_NumForm"/>
|
||||
<xsd:element name="numSpacing" minOccurs="0" type="CT_NumSpacing"/>
|
||||
<xsd:element name="stylisticSets" minOccurs="0" type="CT_StylisticSets"/>
|
||||
<xsd:element name="cntxtAlts" minOccurs="0" type="CT_OnOff"/>
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
<xsd:element name="discardImageEditingData" type="CT_OnOff"/>
|
||||
<xsd:element name="defaultImageDpi" type="CT_DefaultImageDpi"/>
|
||||
<xsd:complexType name="CT_DefaultImageDpi">
|
||||
<xsd:attribute name="val" type="w06:ST_DecimalNumber" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="entityPicker" type="w06:CT_Empty"/>
|
||||
<xsd:complexType name="CT_SdtCheckboxSymbol">
|
||||
<xsd:attribute name="font" type="od06st:ST_String"/>
|
||||
<xsd:attribute name="val" type="w06:ST_ShortHexNumber"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CT_SdtCheckbox">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="checked" type="CT_OnOff" minOccurs="0"/>
|
||||
<xsd:element name="checkedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
|
||||
<xsd:element name="uncheckedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="checkbox" type="CT_SdtCheckbox"/>
|
||||
</xsd:schema>
|
||||
@ -22,8 +22,8 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'net.bytebuddy:byte-buddy:1.14.7'
|
||||
api 'net.bytebuddy:byte-buddy-agent:1.14.7'
|
||||
api 'net.bytebuddy:byte-buddy:1.18.5'
|
||||
api 'net.bytebuddy:byte-buddy-agent:1.18.5'
|
||||
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
||||
}
|
||||
|
||||
@ -36,27 +36,27 @@ java {
|
||||
}
|
||||
}
|
||||
|
||||
task compileJava9(type: JavaCompile) {
|
||||
tasks.register('compileJava9', JavaCompile) {
|
||||
dependsOn 'compileJava'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
doFirst {
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', sourceSets.main.compileClasspath.asPath
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', sourceSets.main.compileClasspath.asPath
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
manifest {
|
||||
attributes (
|
||||
|
||||
@ -25,7 +25,6 @@ import java.lang.instrument.Instrumentation;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.util.HashSet;
|
||||
@ -78,7 +77,7 @@ public class OOXMLLiteAgent {
|
||||
private static final Set<Integer> hashes = new HashSet<>();
|
||||
|
||||
static void load(String path) throws IOException {
|
||||
logPath = Paths.get(path);
|
||||
logPath = Path.of(path);
|
||||
if (Files.exists(logPath)) {
|
||||
try (Stream<String> stream = Files.lines(logPath)) {
|
||||
stream.forEach((s) -> hashes.add(s.hashCode()));
|
||||
@ -109,7 +108,7 @@ public class OOXMLLiteAgent {
|
||||
}
|
||||
|
||||
void load(String path) throws IOException {
|
||||
this.logPath = Paths.get(path);
|
||||
this.logPath = Path.of(path);
|
||||
if (Files.exists(this.logPath)) {
|
||||
try (Stream<String> stream = Files.lines(this.logPath)) {
|
||||
stream.forEach((s) -> hashes.add(s.hashCode()));
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -17,8 +15,10 @@ import java.util.regex.Pattern
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
final String BEANS_SRC = "${buildDir}/generated-sources"
|
||||
final String BEANS_RES = "${buildDir}/generated-resources"
|
||||
import java.util.regex.Pattern
|
||||
|
||||
final String BEANS_SRC = layout.buildDirectory.dir('generated-sources').get().asFile.absolutePath
|
||||
final String BEANS_RES = layout.buildDirectory.dir('generated-resources').get().asFile.absolutePath
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@ -43,7 +43,7 @@ final Pattern MODULE_REGEX = ~'\\.jar$'
|
||||
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
|
||||
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||
|
||||
task generateModuleInfo() {
|
||||
tasks.register('generateModuleInfo') {
|
||||
File fileIn = file("${OOXML_LITE_REPORT}.clazz")
|
||||
File fileOut = file("src/main/java9/module-info.java")
|
||||
|
||||
@ -55,8 +55,8 @@ task generateModuleInfo() {
|
||||
|
||||
// generate module-info based on exported classes
|
||||
String exports = fileIn.
|
||||
collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }.
|
||||
findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n')
|
||||
collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }.
|
||||
findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n')
|
||||
|
||||
String content = header + '\n' + exports + '\n}'
|
||||
if (fileOut.text != content) {
|
||||
@ -65,19 +65,19 @@ task generateModuleInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
task compileOoxmlLite(type: Copy) {
|
||||
tasks.register('compileOoxmlLite', Copy) {
|
||||
dependsOn 'generateModuleInfo', ':poi-ooxml-full:generate_beans', ':poi-ooxml-full:compileJava'
|
||||
|
||||
// This task is currently always executed, because gradle thinks files with two dollar signs
|
||||
// (as in AlternateContentDocument$AlternateContent$Choice.class) are always stale
|
||||
|
||||
// copy re-/sources to modules own directory to pacify IntelliJ, which doesn't like the same source dir in multiple modules
|
||||
from(project(':poi-ooxml-full').buildDir) {
|
||||
from(project(':poi-ooxml-full').layout.buildDirectory.asFile) {
|
||||
include 'generated-sources/**'
|
||||
include 'generated-resources/**'
|
||||
include 'classes/java/main/**'
|
||||
}
|
||||
into(buildDir)
|
||||
into(layout.buildDirectory.asFile)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
@ -93,21 +93,21 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
doFirst {
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
doFirst {
|
||||
File clazzFile = file("${OOXML_LITE_REPORT}.clazz")
|
||||
@ -124,7 +124,7 @@ jar {
|
||||
}
|
||||
|
||||
// ignore second module-info.class from poi-ooxml-full
|
||||
// duplicatesStrategy = 'exclude'
|
||||
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
includeEmptyDirs = false
|
||||
|
||||
manifest {
|
||||
|
||||
@ -35,6 +35,7 @@ ctcustomshowlist3419type
|
||||
ctcustomxmlblockd3c1type
|
||||
ctdatarefsb753type
|
||||
ctdiagramc1cctype
|
||||
ctdocumentbasedf5ctype
|
||||
cteastasianlayout0841type
|
||||
ctednposd4a3type
|
||||
cteqarr9667type
|
||||
@ -96,8 +97,10 @@ ctwebpublishobjects30d8type
|
||||
ctwrapthrough8b4etype
|
||||
ctwraptightae95type
|
||||
ctwraptopbottom5e13type
|
||||
fonts7aa2doctype
|
||||
lockedcanvaselement
|
||||
polylineelement
|
||||
relationships93b3doctype
|
||||
relidselement
|
||||
stalignh768ctype
|
||||
stalignv5abetype
|
||||
@ -125,3 +128,4 @@ ststrokelinestylea509type
|
||||
sttargetscreensize4357type
|
||||
stverticalanchor22cctype
|
||||
stwrapside6d02type
|
||||
wsdrd172doctype
|
||||
@ -28,7 +28,6 @@ configurations {
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
|
||||
broken
|
||||
tests
|
||||
javadocs
|
||||
}
|
||||
@ -59,18 +58,23 @@ dependencies {
|
||||
api project(':poi-ooxml-full')
|
||||
api project(path: ':poi-ooxml-full', configuration: 'archives')
|
||||
|
||||
// Can be very useful in local testing to comment out the 2 poi-ooxml-full lines above
|
||||
// and uncomment the line below to use a pre-built version of poi-ooxml-full.
|
||||
// Try to use the last release version of poi-ooxml-full. You might be unlucky if
|
||||
// recent unreleased changes in poi-ooxml-full are needed.
|
||||
// api "org.apache.poi:poi-ooxml-full:5.5.1"
|
||||
|
||||
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
||||
api "org.apache.commons:commons-compress:${commonsCompressVersion}"
|
||||
api "commons-io:commons-io:${commonsIoVersion}"
|
||||
api 'com.github.virtuald:curvesapi:1.08'
|
||||
api "org.apache.logging.log4j:log4j-api:${log4jVersion}"
|
||||
api 'org.apache.commons:commons-collections4:4.4'
|
||||
api 'org.apache.commons:commons-collections4:4.5.0'
|
||||
|
||||
signingImplementation 'org.apache.santuario:xmlsec:3.0.2'
|
||||
signingImplementation "org.apache.santuario:xmlsec:${xmlSecVersion}"
|
||||
signingImplementation "org.bouncycastle:bcpkix-jdk18on:${bouncyCastleVersion}"
|
||||
signingImplementation "org.bouncycastle:bcutil-jdk18on:${bouncyCastleVersion}"
|
||||
|
||||
rendersignImplementation 'org.apache.santuario:xmlsec:3.0.2'
|
||||
rendersignImplementation "org.apache.santuario:xmlsec:${xmlSecVersion}"
|
||||
rendersignImplementation "org.bouncycastle:bcpkix-jdk18on:${bouncyCastleVersion}"
|
||||
rendersignImplementation "org.bouncycastle:bcutil-jdk18on:${bouncyCastleVersion}"
|
||||
|
||||
@ -89,6 +93,10 @@ dependencies {
|
||||
exclude group: 'xalan', module: 'xalan'
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
renderImplementation("org.apache.xmlgraphics:batik-script:${batikVersion}") {
|
||||
exclude group: 'xalan', module: 'xalan'
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
|
||||
rendersignImplementation "org.apache.pdfbox:pdfbox:${pdfboxVersion}"
|
||||
rendersignImplementation "de.rototor.pdfbox:graphics2d:${graphics2dVersion}"
|
||||
@ -105,7 +113,10 @@ dependencies {
|
||||
exclude group: 'xalan', module: 'xalan'
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
|
||||
rendersignImplementation("org.apache.xmlgraphics:batik-script:${batikVersion}") {
|
||||
exclude group: 'xalan', module: 'xalan'
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
|
||||
if (!NO_SCRATCHPAD) {
|
||||
testImplementation project(':poi-scratchpad')
|
||||
@ -114,79 +125,69 @@ dependencies {
|
||||
testImplementation project(path:':poi', configuration:'tests')
|
||||
testImplementation project(path:':poi-ooxml-lite-agent', configuration: 'archives')
|
||||
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
|
||||
testImplementation 'org.xmlunit:xmlunit-core:2.9.1'
|
||||
testImplementation 'org.xmlunit:xmlunit-core:2.11.0'
|
||||
testImplementation 'org.reflections:reflections:0.10.2'
|
||||
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
|
||||
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
|
||||
testImplementation 'com.google.guava:guava:32.1.1-jre'
|
||||
testImplementation 'org.tukaani:xz:1.9'
|
||||
testImplementation 'com.google.guava:guava:33.5.0-jre'
|
||||
testImplementation 'com.github.rzymek:opczip:1.2.0'
|
||||
|
||||
// prevent slf4j warnings coming from xmlsec -> slf4j-api 1.7.x dependency
|
||||
// see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/
|
||||
testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
|
||||
|
||||
broken("org.apache.xmlgraphics:batik-script:${batikVersion}"){
|
||||
exclude group: 'xalan', module: 'xalan'
|
||||
exclude group: 'xml-apis', module: 'xml-apis'
|
||||
}
|
||||
testImplementation 'org.slf4j:slf4j-simple:2.0.17'
|
||||
|
||||
javadocs project(':poi')
|
||||
javadocs project(':poi-scratchpad')
|
||||
}
|
||||
|
||||
final String MODULE_NAME = 'org.apache.poi.ooxml'
|
||||
final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$|batik-script)'
|
||||
final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$)'
|
||||
final Pattern MODULE_REGEX = ~'\\.jar$'
|
||||
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
|
||||
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() + files("build/brokenJars")
|
||||
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
|
||||
|
||||
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
||||
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||
|
||||
compileJava {
|
||||
dependsOn 'fixBatik', 'cleanupBatik'
|
||||
}
|
||||
|
||||
task compileJava9(type: JavaCompile) {
|
||||
tasks.register('compileJava9', JavaCompile) {
|
||||
dependsOn 'compileJava', ':poi:jar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||
source = file(JAVA9_SRC)
|
||||
classpath = files()
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
|
||||
'--module-path', files(MAIN_MODULE_PATH).asPath
|
||||
]
|
||||
}
|
||||
|
||||
task compileTest9(type: JavaCompile) {
|
||||
tasks.register('compileTest9', JavaCompile) {
|
||||
dependsOn 'compileTestJava', ':poi:testJar'
|
||||
|
||||
javaCompiler = javaToolchains.compilerFor {
|
||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||
}
|
||||
sourceCompatibility = 1.9
|
||||
targetCompatibility = 1.9
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||
source = file(TEST9_SRC)
|
||||
options.compilerArgs = [
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(TEST_MODULE_PATH).asPath
|
||||
'--patch-module', "${MODULE_NAME}=${(sourceSets.main.output.classesDirs + sourceSets.test.output.classesDirs).asPath}",
|
||||
'--module-path', files(TEST_MODULE_PATH).asPath
|
||||
]
|
||||
classpath = files()
|
||||
}
|
||||
|
||||
|
||||
jar {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||
|
||||
manifest {
|
||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||
@ -196,11 +197,11 @@ jar {
|
||||
// Create a separate jar for test-code to depend on it in other projects
|
||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||
task testJar(type: Jar, dependsOn: testClasses) {
|
||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
||||
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||
|
||||
setArchiveClassifier 'tests'
|
||||
// ignore second module-info.class from main
|
||||
duplicatesStrategy = 'exclude'
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
from sourceSets.test.output + sourceSets.main.output
|
||||
|
||||
@ -209,35 +210,16 @@ task testJar(type: Jar, dependsOn: testClasses) {
|
||||
}
|
||||
}
|
||||
|
||||
// based on https://github.com/moditect/moditect-gradle-plugin/issues/12
|
||||
task fixBatik(type: Zip) {
|
||||
ant.mkdir(dir: "${buildDir}/brokenJars")
|
||||
archiveFileName = "batik-script-${batikVersion}.jar"
|
||||
destinationDirectory = file("${buildDir}/brokenJars")
|
||||
from zipTree(configurations.broken.files.find{ f -> f.name.startsWith("batik-script") })
|
||||
filesMatching("**/org.apache.batik.script.InterpreterFactory") {
|
||||
it.filter{ it2 -> it2.contains("Rhino") ? "#" + it2 : it2 }
|
||||
}
|
||||
}
|
||||
|
||||
task cleanupBatik(type: Delete) {
|
||||
// remove older files to avoid build failures because of duplicate modules
|
||||
delete fileTree("${buildDir}/brokenJars/").matching {
|
||||
include "*.jar"
|
||||
exclude "batik*-${batikVersion}.jar"
|
||||
}
|
||||
}
|
||||
|
||||
javadoc {
|
||||
failOnError = true
|
||||
doFirst {
|
||||
options {
|
||||
if (jdkVersion > 8) addBooleanOption('html5', true)
|
||||
addBooleanOption('html5', true)
|
||||
links 'https://poi.apache.org/apidocs/dev/'
|
||||
links 'https://docs.oracle.com/javase/8/docs/api/'
|
||||
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
|
||||
use = true
|
||||
splitIndex = true
|
||||
source = "1.8"
|
||||
source = "11"
|
||||
classpath += configurations.javadocs.files
|
||||
}
|
||||
}
|
||||
@ -268,9 +250,6 @@ test {
|
||||
dependsOn { testJar }
|
||||
|
||||
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
||||
if (jdkVersion == 8) {
|
||||
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
|
||||
}
|
||||
|
||||
if (NO_SCRATCHPAD) {
|
||||
useJUnitPlatform {
|
||||
@ -280,16 +259,12 @@ test {
|
||||
|
||||
doFirst {
|
||||
jvmArgs += [
|
||||
"-Xverify:all",
|
||||
"-XX:ErrorFile=../build/hs_err_pid%p.log",
|
||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}"
|
||||
'-Xverify:all',
|
||||
'-XX:ErrorFile=../build/hs_err_pid%p.log',
|
||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||
]
|
||||
if (jdkVersion > 8) {
|
||||
jvmArgs += [
|
||||
'--add-modules', MODULE_NAME,
|
||||
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,28 +14,31 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
package org.apache.poi.ooxml;
|
||||
|
||||
package org.apache.poi.ooxml.util;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.poi.util.Removal;
|
||||
import org.apache.poi.util.XMLHelper;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
* Provides handy methods for working with SAX parsers and readers
|
||||
* @deprecated use {@link XMLHelper}
|
||||
* Represents a hyperlink relationship.
|
||||
*
|
||||
* @since 5.3.0
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version = "6.0.0")
|
||||
public final class SAXHelper {
|
||||
public class HyperlinkRelationship extends ReferenceRelationship {
|
||||
/**
|
||||
* Creates a new SAX XMLReader, with sensible defaults
|
||||
* Initializes a new instance of the HyperlinkRelationship.
|
||||
*
|
||||
* @param hyperlinkUri The target uri of the hyperlink relationship.
|
||||
* @param isExternal Is the URI external.
|
||||
* @param id The relationship ID.
|
||||
*/
|
||||
public static XMLReader newXMLReader() throws SAXException, ParserConfigurationException {
|
||||
return XMLHelper.newXMLReader();
|
||||
protected HyperlinkRelationship(POIXMLDocumentPart container, URI hyperlinkUri, boolean isExternal, String id) {
|
||||
super(container, hyperlinkUri, isExternal, PackageRelationshipTypes.HYPERLINK_PART, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRelationshipType() {
|
||||
return PackageRelationshipTypes.HYPERLINK_PART;
|
||||
}
|
||||
}
|
||||
@ -155,7 +155,7 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Close
|
||||
* @return the document's embedded files
|
||||
*
|
||||
* @throws OpenXML4JException if the embedded parts can't be determined
|
||||
* @since POI 4.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract List<PackagePart> getAllEmbeddedParts() throws OpenXML4JException;
|
||||
|
||||
|
||||
@ -23,10 +23,11 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
|
||||
import org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException;
|
||||
@ -38,13 +39,13 @@ import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
|
||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.util.Internal;
|
||||
import org.apache.poi.xddf.usermodel.chart.XDDFChart;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRelation;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
||||
import org.apache.xmlbeans.XmlException;
|
||||
|
||||
/**
|
||||
* Represents an entry of a OOXML package.
|
||||
@ -53,12 +54,13 @@ import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
||||
* </p>
|
||||
*/
|
||||
public class POIXMLDocumentPart {
|
||||
private static final Logger LOG = LogManager.getLogger(POIXMLDocumentPart.class);
|
||||
private static final Logger LOG = PoiLogManager.getLogger(POIXMLDocumentPart.class);
|
||||
|
||||
private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT;
|
||||
private PackagePart packagePart;
|
||||
private POIXMLDocumentPart parent;
|
||||
private final Map<String, RelationPart> relations = new LinkedHashMap<>();
|
||||
private final Map<String, ReferenceRelationship> referenceRelationships = new LinkedHashMap<>();
|
||||
private boolean isCommitted = false;
|
||||
|
||||
/**
|
||||
@ -166,7 +168,7 @@ public class POIXMLDocumentPart {
|
||||
*
|
||||
* @param part - The package part that holds xml data representing this sheet.
|
||||
* @see #read(POIXMLFactory, Map)
|
||||
* @since POI 3.14-Beta1
|
||||
* @since 3.14-Beta1
|
||||
*/
|
||||
public POIXMLDocumentPart(PackagePart part) {
|
||||
this(null, part);
|
||||
@ -179,7 +181,7 @@ public class POIXMLDocumentPart {
|
||||
* @param parent - Parent part
|
||||
* @param part - The package part that holds xml data representing this sheet.
|
||||
* @see #read(POIXMLFactory, Map)
|
||||
* @since POI 3.14-Beta1
|
||||
* @since 3.14-Beta1
|
||||
*/
|
||||
public POIXMLDocumentPart(POIXMLDocumentPart parent, PackagePart part) {
|
||||
this.packagePart = part;
|
||||
@ -231,9 +233,14 @@ public class POIXMLDocumentPart {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of child relations for this POIXMLDocumentPart
|
||||
* Returns the list of child relations for this POIXMLDocumentPart.
|
||||
*
|
||||
* <p>
|
||||
* Since POI 5.3.0, Reference Relationships are stored separately from other child relations.
|
||||
* </p>
|
||||
*
|
||||
* @return child relations
|
||||
* @see #getReferenceRelationships() for reference relationships (e.g. hyperlinks)
|
||||
*/
|
||||
public final List<RelationPart> getRelationParts() {
|
||||
List<RelationPart> l = new ArrayList<>(relations.values());
|
||||
@ -252,7 +259,7 @@ public class POIXMLDocumentPart {
|
||||
*/
|
||||
public final POIXMLDocumentPart getRelationById(String id) {
|
||||
RelationPart rp = getRelationPartById(id);
|
||||
return (rp == null) ? null : rp.getDocumentPart();
|
||||
return rp == null ? null : rp.getDocumentPart();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -640,38 +647,56 @@ public class POIXMLDocumentPart {
|
||||
|
||||
// scan breadth-first, so parent-relations are hopefully the shallowest element
|
||||
for (PackageRelationship rel : rels) {
|
||||
if (rel.getTargetMode() == TargetMode.INTERNAL) {
|
||||
URI uri = rel.getTargetURI();
|
||||
if (Objects.equals(rel.getRelationshipType(), PackageRelationshipTypes.HYPERLINK_PART)) {
|
||||
referenceRelationships.put(rel.getId(), new HyperlinkRelationship(this, rel.getTargetURI(), rel.getTargetMode() == TargetMode.EXTERNAL, rel.getId()));
|
||||
} else {
|
||||
if (rel.getTargetMode() == TargetMode.INTERNAL) {
|
||||
URI uri = rel.getTargetURI();
|
||||
|
||||
// check for internal references (e.g. '#Sheet1!A1')
|
||||
PackagePartName relName;
|
||||
if (uri.getRawFragment() != null) {
|
||||
relName = PackagingURIHelper.createPartName(uri.getPath());
|
||||
} else {
|
||||
relName = PackagingURIHelper.createPartName(uri);
|
||||
}
|
||||
|
||||
final PackagePart p = packagePart.getPackage().getPart(relName);
|
||||
if (p == null) {
|
||||
LOG.atError().log("Skipped invalid entry {}", rel.getTargetURI());
|
||||
continue;
|
||||
}
|
||||
|
||||
POIXMLDocumentPart childPart = context.get(p);
|
||||
if (childPart == null) {
|
||||
childPart = factory.createDocumentPart(this, p);
|
||||
//here we are checking if part if embedded and excel then set it to chart class
|
||||
//so that at the time to writing we can also write updated embedded part
|
||||
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
|
||||
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
|
||||
// check for internal references (e.g. '#Sheet1!A1')
|
||||
PackagePartName relName;
|
||||
if (uri.getRawFragment() != null) {
|
||||
relName = PackagingURIHelper.createPartName(uri.getPath());
|
||||
} else {
|
||||
relName = PackagingURIHelper.createPartName(uri);
|
||||
}
|
||||
childPart.parent = this;
|
||||
// already add child to context, so other children can reference it
|
||||
context.put(p, childPart);
|
||||
readLater.add(childPart);
|
||||
}
|
||||
|
||||
addRelation(rel, childPart);
|
||||
final PackagePart p = packagePart.getPackage().getPart(relName);
|
||||
if (p == null) {
|
||||
LOG.atError().log("Skipped invalid entry {}", rel.getTargetURI());
|
||||
continue;
|
||||
}
|
||||
|
||||
POIXMLDocumentPart childPart = context.get(p);
|
||||
if (childPart == null) {
|
||||
try {
|
||||
childPart = factory.createDocumentPart(this, p);
|
||||
} catch (POIXMLException e) {
|
||||
if (e.getCause() instanceof XmlException
|
||||
&& XSSFRelation.CHART.getRelation().equals(rel.getRelationshipType())) {
|
||||
// https://github.com/apache/poi/pull/982
|
||||
// only allow this skipping event for charts
|
||||
// we need to be careful about not catching every exception here because
|
||||
// issues like zip bomb exceptions need to thrown and not ignored
|
||||
LOG.atWarn().log("Skipped unsupported part: {}", e.getMessage());
|
||||
continue;
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
//here we are checking if part is embedded and excel then set it to chart class
|
||||
//so that at the time to writing we can also write updated embedded part
|
||||
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
|
||||
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
|
||||
}
|
||||
childPart.parent = this;
|
||||
// already add child to context, so other children can reference it
|
||||
context.put(p, childPart);
|
||||
readLater.add(childPart);
|
||||
}
|
||||
|
||||
addRelation(rel, childPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -734,6 +759,63 @@ public class POIXMLDocumentPart {
|
||||
part.onDocumentRead();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the reference relationship to the specified part in this package.
|
||||
*
|
||||
* @param relId the part which is to be removed
|
||||
* @return true, if the relation was removed
|
||||
* @since 5.3.0
|
||||
*/
|
||||
public final boolean removeReferenceRelationship(String relId) {
|
||||
ReferenceRelationship existing = referenceRelationships.remove(relId);
|
||||
if (existing != null) {
|
||||
packagePart.removeRelationship(relId);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the reference relationship with the specified id.
|
||||
*
|
||||
* @param relId the relation id
|
||||
* @return the reference relationship or {@code null} if not found
|
||||
* @since 5.3.0
|
||||
*/
|
||||
public final ReferenceRelationship getReferenceRelationship(String relId) {
|
||||
return referenceRelationships.get(relId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new reference relationship for this POIXMLDocumentPart.
|
||||
*
|
||||
* @param uri the URI of the target part
|
||||
* @param isExternal true, if the target is an external resource
|
||||
* @param relId the relation id
|
||||
* @return the created reference relationship
|
||||
* @since 5.3.0
|
||||
*/
|
||||
public final HyperlinkRelationship createHyperlink(URI uri, boolean isExternal, String relId) {
|
||||
packagePart.addRelationship(uri, isExternal ? TargetMode.EXTERNAL : TargetMode.INTERNAL,
|
||||
PackageRelationshipTypes.HYPERLINK_PART, relId);
|
||||
HyperlinkRelationship hyperlink = new HyperlinkRelationship(this, uri, isExternal, relId);
|
||||
referenceRelationships.put(relId, hyperlink);
|
||||
return hyperlink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an unmodifiable list of reference relationships for this POIXMLDocumentPart.
|
||||
*
|
||||
* @return reference relationships
|
||||
* @since 5.3.0
|
||||
* @see #getRelationParts() for child relations
|
||||
*/
|
||||
public final List<ReferenceRelationship> getReferenceRelationships() {
|
||||
List<ReferenceRelationship> list = new ArrayList<>(referenceRelationships.values());
|
||||
return Collections.unmodifiableList(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the core document part
|
||||
*
|
||||
@ -746,7 +828,7 @@ public class POIXMLDocumentPart {
|
||||
if (coreRel != null) {
|
||||
PackagePart pp = pkg.getPart(coreRel);
|
||||
if (pp == null) {
|
||||
IOUtils.closeQuietly(pkg);
|
||||
pkg.revert();
|
||||
throw new POIXMLException("OOXML file structure broken/invalid - core document '" + coreRel.getTargetURI() + "' not found.");
|
||||
}
|
||||
return pp;
|
||||
@ -754,16 +836,16 @@ public class POIXMLDocumentPart {
|
||||
|
||||
coreRel = pkg.getRelationshipsByType(PackageRelationshipTypes.STRICT_CORE_DOCUMENT).getRelationship(0);
|
||||
if (coreRel != null) {
|
||||
IOUtils.closeQuietly(pkg);
|
||||
pkg.revert();
|
||||
throw new POIXMLException("Strict OOXML isn't currently supported, please see bug #57699");
|
||||
}
|
||||
|
||||
IOUtils.closeQuietly(pkg);
|
||||
pkg.revert();
|
||||
throw new POIXMLException("OOXML file structure broken/invalid - no core document found!");
|
||||
} catch (POIXMLException e) {
|
||||
throw e;
|
||||
} catch (RuntimeException e) {
|
||||
IOUtils.closeQuietly(pkg);
|
||||
pkg.revert();
|
||||
throw new POIXMLException("OOXML file structure broken/invalid", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ package org.apache.poi.ooxml;
|
||||
/**
|
||||
* Indicates a generic OOXML error.
|
||||
*/
|
||||
public final class POIXMLException extends RuntimeException{
|
||||
public final class POIXMLException extends RuntimeException {
|
||||
/**
|
||||
* Create a new {@code POIXMLException} with no
|
||||
* detail message.
|
||||
|
||||
@ -18,8 +18,8 @@ package org.apache.poi.ooxml;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.ooxml.POIXMLRelation.PackagePartConstructor;
|
||||
import org.apache.poi.ooxml.POIXMLRelation.ParentPartConstructor;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
@ -31,7 +31,7 @@ import org.apache.xmlbeans.XmlException;
|
||||
* Defines a factory API that enables sub-classes to create instances of <code>POIXMLDocumentPart</code>
|
||||
*/
|
||||
public abstract class POIXMLFactory {
|
||||
private static final Logger LOGGER = LogManager.getLogger(POIXMLFactory.class);
|
||||
private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLFactory.class);
|
||||
|
||||
/**
|
||||
* Create a POIXMLDocumentPart from existing package part and relation. This method is called
|
||||
@ -75,7 +75,7 @@ public abstract class POIXMLFactory {
|
||||
* @param relationshipType the relationship type of the descriptor
|
||||
* @return the descriptor or null if type is unknown
|
||||
*
|
||||
* @since POI 3.14-Beta1
|
||||
* @since 3.14-Beta1
|
||||
*/
|
||||
protected abstract POIXMLRelation getDescriptor(String relationshipType);
|
||||
|
||||
@ -104,7 +104,7 @@ public abstract class POIXMLFactory {
|
||||
*
|
||||
* @throws POIXMLException if the relations are erroneous or the part is not related
|
||||
*
|
||||
* @since POI 3.14-Beta1
|
||||
* @since 3.14-Beta1
|
||||
*/
|
||||
protected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part) {
|
||||
try {
|
||||
|
||||
@ -316,11 +316,11 @@ public class POIXMLProperties {
|
||||
public void setLastPrinted(String date) throws InvalidFormatException {
|
||||
part.setLastPrintedProperty(date);
|
||||
}
|
||||
/** @since POI 3.15 beta 3 */
|
||||
/** @since 3.15 beta 3 */
|
||||
public String getLastModifiedByUser() {
|
||||
return part.getLastModifiedByProperty().orElse(null);
|
||||
}
|
||||
/** @since POI 3.15 beta 3 */
|
||||
/** @since 3.15 beta 3 */
|
||||
public void setLastModifiedByUser(String user) {
|
||||
part.setLastModifiedByProperty(user);
|
||||
}
|
||||
@ -349,7 +349,7 @@ public class POIXMLProperties {
|
||||
/**
|
||||
* Sets the version property.
|
||||
* @param version property value
|
||||
* @since POI 5.2.3
|
||||
* @since 5.2.3
|
||||
*/
|
||||
public void setVersion(String version) {
|
||||
part.setVersionProperty(version);
|
||||
@ -358,7 +358,7 @@ public class POIXMLProperties {
|
||||
/**
|
||||
* Returns the version property value.
|
||||
* @return version property (can be null)
|
||||
* @since POI 5.2.3
|
||||
* @since 5.2.3
|
||||
*/
|
||||
public String getVersion() {
|
||||
return part.getVersionProperty().orElse(null);
|
||||
@ -399,7 +399,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setTemplate(String template) {
|
||||
props.getProperties().setTemplate(template);
|
||||
}
|
||||
@ -409,7 +409,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setManager(String manager) {
|
||||
props.getProperties().setManager(manager);
|
||||
}
|
||||
@ -419,7 +419,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setCompany(String company) {
|
||||
props.getProperties().setCompany(company);
|
||||
}
|
||||
@ -429,7 +429,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setPresentationFormat(String presentationFormat) {
|
||||
props.getProperties().setPresentationFormat(presentationFormat);
|
||||
}
|
||||
@ -439,7 +439,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setApplication(String application) {
|
||||
props.getProperties().setApplication(application);
|
||||
}
|
||||
@ -449,7 +449,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setAppVersion(String appVersion) {
|
||||
props.getProperties().setAppVersion(appVersion);
|
||||
}
|
||||
@ -460,7 +460,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setPages(int pages) {
|
||||
props.getProperties().setPages(pages);
|
||||
}
|
||||
@ -470,7 +470,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setWords(int words) {
|
||||
props.getProperties().setWords(words);
|
||||
}
|
||||
@ -480,7 +480,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setCharacters(int characters) {
|
||||
props.getProperties().setCharacters(characters);
|
||||
}
|
||||
@ -490,7 +490,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setCharactersWithSpaces(int charactersWithSpaces) {
|
||||
props.getProperties().setCharactersWithSpaces(charactersWithSpaces);
|
||||
}
|
||||
@ -500,7 +500,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setLines(int lines) {
|
||||
props.getProperties().setLines(lines);
|
||||
}
|
||||
@ -510,7 +510,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setParagraphs(int paragraphs) {
|
||||
props.getProperties().setParagraphs(paragraphs);
|
||||
}
|
||||
@ -520,7 +520,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setSlides(int slides) {
|
||||
props.getProperties().setSlides(slides);
|
||||
}
|
||||
@ -530,7 +530,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setNotes(int notes) {
|
||||
props.getProperties().setNotes(notes);
|
||||
}
|
||||
@ -540,7 +540,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setTotalTime(int totalTime) {
|
||||
props.getProperties().setTotalTime(totalTime);
|
||||
}
|
||||
@ -550,7 +550,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setHiddenSlides(int hiddenSlides) {
|
||||
props.getProperties().setHiddenSlides(hiddenSlides);
|
||||
}
|
||||
@ -560,7 +560,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setMMClips(int mmClips) {
|
||||
props.getProperties().setMMClips(mmClips);
|
||||
}
|
||||
@ -571,7 +571,7 @@ public class POIXMLProperties {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/** @since POI 4.1.1 */
|
||||
/** @since 4.1.1 */
|
||||
public void setHyperlinkBase(String hyperlinkBase) {
|
||||
props.getProperties().setHyperlinkBase(hyperlinkBase);
|
||||
}
|
||||
|
||||
@ -20,8 +20,8 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.poi.logging.PoiLogManager;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||
import org.apache.poi.openxml4j.opc.PackagePartName;
|
||||
@ -51,7 +51,7 @@ public abstract class POIXMLRelation {
|
||||
POIXMLDocumentPart init(POIXMLDocumentPart parent, PackagePart part) throws IOException, XmlException;
|
||||
}
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(POIXMLRelation.class);
|
||||
private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLRelation.class);
|
||||
|
||||
/**
|
||||
* Describes the content stored in a part.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user