uniword 1.0.10 → 1.2.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.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/config/font_metadata.yml +56 -0
  3. data/lib/uniword/accessibility/rules/descriptive_headings_rule.rb +1 -1
  4. data/lib/uniword/assembly/toc.rb +4 -14
  5. data/lib/uniword/assembly/variable_substitutor.rb +3 -4
  6. data/lib/uniword/batch/stages/normalize_styles_stage.rb +4 -2
  7. data/lib/uniword/builder/base_builder.rb +25 -0
  8. data/lib/uniword/builder/chart_builder.rb +33 -14
  9. data/lib/uniword/builder/deterministic_id.rb +17 -0
  10. data/lib/uniword/builder/document_builder.rb +129 -34
  11. data/lib/uniword/builder/footnote_builder.rb +22 -23
  12. data/lib/uniword/builder/header_footer_builder.rb +10 -10
  13. data/lib/uniword/builder/image_builder.rb +24 -16
  14. data/lib/uniword/builder/list_builder.rb +2 -1
  15. data/lib/uniword/builder/paragraph_builder.rb +95 -20
  16. data/lib/uniword/builder/run_utils.rb +97 -0
  17. data/lib/uniword/builder/section_builder.rb +40 -67
  18. data/lib/uniword/builder/table_builder.rb +32 -13
  19. data/lib/uniword/builder/table_cell_builder.rb +19 -0
  20. data/lib/uniword/builder.rb +27 -19
  21. data/lib/uniword/cli/diff_cli.rb +0 -1
  22. data/lib/uniword/cli/generate_cli.rb +0 -1
  23. data/lib/uniword/cli/headers_cli.rb +0 -1
  24. data/lib/uniword/cli/images_cli.rb +0 -1
  25. data/lib/uniword/cli/main.rb +6 -7
  26. data/lib/uniword/cli/protect_cli.rb +0 -1
  27. data/lib/uniword/cli/resources_cli.rb +0 -1
  28. data/lib/uniword/cli/review_cli.rb +0 -1
  29. data/lib/uniword/cli/spellcheck_cli.rb +0 -1
  30. data/lib/uniword/cli/styleset_cli.rb +0 -1
  31. data/lib/uniword/cli/template_cli.rb +0 -1
  32. data/lib/uniword/cli/theme_cli.rb +0 -1
  33. data/lib/uniword/cli/toc_cli.rb +0 -1
  34. data/lib/uniword/cli/watermark_cli.rb +0 -1
  35. data/lib/uniword/cli.rb +6 -17
  36. data/lib/uniword/diff/document_differ.rb +23 -5
  37. data/lib/uniword/diff/package_differ.rb +0 -1
  38. data/lib/uniword/diff.rb +4 -0
  39. data/lib/uniword/document_factory.rb +16 -24
  40. data/lib/uniword/docx/document_statistics.rb +42 -54
  41. data/lib/uniword/docx/id_allocator.rb +143 -0
  42. data/lib/uniword/docx/package.rb +42 -6
  43. data/lib/uniword/docx/package_defaults.rb +16 -25
  44. data/lib/uniword/docx/package_serialization.rb +131 -127
  45. data/lib/uniword/docx/reconciler/body.rb +197 -0
  46. data/lib/uniword/docx/reconciler/fix_codes.rb +74 -0
  47. data/lib/uniword/docx/reconciler/helpers.rb +337 -0
  48. data/lib/uniword/docx/reconciler/notes.rb +301 -0
  49. data/lib/uniword/docx/reconciler/package_structure.rb +322 -0
  50. data/lib/uniword/docx/reconciler/parts.rb +484 -0
  51. data/lib/uniword/docx/reconciler/referential_integrity.rb +449 -0
  52. data/lib/uniword/docx/reconciler/tables.rb +162 -0
  53. data/lib/uniword/docx/reconciler/theme.rb +141 -0
  54. data/lib/uniword/docx/reconciler.rb +44 -1069
  55. data/lib/uniword/docx.rb +3 -0
  56. data/lib/uniword/drawingml/color_scheme.rb +38 -5
  57. data/lib/uniword/hyperlink.rb +27 -26
  58. data/lib/uniword/infrastructure/zip_packager.rb +41 -38
  59. data/lib/uniword/lazy_loader.rb +36 -62
  60. data/lib/uniword/math.rb +3 -86
  61. data/lib/uniword/mhtml/document.rb +1 -3
  62. data/lib/uniword/model_attribute_access.rb +27 -0
  63. data/lib/uniword/ooxml/namespaces.rb +62 -2
  64. data/lib/uniword/ooxml/relationships/package_relationships.rb +7 -0
  65. data/lib/uniword/presentationml/slide_id.rb +0 -1
  66. data/lib/uniword/presentationml/slide_master_id.rb +0 -1
  67. data/lib/uniword/properties/bold.rb +0 -2
  68. data/lib/uniword/properties/boolean_formatting.rb +0 -2
  69. data/lib/uniword/properties/borders.rb +1 -1
  70. data/lib/uniword/properties/italic.rb +0 -2
  71. data/lib/uniword/properties/numbering_properties.rb +1 -1
  72. data/lib/uniword/properties/style_reference.rb +13 -0
  73. data/lib/uniword/quality/rules/heading_hierarchy_rule.rb +1 -1
  74. data/lib/uniword/quality/rules/style_consistency_rule.rb +1 -1
  75. data/lib/uniword/review/review_manager.rb +0 -2
  76. data/lib/uniword/template/helpers/loop_helper.rb +2 -2
  77. data/lib/uniword/template/variable_resolver.rb +14 -1
  78. data/lib/uniword/theme/theme_xml_parser.rb +1 -1
  79. data/lib/uniword/toc/toc_generator.rb +3 -14
  80. data/lib/uniword/transformation/mhtml_element_renderer.rb +94 -37
  81. data/lib/uniword/transformation/mhtml_metadata_builder.rb +1 -1
  82. data/lib/uniword/transformation/mhtml_style_builder.rb +9 -2
  83. data/lib/uniword/transformation/ooxml_to_html_converter.rb +3 -5
  84. data/lib/uniword/transformation/ooxml_to_mhtml_converter.rb +7 -15
  85. data/lib/uniword/transformation/yaml_css_generator.rb +815 -0
  86. data/lib/uniword/transformation.rb +2 -0
  87. data/lib/uniword/validation/checkers/internal_link_checker.rb +2 -3
  88. data/lib/uniword/version.rb +1 -1
  89. data/lib/uniword/visitor/text_extractor.rb +2 -1
  90. data/lib/uniword/watermark/manager.rb +2 -2
  91. data/lib/uniword/wordprocessingml/allow_png.rb +14 -0
  92. data/lib/uniword/wordprocessingml/body.rb +53 -18
  93. data/lib/uniword/wordprocessingml/body_div.rb +17 -0
  94. data/lib/uniword/wordprocessingml/div_border.rb +23 -0
  95. data/lib/uniword/wordprocessingml/div_borders.rb +24 -0
  96. data/lib/uniword/wordprocessingml/divs_child.rb +17 -0
  97. data/lib/uniword/wordprocessingml/document_root.rb +6 -3
  98. data/lib/uniword/wordprocessingml/endnote.rb +1 -1
  99. data/lib/uniword/wordprocessingml/endnotes.rb +4 -0
  100. data/lib/uniword/wordprocessingml/footer.rb +4 -0
  101. data/lib/uniword/wordprocessingml/footer_reference.rb +0 -1
  102. data/lib/uniword/wordprocessingml/footnote.rb +1 -1
  103. data/lib/uniword/wordprocessingml/footnotes.rb +4 -0
  104. data/lib/uniword/wordprocessingml/header.rb +4 -0
  105. data/lib/uniword/wordprocessingml/header_reference.rb +0 -1
  106. data/lib/uniword/wordprocessingml/hyperlink.rb +2 -2
  107. data/lib/uniword/wordprocessingml/instr_text.rb +20 -5
  108. data/lib/uniword/wordprocessingml/level.rb +2 -0
  109. data/lib/uniword/wordprocessingml/mar_bottom.rb +17 -0
  110. data/lib/uniword/wordprocessingml/mar_left.rb +17 -0
  111. data/lib/uniword/wordprocessingml/mar_right.rb +17 -0
  112. data/lib/uniword/wordprocessingml/mar_top.rb +17 -0
  113. data/lib/uniword/wordprocessingml/num.rb +4 -0
  114. data/lib/uniword/wordprocessingml/numbering.rb +1 -22
  115. data/lib/uniword/wordprocessingml/optimize_for_browser.rb +14 -0
  116. data/lib/uniword/wordprocessingml/page_defaults.rb +39 -0
  117. data/lib/uniword/wordprocessingml/paragraph.rb +16 -13
  118. data/lib/uniword/wordprocessingml/paragraph_properties.rb +12 -8
  119. data/lib/uniword/wordprocessingml/run.rb +32 -36
  120. data/lib/uniword/wordprocessingml/run_properties/merging.rb +45 -0
  121. data/lib/uniword/wordprocessingml/run_properties.rb +8 -5
  122. data/lib/uniword/wordprocessingml/section_properties.rb +3 -3
  123. data/lib/uniword/wordprocessingml/separator_char.rb +21 -0
  124. data/lib/uniword/wordprocessingml/settings.rb +19 -17
  125. data/lib/uniword/wordprocessingml/styles/style_definition.rb +1 -1
  126. data/lib/uniword/wordprocessingml/styles/style_library.rb +16 -0
  127. data/lib/uniword/wordprocessingml/table_defaults.rb +44 -0
  128. data/lib/uniword/wordprocessingml/text.rb +8 -2
  129. data/lib/uniword/wordprocessingml/web_div.rb +41 -0
  130. data/lib/uniword/wordprocessingml/web_divs.rb +18 -0
  131. data/lib/uniword/wordprocessingml/web_encoding.rb +17 -0
  132. data/lib/uniword/wordprocessingml/web_settings.rb +5 -21
  133. data/lib/uniword/wordprocessingml/zoom.rb +2 -0
  134. data/lib/uniword/wordprocessingml.rb +23 -0
  135. data/lib/uniword.rb +27 -0
  136. metadata +47 -70
  137. data/lib/uniword/math/accent.rb +0 -25
  138. data/lib/uniword/math/accent_properties.rb +0 -25
  139. data/lib/uniword/math/argument_properties.rb +0 -22
  140. data/lib/uniword/math/bar.rb +0 -25
  141. data/lib/uniword/math/bar_properties.rb +0 -25
  142. data/lib/uniword/math/begin_char.rb +0 -22
  143. data/lib/uniword/math/border_box.rb +0 -25
  144. data/lib/uniword/math/border_box_properties.rb +0 -39
  145. data/lib/uniword/math/box.rb +0 -25
  146. data/lib/uniword/math/box_properties.rb +0 -33
  147. data/lib/uniword/math/char.rb +0 -22
  148. data/lib/uniword/math/control_properties.rb +0 -27
  149. data/lib/uniword/math/degree.rb +0 -26
  150. data/lib/uniword/math/delimiter.rb +0 -25
  151. data/lib/uniword/math/delimiter_properties.rb +0 -33
  152. data/lib/uniword/math/denominator.rb +0 -26
  153. data/lib/uniword/math/element.rb +0 -61
  154. data/lib/uniword/math/end_char.rb +0 -22
  155. data/lib/uniword/math/equation_array.rb +0 -25
  156. data/lib/uniword/math/equation_array_properties.rb +0 -33
  157. data/lib/uniword/math/fraction.rb +0 -27
  158. data/lib/uniword/math/fraction_properties.rb +0 -25
  159. data/lib/uniword/math/function.rb +0 -27
  160. data/lib/uniword/math/function_name.rb +0 -26
  161. data/lib/uniword/math/function_properties.rb +0 -23
  162. data/lib/uniword/math/group_char.rb +0 -25
  163. data/lib/uniword/math/group_char_properties.rb +0 -29
  164. data/lib/uniword/math/lim.rb +0 -26
  165. data/lib/uniword/math/lower_limit.rb +0 -27
  166. data/lib/uniword/math/lower_limit_properties.rb +0 -23
  167. data/lib/uniword/math/math_break.rb +0 -22
  168. data/lib/uniword/math/math_font.rb +0 -22
  169. data/lib/uniword/math/math_properties.rb +0 -53
  170. data/lib/uniword/math/math_run.rb +0 -42
  171. data/lib/uniword/math/math_run_properties.rb +0 -37
  172. data/lib/uniword/math/math_simple_int_val.rb +0 -24
  173. data/lib/uniword/math/math_simple_val.rb +0 -24
  174. data/lib/uniword/math/math_style.rb +0 -22
  175. data/lib/uniword/math/math_text.rb +0 -23
  176. data/lib/uniword/math/matrix.rb +0 -25
  177. data/lib/uniword/math/matrix_column.rb +0 -23
  178. data/lib/uniword/math/matrix_column_properties.rb +0 -24
  179. data/lib/uniword/math/matrix_columns.rb +0 -23
  180. data/lib/uniword/math/matrix_properties.rb +0 -37
  181. data/lib/uniword/math/matrix_row.rb +0 -23
  182. data/lib/uniword/math/nary.rb +0 -29
  183. data/lib/uniword/math/nary_properties.rb +0 -33
  184. data/lib/uniword/math/numerator.rb +0 -26
  185. data/lib/uniword/math/o_math.rb +0 -65
  186. data/lib/uniword/math/o_math_para.rb +0 -25
  187. data/lib/uniword/math/o_math_para_properties.rb +0 -22
  188. data/lib/uniword/math/phantom.rb +0 -25
  189. data/lib/uniword/math/phantom_properties.rb +0 -33
  190. data/lib/uniword/math/pre_sub_superscript.rb +0 -29
  191. data/lib/uniword/math/pre_sub_superscript_properties.rb +0 -23
  192. data/lib/uniword/math/radical.rb +0 -27
  193. data/lib/uniword/math/radical_properties.rb +0 -25
  194. data/lib/uniword/math/separator_char.rb +0 -22
  195. data/lib/uniword/math/sub.rb +0 -26
  196. data/lib/uniword/math/sub_superscript.rb +0 -29
  197. data/lib/uniword/math/sub_superscript_properties.rb +0 -25
  198. data/lib/uniword/math/subscript.rb +0 -27
  199. data/lib/uniword/math/subscript_properties.rb +0 -23
  200. data/lib/uniword/math/sup.rb +0 -26
  201. data/lib/uniword/math/superscript.rb +0 -27
  202. data/lib/uniword/math/superscript_properties.rb +0 -23
  203. data/lib/uniword/math/upper_limit.rb +0 -27
  204. data/lib/uniword/math/upper_limit_properties.rb +0 -23
