uniword 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -0
- data/README.adoc +71 -2142
- data/config/accessibility_profiles.yml +145 -0
- data/config/font_metadata.yml +213 -0
- data/config/latent_styles.yml +962 -0
- data/config/link_validation_rules.yml +62 -0
- data/config/locale_profiles.yml +226 -0
- data/config/metadata_schema.yml +294 -0
- data/config/ooxml/schema_loader.yml +98 -0
- data/config/ooxml/schema_main.yml +524 -0
- data/config/ooxml/schemas/01_document_structure.yml +44 -0
- data/config/ooxml/schemas/02_paragraph.yml +282 -0
- data/config/ooxml/schemas/03_run.yml +276 -0
- data/config/ooxml/schemas/04_table.yml +184 -0
- data/config/ooxml/schemas/05_headers_footers.yml +82 -0
- data/config/ooxml/schemas/06_fields.yml +81 -0
- data/config/ooxml/schemas/07_footnotes.yml +92 -0
- data/config/ooxml/schemas/08_styles.yml +265 -0
- data/config/ooxml/schemas/09_numbering.yml +247 -0
- data/config/ooxml/schemas/10_sections.yml +250 -0
- data/config/ooxml/schemas/11_drawing.yml +381 -0
- data/config/ooxml/schemas/12_math.yml +349 -0
- data/config/ooxml/schemas/13_charts.yml +920 -0
- data/config/ooxml/schemas/bibliography.yml +351 -0
- data/config/ooxml/schemas/chart.yml +1472 -0
- data/config/ooxml/schemas/content_types.yml +93 -0
- data/config/ooxml/schemas/customxml.yml +493 -0
- data/config/ooxml/schemas/document_properties.yml +275 -0
- data/config/ooxml/schemas/document_variables.yml +135 -0
- data/config/ooxml/schemas/drawingml.yml +1368 -0
- data/config/ooxml/schemas/glossary.yml +235 -0
- data/config/ooxml/schemas/math.yml +1266 -0
- data/config/ooxml/schemas/office.yml +648 -0
- data/config/ooxml/schemas/picture.yml +213 -0
- data/config/ooxml/schemas/presentationml.yml +1003 -0
- data/config/ooxml/schemas/relationships.yml +91 -0
- data/config/ooxml/schemas/shared_types.yml +174 -0
- data/config/ooxml/schemas/spreadsheetml.yml +1534 -0
- data/config/ooxml/schemas/vml.yml +426 -0
- data/config/ooxml/schemas/vml_office.yml +415 -0
- data/config/ooxml/schemas/wordprocessingml.yml +1881 -0
- data/config/ooxml/schemas/wordprocessingml_2010.yml +428 -0
- data/config/ooxml/schemas/wordprocessingml_2013.yml +286 -0
- data/config/ooxml/schemas/wordprocessingml_2016.yml +205 -0
- data/config/ooxml/schemas/wp_drawing.yml +528 -0
- data/config/pipeline.yml +108 -0
- data/config/profiles.yml +49 -0
- data/config/quality_rules.yml +49 -0
- data/config/style_mappings/iso_publication.yml +30 -0
- data/config/styles/iso_standard.yml +229 -0
- data/config/styles/legal_document.yml +198 -0
- data/config/styles/minimal.yml +90 -0
- data/config/styles/technical_report.yml +233 -0
- data/config/system_profiles.yml +87 -0
- data/config/theme_mapping.yml +447 -0
- data/config/transformation_rules.yml +160 -0
- data/config/validation_rules.yml +60 -0
- data/config/warning_rules.yml +57 -0
- data/data/color_schemes/amber.yml +17 -0
- data/data/color_schemes/azure.yml +17 -0
- data/data/color_schemes/burgundy.yml +17 -0
- data/data/color_schemes/cerulean.yml +17 -0
- data/data/color_schemes/chartreuse.yml +17 -0
- data/data/color_schemes/classic.yml +17 -0
- data/data/color_schemes/cobalt.yml +17 -0
- data/data/color_schemes/coral.yml +17 -0
- data/data/color_schemes/crimson.yml +17 -0
- data/data/color_schemes/emerald.yml +17 -0
- data/data/color_schemes/horizon.yml +17 -0
- data/data/color_schemes/indigo.yml +17 -0
- data/data/color_schemes/lavender.yml +17 -0
- data/data/color_schemes/magenta.yml +17 -0
- data/data/color_schemes/modern.yml +17 -0
- data/data/color_schemes/monochrome.yml +17 -0
- data/data/color_schemes/parchment.yml +17 -0
- data/data/color_schemes/saffron.yml +17 -0
- data/data/color_schemes/sage.yml +17 -0
- data/data/color_schemes/scarlet.yml +17 -0
- data/data/color_schemes/solar.yml +17 -0
- data/data/color_schemes/teal.yml +17 -0
- data/data/color_schemes/terrain.yml +17 -0
- data/data/font_schemes/caladea.yml +45 -0
- data/data/font_schemes/carlito_caladea.yml +45 -0
- data/data/font_schemes/carlito_liberation.yml +45 -0
- data/data/font_schemes/carlito_sans.yml +45 -0
- data/data/font_schemes/classic_office.yml +45 -0
- data/data/font_schemes/eb_garamond.yml +45 -0
- data/data/font_schemes/eb_garamond_liberation.yml +45 -0
- data/data/font_schemes/gelasio.yml +45 -0
- data/data/font_schemes/league_gothic.yml +45 -0
- data/data/font_schemes/league_liberation.yml +45 -0
- data/data/font_schemes/liberation_bold_sans.yml +45 -0
- data/data/font_schemes/liberation_libre.yml +45 -0
- data/data/font_schemes/liberation_mono_sans.yml +45 -0
- data/data/font_schemes/liberation_pair.yml +45 -0
- data/data/font_schemes/liberation_reverse.yml +45 -0
- data/data/font_schemes/liberation_sans.yml +45 -0
- data/data/font_schemes/liberation_sans_trebuchet.yml +45 -0
- data/data/font_schemes/libre_bodoni.yml +45 -0
- data/data/font_schemes/libre_franklin.yml +45 -0
- data/data/font_schemes/modern_office.yml +45 -0
- data/data/font_schemes/ms_office_2007.yml +72 -0
- data/data/font_schemes/ms_office_2013.yml +106 -0
- data/data/font_schemes/ms_office_2024.yml +106 -0
- data/data/font_schemes/source_alfa_slab.yml +45 -0
- data/data/font_schemes/source_display.yml +45 -0
- data/data/font_schemes/source_modern.yml +45 -0
- data/data/font_schemes/source_sans.yml +45 -0
- data/data/font_schemes/source_sans_century.yml +45 -0
- data/data/resources/document_elements/ar/bibliographies.yml +13 -0
- data/data/resources/document_elements/ar/cover_pages.yml +26 -0
- data/data/resources/document_elements/ar/equations.yml +21 -0
- data/data/resources/document_elements/ar/footers.yml +31 -0
- data/data/resources/document_elements/ar/headers.yml +32 -0
- data/data/resources/document_elements/ar/table_of_contents.yml +21 -0
- data/data/resources/document_elements/ar/tables.yml +19 -0
- data/data/resources/document_elements/ar/watermarks.yml +25 -0
- data/data/resources/document_elements/cs/bibliographies.yml +13 -0
- data/data/resources/document_elements/cs/cover_pages.yml +26 -0
- data/data/resources/document_elements/cs/equations.yml +21 -0
- data/data/resources/document_elements/cs/footers.yml +31 -0
- data/data/resources/document_elements/cs/headers.yml +32 -0
- data/data/resources/document_elements/cs/table_of_contents.yml +21 -0
- data/data/resources/document_elements/cs/tables.yml +19 -0
- data/data/resources/document_elements/cs/watermarks.yml +25 -0
- data/data/resources/document_elements/da/bibliographies.yml +13 -0
- data/data/resources/document_elements/da/cover_pages.yml +26 -0
- data/data/resources/document_elements/da/equations.yml +21 -0
- data/data/resources/document_elements/da/footers.yml +31 -0
- data/data/resources/document_elements/da/headers.yml +32 -0
- data/data/resources/document_elements/da/table_of_contents.yml +21 -0
- data/data/resources/document_elements/da/tables.yml +19 -0
- data/data/resources/document_elements/da/watermarks.yml +25 -0
- data/data/resources/document_elements/de/bibliographies.yml +13 -0
- data/data/resources/document_elements/de/cover_pages.yml +26 -0
- data/data/resources/document_elements/de/equations.yml +21 -0
- data/data/resources/document_elements/de/footers.yml +31 -0
- data/data/resources/document_elements/de/headers.yml +32 -0
- data/data/resources/document_elements/de/table_of_contents.yml +21 -0
- data/data/resources/document_elements/de/tables.yml +19 -0
- data/data/resources/document_elements/de/watermarks.yml +25 -0
- data/data/resources/document_elements/el/bibliographies.yml +13 -0
- data/data/resources/document_elements/el/cover_pages.yml +26 -0
- data/data/resources/document_elements/el/equations.yml +21 -0
- data/data/resources/document_elements/el/footers.yml +31 -0
- data/data/resources/document_elements/el/headers.yml +32 -0
- data/data/resources/document_elements/el/table_of_contents.yml +21 -0
- data/data/resources/document_elements/el/tables.yml +19 -0
- data/data/resources/document_elements/el/watermarks.yml +25 -0
- data/data/resources/document_elements/en/bibliographies.yml +13 -0
- data/data/resources/document_elements/en/cover_pages.yml +26 -0
- data/data/resources/document_elements/en/equations.yml +21 -0
- data/data/resources/document_elements/en/footers.yml +31 -0
- data/data/resources/document_elements/en/headers.yml +32 -0
- data/data/resources/document_elements/en/table_of_contents.yml +21 -0
- data/data/resources/document_elements/en/tables.yml +19 -0
- data/data/resources/document_elements/en/watermarks.yml +25 -0
- data/data/resources/document_elements/en-GB/bibliographies.yml +13 -0
- data/data/resources/document_elements/en-GB/cover_pages.yml +26 -0
- data/data/resources/document_elements/en-GB/equations.yml +21 -0
- data/data/resources/document_elements/en-GB/footers.yml +31 -0
- data/data/resources/document_elements/en-GB/headers.yml +32 -0
- data/data/resources/document_elements/en-GB/table_of_contents.yml +21 -0
- data/data/resources/document_elements/en-GB/tables.yml +19 -0
- data/data/resources/document_elements/en-GB/watermarks.yml +25 -0
- data/data/resources/document_elements/es/bibliographies.yml +13 -0
- data/data/resources/document_elements/es/cover_pages.yml +26 -0
- data/data/resources/document_elements/es/equations.yml +21 -0
- data/data/resources/document_elements/es/footers.yml +31 -0
- data/data/resources/document_elements/es/headers.yml +32 -0
- data/data/resources/document_elements/es/table_of_contents.yml +21 -0
- data/data/resources/document_elements/es/tables.yml +19 -0
- data/data/resources/document_elements/es/watermarks.yml +25 -0
- data/data/resources/document_elements/es-MX/bibliographies.yml +13 -0
- data/data/resources/document_elements/es-MX/cover_pages.yml +26 -0
- data/data/resources/document_elements/es-MX/equations.yml +21 -0
- data/data/resources/document_elements/es-MX/footers.yml +31 -0
- data/data/resources/document_elements/es-MX/headers.yml +32 -0
- data/data/resources/document_elements/es-MX/table_of_contents.yml +21 -0
- data/data/resources/document_elements/es-MX/tables.yml +19 -0
- data/data/resources/document_elements/es-MX/watermarks.yml +25 -0
- data/data/resources/document_elements/fi/bibliographies.yml +13 -0
- data/data/resources/document_elements/fi/cover_pages.yml +26 -0
- data/data/resources/document_elements/fi/equations.yml +21 -0
- data/data/resources/document_elements/fi/footers.yml +31 -0
- data/data/resources/document_elements/fi/headers.yml +32 -0
- data/data/resources/document_elements/fi/table_of_contents.yml +21 -0
- data/data/resources/document_elements/fi/tables.yml +19 -0
- data/data/resources/document_elements/fi/watermarks.yml +25 -0
- data/data/resources/document_elements/fr/bibliographies.yml +13 -0
- data/data/resources/document_elements/fr/cover_pages.yml +26 -0
- data/data/resources/document_elements/fr/equations.yml +21 -0
- data/data/resources/document_elements/fr/footers.yml +31 -0
- data/data/resources/document_elements/fr/headers.yml +32 -0
- data/data/resources/document_elements/fr/table_of_contents.yml +21 -0
- data/data/resources/document_elements/fr/tables.yml +19 -0
- data/data/resources/document_elements/fr/watermarks.yml +25 -0
- data/data/resources/document_elements/fr-CA/bibliographies.yml +13 -0
- data/data/resources/document_elements/fr-CA/cover_pages.yml +26 -0
- data/data/resources/document_elements/fr-CA/equations.yml +21 -0
- data/data/resources/document_elements/fr-CA/footers.yml +31 -0
- data/data/resources/document_elements/fr-CA/headers.yml +32 -0
- data/data/resources/document_elements/fr-CA/table_of_contents.yml +21 -0
- data/data/resources/document_elements/fr-CA/tables.yml +19 -0
- data/data/resources/document_elements/fr-CA/watermarks.yml +25 -0
- data/data/resources/document_elements/he/bibliographies.yml +13 -0
- data/data/resources/document_elements/he/cover_pages.yml +26 -0
- data/data/resources/document_elements/he/equations.yml +21 -0
- data/data/resources/document_elements/he/footers.yml +31 -0
- data/data/resources/document_elements/he/headers.yml +32 -0
- data/data/resources/document_elements/he/table_of_contents.yml +21 -0
- data/data/resources/document_elements/he/tables.yml +19 -0
- data/data/resources/document_elements/he/watermarks.yml +25 -0
- data/data/resources/document_elements/hu/bibliographies.yml +13 -0
- data/data/resources/document_elements/hu/cover_pages.yml +26 -0
- data/data/resources/document_elements/hu/equations.yml +21 -0
- data/data/resources/document_elements/hu/footers.yml +31 -0
- data/data/resources/document_elements/hu/headers.yml +32 -0
- data/data/resources/document_elements/hu/table_of_contents.yml +21 -0
- data/data/resources/document_elements/hu/tables.yml +19 -0
- data/data/resources/document_elements/hu/watermarks.yml +25 -0
- data/data/resources/document_elements/id/bibliographies.yml +13 -0
- data/data/resources/document_elements/id/cover_pages.yml +26 -0
- data/data/resources/document_elements/id/equations.yml +21 -0
- data/data/resources/document_elements/id/footers.yml +31 -0
- data/data/resources/document_elements/id/headers.yml +32 -0
- data/data/resources/document_elements/id/table_of_contents.yml +21 -0
- data/data/resources/document_elements/id/tables.yml +19 -0
- data/data/resources/document_elements/id/watermarks.yml +25 -0
- data/data/resources/document_elements/it/bibliographies.yml +13 -0
- data/data/resources/document_elements/it/cover_pages.yml +26 -0
- data/data/resources/document_elements/it/equations.yml +21 -0
- data/data/resources/document_elements/it/footers.yml +31 -0
- data/data/resources/document_elements/it/headers.yml +32 -0
- data/data/resources/document_elements/it/table_of_contents.yml +21 -0
- data/data/resources/document_elements/it/tables.yml +19 -0
- data/data/resources/document_elements/it/watermarks.yml +25 -0
- data/data/resources/document_elements/ja/bibliographies.yml +13 -0
- data/data/resources/document_elements/ja/cover_pages.yml +26 -0
- data/data/resources/document_elements/ja/equations.yml +21 -0
- data/data/resources/document_elements/ja/footers.yml +31 -0
- data/data/resources/document_elements/ja/headers.yml +32 -0
- data/data/resources/document_elements/ja/table_of_contents.yml +21 -0
- data/data/resources/document_elements/ja/tables.yml +19 -0
- data/data/resources/document_elements/ja/watermarks.yml +25 -0
- data/data/resources/document_elements/ko/bibliographies.yml +13 -0
- data/data/resources/document_elements/ko/cover_pages.yml +26 -0
- data/data/resources/document_elements/ko/equations.yml +21 -0
- data/data/resources/document_elements/ko/footers.yml +31 -0
- data/data/resources/document_elements/ko/headers.yml +32 -0
- data/data/resources/document_elements/ko/table_of_contents.yml +21 -0
- data/data/resources/document_elements/ko/tables.yml +19 -0
- data/data/resources/document_elements/ko/watermarks.yml +25 -0
- data/data/resources/document_elements/nl/bibliographies.yml +13 -0
- data/data/resources/document_elements/nl/cover_pages.yml +26 -0
- data/data/resources/document_elements/nl/equations.yml +21 -0
- data/data/resources/document_elements/nl/footers.yml +31 -0
- data/data/resources/document_elements/nl/headers.yml +32 -0
- data/data/resources/document_elements/nl/table_of_contents.yml +21 -0
- data/data/resources/document_elements/nl/tables.yml +19 -0
- data/data/resources/document_elements/nl/watermarks.yml +25 -0
- data/data/resources/document_elements/no/bibliographies.yml +13 -0
- data/data/resources/document_elements/no/cover_pages.yml +26 -0
- data/data/resources/document_elements/no/equations.yml +21 -0
- data/data/resources/document_elements/no/footers.yml +31 -0
- data/data/resources/document_elements/no/headers.yml +32 -0
- data/data/resources/document_elements/no/table_of_contents.yml +21 -0
- data/data/resources/document_elements/no/tables.yml +19 -0
- data/data/resources/document_elements/no/watermarks.yml +25 -0
- data/data/resources/document_elements/pl/bibliographies.yml +13 -0
- data/data/resources/document_elements/pl/cover_pages.yml +26 -0
- data/data/resources/document_elements/pl/equations.yml +21 -0
- data/data/resources/document_elements/pl/footers.yml +31 -0
- data/data/resources/document_elements/pl/headers.yml +32 -0
- data/data/resources/document_elements/pl/table_of_contents.yml +21 -0
- data/data/resources/document_elements/pl/tables.yml +19 -0
- data/data/resources/document_elements/pl/watermarks.yml +25 -0
- data/data/resources/document_elements/pt/bibliographies.yml +13 -0
- data/data/resources/document_elements/pt/cover_pages.yml +26 -0
- data/data/resources/document_elements/pt/equations.yml +21 -0
- data/data/resources/document_elements/pt/footers.yml +31 -0
- data/data/resources/document_elements/pt/headers.yml +32 -0
- data/data/resources/document_elements/pt/table_of_contents.yml +21 -0
- data/data/resources/document_elements/pt/tables.yml +19 -0
- data/data/resources/document_elements/pt/watermarks.yml +25 -0
- data/data/resources/document_elements/pt-PT/bibliographies.yml +13 -0
- data/data/resources/document_elements/pt-PT/cover_pages.yml +26 -0
- data/data/resources/document_elements/pt-PT/equations.yml +21 -0
- data/data/resources/document_elements/pt-PT/footers.yml +31 -0
- data/data/resources/document_elements/pt-PT/headers.yml +32 -0
- data/data/resources/document_elements/pt-PT/table_of_contents.yml +21 -0
- data/data/resources/document_elements/pt-PT/tables.yml +19 -0
- data/data/resources/document_elements/pt-PT/watermarks.yml +25 -0
- data/data/resources/document_elements/ru/bibliographies.yml +13 -0
- data/data/resources/document_elements/ru/cover_pages.yml +26 -0
- data/data/resources/document_elements/ru/equations.yml +21 -0
- data/data/resources/document_elements/ru/footers.yml +31 -0
- data/data/resources/document_elements/ru/headers.yml +32 -0
- data/data/resources/document_elements/ru/table_of_contents.yml +21 -0
- data/data/resources/document_elements/ru/tables.yml +19 -0
- data/data/resources/document_elements/ru/watermarks.yml +25 -0
- data/data/resources/document_elements/sk/bibliographies.yml +13 -0
- data/data/resources/document_elements/sk/cover_pages.yml +26 -0
- data/data/resources/document_elements/sk/equations.yml +21 -0
- data/data/resources/document_elements/sk/footers.yml +31 -0
- data/data/resources/document_elements/sk/headers.yml +32 -0
- data/data/resources/document_elements/sk/table_of_contents.yml +21 -0
- data/data/resources/document_elements/sk/tables.yml +19 -0
- data/data/resources/document_elements/sk/watermarks.yml +25 -0
- data/data/resources/document_elements/sv/bibliographies.yml +13 -0
- data/data/resources/document_elements/sv/cover_pages.yml +26 -0
- data/data/resources/document_elements/sv/equations.yml +21 -0
- data/data/resources/document_elements/sv/footers.yml +31 -0
- data/data/resources/document_elements/sv/headers.yml +32 -0
- data/data/resources/document_elements/sv/table_of_contents.yml +21 -0
- data/data/resources/document_elements/sv/tables.yml +19 -0
- data/data/resources/document_elements/sv/watermarks.yml +25 -0
- data/data/resources/document_elements/th/bibliographies.yml +13 -0
- data/data/resources/document_elements/th/cover_pages.yml +26 -0
- data/data/resources/document_elements/th/equations.yml +21 -0
- data/data/resources/document_elements/th/footers.yml +31 -0
- data/data/resources/document_elements/th/headers.yml +32 -0
- data/data/resources/document_elements/th/table_of_contents.yml +21 -0
- data/data/resources/document_elements/th/tables.yml +19 -0
- data/data/resources/document_elements/th/watermarks.yml +25 -0
- data/data/resources/document_elements/tr/bibliographies.yml +13 -0
- data/data/resources/document_elements/tr/cover_pages.yml +26 -0
- data/data/resources/document_elements/tr/equations.yml +21 -0
- data/data/resources/document_elements/tr/footers.yml +31 -0
- data/data/resources/document_elements/tr/headers.yml +32 -0
- data/data/resources/document_elements/tr/table_of_contents.yml +21 -0
- data/data/resources/document_elements/tr/tables.yml +19 -0
- data/data/resources/document_elements/tr/watermarks.yml +25 -0
- data/data/resources/document_elements/zh-CN/bibliographies.yml +13 -0
- data/data/resources/document_elements/zh-CN/cover_pages.yml +26 -0
- data/data/resources/document_elements/zh-CN/equations.yml +21 -0
- data/data/resources/document_elements/zh-CN/footers.yml +31 -0
- data/data/resources/document_elements/zh-CN/headers.yml +32 -0
- data/data/resources/document_elements/zh-CN/table_of_contents.yml +21 -0
- data/data/resources/document_elements/zh-CN/tables.yml +19 -0
- data/data/resources/document_elements/zh-CN/watermarks.yml +25 -0
- data/data/resources/document_elements/zh-TW/bibliographies.yml +13 -0
- data/data/resources/document_elements/zh-TW/cover_pages.yml +26 -0
- data/data/resources/document_elements/zh-TW/equations.yml +21 -0
- data/data/resources/document_elements/zh-TW/footers.yml +31 -0
- data/data/resources/document_elements/zh-TW/headers.yml +32 -0
- data/data/resources/document_elements/zh-TW/table_of_contents.yml +21 -0
- data/data/resources/document_elements/zh-TW/tables.yml +19 -0
- data/data/resources/document_elements/zh-TW/watermarks.yml +25 -0
- data/data/resources/font_registry.yml +135 -0
- data/data/schemas/ecma/opc-contentTypes.xsd +42 -0
- data/data/schemas/ecma/opc-coreProperties.xsd +50 -0
- data/data/schemas/ecma/opc-digSig.xsd +49 -0
- data/data/schemas/ecma/opc-relationships.xsd +33 -0
- data/data/schemas/iso/dml-chart.xsd +1499 -0
- data/data/schemas/iso/dml-chartDrawing.xsd +146 -0
- data/data/schemas/iso/dml-diagram.xsd +1085 -0
- data/data/schemas/iso/dml-lockedCanvas.xsd +11 -0
- data/data/schemas/iso/dml-main.xsd +3081 -0
- data/data/schemas/iso/dml-picture.xsd +23 -0
- data/data/schemas/iso/dml-spreadsheetDrawing.xsd +185 -0
- data/data/schemas/iso/dml-wordprocessingDrawing.xsd +287 -0
- data/data/schemas/iso/pml.xsd +1676 -0
- data/data/schemas/iso/shared-additionalCharacteristics.xsd +28 -0
- data/data/schemas/iso/shared-bibliography.xsd +144 -0
- data/data/schemas/iso/shared-commonSimpleTypes.xsd +172 -0
- data/data/schemas/iso/shared-customXmlDataProperties.xsd +25 -0
- data/data/schemas/iso/shared-customXmlSchemaProperties.xsd +18 -0
- data/data/schemas/iso/shared-documentPropertiesCustom.xsd +59 -0
- data/data/schemas/iso/shared-documentPropertiesExtended.xsd +56 -0
- data/data/schemas/iso/shared-documentPropertiesVariantTypes.xsd +195 -0
- data/data/schemas/iso/shared-math.xsd +582 -0
- data/data/schemas/iso/shared-relationshipReference.xsd +25 -0
- data/data/schemas/iso/sml.xsd +4439 -0
- data/data/schemas/iso/vml-main.xsd +570 -0
- data/data/schemas/iso/vml-officeDrawing.xsd +509 -0
- data/data/schemas/iso/vml-presentationDrawing.xsd +12 -0
- data/data/schemas/iso/vml-spreadsheetDrawing.xsd +108 -0
- data/data/schemas/iso/vml-wordprocessingDrawing.xsd +96 -0
- data/data/schemas/iso/wml.xsd +3646 -0
- data/data/schemas/iso/xml.xsd +116 -0
- data/data/schemas/mce/mc.xsd +75 -0
- data/data/schemas/microsoft/wml-2010.xsd +560 -0
- data/data/schemas/microsoft/wml-2012.xsd +66 -0
- data/data/schemas/microsoft/wml-2018.xsd +14 -0
- data/data/schemas/microsoft/wml-cex-2018.xsd +19 -0
- data/data/schemas/microsoft/wml-cid-2016.xsd +13 -0
- data/data/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- data/data/schemas/microsoft/wml-symex-2015.xsd +8 -0
- data/data/schemas/microsoft/word12.xsd +3 -0
- data/data/stylesets/ceremonial.yml +929 -0
- data/data/stylesets/classic.yml +1051 -0
- data/data/stylesets/contemporary.yml +951 -0
- data/data/stylesets/gazette.yml +1452 -0
- data/data/stylesets/heritage.yml +898 -0
- data/data/stylesets/minimal.yml +855 -0
- data/data/stylesets/ornate.yml +920 -0
- data/data/stylesets/outlook.yml +1428 -0
- data/data/stylesets/refined.yml +956 -0
- data/data/stylesets/scrollwork.yml +891 -0
- data/data/stylesets/signature.yml +903 -0
- data/data/stylesets/wicker.yml +1285 -0
- data/data/themes/abyss.yml +197 -0
- data/data/themes/archive.yml +197 -0
- data/data/themes/boardwalk.yml +197 -0
- data/data/themes/botanical.yml +197 -0
- data/data/themes/bulletin.yml +197 -0
- data/data/themes/calculus.yml +389 -0
- data/data/themes/constellation.yml +197 -0
- data/data/themes/contrail.yml +197 -0
- data/data/themes/corporate.yml +197 -0
- data/data/themes/emblem.yml +197 -0
- data/data/themes/exhibit.yml +197 -0
- data/data/themes/harvest.yml +197 -0
- data/data/themes/incision.yml +197 -0
- data/data/themes/lather.yml +197 -0
- data/data/themes/letterpress.yml +197 -0
- data/data/themes/memoir.yml +389 -0
- data/data/themes/meridian.yml +197 -0
- data/data/themes/mosaic.yml +197 -0
- data/data/themes/parkway.yml +197 -0
- data/data/themes/plasma.yml +197 -0
- data/data/themes/plumage.yml +197 -0
- data/data/themes/prism.yml +197 -0
- data/data/themes/ripple.yml +197 -0
- data/data/themes/spectrum.yml +197 -0
- data/data/themes/spotlight.yml +197 -0
- data/data/themes/vista.yml +197 -0
- data/data/themes/weave.yml +197 -0
- data/data/themes/workspace.yml +197 -0
- data/data/themes/zephyr.yml +197 -0
- data/exe/uniword +2 -2
- data/lib/uniword/accessibility/accessibility_checker.rb +4 -4
- data/lib/uniword/accessibility/accessibility_profile.rb +20 -11
- data/lib/uniword/accessibility/accessibility_report.rb +9 -9
- data/lib/uniword/accessibility/accessibility_rule.rb +7 -7
- data/lib/uniword/accessibility/accessibility_violation.rb +1 -1
- data/lib/uniword/accessibility/rules/descriptive_headings_rule.rb +5 -5
- data/lib/uniword/accessibility/rules/document_title_rule.rb +3 -3
- data/lib/uniword/accessibility/rules/heading_structure_rule.rb +6 -6
- data/lib/uniword/accessibility/rules/image_alt_text_rule.rb +7 -5
- data/lib/uniword/accessibility/rules/language_specification_rule.rb +2 -2
- data/lib/uniword/accessibility/rules/table_headers_rule.rb +2 -2
- data/lib/uniword/accessibility/rules.rb +4 -2
- data/lib/uniword/accessibility.rb +8 -4
- data/lib/uniword/assembly/assembly_manifest.rb +27 -18
- data/lib/uniword/assembly/component_registry.rb +10 -10
- data/lib/uniword/assembly/cross_reference_resolver.rb +1 -1
- data/lib/uniword/assembly/document_assembler.rb +19 -19
- data/lib/uniword/assembly/toc.rb +4 -4
- data/lib/uniword/assembly/toc_entry.rb +2 -1
- data/lib/uniword/assembly/toc_instruction.rb +3 -3
- data/lib/uniword/assembly/variable_substitutor.rb +2 -2
- data/lib/uniword/assembly.rb +2 -1
- data/lib/uniword/batch/batch_result.rb +20 -20
- data/lib/uniword/batch/document_processor.rb +32 -28
- data/lib/uniword/batch/processing_stage.rb +6 -6
- data/lib/uniword/batch/stages/compress_images_stage.rb +2 -2
- data/lib/uniword/batch/stages/convert_format_stage.rb +7 -7
- data/lib/uniword/batch/stages/normalize_styles_stage.rb +14 -14
- data/lib/uniword/batch/stages/quality_check_stage.rb +13 -9
- data/lib/uniword/batch/stages/update_metadata_stage.rb +7 -11
- data/lib/uniword/batch/stages/validate_links_stage.rb +9 -9
- data/lib/uniword/batch.rb +6 -3
- data/lib/uniword/bibliography/author.rb +21 -21
- data/lib/uniword/bibliography/city.rb +3 -3
- data/lib/uniword/bibliography/corporate.rb +3 -3
- data/lib/uniword/bibliography/day.rb +3 -3
- data/lib/uniword/bibliography/edition.rb +3 -3
- data/lib/uniword/bibliography/first.rb +3 -3
- data/lib/uniword/bibliography/first_name.rb +3 -3
- data/lib/uniword/bibliography/guid.rb +3 -3
- data/lib/uniword/bibliography/issue.rb +3 -3
- data/lib/uniword/bibliography/last.rb +3 -3
- data/lib/uniword/bibliography/last_name.rb +3 -3
- data/lib/uniword/bibliography/lcid.rb +3 -3
- data/lib/uniword/bibliography/locale_id.rb +3 -3
- data/lib/uniword/bibliography/month.rb +3 -3
- data/lib/uniword/bibliography/name_list.rb +3 -3
- data/lib/uniword/bibliography/pages.rb +3 -3
- data/lib/uniword/bibliography/person.rb +5 -5
- data/lib/uniword/bibliography/publisher.rb +3 -3
- data/lib/uniword/bibliography/ref_order.rb +3 -3
- data/lib/uniword/bibliography/source.rb +59 -55
- data/lib/uniword/bibliography/source_tag.rb +3 -3
- data/lib/uniword/bibliography/source_type.rb +3 -3
- data/lib/uniword/bibliography/sources.rb +6 -6
- data/lib/uniword/bibliography/tag.rb +3 -3
- data/lib/uniword/bibliography/title.rb +3 -3
- data/lib/uniword/bibliography/url.rb +3 -3
- data/lib/uniword/bibliography/volume_number.rb +3 -3
- data/lib/uniword/bibliography/year.rb +3 -3
- data/lib/uniword/bibliography.rb +30 -30
- data/lib/uniword/bookmark.rb +2 -2
- data/lib/uniword/builder/base_builder.rb +44 -0
- data/lib/uniword/builder/bibliography_builder.rb +7 -7
- data/lib/uniword/builder/chart_builder.rb +100 -159
- data/lib/uniword/builder/comment_builder.rb +1 -1
- data/lib/uniword/builder/document_builder.rb +18 -59
- data/lib/uniword/builder/footnote_builder.rb +2 -2
- data/lib/uniword/builder/has_borders.rb +26 -0
- data/lib/uniword/builder/has_shading.rb +19 -0
- data/lib/uniword/builder/header_footer_builder.rb +2 -2
- data/lib/uniword/builder/image_builder.rb +41 -36
- data/lib/uniword/builder/list_builder.rb +5 -4
- data/lib/uniword/builder/numbering_builder.rb +4 -16
- data/lib/uniword/builder/paragraph_builder.rb +16 -89
- data/lib/uniword/builder/run_builder.rb +31 -158
- data/lib/uniword/builder/sdt_builder.rb +19 -37
- data/lib/uniword/builder/section_builder.rb +11 -39
- data/lib/uniword/builder/style_builder.rb +3 -3
- data/lib/uniword/builder/table_builder.rb +11 -51
- data/lib/uniword/builder/table_cell_builder.rb +14 -58
- data/lib/uniword/builder/table_row_builder.rb +4 -16
- data/lib/uniword/builder/toc_builder.rb +4 -4
- data/lib/uniword/builder/watermark_builder.rb +17 -17
- data/lib/uniword/builder.rb +37 -36
- data/lib/uniword/chart/area3_d_chart.rb +9 -9
- data/lib/uniword/chart/area_chart.rb +8 -8
- data/lib/uniword/chart/auto_title_deleted.rb +3 -3
- data/lib/uniword/chart/axis_id.rb +3 -3
- data/lib/uniword/chart/axis_position.rb +3 -3
- data/lib/uniword/chart/bar3_d_chart.rb +11 -11
- data/lib/uniword/chart/bar_chart.rb +10 -10
- data/lib/uniword/chart/bubble_chart.rb +10 -10
- data/lib/uniword/chart/bubble_size.rb +4 -4
- data/lib/uniword/chart/cat_ax.rb +14 -14
- data/lib/uniword/chart/category_axis_data.rb +6 -6
- data/lib/uniword/chart/chart.rb +9 -8
- data/lib/uniword/chart/chart_reference.rb +3 -3
- data/lib/uniword/chart/chart_space.rb +9 -9
- data/lib/uniword/chart/color_map_override.rb +3 -3
- data/lib/uniword/chart/data_label.rb +9 -9
- data/lib/uniword/chart/data_labels.rb +12 -12
- data/lib/uniword/chart/date_ax.rb +14 -14
- data/lib/uniword/chart/diagram_reference.rb +3 -3
- data/lib/uniword/chart/doughnut_chart.rb +7 -7
- data/lib/uniword/chart/drop_lines.rb +3 -3
- data/lib/uniword/chart/error_bar_type.rb +3 -3
- data/lib/uniword/chart/error_bars.rb +10 -10
- data/lib/uniword/chart/error_direction.rb +3 -3
- data/lib/uniword/chart/explosion.rb +3 -3
- data/lib/uniword/chart/gap_width.rb +3 -3
- data/lib/uniword/chart/hi_low_lines.rb +3 -3
- data/lib/uniword/chart/index.rb +3 -3
- data/lib/uniword/chart/layout.rb +3 -3
- data/lib/uniword/chart/legend.rb +10 -9
- data/lib/uniword/chart/legend_entry.rb +5 -5
- data/lib/uniword/chart/legend_position.rb +3 -3
- data/lib/uniword/chart/line3_d_chart.rb +9 -9
- data/lib/uniword/chart/line_chart.rb +12 -12
- data/lib/uniword/chart/major_gridlines.rb +3 -3
- data/lib/uniword/chart/marker.rb +5 -5
- data/lib/uniword/chart/marker_size.rb +3 -3
- data/lib/uniword/chart/marker_style.rb +3 -3
- data/lib/uniword/chart/minor_gridlines.rb +3 -3
- data/lib/uniword/chart/number_reference.rb +4 -4
- data/lib/uniword/chart/numbering_format.rb +4 -4
- data/lib/uniword/chart/order.rb +3 -3
- data/lib/uniword/chart/orientation.rb +3 -3
- data/lib/uniword/chart/pie3_d_chart.rb +5 -5
- data/lib/uniword/chart/pie_chart.rb +6 -6
- data/lib/uniword/chart/plot_area.rb +9 -9
- data/lib/uniword/chart/plot_vis_only.rb +3 -3
- data/lib/uniword/chart/radar_chart.rb +7 -7
- data/lib/uniword/chart/scaling.rb +6 -6
- data/lib/uniword/chart/scatter_chart.rb +7 -7
- data/lib/uniword/chart/ser_ax.rb +13 -13
- data/lib/uniword/chart/series.rb +6 -6
- data/lib/uniword/chart/series_text.rb +4 -4
- data/lib/uniword/chart/shape_properties.rb +3 -3
- data/lib/uniword/chart/show_category_name.rb +3 -3
- data/lib/uniword/chart/show_legend_key.rb +3 -3
- data/lib/uniword/chart/show_value.rb +3 -3
- data/lib/uniword/chart/smooth.rb +3 -3
- data/lib/uniword/chart/stock_chart.rb +8 -8
- data/lib/uniword/chart/style.rb +3 -3
- data/lib/uniword/chart/surface3_d_chart.rb +6 -6
- data/lib/uniword/chart/surface_chart.rb +6 -6
- data/lib/uniword/chart/text_properties.rb +3 -3
- data/lib/uniword/chart/tick_label_position.rb +3 -3
- data/lib/uniword/chart/title.rb +7 -7
- data/lib/uniword/chart/trendline.rb +9 -9
- data/lib/uniword/chart/trendline_type.rb +3 -3
- data/lib/uniword/chart/up_down_bars.rb +5 -5
- data/lib/uniword/chart/val_ax.rb +16 -16
- data/lib/uniword/chart/values.rb +4 -4
- data/lib/uniword/chart/x_values.rb +4 -4
- data/lib/uniword/chart/y_values.rb +4 -4
- data/lib/uniword/cli/diff_cli.rb +188 -0
- data/lib/uniword/cli/generate_cli.rb +83 -0
- data/lib/uniword/cli/headers_cli.rb +159 -0
- data/lib/uniword/cli/helpers.rb +43 -0
- data/lib/uniword/cli/images_cli.rb +166 -0
- data/lib/uniword/cli/main.rb +550 -0
- data/lib/uniword/cli/protect_cli.rb +97 -0
- data/lib/uniword/cli/resources_cli.rb +165 -0
- data/lib/uniword/cli/review_cli.rb +291 -0
- data/lib/uniword/cli/spellcheck_cli.rb +102 -0
- data/lib/uniword/cli/styleset_cli.rb +191 -0
- data/lib/uniword/cli/template_cli.rb +194 -0
- data/lib/uniword/cli/theme_cli.rb +221 -0
- data/lib/uniword/cli/toc_cli.rb +154 -0
- data/lib/uniword/cli/watermark_cli.rb +97 -0
- data/lib/uniword/cli.rb +18 -735
- data/lib/uniword/column_configuration.rb +2 -2
- data/lib/uniword/comment.rb +7 -7
- data/lib/uniword/comment_range.rb +5 -5
- data/lib/uniword/comments_part.rb +7 -3
- data/lib/uniword/configuration/configuration_loader.rb +3 -3
- data/lib/uniword/configuration.rb +2 -1
- data/lib/uniword/content_types/default.rb +4 -4
- data/lib/uniword/content_types/override.rb +4 -4
- data/lib/uniword/content_types/types.rb +4 -7
- data/lib/uniword/content_types.rb +35 -35
- data/lib/uniword/customxml/custom_xml.rb +6 -6
- data/lib/uniword/customxml/custom_xml_attribute.rb +5 -5
- data/lib/uniword/customxml/custom_xml_block.rb +6 -6
- data/lib/uniword/customxml/custom_xml_cell.rb +6 -6
- data/lib/uniword/customxml/custom_xml_del_range_start.rb +5 -5
- data/lib/uniword/customxml/custom_xml_ins_range_end.rb +3 -3
- data/lib/uniword/customxml/custom_xml_ins_range_start.rb +5 -5
- data/lib/uniword/customxml/custom_xml_move_from_range_end.rb +3 -3
- data/lib/uniword/customxml/custom_xml_move_from_range_start.rb +5 -5
- data/lib/uniword/customxml/custom_xml_move_to_range_end.rb +3 -3
- data/lib/uniword/customxml/custom_xml_move_to_range_start.rb +5 -5
- data/lib/uniword/customxml/custom_xml_properties.rb +7 -6
- data/lib/uniword/customxml/custom_xml_row.rb +6 -6
- data/lib/uniword/customxml/custom_xml_run.rb +6 -6
- data/lib/uniword/customxml/data_binding.rb +5 -5
- data/lib/uniword/customxml/data_store_item.rb +4 -4
- data/lib/uniword/customxml/element_name.rb +3 -3
- data/lib/uniword/customxml/name.rb +3 -3
- data/lib/uniword/customxml/namespace_uri.rb +3 -3
- data/lib/uniword/customxml/placeholder.rb +3 -3
- data/lib/uniword/customxml/placeholder_text.rb +3 -3
- data/lib/uniword/customxml/prefix_mappings.rb +3 -3
- data/lib/uniword/customxml/schema_reference.rb +5 -5
- data/lib/uniword/customxml/showing_placeholder.rb +3 -3
- data/lib/uniword/customxml/showing_placeholder_header.rb +3 -3
- data/lib/uniword/customxml/smart_tag.rb +6 -6
- data/lib/uniword/customxml/smart_tag_attribute.rb +4 -4
- data/lib/uniword/customxml/smart_tag_element.rb +3 -3
- data/lib/uniword/customxml/smart_tag_name.rb +3 -3
- data/lib/uniword/customxml/smart_tag_properties.rb +5 -4
- data/lib/uniword/customxml/smart_tag_type.rb +5 -5
- data/lib/uniword/customxml/smart_tag_uri.rb +3 -3
- data/lib/uniword/customxml/store_item_id.rb +3 -3
- data/lib/uniword/customxml/x_path.rb +3 -3
- data/lib/uniword/customxml/x_path_expression.rb +3 -3
- data/lib/uniword/customxml.rb +45 -38
- data/lib/uniword/diff/diff_result.rb +100 -0
- data/lib/uniword/diff/document_differ.rb +517 -0
- data/lib/uniword/diff/formatter.rb +120 -0
- data/lib/uniword/diff/package_diff_result.rb +204 -0
- data/lib/uniword/diff/package_differ.rb +581 -0
- data/lib/uniword/diff.rb +19 -0
- data/lib/uniword/document_factory.rb +55 -26
- data/lib/uniword/document_variables/data_type.rb +3 -3
- data/lib/uniword/document_variables/default_value.rb +3 -3
- data/lib/uniword/document_variables/doc_var.rb +4 -4
- data/lib/uniword/document_variables/doc_vars.rb +3 -3
- data/lib/uniword/document_variables/read_only.rb +3 -3
- data/lib/uniword/document_variables/variable_binding.rb +5 -5
- data/lib/uniword/document_variables/variable_collection.rb +4 -4
- data/lib/uniword/document_variables/variable_expression.rb +3 -3
- data/lib/uniword/document_variables/variable_format.rb +3 -3
- data/lib/uniword/document_variables/variable_scope.rb +3 -3
- data/lib/uniword/document_writer.rb +18 -17
- data/lib/uniword/docx/document_statistics.rb +142 -0
- data/lib/uniword/docx/package.rb +492 -0
- data/lib/uniword/docx/package_defaults.rb +151 -0
- data/lib/uniword/docx/package_serialization.rb +490 -0
- data/lib/uniword/docx/profile.rb +256 -0
- data/lib/uniword/docx/reconciler.rb +1006 -0
- data/lib/uniword/docx.rb +15 -0
- data/lib/uniword/drawingml/adjust_value_list.rb +3 -3
- data/lib/uniword/drawingml/alpha.rb +3 -3
- data/lib/uniword/drawingml/alpha_bi_level.rb +3 -3
- data/lib/uniword/drawingml/alpha_modulation.rb +3 -3
- data/lib/uniword/drawingml/alpha_modulation_fixed.rb +3 -3
- data/lib/uniword/drawingml/alpha_offset.rb +3 -3
- data/lib/uniword/drawingml/arc_to.rb +6 -6
- data/lib/uniword/drawingml/background_color.rb +4 -4
- data/lib/uniword/drawingml/bevel_top.rb +5 -5
- data/lib/uniword/drawingml/bi_level.rb +3 -3
- data/lib/uniword/drawingml/blip.rb +11 -9
- data/lib/uniword/drawingml/blip_fill.rb +6 -6
- data/lib/uniword/drawingml/blue.rb +3 -3
- data/lib/uniword/drawingml/blur.rb +4 -4
- data/lib/uniword/drawingml/body_properties.rb +3 -3
- data/lib/uniword/drawingml/camera.rb +4 -4
- data/lib/uniword/drawingml/close_path.rb +2 -2
- data/lib/uniword/drawingml/color_scheme.rb +71 -71
- data/lib/uniword/drawingml/complex_script_font.rb +4 -4
- data/lib/uniword/drawingml/custom_dash.rb +3 -3
- data/lib/uniword/drawingml/custom_geometry.rb +4 -4
- data/lib/uniword/drawingml/dash_stop.rb +4 -4
- data/lib/uniword/drawingml/default_paragraph_properties.rb +4 -4
- data/lib/uniword/drawingml/duotone.rb +5 -4
- data/lib/uniword/drawingml/east_asian_font.rb +4 -4
- data/lib/uniword/drawingml/effect_container.rb +3 -3
- data/lib/uniword/drawingml/effect_list.rb +7 -7
- data/lib/uniword/drawingml/extension.rb +11 -11
- data/lib/uniword/drawingml/extension_list.rb +2 -2
- data/lib/uniword/drawingml/extents.rb +4 -4
- data/lib/uniword/drawingml/extra_color_scheme_list.rb +1 -1
- data/lib/uniword/drawingml/fill_overlay.rb +3 -3
- data/lib/uniword/drawingml/fill_rect.rb +27 -0
- data/lib/uniword/drawingml/fill_to_rect.rb +6 -6
- data/lib/uniword/drawingml/font_reference.rb +4 -4
- data/lib/uniword/drawingml/font_scheme.rb +30 -30
- data/lib/uniword/drawingml/foreground_color.rb +4 -4
- data/lib/uniword/drawingml/format_scheme.rb +23 -23
- data/lib/uniword/drawingml/gamma.rb +2 -2
- data/lib/uniword/drawingml/geometry_guide.rb +4 -4
- data/lib/uniword/drawingml/glow.rb +5 -5
- data/lib/uniword/drawingml/gradient_fill.rb +6 -6
- data/lib/uniword/drawingml/gradient_stop.rb +5 -5
- data/lib/uniword/drawingml/gradient_stop_list.rb +5 -4
- data/lib/uniword/drawingml/graphic.rb +3 -3
- data/lib/uniword/drawingml/graphic_data.rb +6 -6
- data/lib/uniword/drawingml/graphic_frame_locks.rb +24 -0
- data/lib/uniword/drawingml/grayscale.rb +2 -2
- data/lib/uniword/drawingml/green.rb +3 -3
- data/lib/uniword/drawingml/group_locking.rb +10 -10
- data/lib/uniword/drawingml/group_shape_properties.rb +3 -3
- data/lib/uniword/drawingml/gvml.rb +17 -12
- data/lib/uniword/drawingml/gvml_connector.rb +5 -5
- data/lib/uniword/drawingml/gvml_connector_non_visual.rb +4 -4
- data/lib/uniword/drawingml/gvml_graphic_frame_non_visual.rb +5 -4
- data/lib/uniword/drawingml/gvml_graphical_object_frame.rb +6 -5
- data/lib/uniword/drawingml/gvml_group_shape.rb +10 -10
- data/lib/uniword/drawingml/gvml_group_shape_non_visual.rb +4 -4
- data/lib/uniword/drawingml/gvml_picture.rb +6 -6
- data/lib/uniword/drawingml/gvml_picture_non_visual.rb +4 -4
- data/lib/uniword/drawingml/gvml_shape.rb +6 -6
- data/lib/uniword/drawingml/gvml_shape_non_visual.rb +4 -4
- data/lib/uniword/drawingml/gvml_text_shape.rb +5 -5
- data/lib/uniword/drawingml/gvml_use_shape_rectangle.rb +2 -2
- data/lib/uniword/drawingml/hue.rb +3 -3
- data/lib/uniword/drawingml/hue_modulation.rb +3 -3
- data/lib/uniword/drawingml/hue_offset.rb +3 -3
- data/lib/uniword/drawingml/inner_shadow.rb +7 -7
- data/lib/uniword/drawingml/inverse_gamma.rb +2 -2
- data/lib/uniword/drawingml/level1_paragraph_properties.rb +4 -4
- data/lib/uniword/drawingml/level2_paragraph_properties.rb +4 -4
- data/lib/uniword/drawingml/level3_paragraph_properties.rb +4 -4
- data/lib/uniword/drawingml/light_rig.rb +5 -5
- data/lib/uniword/drawingml/line_defaults.rb +6 -6
- data/lib/uniword/drawingml/line_join_miter.rb +3 -3
- data/lib/uniword/drawingml/line_join_round.rb +2 -2
- data/lib/uniword/drawingml/line_properties.rb +10 -10
- data/lib/uniword/drawingml/line_to.rb +3 -3
- data/lib/uniword/drawingml/linear_gradient.rb +4 -4
- data/lib/uniword/drawingml/list_style.rb +6 -6
- data/lib/uniword/drawingml/luminance.rb +3 -3
- data/lib/uniword/drawingml/luminance_modulation.rb +3 -3
- data/lib/uniword/drawingml/luminance_offset.rb +3 -3
- data/lib/uniword/drawingml/move_to.rb +3 -3
- data/lib/uniword/drawingml/no_fill.rb +2 -2
- data/lib/uniword/drawingml/non_visual_connector_properties.rb +3 -3
- data/lib/uniword/drawingml/non_visual_drawing_properties.rb +10 -4
- data/lib/uniword/drawingml/non_visual_graphic_frame_properties.rb +3 -3
- data/lib/uniword/drawingml/non_visual_group_drawing_shape_properties.rb +3 -3
- data/lib/uniword/drawingml/non_visual_picture_properties.rb +6 -5
- data/lib/uniword/drawingml/non_visual_shape_properties.rb +3 -3
- data/lib/uniword/drawingml/object_defaults.rb +4 -4
- data/lib/uniword/drawingml/office_art_extension.rb +5 -3
- data/lib/uniword/drawingml/office_art_extension_list.rb +5 -4
- data/lib/uniword/drawingml/offset.rb +4 -4
- data/lib/uniword/drawingml/outer_shadow.rb +11 -11
- data/lib/uniword/drawingml/path_gradient.rb +4 -4
- data/lib/uniword/drawingml/path_list.rb +3 -3
- data/lib/uniword/drawingml/pattern_fill.rb +5 -5
- data/lib/uniword/drawingml/picture_locking.rb +10 -10
- data/lib/uniword/drawingml/preset_dash.rb +3 -3
- data/lib/uniword/drawingml/preset_geometry.rb +4 -4
- data/lib/uniword/drawingml/preset_shadow.rb +5 -5
- data/lib/uniword/drawingml/red.rb +3 -3
- data/lib/uniword/drawingml/red_modulation.rb +3 -3
- data/lib/uniword/drawingml/red_offset.rb +3 -3
- data/lib/uniword/drawingml/reflection.rb +10 -10
- data/lib/uniword/drawingml/relative_rect.rb +6 -6
- data/lib/uniword/drawingml/rotation.rb +5 -5
- data/lib/uniword/drawingml/saturation.rb +3 -3
- data/lib/uniword/drawingml/saturation_modulation.rb +3 -3
- data/lib/uniword/drawingml/saturation_offset.rb +3 -3
- data/lib/uniword/drawingml/scene_3d.rb +4 -4
- data/lib/uniword/drawingml/scheme_color.rb +13 -13
- data/lib/uniword/drawingml/shade.rb +3 -3
- data/lib/uniword/drawingml/shape.rb +4 -4
- data/lib/uniword/drawingml/shape_3d.rb +6 -6
- data/lib/uniword/drawingml/shape_defaults.rb +6 -6
- data/lib/uniword/drawingml/shape_properties.rb +4 -4
- data/lib/uniword/drawingml/shape_style.rb +6 -6
- data/lib/uniword/drawingml/soft_edge.rb +3 -3
- data/lib/uniword/drawingml/solid_fill.rb +4 -4
- data/lib/uniword/drawingml/source_rect.rb +6 -6
- data/lib/uniword/drawingml/srgb_color.rb +13 -13
- data/lib/uniword/drawingml/stretch.rb +6 -2
- data/lib/uniword/drawingml/style_matrix.rb +6 -6
- data/lib/uniword/drawingml/style_matrix_reference.rb +5 -5
- data/lib/uniword/drawingml/style_reference.rb +4 -4
- data/lib/uniword/drawingml/text_body.rb +6 -5
- data/lib/uniword/drawingml/text_character_properties.rb +8 -8
- data/lib/uniword/drawingml/text_defaults.rb +6 -6
- data/lib/uniword/drawingml/text_font.rb +4 -4
- data/lib/uniword/drawingml/text_paragraph.rb +3 -3
- data/lib/uniword/drawingml/text_paragraph_properties.rb +5 -5
- data/lib/uniword/drawingml/text_run.rb +3 -3
- data/lib/uniword/drawingml/theme.rb +29 -29
- data/lib/uniword/drawingml/tile.rb +8 -8
- data/lib/uniword/drawingml/tile_rect.rb +6 -6
- data/lib/uniword/drawingml/tint.rb +3 -3
- data/lib/uniword/drawingml/transform2_d.rb +4 -4
- data/lib/uniword/drawingml/use_local_dpi.rb +21 -0
- data/lib/uniword/drawingml.rb +163 -144
- data/lib/uniword/element.rb +1 -1
- data/lib/uniword/element_registry.rb +1 -1
- data/lib/uniword/endnote.rb +1 -1
- data/lib/uniword/errors.rb +1 -1
- data/lib/uniword/field.rb +21 -21
- data/lib/uniword/footer.rb +8 -5
- data/lib/uniword/footnote.rb +1 -1
- data/lib/uniword/format_converter.rb +6 -6
- data/lib/uniword/format_detector.rb +39 -16
- data/lib/uniword/generation/document_generator.rb +135 -0
- data/lib/uniword/generation/structured_text_parser.rb +131 -0
- data/lib/uniword/generation/style_extractor.rb +90 -0
- data/lib/uniword/generation/style_mapper.rb +89 -0
- data/lib/uniword/generation.rb +17 -0
- data/lib/uniword/glossary/auto_text.rb +3 -3
- data/lib/uniword/glossary/category_name.rb +3 -3
- data/lib/uniword/glossary/doc_part.rb +4 -4
- data/lib/uniword/glossary/doc_part_behavior.rb +3 -3
- data/lib/uniword/glossary/doc_part_behaviors.rb +5 -4
- data/lib/uniword/glossary/doc_part_body.rb +7 -6
- data/lib/uniword/glossary/doc_part_category.rb +4 -4
- data/lib/uniword/glossary/doc_part_description.rb +3 -3
- data/lib/uniword/glossary/doc_part_gallery.rb +3 -3
- data/lib/uniword/glossary/doc_part_id.rb +3 -3
- data/lib/uniword/glossary/doc_part_name.rb +3 -3
- data/lib/uniword/glossary/doc_part_properties.rb +9 -9
- data/lib/uniword/glossary/doc_part_type.rb +3 -3
- data/lib/uniword/glossary/doc_part_types.rb +4 -4
- data/lib/uniword/glossary/doc_parts.rb +3 -3
- data/lib/uniword/glossary/equation.rb +3 -3
- data/lib/uniword/glossary/glossary_document.rb +5 -5
- data/lib/uniword/glossary/style_id.rb +3 -3
- data/lib/uniword/glossary/text_box.rb +3 -3
- data/lib/uniword/glossary.rb +19 -19
- data/lib/uniword/header.rb +8 -5
- data/lib/uniword/headers_footers/manager.rb +140 -0
- data/lib/uniword/headers_footers.rb +12 -0
- data/lib/uniword/hyperlink.rb +1 -1
- data/lib/uniword/image.rb +12 -9
- data/lib/uniword/images/image_info.rb +48 -0
- data/lib/uniword/images/image_manager.rb +253 -0
- data/lib/uniword/images.rb +15 -0
- data/lib/uniword/infrastructure/mime_packager.rb +15 -17
- data/lib/uniword/infrastructure/mime_parser.rb +28 -18
- data/lib/uniword/infrastructure/xml_namespace_normalizer.rb +8 -6
- data/lib/uniword/infrastructure/zip_extractor.rb +23 -15
- data/lib/uniword/infrastructure/zip_packager.rb +30 -29
- data/lib/uniword/lazy_loader.rb +5 -11
- data/lib/uniword/line_numbering.rb +11 -11
- data/lib/uniword/logger.rb +1 -1
- data/lib/uniword/math/accent.rb +4 -4
- data/lib/uniword/math/accent_properties.rb +4 -4
- data/lib/uniword/math/argument_properties.rb +3 -3
- data/lib/uniword/math/bar.rb +4 -4
- data/lib/uniword/math/bar_properties.rb +4 -4
- data/lib/uniword/math/begin_char.rb +3 -3
- data/lib/uniword/math/border_box.rb +4 -4
- data/lib/uniword/math/border_box_properties.rb +11 -11
- data/lib/uniword/math/box.rb +4 -4
- data/lib/uniword/math/box_properties.rb +8 -8
- data/lib/uniword/math/char.rb +3 -3
- data/lib/uniword/math/control_properties.rb +3 -3
- data/lib/uniword/math/degree.rb +4 -4
- data/lib/uniword/math/delimiter.rb +4 -4
- data/lib/uniword/math/delimiter_properties.rb +8 -8
- data/lib/uniword/math/denominator.rb +4 -4
- data/lib/uniword/math/element.rb +29 -24
- data/lib/uniword/math/end_char.rb +3 -3
- data/lib/uniword/math/equation_array.rb +4 -4
- data/lib/uniword/math/equation_array_properties.rb +8 -8
- data/lib/uniword/math/fraction.rb +5 -5
- data/lib/uniword/math/fraction_properties.rb +4 -4
- data/lib/uniword/math/function.rb +5 -5
- data/lib/uniword/math/function_name.rb +4 -4
- data/lib/uniword/math/function_properties.rb +3 -3
- data/lib/uniword/math/group_char.rb +4 -4
- data/lib/uniword/math/group_char_properties.rb +6 -6
- data/lib/uniword/math/lim.rb +4 -4
- data/lib/uniword/math/lower_limit.rb +5 -5
- data/lib/uniword/math/lower_limit_properties.rb +3 -3
- data/lib/uniword/math/math_break.rb +3 -3
- data/lib/uniword/math/math_font.rb +3 -3
- data/lib/uniword/math/math_properties.rb +18 -18
- data/lib/uniword/math/math_run.rb +5 -5
- data/lib/uniword/math/math_run_properties.rb +9 -9
- data/lib/uniword/math/math_simple_int_val.rb +3 -3
- data/lib/uniword/math/math_simple_val.rb +3 -3
- data/lib/uniword/math/math_style.rb +3 -3
- data/lib/uniword/math/math_text.rb +2 -2
- data/lib/uniword/math/matrix.rb +4 -4
- data/lib/uniword/math/matrix_column.rb +3 -3
- data/lib/uniword/math/matrix_column_properties.rb +4 -4
- data/lib/uniword/math/matrix_columns.rb +3 -3
- data/lib/uniword/math/matrix_properties.rb +10 -10
- data/lib/uniword/math/matrix_row.rb +3 -3
- data/lib/uniword/math/nary.rb +6 -6
- data/lib/uniword/math/nary_properties.rb +8 -8
- data/lib/uniword/math/numerator.rb +4 -4
- data/lib/uniword/math/o_math.rb +28 -23
- data/lib/uniword/math/o_math_para.rb +4 -4
- data/lib/uniword/math/o_math_para_properties.rb +3 -3
- data/lib/uniword/math/phantom.rb +4 -4
- data/lib/uniword/math/phantom_properties.rb +8 -8
- data/lib/uniword/math/plurimath_adapter.rb +26 -22
- data/lib/uniword/math/pre_sub_superscript.rb +6 -6
- data/lib/uniword/math/pre_sub_superscript_properties.rb +3 -3
- data/lib/uniword/math/radical.rb +5 -5
- data/lib/uniword/math/radical_properties.rb +4 -4
- data/lib/uniword/math/separator_char.rb +3 -3
- data/lib/uniword/math/sub.rb +4 -4
- data/lib/uniword/math/sub_superscript.rb +6 -6
- data/lib/uniword/math/sub_superscript_properties.rb +4 -4
- data/lib/uniword/math/subscript.rb +5 -5
- data/lib/uniword/math/subscript_properties.rb +3 -3
- data/lib/uniword/math/sup.rb +4 -4
- data/lib/uniword/math/superscript.rb +5 -5
- data/lib/uniword/math/superscript_properties.rb +3 -3
- data/lib/uniword/math/upper_limit.rb +5 -5
- data/lib/uniword/math/upper_limit_properties.rb +3 -3
- data/lib/uniword/math.rb +70 -68
- data/lib/uniword/math_equation.rb +6 -6
- data/lib/uniword/mhtml/css_number_formatter.rb +7 -6
- data/lib/uniword/mhtml/document.rb +24 -18
- data/lib/uniword/mhtml/html_part.rb +19 -18
- data/lib/uniword/mhtml/math_converter.rb +17 -15
- data/lib/uniword/mhtml/metadata/document_properties.rb +21 -21
- data/lib/uniword/mhtml/metadata/latent_styles.rb +8 -8
- data/lib/uniword/mhtml/metadata/office_document_settings.rb +4 -4
- data/lib/uniword/mhtml/metadata/word_document_settings.rb +16 -15
- data/lib/uniword/mhtml/metadata.rb +4 -2
- data/lib/uniword/mhtml/mhtml_package.rb +7 -9
- data/lib/uniword/mhtml/mime_part.rb +17 -13
- data/lib/uniword/mhtml/namespaces.rb +7 -7
- data/lib/uniword/mhtml/numbering_configuration.rb +3 -3
- data/lib/uniword/mhtml/styles_configuration.rb +3 -3
- data/lib/uniword/mhtml/theme.rb +2 -2
- data/lib/uniword/mhtml/word_css.rb +15 -29
- data/lib/uniword/office/bottom.rb +3 -3
- data/lib/uniword/office/brightness.rb +3 -3
- data/lib/uniword/office/button.rb +5 -5
- data/lib/uniword/office/callout.rb +10 -10
- data/lib/uniword/office/callout_anchor.rb +3 -3
- data/lib/uniword/office/checkbox.rb +4 -4
- data/lib/uniword/office/color_menu.rb +4 -4
- data/lib/uniword/office/color_mru.rb +4 -4
- data/lib/uniword/office/complex.rb +3 -3
- data/lib/uniword/office/diagram.rb +10 -10
- data/lib/uniword/office/diffusity.rb +3 -3
- data/lib/uniword/office/document_protection.rb +5 -5
- data/lib/uniword/office/document_view.rb +3 -3
- data/lib/uniword/office/edge.rb +4 -4
- data/lib/uniword/office/extrusion.rb +19 -19
- data/lib/uniword/office/extrusion_color.rb +4 -4
- data/lib/uniword/office/extrusion_color_mode.rb +3 -3
- data/lib/uniword/office/extrusion_ok.rb +3 -3
- data/lib/uniword/office/field.rb +4 -4
- data/lib/uniword/office/forms.rb +3 -3
- data/lib/uniword/office/id_map.rb +4 -4
- data/lib/uniword/office/ink.rb +4 -4
- data/lib/uniword/office/ink_annotation.rb +4 -4
- data/lib/uniword/office/left.rb +3 -3
- data/lib/uniword/office/lock.rb +7 -7
- data/lib/uniword/office/metal.rb +3 -3
- data/lib/uniword/office/proof_state.rb +4 -4
- data/lib/uniword/office/regroup.rb +3 -3
- data/lib/uniword/office/regroup_table.rb +3 -3
- data/lib/uniword/office/relation_table.rb +3 -3
- data/lib/uniword/office/right.rb +3 -3
- data/lib/uniword/office/rules.rb +3 -3
- data/lib/uniword/office/shape_defaults.rb +6 -6
- data/lib/uniword/office/shape_layout.rb +4 -4
- data/lib/uniword/office/signature_line.rb +12 -12
- data/lib/uniword/office/skew.rb +6 -6
- data/lib/uniword/office/specularity.rb +3 -3
- data/lib/uniword/office/top.rb +3 -3
- data/lib/uniword/office/writing_style.rb +6 -6
- data/lib/uniword/office/zoom.rb +3 -3
- data/lib/uniword/office.rb +41 -41
- data/lib/uniword/ooxml/additional_characteristics.rb +8 -8
- data/lib/uniword/ooxml/app_properties.rb +44 -44
- data/lib/uniword/ooxml/core_properties.rb +15 -14
- data/lib/uniword/ooxml/custom_properties.rb +35 -35
- data/lib/uniword/ooxml/dotx_package.rb +161 -52
- data/lib/uniword/ooxml/namespaces.rb +267 -114
- data/lib/uniword/ooxml/package_file.rb +13 -10
- data/lib/uniword/ooxml/relationships/hyperlink_relationship.rb +3 -3
- data/lib/uniword/ooxml/relationships/image_relationship.rb +2 -2
- data/lib/uniword/ooxml/relationships/office_document_relationship.rb +3 -3
- data/lib/uniword/ooxml/relationships/package_relationship.rb +6 -6
- data/lib/uniword/ooxml/relationships/package_relationships.rb +16 -16
- data/lib/uniword/ooxml/relationships/relationship.rb +6 -6
- data/lib/uniword/ooxml/relationships/relationships.rb +7 -6
- data/lib/uniword/ooxml/relationships.rb +6 -3
- data/lib/uniword/ooxml/schema/attribute_definition.rb +10 -9
- data/lib/uniword/ooxml/schema/child_definition.rb +17 -17
- data/lib/uniword/ooxml/schema/element_definition.rb +3 -3
- data/lib/uniword/ooxml/schema/element_serializer.rb +43 -21
- data/lib/uniword/ooxml/schema/ooxml_schema.rb +7 -6
- data/lib/uniword/ooxml/schema_library.rb +9 -8
- data/lib/uniword/ooxml/styleset_package.rb +1 -1
- data/lib/uniword/ooxml/theme_package.rb +6 -6
- data/lib/uniword/ooxml/thmx_package.rb +13 -12
- data/lib/uniword/ooxml/types/cp_description_type.rb +1 -1
- data/lib/uniword/ooxml/types/cp_keywords_type.rb +1 -1
- data/lib/uniword/ooxml/types/cp_last_modified_by_type.rb +1 -1
- data/lib/uniword/ooxml/types/cp_revision_type.rb +1 -1
- data/lib/uniword/ooxml/types/dc_creator_type.rb +1 -1
- data/lib/uniword/ooxml/types/dc_subject_type.rb +1 -1
- data/lib/uniword/ooxml/types/dc_title_type.rb +1 -1
- data/lib/uniword/ooxml/types/dcterms_created_type.rb +4 -4
- data/lib/uniword/ooxml/types/dcterms_modified_type.rb +4 -4
- data/lib/uniword/ooxml/types/dcterms_w3cdtf_type.rb +6 -35
- data/lib/uniword/ooxml/types/mc_ignorable_type.rb +1 -1
- data/lib/uniword/ooxml/types/on_off_type.rb +5 -5
- data/lib/uniword/ooxml/types/ooxml_boolean.rb +7 -7
- data/lib/uniword/ooxml/types/ooxml_boolean_optional.rb +7 -7
- data/lib/uniword/ooxml/types/relationship_id.rb +18 -0
- data/lib/uniword/ooxml/types/variant_types.rb +41 -41
- data/lib/uniword/ooxml/types.rb +29 -25
- data/lib/uniword/ooxml.rb +2 -2
- data/lib/uniword/page_borders.rb +9 -9
- data/lib/uniword/paragraph_border.rb +9 -8
- data/lib/uniword/picture/fill_rect.rb +6 -6
- data/lib/uniword/picture/non_visual_drawing_properties.rb +29 -0
- data/lib/uniword/picture/non_visual_picture_drawing_properties.rb +4 -4
- data/lib/uniword/picture/non_visual_picture_properties.rb +5 -5
- data/lib/uniword/picture/picture.rb +5 -5
- data/lib/uniword/picture/picture_blip_fill.rb +6 -6
- data/lib/uniword/picture/picture_locks.rb +4 -4
- data/lib/uniword/picture/picture_shape_properties.rb +5 -5
- data/lib/uniword/picture/picture_source_rect.rb +6 -6
- data/lib/uniword/picture/picture_stretch.rb +3 -3
- data/lib/uniword/picture/tile.rb +7 -7
- data/lib/uniword/picture.rb +4 -1
- data/lib/uniword/presentationml/audio.rb +5 -5
- data/lib/uniword/presentationml/body_properties.rb +7 -7
- data/lib/uniword/presentationml/break.rb +3 -3
- data/lib/uniword/presentationml/color_map.rb +6 -6
- data/lib/uniword/presentationml/common_slide_data.rb +5 -5
- data/lib/uniword/presentationml/common_time_node.rb +8 -8
- data/lib/uniword/presentationml/connection_shape.rb +4 -4
- data/lib/uniword/presentationml/embed.rb +3 -3
- data/lib/uniword/presentationml/embedded_font.rb +4 -4
- data/lib/uniword/presentationml/end_conditions_list.rb +3 -3
- data/lib/uniword/presentationml/end_paragraph_run_properties.rb +5 -5
- data/lib/uniword/presentationml/extension.rb +3 -3
- data/lib/uniword/presentationml/extension_list.rb +3 -3
- data/lib/uniword/presentationml/field.rb +7 -7
- data/lib/uniword/presentationml/graphic_frame.rb +5 -5
- data/lib/uniword/presentationml/group_shape.rb +6 -6
- data/lib/uniword/presentationml/handout_master.rb +4 -4
- data/lib/uniword/presentationml/handout_master_id_list.rb +3 -3
- data/lib/uniword/presentationml/list_style.rb +6 -6
- data/lib/uniword/presentationml/non_visual_shape_properties.rb +5 -5
- data/lib/uniword/presentationml/notes.rb +5 -5
- data/lib/uniword/presentationml/notes_master_id_list.rb +3 -3
- data/lib/uniword/presentationml/notes_size.rb +4 -4
- data/lib/uniword/presentationml/ole_object.rb +5 -5
- data/lib/uniword/presentationml/paragraph.rb +7 -7
- data/lib/uniword/presentationml/paragraph_properties.rb +7 -7
- data/lib/uniword/presentationml/parallel_time_node.rb +3 -3
- data/lib/uniword/presentationml/picture.rb +5 -5
- data/lib/uniword/presentationml/presentation.rb +14 -11
- data/lib/uniword/presentationml/run.rb +4 -4
- data/lib/uniword/presentationml/run_properties.rb +9 -9
- data/lib/uniword/presentationml/sequence_time_node.rb +5 -5
- data/lib/uniword/presentationml/shape.rb +5 -5
- data/lib/uniword/presentationml/shape_properties.rb +7 -7
- data/lib/uniword/presentationml/shape_tree.rb +13 -11
- data/lib/uniword/presentationml/slide.rb +8 -8
- data/lib/uniword/presentationml/slide_id.rb +6 -5
- data/lib/uniword/presentationml/slide_id_list.rb +3 -3
- data/lib/uniword/presentationml/slide_layout.rb +8 -8
- data/lib/uniword/presentationml/slide_master.rb +8 -8
- data/lib/uniword/presentationml/slide_master_id.rb +6 -5
- data/lib/uniword/presentationml/slide_master_id_list.rb +5 -4
- data/lib/uniword/presentationml/slide_size.rb +5 -5
- data/lib/uniword/presentationml/start_conditions_list.rb +3 -3
- data/lib/uniword/presentationml/text_body.rb +5 -5
- data/lib/uniword/presentationml/time_node_list.rb +4 -4
- data/lib/uniword/presentationml/timing.rb +4 -4
- data/lib/uniword/presentationml/transition.rb +8 -8
- data/lib/uniword/presentationml/video.rb +4 -4
- data/lib/uniword/presentationml.rb +54 -50
- data/lib/uniword/properties/adjust_right_ind.rb +27 -0
- data/lib/uniword/properties/alignment.rb +3 -3
- data/lib/uniword/properties/auto_space_de.rb +27 -0
- data/lib/uniword/properties/auto_space_dn.rb +27 -0
- data/lib/uniword/properties/bold.rb +5 -5
- data/lib/uniword/properties/boolean_formatting.rb +44 -30
- data/lib/uniword/properties/border.rb +8 -8
- data/lib/uniword/properties/borders.rb +8 -8
- data/lib/uniword/properties/cell_vertical_align.rb +3 -3
- data/lib/uniword/properties/cell_width.rb +4 -4
- data/lib/uniword/properties/character_spacing.rb +3 -3
- data/lib/uniword/properties/color_value.rb +6 -6
- data/lib/uniword/properties/contextual_spacing.rb +4 -4
- data/lib/uniword/properties/displaced_by_custom_xml_value.rb +18 -0
- data/lib/uniword/properties/emphasis_mark.rb +3 -3
- data/lib/uniword/properties/font_size.rb +3 -3
- data/lib/uniword/properties/highlight.rb +3 -3
- data/lib/uniword/properties/history_value.rb +17 -0
- data/lib/uniword/properties/indentation.rb +6 -6
- data/lib/uniword/properties/italic.rb +5 -5
- data/lib/uniword/properties/kerning.rb +3 -3
- data/lib/uniword/properties/language.rb +5 -5
- data/lib/uniword/properties/margin.rb +3 -3
- data/lib/uniword/properties/numbering_id.rb +3 -3
- data/lib/uniword/properties/numbering_level.rb +3 -3
- data/lib/uniword/properties/numbering_properties.rb +4 -4
- data/lib/uniword/properties/outline.rb +6 -6
- data/lib/uniword/properties/outline_level.rb +3 -3
- data/lib/uniword/properties/page_break_before.rb +26 -0
- data/lib/uniword/properties/position.rb +3 -3
- data/lib/uniword/properties/relationship_id.rb +17 -0
- data/lib/uniword/properties/run_fonts.rb +11 -11
- data/lib/uniword/properties/shading.rb +6 -6
- data/lib/uniword/properties/spacing.rb +12 -6
- data/lib/uniword/properties/style_reference.rb +5 -5
- data/lib/uniword/properties/tab_stop.rb +5 -5
- data/lib/uniword/properties/table_caption.rb +19 -0
- data/lib/uniword/properties/table_cell_margin.rb +6 -6
- data/lib/uniword/properties/table_indent.rb +4 -4
- data/lib/uniword/properties/table_justification.rb +3 -3
- data/lib/uniword/properties/table_layout.rb +23 -0
- data/lib/uniword/properties/table_look.rb +9 -9
- data/lib/uniword/properties/table_width.rb +4 -4
- data/lib/uniword/properties/tabs.rb +3 -3
- data/lib/uniword/properties/text_fill.rb +3 -3
- data/lib/uniword/properties/text_outline.rb +4 -4
- data/lib/uniword/properties/underline.rb +6 -6
- data/lib/uniword/properties/vertical_align.rb +3 -3
- data/lib/uniword/properties/widow_control.rb +27 -0
- data/lib/uniword/properties/width_scale.rb +3 -3
- data/lib/uniword/properties/word2010_id_value.rb +17 -0
- data/lib/uniword/properties.rb +69 -55
- data/lib/uniword/protect/manager.rb +124 -0
- data/lib/uniword/protect.rb +11 -0
- data/lib/uniword/quality/document_checker.rb +10 -10
- data/lib/uniword/quality/quality_report.rb +19 -19
- data/lib/uniword/quality/quality_rule.rb +7 -7
- data/lib/uniword/quality/rules/heading_hierarchy_rule.rb +2 -2
- data/lib/uniword/quality/rules/image_alt_text_rule.rb +4 -4
- data/lib/uniword/quality/rules/link_validation_rule.rb +8 -10
- data/lib/uniword/quality/rules/paragraph_length_rule.rb +4 -4
- data/lib/uniword/quality/rules/style_consistency_rule.rb +6 -5
- data/lib/uniword/quality/rules/table_header_rule.rb +2 -2
- data/lib/uniword/quality.rb +8 -4
- data/lib/uniword/resource/cache.rb +1 -1
- data/lib/uniword/resource/cache_paths.rb +9 -7
- data/lib/uniword/resource/cache_version.rb +4 -3
- data/lib/uniword/resource/color_scheme_loader.rb +36 -0
- data/lib/uniword/resource/color_transformer.rb +2 -2
- data/lib/uniword/resource/document_element_converter.rb +63 -0
- data/lib/uniword/resource/document_element_loader.rb +54 -0
- data/lib/uniword/resource/document_element_template.rb +54 -0
- data/lib/uniword/resource/font_scheme_loader.rb +50 -0
- data/lib/uniword/resource/font_substitutor.rb +98 -21
- data/lib/uniword/resource/importer.rb +54 -6
- data/lib/uniword/resource/resource_location.rb +1 -1
- data/lib/uniword/resource/resource_resolver.rb +9 -7
- data/lib/uniword/resource/theme_mapping_loader.rb +138 -0
- data/lib/uniword/resource/theme_processor.rb +7 -10
- data/lib/uniword/resource/theme_transition.rb +124 -0
- data/lib/uniword/resource.rb +18 -0
- data/lib/uniword/review/accept_reject.rb +120 -0
- data/lib/uniword/review/interactive_review.rb +233 -0
- data/lib/uniword/review/review_manager.rb +250 -0
- data/lib/uniword/review.rb +19 -0
- data/lib/uniword/revision.rb +8 -8
- data/lib/uniword/schema/model_generator.rb +22 -21
- data/lib/uniword/schema/schema_loader.rb +8 -8
- data/lib/uniword/section.rb +28 -25
- data/lib/uniword/section_properties.rb +15 -13
- data/lib/uniword/serialization/ooxml_serializer.rb +3 -2
- data/lib/uniword/shading.rb +15 -14
- data/lib/uniword/shared_types/angle.rb +3 -3
- data/lib/uniword/shared_types/boolean_value.rb +3 -3
- data/lib/uniword/shared_types/decimal_number.rb +3 -3
- data/lib/uniword/shared_types/emu_measure.rb +3 -3
- data/lib/uniword/shared_types/fixed_percentage.rb +3 -3
- data/lib/uniword/shared_types/hex_color.rb +3 -3
- data/lib/uniword/shared_types/on_off.rb +3 -3
- data/lib/uniword/shared_types/percent_value.rb +3 -3
- data/lib/uniword/shared_types/pixel_measure.rb +3 -3
- data/lib/uniword/shared_types/point_measure.rb +3 -3
- data/lib/uniword/shared_types/positive_percentage.rb +3 -3
- data/lib/uniword/shared_types/string_type.rb +3 -3
- data/lib/uniword/shared_types/text_alignment.rb +3 -3
- data/lib/uniword/shared_types/twips_measure.rb +3 -3
- data/lib/uniword/shared_types/vertical_alignment.rb +3 -3
- data/lib/uniword/shared_types.rb +16 -16
- data/lib/uniword/spellcheck/grammar_checker.rb +135 -0
- data/lib/uniword/spellcheck/hunspell_adapter.rb +100 -0
- data/lib/uniword/spellcheck/spell_checker.rb +160 -0
- data/lib/uniword/spellcheck/spellcheck_result.rb +82 -0
- data/lib/uniword/spellcheck.rb +10 -0
- data/lib/uniword/spreadsheetml/alignment.rb +8 -8
- data/lib/uniword/spreadsheetml/authors.rb +5 -4
- data/lib/uniword/spreadsheetml/auto_filter.rb +7 -6
- data/lib/uniword/spreadsheetml/bold.rb +3 -3
- data/lib/uniword/spreadsheetml/book_views.rb +3 -3
- data/lib/uniword/spreadsheetml/border.rb +7 -7
- data/lib/uniword/spreadsheetml/borders.rb +6 -5
- data/lib/uniword/spreadsheetml/calc_properties.rb +5 -5
- data/lib/uniword/spreadsheetml/cell.rb +7 -7
- data/lib/uniword/spreadsheetml/cell_format.rb +12 -12
- data/lib/uniword/spreadsheetml/cell_formats.rb +4 -4
- data/lib/uniword/spreadsheetml/cell_formula.rb +6 -6
- data/lib/uniword/spreadsheetml/cell_style.rb +8 -8
- data/lib/uniword/spreadsheetml/cell_style_xfs.rb +4 -4
- data/lib/uniword/spreadsheetml/cell_styles.rb +4 -4
- data/lib/uniword/spreadsheetml/cell_value.rb +3 -3
- data/lib/uniword/spreadsheetml/chartsheet.rb +4 -4
- data/lib/uniword/spreadsheetml/col.rb +8 -8
- data/lib/uniword/spreadsheetml/col_breaks.rb +4 -4
- data/lib/uniword/spreadsheetml/color.rb +6 -6
- data/lib/uniword/spreadsheetml/color_filter.rb +4 -4
- data/lib/uniword/spreadsheetml/colors.rb +3 -3
- data/lib/uniword/spreadsheetml/cols.rb +3 -3
- data/lib/uniword/spreadsheetml/comment.rb +5 -5
- data/lib/uniword/spreadsheetml/comment_list.rb +5 -4
- data/lib/uniword/spreadsheetml/comments.rb +4 -4
- data/lib/uniword/spreadsheetml/conditional_formatting.rb +6 -5
- data/lib/uniword/spreadsheetml/conditional_formatting_rule.rb +5 -5
- data/lib/uniword/spreadsheetml/custom_filter.rb +4 -4
- data/lib/uniword/spreadsheetml/custom_filters.rb +6 -5
- data/lib/uniword/spreadsheetml/custom_workbook_views.rb +3 -3
- data/lib/uniword/spreadsheetml/data_validation.rb +13 -13
- data/lib/uniword/spreadsheetml/data_validations.rb +6 -5
- data/lib/uniword/spreadsheetml/date_group_item.rb +9 -9
- data/lib/uniword/spreadsheetml/defined_name.rb +6 -6
- data/lib/uniword/spreadsheetml/defined_names.rb +3 -3
- data/lib/uniword/spreadsheetml/dimension.rb +3 -3
- data/lib/uniword/spreadsheetml/drawing.rb +3 -3
- data/lib/uniword/spreadsheetml/dynamic_filter.rb +5 -5
- data/lib/uniword/spreadsheetml/external_reference.rb +3 -3
- data/lib/uniword/spreadsheetml/external_references.rb +3 -3
- data/lib/uniword/spreadsheetml/file_sharing.rb +3 -3
- data/lib/uniword/spreadsheetml/file_version.rb +4 -4
- data/lib/uniword/spreadsheetml/fill.rb +3 -3
- data/lib/uniword/spreadsheetml/fills.rb +4 -4
- data/lib/uniword/spreadsheetml/filter.rb +3 -3
- data/lib/uniword/spreadsheetml/filter_column.rb +11 -11
- data/lib/uniword/spreadsheetml/filters.rb +8 -7
- data/lib/uniword/spreadsheetml/font.rb +7 -7
- data/lib/uniword/spreadsheetml/font_name.rb +3 -3
- data/lib/uniword/spreadsheetml/font_size.rb +3 -3
- data/lib/uniword/spreadsheetml/fonts.rb +4 -4
- data/lib/uniword/spreadsheetml/hyperlink.rb +7 -7
- data/lib/uniword/spreadsheetml/hyperlinks.rb +3 -3
- data/lib/uniword/spreadsheetml/icon_filter.rb +4 -4
- data/lib/uniword/spreadsheetml/italic.rb +3 -3
- data/lib/uniword/spreadsheetml/legacy_drawing.rb +3 -3
- data/lib/uniword/spreadsheetml/merge_cell.rb +3 -3
- data/lib/uniword/spreadsheetml/merge_cells.rb +4 -4
- data/lib/uniword/spreadsheetml/number_format.rb +4 -4
- data/lib/uniword/spreadsheetml/number_formats.rb +4 -4
- data/lib/uniword/spreadsheetml/ole_object.rb +4 -4
- data/lib/uniword/spreadsheetml/ole_objects.rb +3 -3
- data/lib/uniword/spreadsheetml/ole_size.rb +3 -3
- data/lib/uniword/spreadsheetml/pattern_fill.rb +5 -5
- data/lib/uniword/spreadsheetml/phonetic_pr.rb +10 -10
- data/lib/uniword/spreadsheetml/phonetic_properties.rb +4 -4
- data/lib/uniword/spreadsheetml/pivot_caches.rb +3 -3
- data/lib/uniword/spreadsheetml/pivot_table.rb +4 -4
- data/lib/uniword/spreadsheetml/pivot_table_definition.rb +5 -5
- data/lib/uniword/spreadsheetml/protected_ranges.rb +3 -3
- data/lib/uniword/spreadsheetml/query_table.rb +4 -4
- data/lib/uniword/spreadsheetml/rich_text_run.rb +4 -4
- data/lib/uniword/spreadsheetml/row.rb +8 -8
- data/lib/uniword/spreadsheetml/row_breaks.rb +4 -4
- data/lib/uniword/spreadsheetml/run_properties.rb +6 -6
- data/lib/uniword/spreadsheetml/scenarios.rb +5 -5
- data/lib/uniword/spreadsheetml/shared_string_table.rb +7 -6
- data/lib/uniword/spreadsheetml/sheet.rb +6 -6
- data/lib/uniword/spreadsheetml/sheet_data.rb +3 -3
- data/lib/uniword/spreadsheetml/sheet_format_pr.rb +12 -9
- data/lib/uniword/spreadsheetml/sheet_protection.rb +6 -6
- data/lib/uniword/spreadsheetml/sheet_view.rb +7 -7
- data/lib/uniword/spreadsheetml/sheet_views.rb +3 -3
- data/lib/uniword/spreadsheetml/sheets.rb +3 -3
- data/lib/uniword/spreadsheetml/sort_condition.rb +9 -9
- data/lib/uniword/spreadsheetml/sort_state.rb +6 -5
- data/lib/uniword/spreadsheetml/sparkline_group.rb +4 -4
- data/lib/uniword/spreadsheetml/sparkline_groups.rb +5 -4
- data/lib/uniword/spreadsheetml/string_item.rb +5 -5
- data/lib/uniword/spreadsheetml/table.rb +9 -9
- data/lib/uniword/spreadsheetml/table_column.rb +4 -4
- data/lib/uniword/spreadsheetml/table_columns.rb +4 -4
- data/lib/uniword/spreadsheetml/table_formula.rb +3 -3
- data/lib/uniword/spreadsheetml/table_parts.rb +4 -4
- data/lib/uniword/spreadsheetml/table_style_info.rb +7 -7
- data/lib/uniword/spreadsheetml/table_styles.rb +6 -5
- data/lib/uniword/spreadsheetml/text.rb +4 -4
- data/lib/uniword/spreadsheetml/top10.rb +6 -6
- data/lib/uniword/spreadsheetml/workbook.rb +7 -7
- data/lib/uniword/spreadsheetml/workbook_properties.rb +5 -5
- data/lib/uniword/spreadsheetml/workbook_protection.rb +4 -4
- data/lib/uniword/spreadsheetml/workbook_view.rb +5 -5
- data/lib/uniword/spreadsheetml/worksheet/sheet_format_pr.rb +12 -9
- data/lib/uniword/spreadsheetml/worksheet.rb +8 -8
- data/lib/uniword/spreadsheetml.rb +108 -105
- data/lib/uniword/streaming_parser.rb +21 -21
- data/lib/uniword/styles.rb +12 -7
- data/lib/uniword/styleset.rb +12 -12
- data/lib/uniword/stylesets/package.rb +13 -9
- data/lib/uniword/stylesets/styleset_importer.rb +10 -10
- data/lib/uniword/stylesets/yaml_styleset_loader.rb +4 -4
- data/lib/uniword/tab_stop.rb +13 -12
- data/lib/uniword/table_border.rb +16 -15
- data/lib/uniword/template/helpers/conditional_helper.rb +2 -1
- data/lib/uniword/template/helpers/filter_helper.rb +20 -17
- data/lib/uniword/template/template.rb +4 -2
- data/lib/uniword/template/template_parser.rb +5 -5
- data/lib/uniword/template/template_validator.rb +5 -4
- data/lib/uniword/template/variable_resolver.rb +10 -10
- data/lib/uniword/template_manager.rb +163 -0
- data/lib/uniword/text_box.rb +5 -4
- data/lib/uniword/text_frame.rb +16 -16
- data/lib/uniword/theme/media_file.rb +18 -12
- data/lib/uniword/theme/theme_applicator.rb +13 -12
- data/lib/uniword/theme/theme_package_reader.rb +5 -5
- data/lib/uniword/theme/theme_xml_parser.rb +67 -56
- data/lib/uniword/theme_writer.rb +1 -1
- data/lib/uniword/themes/theme.rb +29 -21
- data/lib/uniword/themes/theme_importer.rb +24 -24
- data/lib/uniword/themes/theme_transformation.rb +41 -13
- data/lib/uniword/toc/toc_entry.rb +73 -0
- data/lib/uniword/toc/toc_generator.rb +302 -0
- data/lib/uniword/toc.rb +16 -0
- data/lib/uniword/tracked_changes.rb +8 -7
- data/lib/uniword/transformation/html_element_builder.rb +445 -0
- data/lib/uniword/transformation/html_formatting_mapper.rb +245 -0
- data/lib/uniword/transformation/html_to_ooxml_converter.rb +48 -457
- data/lib/uniword/transformation/hyperlink_transformation_rule.rb +2 -2
- data/lib/uniword/transformation/image_transformation_rule.rb +1 -1
- data/lib/uniword/transformation/mhtml_element_renderer.rb +626 -0
- data/lib/uniword/transformation/mhtml_metadata_builder.rb +233 -0
- data/lib/uniword/transformation/mhtml_style_builder.rb +713 -0
- data/lib/uniword/transformation/ooxml_to_html_converter.rb +19 -19
- data/lib/uniword/transformation/ooxml_to_mhtml_converter.rb +182 -1278
- data/lib/uniword/transformation/paragraph_transformation_rule.rb +10 -10
- data/lib/uniword/transformation/run_transformation_rule.rb +1 -1
- data/lib/uniword/transformation/table_transformation_rule.rb +3 -3
- data/lib/uniword/transformation/transformation_rule_registry.rb +1 -1
- data/lib/uniword/transformation/transformer.rb +41 -46
- data/lib/uniword/transformation.rb +31 -11
- data/lib/uniword/validation/checkers/external_link_checker.rb +30 -18
- data/lib/uniword/validation/checkers/file_reference_checker.rb +25 -17
- data/lib/uniword/validation/checkers/footnote_reference_checker.rb +19 -11
- data/lib/uniword/validation/checkers/internal_link_checker.rb +19 -11
- data/lib/uniword/validation/checkers.rb +4 -2
- data/lib/uniword/validation/document_validator.rb +12 -12
- data/lib/uniword/validation/layer_validation_result.rb +3 -3
- data/lib/uniword/validation/layer_validator.rb +5 -5
- data/lib/uniword/validation/link_validator.rb +8 -8
- data/lib/uniword/validation/opc_validator.rb +229 -0
- data/lib/uniword/validation/report/layer_result.rb +59 -0
- data/lib/uniword/validation/report/terminal_formatter.rb +102 -0
- data/lib/uniword/validation/report/validation_issue.rb +56 -0
- data/lib/uniword/validation/report/verification_report.rb +66 -0
- data/lib/uniword/validation/rules/base.rb +100 -0
- data/lib/uniword/validation/rules/bookmarks_rule.rb +84 -0
- data/lib/uniword/validation/rules/content_types_coverage_rule.rb +64 -0
- data/lib/uniword/validation/rules/core_properties_namespace_rule.rb +86 -0
- data/lib/uniword/validation/rules/document_context.rb +197 -0
- data/lib/uniword/validation/rules/font_table_signature_rule.rb +55 -0
- data/lib/uniword/validation/rules/fonts_rule.rb +64 -0
- data/lib/uniword/validation/rules/footnotes_rule.rb +164 -0
- data/lib/uniword/validation/rules/headers_footers_rule.rb +91 -0
- data/lib/uniword/validation/rules/images_rule.rb +115 -0
- data/lib/uniword/validation/rules/mc_ignorable_namespace_rule.rb +82 -0
- data/lib/uniword/validation/rules/numbering_preservation_rule.rb +139 -0
- data/lib/uniword/validation/rules/numbering_rule.rb +81 -0
- data/lib/uniword/validation/rules/registry.rb +69 -0
- data/lib/uniword/validation/rules/relationship_integrity_rule.rb +85 -0
- data/lib/uniword/validation/rules/rsid_rule.rb +65 -0
- data/lib/uniword/validation/rules/section_properties_rule.rb +72 -0
- data/lib/uniword/validation/rules/settings_rule.rb +76 -0
- data/lib/uniword/validation/rules/settings_values_rule.rb +76 -0
- data/lib/uniword/validation/rules/style_references_rule.rb +98 -0
- data/lib/uniword/validation/rules/tables_rule.rb +69 -0
- data/lib/uniword/validation/rules/theme_completeness_rule.rb +72 -0
- data/lib/uniword/validation/rules/theme_rule.rb +88 -0
- data/lib/uniword/validation/rules.rb +47 -0
- data/lib/uniword/validation/schema_registry.rb +200 -0
- data/lib/uniword/validation/structural_validator.rb +116 -0
- data/lib/uniword/validation/validation_report.rb +18 -18
- data/lib/uniword/validation/validation_result.rb +3 -3
- data/lib/uniword/validation/validators/content_type_validator.rb +28 -22
- data/lib/uniword/validation/validators/document_semantics_validator.rb +42 -123
- data/lib/uniword/validation/validators/file_structure_validator.rb +10 -7
- data/lib/uniword/validation/validators/ooxml_part_validator.rb +19 -19
- data/lib/uniword/validation/validators/relationship_validator.rb +22 -21
- data/lib/uniword/validation/validators/xml_schema_validator.rb +110 -73
- data/lib/uniword/validation/validators/zip_integrity_validator.rb +8 -8
- data/lib/uniword/validation/validators.rb +10 -5
- data/lib/uniword/validation/verify_orchestrator.rb +171 -0
- data/lib/uniword/validation.rb +3 -1
- data/lib/uniword/validators/element_validator.rb +11 -9
- data/lib/uniword/validators/paragraph_validator.rb +5 -11
- data/lib/uniword/validators/table_validator.rb +6 -12
- data/lib/uniword/version.rb +1 -1
- data/lib/uniword/visitor/text_extractor.rb +6 -6
- data/lib/uniword/vml/arc.rb +13 -13
- data/lib/uniword/vml/background.rb +9 -9
- data/lib/uniword/vml/curve.rb +11 -11
- data/lib/uniword/vml/fill.rb +8 -8
- data/lib/uniword/vml/formula.rb +3 -3
- data/lib/uniword/vml/formulas.rb +3 -3
- data/lib/uniword/vml/group.rb +7 -7
- data/lib/uniword/vml/handle.rb +11 -11
- data/lib/uniword/vml/handles.rb +3 -3
- data/lib/uniword/vml/image.rb +16 -16
- data/lib/uniword/vml/imagedata.rb +14 -9
- data/lib/uniword/vml/line.rb +10 -10
- data/lib/uniword/vml/oval.rb +11 -11
- data/lib/uniword/vml/path.rb +6 -6
- data/lib/uniword/vml/polyline.rb +9 -9
- data/lib/uniword/vml/rect.rb +11 -11
- data/lib/uniword/vml/roundrect.rb +12 -12
- data/lib/uniword/vml/shadow.rb +9 -9
- data/lib/uniword/vml/shape.rb +22 -22
- data/lib/uniword/vml/shapetype.rb +10 -10
- data/lib/uniword/vml/stroke.rb +9 -9
- data/lib/uniword/vml/textbox.rb +5 -5
- data/lib/uniword/vml/textpath.rb +5 -5
- data/lib/uniword/vml/wrap.rb +4 -4
- data/lib/uniword/vml.rb +24 -24
- data/lib/uniword/vml_office/vml_anchor_lock.rb +3 -3
- data/lib/uniword/vml_office/vml_bottom.rb +4 -4
- data/lib/uniword/vml_office/vml_callout.rb +10 -10
- data/lib/uniword/vml_office/vml_clip_path.rb +4 -4
- data/lib/uniword/vml_office/vml_color_mru.rb +4 -4
- data/lib/uniword/vml_office/vml_column.rb +4 -4
- data/lib/uniword/vml_office/vml_complex.rb +3 -3
- data/lib/uniword/vml_office/vml_complex_extension.rb +4 -4
- data/lib/uniword/vml_office/vml_diagram.rb +8 -8
- data/lib/uniword/vml_office/vml_entry.rb +4 -4
- data/lib/uniword/vml_office/vml_extrusion.rb +14 -14
- data/lib/uniword/vml_office/vml_id_map.rb +4 -4
- data/lib/uniword/vml_office/vml_ink.rb +5 -5
- data/lib/uniword/vml_office/vml_left.rb +4 -4
- data/lib/uniword/vml_office/vml_lock.rb +11 -11
- data/lib/uniword/vml_office/vml_office_fill.rb +8 -8
- data/lib/uniword/vml_office/vml_proxy.rb +6 -6
- data/lib/uniword/vml_office/vml_regroup.rb +3 -3
- data/lib/uniword/vml_office/vml_relation_table.rb +4 -4
- data/lib/uniword/vml_office/vml_right.rb +4 -4
- data/lib/uniword/vml_office/vml_rule.rb +5 -5
- data/lib/uniword/vml_office/vml_rules.rb +4 -4
- data/lib/uniword/vml_office/vml_shape_defaults.rb +9 -9
- data/lib/uniword/vml_office/vml_shape_layout.rb +12 -12
- data/lib/uniword/vml_office/vml_signature_line.rb +11 -11
- data/lib/uniword/vml_office/vml_skew.rb +7 -7
- data/lib/uniword/vml_office/vml_top.rb +4 -4
- data/lib/uniword/vml_office/vml_wrap_block.rb +4 -4
- data/lib/uniword/vml_office/vml_wrap_coords.rb +3 -3
- data/lib/uniword/vml_office.rb +31 -31
- data/lib/uniword/vml_word/border_bottom.rb +7 -7
- data/lib/uniword/vml_word/border_left.rb +7 -7
- data/lib/uniword/vml_word/border_right.rb +7 -7
- data/lib/uniword/vml_word/border_top.rb +7 -7
- data/lib/uniword/vml_word.rb +4 -4
- data/lib/uniword/warnings/warning.rb +1 -1
- data/lib/uniword/warnings/warning_collector.rb +9 -9
- data/lib/uniword/warnings/warning_report.rb +6 -6
- data/lib/uniword/watermark/manager.rb +119 -0
- data/lib/uniword/watermark.rb +11 -0
- data/lib/uniword/word2010_ext/wrap.rb +4 -4
- data/lib/uniword/word2010_ext.rb +2 -2
- data/lib/uniword/word_implementation.rb +12 -4
- data/lib/uniword/word_implementation_factory.rb +1 -1
- data/lib/uniword/word_implementation_linux.rb +7 -7
- data/lib/uniword/word_implementation_macos.rb +8 -8
- data/lib/uniword/word_implementation_null.rb +1 -1
- data/lib/uniword/word_implementation_windows.rb +22 -17
- data/lib/uniword/wordprocessing_group.rb +5 -5
- data/lib/uniword/wordprocessing_shape.rb +10 -10
- data/lib/uniword/wordprocessingml/abstract_num.rb +5 -5
- data/lib/uniword/wordprocessingml/abstract_num_id.rb +3 -3
- data/lib/uniword/wordprocessingml/alternate_content.rb +4 -4
- data/lib/uniword/wordprocessingml/anchor.rb +9 -9
- data/lib/uniword/wordprocessingml/based_on.rb +3 -3
- data/lib/uniword/wordprocessingml/body.rb +38 -14
- data/lib/uniword/wordprocessingml/bookmark_end.rb +5 -3
- data/lib/uniword/wordprocessingml/bookmark_start.rb +6 -4
- data/lib/uniword/wordprocessingml/border.rb +7 -7
- data/lib/uniword/wordprocessingml/break.rb +4 -4
- data/lib/uniword/wordprocessingml/carriage_return.rb +2 -2
- data/lib/uniword/wordprocessingml/character_style.rb +64 -63
- data/lib/uniword/wordprocessingml/choice.rb +4 -4
- data/lib/uniword/wordprocessingml/cnf_style.rb +15 -15
- data/lib/uniword/wordprocessingml/columns.rb +5 -5
- data/lib/uniword/wordprocessingml/comment_range_end.rb +3 -3
- data/lib/uniword/wordprocessingml/comment_range_start.rb +3 -3
- data/lib/uniword/wordprocessingml/comment_reference.rb +3 -3
- data/lib/uniword/wordprocessingml/compat.rb +7 -6
- data/lib/uniword/wordprocessingml/compat_setting.rb +5 -5
- data/lib/uniword/wordprocessingml/deleted_text.rb +3 -3
- data/lib/uniword/wordprocessingml/doc_defaults.rb +4 -4
- data/lib/uniword/wordprocessingml/doc_grid.rb +5 -5
- data/lib/uniword/wordprocessingml/doc_pr.rb +5 -5
- data/lib/uniword/wordprocessingml/document_root/feature_facade.rb +317 -0
- data/lib/uniword/wordprocessingml/document_root.rb +145 -30
- data/lib/uniword/wordprocessingml/drawing.rb +4 -4
- data/lib/uniword/wordprocessingml/emboss.rb +3 -3
- data/lib/uniword/wordprocessingml/endnote.rb +5 -5
- data/lib/uniword/wordprocessingml/endnote_ref.rb +2 -2
- data/lib/uniword/wordprocessingml/endnote_reference.rb +3 -3
- data/lib/uniword/wordprocessingml/endnotes.rb +5 -4
- data/lib/uniword/wordprocessingml/extent.rb +4 -4
- data/lib/uniword/wordprocessingml/fallback.rb +4 -4
- data/lib/uniword/wordprocessingml/field_char.rb +4 -4
- data/lib/uniword/wordprocessingml/font.rb +36 -26
- data/lib/uniword/wordprocessingml/font_table.rb +23 -5
- data/lib/uniword/wordprocessingml/fonts.rb +3 -3
- data/lib/uniword/wordprocessingml/footer.rb +4 -4
- data/lib/uniword/wordprocessingml/footer_reference.rb +6 -8
- data/lib/uniword/wordprocessingml/footnote.rb +5 -5
- data/lib/uniword/wordprocessingml/footnote_ref.rb +2 -2
- data/lib/uniword/wordprocessingml/footnote_reference.rb +3 -3
- data/lib/uniword/wordprocessingml/footnotes.rb +5 -4
- data/lib/uniword/wordprocessingml/graphic.rb +3 -3
- data/lib/uniword/wordprocessingml/graphic_data.rb +3 -3
- data/lib/uniword/wordprocessingml/grid_after.rb +3 -3
- data/lib/uniword/wordprocessingml/grid_before.rb +3 -3
- data/lib/uniword/wordprocessingml/grid_col.rb +3 -3
- data/lib/uniword/wordprocessingml/header.rb +4 -4
- data/lib/uniword/wordprocessingml/header_reference.rb +6 -8
- data/lib/uniword/wordprocessingml/hide_mark.rb +20 -0
- data/lib/uniword/wordprocessingml/hyperlink.rb +14 -32
- data/lib/uniword/wordprocessingml/imprint.rb +3 -3
- data/lib/uniword/wordprocessingml/inline.rb +5 -5
- data/lib/uniword/wordprocessingml/instr_text.rb +7 -6
- data/lib/uniword/wordprocessingml/last_rendered_page_break.rb +2 -2
- data/lib/uniword/wordprocessingml/latent_styles.rb +16 -16
- data/lib/uniword/wordprocessingml/level.rb +50 -16
- data/lib/uniword/wordprocessingml/link.rb +3 -3
- data/lib/uniword/wordprocessingml/lvl_jc.rb +3 -3
- data/lib/uniword/wordprocessingml/lvl_text.rb +3 -3
- data/lib/uniword/wordprocessingml/mc_requires.rb +1 -1
- data/lib/uniword/wordprocessingml/multi_level_type.rb +3 -3
- data/lib/uniword/wordprocessingml/next.rb +3 -3
- data/lib/uniword/wordprocessingml/no_break_hyphen.rb +2 -2
- data/lib/uniword/wordprocessingml/no_wrap.rb +2 -2
- data/lib/uniword/wordprocessingml/num.rb +7 -4
- data/lib/uniword/wordprocessingml/num_fmt.rb +3 -3
- data/lib/uniword/wordprocessingml/numbering.rb +29 -5
- data/lib/uniword/wordprocessingml/numbering_configuration.rb +29 -9
- data/lib/uniword/wordprocessingml/numbering_definition.rb +37 -27
- data/lib/uniword/wordprocessingml/numbering_elements.rb +14 -14
- data/lib/uniword/wordprocessingml/numbering_instance.rb +40 -8
- data/lib/uniword/wordprocessingml/numbering_level.rb +9 -8
- data/lib/uniword/wordprocessingml/object.rb +4 -4
- data/lib/uniword/wordprocessingml/outline.rb +3 -3
- data/lib/uniword/wordprocessingml/p_pr_default.rb +3 -3
- data/lib/uniword/wordprocessingml/page_margins.rb +9 -9
- data/lib/uniword/wordprocessingml/page_numbering.rb +6 -4
- data/lib/uniword/wordprocessingml/page_size.rb +7 -5
- data/lib/uniword/wordprocessingml/paragraph.rb +33 -75
- data/lib/uniword/wordprocessingml/paragraph_borders.rb +9 -11
- data/lib/uniword/wordprocessingml/paragraph_properties.rb +108 -119
- data/lib/uniword/wordprocessingml/paragraph_style.rb +66 -59
- data/lib/uniword/wordprocessingml/pict.rb +3 -3
- data/lib/uniword/wordprocessingml/picture.rb +4 -4
- data/lib/uniword/wordprocessingml/position_tab.rb +5 -5
- data/lib/uniword/wordprocessingml/proof_err.rb +3 -3
- data/lib/uniword/wordprocessingml/r_pr_default.rb +3 -3
- data/lib/uniword/wordprocessingml/recipient_data.rb +5 -5
- data/lib/uniword/wordprocessingml/recipients.rb +5 -4
- data/lib/uniword/wordprocessingml/run.rb +34 -28
- data/lib/uniword/wordprocessingml/run_properties/accessors.rb +74 -0
- data/lib/uniword/wordprocessingml/run_properties/conversion.rb +167 -0
- data/lib/uniword/wordprocessingml/run_properties/predicates.rb +96 -0
- data/lib/uniword/wordprocessingml/run_properties/yaml_transforms.rb +205 -0
- data/lib/uniword/wordprocessingml/run_properties.rb +89 -598
- data/lib/uniword/wordprocessingml/section_properties.rb +29 -19
- data/lib/uniword/wordprocessingml/semi_hidden.rb +3 -3
- data/lib/uniword/wordprocessingml/settings.rb +174 -136
- data/lib/uniword/wordprocessingml/shading.rb +7 -7
- data/lib/uniword/wordprocessingml/shadow.rb +3 -3
- data/lib/uniword/wordprocessingml/shape.rb +5 -5
- data/lib/uniword/wordprocessingml/simple_field.rb +5 -5
- data/lib/uniword/wordprocessingml/simple_pos.rb +4 -4
- data/lib/uniword/wordprocessingml/soft_hyphen.rb +2 -2
- data/lib/uniword/wordprocessingml/start.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/alias.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/appearance.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/bibliography.rb +2 -2
- data/lib/uniword/wordprocessingml/structured_document_tag/content.rb +19 -10
- data/lib/uniword/wordprocessingml/structured_document_tag/data_binding.rb +6 -5
- data/lib/uniword/wordprocessingml/structured_document_tag/date.rb +16 -15
- data/lib/uniword/wordprocessingml/structured_document_tag/doc_part_obj.rb +11 -10
- data/lib/uniword/wordprocessingml/structured_document_tag/end_properties.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/id.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/placeholder.rb +5 -5
- data/lib/uniword/wordprocessingml/structured_document_tag/run_properties.rb +31 -31
- data/lib/uniword/wordprocessingml/structured_document_tag/showing_placeholder_header.rb +2 -2
- data/lib/uniword/wordprocessingml/structured_document_tag/tag.rb +3 -3
- data/lib/uniword/wordprocessingml/structured_document_tag/temporary.rb +2 -2
- data/lib/uniword/wordprocessingml/structured_document_tag/text.rb +5 -2
- data/lib/uniword/wordprocessingml/structured_document_tag.rb +15 -10
- data/lib/uniword/wordprocessingml/structured_document_tag_properties.rb +17 -16
- data/lib/uniword/wordprocessingml/style.rb +48 -171
- data/lib/uniword/wordprocessingml/style_name.rb +3 -3
- data/lib/uniword/wordprocessingml/styles/list_style_definition.rb +2 -2
- data/lib/uniword/wordprocessingml/styles/paragraph_style_definition.rb +3 -2
- data/lib/uniword/wordprocessingml/styles/style_definition.rb +1 -1
- data/lib/uniword/wordprocessingml/styles/style_library.rb +1 -1
- data/lib/uniword/wordprocessingml/styles/table_style_definition.rb +7 -5
- data/lib/uniword/wordprocessingml/styles.rb +4 -2
- data/lib/uniword/wordprocessingml/styles_configuration.rb +47 -19
- data/lib/uniword/wordprocessingml/symbol.rb +4 -4
- data/lib/uniword/wordprocessingml/tab.rb +4 -4
- data/lib/uniword/wordprocessingml/tab_stop.rb +5 -37
- data/lib/uniword/wordprocessingml/table.rb +8 -7
- data/lib/uniword/wordprocessingml/table_borders.rb +8 -8
- data/lib/uniword/wordprocessingml/table_cell.rb +8 -38
- data/lib/uniword/wordprocessingml/table_cell_borders.rb +6 -6
- data/lib/uniword/wordprocessingml/table_cell_margin.rb +7 -7
- data/lib/uniword/wordprocessingml/table_cell_properties.rb +14 -28
- data/lib/uniword/wordprocessingml/table_grid.rb +3 -3
- data/lib/uniword/wordprocessingml/table_properties.rb +18 -253
- data/lib/uniword/wordprocessingml/table_row.rb +9 -25
- data/lib/uniword/wordprocessingml/table_row_properties.rb +13 -9
- data/lib/uniword/wordprocessingml/table_style.rb +3 -3
- data/lib/uniword/wordprocessingml/text.rb +6 -13
- data/lib/uniword/wordprocessingml/text_box_content.rb +7 -6
- data/lib/uniword/wordprocessingml/text_direction.rb +3 -3
- data/lib/uniword/wordprocessingml/title_pg.rb +20 -0
- data/lib/uniword/wordprocessingml/tr_height.rb +4 -4
- data/lib/uniword/wordprocessingml/ui_priority.rb +3 -3
- data/lib/uniword/wordprocessingml/val_int.rb +3 -3
- data/lib/uniword/wordprocessingml/w14_attributes.rb +1 -1
- data/lib/uniword/wordprocessingml/web_settings.rb +30 -7
- data/lib/uniword/wordprocessingml/width_after.rb +4 -4
- data/lib/uniword/wordprocessingml/width_before.rb +4 -4
- data/lib/uniword/wordprocessingml/zoom.rb +3 -3
- data/lib/uniword/wordprocessingml.rb +209 -197
- data/lib/uniword/wordprocessingml_2010/checkbox.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/checked_state.rb +4 -4
- data/lib/uniword/wordprocessingml_2010/conditional_format_style.rb +7 -7
- data/lib/uniword/wordprocessingml_2010/conflict_deletion.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/conflict_insertion.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/conflict_mode.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/custom_xml_conflict_insertion.rb +4 -4
- data/lib/uniword/wordprocessingml_2010/doc_id.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/doc_part_gallery.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/doc_part_obj.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/entity_picker.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/ligatures.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/number_form.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/para_id.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/props3d.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/sdt_content.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/sdt_properties.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/structured_document_tag.rb +4 -4
- data/lib/uniword/wordprocessingml_2010/text_fill.rb +5 -5
- data/lib/uniword/wordprocessingml_2010/text_glow.rb +4 -4
- data/lib/uniword/wordprocessingml_2010/text_id.rb +3 -3
- data/lib/uniword/wordprocessingml_2010/text_outline.rb +6 -6
- data/lib/uniword/wordprocessingml_2010/text_reflection.rb +6 -6
- data/lib/uniword/wordprocessingml_2010/text_shadow.rb +6 -6
- data/lib/uniword/wordprocessingml_2010/unchecked_state.rb +4 -4
- data/lib/uniword/wordprocessingml_2010.rb +30 -26
- data/lib/uniword/wordprocessingml_2013/chart_props.rb +4 -4
- data/lib/uniword/wordprocessingml_2013/chart_tracking_ref_based.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/comment_author.rb +5 -5
- data/lib/uniword/wordprocessingml_2013/comment_collapsed.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/comment_done.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/comment_ex.rb +5 -5
- data/lib/uniword/wordprocessingml_2013/comments_ids.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/doc_part_anchor.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/document_part.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/footnote_columns.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/people_group.rb +4 -4
- data/lib/uniword/wordprocessingml_2013/person.rb +5 -5
- data/lib/uniword/wordprocessingml_2013/presence_info.rb +4 -4
- data/lib/uniword/wordprocessingml_2013/repeating_section.rb +4 -4
- data/lib/uniword/wordprocessingml_2013/repeating_section_item.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/sdt_appearance.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/sdt_color.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/sdt_data_binding.rb +4 -4
- data/lib/uniword/wordprocessingml_2013/web_extension.rb +3 -3
- data/lib/uniword/wordprocessingml_2013/web_extension_linked.rb +3 -3
- data/lib/uniword/wordprocessingml_2013.rb +26 -21
- data/lib/uniword/wordprocessingml_2016/cell_rsid.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/chart_color_style.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/chart_style2016.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/comments_ext.rb +4 -4
- data/lib/uniword/wordprocessingml_2016/conflict_mode2016.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/content_id.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/data_binding2016.rb +5 -5
- data/lib/uniword/wordprocessingml_2016/extension.rb +4 -4
- data/lib/uniword/wordprocessingml_2016/extension_list.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/persistent_document_id.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/row_rsid.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/sdt_appearance2016.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/separator_extension.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/table_rsid.rb +3 -3
- data/lib/uniword/wordprocessingml_2016/web_video_property.rb +4 -4
- data/lib/uniword/wordprocessingml_2016.rb +21 -16
- data/lib/uniword/wp_drawing/align.rb +3 -3
- data/lib/uniword/wp_drawing/allow_overlap.rb +3 -3
- data/lib/uniword/wp_drawing/anchor.rb +29 -27
- data/lib/uniword/wp_drawing/behind_doc.rb +3 -3
- data/lib/uniword/wp_drawing/c_nv_graphic_frame_pr.rb +5 -5
- data/lib/uniword/wp_drawing/doc_pr.rb +7 -7
- data/lib/uniword/wp_drawing/doc_properties.rb +8 -6
- data/lib/uniword/wp_drawing/effect_extent.rb +6 -6
- data/lib/uniword/wp_drawing/extent.rb +4 -4
- data/lib/uniword/wp_drawing/hidden.rb +3 -3
- data/lib/uniword/wp_drawing/inline.rb +16 -11
- data/lib/uniword/wp_drawing/layout_in_cell.rb +3 -3
- data/lib/uniword/wp_drawing/line_to.rb +4 -4
- data/lib/uniword/wp_drawing/locked.rb +3 -3
- data/lib/uniword/wp_drawing/non_visual_drawing_props.rb +6 -4
- data/lib/uniword/wp_drawing/pos_offset.rb +3 -3
- data/lib/uniword/wp_drawing/position_h.rb +5 -5
- data/lib/uniword/wp_drawing/position_v.rb +5 -5
- data/lib/uniword/wp_drawing/relative_height.rb +3 -3
- data/lib/uniword/wp_drawing/simple_pos.rb +4 -4
- data/lib/uniword/wp_drawing/size_rel_h.rb +4 -4
- data/lib/uniword/wp_drawing/size_rel_v.rb +4 -4
- data/lib/uniword/wp_drawing/start.rb +4 -4
- data/lib/uniword/wp_drawing/wrap_none.rb +2 -2
- data/lib/uniword/wp_drawing/wrap_polygon.rb +5 -5
- data/lib/uniword/wp_drawing/wrap_square.rb +8 -8
- data/lib/uniword/wp_drawing/wrap_through.rb +6 -6
- data/lib/uniword/wp_drawing/wrap_tight.rb +6 -6
- data/lib/uniword/wp_drawing/wrap_top_and_bottom.rb +5 -5
- data/lib/uniword/wp_drawing.rb +30 -29
- data/lib/uniword.rb +139 -121
- metadata +583 -41
- data/lib/uniword/document_properties/app_version.rb +0 -22
- data/lib/uniword/document_properties/application.rb +0 -22
- data/lib/uniword/document_properties/bool_value.rb +0 -22
- data/lib/uniword/document_properties/company.rb +0 -22
- data/lib/uniword/document_properties/custom_properties.rb +0 -23
- data/lib/uniword/document_properties/custom_property.rb +0 -37
- data/lib/uniword/document_properties/doc_security.rb +0 -22
- data/lib/uniword/document_properties/extended_properties.rb +0 -41
- data/lib/uniword/document_properties/file_time.rb +0 -22
- data/lib/uniword/document_properties/heading_pairs.rb +0 -23
- data/lib/uniword/document_properties/hyperlinks_changed.rb +0 -22
- data/lib/uniword/document_properties/i4.rb +0 -22
- data/lib/uniword/document_properties/links_up_to_date.rb +0 -22
- data/lib/uniword/document_properties/lpw_str.rb +0 -22
- data/lib/uniword/document_properties/manager.rb +0 -22
- data/lib/uniword/document_properties/scale_crop.rb +0 -22
- data/lib/uniword/document_properties/shared_doc.rb +0 -22
- data/lib/uniword/document_properties/titles_of_parts.rb +0 -23
- data/lib/uniword/document_properties/variant.rb +0 -25
- data/lib/uniword/document_properties/vector.rb +0 -27
- data/lib/uniword/document_properties.rb +0 -32
- data/lib/uniword/metadata/metadata.rb +0 -345
- data/lib/uniword/metadata/metadata_extractor.rb +0 -403
- data/lib/uniword/metadata/metadata_index.rb +0 -455
- data/lib/uniword/metadata/metadata_manager.rb +0 -334
- data/lib/uniword/metadata/metadata_updater.rb +0 -243
- data/lib/uniword/metadata/metadata_validator.rb +0 -326
- data/lib/uniword/metadata.rb +0 -12
- data/lib/uniword/ooxml/docx_package.rb +0 -989
data/README.adoc
CHANGED
|
@@ -4,2183 +4,112 @@ image:https://img.shields.io/gem/v/uniword.svg[Gem Version,link=https://rubygems
|
|
|
4
4
|
image:https://img.shields.io/github/license/metanorma/uniword.svg[License,link=https://github.com/metanorma/uniword/blob/main/LICENSE.txt]
|
|
5
5
|
image:https://github.com/metanorma/uniword/actions/workflows/rake.yml/badge.svg[Build Status,link=https://github.com/metanorma/uniword/actions/workflows/rake.yml]
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Uniword is a Ruby library for reading and writing Microsoft Word documents in DOCX (Word 2007+) and MHTML (Word 2003+) formats, with 100% OOXML specification coverage (760 elements, 22 namespaces) and perfect round-trip fidelity.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
* Documentation: https://metanorma.github.io/uniword[Documentation Site]
|
|
10
|
+
* API Reference: https://www.rubydoc.info/gems/uniword[RubyDoc.info]
|
|
10
11
|
|
|
11
|
-
==
|
|
12
|
-
|
|
13
|
-
* Full DOCX read/write support (Word 2007+)
|
|
14
|
-
* Full MHTML read/write support (Word 2003+)
|
|
15
|
-
* Format conversion (DOCX ↔ MHTML)
|
|
16
|
-
* Styles (paragraph, character, table)
|
|
17
|
-
* Lists (numbered, bulleted, multi-level)
|
|
18
|
-
* Tables with borders and cell merging
|
|
19
|
-
* Images with positioning
|
|
20
|
-
* Headers and footers
|
|
21
|
-
* Text boxes
|
|
22
|
-
* Footnotes and endnotes
|
|
23
|
-
* Bookmarks and cross-references
|
|
24
|
-
* Math formulas (MathML/AsciiMath)
|
|
25
|
-
* Fluent API and Builder pattern
|
|
26
|
-
* Command-line interface
|
|
27
|
-
* Comprehensive error handling
|
|
28
|
-
|
|
29
|
-
== Architecture
|
|
30
|
-
|
|
31
|
-
.High-level architecture of Uniword
|
|
32
|
-
[source]
|
|
33
|
-
----
|
|
34
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
35
|
-
│ Uniword Gem │
|
|
36
|
-
│ (Public API Layer) │
|
|
37
|
-
├─────────────────────────────────────────────────────────────┤
|
|
38
|
-
│ │
|
|
39
|
-
│ ┌────────────────┐ ┌──────────────────┐ │
|
|
40
|
-
│ │ Format Layer │ │ Document Layer │ │
|
|
41
|
-
│ │ │ │ │ │
|
|
42
|
-
│ │ - DOCX Handler │◄──────────┤ - Document Model │ │
|
|
43
|
-
│ │ (Read/Write) │ │ (lutaml-model) │ │
|
|
44
|
-
│ │ - MHTML Handler│ │ - Element Models │ │
|
|
45
|
-
│ │ (Read/Write) │ │ - Style Models │ │
|
|
46
|
-
│ └────────────────┘ └──────────────────┘ │
|
|
47
|
-
│ │ │ │
|
|
48
|
-
│ ▼ ▼ │
|
|
49
|
-
│ ┌────────────────┐ ┌──────────────────┐ │
|
|
50
|
-
│ │ Serialization │ │ Component Layer │ │
|
|
51
|
-
│ │ Layer │ │ │ │
|
|
52
|
-
│ │ │ │ - Paragraphs │ │
|
|
53
|
-
│ │ - XML Parser/ │◄──────────┤ - Tables │ │
|
|
54
|
-
│ │ Serializer │ │ - Images │ │
|
|
55
|
-
│ │ (lutaml) │ │ - Lists │ │
|
|
56
|
-
│ │ - MIME Handler │ │ - Styles │ │
|
|
57
|
-
│ │ - ZIP Handler │ │ - Runs │ │
|
|
58
|
-
│ └────────────────┘ └──────────────────┘ │
|
|
59
|
-
└─────────────────────────────────────────────────────────────┘
|
|
60
|
-
----
|
|
61
|
-
|
|
62
|
-
The architecture follows strict object-oriented principles:
|
|
63
|
-
|
|
64
|
-
* **SOLID principles** - Single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion
|
|
65
|
-
* **MECE (Mutually Exclusive, Collectively Exhaustive)** - Clear separation of concerns with no overlap
|
|
66
|
-
* **Separation of Concerns** - Layered architecture with distinct responsibilities
|
|
67
|
-
* **Design Patterns** - Strategy, Factory, Visitor, Builder, Template Method, Registry, Adapter patterns
|
|
68
|
-
* **Model-Driven Architecture** - Each OOXML part is a separate lutaml-model class
|
|
69
|
-
|
|
70
|
-
== Schema-Driven Architecture
|
|
71
|
-
|
|
72
|
-
Uniword uses a schema-driven architecture where document classes are generated from complete OOXML specification coverage.
|
|
73
|
-
|
|
74
|
-
=== Generated Classes
|
|
75
|
-
|
|
76
|
-
The core API consists of generated classes from 760 OOXML elements across 22 namespaces, providing 100% specification coverage and perfect round-trip fidelity.
|
|
77
|
-
|
|
78
|
-
[source,ruby]
|
|
79
|
-
----
|
|
80
|
-
require 'uniword'
|
|
81
|
-
|
|
82
|
-
# Main document classes
|
|
83
|
-
doc = Uniword::Document.new
|
|
84
|
-
para = doc.add_paragraph("Hello World", bold: true)
|
|
85
|
-
|
|
86
|
-
# All classes support lutaml-model serialization automatically
|
|
87
|
-
xml = doc.to_xml # Automatic XML generation
|
|
88
|
-
doc2 = Uniword::Document.from_xml(xml) # Automatic deserialization
|
|
89
|
-
----
|
|
90
|
-
|
|
91
|
-
=== Extension Methods
|
|
92
|
-
|
|
93
|
-
Generated classes are enhanced with Ruby convenience methods via extension modules, providing a rich, fluent API:
|
|
94
|
-
|
|
95
|
-
[source,ruby]
|
|
96
|
-
----
|
|
97
|
-
doc = Uniword::Document.new
|
|
98
|
-
|
|
99
|
-
# Fluent document building
|
|
100
|
-
doc.add_paragraph("Title", bold: true, size: 24)
|
|
101
|
-
.add_paragraph("Content paragraph", italic: true)
|
|
102
|
-
|
|
103
|
-
# Table creation
|
|
104
|
-
table = doc.add_table(3, 4) # 3 rows, 4 columns
|
|
105
|
-
|
|
106
|
-
# Theme and StyleSet support
|
|
107
|
-
doc.apply_theme('celestial')
|
|
108
|
-
doc.apply_styleset('distinctive')
|
|
109
|
-
|
|
110
|
-
# Save and load
|
|
111
|
-
doc.save('output.docx')
|
|
112
|
-
doc2 = Uniword.load('output.docx')
|
|
113
|
-
----
|
|
114
|
-
|
|
115
|
-
=== Key Benefits
|
|
116
|
-
|
|
117
|
-
* ✅ **100% OOXML Coverage** - All 760 elements from 22 namespaces modeled
|
|
118
|
-
* ✅ **Zero Hardcoding** - All XML generation handled by lutaml-model
|
|
119
|
-
* ✅ **Type Safety** - Strong typing for all attributes and elements
|
|
120
|
-
* ✅ **Perfect Round-Trip** - Guaranteed by complete modeling
|
|
121
|
-
* ✅ **Extension System** - Ruby convenience methods without modifying generated code
|
|
122
|
-
* ✅ **Maintainability** - Changes to OOXML spec only require YAML schema updates
|
|
123
|
-
|
|
124
|
-
=== DocxPackage - Core Architecture
|
|
125
|
-
|
|
126
|
-
Uniword uses a **pure object-oriented approach** where each XML file in the DOCX ZIP package is represented by a dedicated lutaml-model class. This eliminates the serialization/deserialization anti-pattern and provides perfect round-trip fidelity.
|
|
127
|
-
|
|
128
|
-
.DocxPackage structure
|
|
129
|
-
[source,ruby]
|
|
130
|
-
----
|
|
131
|
-
class DocxPackage < Lutaml::Model::Serializable
|
|
132
|
-
# Metadata (fully modeled)
|
|
133
|
-
attribute :core_properties, CoreProperties # docProps/core.xml
|
|
134
|
-
attribute :app_properties, AppProperties # docProps/app.xml
|
|
135
|
-
|
|
136
|
-
# Theme (fully modeled)
|
|
137
|
-
attribute :theme, Theme # word/theme/theme1.xml
|
|
138
|
-
|
|
139
|
-
# Document content (in progress)
|
|
140
|
-
attribute :document, Document # word/document.xml
|
|
141
|
-
attribute :styles, StylesConfiguration # word/styles.xml
|
|
142
|
-
# ... other parts
|
|
143
|
-
|
|
144
|
-
def self.from_file(path)
|
|
145
|
-
# Load DOCX and deserialize all parts
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
def to_file(path)
|
|
149
|
-
# Serialize all parts and package as DOCX
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
----
|
|
153
|
-
|
|
154
|
-
**Benefits of this approach:**
|
|
155
|
-
|
|
156
|
-
* ✅ **Zero hardcoding** - All XML generation handled by lutaml-model
|
|
157
|
-
* ✅ **Type safety** - Strong typing for all attributes
|
|
158
|
-
* ✅ **Perfect round-trip** - Guaranteed by model serialization
|
|
159
|
-
* ✅ **Easy testing** - Each model class is independently testable
|
|
160
|
-
* ✅ **Maintainability** - Changes isolated to model definitions
|
|
161
|
-
|
|
162
|
-
=== Namespace Handling
|
|
163
|
-
|
|
164
|
-
Uniword uses **native namespace support** via lutaml-model v0.7+ XmlNamespace classes:
|
|
165
|
-
|
|
166
|
-
.Namespace definition example
|
|
167
|
-
[source,ruby]
|
|
168
|
-
----
|
|
169
|
-
module Namespaces
|
|
170
|
-
class WordProcessingML < Lutaml::Model::XmlNamespace
|
|
171
|
-
uri 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'
|
|
172
|
-
prefix_default 'w'
|
|
173
|
-
element_form_default :qualified
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
----
|
|
177
|
-
|
|
178
|
-
.Using namespace in models
|
|
179
|
-
[source,ruby]
|
|
180
|
-
----
|
|
181
|
-
class Document < Lutaml::Model::Serializable
|
|
182
|
-
xml do
|
|
183
|
-
root 'document'
|
|
184
|
-
namespace Namespaces::WordProcessingML
|
|
185
|
-
|
|
186
|
-
map_element 'body', to: :body
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
attribute :body, Body
|
|
190
|
-
end
|
|
191
|
-
----
|
|
192
|
-
|
|
193
|
-
**Supported namespaces:**
|
|
194
|
-
|
|
195
|
-
* `w:` - WordProcessingML (main document elements) - ✅ **100 elements (v2.0)**
|
|
196
|
-
* `m:` - Office Math Markup Language (equations) - ✅ **65 elements (v2.0)**
|
|
197
|
-
* `a:` - DrawingML Main (graphics, effects, colors) - ✅ **92 elements (v2.0)**
|
|
198
|
-
* `pic:` - Picture (embedded images) - ✅ **10 elements (v2.0)**
|
|
199
|
-
* `r:` - Relationships (document part relationships) - ✅ **5 elements (v2.0)**
|
|
200
|
-
* `wp:` - DrawingML WordProcessing Drawing (positioning) - ✅ **27 elements (v2.0)**
|
|
201
|
-
* `ct:` - Content Types (MIME type definitions) - ✅ **3 elements (v2.0)**
|
|
202
|
-
* `v:` - VML (legacy compatibility) - ✅ **15 elements (v2.0)**
|
|
203
|
-
* `o:` - Office (shared properties) - ✅ **40 elements (v2.0)**
|
|
204
|
-
* `v:o:` - VML Office extensions - ✅ **25 elements (v2.0)**
|
|
205
|
-
* `dp:` - Document Properties (core/app metadata) - ✅ **20 elements (v2.0)**
|
|
206
|
-
* `w14:` - Word 2010 Extended (enhanced controls, text effects) - ✅ **25 elements (v2.0)**
|
|
207
|
-
* `w15:` - Word 2013 Extended (collaboration, comments) - ✅ **20 elements (v2.0)**
|
|
208
|
-
* `w16:` - Word 2016 Extended (accessibility, modern formatting) - ✅ **15 elements (v2.0)**
|
|
209
|
-
* `xls:` - SpreadsheetML (Excel integration) - ✅ **83 elements (v2.0)**
|
|
210
|
-
* `c:` - Chart (charts and graphs) - ✅ **70 elements (v2.0)**
|
|
211
|
-
* `p:` - PresentationML (PowerPoint integration) - ✅ **50 elements (v2.0)**
|
|
212
|
-
* `cxml:` - Custom XML (structured data integration) - ✅ **29 elements (v2.0)**
|
|
213
|
-
* `b:` - Bibliography (citation management) - ✅ **24 elements (v2.0)**
|
|
214
|
-
* `g:` - Glossary (building blocks, AutoText) - ✅ **19 elements (v2.0)**
|
|
215
|
-
* `st:` - Shared Types (common type definitions) - ✅ **15 elements (v2.0)**
|
|
216
|
-
* `dv:` - Document Variables (variable substitution) - ✅ **10 elements (v2.0)**
|
|
217
|
-
* **Total**: **760/760 elements complete (100.0%)** - 🎉 **PHASE 2 COMPLETE!** 🎉
|
|
218
|
-
|
|
219
|
-
=== Critical Implementation Pattern: lutaml-model Attributes
|
|
220
|
-
|
|
221
|
-
**🚨 THE MOST IMPORTANT RULE FOR CONTRIBUTORS:**
|
|
222
|
-
|
|
223
|
-
When creating or modifying lutaml-model classes, **attributes MUST be declared BEFORE xml mappings**:
|
|
224
|
-
|
|
225
|
-
[source,ruby]
|
|
226
|
-
----
|
|
227
|
-
# ✅ CORRECT - Attributes FIRST
|
|
228
|
-
class MyClass < Lutaml::Model::Serializable
|
|
229
|
-
attribute :my_attr, MyType # Declare attribute first
|
|
230
|
-
|
|
231
|
-
xml do
|
|
232
|
-
element 'myElem'
|
|
233
|
-
namespace Namespaces::WordProcessingML
|
|
234
|
-
map_element 'elem', to: :my_attr # Map after
|
|
235
|
-
end
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# ❌ WRONG - Will NOT serialize
|
|
239
|
-
class MyClass < Lutaml::Model::Serializable
|
|
240
|
-
xml do
|
|
241
|
-
map_element 'elem', to: :my_attr # Mapping before attribute
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
attribute :my_attr, MyType # Too late! Framework doesn't know it exists
|
|
245
|
-
end
|
|
246
|
-
----
|
|
247
|
-
|
|
248
|
-
**Why this matters:**
|
|
249
|
-
|
|
250
|
-
* Lutaml-model builds its internal schema by reading attribute declarations sequentially
|
|
251
|
-
* If xml mappings come first, the framework processes them before knowing attributes exist
|
|
252
|
-
* Result: Serialization produces empty XML, deserialization fails silently
|
|
253
|
-
* This was the root cause of complete document serialization failure in v1.1.0 development
|
|
254
|
-
|
|
255
|
-
**Additional rules:**
|
|
256
|
-
|
|
257
|
-
* Use `mixed_content` for elements with nested content
|
|
258
|
-
* Only ONE namespace declaration per element level
|
|
259
|
-
* Use `render_default: true` for optional elements that must always appear
|
|
260
|
-
* In `initialize`, use `||=` not `=` to preserve lutaml-model parsed values
|
|
261
|
-
|
|
262
|
-
=== v2.0 Architecture: Schema-Driven Generation
|
|
263
|
-
|
|
264
|
-
**Uniword v2.0** introduces a radical architectural improvement: **100% schema-driven OOXML modeling** with ZERO raw XML storage.
|
|
265
|
-
|
|
266
|
-
==== Core Principle
|
|
267
|
-
|
|
268
|
-
NO RAW XML STORAGE - EVER. Every OOXML element is a proper lutaml-model class generated from YAML schemas.
|
|
269
|
-
|
|
270
|
-
==== Schema System
|
|
271
|
-
|
|
272
|
-
.Schema definition example
|
|
273
|
-
[source,yaml]
|
|
274
|
-
----
|
|
275
|
-
# config/ooxml/schemas/wordprocessingml.yml
|
|
276
|
-
namespace:
|
|
277
|
-
uri: 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'
|
|
278
|
-
prefix: 'w'
|
|
279
|
-
|
|
280
|
-
elements:
|
|
281
|
-
p:
|
|
282
|
-
class_name: Paragraph
|
|
283
|
-
description: 'Paragraph - block-level text element'
|
|
284
|
-
attributes:
|
|
285
|
-
- name: properties
|
|
286
|
-
type: ParagraphProperties
|
|
287
|
-
xml_name: pPr
|
|
288
|
-
- name: runs
|
|
289
|
-
type: Run
|
|
290
|
-
collection: true
|
|
291
|
-
xml_name: r
|
|
292
|
-
----
|
|
293
|
-
|
|
294
|
-
==== Model Generation
|
|
295
|
-
|
|
296
|
-
Classes are automatically generated from schemas:
|
|
297
|
-
|
|
298
|
-
[source,ruby]
|
|
299
|
-
----
|
|
300
|
-
require 'uniword/schema/model_generator'
|
|
301
|
-
|
|
302
|
-
generator = Uniword::Schema::ModelGenerator.new('wordprocessingml')
|
|
303
|
-
generator.generate_all
|
|
304
|
-
# => Generates 200+ lutaml-model classes from YAML schema
|
|
305
|
-
----
|
|
306
|
-
|
|
307
|
-
**Generated classes** enforce Pattern 0 (attributes before xml blocks) automatically and provide complete type safety.
|
|
308
|
-
|
|
309
|
-
==== Benefits
|
|
310
|
-
|
|
311
|
-
* ✅ **100% ISO 29500 coverage** - All 600+ OOXML elements modeled
|
|
312
|
-
* ✅ **Zero hardcoding** - All structure defined in YAML
|
|
313
|
-
* ✅ **Perfect round-trip** - Guaranteed by complete modeling
|
|
314
|
-
* ✅ **Easy extensibility** - Add elements by editing YAML
|
|
315
|
-
* ✅ **Community contributions** - Schema editing simpler than code
|
|
316
|
-
|
|
317
|
-
=== Round-Trip Fidelity
|
|
318
|
-
|
|
319
|
-
Uniword achieves **100% round-trip fidelity** for DOCX documents through complete OOXML modeling:
|
|
320
|
-
|
|
321
|
-
* ✅ **Perfect content preservation** - All text, formatting, and structure maintained
|
|
322
|
-
* ✅ **Complete element coverage** - All OOXML elements properly modeled (v2.0)
|
|
323
|
-
* ✅ **Namespace compliance** - All required OOXML namespaces supported
|
|
324
|
-
* ✅ **UTF-8 encoding** - Proper character encoding throughout
|
|
325
|
-
* ✅ **Tested with complex documents** - ISO 8601 scientific documents, MHTML conversion
|
|
326
|
-
* ✅ **Model-driven architecture** - All XML structures represented as Ruby objects
|
|
327
|
-
|
|
328
|
-
.Round-trip example
|
|
329
|
-
[source,ruby]
|
|
330
|
-
----
|
|
331
|
-
# Load document
|
|
332
|
-
original = Uniword::Document.open('complex.docx')
|
|
333
|
-
|
|
334
|
-
# Modify it
|
|
335
|
-
original.add_paragraph("New content")
|
|
336
|
-
|
|
337
|
-
# Save back - EVERYTHING preserved
|
|
338
|
-
original.save('modified.docx')
|
|
339
|
-
|
|
340
|
-
# Verify: modified.docx has ALL original content + new paragraph
|
|
341
|
-
----
|
|
342
|
-
|
|
343
|
-
**Test results:**
|
|
344
|
-
|
|
345
|
-
* ISO 8601 DOCX (295KB): ✅ 100% fidelity
|
|
346
|
-
* MHTML documents: ✅ Content preserved
|
|
347
|
-
* Math equations: ✅ Preserved via m: namespace
|
|
348
|
-
* Bookmarks: ✅ Native support with ID preservation
|
|
349
|
-
* Complex documents: ✅ Perfect round-trip with schema-driven architecture (v2.0)
|
|
350
|
-
|
|
351
|
-
== Installation
|
|
352
|
-
|
|
353
|
-
Add this line to your application's Gemfile:
|
|
354
|
-
|
|
355
|
-
[source,ruby]
|
|
356
|
-
----
|
|
357
|
-
gem 'uniword'
|
|
358
|
-
----
|
|
359
|
-
|
|
360
|
-
And then execute:
|
|
361
|
-
|
|
362
|
-
[source,shell]
|
|
363
|
-
----
|
|
364
|
-
bundle install
|
|
365
|
-
----
|
|
366
|
-
|
|
367
|
-
Or install it yourself as:
|
|
368
|
-
|
|
369
|
-
[source,shell]
|
|
370
|
-
----
|
|
371
|
-
gem install uniword
|
|
372
|
-
----
|
|
373
|
-
|
|
374
|
-
== Architecture: Autoload Strategy
|
|
375
|
-
|
|
376
|
-
Uniword uses Ruby's `autoload` mechanism for lazy loading of most classes, achieving 90% autoload coverage for improved startup performance and maintainability.
|
|
377
|
-
|
|
378
|
-
=== Autoload Coverage
|
|
379
|
-
|
|
380
|
-
* **95 autoload statements**: Classes loaded on-demand when first accessed
|
|
381
|
-
* **10 require_relative statements**: Well-documented exceptions for architectural necessities
|
|
382
|
-
|
|
383
|
-
=== Architectural Exceptions
|
|
384
|
-
|
|
385
|
-
The following 10 files MUST use `require_relative` (not `autoload`):
|
|
386
|
-
|
|
387
|
-
**Base Requirements (2)**::
|
|
388
|
-
* `uniword/version` - Version constants needed by gem metadata
|
|
389
|
-
* `uniword/ooxml/namespaces` - Namespace constants referenced by generated classes
|
|
390
|
-
|
|
391
|
-
**Namespace Modules (6)**::
|
|
392
|
-
* Core namespaces (wordprocessingml, wp_drawing, drawingml, vml, math, shared_types)
|
|
393
|
-
* Required due to deep cross-dependencies with format handlers
|
|
394
|
-
* Constant assignments require immediate class resolution
|
|
395
|
-
|
|
396
|
-
**Format Handlers (2)**::
|
|
397
|
-
* `formats/docx_handler` and `formats/mhtml_handler`
|
|
398
|
-
* Self-registration side effects require eager loading
|
|
399
|
-
|
|
400
|
-
[NOTE]
|
|
401
|
-
====
|
|
402
|
-
These exceptions are architectural necessities, not technical debt. Attempting to autoload these modules would cause NameError or break core functionality.
|
|
403
|
-
====
|
|
404
|
-
|
|
405
|
-
=== Performance Benefits
|
|
406
|
-
|
|
407
|
-
* **Faster startup**: Only essential classes loaded initially
|
|
408
|
-
* **Lower memory footprint**: Unused features don't consume memory
|
|
409
|
-
* **Better maintainability**: Clear separation between eager and lazy loading
|
|
410
|
-
|
|
411
|
-
== Quick start
|
|
412
|
-
|
|
413
|
-
=== Creating documents
|
|
414
|
-
|
|
415
|
-
[source,ruby]
|
|
416
|
-
----
|
|
417
|
-
require 'uniword'
|
|
418
|
-
|
|
419
|
-
# Simple document
|
|
420
|
-
doc = Uniword::Document.new
|
|
421
|
-
para = Uniword::Paragraph.new
|
|
422
|
-
para.add_text("Hello World", bold: true)
|
|
423
|
-
doc.add_element(para)
|
|
424
|
-
doc.save('output.docx')
|
|
425
|
-
----
|
|
426
|
-
|
|
427
|
-
=== Reading documents
|
|
428
|
-
|
|
429
|
-
[source,ruby]
|
|
430
|
-
----
|
|
431
|
-
doc = Uniword::DocumentFactory.from_file('input.docx')
|
|
432
|
-
puts doc.text
|
|
433
|
-
doc.paragraphs.each { |p| puts p.text }
|
|
434
|
-
----
|
|
435
|
-
|
|
436
|
-
== Usage guide
|
|
437
|
-
|
|
438
|
-
=== Text formatting
|
|
439
|
-
|
|
440
|
-
==== Basic text formatting
|
|
441
|
-
|
|
442
|
-
[source,ruby]
|
|
443
|
-
----
|
|
444
|
-
para = Uniword::Paragraph.new
|
|
445
|
-
para.add_text("Bold", bold: true)
|
|
446
|
-
para.add_text(" Italic", italic: true)
|
|
447
|
-
para.add_text(" Underline", underline: 'single')
|
|
448
|
-
para.add_text(" Red text", color: 'FF0000')
|
|
449
|
-
para.add_text(" Large text", size: 24)
|
|
450
|
-
para.add_text(" Custom font", font: 'Arial')
|
|
451
|
-
----
|
|
452
|
-
|
|
453
|
-
==== Combined formatting
|
|
454
|
-
|
|
455
|
-
[source,ruby]
|
|
456
|
-
----
|
|
457
|
-
para = Uniword::Paragraph.new
|
|
458
|
-
para.add_text("Bold italic red",
|
|
459
|
-
bold: true,
|
|
460
|
-
italic: true,
|
|
461
|
-
color: 'FF0000',
|
|
462
|
-
size: 18
|
|
463
|
-
)
|
|
464
|
-
=== Enhanced properties
|
|
465
|
-
|
|
466
|
-
==== Paragraph borders
|
|
467
|
-
|
|
468
|
-
Uniword supports all paragraph border positions with detailed styling options:
|
|
469
|
-
|
|
470
|
-
[source,ruby]
|
|
471
|
-
----
|
|
472
|
-
para = Uniword::Paragraph.new
|
|
473
|
-
para.add_text("Text with borders")
|
|
474
|
-
|
|
475
|
-
# Simple borders (just color)
|
|
476
|
-
para.set_borders(top: "FF0000", bottom: "0000FF")
|
|
477
|
-
|
|
478
|
-
# Detailed borders with style, size, and color
|
|
479
|
-
para.set_borders(
|
|
480
|
-
top: { style: 'single', size: 4, color: 'FF0000' },
|
|
481
|
-
bottom: { style: 'double', size: 6, color: '0000FF' },
|
|
482
|
-
left: { style: 'dashed', size: 4, color: '00FF00' },
|
|
483
|
-
right: { style: 'dotted', size: 4, color: 'FFFF00' }
|
|
484
|
-
)
|
|
485
|
-
|
|
486
|
-
# All border positions available:
|
|
487
|
-
# top, bottom, left, right, between (for consecutive paragraphs), bar
|
|
488
|
-
----
|
|
489
|
-
|
|
490
|
-
**Border styles:** `single`, `double`, `dashed`, `dotted`, `thick`, `thin`, `none`
|
|
491
|
-
|
|
492
|
-
==== Paragraph shading
|
|
493
|
-
|
|
494
|
-
Add background colors and patterns to paragraphs:
|
|
495
|
-
|
|
496
|
-
[source,ruby]
|
|
497
|
-
----
|
|
498
|
-
para = Uniword::Paragraph.new
|
|
499
|
-
para.add_text("Highlighted text")
|
|
500
|
-
|
|
501
|
-
# Simple solid fill
|
|
502
|
-
para.set_shading(fill: "FFFF00")
|
|
503
|
-
|
|
504
|
-
# With pattern and foreground color
|
|
505
|
-
para.set_shading(
|
|
506
|
-
fill: "FFFF00", # Background color
|
|
507
|
-
color: "000000", # Foreground (pattern) color
|
|
508
|
-
pattern: "pct10" # Pattern type
|
|
509
|
-
)
|
|
510
|
-
----
|
|
511
|
-
|
|
512
|
-
**Pattern types:** `clear`, `solid`, `pct5`, `pct10`, `pct15`, `pct20`, `pct25`, `pct30`, `pct35`, `pct40`, `pct45`, `pct50`, `pct55`, `pct60`, `pct65`, `pct70`, `pct75`, `pct80`, `pct85`, `pct90`, `pct95`
|
|
513
|
-
|
|
514
|
-
==== Tab stops
|
|
515
|
-
|
|
516
|
-
Add custom tab stops with alignment and leader characters:
|
|
517
|
-
|
|
518
|
-
[source,ruby]
|
|
519
|
-
----
|
|
520
|
-
para = Uniword::Paragraph.new
|
|
521
|
-
para.add_text("Column 1\tColumn 2\tColumn 3")
|
|
522
|
-
|
|
523
|
-
# Add tab stops
|
|
524
|
-
para.add_tab_stop(position: 1440, alignment: "left") # 1 inch
|
|
525
|
-
para.add_tab_stop(position: 2880, alignment: "center") # 2 inches
|
|
526
|
-
para.add_tab_stop(position: 4320, alignment: "right", leader: "dot") # 3 inches
|
|
527
|
-
|
|
528
|
-
# Multiple tab stops
|
|
529
|
-
para.add_tab_stop(position: 720) # Default left alignment
|
|
530
|
-
para.add_tab_stop(position: 1440, alignment: "center")
|
|
531
|
-
para.add_tab_stop(position: 2160, alignment: "decimal", leader: "dot")
|
|
532
|
-
----
|
|
533
|
-
|
|
534
|
-
**Alignment options:** `left`, `center`, `right`, `decimal`, `bar`
|
|
535
|
-
|
|
536
|
-
**Leader options:** `none`, `dot`, `hyphen`, `underscore`, `heavy`, `middleDot`
|
|
537
|
-
|
|
538
|
-
**Position units:** Twips (1/20th of a point, 1440 twips = 1 inch)
|
|
539
|
-
|
|
540
|
-
==== Character spacing and text effects
|
|
541
|
-
|
|
542
|
-
Enhanced text formatting options for fine-grained control:
|
|
543
|
-
|
|
544
|
-
[source,ruby]
|
|
545
|
-
----
|
|
546
|
-
run = Uniword::Run.new(text: "Enhanced text")
|
|
547
|
-
|
|
548
|
-
# Character spacing (expand or condense)
|
|
549
|
-
run.character_spacing = 20 # Expand by 20 twips (1 point)
|
|
550
|
-
run.character_spacing = -10 # Condense by 10 twips (0.5 point)
|
|
551
|
-
|
|
552
|
-
# Kerning (font kerning threshold)
|
|
553
|
-
run.kerning = 24 # Enable kerning at 24 half-points (12pt)
|
|
554
|
-
|
|
555
|
-
# Raised/lowered position (superscript/subscript effect)
|
|
556
|
-
run.position = 5 # Raise by 5 half-points
|
|
557
|
-
run.position = -5 # Lower by 5 half-points
|
|
558
|
-
|
|
559
|
-
# Text expansion/compression percentage
|
|
560
|
-
run.text_expansion = 120 # 120% width (expanded)
|
|
561
|
-
run.text_expansion = 80 # 80% width (condensed)
|
|
562
|
-
|
|
563
|
-
# Text effects
|
|
564
|
-
run.outline = true # Outline text
|
|
565
|
-
run.shadow = true # Shadow effect
|
|
566
|
-
run.emboss = true # Embossed (raised) effect
|
|
567
|
-
run.imprint = true # Imprinted (depressed) effect
|
|
568
|
-
|
|
569
|
-
# Emphasis marks (Asian typography)
|
|
570
|
-
run.emphasis_mark = "dot" # Dot above/below text
|
|
571
|
-
run.emphasis_mark = "comma" # Comma mark
|
|
572
|
-
run.emphasis_mark = "circle" # Circle mark
|
|
573
|
-
run.emphasis_mark = "underDot" # Dot below text
|
|
574
|
-
|
|
575
|
-
# Language settings
|
|
576
|
-
run.language = "en-US" # Set text language for spell-checking
|
|
577
|
-
----
|
|
578
|
-
|
|
579
|
-
==== Run shading
|
|
580
|
-
|
|
581
|
-
Apply background colors to character runs:
|
|
582
|
-
|
|
583
|
-
[source,ruby]
|
|
584
|
-
----
|
|
585
|
-
run = Uniword::Run.new(text: "Highlighted")
|
|
586
|
-
|
|
587
|
-
# Simple shading
|
|
588
|
-
run.set_shading(fill: "FFFF00", pattern: "solid")
|
|
589
|
-
|
|
590
|
-
# With foreground color and pattern
|
|
591
|
-
run.set_shading(
|
|
592
|
-
fill: "FFFF00", # Background
|
|
593
|
-
color: "000000", # Foreground
|
|
594
|
-
pattern: "pct10" # 10% pattern
|
|
595
|
-
)
|
|
596
|
-
----
|
|
597
|
-
|
|
598
|
-
==== Complex combinations
|
|
599
|
-
|
|
600
|
-
All enhanced properties can be combined freely:
|
|
601
|
-
|
|
602
|
-
[source,ruby]
|
|
603
|
-
----
|
|
604
|
-
# Paragraph with borders, shading, and tabs
|
|
605
|
-
para = Uniword::Paragraph.new
|
|
606
|
-
para.add_text("Professional formatting")
|
|
607
|
-
para.set_borders(top: "000000", bottom: "000000")
|
|
608
|
-
para.set_shading(fill: "F0F0F0", pattern: "solid")
|
|
609
|
-
para.add_tab_stop(position: 1440, alignment: "center")
|
|
610
|
-
|
|
611
|
-
# Run with multiple effects
|
|
612
|
-
run = para.runs.first
|
|
613
|
-
run.character_spacing = 20
|
|
614
|
-
run.kerning = 24
|
|
615
|
-
run.position = 5
|
|
616
|
-
run.outline = true
|
|
617
|
-
run.shadow = true
|
|
618
|
-
run.set_shading(fill: "FFFF00")
|
|
619
|
-
----
|
|
620
|
-
|
|
621
|
-
=== Styles
|
|
622
|
-
|
|
623
|
-
==== Using built-in styles
|
|
624
|
-
|
|
625
|
-
[source,ruby]
|
|
626
|
-
----
|
|
627
|
-
# Heading styles
|
|
628
|
-
heading = Uniword::Paragraph.new
|
|
629
|
-
heading.set_style('Heading1')
|
|
630
|
-
heading.add_text("Chapter 1")
|
|
631
|
-
|
|
632
|
-
# Normal style
|
|
633
|
-
para = Uniword::Paragraph.new
|
|
634
|
-
para.set_style('Normal')
|
|
635
|
-
para.add_text("Body text")
|
|
636
|
-
----
|
|
637
|
-
|
|
638
|
-
==== Creating custom styles
|
|
639
|
-
|
|
640
|
-
[source,ruby]
|
|
641
|
-
----
|
|
642
|
-
# Create custom paragraph style
|
|
643
|
-
doc.styles_configuration.create_paragraph_style(
|
|
644
|
-
'CustomStyle',
|
|
645
|
-
'My Custom Style',
|
|
646
|
-
paragraph_properties: Uniword::Properties::ParagraphProperties.new(
|
|
647
|
-
alignment: 'center',
|
|
648
|
-
spacing_before: 240,
|
|
649
|
-
spacing_after: 120
|
|
650
|
-
),
|
|
651
|
-
run_properties: Uniword::Properties::RunProperties.new(
|
|
652
|
-
bold: true,
|
|
653
|
-
color: '0000FF',
|
|
654
|
-
size: 24
|
|
655
|
-
)
|
|
656
|
-
)
|
|
657
|
-
|
|
658
|
-
# Use custom style
|
|
659
|
-
para = Uniword::Paragraph.new
|
|
660
|
-
para.set_style('CustomStyle')
|
|
661
|
-
para.add_text("Styled text")
|
|
662
|
-
----
|
|
663
|
-
|
|
664
|
-
=== StyleSets
|
|
665
|
-
|
|
666
|
-
==== What are StyleSets
|
|
667
|
-
|
|
668
|
-
StyleSets are collections of professionally designed style definitions provided by Microsoft Office.
|
|
669
|
-
They work alongside themes to create beautifully formatted documents with consistent styling.
|
|
670
|
-
|
|
671
|
-
A StyleSet (.dotx file) contains:
|
|
672
|
-
|
|
673
|
-
* Style definitions for headings, body text, quotes, etc.
|
|
674
|
-
* Paragraph formatting (spacing, indentation, alignment)
|
|
675
|
-
* Character formatting (fonts, colors, sizes)
|
|
676
|
-
* Table styles
|
|
677
|
-
|
|
678
|
-
==== Loading StyleSets from .dotx files
|
|
679
|
-
|
|
680
|
-
[source,ruby]
|
|
681
|
-
----
|
|
682
|
-
# Load StyleSet from .dotx file
|
|
683
|
-
styleset = Uniword::StyleSet.from_dotx('path/to/Distinctive.dotx')
|
|
684
|
-
|
|
685
|
-
puts styleset.name
|
|
686
|
-
# => "Distinctive"
|
|
687
|
-
|
|
688
|
-
puts styleset.styles.count
|
|
689
|
-
# => 42
|
|
690
|
-
|
|
691
|
-
# Apply to document
|
|
692
|
-
doc = Uniword::Document.new
|
|
693
|
-
styleset.apply_to(doc)
|
|
694
|
-
|
|
695
|
-
# Now document has all Distinctive styles
|
|
696
|
-
doc.add_paragraph("Heading", heading: :heading_1)
|
|
697
|
-
doc.save('output.docx')
|
|
698
|
-
----
|
|
699
|
-
|
|
700
|
-
==== Using bundled StyleSets
|
|
701
|
-
|
|
702
|
-
Uniword includes all Office StyleSets as bundled YAML files for fast loading:
|
|
703
|
-
|
|
704
|
-
[source,ruby]
|
|
705
|
-
----
|
|
706
|
-
# Load bundled StyleSet by name
|
|
707
|
-
styleset = Uniword::StyleSet.load('distinctive')
|
|
708
|
-
|
|
709
|
-
# Apply to document
|
|
710
|
-
doc = Uniword::Document.new
|
|
711
|
-
styleset.apply_to(doc)
|
|
712
|
-
|
|
713
|
-
# Or use shorthand method
|
|
714
|
-
doc.apply_styleset('distinctive')
|
|
715
|
-
|
|
716
|
-
# List available bundled StyleSets
|
|
717
|
-
available = Uniword::StyleSet.available_stylesets
|
|
718
|
-
# => ["distinctive", "elegant", "fancy", "formal", ...]
|
|
719
|
-
----
|
|
720
|
-
|
|
721
|
-
==== Combining themes and StyleSets
|
|
722
|
-
|
|
723
|
-
Themes define colors and fonts, while StyleSets define style formatting.
|
|
724
|
-
Use them together for professional documents:
|
|
725
|
-
|
|
726
|
-
[source,ruby]
|
|
727
|
-
----
|
|
728
|
-
doc = Uniword::Document.new
|
|
729
|
-
|
|
730
|
-
# Apply theme (colors and fonts)
|
|
731
|
-
doc.apply_theme('celestial')
|
|
732
|
-
|
|
733
|
-
# Apply StyleSet (style definitions)
|
|
734
|
-
doc.apply_styleset('distinctive')
|
|
735
|
-
|
|
736
|
-
# Use the styled content
|
|
737
|
-
doc.add_paragraph('Document Title', heading: :heading_1)
|
|
738
|
-
doc.add_paragraph('Introduction paragraph with consistent styling.')
|
|
739
|
-
|
|
740
|
-
doc.save('professional_document.docx')
|
|
741
|
-
----
|
|
742
|
-
|
|
743
|
-
==== StyleSet conflict resolution strategies
|
|
744
|
-
|
|
745
|
-
When applying a StyleSet, you can control how conflicts with existing styles are handled:
|
|
746
|
-
|
|
747
|
-
[source,ruby]
|
|
748
|
-
----
|
|
749
|
-
# Keep existing styles, add only new ones (default)
|
|
750
|
-
styleset.apply_to(doc, strategy: :keep_existing)
|
|
751
|
-
|
|
752
|
-
# Replace existing styles with StyleSet styles
|
|
753
|
-
styleset.apply_to(doc, strategy: :replace)
|
|
754
|
-
|
|
755
|
-
# Keep both, rename imported styles
|
|
756
|
-
styleset.apply_to(doc, strategy: :rename)
|
|
757
|
-
----
|
|
758
|
-
|
|
759
|
-
==== StyleSet implementation status
|
|
760
|
-
|
|
761
|
-
✅ **Phase 3 Session 5 COMPLETE (November 30, 2024)** - ALL 25 PROPERTIES IMPLEMENTED! 🎉
|
|
762
|
-
|
|
763
|
-
* **24 StyleSets supported** - 12 style-sets + 12 quick-styles from `.dotx` files
|
|
764
|
-
* **168/168 tests passing** - Perfect serialization and round-trip preservation (100% success rate)
|
|
765
|
-
* **25/25 properties implemented** - 100% property coverage achieved!
|
|
766
|
-
* 20 simple properties ✅
|
|
767
|
-
* 5 complex properties ✅
|
|
768
|
-
* **Correct architecture** - Uses lutaml-model v0.7+ with namespaced custom types, no backward compatibility cruft
|
|
769
|
-
* **Week 1 complete** - Finished 2 days ahead of schedule!
|
|
770
|
-
|
|
771
|
-
**Simple properties preserved in round-trip (20/20 complete):**
|
|
772
|
-
|
|
773
|
-
_Paragraph Properties:_
|
|
774
|
-
* ✅ Paragraph alignment (left, center, right, both, distribute)
|
|
775
|
-
* ✅ Style references (paragraph and run styles)
|
|
776
|
-
* ✅ Outline levels (0-9 for table of contents)
|
|
777
|
-
* ✅ Numbering ID (list reference) - link:lib/uniword/properties/numbering_id.rb[numbering_id.rb]
|
|
778
|
-
* ✅ Numbering level (0-8 nesting) - link:lib/uniword/properties/numbering_level.rb[numbering_level.rb]
|
|
779
|
-
* ✅ Keep with next paragraph (boolean)
|
|
780
|
-
* ✅ Keep lines together (boolean)
|
|
781
|
-
* ✅ Page break before (boolean)
|
|
782
|
-
* ✅ Widow/orphan control (boolean, default on)
|
|
783
|
-
* ✅ Contextual spacing (boolean)
|
|
784
|
-
|
|
785
|
-
_Run Properties:_
|
|
786
|
-
* ✅ Font sizes (regular and complex script) in half-points
|
|
787
|
-
* ✅ Font colors (RGB hex values)
|
|
788
|
-
* ✅ Underline styles (single, double, dashed, etc.) - link:lib/uniword/properties/underline.rb[underline.rb]
|
|
789
|
-
* ✅ Highlight colors (yellow, green, cyan, etc.) - link:lib/uniword/properties/highlight.rb[highlight.rb]
|
|
790
|
-
* ✅ Vertical alignment (superscript, subscript, baseline) - link:lib/uniword/properties/vertical_align.rb[vertical_align.rb]
|
|
791
|
-
* ✅ Position (raised/lowered text in half-points) - link:lib/uniword/properties/position.rb[position.rb]
|
|
792
|
-
* ✅ Character spacing (expand/condense in twips) - link:lib/uniword/properties/character_spacing.rb[character_spacing.rb]
|
|
793
|
-
* ✅ Kerning (threshold in half-points) - link:lib/uniword/properties/kerning.rb[kerning.rb]
|
|
794
|
-
* ✅ Width scale (percentage 50-600) - link:lib/uniword/properties/width_scale.rb[width_scale.rb]
|
|
795
|
-
* ✅ Emphasis marks (dot, comma, circle, etc.) - link:lib/uniword/properties/emphasis_mark.rb[emphasis_mark.rb]
|
|
796
|
-
|
|
797
|
-
_Complex Properties (5/5 complete):_
|
|
798
|
-
* ✅ Spacing (before, after, line spacing with complex object)
|
|
799
|
-
* ✅ Indentation (left, right, first-line, hanging with complex object)
|
|
800
|
-
* ✅ Font families (ASCII, East Asian, complex script with RunFonts object)
|
|
801
|
-
* ✅ Borders (top/bottom/left/right with style, size, color) - link:lib/uniword/properties/borders.rb[borders.rb], link:lib/uniword/properties/border.rb[border.rb]
|
|
802
|
-
* ✅ Tabs (tab stop collection with alignment, position, leader) - link:lib/uniword/properties/tabs.rb[tabs.rb], link:lib/uniword/properties/tab_stop.rb[tab_stop.rb]
|
|
803
|
-
* ✅ Shading (background fill with pattern, color, fill) - link:lib/uniword/properties/shading.rb[shading.rb]
|
|
804
|
-
* ✅ Language (language settings for val/eastAsia/bidi scripts) - link:lib/uniword/properties/language.rb[language.rb]
|
|
805
|
-
* ✅ TextEffects (text fill and outline - basic solid color support) - link:lib/uniword/properties/text_fill.rb[text_fill.rb], link:lib/uniword/properties/text_outline.rb[text_outline.rb]
|
|
806
|
-
|
|
807
|
-
_Boolean Flags:_
|
|
808
|
-
* ✅ Bold, italic, small caps, caps, hidden, strike-through
|
|
809
|
-
|
|
810
|
-
**Implementation details:**
|
|
811
|
-
* Pattern documented in link:old-docs/CORRECTED_PROPERTY_SERIALIZATION_PATTERN.md[CORRECTED_PROPERTY_SERIALIZATION_PATTERN.md] (archived)
|
|
812
|
-
* Uses namespaced custom types (e.g., `AlignmentValue < Lutaml::Model::Type::String`)
|
|
813
|
-
* Proper element syntax (`element 'jc'` not obsolete `root`)
|
|
814
|
-
* Namespace class references (not inline strings)
|
|
815
|
-
* Single clean attributes (no dual attributes or _obj suffixes)
|
|
816
|
-
* Attributes declared BEFORE xml mappings (Pattern 0 - CRITICAL)
|
|
817
|
-
|
|
818
|
-
**Phase 3 Week 1 COMPLETE!** ✅ Week 2 (Theme Round-Trip) next - See link:PHASE3_WEEK2_CONTINUATION_PROMPT.md[Phase 3 Week 2 Plan]
|
|
819
|
-
|
|
820
|
-
==== Available Office StyleSets
|
|
821
|
-
|
|
822
|
-
Uniword bundles the following Office StyleSets:
|
|
823
|
-
|
|
824
|
-
* **Basic (Word 2010)** - Simple, clean formatting
|
|
825
|
-
* **Distinctive** - Bold headings with color accents
|
|
826
|
-
* **Elegant** - Refined, professional appearance
|
|
827
|
-
* **Fancy** - Decorative, attention-grabbing
|
|
828
|
-
* **Formal** - Traditional business document styling
|
|
829
|
-
* **Manuscript** - Book-style formatting
|
|
830
|
-
* **Modern** - Contemporary, minimalist design
|
|
831
|
-
* **Newsprint** - Newspaper-style columns and headers
|
|
832
|
-
* **Perspective** - Dynamic, angled headings
|
|
833
|
-
* **Simple** - Minimal, unobtrusive formatting
|
|
834
|
-
* **Thatch** - Textured, organic appearance
|
|
835
|
-
* **Traditional** - Classic document styling
|
|
836
|
-
|
|
837
|
-
=== Themes
|
|
838
|
-
|
|
839
|
-
==== What are Themes
|
|
840
|
-
|
|
841
|
-
Themes are color and font scheme definitions provided by Microsoft Office that control the visual appearance of documents. They work alongside StyleSets to create beautifully formatted documents with consistent colors and typography.
|
|
842
|
-
|
|
843
|
-
A theme (.thmx file) contains:
|
|
844
|
-
|
|
845
|
-
* Color scheme (12 theme colors: 2 dark, 2 light, 6 accents, 2 hyperlinks)
|
|
846
|
-
* Font scheme (major fonts for headings, minor fonts for body text)
|
|
847
|
-
* Effect scheme (3D effects, shadows, reflections)
|
|
848
|
-
|
|
849
|
-
==== Loading themes from .thmx files
|
|
850
|
-
|
|
851
|
-
[source,ruby]
|
|
852
|
-
----
|
|
853
|
-
# Load theme from .thmx file
|
|
854
|
-
theme = Uniword::Theme.from_thmx('path/to/Celestial.thmx')
|
|
855
|
-
|
|
856
|
-
puts theme.name
|
|
857
|
-
# => "Celestial"
|
|
858
|
-
|
|
859
|
-
# Apply to document
|
|
860
|
-
doc = Uniword::Document.new
|
|
861
|
-
doc.theme = theme
|
|
862
|
-
|
|
863
|
-
# Theme colors and fonts now available
|
|
864
|
-
doc.save('output.docx')
|
|
865
|
-
----
|
|
866
|
-
|
|
867
|
-
==== Using bundled themes
|
|
868
|
-
|
|
869
|
-
Uniword includes all 28 Office themes as bundled YAML files for fast loading:
|
|
870
|
-
|
|
871
|
-
[source,ruby]
|
|
872
|
-
----
|
|
873
|
-
# Load bundled theme by name
|
|
874
|
-
theme = Uniword::Theme.load('celestial')
|
|
875
|
-
|
|
876
|
-
# Apply to document
|
|
877
|
-
doc = Uniword::Document.new
|
|
878
|
-
doc.theme = theme
|
|
879
|
-
|
|
880
|
-
# Or use shorthand method
|
|
881
|
-
doc.apply_theme('celestial')
|
|
882
|
-
|
|
883
|
-
# List available bundled themes
|
|
884
|
-
available = Uniword::Theme.available_themes
|
|
885
|
-
# => ["atlas", "badge", "berlin", "celestial", ...]
|
|
886
|
-
----
|
|
887
|
-
|
|
888
|
-
==== Combining themes and StyleSets
|
|
889
|
-
|
|
890
|
-
Themes and StyleSets work together for professional documents:
|
|
891
|
-
|
|
892
|
-
[source,ruby]
|
|
893
|
-
----
|
|
894
|
-
doc = Uniword::Document.new
|
|
895
|
-
|
|
896
|
-
# Apply theme (colors and fonts)
|
|
897
|
-
doc.apply_theme('celestial')
|
|
898
|
-
|
|
899
|
-
# Apply StyleSet (style definitions)
|
|
900
|
-
doc.apply_styleset('distinctive')
|
|
901
|
-
|
|
902
|
-
# Content uses theme colors and StyleSet formatting
|
|
903
|
-
doc.add_paragraph('Title', heading: :heading_1)
|
|
904
|
-
doc.add_paragraph('Body text in theme colors.')
|
|
905
|
-
|
|
906
|
-
doc.save('professional_document.docx')
|
|
907
|
-
----
|
|
908
|
-
|
|
909
|
-
==== Theme implementation status
|
|
910
|
-
|
|
911
|
-
✅ **Phase 3 Session 5 COMPLETE (December 1, 2024)** - ALL 29 THEMES 100% ROUND-TRIP! 🎉
|
|
912
|
-
|
|
913
|
-
* **29 Office themes supported** - All themes from Office 2007-2024
|
|
914
|
-
* **174/174 tests passing** - Perfect serialization and round-trip preservation (100% success rate)
|
|
915
|
-
* **Complete DrawingML support** - All 92 DrawingML elements modeled
|
|
916
|
-
* **Correct architecture** - Pure lutaml-model, no raw XML storage
|
|
917
|
-
* **Phase 3 Week 2 complete** - Achieved 100% fidelity!
|
|
918
|
-
|
|
919
|
-
**Theme components implemented:**
|
|
920
|
-
|
|
921
|
-
_Color System (12 theme colors):_
|
|
922
|
-
* ✅ SchemeColor with 10 color modifiers (alpha, tint, shade, etc.)
|
|
923
|
-
* ✅ SrgbColor with 10 color modifiers
|
|
924
|
-
* ✅ Color scheme (dk1, lt1, dk2, lt2, accent1-6, hlink, folHlink)
|
|
925
|
-
|
|
926
|
-
_Font System:_
|
|
927
|
-
* ✅ Font scheme (major/minor fonts with latin, eastAsian, complex script variants)
|
|
928
|
-
* ✅ Font substitution table for compatibility
|
|
929
|
-
* ✅ Empty attribute preservation (typeface="" cases)
|
|
930
|
-
|
|
931
|
-
_Effects System:_
|
|
932
|
-
* ✅ Format scheme (line styles, fill styles, effect styles, background fills)
|
|
933
|
-
* ✅ EffectList (glow, inner/outer shadow, reflection, soft edge)
|
|
934
|
-
* ✅ 3D effects (Scene3D, Shape3D, Camera, LightRig, Rotation, BevelTop)
|
|
935
|
-
|
|
936
|
-
_Graphics:_
|
|
937
|
-
* ✅ Gradient fills (linear, path, rotWithShape)
|
|
938
|
-
* ✅ Solid fills with scheme/RGB colors
|
|
939
|
-
* ✅ BlipFill for background images
|
|
940
|
-
* ✅ Line properties (solid, gradient, pattern fills)
|
|
941
|
-
* ✅ Duotone effects
|
|
942
|
-
|
|
943
|
-
_Object Defaults:_
|
|
944
|
-
* ✅ Line defaults with style references
|
|
945
|
-
* ✅ Style matrix (line/fill/effect/font references)
|
|
946
|
-
* ✅ Shape and body properties
|
|
947
|
-
|
|
948
|
-
**Critical fixes that achieved 100%:**
|
|
949
|
-
* ✅ Blip namespace fix (r:embed attribute) - Fixed 10 themes!
|
|
950
|
-
* ✅ SoftEdge integration to EffectList - Fixed 1 theme (Wood Type)
|
|
951
|
-
* ✅ ObjectDefaults architecture - Fixed 1 theme (Office Theme)
|
|
952
|
-
* ✅ Transform2D bug fix (false→:off)
|
|
953
|
-
|
|
954
|
-
**Round-trip guarantee:**
|
|
955
|
-
All 29 themes achieve perfect round-trip fidelity - load a .thmx file, serialize it back, and the XML is semantically equivalent (verified with Canon gem).
|
|
956
|
-
|
|
957
|
-
**Test results:**
|
|
958
|
-
```
|
|
959
|
-
Theme Round-Trip: 174 examples, 0 failures (100%) ✅
|
|
960
|
-
StyleSet Round-Trip: 168 examples, 0 failures (100%) ✅
|
|
961
|
-
Total: 342/342 (100%) ✅
|
|
962
|
-
```
|
|
963
|
-
|
|
964
|
-
==== Available Office Themes
|
|
965
|
-
|
|
966
|
-
Uniword bundles the following Office themes:
|
|
967
|
-
|
|
968
|
-
* **Atlas** - Modern, professional blue-gray palette
|
|
969
|
-
* **Badge** - Bold, attention-grabbing design
|
|
970
|
-
* **Berlin** - Cool, contemporary color scheme
|
|
971
|
-
* **Celestial** - Cosmic, purple-blue gradients
|
|
972
|
-
* **Crop** - Nature-inspired green tones
|
|
973
|
-
* **Depth** - Rich, layered colors
|
|
974
|
-
* **Droplet** - Fresh, water-inspired blues
|
|
975
|
-
* **Facet** - Geometric, modern design
|
|
976
|
-
* **Feathered** - Soft, elegant colors
|
|
977
|
-
* **Gallery** - Artistic, creative palette
|
|
978
|
-
* **Headlines** - Bold, newspaper-style
|
|
979
|
-
* **Integral** - Integrated, balanced colors
|
|
980
|
-
* **Ion** - Electric, energetic design
|
|
981
|
-
* **Ion Boardroom** - Professional Ion variant
|
|
982
|
-
* **Madison** - Classic, refined styling
|
|
983
|
-
* **Main Event** - Celebratory, vibrant
|
|
984
|
-
* **Mesh** - Interconnected, network design
|
|
985
|
-
* **Office 2013-2022 Theme** - Default Office theme
|
|
986
|
-
* **Office Theme** - Classic Office styling
|
|
987
|
-
* **Organic** - Natural, earthy tones
|
|
988
|
-
* **Parallax** - Layered, depth effect
|
|
989
|
-
* **Parcel** - Packaged, contained design
|
|
990
|
-
* **Retrospect** - Nostalgic, vintage colors
|
|
991
|
-
* **Savon** - Clean, soap-inspired palette
|
|
992
|
-
* **Slice** - Sharp, geometric cuts
|
|
993
|
-
* **Vapor Trail** - Ethereal, flowing design
|
|
994
|
-
* **View** - Perspective, architectural
|
|
995
|
-
* **Wisp** - Delicate, light colors
|
|
996
|
-
* **Wood Type** - Woodgrain, natural textures
|
|
997
|
-
|
|
998
|
-
=== Building Blocks (Glossary)
|
|
999
|
-
|
|
1000
|
-
==== What are Building Blocks
|
|
1001
|
-
|
|
1002
|
-
Building Blocks are reusable content pieces provided by Microsoft Word, also known as Glossary documents. They allow users to insert pre-formatted content like headers, footers, cover pages, tables of contents, equations, and custom text blocks into documents.
|
|
1003
|
-
|
|
1004
|
-
A Building Block (.dotx template) contains:
|
|
1005
|
-
|
|
1006
|
-
* **Document Parts** - Individual building block entries
|
|
1007
|
-
* **Properties** - Name, category, gallery, behaviors, description, style, GUID
|
|
1008
|
-
* **Content** - Paragraphs, tables, and structured document tags (SDTs)
|
|
1009
|
-
|
|
1010
|
-
==== Understanding Building Block Structure
|
|
1011
|
-
|
|
1012
|
-
.Building Block hierarchy
|
|
1013
|
-
[source]
|
|
1014
|
-
----
|
|
1015
|
-
GlossaryDocument (root)
|
|
1016
|
-
└── DocParts (collection container)
|
|
1017
|
-
└── DocPart (individual building block)
|
|
1018
|
-
├── DocPartProperties (metadata)
|
|
1019
|
-
│ ├── DocPartName (display name)
|
|
1020
|
-
│ ├── StyleId (associated paragraph style)
|
|
1021
|
-
│ ├── DocPartCategory
|
|
1022
|
-
│ │ ├── CategoryName (e.g., "General")
|
|
1023
|
-
│ │ └── DocPartGallery (e.g., "hdrs", "ftrs", "coverPg")
|
|
1024
|
-
│ ├── DocPartBehaviors (insertion behavior)
|
|
1025
|
-
│ │ └── DocPartBehavior (e.g., "content", "page", "para")
|
|
1026
|
-
│ ├── DocPartDescription (help text)
|
|
1027
|
-
│ └── DocPartId (unique GUID)
|
|
1028
|
-
└── DocPartBody (actual content)
|
|
1029
|
-
├── Paragraphs (formatted text)
|
|
1030
|
-
├── Tables (structured data)
|
|
1031
|
-
└── StructuredDocumentTags (fields)
|
|
1032
|
-
----
|
|
1033
|
-
|
|
1034
|
-
==== Loading Building Blocks
|
|
1035
|
-
|
|
1036
|
-
[source,ruby]
|
|
1037
|
-
----
|
|
1038
|
-
require 'uniword'
|
|
1039
|
-
|
|
1040
|
-
# Load a .dotx template with building blocks
|
|
1041
|
-
doc = Uniword::Document.open('template.dotx')
|
|
1042
|
-
glossary = doc.glossary_document
|
|
1043
|
-
|
|
1044
|
-
# Access building blocks
|
|
1045
|
-
glossary.doc_parts.doc_part.each do |part|
|
|
1046
|
-
props = part.doc_part_pr
|
|
1047
|
-
|
|
1048
|
-
puts "Name: #{props.name.val}"
|
|
1049
|
-
puts "Gallery: #{props.category.gallery.val}"
|
|
1050
|
-
puts "Category: #{props.category.name.val}"
|
|
1051
|
-
puts "Description: #{props.description&.val}"
|
|
1052
|
-
puts "Style: #{props.style&.val}"
|
|
1053
|
-
puts "GUID: #{props.guid.val}"
|
|
1054
|
-
|
|
1055
|
-
# Access content
|
|
1056
|
-
part.doc_part_body.paragraphs.each do |para|
|
|
1057
|
-
puts " - #{para.text}"
|
|
1058
|
-
end
|
|
1059
|
-
end
|
|
1060
|
-
----
|
|
1061
|
-
|
|
1062
|
-
==== Creating Building Blocks
|
|
1063
|
-
|
|
1064
|
-
[source,ruby]
|
|
1065
|
-
----
|
|
1066
|
-
require 'uniword'
|
|
1067
|
-
|
|
1068
|
-
# Create new glossary document
|
|
1069
|
-
glossary = Uniword::Glossary::GlossaryDocument.new
|
|
1070
|
-
glossary.doc_parts = Uniword::Glossary::DocParts.new
|
|
1071
|
-
|
|
1072
|
-
# Create a custom building block
|
|
1073
|
-
part = Uniword::Glossary::DocPart.new
|
|
1074
|
-
|
|
1075
|
-
# Set properties
|
|
1076
|
-
part.doc_part_pr = Uniword::Glossary::DocPartProperties.new
|
|
1077
|
-
|
|
1078
|
-
# Name (required)
|
|
1079
|
-
part.doc_part_pr.name = Uniword::Glossary::DocPartName.new(
|
|
1080
|
-
val: 'Company Header'
|
|
1081
|
-
)
|
|
1082
|
-
|
|
1083
|
-
# Style reference (optional)
|
|
1084
|
-
part.doc_part_pr.style = Uniword::Glossary::StyleId.new(
|
|
1085
|
-
val: 'Heading 1'
|
|
1086
|
-
)
|
|
1087
|
-
|
|
1088
|
-
# Unique identifier (required)
|
|
1089
|
-
part.doc_part_pr.guid = Uniword::Glossary::DocPartId.new(
|
|
1090
|
-
val: '{12345678-1234-1234-1234-123456789012}'
|
|
1091
|
-
)
|
|
1092
|
-
|
|
1093
|
-
# Category and gallery (required)
|
|
1094
|
-
part.doc_part_pr.category = Uniword::Glossary::DocPartCategory.new
|
|
1095
|
-
part.doc_part_pr.category.name = Uniword::Glossary::CategoryName.new(
|
|
1096
|
-
val: 'General'
|
|
1097
|
-
)
|
|
1098
|
-
part.doc_part_pr.category.gallery = Uniword::Glossary::DocPartGallery.new(
|
|
1099
|
-
val: 'hdrs' # Headers gallery
|
|
1100
|
-
)
|
|
1101
|
-
|
|
1102
|
-
# Behaviors (optional)
|
|
1103
|
-
part.doc_part_pr.behaviors = Uniword::Glossary::DocPartBehaviors.new
|
|
1104
|
-
behavior = Uniword::Glossary::DocPartBehavior.new(val: 'content')
|
|
1105
|
-
part.doc_part_pr.behaviors.behavior << behavior
|
|
1106
|
-
|
|
1107
|
-
# Description (optional)
|
|
1108
|
-
part.doc_part_pr.description = Uniword::Glossary::DocPartDescription.new(
|
|
1109
|
-
val: 'Standard company header with logo and contact info'
|
|
1110
|
-
)
|
|
1111
|
-
|
|
1112
|
-
# Create content
|
|
1113
|
-
part.doc_part_body = Uniword::Glossary::DocPartBody.new
|
|
1114
|
-
|
|
1115
|
-
# Add paragraphs
|
|
1116
|
-
para = Uniword::Paragraph.new
|
|
1117
|
-
para.add_text('Company Name')
|
|
1118
|
-
para.properties = Uniword::Properties::ParagraphProperties.new
|
|
1119
|
-
para.properties.alignment = Uniword::Properties::Alignment.new(value: 'center')
|
|
1120
|
-
part.doc_part_body.paragraphs << para
|
|
1121
|
-
|
|
1122
|
-
# Add to glossary
|
|
1123
|
-
glossary.doc_parts.doc_part << part
|
|
1124
|
-
|
|
1125
|
-
# Save to document
|
|
1126
|
-
doc = Uniword::Document.new
|
|
1127
|
-
doc.glossary_document = glossary
|
|
1128
|
-
doc.save('template.dotx')
|
|
1129
|
-
----
|
|
1130
|
-
|
|
1131
|
-
==== Building Block Galleries
|
|
1132
|
-
|
|
1133
|
-
Word organizes building blocks into galleries for easy access:
|
|
1134
|
-
|
|
1135
|
-
* `hdrs` - Headers
|
|
1136
|
-
* `ftrs` - Footers
|
|
1137
|
-
* `coverPg` - Cover Pages
|
|
1138
|
-
* `eq` - Equations
|
|
1139
|
-
* `toc` - Tables of Contents
|
|
1140
|
-
* `bib` - Bibliographies
|
|
1141
|
-
* `watermarks` - Watermarks
|
|
1142
|
-
* `placeholder` - Custom placeholder blocks
|
|
1143
|
-
* `autoText` - AutoText entries
|
|
1144
|
-
* `textBox` - Text boxes
|
|
1145
|
-
|
|
1146
|
-
==== Building Block Behaviors
|
|
1147
|
-
|
|
1148
|
-
Control how building blocks are inserted into documents:
|
|
1149
|
-
|
|
1150
|
-
* `content` - Insert as inline content at cursor
|
|
1151
|
-
* `page` - Insert as a new page
|
|
1152
|
-
* `para` - Insert as a new paragraph
|
|
1153
|
-
|
|
1154
|
-
[source,ruby]
|
|
1155
|
-
----
|
|
1156
|
-
# Insert as new page (typical for cover pages)
|
|
1157
|
-
behavior = Uniword::Glossary::DocPartBehavior.new(val: 'page')
|
|
1158
|
-
|
|
1159
|
-
# Insert as inline content (typical for headers/footers)
|
|
1160
|
-
behavior = Uniword::Glossary::DocPartBehavior.new(val: 'content')
|
|
1161
|
-
|
|
1162
|
-
# Insert as new paragraph (typical for text blocks)
|
|
1163
|
-
behavior = Uniword::Glossary::DocPartBehavior.new(val: 'para')
|
|
1164
|
-
----
|
|
1165
|
-
|
|
1166
|
-
==== Working with Complex Building Blocks
|
|
1167
|
-
|
|
1168
|
-
Building blocks can contain tables, structured document tags (SDTs), and formatted text:
|
|
1169
|
-
|
|
1170
|
-
[source,ruby]
|
|
1171
|
-
----
|
|
1172
|
-
part = Uniword::Glossary::DocPart.new
|
|
1173
|
-
part.doc_part_pr = Uniword::Glossary::DocPartProperties.new
|
|
1174
|
-
part.doc_part_pr.name = Uniword::Glossary::DocPartName.new(
|
|
1175
|
-
val: 'Table of Contents'
|
|
1176
|
-
)
|
|
1177
|
-
part.doc_part_pr.category = Uniword::Glossary::DocPartCategory.new
|
|
1178
|
-
part.doc_part_pr.category.gallery = Uniword::Glossary::DocPartGallery.new(
|
|
1179
|
-
val: 'toc'
|
|
1180
|
-
)
|
|
1181
|
-
|
|
1182
|
-
part.doc_part_body = Uniword::Glossary::DocPartBody.new
|
|
1183
|
-
|
|
1184
|
-
# Add structured document tag for TOC
|
|
1185
|
-
sdt = Uniword::StructuredDocumentTag.new
|
|
1186
|
-
sdt.properties = Uniword::SDTProperties.new
|
|
1187
|
-
# Configure SDT for table of contents...
|
|
1188
|
-
part.doc_part_body.elements << sdt
|
|
1189
|
-
|
|
1190
|
-
# Add table
|
|
1191
|
-
table = Uniword::Table.new
|
|
1192
|
-
# Configure table...
|
|
1193
|
-
part.doc_part_body.elements << table
|
|
1194
|
-
|
|
1195
|
-
# Add to glossary
|
|
1196
|
-
glossary.doc_parts.doc_part << part
|
|
1197
|
-
----
|
|
1198
|
-
|
|
1199
|
-
==== Architecture
|
|
1200
|
-
|
|
1201
|
-
Uniword's Glossary support follows a pure model-driven architecture using lutaml-model:
|
|
1202
|
-
|
|
1203
|
-
* ✅ **Complete structure modeling** - All 19 Glossary elements implemented
|
|
1204
|
-
* ✅ **WordProcessingML integration** - Glossary uses `w:` namespace, not separate `g:` namespace
|
|
1205
|
-
* ✅ **Type safety** - Strongly typed properties with proper wrapper classes
|
|
1206
|
-
* ✅ **Pattern 0 compliance** - All attributes declared before xml mappings
|
|
1207
|
-
* ✅ **MECE architecture** - Clear separation between Glossary structure and content
|
|
1208
|
-
|
|
1209
|
-
**Implementation status:**
|
|
1210
|
-
|
|
1211
|
-
* GlossaryDocument structure: ✅ COMPLETE (Session 2, December 1, 2024)
|
|
1212
|
-
* Property serialization: ✅ COMPLETE (12/19 classes, 63%)
|
|
1213
|
-
* Content serialization: ✅ WORKING (paragraphs, tables, SDTs appear)
|
|
1214
|
-
* Ignorable attribute: ✅ ADDED (Session 3, December 1, 2024)
|
|
1215
|
-
|
|
1216
|
-
**Key architectural decisions:**
|
|
1217
|
-
|
|
1218
|
-
1. **Namespace choice**: Glossary elements use WordProcessingML namespace (`w:`), not separate Glossary namespace
|
|
1219
|
-
2. **Wrapper classes**: Properties like `style` and `guid` use dedicated wrapper classes (`StyleId`, `DocPartId`)
|
|
1220
|
-
3. **Content integration**: DocPartBody contains standard WordProcessingML elements (paragraphs, tables)
|
|
1221
|
-
4. **No raw XML**: Every element is a proper lutaml-model class
|
|
1222
|
-
|
|
1223
|
-
==== Building Block Examples
|
|
1224
|
-
|
|
1225
|
-
===== Example 1: Simple Header
|
|
1226
|
-
|
|
1227
|
-
[source,ruby]
|
|
1228
|
-
----
|
|
1229
|
-
part = Uniword::Glossary::DocPart.new
|
|
1230
|
-
part.doc_part_pr = Uniword::Glossary::DocPartProperties.new
|
|
1231
|
-
|
|
1232
|
-
part.doc_part_pr.name = Uniword::Glossary::DocPartName.new(
|
|
1233
|
-
val: 'Simple Header'
|
|
1234
|
-
)
|
|
1235
|
-
part.doc_part_pr.category = Uniword::Glossary::DocPartCategory.new
|
|
1236
|
-
part.doc_part_pr.category.gallery = Uniword::Glossary::DocPartGallery.new(
|
|
1237
|
-
val: 'hdrs'
|
|
1238
|
-
)
|
|
1239
|
-
part.doc_part_pr.guid = Uniword::Glossary::DocPartId.new(
|
|
1240
|
-
val: SecureRandom.uuid
|
|
1241
|
-
)
|
|
1242
|
-
|
|
1243
|
-
part.doc_part_body = Uniword::Glossary::DocPartBody.new
|
|
1244
|
-
para = Uniword::Paragraph.new
|
|
1245
|
-
para.add_text('Company Name', bold: true, size: 14)
|
|
1246
|
-
part.doc_part_body.paragraphs << para
|
|
1247
|
-
----
|
|
1248
|
-
|
|
1249
|
-
===== Example 2: Cover Page with Table
|
|
1250
|
-
|
|
1251
|
-
[source,ruby]
|
|
1252
|
-
----
|
|
1253
|
-
part = Uniword::Glossary::DocPart.new
|
|
1254
|
-
part.doc_part_pr = Uniword::Glossary::DocPartProperties.new
|
|
1255
|
-
|
|
1256
|
-
part.doc_part_pr.name = Uniword::Glossary::DocPartName.new(
|
|
1257
|
-
val: 'Professional Cover Page'
|
|
1258
|
-
)
|
|
1259
|
-
part.doc_part_pr.category = Uniword::Glossary::DocPartCategory.new
|
|
1260
|
-
part.doc_part_pr.category.gallery = Uniword::Glossary::DocPartGallery.new(
|
|
1261
|
-
val: 'coverPg'
|
|
1262
|
-
)
|
|
1263
|
-
part.doc_part_pr.behaviors = Uniword::Glossary::DocPartBehaviors.new
|
|
1264
|
-
part.doc_part_pr.behaviors.behavior << Uniword::Glossary::DocPartBehavior.new(
|
|
1265
|
-
val: 'page'
|
|
1266
|
-
)
|
|
1267
|
-
|
|
1268
|
-
part.doc_part_body = Uniword::Glossary::DocPartBody.new
|
|
1269
|
-
|
|
1270
|
-
# Add title
|
|
1271
|
-
title = Uniword::Paragraph.new
|
|
1272
|
-
title.add_text('Document Title', bold: true, size: 24)
|
|
1273
|
-
title.properties.alignment = Uniword::Properties::Alignment.new(value: 'center')
|
|
1274
|
-
part.doc_part_body.paragraphs << title
|
|
1275
|
-
|
|
1276
|
-
# Add info table
|
|
1277
|
-
table = Uniword::Table.new
|
|
1278
|
-
# Configure table with author, date, etc...
|
|
1279
|
-
part.doc_part_body.elements << table
|
|
1280
|
-
----
|
|
1281
|
-
|
|
1282
|
-
===== Example 3: Equation Building Block
|
|
1283
|
-
|
|
1284
|
-
[source,ruby]
|
|
1285
|
-
----
|
|
1286
|
-
part = Uniword::Glossary::DocPart.new
|
|
1287
|
-
part.doc_part_pr = Uniword::Glossary::DocPartProperties.new
|
|
1288
|
-
|
|
1289
|
-
part.doc_part_pr.name = Uniword::Glossary::DocPartName.new(
|
|
1290
|
-
val: 'Quadratic Formula'
|
|
1291
|
-
)
|
|
1292
|
-
part.doc_part_pr.category = Uniword::Glossary::DocPartCategory.new
|
|
1293
|
-
part.doc_part_pr.category.gallery = Uniword::Glossary::DocPartGallery.new(
|
|
1294
|
-
val: 'eq'
|
|
1295
|
-
)
|
|
1296
|
-
part.doc_part_pr.description = Uniword::Glossary::DocPartDescription.new(
|
|
1297
|
-
val: 'Quadratic equation solution formula'
|
|
1298
|
-
)
|
|
1299
|
-
|
|
1300
|
-
part.doc_part_body = Uniword::Glossary::DocPartBody.new
|
|
1301
|
-
para = Uniword::Paragraph.new
|
|
1302
|
-
# Add Office Math Markup Language (OMML) equation
|
|
1303
|
-
para.add_math('<math><mrow><mi>x</mi><mo>=</mo>...')
|
|
1304
|
-
part.doc_part_body.paragraphs << para
|
|
1305
|
-
----
|
|
1306
|
-
|
|
1307
|
-
==== Implementation Status and Known Limitations
|
|
1308
|
-
|
|
1309
|
-
✅ **Phase 3 Week 3 Session 3 COMPLETE (December 1, 2024)** - Glossary Infrastructure COMPLETE!
|
|
1310
|
-
|
|
1311
|
-
**What works:**
|
|
1312
|
-
|
|
1313
|
-
* ✅ Complete Glossary structure modeling (GlossaryDocument → DocParts → DocPart → DocPartProperties + DocPartBody)
|
|
1314
|
-
* ✅ All 12 core Glossary classes implemented and verified
|
|
1315
|
-
* ✅ Property serialization (name, style, guid, category, gallery, behaviors, description)
|
|
1316
|
-
* ✅ Content serialization (paragraphs, tables appear in docPartBody)
|
|
1317
|
-
* ✅ Ignorable attribute handling for forward compatibility
|
|
1318
|
-
* ✅ Perfect architectural compliance (Pattern 0, MECE, Model-driven)
|
|
1319
|
-
|
|
1320
|
-
**Known limitations:**
|
|
1321
|
-
|
|
1322
|
-
The 8 Glossary round-trip test failures are **NOT** due to Glossary structure issues. They are caused by incomplete **Wordprocessingml property implementations** that affect ALL document types:
|
|
1323
|
-
|
|
1324
|
-
* Missing table properties (`tblPr` content: tblW, shd, tblCellMar, tblLook)
|
|
1325
|
-
* Missing cell properties (`tcPr` content: tcW, vAlign)
|
|
1326
|
-
* Missing paragraph rsid attributes (`rsidR`, `rsidRDefault`, `rsidP`)
|
|
1327
|
-
* Incomplete run properties (`rPr` content: caps, noProof, etc.)
|
|
1328
|
-
* Incomplete SDT properties (`sdtPr` content: id, alias, tag, showingPlcHdr, etc.)
|
|
1329
|
-
|
|
1330
|
-
**These limitations are addressed in Phase 4 (Wordprocessingml Properties) and affect StyleSets, Themes, and regular documents as well, not just Glossary documents.**
|
|
1331
|
-
|
|
1332
|
-
**Test results:**
|
|
1333
|
-
|
|
1334
|
-
```
|
|
1335
|
-
Baseline: 342/342 passing (100%) ✅ (StyleSets + Themes)
|
|
1336
|
-
Content Types: 8/8 passing (100%) ✅
|
|
1337
|
-
Glossary Structure: WORKING ✅ (serializes correctly)
|
|
1338
|
-
Glossary Round-Trip: 0/8 (0%) - Wordprocessingml property gaps
|
|
1339
|
-
```
|
|
1340
|
-
=== Structured Document Tags (SDT)
|
|
1341
|
-
|
|
1342
|
-
==== What are Structured Document Tags
|
|
1343
|
-
|
|
1344
|
-
Structured Document Tags (SDTs) are Word's modern content control system that allows documents to contain interactive fields, data-bound content, and dynamic elements. SDTs are the foundation for features like:
|
|
1345
|
-
|
|
1346
|
-
* **Text fields** - User input boxes
|
|
1347
|
-
* **Date pickers** - Calendar selection controls
|
|
1348
|
-
* **Drop-down lists** - Selection menus
|
|
1349
|
-
* **Bibliography** - Citation management
|
|
1350
|
-
* **Document part references** - Reusable content blocks
|
|
1351
|
-
* **Data-bound content** - XML-mapped fields
|
|
1352
|
-
|
|
1353
|
-
==== SDT Properties Supported
|
|
1354
|
-
|
|
1355
|
-
✅ **Phase 4 COMPLETE (December 2, 2024)** - ALL 13 SDT PROPERTIES IMPLEMENTED! 🎉
|
|
1356
|
-
|
|
1357
|
-
Uniw provides complete support for all discovered SDT property types:
|
|
1358
|
-
|
|
1359
|
-
**Identity & Display (7 properties)**:
|
|
1360
|
-
|
|
1361
|
-
* `id` - Unique integer identifier for the SDT
|
|
1362
|
-
* `alias` - User-friendly Display name
|
|
1363
|
-
* `tag` - Developer-assigned tag (can be empty string)
|
|
1364
|
-
* `text` - Text control flag (empty element)
|
|
1365
|
-
* `showingPlcHdr` - Show placeholder when content is empty
|
|
1366
|
-
* `appearance` - Visual style: `hidden`, `tags`, or `boundingBox`
|
|
1367
|
-
* `temporary` - Remove SDT wrapper when content is first edited
|
|
1368
|
-
|
|
1369
|
-
**Data & References (3 properties)**:
|
|
1370
|
-
|
|
1371
|
-
* `dataBinding` - XML data binding with xpath, storeItemID, and prefixMappings
|
|
1372
|
-
* `placeholder` - Reference to placeholder docPart content
|
|
1373
|
-
* `docPartObj` - Document part gallery reference (gallery, category, unique flag)
|
|
1374
|
-
|
|
1375
|
-
**Special Controls (3 properties)**:
|
|
1376
|
-
|
|
1377
|
-
* `date` - Date picker with format, language, calendar, and fullDate attribute
|
|
1378
|
-
* `bibliography` - Bibliography content control flag
|
|
1379
|
-
* `rPr` - Run properties for SDT content formatting
|
|
1380
|
-
|
|
1381
|
-
==== Loading Documents with SDTs
|
|
1382
|
-
|
|
1383
|
-
[source,ruby]
|
|
1384
|
-
----
|
|
1385
|
-
require 'uniword'
|
|
1386
|
-
|
|
1387
|
-
# Load document with SDTs
|
|
1388
|
-
doc = Uniword::Document.open('template.dotx')
|
|
1389
|
-
|
|
1390
|
-
# Access SDT properties from glossary document
|
|
1391
|
-
doc.glossary_document&.doc_parts&.each do |part|
|
|
1392
|
-
part.doc_part_body.sdts.each do |sdt|
|
|
1393
|
-
props = sdt.properties
|
|
1394
|
-
|
|
1395
|
-
# Identity properties
|
|
1396
|
-
puts "SDT ID: #{props.id&.value}"
|
|
1397
|
-
puts "Alias: #{props.alias_name&.value}"
|
|
1398
|
-
puts "Tag: #{props.tag&.value}"
|
|
1399
|
-
|
|
1400
|
-
# Display properties
|
|
1401
|
-
puts "Text Control: #{!props.text.nil?}"
|
|
1402
|
-
puts "Show Placeholder: #{!props.showing_placeholder_header.nil?}"
|
|
1403
|
-
puts "Appearance: #{props.appearance&.value}"
|
|
1404
|
-
puts "Temporary: #{!props.temporary.nil?}"
|
|
1405
|
-
|
|
1406
|
-
# Data binding
|
|
1407
|
-
if props.data_binding
|
|
1408
|
-
puts "XPath: #{props.data_binding.xpath}"
|
|
1409
|
-
puts "Store Item ID: #{props.data_binding.store_item_id}"
|
|
1410
|
-
end
|
|
1411
|
-
|
|
1412
|
-
# Date control
|
|
1413
|
-
if props.date
|
|
1414
|
-
puts "Date Format: #{props.date.date_format&.value}"
|
|
1415
|
-
puts "Full Date: #{props.date.full_date}"
|
|
1416
|
-
puts "Calendar: #{props.date.calendar&.value}"
|
|
1417
|
-
puts "Language: #{props.date.lid&.value}"
|
|
1418
|
-
end
|
|
1419
|
-
|
|
1420
|
-
# Document part reference
|
|
1421
|
-
if props.doc_part_obj
|
|
1422
|
-
puts "Gallery: #{props.doc_part_obj.doc_part_gallery&.value}"
|
|
1423
|
-
puts "Category: #{props.doc_part_obj.doc_part_category&.value}"
|
|
1424
|
-
puts "Unique: #{!props.doc_part_obj.doc_part_unique.nil?}"
|
|
1425
|
-
end
|
|
1426
|
-
|
|
1427
|
-
# Special controls
|
|
1428
|
-
puts "Bibliography: #{!props.bibliography.nil?}"
|
|
1429
|
-
end
|
|
1430
|
-
end
|
|
1431
|
-
----
|
|
1432
|
-
|
|
1433
|
-
==== Creating SDTs
|
|
1434
|
-
|
|
1435
|
-
[source,ruby]
|
|
1436
|
-
----
|
|
1437
|
-
require 'uniword'
|
|
1438
|
-
|
|
1439
|
-
# Create a new structured document tag
|
|
1440
|
-
sdt = Uniword::Wordprocessingml::StructuredDocumentTag.new
|
|
1441
|
-
|
|
1442
|
-
# Create SDT properties
|
|
1443
|
-
sdt.properties = Uniword::StructuredDocumentTagProperties.new
|
|
1444
|
-
|
|
1445
|
-
# Set identity
|
|
1446
|
-
sdt.properties.id = Uniword::Sdt::Id.new(value: 123456)
|
|
1447
|
-
sdt.properties.alias_name = Uniword::Sdt::Alias.new(value: "User Name Field")
|
|
1448
|
-
sdt.properties.tag = Uniword::Sdt::Tag.new(value: "user_name")
|
|
1449
|
-
|
|
1450
|
-
# Mark as text control
|
|
1451
|
-
sdt.properties.text = Uniword::Sdt::Text.new
|
|
1452
|
-
|
|
1453
|
-
# Show placeholder when empty
|
|
1454
|
-
sdt.properties.showing_placeholder_header = Uniword::Sdt::ShowingPlaceholderHeader.new
|
|
1455
|
-
|
|
1456
|
-
# Set appearance
|
|
1457
|
-
sdt.properties.appearance = Uniword::Sdt::Appearance.new(value: "boundingBox")
|
|
1458
|
-
|
|
1459
|
-
# Add placeholder reference
|
|
1460
|
-
sdt.properties.placeholder = Uniword::Sdt::Placeholder.new
|
|
1461
|
-
sdt.properties.placeholder.doc_part_reference = Uniword::Sdt::DocPartReference.new(
|
|
1462
|
-
value: "{12345678-1234-1234-1234-123456789012}"
|
|
1463
|
-
)
|
|
1464
|
-
|
|
1465
|
-
# Create SDT content
|
|
1466
|
-
sdt.content = Uniword::Wordprocessingml::SdtContent.new
|
|
1467
|
-
|
|
1468
|
-
# Add paragraph to content
|
|
1469
|
-
para = Uniword::Paragraph.new
|
|
1470
|
-
para.add_text("Enter your name here")
|
|
1471
|
-
sdt.content.paragraphs << para
|
|
1472
|
-
|
|
1473
|
-
# Add to document's glossary
|
|
1474
|
-
doc.glossary_document.doc_parts.doc_part.first.doc_part_body.sdts << sdt
|
|
1475
|
-
----
|
|
1476
|
-
|
|
1477
|
-
==== Date Picker SDTs
|
|
1478
|
-
|
|
1479
|
-
[source,ruby]
|
|
1480
|
-
----
|
|
1481
|
-
# Create date picker control
|
|
1482
|
-
sdt = Uniword::Wordprocessingml::StructuredDocumentTag.new
|
|
1483
|
-
sdt.properties = Uniword::StructuredDocumentTagProperties.new
|
|
1484
|
-
|
|
1485
|
-
# Basic identity
|
|
1486
|
-
sdt.properties.id = Uniword::Sdt::Id.new(value: 789012)
|
|
1487
|
-
sdt.properties.alias_name = Uniword::Sdt::Alias.new(value: "Document Date")
|
|
1488
|
-
|
|
1489
|
-
# Configure date control
|
|
1490
|
-
sdt.properties.date = Uniword::Sdt::Date.new
|
|
1491
|
-
|
|
1492
|
-
# Set date format
|
|
1493
|
-
sdt.properties.date.date_format = Uniword::Sdt::DateFormat.new(value: "M/d/yyyy")
|
|
1494
|
-
|
|
1495
|
-
# Set language
|
|
1496
|
-
sdt.properties.date.lid = Uniword::Sdt::Lid.new(value: "en-US")
|
|
1497
|
-
|
|
1498
|
-
# Set calendar type
|
|
1499
|
-
sdt.properties.date.calendar = Uniword::Sdt::Calendar.new(value: "gregorian")
|
|
1500
|
-
|
|
1501
|
-
# Set storage format
|
|
1502
|
-
sdt.properties.date.store_mapped_data_as = Uniword::Sdt::StoreMappedDataAs.new(
|
|
1503
|
-
value: "dateTime"
|
|
1504
|
-
)
|
|
1505
|
-
|
|
1506
|
-
# Optional: Set current date
|
|
1507
|
-
sdt.properties.date.full_date = "2024-12-02T00:00:00Z"
|
|
1508
|
-
|
|
1509
|
-
# Add content paragraph
|
|
1510
|
-
sdt.content = Uniword::Wordprocessingml::SdtContent.new
|
|
1511
|
-
para = Uniword::Paragraph.new
|
|
1512
|
-
para.add_text("12/2/2024")
|
|
1513
|
-
sdt.content.paragraphs << para
|
|
1514
|
-
----
|
|
1515
|
-
|
|
1516
|
-
==== Data-Bound SDTs
|
|
1517
|
-
|
|
1518
|
-
[source,ruby]
|
|
1519
|
-
----
|
|
1520
|
-
# Create data-bound SDT
|
|
1521
|
-
sdt = Uniword::Wordprocessingml::StructuredDocumentTag.new
|
|
1522
|
-
sdt.properties = Uniword::StructuredDocumentTagProperties.new
|
|
1523
|
-
|
|
1524
|
-
# Basic identity
|
|
1525
|
-
sdt.properties.id = Uniword::Sdt::Id.new(value: 345678)
|
|
1526
|
-
sdt.properties.alias_name = Uniword::Sdt::Alias.new(value: "Customer Name")
|
|
1527
|
-
sdt.properties.tag = Uniword::Sdt::Tag.new(value: "customer_name")
|
|
1528
|
-
|
|
1529
|
-
# Configure data binding
|
|
1530
|
-
sdt.properties.data_binding = Uniword::Sdt::DataBinding.new
|
|
1531
|
-
|
|
1532
|
-
# XPath to XML data
|
|
1533
|
-
sdt.properties.data_binding.xpath = "/root/customer/name"
|
|
1534
|
-
|
|
1535
|
-
# Custom XML part ID
|
|
1536
|
-
sdt.properties.data_binding.store_item_id = "{ABCDEFGH-1234-5678-90AB-CDEF12345678}"
|
|
1537
|
-
|
|
1538
|
-
# Namespace prefix mappings (optional)
|
|
1539
|
-
sdt.properties.data_binding.prefix_mappings = 'xmlns:ns="http://example.com/schema"'
|
|
1540
|
-
|
|
1541
|
-
# Text control
|
|
1542
|
-
sdt.properties.text = Uniword::Sdt::Text.new
|
|
1543
|
-
|
|
1544
|
-
# Add content
|
|
1545
|
-
sdt.content = Uniword::Wordprocessingml::SdtContent.new
|
|
1546
|
-
para = Uniword::Paragraph.new
|
|
1547
|
-
para.add_text("John Doe")
|
|
1548
|
-
sdt.content.paragraphs << para
|
|
1549
|
-
----
|
|
1550
|
-
|
|
1551
|
-
==== Bibliography SDTs
|
|
1552
|
-
|
|
1553
|
-
[source,ruby]
|
|
1554
|
-
----
|
|
1555
|
-
# Create bibliography control
|
|
1556
|
-
sdt = Uniword::Wordprocessingml::StructuredDocumentTag.new
|
|
1557
|
-
sdt.properties = Uniword::StructuredDocumentTagProperties.new
|
|
1558
|
-
|
|
1559
|
-
# Identity
|
|
1560
|
-
sdt.properties.id = Uniword::Sdt::Id.new(value: 234567)
|
|
1561
|
-
sdt.properties.alias_name = Uniword::Sdt::Alias.new(value: "Bibliography")
|
|
1562
|
-
|
|
1563
|
-
# Mark as bibliography control
|
|
1564
|
-
sdt.properties.bibliography = Uniword::Sdt::Bibliography.new
|
|
1565
|
-
|
|
1566
|
-
# Add bibliography content
|
|
1567
|
-
sdt.content = Uniword::Wordprocessingml::SdtContent.new
|
|
1568
|
-
# Bibliography content typically contains citation paragraphs
|
|
1569
|
-
----
|
|
1570
|
-
|
|
1571
|
-
==== Document Part Reference SDTs
|
|
1572
|
-
|
|
1573
|
-
[source,ruby]
|
|
1574
|
-
----
|
|
1575
|
-
# Create SDT that references a document part
|
|
1576
|
-
sdt = Uniword::Wordprocessingml::StructuredDocumentTag.new
|
|
1577
|
-
sdt.properties = Uniword::StructuredDocumentTagProperties.new
|
|
1578
|
-
|
|
1579
|
-
# Identity
|
|
1580
|
-
sdt.properties.id = Uniword::Sdt::Id.new(value: 456789)
|
|
1581
|
-
sdt.properties.alias_name = Uniword::Sdt::Alias.new(value: "Cover Page")
|
|
1582
|
-
|
|
1583
|
-
# Reference document part gallery
|
|
1584
|
-
sdt.properties.doc_part_obj = Uniword::Sdt::DocPartObj.new
|
|
1585
|
-
|
|
1586
|
-
# Specify gallery (where user selects from)
|
|
1587
|
-
sdt.properties.doc_part_obj.doc_part_gallery = Uniword::Sdt::DocPartGallery.new(
|
|
1588
|
-
value: "Cover Pages"
|
|
1589
|
-
)
|
|
1590
|
-
|
|
1591
|
-
# Specify category (optional)
|
|
1592
|
-
sdt.properties.doc_part_obj.doc_part_category = Uniword::Sdt::DocPartCategory.new(
|
|
1593
|
-
value: "General"
|
|
1594
|
-
)
|
|
1595
|
-
|
|
1596
|
-
# Mark as unique (only one instance allowed)
|
|
1597
|
-
sdt.properties.doc_part_obj.doc_part_unique = Uniword::Sdt::DocPartUnique.new
|
|
1598
|
-
----
|
|
1599
|
-
|
|
1600
|
-
==== Implementation Status
|
|
1601
|
-
|
|
1602
|
-
✅ **Phase 4 Complete (December 2, 2024)** - ALL SDT PROPERTIES IMPLEMENTED
|
|
1603
|
-
|
|
1604
|
-
**Test Results**:
|
|
1605
|
-
|
|
1606
|
-
```
|
|
1607
|
-
Property Coverage: 27/27 (100%) ✅
|
|
1608
|
-
SDT Properties: 13/13 (100%) ✅
|
|
1609
|
-
Baseline Tests: 342/342 (100%) ✅
|
|
1610
|
-
Pattern 0: 27/27 (100%) ✅
|
|
1611
|
-
Architecture: MECE, Model-driven, Zero raw XML ✅
|
|
1612
|
-
```
|
|
1613
|
-
|
|
1614
|
-
**Property Categories Implemented**:
|
|
1615
|
-
|
|
1616
|
-
[cols="2,1,4"]
|
|
1617
|
-
|===
|
|
1618
|
-
| Category | Count | Properties
|
|
1619
|
-
|
|
1620
|
-
| Table Properties
|
|
1621
|
-
| 5/5
|
|
1622
|
-
| width, shading, margins, borders, look
|
|
1623
|
-
|
|
1624
|
-
| Cell Properties
|
|
1625
|
-
| 3/3
|
|
1626
|
-
| width, vertical alignment, margins
|
|
1627
|
-
|
|
1628
|
-
| Paragraph Properties
|
|
1629
|
-
| 4/4
|
|
1630
|
-
| alignment, spacing, indentation, rsid
|
|
1631
|
-
|
|
1632
|
-
| Run Properties
|
|
1633
|
-
| 4/4
|
|
1634
|
-
| fonts, color, size, noProof, themeColor
|
|
1635
|
-
|
|
1636
|
-
| *SDT Properties*
|
|
1637
|
-
| *13/13*
|
|
1638
|
-
| *id, alias, tag, text, showingPlcHdr, appearance, temporary, placeholder, dataBinding, bibliography, docPartObj, date, rPr*
|
|
1639
|
-
|
|
1640
|
-
| **Total**
|
|
1641
|
-
| **27/27**
|
|
1642
|
-
| **100% of discovered properties**
|
|
1643
|
-
|===
|
|
1644
|
-
|
|
1645
|
-
**Architecture Quality**:
|
|
1646
|
-
|
|
1647
|
-
* ✅ 100% Pattern 0 compliance (attributes before xml mappings)
|
|
1648
|
-
* ✅ MECE design (clear separation of concerns)
|
|
1649
|
-
* ✅ Model-driven (zero raw XML storage)
|
|
1650
|
-
* ✅ Extensible (open/closed principle maintained)
|
|
1651
|
-
* ✅ Zero regressions (342/342 baseline tests maintained)
|
|
1652
|
-
|
|
1653
|
-
**Implementation Time**: 6 sessions, 5.5 hours total (37% faster than estimated)
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
=== Tables
|
|
1657
|
-
|
|
1658
|
-
==== Basic table creation
|
|
1659
|
-
|
|
1660
|
-
[source,ruby]
|
|
1661
|
-
----
|
|
1662
|
-
table = Uniword::Table.new
|
|
1663
|
-
row = Uniword::TableRow.new
|
|
1664
|
-
|
|
1665
|
-
cell1 = Uniword::TableCell.new
|
|
1666
|
-
cell1.add_paragraph("Cell 1")
|
|
1667
|
-
row.add_cell(cell1)
|
|
1668
|
-
|
|
1669
|
-
cell2 = Uniword::TableCell.new
|
|
1670
|
-
cell2.add_paragraph("Cell 2")
|
|
1671
|
-
row.add_cell(cell2)
|
|
1672
|
-
|
|
1673
|
-
table.add_row(row)
|
|
1674
|
-
doc.add_element(table)
|
|
1675
|
-
----
|
|
1676
|
-
|
|
1677
|
-
==== Table with borders
|
|
1678
|
-
|
|
1679
|
-
[source,ruby]
|
|
1680
|
-
----
|
|
1681
|
-
table = Uniword::Table.new
|
|
1682
|
-
|
|
1683
|
-
# Set table borders
|
|
1684
|
-
table.properties = Uniword::Properties::TableProperties.new
|
|
1685
|
-
table.properties.borders = {
|
|
1686
|
-
top: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000'),
|
|
1687
|
-
bottom: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000'),
|
|
1688
|
-
left: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000'),
|
|
1689
|
-
right: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000'),
|
|
1690
|
-
insideH: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000'),
|
|
1691
|
-
insideV: Uniword::TableBorder.new(style: 'single', size: 4, color: '000000')
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
# Add rows and cells
|
|
1695
|
-
row = Uniword::TableRow.new
|
|
1696
|
-
row.add_cell(Uniword::TableCell.new.tap { |c| c.add_paragraph("A1") })
|
|
1697
|
-
row.add_cell(Uniword::TableCell.new.tap { |c| c.add_paragraph("B1") })
|
|
1698
|
-
table.add_row(row)
|
|
1699
|
-
----
|
|
1700
|
-
|
|
1701
|
-
==== Using Builder for tables
|
|
1702
|
-
|
|
1703
|
-
[source,ruby]
|
|
1704
|
-
----
|
|
1705
|
-
doc = Uniword::Builder.new
|
|
1706
|
-
.add_table do
|
|
1707
|
-
row do
|
|
1708
|
-
cell 'Header 1', bold: true
|
|
1709
|
-
cell 'Header 2', bold: true
|
|
1710
|
-
end
|
|
1711
|
-
row do
|
|
1712
|
-
cell 'Data 1'
|
|
1713
|
-
cell 'Data 2'
|
|
1714
|
-
end
|
|
1715
|
-
end
|
|
1716
|
-
.build
|
|
1717
|
-
----
|
|
1718
|
-
|
|
1719
|
-
=== Lists
|
|
1720
|
-
|
|
1721
|
-
==== Numbered lists
|
|
1722
|
-
|
|
1723
|
-
[source,ruby]
|
|
1724
|
-
----
|
|
1725
|
-
# Create numbered list
|
|
1726
|
-
3.times do |i|
|
|
1727
|
-
para = Uniword::Paragraph.new
|
|
1728
|
-
para.set_numbering(1, 0) # numbering_id=1, level=0
|
|
1729
|
-
para.add_text("Item #{i+1}")
|
|
1730
|
-
doc.add_element(para)
|
|
1731
|
-
end
|
|
1732
|
-
----
|
|
1733
|
-
|
|
1734
|
-
==== Bulleted lists
|
|
1735
|
-
|
|
1736
|
-
[source,ruby]
|
|
1737
|
-
----
|
|
1738
|
-
# Create bulleted list
|
|
1739
|
-
['Apple', 'Banana', 'Cherry'].each do |item|
|
|
1740
|
-
para = Uniword::Paragraph.new
|
|
1741
|
-
para.set_numbering(2, 0) # numbering_id=2 for bullets
|
|
1742
|
-
para.add_text(item)
|
|
1743
|
-
doc.add_element(para)
|
|
1744
|
-
end
|
|
1745
|
-
----
|
|
1746
|
-
|
|
1747
|
-
==== Multi-level lists
|
|
1748
|
-
|
|
1749
|
-
[source,ruby]
|
|
1750
|
-
----
|
|
1751
|
-
# Level 0 item
|
|
1752
|
-
para1 = Uniword::Paragraph.new
|
|
1753
|
-
para1.set_numbering(1, 0)
|
|
1754
|
-
para1.add_text("Level 0 item")
|
|
1755
|
-
doc.add_element(para1)
|
|
1756
|
-
|
|
1757
|
-
# Level 1 item (indented)
|
|
1758
|
-
para2 = Uniword::Paragraph.new
|
|
1759
|
-
para2.set_numbering(1, 1)
|
|
1760
|
-
para2.add_text("Level 1 item")
|
|
1761
|
-
doc.add_element(para2)
|
|
1762
|
-
|
|
1763
|
-
# Level 2 item (more indented)
|
|
1764
|
-
para3 = Uniword::Paragraph.new
|
|
1765
|
-
para3.set_numbering(1, 2)
|
|
1766
|
-
para3.add_text("Level 2 item")
|
|
1767
|
-
doc.add_element(para3)
|
|
1768
|
-
----
|
|
1769
|
-
|
|
1770
|
-
=== Images
|
|
1771
|
-
|
|
1772
|
-
==== Adding images
|
|
1773
|
-
|
|
1774
|
-
[source,ruby]
|
|
1775
|
-
----
|
|
1776
|
-
# Add image from file
|
|
1777
|
-
image = Uniword::Image.new(
|
|
1778
|
-
path: 'path/to/image.png',
|
|
1779
|
-
width: 300,
|
|
1780
|
-
height: 200
|
|
1781
|
-
)
|
|
1782
|
-
doc.add_element(image)
|
|
1783
|
-
----
|
|
1784
|
-
|
|
1785
|
-
==== Image positioning
|
|
1786
|
-
|
|
1787
|
-
[source,ruby]
|
|
1788
|
-
----
|
|
1789
|
-
# Add positioned image
|
|
1790
|
-
image = Uniword::Image.new(
|
|
1791
|
-
path: 'logo.png',
|
|
1792
|
-
width: 100,
|
|
1793
|
-
height: 100,
|
|
1794
|
-
position: {
|
|
1795
|
-
horizontal: 'center',
|
|
1796
|
-
vertical: 'top'
|
|
1797
|
-
}
|
|
1798
|
-
)
|
|
1799
|
-
----
|
|
1800
|
-
|
|
1801
|
-
=== Headers and footers
|
|
1802
|
-
|
|
1803
|
-
==== Adding headers
|
|
1804
|
-
|
|
1805
|
-
[source,ruby]
|
|
1806
|
-
----
|
|
1807
|
-
section = doc.current_section
|
|
1808
|
-
header = Uniword::Header.new(type: 'default')
|
|
1809
|
-
|
|
1810
|
-
para = Uniword::Paragraph.new
|
|
1811
|
-
para.add_text("Page Header", bold: true)
|
|
1812
|
-
para.align('center')
|
|
1813
|
-
header.add_element(para)
|
|
1814
|
-
|
|
1815
|
-
section.default_header = header
|
|
1816
|
-
----
|
|
1817
|
-
|
|
1818
|
-
==== Adding footers
|
|
1819
|
-
|
|
1820
|
-
[source,ruby]
|
|
1821
|
-
----
|
|
1822
|
-
footer = Uniword::Footer.new(type: 'default')
|
|
1823
|
-
|
|
1824
|
-
para = Uniword::Paragraph.new
|
|
1825
|
-
para.add_text("Page ")
|
|
1826
|
-
# Add page number field
|
|
1827
|
-
para.add_text("1", field_type: 'page_number')
|
|
1828
|
-
para.align('center')
|
|
1829
|
-
footer.add_element(para)
|
|
1830
|
-
|
|
1831
|
-
section.default_footer = footer
|
|
1832
|
-
----
|
|
1833
|
-
|
|
1834
|
-
==== Different headers for first page
|
|
1835
|
-
|
|
1836
|
-
[source,ruby]
|
|
1837
|
-
----
|
|
1838
|
-
# First page header
|
|
1839
|
-
first_header = Uniword::Header.new(type: 'first')
|
|
1840
|
-
para = Uniword::Paragraph.new
|
|
1841
|
-
para.add_text("First Page Header")
|
|
1842
|
-
first_header.add_element(para)
|
|
1843
|
-
section.first_header = first_header
|
|
1844
|
-
|
|
1845
|
-
# Default header for other pages
|
|
1846
|
-
default_header = Uniword::Header.new(type: 'default')
|
|
1847
|
-
para = Uniword::Paragraph.new
|
|
1848
|
-
para.add_text("Default Header")
|
|
1849
|
-
default_header.add_element(para)
|
|
1850
|
-
section.default_header = default_header
|
|
1851
|
-
----
|
|
1852
|
-
|
|
1853
|
-
=== Text boxes
|
|
1854
|
-
|
|
1855
|
-
==== Creating text boxes
|
|
1856
|
-
|
|
1857
|
-
[source,ruby]
|
|
1858
|
-
----
|
|
1859
|
-
text_box = Uniword::TextBox.new(
|
|
1860
|
-
width: 200,
|
|
1861
|
-
height: 100,
|
|
1862
|
-
position: { x: 100, y: 100 }
|
|
1863
|
-
)
|
|
1864
|
-
|
|
1865
|
-
para = Uniword::Paragraph.new
|
|
1866
|
-
para.add_text("Text inside box")
|
|
1867
|
-
text_box.add_element(para)
|
|
1868
|
-
|
|
1869
|
-
doc.add_element(text_box)
|
|
1870
|
-
----
|
|
1871
|
-
|
|
1872
|
-
=== Footnotes and endnotes
|
|
1873
|
-
|
|
1874
|
-
==== Adding footnotes
|
|
1875
|
-
|
|
1876
|
-
[source,ruby]
|
|
1877
|
-
----
|
|
1878
|
-
# Add text with footnote reference
|
|
1879
|
-
para = Uniword::Paragraph.new
|
|
1880
|
-
para.add_text("This text has a footnote")
|
|
1881
|
-
para.add_text("1", footnote_ref: true)
|
|
1882
|
-
|
|
1883
|
-
# Create footnote
|
|
1884
|
-
footnote = Uniword::Footnote.new(id: 1)
|
|
1885
|
-
footnote_para = Uniword::Paragraph.new
|
|
1886
|
-
footnote_para.add_text("This is the footnote text")
|
|
1887
|
-
footnote.add_element(footnote_para)
|
|
1888
|
-
|
|
1889
|
-
doc.footnotes << footnote
|
|
1890
|
-
doc.add_element(para)
|
|
1891
|
-
----
|
|
1892
|
-
|
|
1893
|
-
==== Adding endnotes
|
|
1894
|
-
|
|
1895
|
-
[source,ruby]
|
|
1896
|
-
----
|
|
1897
|
-
# Add text with endnote reference
|
|
1898
|
-
para = Uniword::Paragraph.new
|
|
1899
|
-
para.add_text("This text has an endnote")
|
|
1900
|
-
para.add_text("i", endnote_ref: true)
|
|
1901
|
-
|
|
1902
|
-
# Create endnote
|
|
1903
|
-
endnote = Uniword::Endnote.new(id: 1)
|
|
1904
|
-
endnote_para = Uniword::Paragraph.new
|
|
1905
|
-
endnote_para.add_text("This is the endnote text")
|
|
1906
|
-
endnote.add_element(endnote_para)
|
|
1907
|
-
|
|
1908
|
-
doc.endnotes << endnote
|
|
1909
|
-
doc.add_element(para)
|
|
1910
|
-
----
|
|
1911
|
-
|
|
1912
|
-
=== Bookmarks and cross-references
|
|
1913
|
-
|
|
1914
|
-
==== Creating bookmarks
|
|
1915
|
-
|
|
1916
|
-
[source,ruby]
|
|
1917
|
-
----
|
|
1918
|
-
# Create bookmark
|
|
1919
|
-
bookmark = Uniword::Bookmark.new(
|
|
1920
|
-
id: 1,
|
|
1921
|
-
name: 'Section1'
|
|
1922
|
-
)
|
|
1923
|
-
|
|
1924
|
-
para = Uniword::Paragraph.new
|
|
1925
|
-
para.add_text("Bookmarked section")
|
|
1926
|
-
para.add_bookmark_start(bookmark)
|
|
1927
|
-
para.add_bookmark_end(bookmark.id)
|
|
1928
|
-
|
|
1929
|
-
doc.bookmarks << bookmark
|
|
1930
|
-
doc.add_element(para)
|
|
1931
|
-
----
|
|
1932
|
-
|
|
1933
|
-
==== Adding cross-references
|
|
1934
|
-
|
|
1935
|
-
[source,ruby]
|
|
1936
|
-
----
|
|
1937
|
-
# Reference to bookmark
|
|
1938
|
-
para = Uniword::Paragraph.new
|
|
1939
|
-
para.add_text("See ")
|
|
1940
|
-
para.add_text("Section 1", hyperlink: '#Section1')
|
|
1941
|
-
doc.add_element(para)
|
|
1942
|
-
----
|
|
1943
|
-
|
|
1944
|
-
=== Math formulas
|
|
1945
|
-
|
|
1946
|
-
==== MathML formulas
|
|
1947
|
-
|
|
1948
|
-
[source,ruby]
|
|
1949
|
-
----
|
|
1950
|
-
# Add MathML formula
|
|
1951
|
-
para = Uniword::Paragraph.new
|
|
1952
|
-
para.add_math('<math><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo>-</mo><mi>b</mi></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow></math>')
|
|
1953
|
-
doc.add_element(para)
|
|
1954
|
-
----
|
|
1955
|
-
|
|
1956
|
-
==== AsciiMath formulas
|
|
1957
|
-
|
|
1958
|
-
[source,ruby]
|
|
1959
|
-
----
|
|
1960
|
-
# Add AsciiMath formula (converted to MathML)
|
|
1961
|
-
para = Uniword::Paragraph.new
|
|
1962
|
-
para.add_math('x = (-b)/(2a)', format: :asciimath)
|
|
1963
|
-
doc.add_element(para)
|
|
1964
|
-
----
|
|
1965
|
-
|
|
1966
|
-
== Format conversion
|
|
12
|
+
== Installation
|
|
1967
13
|
|
|
1968
|
-
|
|
14
|
+
Add to your Gemfile:
|
|
1969
15
|
|
|
1970
16
|
[source,ruby]
|
|
1971
17
|
----
|
|
1972
|
-
|
|
1973
|
-
doc = Uniword::DocumentFactory.from_file('input.docx')
|
|
1974
|
-
|
|
1975
|
-
# Save as MHTML
|
|
1976
|
-
doc.save('output.doc')
|
|
18
|
+
gem 'uniword'
|
|
1977
19
|
----
|
|
1978
20
|
|
|
1979
|
-
|
|
21
|
+
Or install directly:
|
|
1980
22
|
|
|
1981
|
-
[source,
|
|
23
|
+
[source,shell]
|
|
1982
24
|
----
|
|
1983
|
-
|
|
1984
|
-
doc = Uniword::DocumentFactory.from_file('input.doc')
|
|
1985
|
-
|
|
1986
|
-
# Save as DOCX
|
|
1987
|
-
doc.save('output.docx')
|
|
25
|
+
gem install uniword
|
|
1988
26
|
----
|
|
1989
27
|
|
|
1990
|
-
|
|
28
|
+
== Quick Start
|
|
1991
29
|
|
|
1992
30
|
[source,ruby]
|
|
1993
31
|
----
|
|
1994
|
-
|
|
1995
|
-
doc = Uniword::DocumentFactory.from_file('document.docx')
|
|
1996
|
-
doc.save('output.mht') # Auto-converts to MHTML
|
|
1997
|
-
----
|
|
1998
|
-
|
|
1999
|
-
== Builder pattern
|
|
2000
|
-
|
|
2001
|
-
The Builder pattern provides a fluent, declarative way to create documents:
|
|
32
|
+
require 'uniword'
|
|
2002
33
|
|
|
2003
|
-
|
|
2004
|
-
----
|
|
34
|
+
# Create a document
|
|
2005
35
|
doc = Uniword::Builder.new
|
|
2006
36
|
.add_heading('My Document', level: 1)
|
|
2007
|
-
.add_paragraph('
|
|
2008
|
-
.add_blank_line
|
|
2009
|
-
.add_heading('Section 1', level: 2)
|
|
2010
|
-
.add_paragraph('Section content', bold: true)
|
|
2011
|
-
.add_table do
|
|
2012
|
-
row do
|
|
2013
|
-
cell 'Header 1', bold: true
|
|
2014
|
-
cell 'Header 2', bold: true
|
|
2015
|
-
end
|
|
2016
|
-
row do
|
|
2017
|
-
cell 'Data 1'
|
|
2018
|
-
cell 'Data 2'
|
|
2019
|
-
end
|
|
2020
|
-
end
|
|
2021
|
-
.add_paragraph('Conclusion')
|
|
37
|
+
.add_paragraph('Hello World', bold: true)
|
|
2022
38
|
.build
|
|
2023
|
-
|
|
2024
39
|
doc.save('output.docx')
|
|
2025
|
-
----
|
|
2026
|
-
|
|
2027
|
-
== CLI usage
|
|
2028
|
-
|
|
2029
|
-
=== Convert between formats
|
|
2030
|
-
|
|
2031
|
-
[source,shell]
|
|
2032
|
-
----
|
|
2033
|
-
# Convert DOCX to MHTML
|
|
2034
|
-
uniword convert input.docx output.doc
|
|
2035
|
-
|
|
2036
|
-
# Convert MHTML to DOCX
|
|
2037
|
-
uniword convert input.doc output.docx --verbose
|
|
2038
|
-
|
|
2039
|
-
# Specify formats explicitly
|
|
2040
|
-
uniword convert input.mht output.docx --from mhtml --to docx
|
|
2041
|
-
----
|
|
2042
|
-
|
|
2043
|
-
=== Document information
|
|
2044
|
-
|
|
2045
|
-
[source,shell]
|
|
2046
|
-
----
|
|
2047
|
-
# Show basic information
|
|
2048
|
-
uniword info document.docx
|
|
2049
|
-
|
|
2050
|
-
# Show detailed information
|
|
2051
|
-
uniword info document.docx --verbose
|
|
2052
|
-
----
|
|
2053
|
-
|
|
2054
|
-
=== Validate document
|
|
2055
|
-
|
|
2056
|
-
[source,shell]
|
|
2057
|
-
----
|
|
2058
|
-
# Validate document structure
|
|
2059
|
-
uniword validate document.docx
|
|
2060
|
-
|
|
2061
|
-
# Show detailed validation results
|
|
2062
|
-
uniword validate document.docx --verbose
|
|
2063
|
-
----
|
|
2064
|
-
|
|
2065
|
-
=== Export Word resources
|
|
2066
|
-
|
|
2067
|
-
Export raw Word resources (themes, stylesets, document elements) from your local Microsoft Word installation:
|
|
2068
|
-
|
|
2069
|
-
[source,shell]
|
|
2070
|
-
----
|
|
2071
|
-
# Export all resources to a directory
|
|
2072
|
-
uniword resources export output-dir --word-app "/Applications/Microsoft Word.app"
|
|
2073
|
-
|
|
2074
|
-
# Export with verbose output
|
|
2075
|
-
uniword resources export ~/my-word-resources --word-app "/Applications/Microsoft Word.app" --verbose
|
|
2076
|
-
----
|
|
2077
|
-
|
|
2078
|
-
The command exports:
|
|
2079
|
-
|
|
2080
|
-
* `office-themes/` - Theme files (.thmx) from Word's Office Themes folder
|
|
2081
|
-
* `quick-styles/` - StyleSet files (.dotx) from Word's QuickStyles folder
|
|
2082
|
-
* `document-elements/` - Document element templates (.dotx) from all language .lproj folders
|
|
2083
|
-
* `citation-styles/` - Citation style files (.xsl) from Word's Style folder
|
|
2084
|
-
* `theme-colors/` - Theme color scheme files (.xml) from Word's Theme Colors folder
|
|
2085
|
-
* `theme-fonts/` - Theme font scheme files (.xml) from Word's Theme Fonts folder
|
|
2086
|
-
|
|
2087
|
-
These resources can be used for testing, building bundled StyleSets/Themes, or customizing document templates.
|
|
2088
|
-
|
|
2089
|
-
[NOTE]
|
|
2090
|
-
====
|
|
2091
|
-
The `--word-app` option is required and must point to your Microsoft Word.app location.
|
|
2092
|
-
On macOS, this is typically `/Applications/Microsoft Word.app`.
|
|
2093
|
-
====
|
|
2094
|
-
|
|
2095
|
-
=== Show version
|
|
2096
|
-
|
|
2097
|
-
[source,shell]
|
|
2098
|
-
----
|
|
2099
|
-
uniword version
|
|
2100
|
-
----
|
|
2101
|
-
|
|
2102
|
-
== API reference
|
|
2103
|
-
|
|
2104
|
-
Full API documentation is available at https://www.rubydoc.info/gems/uniword[RubyDoc.info].
|
|
2105
|
-
|
|
2106
|
-
Key classes:
|
|
2107
|
-
|
|
2108
|
-
* `Uniword::Document` - Main document class
|
|
2109
|
-
* `Uniword::DocumentFactory` - Factory for reading documents
|
|
2110
|
-
* `Uniword::DocumentWriter` - Writer for saving documents
|
|
2111
|
-
* `Uniword::Builder` - Fluent document builder
|
|
2112
|
-
* `Uniword::Paragraph` - Paragraph element
|
|
2113
|
-
* `Uniword::Run` - Text run with formatting
|
|
2114
|
-
* `Uniword::Table` - Table element
|
|
2115
|
-
* `Uniword::Image` - Image element
|
|
2116
|
-
* `Uniword::CLI` - Command-line interface
|
|
2117
|
-
|
|
2118
|
-
== Error handling
|
|
2119
|
-
|
|
2120
|
-
Uniword provides comprehensive error handling:
|
|
2121
40
|
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
41
|
+
# Read and modify
|
|
42
|
+
doc = Uniword::DocumentFactory.from_file('input.docx')
|
|
43
|
+
puts doc.text
|
|
44
|
+
doc.save('modified.docx')
|
|
45
|
+
|
|
46
|
+
# Apply theme and styleset
|
|
47
|
+
doc = Uniword::Wordprocessingml::DocumentRoot.new
|
|
48
|
+
doc.apply_theme('meridian')
|
|
49
|
+
doc.apply_styleset('signature')
|
|
50
|
+
doc.save('styled.docx')
|
|
51
|
+
|
|
52
|
+
# Compare two documents (content-level)
|
|
53
|
+
old_doc = Uniword.load("v1.docx")
|
|
54
|
+
new_doc = Uniword.load("v2.docx")
|
|
55
|
+
result = old_doc.diff(new_doc)
|
|
56
|
+
puts result.summary
|
|
57
|
+
|
|
58
|
+
# Compare two DOCX packages (structural, with Canon semantic diff)
|
|
59
|
+
differ = Uniword::Diff::PackageDiffer.new("old.docx", "new.docx", canon: true)
|
|
60
|
+
pkg_result = differ.diff
|
|
61
|
+
pkg_result.modified_parts.each do |part|
|
|
62
|
+
status = part.canon_equivalent ? "equivalent" : "DIFFERENT"
|
|
63
|
+
puts "#{part.name}: canon #{status}"
|
|
2136
64
|
end
|
|
2137
65
|
----
|
|
2138
66
|
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
* `Uniword::FileNotFoundError` - File does not exist
|
|
2142
|
-
* `Uniword::CorruptedFileError` - File is corrupted or invalid
|
|
2143
|
-
* `Uniword::InvalidFormatError` - Unsupported format
|
|
2144
|
-
* `Uniword::ValidationError` - Document validation failed
|
|
2145
|
-
* `Uniword::ConversionError` - Format conversion failed
|
|
2146
|
-
|
|
2147
|
-
== Examples
|
|
2148
|
-
|
|
2149
|
-
Complete examples are available in the link:examples/[`examples/`] directory:
|
|
2150
|
-
|
|
2151
|
-
* link:examples/basic_usage.rb[`basic_usage.rb`] - Basic document creation
|
|
2152
|
-
* link:examples/styles_example.rb[`styles_example.rb`] - Text formatting and styles
|
|
2153
|
-
* link:examples/advanced_example.rb[`advanced_example.rb`] - Complex document
|
|
2154
|
-
* link:examples/conversion_example.rb[`conversion_example.rb`] - Format conversion
|
|
2155
|
-
|
|
2156
|
-
Run any example:
|
|
67
|
+
== CLI
|
|
2157
68
|
|
|
2158
69
|
[source,shell]
|
|
2159
70
|
----
|
|
2160
|
-
|
|
71
|
+
uniword convert input.docx output.doc # DOCX to MHTML
|
|
72
|
+
uniword info document.docx # Document info
|
|
73
|
+
uniword validate document.docx # Schema validation
|
|
74
|
+
uniword verify document.docx # Full 3-layer verification
|
|
75
|
+
uniword diff compare old.docx new.docx # Document-level diff (content, styles)
|
|
76
|
+
uniword diff package old.docx new.docx --canon # Package-level diff (ZIP, XML, OPC)
|
|
77
|
+
uniword theme apply doc.docx out.docx -n meridian # Apply theme
|
|
78
|
+
uniword theme auto ms.docx uniword.docx # Auto MS->Uniword transition
|
|
2161
79
|
----
|
|
2162
80
|
|
|
2163
|
-
==
|
|
2164
|
-
|
|
2165
|
-
Uniword is optimized for performance with large documents:
|
|
2166
|
-
|
|
2167
|
-
* Lazy loading for memory efficiency
|
|
2168
|
-
* Streaming parsers for large files
|
|
2169
|
-
* Efficient XML serialization with lutaml-model
|
|
2170
|
-
* Optimized ZIP handling
|
|
81
|
+
== Features
|
|
2171
82
|
|
|
2172
|
-
|
|
83
|
+
* Full DOCX and MHTML read/write with format conversion
|
|
84
|
+
* 29 bundled themes, 12 stylesets, 23 color schemes, 25 font schemes
|
|
85
|
+
* 30-locale document elements (240 templates)
|
|
86
|
+
* MS font to open-source substitution (Calibri->Carlito, Arial->Liberation Sans)
|
|
87
|
+
* Auto theme transition: detect MS themes by color fingerprint
|
|
88
|
+
* DOCX diffing: document-level (content/formatting) and package-level (ZIP/XML/OPC with Canon semantic comparison)
|
|
89
|
+
* DOCX validation: 3-layer pipeline (OPC + XSD + semantic rules)
|
|
90
|
+
* Prevention layer: auto-fix footnote/endnote cross-part invariants
|
|
91
|
+
* Tables, lists, images, headers/footers, footnotes, bookmarks, math
|
|
92
|
+
* Fluent Builder API and CLI interface
|
|
93
|
+
|
|
94
|
+
== Documentation
|
|
95
|
+
|
|
96
|
+
Full documentation is at https://metanorma.github.io/uniword[metanorma.github.io/uniword].
|
|
97
|
+
|
|
98
|
+
* link:docs/_getting-started/[Getting Started] -- Installation and first document
|
|
99
|
+
* link:docs/_interfaces/[Interfaces] -- Ruby API and CLI reference
|
|
100
|
+
* link:docs/_guides/[Guides] -- Step-by-step guides for every feature
|
|
101
|
+
* link:docs/_understanding/[Understanding] -- Architecture and design
|
|
102
|
+
* link:docs/_features/[Features] -- Theme and styleset catalogs
|
|
103
|
+
* link:docs/_verification/[Verification] -- DOCX validation and verification
|
|
104
|
+
* link:docs/_development/[Development] -- Contributing and code patterns
|
|
2173
105
|
|
|
2174
106
|
== Contributing
|
|
2175
107
|
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
Please see link:CONTRIBUTING.md[CONTRIBUTING.md] for development guidelines.
|
|
108
|
+
See link:CONTRIBUTING.md[CONTRIBUTING.md] for development guidelines.
|
|
109
|
+
Bug reports and pull requests are welcome at https://github.com/metanorma/uniword.
|
|
2179
110
|
|
|
2180
111
|
== License
|
|
2181
112
|
|
|
2182
113
|
The gem is available as open source under the terms of the https://opensource.org/licenses/BSD-2-Clause[BSD 2-Clause License].
|
|
2183
114
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
Copyright (c) 2024 Ribose Inc.
|
|
115
|
+
Copyright (c) 2024 Ribose Inc.
|