Commit e3c5af0783fd31d430eaf8b15ef0ecf7b6faafd2
- Diff rendering mode:
- inline
- side by side
src/mso.xml
(1 / 1)
|   | |||
| 3109 | 3109 | <!-- MS documentation does not say shape is optional --> | |
| 3110 | 3110 | <type name="shape" type="OfficeArtSpContainer" optional="true" /> | |
| 3111 | 3111 | <type name="deletedShapes" type="OfficeArtSpgrContainerFileBlock" | |
| 3112 | array="true" optional="true" /> | ||
| 3112 | array="true" /> | ||
| 3113 | 3113 | <!-- according to ms spec, solvers is not optional --> | |
| 3114 | 3114 | <type name="solvers" type="OfficeArtSolverContainer" optional="true" /> | |
| 3115 | 3115 | </struct> |
|   | |||
| 112 | 112 | final boolean isChoice; | |
| 113 | 113 | final Limitation limitations[]; | |
| 114 | 114 | ||
| 115 | Member(TypeRegistry r, Element e) { | ||
| 115 | Member(TypeRegistry r, Element e) throws IOException { | ||
| 116 | 116 | registry = r; | |
| 117 | 117 | name = e.getAttribute("name"); | |
| 118 | 118 | condition = (e.hasAttribute("condition")) ? e.getAttribute("condition") | |
| … | … | ||
| 122 | 122 | ||
| 123 | 123 | isOptional = e.hasAttribute("optional"); | |
| 124 | 124 | isArray = count != null || e.hasAttribute("array"); | |
| 125 | if (isOptional && isArray) { | ||
| 126 | throw new IOException("Member " + name | ||
| 127 | + " is optional and array, which is not allowed."); | ||
| 128 | } | ||
| 125 | 129 | if (e.hasAttribute("type")) { | |
| 126 | 130 | typeName = e.getAttribute("type"); | |
| 127 | 131 | isInteger = false; | |
| … | … | ||
| 254 | 254 | final boolean containsSureChoice; | |
| 255 | 255 | final boolean containsChoice; | |
| 256 | 256 | ||
| 257 | static int getSize(TypeRegistry registry, Element e) { | ||
| 257 | static int getSize(TypeRegistry registry, Element e) throws IOException { | ||
| 258 | 258 | int size = 0; | |
| 259 | 259 | NodeList l = e.getChildNodes(); | |
| 260 | 260 | for (int i = 0; i < l.getLength(); ++i) { | |
| … | … | ||
| 303 | 303 | return size; | |
| 304 | 304 | } | |
| 305 | 305 | ||
| 306 | Struct(TypeRegistry registry, Element e) { | ||
| 306 | Struct(TypeRegistry registry, Element e) throws IOException { | ||
| 307 | 307 | registry.super(registry, e.getAttribute("name"), getSize(registry, e)); | |
| 308 | 308 | sizeExpression = e.getAttribute("size"); | |
| 309 | 309 |

