uniword 1.0.8 → 1.0.10
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/data/themes/office_format_scheme.xml +137 -0
- data/data/themes/office_theme.xml +2 -0
- data/lib/uniword/builder/comment_builder.rb +2 -1
- data/lib/uniword/builder/footnote_builder.rb +4 -2
- data/lib/uniword/builder/run_builder.rb +5 -0
- data/lib/uniword/document_input.rb +7 -0
- data/lib/uniword/document_writer.rb +1 -5
- data/lib/uniword/docx/package.rb +18 -0
- data/lib/uniword/docx/package_serialization.rb +38 -0
- data/lib/uniword/docx/reconciler.rb +159 -4
- data/lib/uniword/format_converter.rb +4 -19
- data/lib/uniword/has_run_position.rb +9 -0
- data/lib/uniword/lazy_loader.rb +1 -1
- data/lib/uniword/math/o_math.rb +3 -0
- data/lib/uniword/mhtml/document.rb +18 -0
- data/lib/uniword/properties/bold.rb +3 -33
- data/lib/uniword/properties/boolean_element_factory.rb +66 -0
- data/lib/uniword/properties/boolean_formatting.rb +15 -215
- data/lib/uniword/properties/italic.rb +3 -33
- data/lib/uniword/properties.rb +8 -3
- data/lib/uniword/schema/schema_loader.rb +1 -1
- data/lib/uniword/transformation/mhtml_element_renderer.rb +1 -1
- data/lib/uniword/version.rb +1 -1
- data/lib/uniword/wordprocessingml/attached_template.rb +18 -0
- data/lib/uniword/wordprocessingml/body.rb +18 -36
- data/lib/uniword/wordprocessingml/brk_bin.rb +17 -0
- data/lib/uniword/wordprocessingml/brk_bin_sub.rb +17 -0
- data/lib/uniword/wordprocessingml/character_spacing_control.rb +17 -0
- data/lib/uniword/wordprocessingml/clr_scheme_mapping.rb +39 -0
- data/lib/uniword/wordprocessingml/compat.rb +16 -0
- data/lib/uniword/wordprocessingml/decimal_symbol.rb +17 -0
- data/lib/uniword/wordprocessingml/def_jc.rb +17 -0
- data/lib/uniword/wordprocessingml/default_tab_stop.rb +17 -0
- data/lib/uniword/wordprocessingml/disp_def.rb +14 -0
- data/lib/uniword/wordprocessingml/do_not_display_page_boundaries.rb +14 -0
- data/lib/uniword/wordprocessingml/do_not_include_subdocs_in_stats.rb +17 -0
- data/lib/uniword/wordprocessingml/doc_vars.rb +36 -0
- data/lib/uniword/wordprocessingml/document_root.rb +17 -5
- data/lib/uniword/wordprocessingml/endnote_pr.rb +18 -0
- data/lib/uniword/wordprocessingml/endnotes.rb +18 -0
- data/lib/uniword/wordprocessingml/even_and_odd_headers.rb +17 -0
- data/lib/uniword/wordprocessingml/footnote_pos.rb +17 -0
- data/lib/uniword/wordprocessingml/footnote_pr.rb +20 -0
- data/lib/uniword/wordprocessingml/footnotes.rb +18 -0
- data/lib/uniword/wordprocessingml/hdr_shape_defaults.rb +19 -0
- data/lib/uniword/wordprocessingml/hyperlink.rb +3 -0
- data/lib/uniword/wordprocessingml/hyphenation_zone.rb +20 -0
- data/lib/uniword/wordprocessingml/int_lim.rb +17 -0
- data/lib/uniword/wordprocessingml/l_margin.rb +17 -0
- data/lib/uniword/wordprocessingml/list_separator.rb +17 -0
- data/lib/uniword/wordprocessingml/math_font.rb +17 -0
- data/lib/uniword/wordprocessingml/math_pr.rb +49 -0
- data/lib/uniword/wordprocessingml/mirror_margins.rb +17 -0
- data/lib/uniword/wordprocessingml/nary_lim.rb +17 -0
- data/lib/uniword/wordprocessingml/proof_state.rb +19 -0
- data/lib/uniword/wordprocessingml/r_margin.rb +17 -0
- data/lib/uniword/wordprocessingml/rsid.rb +17 -0
- data/lib/uniword/wordprocessingml/rsid_root.rb +17 -0
- data/lib/uniword/wordprocessingml/rsids.rb +22 -0
- data/lib/uniword/wordprocessingml/settings.rb +45 -511
- data/lib/uniword/wordprocessingml/shape_defaults.rb +21 -0
- data/lib/uniword/wordprocessingml/small_frac.rb +17 -0
- data/lib/uniword/wordprocessingml/style_pane_format_filter.rb +50 -0
- data/lib/uniword/wordprocessingml/style_pane_sort_method.rb +20 -0
- data/lib/uniword/wordprocessingml/table_cell.rb +6 -0
- data/lib/uniword/wordprocessingml/table_row_properties.rb +2 -0
- data/lib/uniword/wordprocessingml/theme_font_lang.rb +19 -0
- data/lib/uniword/wordprocessingml/w14_doc_id.rb +17 -0
- data/lib/uniword/wordprocessingml/w15_chart_tracking_ref_based.rb +14 -0
- data/lib/uniword/wordprocessingml/w15_doc_id.rb +17 -0
- data/lib/uniword/wordprocessingml/wrap_indent.rb +17 -0
- data/lib/uniword/wordprocessingml.rb +42 -56
- data/lib/uniword.rb +12 -5
- metadata +52 -3
- data/lib/uniword/ooxml/types/on_off_type.rb +0 -64
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class DecimalSymbol < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "decimalSymbol"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class DefJc < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "defJc"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class DefaultTabStop < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "defaultTabStop"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class DoNotDisplayPageBoundaries < Lutaml::Model::Serializable
|
|
8
|
+
xml do
|
|
9
|
+
element "doNotDisplayPageBoundaries"
|
|
10
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
# Do not include subdocs in statistics (empty marker)
|
|
8
|
+
#
|
|
9
|
+
# Element: <w:doNotIncludeSubdocsInStats>
|
|
10
|
+
class DoNotIncludeSubdocsInStats < Lutaml::Model::Serializable
|
|
11
|
+
xml do
|
|
12
|
+
element "doNotIncludeSubdocsInStats"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
# Document variable entry
|
|
8
|
+
#
|
|
9
|
+
# Element: <w:docVar>
|
|
10
|
+
class DocVar < Lutaml::Model::Serializable
|
|
11
|
+
attribute :name, :string
|
|
12
|
+
attribute :val, :string
|
|
13
|
+
|
|
14
|
+
xml do
|
|
15
|
+
element "docVar"
|
|
16
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
17
|
+
map_attribute "name", to: :name
|
|
18
|
+
map_attribute "val", to: :val
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Document variables container
|
|
23
|
+
#
|
|
24
|
+
# Element: <w:docVars>
|
|
25
|
+
class DocVars < Lutaml::Model::Serializable
|
|
26
|
+
attribute :doc_var, DocVar, collection: true
|
|
27
|
+
|
|
28
|
+
xml do
|
|
29
|
+
element "docVars"
|
|
30
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
31
|
+
mixed_content
|
|
32
|
+
map_element "docVar", to: :doc_var, render_nil: false
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
4
|
|
|
5
|
+
require_relative "../document_input"
|
|
5
6
|
require_relative "document_root/feature_facade"
|
|
6
7
|
|
|
7
8
|
module Uniword
|
|
@@ -12,6 +13,7 @@ module Uniword
|
|
|
12
13
|
# Element: <w:document>
|
|
13
14
|
class DocumentRoot < Lutaml::Model::Serializable
|
|
14
15
|
include FeatureFacade
|
|
16
|
+
include Uniword::DocumentInput
|
|
15
17
|
|
|
16
18
|
attribute :mc_ignorable, Uniword::Ooxml::Types::McIgnorable
|
|
17
19
|
attribute :body, Body, default: -> { Body.new }
|
|
@@ -79,13 +81,14 @@ module Uniword
|
|
|
79
81
|
map_element "body", to: :body, render_default: true
|
|
80
82
|
end
|
|
81
83
|
|
|
82
|
-
# Override to_xml to sync
|
|
83
|
-
# lutaml-model's compiled serializer may
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
# and tables are included.
|
|
84
|
+
# Override to_xml to sync element_order on child collections
|
|
85
|
+
# before serialization. lutaml-model's compiled serializer may
|
|
86
|
+
# bypass child #to_xml when serializing nested elements, so we
|
|
87
|
+
# sync here at the DocumentRoot level.
|
|
87
88
|
def to_xml(options = {})
|
|
88
89
|
body&.sync_element_order_for_serialization
|
|
90
|
+
footnotes&.sync_element_order if footnotes
|
|
91
|
+
endnotes&.sync_element_order if endnotes
|
|
89
92
|
super
|
|
90
93
|
end
|
|
91
94
|
|
|
@@ -210,6 +213,15 @@ module Uniword
|
|
|
210
213
|
end.compact
|
|
211
214
|
end
|
|
212
215
|
|
|
216
|
+
# @return [Hash] Document statistics (paragraphs, tables, images)
|
|
217
|
+
def document_stats
|
|
218
|
+
{
|
|
219
|
+
paragraphs: paragraphs.count,
|
|
220
|
+
tables: tables.count,
|
|
221
|
+
images: images.count,
|
|
222
|
+
}
|
|
223
|
+
end
|
|
224
|
+
|
|
213
225
|
# Check if document structure is valid.
|
|
214
226
|
# Runs structural checks via Validation::StructuralValidator.
|
|
215
227
|
# Use the verify CLI command for full OPC + XSD + semantic validation.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class EndnotePr < Lutaml::Model::Serializable
|
|
8
|
+
attribute :endnotes, Endnote, collection: true
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "endnotePr"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
mixed_content
|
|
14
|
+
map_element "endnote", to: :endnotes, render_nil: false
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -19,6 +19,24 @@ module Uniword
|
|
|
19
19
|
|
|
20
20
|
map_element "endnote", to: :endnote_entries, render_nil: false
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def sync_element_order
|
|
24
|
+
return if element_order.nil? || element_order.empty?
|
|
25
|
+
|
|
26
|
+
counts = element_order.each_with_object(Hash.new(0)) do |e, h|
|
|
27
|
+
h[e.name] += 1
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
missing = endnote_entries.size - counts["endnote"]
|
|
31
|
+
missing.times do
|
|
32
|
+
element_order << Lutaml::Xml::Element.new("Element", "endnote")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_xml(options = {})
|
|
37
|
+
sync_element_order
|
|
38
|
+
super
|
|
39
|
+
end
|
|
22
40
|
end
|
|
23
41
|
end
|
|
24
42
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
# Even and odd page headers (empty marker)
|
|
8
|
+
#
|
|
9
|
+
# Element: <w:evenAndOddHeaders>
|
|
10
|
+
class EvenAndOddHeaders < Lutaml::Model::Serializable
|
|
11
|
+
xml do
|
|
12
|
+
element "evenAndOddHeaders"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class FootnotePos < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "pos"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class FootnotePr < Lutaml::Model::Serializable
|
|
8
|
+
attribute :pos, FootnotePos
|
|
9
|
+
attribute :footnotes, Footnote, collection: true
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "footnotePr"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
mixed_content
|
|
15
|
+
map_element "pos", to: :pos, render_nil: false
|
|
16
|
+
map_element "footnote", to: :footnotes, render_nil: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -19,6 +19,24 @@ module Uniword
|
|
|
19
19
|
|
|
20
20
|
map_element "footnote", to: :footnote_entries, render_nil: false
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def sync_element_order
|
|
24
|
+
return if element_order.nil? || element_order.empty?
|
|
25
|
+
|
|
26
|
+
counts = element_order.each_with_object(Hash.new(0)) do |e, h|
|
|
27
|
+
h[e.name] += 1
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
missing = footnote_entries.size - counts["footnote"]
|
|
31
|
+
missing.times do
|
|
32
|
+
element_order << Lutaml::Xml::Element.new("Element", "footnote")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_xml(options = {})
|
|
37
|
+
sync_element_order
|
|
38
|
+
super
|
|
39
|
+
end
|
|
22
40
|
end
|
|
23
41
|
end
|
|
24
42
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
require_relative "../vml_office"
|
|
5
|
+
|
|
6
|
+
module Uniword
|
|
7
|
+
module Wordprocessingml
|
|
8
|
+
class HdrShapeDefaults < Lutaml::Model::Serializable
|
|
9
|
+
attribute :shape_defaults, Uniword::VmlOffice::VmlShapeDefaults
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "hdrShapeDefaults"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
mixed_content
|
|
15
|
+
map_element "shapedefaults", to: :shape_defaults, render_nil: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "lutaml/model"
|
|
4
|
+
require_relative "../has_run_position"
|
|
4
5
|
|
|
5
6
|
module Uniword
|
|
6
7
|
module Wordprocessingml
|
|
@@ -9,6 +10,8 @@ module Uniword
|
|
|
9
10
|
# Generated from OOXML schema: wordprocessingml.yml
|
|
10
11
|
# Element: <w:hyperlink>
|
|
11
12
|
class Hyperlink < Lutaml::Model::Serializable
|
|
13
|
+
include Uniword::HasRunPosition
|
|
14
|
+
|
|
12
15
|
attribute :id, :string
|
|
13
16
|
attribute :anchor, :string
|
|
14
17
|
attribute :tooltip, :string
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
# Hyphenation zone width
|
|
8
|
+
#
|
|
9
|
+
# Element: <w:hyphenationZone>
|
|
10
|
+
class HyphenationZone < Lutaml::Model::Serializable
|
|
11
|
+
attribute :val, :string
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
element "hyphenationZone"
|
|
15
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
16
|
+
map_attribute "val", to: :val
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class IntLim < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "intLim"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class LMargin < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "lMargin"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class ListSeparator < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "listSeparator"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class MathFont < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "mathFont"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
require_relative "math_font"
|
|
5
|
+
require_relative "brk_bin"
|
|
6
|
+
require_relative "brk_bin_sub"
|
|
7
|
+
require_relative "small_frac"
|
|
8
|
+
require_relative "disp_def"
|
|
9
|
+
require_relative "l_margin"
|
|
10
|
+
require_relative "r_margin"
|
|
11
|
+
require_relative "def_jc"
|
|
12
|
+
require_relative "wrap_indent"
|
|
13
|
+
require_relative "int_lim"
|
|
14
|
+
require_relative "nary_lim"
|
|
15
|
+
|
|
16
|
+
module Uniword
|
|
17
|
+
module Wordprocessingml
|
|
18
|
+
class MathPr < Lutaml::Model::Serializable
|
|
19
|
+
attribute :math_font, MathFont
|
|
20
|
+
attribute :brk_bin, BrkBin
|
|
21
|
+
attribute :brk_bin_sub, BrkBinSub
|
|
22
|
+
attribute :small_frac, SmallFrac
|
|
23
|
+
attribute :disp_def, DispDef
|
|
24
|
+
attribute :l_margin, LMargin
|
|
25
|
+
attribute :r_margin, RMargin
|
|
26
|
+
attribute :def_jc, DefJc
|
|
27
|
+
attribute :wrap_indent, WrapIndent
|
|
28
|
+
attribute :int_lim, IntLim
|
|
29
|
+
attribute :nary_lim, NaryLim
|
|
30
|
+
|
|
31
|
+
xml do
|
|
32
|
+
element "mathPr"
|
|
33
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
34
|
+
mixed_content
|
|
35
|
+
map_element "mathFont", to: :math_font, render_nil: false
|
|
36
|
+
map_element "brkBin", to: :brk_bin, render_nil: false
|
|
37
|
+
map_element "brkBinSub", to: :brk_bin_sub, render_nil: false
|
|
38
|
+
map_element "smallFrac", to: :small_frac, render_nil: false
|
|
39
|
+
map_element "dispDef", to: :disp_def, render_nil: false
|
|
40
|
+
map_element "lMargin", to: :l_margin, render_nil: false
|
|
41
|
+
map_element "rMargin", to: :r_margin, render_nil: false
|
|
42
|
+
map_element "defJc", to: :def_jc, render_nil: false
|
|
43
|
+
map_element "wrapIndent", to: :wrap_indent, render_nil: false
|
|
44
|
+
map_element "intLim", to: :int_lim, render_nil: false
|
|
45
|
+
map_element "naryLim", to: :nary_lim, render_nil: false
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
# Mirror margins for book layout (empty marker)
|
|
8
|
+
#
|
|
9
|
+
# Element: <w:mirrorMargins>
|
|
10
|
+
class MirrorMargins < Lutaml::Model::Serializable
|
|
11
|
+
xml do
|
|
12
|
+
element "mirrorMargins"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class NaryLim < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "naryLim"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class ProofState < Lutaml::Model::Serializable
|
|
8
|
+
attribute :spelling, :string
|
|
9
|
+
attribute :grammar, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "proofState"
|
|
13
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
14
|
+
map_attribute "spelling", to: :spelling
|
|
15
|
+
map_attribute "grammar", to: :grammar
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class RMargin < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "rMargin"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::MathML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class Rsid < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "rsid"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
|
|
5
|
+
module Uniword
|
|
6
|
+
module Wordprocessingml
|
|
7
|
+
class RsidRoot < Lutaml::Model::Serializable
|
|
8
|
+
attribute :val, :string
|
|
9
|
+
|
|
10
|
+
xml do
|
|
11
|
+
element "rsidRoot"
|
|
12
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
13
|
+
map_attribute "val", to: :val
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "lutaml/model"
|
|
4
|
+
require_relative "rsid_root"
|
|
5
|
+
require_relative "rsid"
|
|
6
|
+
|
|
7
|
+
module Uniword
|
|
8
|
+
module Wordprocessingml
|
|
9
|
+
class Rsids < Lutaml::Model::Serializable
|
|
10
|
+
attribute :rsid_root, RsidRoot
|
|
11
|
+
attribute :rsid, Rsid, collection: true
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
element "rsids"
|
|
15
|
+
namespace Uniword::Ooxml::Namespaces::WordProcessingML
|
|
16
|
+
mixed_content
|
|
17
|
+
map_element "rsidRoot", to: :rsid_root, render_nil: false
|
|
18
|
+
map_element "rsid", to: :rsid, render_nil: false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|