Libraryless. Click here for Pure Java version (2614L/19K/62K).
1 | !7 |
2 | |
3 | /* style def |
4 | <style:style style:name="gr3" style:family="graphic" style:parent-style-name="standard"> |
5 | <style:graphic-properties draw:marker-start="Arrow" draw:marker-start-width="0.3cm" draw:marker-end="Arrow" draw:marker-end-width="0.3cm" draw:textarea-vertical-align="middle"/> |
6 | </style:style> |
7 | */ |
8 | |
9 | // text shape |
10 | // <draw:custom-shape draw:style-name="gr1" draw:text-style-name="P2" draw:layer="layout" svg:width="2.794cm" svg:height="2.032cm" svg:x="8.843cm" svg:y="20.685cm" |
11 | |
12 | p { |
13 | S xml = loadSnippet(#1009178); |
14 | L<S> tok = htmlTok(xml); |
15 | |
16 | // load styles |
17 | for (L<S> tag : findContainerTag(tok, "style:style")) { |
18 | S style = xml_getArg(tag, "style:name"); |
19 | S props = findTag(tag, "style:graphic-properties"); |
20 | S start = xml_getArg(props, "draw:marker-start"); |
21 | S end = xml_getArg(props, "draw:marker-end"); |
22 | print("Style " + style + " arrow? " + start + " - " + end); |
23 | } |
24 | |
25 | for (L<S> tag : findContainerTag(tok, "draw:custom-shape")) { |
26 | S style = xml_getArg(tag, "draw:style-name"); |
27 | DoubleRect rect = libreOffice_rect(tag); |
28 | print("\nCustom shape, style=" + style + ", rect: " + rect); |
29 | print(" " + join(tag)); |
30 | pnl(libreOffice_textP(tag)); |
31 | } |
32 | |
33 | for (L<S> tag : findContainerTag(tok, "draw:line")) { |
34 | S style = xml_getArg(tag, "draw:style-name"); |
35 | DoublePt pt1 = libreOffice_pt1(tag); |
36 | DoublePt pt2 = libreOffice_pt2(tag); |
37 | print("\nLine, style=" + style + ", pt1: " + pt1 + ", pt2: " + pt2); |
38 | print(" " + join(tag)); |
39 | pnl(libreOffice_textP(tag)); |
40 | } |
41 | } |
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: | #1009179 |
Snippet name: | Parse LibreOffice Draw content.xml for diagrams Spike 1 [WORKS] |
Eternal ID of this version: | #1009179/11 |
Text MD5: | f0cc9432c411ad58305bdb6198bcbca5 |
Transpilation MD5: | 7ed708a04a74d1d2aeb313b6164fb231 |
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:56:52 |
Source code size: | 1565 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 436 / 584 |
Version history: | 10 change(s) |
Referenced in: | [show references] |