@@ -4,35 +4,17 @@ require "lutaml/model"
4
4
 
5
5
  module Uniword
6
6
  module Wordprocessingml
7
- # Optimize for browser marker element
8
- # Presence = true, Absence = false
9
- class OptimizeForBrowser < Lutaml::Model::Serializable
10
- xml do
11
- element "optimizeForBrowser"
12
- namespace Uniword::Ooxml::Namespaces::WordProcessingML
13
- end
14
- end
15
-
16
- # Allow PNG marker element
17
- # Presence = true, Absence = false
18
- class AllowPng < Lutaml::Model::Serializable
19
- xml do
20
- element "allowPNG"
21
- namespace Uniword::Ooxml::Namespaces::WordProcessingML
22
- end
23
- end
24
-
25
- # Web settings (word/webSettings.xml)
26
- #
27
- # Contains settings related to web publishing
28
7
  class WebSettings < Lutaml::Model::Serializable
29
8
  attribute :mc_ignorable, Ooxml::Types::McIgnorable
30
9
  attribute :optimize_for_browser, OptimizeForBrowser
31
10
  attribute :allow_png, AllowPng
11
+ attribute :divs, WebDivs
12
+ attribute :web_encoding, WebEncoding
32
13
 
33
14
  xml do
34
15
  element "webSettings"
