Libraryless. Click here for Pure Java version (2164L/15K/52K).
1 | !7 |
2 | |
3 | p { |
4 | File odt = loadLibrary(#1009364); |
5 | L<S> tok = htmlTok(loadTextFileFromZip(odt, "content.xml")); |
6 | |
7 | // load styles |
8 | for (L<S> tag : findContainerTag(tok, "style:style")) { |
9 | S style = xml_getArg(tag, "style:name"); |
10 | S props = findTag(tag, "style:graphic-properties"); |
11 | S start = xml_getArg(props, "draw:marker-start"); |
12 | S end = xml_getArg(props, "draw:marker-end"); |
13 | print("Style " + style + " arrow? " + start + " - " + end); |
14 | } |
15 | |
16 | for (L<S> tag : findContainerTag(tok, "draw:custom-shape")) { |
17 | S style = xml_getArg(tag, "draw:style-name"); |
18 | DoubleRect rect = libreOffice_rect(tag); |
19 | print("\nCustom shape, style=" + style + ", rect: " + rect); |
20 | print(" " + join(tag)); |
21 | pnl(libreOffice_textP(tag)); |
22 | } |
23 | |
24 | for (L<S> tag : findContainerTag(tok, "draw:line")) { |
25 | S style = xml_getArg(tag, "draw:style-name"); |
26 | DoublePt pt1 = libreOffice_pt1(tag); |
27 | DoublePt pt2 = libreOffice_pt2(tag); |
28 | print("\nLine, style=" + style + ", pt1: " + pt1 + ", pt2: " + pt2); |
29 | print(" " + join(tag)); |
30 | pnl(libreOffice_textP(tag)); |
31 | } |
32 | } |
Began life as a copy of #1009179
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009365 |
Snippet name: | Parse LibreOffice Draw content.xml for diagrams Spike 2 [dev.] |
Eternal ID of this version: | #1009365/1 |
Text MD5: | 3322bebec54b9cdfd3f9716d389b6743 |
Transpilation MD5: | 4df2121ee6cd4bf62762ad18b823f83e |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-07-24 23:59:09 |
Source code size: | 1113 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 499 / 563 |
Referenced in: | [show references] |