1<!-- 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, 13 software distributed under the License is distributed on an 14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 KIND, either express or implied. See the License for the 16 specific language governing permissions and limitations 17 under the License. 18--> 19 20# Native OOXML Export Tests — Milestone W.1 21 22**Source:** Source audit only. No tests were executed. 23**Confidence:** confirmed | probable | requires runtime verification 24 25--- 26 27## 1. Existing Tests Relevant to OOXML Export 28 29### 1.1 DOCX — Import test documents (import only, not export) 30 31| Test | Location | Coverage | Limitations | Executed? | 32|------|----------|----------|-------------|-----------| 33| DOCX import test documents | `main/writerfilter/qa/documents/*.docx` | DOCX import (footnotes, fields, tables, bookmarks, headers/footers, redlines, pictures, numbering) | Import only; no export testing | No | 34| DOCX complex import tests | `main/writerfilter/qa/complex/ooxml/testdocuments/*.docx` | Complex table properties, preferred width, different columns, row properties, cell borders | Import only | No | 35| DOCX test subdirectories | `main/writerfilter/qa/documents/docx/` (numbering, page-format, redlines, pictures) | Import of numbered lists, page format, redlines, pictures | Import only | No | 36 37**Assessment:** All writerfilter QA documents are import fixtures. None test DOCX export. 38 39### 1.2 XLSX — Import test fixtures (import only, not export) 40 41| Test | Location | Coverage | Limitations | Executed? | 42|------|----------|----------|-------------|-----------| 43| XLSX test fixtures | `test/testgui/data/pvt/complex_29s.xlsx`, `plain_11s.xlsx` | GUI import tests | Import only | No | 44 45**Assessment:** No XLSX export tests found. 46 47### 1.3 PPTX — Import test fixtures (import only, not export) 48 49| Test | Location | Coverage | Limitations | Executed? | 50|------|----------|----------|-------------|-----------| 51| PPTX test fixtures | `test/testgui/data/pvt/complex_100p.pptx`, `plain_200p.pptx` | GUI import tests | Import only | No | 52 53**Assessment:** No PPTX export tests found. 54 55### 1.4 ODF validation fixtures using DOCX (import/validation only) 56 57| Test | Location | Coverage | Limitations | Executed? | 58|------|----------|----------|-------------|-----------| 59| ODF validate DOCX fixtures | `test/odf-validate/fixtures/*.docx` (table-colspan, anchor-page, redline-stack) | ODF validation of DOCX-derived documents | Import/validation only, not export | No | 60 61### 1.5 Unit test directories (no export tests found) 62 63| Directory | Contents | Export tests? | 64|-----------|----------|---------------| 65| `main/qa/` | Various unit tests | No docx/xlsx/pptx export tests found | 66| `main/writerfilter/qa/` | DOCX import test documents | Import only | 67| `main/sc/qa/` | Calc unit tests | No XLSX export tests found | 68| `main/sd/qa/` | Impress unit tests | No PPTX export tests found | 69 70**Conclusion:** Zero export tests exist for DOCX, XLSX, or PPTX. 71 72--- 73 74## 2. Recommended Feature-Oriented Regression Matrix 75 76### 2.1 Test Category A: AOO document → OOXML export → package inspection 77 78| Test ID | Description | Method | Expected Result | Status | 79|---------|-------------|--------|-----------------|--------| 80| A1 | Export simple Calc document to XLSX, inspect package | Save As → XLSX, unzip, inspect `xl/workbook.xml`, `xl/worksheets/sheet1.xml`, `xl/styles.xml` | Package opens; workbook, sheet, styles present | Not executed | 81| A2 | Export Calc document with formulas to XLSX | Save As → XLSX, inspect `<c>` elements with `<f>` | Formulas preserved | Not executed | 82| A3 | Export Calc document with shared strings to XLSX | Save As → XLSX, inspect `xl/sharedStrings.xml` | Strings in SST, cells reference via `t="s"` | Not executed | 83| A4 | Export Calc document with merged cells to XLSX | Save As → XLSX, inspect `<mergeCells>` | Merged ranges present | Not executed | 84| A5 | Export Calc document with hyperlinks to XLSX | Save As → XLSX, inspect `<hyperlinks>` | Hyperlink relationships present | Not executed | 85| A6 | Export Calc document with data validation to XLSX | Save As → XLSX, inspect `<dataValidation>` | Validation rules present | Not executed | 86| A7 | Export Calc document with pivot tables to XLSX | Save As → XLSX, inspect `xl/pivotTables/` | Pivot XML present | Not executed | 87| A8 | Export Calc document with conditional formatting to XLSX | Save As → XLSX, inspect `<conditionalFormatting>` | CF rules partially present | Not executed | 88| A9 | Export Calc document with charts to XLSX | Save As → XLSX, inspect `xl/charts/` or `xl/drawings/` | **Expected: absent** (DFF path disabled) | Not executed | 89| A10 | Export Calc document with images to XLSX | Save As → XLSX, inspect `xl/media/` | **Expected: absent** (DFF path disabled) | Not executed | 90| A11 | Export Writer document to DOCX, inspect package | Save As → DOCX, unzip, inspect `word/document.xml`, `word/styles.xml` | Package opens; document, styles present | Not executed | 91| A12 | Export Writer document with tables to DOCX | Save As → DOCX, inspect `w:tbl` | Tables present (via WriteText path, not OutputTableNode stub) | Not executed | 92| A13 | Export Writer document with fields to DOCX | Save As → DOCX, inspect `w:instrText` / `w:fldSimple` | Fields present | Not executed | 93| A14 | Export Writer document with bookmarks to DOCX | Save As → DOCX, inspect `w:bookmarkStart`/`w:bookmarkEnd` | Bookmarks present | Not executed | 94| A15 | Export Writer document with headers/footers to DOCX | Save As → DOCX, inspect `word/headerN.xml`, `word/footerN.xml` | Headers/footers present | Not executed | 95| A16 | Export Writer document with footnotes to DOCX | Save As → DOCX, inspect `word/footnotes.xml` | Footnotes present | Not executed | 96| A17 | Export Writer document with OLE objects to DOCX | Save As → DOCX | **Expected: OLE absent** (OutputOLENode stub) | Not executed | 97| A18 | Export Writer document with ruby text to DOCX | Save As → DOCX | **Expected: ruby absent** (StartRuby stub) | Not executed | 98 99### 2.2 Test Category B: OOXML export → reopen in AOO 100 101| Test ID | Description | Method | Expected Result | Status | 102|---------|-------------|--------|-----------------|--------| 103| B1 | Round-trip: AOO → XLSX → AOO | Export to XLSX, reopen in Calc | Data preserved (modulo gaps A9-A10) | Not executed | 104| B2 | Round-trip: AOO → DOCX → AOO | Export to DOCX, reopen in Writer | Data preserved (modulo gaps A17-A18) | Not executed | 105 106### 2.3 Test Category C: Export → reopen in Microsoft Office-compatible software 107 108| Test ID | Description | Method | Expected Result | Status | 109|---------|-------------|--------|-----------------|--------| 110| C1 | XLSX → Excel | Export Calc to XLSX, open in Excel | File opens without repair warning | Not executed | 111| C2 | DOCX → Word | Export Writer to DOCX, open in Word | File opens without repair warning | Not executed | 112| C3 | XLSX with charts → Excel | Export Calc with charts to XLSX, open in Excel | **Expected: charts missing** | Not executed | 113 114### 2.4 Test Category D: Preservation of formulas, styles, objects, drawings, relationships 115 116| Test ID | Feature | Method | Expected Result | Status | 117|---------|---------|--------|-----------------|--------| 118| D1 | Formulas | Export Calc with SUM, IF, VLOOKUP → XLSX | Formulas preserved | Not executed | 119| D2 | Styles | Export Writer with character/paragraph styles → DOCX | Styles in `word/styles.xml` | Not executed | 120| D3 | Objects | Export Writer with images → DOCX | **Expected: partial** (FlyFrameGraphic TODO) | Not executed | 121| D4 | Drawings | Export Calc with drawing objects → XLSX | **Expected: absent** (DFF disabled) | Not executed | 122| D5 | Relationships | Inspect `_rels/` parts after XLSX/DOCX export | Relationships present and valid | Not executed | 123 124### 2.5 Test Category E: Negative tests for unsupported features and silent data loss 125 126| Test ID | Feature | Method | Expected Result | Status | 127|---------|---------|--------|-----------------|--------| 128| E1 | XLSX charts | Calc with chart → XLSX → inspect package | **No chart parts**; no silent corruption | Not executed | 129| E2 | XLSX images | Calc with image → XLSX → inspect package | **No media parts**; no silent corruption | Not executed | 130| E3 | DOCX OLE | Writer with OLE → DOCX → inspect package | **No OLE parts**; no silent corruption | Not executed | 131| E4 | DOCX ruby | Writer with ruby → DOCX → inspect package | **No w:ruby elements**; no silent corruption | Not executed | 132 133### 2.6 Test Category F: Independent OOXML package validation 134 135| Test ID | Description | Method | Expected Result | Status | 136|---------|-------------|--------|-----------------|--------| 137| F1 | Validate XLSX package structure | Export Calc → XLSX → validate with Open XML SDK validator or xmllint against ECMA-376 schemas | Package is well-formed; required parts present | Not executed | 138| F2 | Validate DOCX package structure | Export Writer → DOCX → validate with independent validator | Package is well-formed; required parts present | Not executed | 139| F3 | Validate content types | Inspect `[Content_Types].xml` after export | Correct content types for all parts | Not executed | 140| F4 | Validate relationships | Inspect `.rels` files after export | All relationship targets resolve | Not executed | 141 142--- 143 144## 3. Test Execution Method 145 146| Test Type | Execution Method | Tooling | 147|-----------|-----------------|---------| 148| Save As export | GUI or headless `soffice --convert-to` | AOO binary | 149| UNO filter invocation | UNO API script calling `XFilter::filter()` | AOO SDK + scripting | 150| Package inspection | Unzip + xmllint / XML parser | Standard tools | 151| OOXML validation | Open XML SDK validator, xmllint, or schema validation | External tools | 152| Round-trip | Export → reopen in AOO → compare | AOO binary | 153 154--- 155 156## 4. Limitations 157 158- No existing tests were executed for this audit (all marked "Not executed"). 159- No export test infrastructure exists in the repository. 160- Microsoft Office compatibility testing (Category C) requires Microsoft Office installation, which may not be available. 161- Independent OOXML validation (Category F) requires external validator tools. 162