35
16
  namespace Uniword::Ooxml::Namespaces::WordProcessingML
17
+ mixed_content
36
18
 
37
19
  namespace_scope [
38
20
  { namespace: Uniword::Ooxml::Namespaces::MarkupCompatibility,
@@ -60,6 +42,8 @@ module Uniword
60
42
  map_element "optimizeForBrowser", to: :optimize_for_browser,
61
43
  render_nil: false
62
44
  map_element "allowPNG", to: :allow_png, render_nil: false
45
+ map_element "divs", to: :divs, render_nil: false
46
+ map_element "encoding", to: :web_encoding, render_nil: false
63
47
  end
64
48
  end
65
49
  end
@@ -9,12 +9,14 @@ module Uniword
9
9
  # Generated from OOXML schema: wordprocessingml.yml
10
10
  # Element: <w:zoom>
11
11
  class Zoom < Lutaml::Model::Serializable
12
+ attribute :val, :string
12
13
  attribute :percent, :integer
13
14
 
14
15
  xml do
15
16
  element "zoom"
16
17
  namespace Uniword::Ooxml::Namespaces::WordProcessingML
17
18
 
19
+ map_attribute "val", to: :val
18
20
  map_attribute "percent", to: :percent
19
21
  end
20
22
  end
@@ -34,6 +34,9 @@ module Uniword
34
34
  autoload :LastRenderedPageBreak,
35
35
  "uniword/wordprocessingml/last_rendered_page_break"
36
36
  autoload :CarriageReturn, "uniword/wordprocessingml/carriage_return"
37
+ autoload :SeparatorChar, "uniword/wordprocessingml/separator_char"
38
+ autoload :ContinuationSeparatorChar,
39
+ "uniword/wordprocessingml/separator_char"
37
40
  autoload :SimpleField, "uniword/wordprocessingml/simple_field"
38
41
  autoload :TextBoxContent, "uniword/wordprocessingml/text_box_content"
39
42
  autoload :Object, "uniword/wordprocessingml/object"
@@ -129,7 +132,23 @@ module Uniword
129
132
  autoload :Font, "uniword/wordprocessingml/font"
130
133
  autoload :Fonts, "uniword/wordprocessingml/fonts"
131
134
  autoload :FontTable, "uniword/wordprocessingml/font_table"
135
+
136
+ # Web settings
132
137
  autoload :WebSettings, "uniword/wordprocessingml/web_settings"
138
+ autoload :OptimizeForBrowser,
139
+ "uniword/wordprocessingml/optimize_for_browser"
140
+ autoload :AllowPng, "uniword/wordprocessingml/allow_png"
141
+ autoload :DivBorder, "uniword/wordprocessingml/div_border"
142
+ autoload :DivBorders, "uniword/wordprocessingml/div_borders"
143
+ autoload :MarLeft, "uniword/wordprocessingml/mar_left"
144
+ autoload :MarRight, "uniword/wordprocessingml/mar_right"
145
+ autoload :MarTop, "uniword/wordprocessingml/mar_top"
146
+ autoload :MarBottom, "uniword/wordprocessingml/mar_bottom"
147
+ autoload :BodyDiv, "uniword/wordprocessingml/body_div"
148
+ autoload :DivsChild, "uniword/wordprocessingml/divs_child"
149
+ autoload :WebDiv, "uniword/wordprocessingml/web_div"
150
+ autoload :WebDivs, "uniword/wordprocessingml/web_divs"
151
+ autoload :WebEncoding, "uniword/wordprocessingml/web_encoding"
133
152
 
134
153
  # Numbering
135
154
  autoload :AbstractNum, "uniword/wordprocessingml/abstract_num"
@@ -231,5 +250,9 @@ module Uniword
231
250
  # Mail merge
232
251
  autoload :Recipients, "uniword/wordprocessingml/recipients"
233
252
  autoload :RecipientData, "uniword/wordprocessingml/recipient_data"
253
+
254
+ # Shared defaults
255
+ autoload :PageDefaults, "uniword/wordprocessingml/page_defaults"
256
+ autoload :TableDefaults, "uniword/wordprocessingml/table_defaults"
234
257
  end
235
258
  end
data/lib/uniword.rb CHANGED
@@ -39,8 +39,20 @@ Lutaml::Model::Config.xml_adapter_type = :nokogiri
39
39
  #
40
40
  # @see DocumentFactory Factory for reading documents
41
41
  module Uniword
42
+ # Wire Uniword into Omml's context system so Omml::Models types resolve
43
+ # correctly when used as attribute types on Uniword's serializable classes
44
+ # (Paragraph#o_maths typed as Omml::Models::CTOMath, etc.).
45
+ # register_in creates a :uniword context with all Omml models registered
46
+ # directly, falling back to :default for Uniword's own types. Setting
47
+ # Config.default_register means from_xml/to_xml calls without an explicit
48
+ # register: argument use :uniword automatically.
49
+ require "omml"
50
+ Omml::Configuration.register_in(:uniword)
51
+ Lutaml::Model::Config.default_register = :uniword
52
+
42
53
  # Version constant
43
54
  autoload :VERSION, "uniword/version"
55
+ autoload :ModelAttributeAccess, "uniword/model_attribute_access"
44
56
 
45
57
  # === Namespace Modules (autoload) ===
46
58
  # All autoloads MUST be inside the module they're registering constants for
@@ -125,6 +137,17 @@ module Uniword
125
137
  autoload :GenerateCLI, "uniword/cli/generate_cli"
126
138
  autoload :DiffCLI, "uniword/cli/diff_cli"
127
139
  autoload :TemplateCLI, "uniword/cli/template_cli"
140
+ autoload :CLIHelpers, "uniword/cli/helpers"
141
+ autoload :StyleSetCLI, "uniword/cli/styleset_cli"
142
+ autoload :ResourcesCLI, "uniword/cli/resources_cli"
143
+ autoload :ThemeCLI, "uniword/cli/theme_cli"
144
+ autoload :ReviewCLI, "uniword/cli/review_cli"
145
+ autoload :TocCLI, "uniword/cli/toc_cli"
146
+ autoload :ImagesCLI, "uniword/cli/images_cli"
147
+ autoload :SpellcheckCLI, "uniword/cli/spellcheck_cli"
148
+ autoload :HeadersCLI, "uniword/cli/headers_cli"
149
+ autoload :WatermarkCLI, "uniword/cli/watermark_cli"
150
+ autoload :ProtectCLI, "uniword/cli/protect_cli"
128
151
 
129
152
  # Diff (document comparison)
130
153
  autoload :Diff, "uniword/diff"
@@ -132,6 +155,10 @@ module Uniword
132
155
  # Review (comments and tracked changes)
133
156
  autoload :Review, "uniword/review"
134
157
 
158
+ # Shared tagging modules
159
+ autoload :HasRunPosition, "uniword/has_run_position"
160
+ autoload :DocumentInput, "uniword/document_input"
161
+
135
162
  # Spellcheck (spell and grammar checking)
136
163
  autoload :Spellcheck, "uniword/spellcheck"
137
164
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniword
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-14 00:00:00.000000000 Z
11
+ date: 2026-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.19'
61
+ - !ruby/object:Gem::Dependency
62
+ name: omml
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.2.3
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.2.3
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: rainbow
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -618,6 +632,7 @@ files:
618
632
  - lib/uniword/builder/bibliography_builder.rb
619
633
  - lib/uniword/builder/chart_builder.rb
620
634
  - lib/uniword/builder/comment_builder.rb
635
+ - lib/uniword/builder/deterministic_id.rb
621
636
  - lib/uniword/builder/document_builder.rb
622
637
  - lib/uniword/builder/footnote_builder.rb
623
638
  - lib/uniword/builder/has_borders.rb
@@ -628,6 +643,7 @@ files:
628
643
  - lib/uniword/builder/numbering_builder.rb
629
644
  - lib/uniword/builder/paragraph_builder.rb
630
645
  - lib/uniword/builder/run_builder.rb
646
+ - lib/uniword/builder/run_utils.rb
631
647
  - lib/uniword/builder/sdt_builder.rb
632
648
  - lib/uniword/builder/section_builder.rb
633
649
  - lib/uniword/builder/style_builder.rb
@@ -794,11 +810,21 @@ files:
794
810
  - lib/uniword/document_writer.rb
795
811
  - lib/uniword/docx.rb
796
812
  - lib/uniword/docx/document_statistics.rb
813
+ - lib/uniword/docx/id_allocator.rb
797
814
  - lib/uniword/docx/package.rb
798
815
  - lib/uniword/docx/package_defaults.rb
799
816
  - lib/uniword/docx/package_serialization.rb
800
817
  - lib/uniword/docx/profile.rb
801
818
  - lib/uniword/docx/reconciler.rb
819
+ - lib/uniword/docx/reconciler/body.rb
820
+ - lib/uniword/docx/reconciler/fix_codes.rb
821
+ - lib/uniword/docx/reconciler/helpers.rb
822
+ - lib/uniword/docx/reconciler/notes.rb
823
+ - lib/uniword/docx/reconciler/package_structure.rb
824
+ - lib/uniword/docx/reconciler/parts.rb
825
+ - lib/uniword/docx/reconciler/referential_integrity.rb
826
+ - lib/uniword/docx/reconciler/tables.rb
827
+ - lib/uniword/docx/reconciler/theme.rb
802
828
  - lib/uniword/drawingml.rb
803
829
  - lib/uniword/drawingml/adjust_value_list.rb
804
830
  - lib/uniword/drawingml/alpha.rb
@@ -996,75 +1022,7 @@ files:
996
1022
  - lib/uniword/loggable.rb
997
1023
  - lib/uniword/logger.rb
998
1024
  - lib/uniword/math.rb
999
- - lib/uniword/math/accent.rb
1000
- - lib/uniword/math/accent_properties.rb
1001
- - lib/uniword/math/argument_properties.rb
1002
- - lib/uniword/math/bar.rb
1003
- - lib/uniword/math/bar_properties.rb
1004
- - lib/uniword/math/begin_char.rb
1005
- - lib/uniword/math/border_box.rb
1006
- - lib/uniword/math/border_box_properties.rb
1007
- - lib/uniword/math/box.rb
1008
- - lib/uniword/math/box_properties.rb
1009
- - lib/uniword/math/char.rb
1010
- - lib/uniword/math/control_properties.rb
1011
- - lib/uniword/math/degree.rb
1012
- - lib/uniword/math/delimiter.rb
1013
- - lib/uniword/math/delimiter_properties.rb
1014
- - lib/uniword/math/denominator.rb
1015
- - lib/uniword/math/element.rb
1016
- - lib/uniword/math/end_char.rb
1017
- - lib/uniword/math/equation_array.rb
1018
- - lib/uniword/math/equation_array_properties.rb
1019
- - lib/uniword/math/fraction.rb
1020
- - lib/uniword/math/fraction_properties.rb
1021
- - lib/uniword/math/function.rb
1022
- - lib/uniword/math/function_name.rb
1023
- - lib/uniword/math/function_properties.rb
1024
- - lib/uniword/math/group_char.rb
1025
- - lib/uniword/math/group_char_properties.rb
1026
- - lib/uniword/math/lim.rb
1027
- - lib/uniword/math/lower_limit.rb
1028
- - lib/uniword/math/lower_limit_properties.rb
1029
- - lib/uniword/math/math_break.rb
1030
- - lib/uniword/math/math_font.rb
1031
- - lib/uniword/math/math_properties.rb
1032
- - lib/uniword/math/math_run.rb
1033
- - lib/uniword/math/math_run_properties.rb
1034
- - lib/uniword/math/math_simple_int_val.rb
1035
- - lib/uniword/math/math_simple_val.rb
1036
- - lib/uniword/math/math_style.rb
1037
- - lib/uniword/math/math_text.rb
1038
- - lib/uniword/math/matrix.rb
1039
- - lib/uniword/math/matrix_column.rb
1040
- - lib/uniword/math/matrix_column_properties.rb
1041
- - lib/uniword/math/matrix_columns.rb
1042
- - lib/uniword/math/matrix_properties.rb
1043
- - lib/uniword/math/matrix_row.rb
1044
- - lib/uniword/math/nary.rb
1045
- - lib/uniword/math/nary_properties.rb
1046
- - lib/uniword/math/numerator.rb
1047
- - lib/uniword/math/o_math.rb
1048
- - lib/uniword/math/o_math_para.rb
1049
- - lib/uniword/math/o_math_para_properties.rb
1050
- - lib/uniword/math/phantom.rb
1051
- - lib/uniword/math/phantom_properties.rb
1052
1025
  - lib/uniword/math/plurimath_adapter.rb
1053
- - lib/uniword/math/pre_sub_superscript.rb
1054
- - lib/uniword/math/pre_sub_superscript_properties.rb
1055
- - lib/uniword/math/radical.rb
1056
- - lib/uniword/math/radical_properties.rb
1057
- - lib/uniword/math/separator_char.rb
1058
- - lib/uniword/math/sub.rb
1059
- - lib/uniword/math/sub_superscript.rb
1060
- - lib/uniword/math/sub_superscript_properties.rb
1061
- - lib/uniword/math/subscript.rb
1062
- - lib/uniword/math/subscript_properties.rb
1063
- - lib/uniword/math/sup.rb
1064
- - lib/uniword/math/superscript.rb
1065
- - lib/uniword/math/superscript_properties.rb
1066
- - lib/uniword/math/upper_limit.rb
1067
- - lib/uniword/math/upper_limit_properties.rb
1068
1026
  - lib/uniword/math_equation.rb
1069
1027
  - lib/uniword/mhtml.rb
1070
1028
  - lib/uniword/mhtml/css_number_formatter.rb
@@ -1088,6 +1046,7 @@ files:
1088
1046
  - lib/uniword/mhtml/word_css.rb
1089
1047
  - lib/uniword/mhtml/wordstyle.css
1090
1048
  - lib/uniword/mhtml/xml_part.rb
1049
+ - lib/uniword/model_attribute_access.rb
1091
1050
  - lib/uniword/office.rb
1092
1051
  - lib/uniword/office/bottom.rb
1093
1052
  - lib/uniword/office/brightness.rb
@@ -1513,6 +1472,7 @@ files:
1513
1472
  - lib/uniword/transformation/transformation_rule.rb
1514
1473
  - lib/uniword/transformation/transformation_rule_registry.rb
1515
1474
  - lib/uniword/transformation/transformer.rb
1475
+ - lib/uniword/transformation/yaml_css_generator.rb
1516
1476
  - lib/uniword/validation.rb
1517
1477
  - lib/uniword/validation/checkers.rb
1518
1478
  - lib/uniword/validation/checkers/external_link_checker.rb
@@ -1653,11 +1613,13 @@ files:
1653
1613
  - lib/uniword/wordprocessingml.rb
1654
1614
  - lib/uniword/wordprocessingml/abstract_num.rb
1655
1615
  - lib/uniword/wordprocessingml/abstract_num_id.rb
1616
+ - lib/uniword/wordprocessingml/allow_png.rb
1656
1617
  - lib/uniword/wordprocessingml/alternate_content.rb
1657
1618
  - lib/uniword/wordprocessingml/anchor.rb
1658
1619
  - lib/uniword/wordprocessingml/attached_template.rb
1659
1620
  - lib/uniword/wordprocessingml/based_on.rb
1660
1621
  - lib/uniword/wordprocessingml/body.rb
1622
+ - lib/uniword/wordprocessingml/body_div.rb
1661
1623
  - lib/uniword/wordprocessingml/bookmark_end.rb
1662
1624
  - lib/uniword/wordprocessingml/bookmark_start.rb
1663
1625
  - lib/uniword/wordprocessingml/border.rb
@@ -1681,6 +1643,9 @@ files:
1681
1643
  - lib/uniword/wordprocessingml/default_tab_stop.rb
1682
1644
  - lib/uniword/wordprocessingml/deleted_text.rb
1683
1645
  - lib/uniword/wordprocessingml/disp_def.rb
1646
+ - lib/uniword/wordprocessingml/div_border.rb
1647
+ - lib/uniword/wordprocessingml/div_borders.rb
1648
+ - lib/uniword/wordprocessingml/divs_child.rb
1684
1649
  - lib/uniword/wordprocessingml/do_not_display_page_boundaries.rb
1685
1650
  - lib/uniword/wordprocessingml/do_not_include_subdocs_in_stats.rb
1686
1651
  - lib/uniword/wordprocessingml/doc_defaults.rb
@@ -1734,6 +1699,10 @@ files:
1734
1699
  - lib/uniword/wordprocessingml/list_separator.rb
1735
1700
  - lib/uniword/wordprocessingml/lvl_jc.rb
1736
1701
  - lib/uniword/wordprocessingml/lvl_text.rb
1702
+ - lib/uniword/wordprocessingml/mar_bottom.rb
1703
+ - lib/uniword/wordprocessingml/mar_left.rb
1704
+ - lib/uniword/wordprocessingml/mar_right.rb
1705
+ - lib/uniword/wordprocessingml/mar_top.rb
1737
1706
  - lib/uniword/wordprocessingml/math_font.rb
1738
1707
  - lib/uniword/wordprocessingml/math_pr.rb
1739
1708
  - lib/uniword/wordprocessingml/mc_requires.rb
@@ -1752,8 +1721,10 @@ files:
1752
1721
  - lib/uniword/wordprocessingml/numbering_instance.rb
1753
1722
  - lib/uniword/wordprocessingml/numbering_level.rb
1754
1723
  - lib/uniword/wordprocessingml/object.rb
1724
+ - lib/uniword/wordprocessingml/optimize_for_browser.rb
1755
1725
  - lib/uniword/wordprocessingml/outline.rb
1756
1726
  - lib/uniword/wordprocessingml/p_pr_default.rb
1727
+ - lib/uniword/wordprocessingml/page_defaults.rb
1757
1728
  - lib/uniword/wordprocessingml/page_margins.rb
1758
1729
  - lib/uniword/wordprocessingml/page_numbering.rb
1759
1730
  - lib/uniword/wordprocessingml/page_size.rb
@@ -1777,10 +1748,12 @@ files:
1777
1748
  - lib/uniword/wordprocessingml/run_properties.rb
1778
1749
  - lib/uniword/wordprocessingml/run_properties/accessors.rb
1779
1750
  - lib/uniword/wordprocessingml/run_properties/conversion.rb
1751
+ - lib/uniword/wordprocessingml/run_properties/merging.rb
1780
1752
  - lib/uniword/wordprocessingml/run_properties/predicates.rb
1781
1753
  - lib/uniword/wordprocessingml/run_properties/yaml_transforms.rb
1782
1754
  - lib/uniword/wordprocessingml/section_properties.rb
1783
1755
  - lib/uniword/wordprocessingml/semi_hidden.rb
1756
+ - lib/uniword/wordprocessingml/separator_char.rb
1784
1757
  - lib/uniword/wordprocessingml/settings.rb
1785
1758
  - lib/uniword/wordprocessingml/shading.rb
1786
1759
  - lib/uniword/wordprocessingml/shadow.rb
@@ -1830,6 +1803,7 @@ files:
1830
1803
  - lib/uniword/wordprocessingml/table_cell_borders.rb
1831
1804
  - lib/uniword/wordprocessingml/table_cell_margin.rb
1832
1805
  - lib/uniword/wordprocessingml/table_cell_properties.rb
1806
+ - lib/uniword/wordprocessingml/table_defaults.rb
1833
1807
  - lib/uniword/wordprocessingml/table_grid.rb
1834
1808
  - lib/uniword/wordprocessingml/table_properties.rb
1835
1809
  - lib/uniword/wordprocessingml/table_row.rb
@@ -1847,6 +1821,9 @@ files:
1847
1821
  - lib/uniword/wordprocessingml/w14_doc_id.rb
1848
1822
  - lib/uniword/wordprocessingml/w15_chart_tracking_ref_based.rb
1849
1823
  - lib/uniword/wordprocessingml/w15_doc_id.rb
1824
+ - lib/uniword/wordprocessingml/web_div.rb
1825
+ - lib/uniword/wordprocessingml/web_divs.rb
1826
+ - lib/uniword/wordprocessingml/web_encoding.rb
1850
1827
  - lib/uniword/wordprocessingml/web_settings.rb
1851
1828
  - lib/uniword/wordprocessingml/width_after.rb
1852
1829
  - lib/uniword/wordprocessingml/width_before.rb
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Accent object (hat, tilde, bar)
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:acc>
11
- class Accent < Lutaml::Model::Serializable
12
- attribute :properties, AccentProperties
13
- attribute :element, Element
14
-
15
- xml do
16
- element "acc"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "accPr", to: :properties, render_nil: false
21
- map_element "e", to: :element
22
- end
23
- end
24
- end
25
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Accent formatting properties
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:accPr>
11
- class AccentProperties < Lutaml::Model::Serializable
12
- attribute :chr, Char
13
- attribute :ctrl_pr, ControlProperties
14
-
15
- xml do
16
- element "accPr"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "chr", to: :chr, render_nil: false
21
- map_element "ctrlPr", to: :ctrl_pr, render_nil: false
22
- end
23
- end
24
- end
25
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Argument properties for math structures
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:argPr>
11
- class ArgumentProperties < Lutaml::Model::Serializable
12
- attribute :arg_size, :integer
13
-
14
- xml do
15
- element "argPr"
16
- namespace Uniword::Ooxml::Namespaces::MathML
17
-
18
- map_attribute "val", to: :arg_size
19
- end
20
- end
21
- end
22
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Bar object (overbar, underbar)
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:bar>
11
- class Bar < Lutaml::Model::Serializable
12
- attribute :properties, BarProperties
13
- attribute :element, Element
14
-
15
- xml do
16
- element "bar"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "barPr", to: :properties, render_nil: false
21
- map_element "e", to: :element
22
- end
23
- end
24
- end
25
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Bar formatting properties
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:barPr>
11
- class BarProperties < Lutaml::Model::Serializable
12
- attribute :pos, MathSimpleVal
13
- attribute :ctrl_pr, ControlProperties
14
-
15
- xml do
16
- element "barPr"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "pos", to: :pos, render_nil: false
21
- map_element "ctrlPr", to: :ctrl_pr, render_nil: false
22
- end
23
- end
24
- end
25
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Beginning delimiter character
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:begChr>
11
- class BeginChar < Lutaml::Model::Serializable
12
- attribute :val, :string
13
-
14
- xml do
15
- element "begChr"
16
- namespace Uniword::Ooxml::Namespaces::MathML
17
-
18
- map_attribute "val", to: :val
19
- end
20
- end
21
- end
22
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Border box object
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:borderBox>
11
- class BorderBox < Lutaml::Model::Serializable
12
- attribute :properties, BorderBoxProperties
13
- attribute :element, Element
14
-
15
- xml do
16
- element "borderBox"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "borderBoxPr", to: :properties, render_nil: false
21
- map_element "e", to: :element
22
- end
23
- end
24
- end
25
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Border box formatting properties
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:borderBoxPr>
11
- class BorderBoxProperties < Lutaml::Model::Serializable
12
- attribute :hide_top, MathSimpleVal
13
- attribute :hide_bot, MathSimpleVal
14
- attribute :hide_left, MathSimpleVal
15
- attribute :hide_right, MathSimpleVal
16
- attribute :strike_h, MathSimpleVal
17
- attribute :strike_v, MathSimpleVal
18
- attribute :strike_bltr, MathSimpleVal
19
- attribute :strike_tlbr, MathSimpleVal
20
- attribute :ctrl_pr, ControlProperties
21
-
22
- xml do
23
- element "borderBoxPr"
24
- namespace Uniword::Ooxml::Namespaces::MathML
25
- mixed_content
26
-
27
- map_element "hideTop", to: :hide_top, render_nil: false
28
- map_element "hideBot", to: :hide_bot, render_nil: false
29
- map_element "hideLeft", to: :hide_left, render_nil: false
30
- map_element "hideRight", to: :hide_right, render_nil: false
31
- map_element "strikeH", to: :strike_h, render_nil: false
32
- map_element "strikeV", to: :strike_v, render_nil: false
33
- map_element "strikeBLTR", to: :strike_bltr, render_nil: false
34
- map_element "strikeTLBR", to: :strike_tlbr, render_nil: false
35
- map_element "ctrlPr", to: :ctrl_pr, render_nil: false
36
- end
37
- end
38
- end
39
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Box object (rectangular container)
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:box>
11
- class Box < Lutaml::Model::Serializable
12
- attribute :properties, BoxProperties
13
- attribute :element, Element
14
-
15
- xml do
16
- element "box"
17
- namespace Uniword::Ooxml::Namespaces::MathML
18
- mixed_content
19
-
20
- map_element "boxPr", to: :properties, render_nil: false
21
- map_element "e", to: :element
22
- end
23
- end
24
- end
25
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "lutaml/model"
4
-
5
- module Uniword
6
- module Math
7
- # Box formatting properties
8
- #
9
- # Generated from OOXML schema: math.yml
10
- # Element: <m:boxPr>
11
- class BoxProperties < Lutaml::Model::Serializable
12
- attribute :opEmu, MathSimpleVal
13
- attribute :no_break, MathSimpleVal
14
- attribute :diff, MathSimpleVal
15
- attribute :brk, MathBreak
16
- attribute :aln, MathSimpleVal
17
- attribute :ctrl_pr, ControlProperties
18
-
19
- xml do
20
- element "boxPr"
21
- namespace Uniword::Ooxml::Namespaces::MathML
22
- mixed_content
23
-
24
- map_element "opEmu", to: :opEmu, render_nil: false
25
- map_element "noBreak", to: :no_break, render_nil: false
26
- map_element "diff", to: :diff, render_nil: false
27
- map_element "brk", to: :brk, render_nil: false
28
- map_element "aln", to: :aln, render_nil: false
29
- map_element "ctrlPr", to: :ctrl_pr, render_nil: false
30
- end
31
- end
32
- end
33
- end