uniword 1.0.5 → 1.0.7
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea1c6924b201809b0adcd798ea5453ceb06a6628e9ea54ec30221d4d4b325ca4
|
|
4
|
+
data.tar.gz: 45d19527778e0c36b9acb7a2a7ce98e83ea9f841df619c2bf1eb3ae4f77fbc46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ff4355adebd0f8eb10843ca4ae83b43df148340b3ab562d1bd43b1317d6384fd0dd3fe713e741df9d57dbad2eca70684e946565dc9823bb923c75cc2f302226
|
|
7
|
+
data.tar.gz: 92b190e3421fce1634462ce0b6bdff183138c6eaefa41ef96cce9b441eba72661988a36ae652fa5df8afdd1ef3eeb3d62bdd9e7eb1cd09b10a7ae7863023b331
|
|
@@ -79,19 +79,16 @@ document_rels)
|
|
|
79
79
|
if document
|
|
80
80
|
content["word/document.xml"] =
|
|
81
81
|
document.to_xml(encoding: "UTF-8", prefix: true,
|
|
82
|
-
fix_boolean_elements: true,
|
|
83
82
|
standalone: true)
|
|
84
83
|
end
|
|
85
84
|
if styles
|
|
86
85
|
content["word/styles.xml"] =
|
|
87
86
|
styles.to_xml(encoding: "UTF-8", prefix: true,
|
|
88
|
-
fix_boolean_elements: true,
|
|
89
87
|
standalone: true)
|
|
90
88
|
end
|
|
91
89
|
if numbering
|
|
92
90
|
content["word/numbering.xml"] =
|
|
93
91
|
numbering.to_xml(encoding: "UTF-8", prefix: true,
|
|
94
|
-
fix_boolean_elements: true,
|
|
95
92
|
standalone: true)
|
|
96
93
|
end
|
|
97
94
|
if settings
|
|
@@ -131,13 +128,11 @@ document_rels)
|
|
|
131
128
|
if footnotes
|
|
132
129
|
content["word/footnotes.xml"] =
|
|
133
130
|
footnotes.to_xml(encoding: "UTF-8", prefix: true,
|
|
134
|
-
fix_boolean_elements: true,
|
|
135
131
|
standalone: true)
|
|
136
132
|
end
|
|
137
133
|
if endnotes
|
|
138
134
|
content["word/endnotes.xml"] =
|
|
139
135
|
endnotes.to_xml(encoding: "UTF-8", prefix: true,
|
|
140
|
-
fix_boolean_elements: true,
|
|
141
136
|
standalone: true)
|
|
142
137
|
end
|
|
143
138
|
|
|
@@ -457,7 +452,6 @@ document_rels)
|
|
|
457
452
|
idx += 1
|
|
458
453
|
content["word/header#{idx}.xml"] =
|
|
459
454
|
header_obj.to_xml(encoding: "UTF-8", prefix: true,
|
|
460
|
-
fix_boolean_elements: true,
|
|
461
455
|
standalone: true)
|
|
462
456
|
end
|
|
463
457
|
end
|
|
@@ -470,7 +464,6 @@ document_rels)
|
|
|
470
464
|
idx += 1
|
|
471
465
|
content["word/footer#{idx}.xml"] =
|
|
472
466
|
footer_obj.to_xml(encoding: "UTF-8", prefix: true,
|
|
473
|
-
fix_boolean_elements: true,
|
|
474
467
|
standalone: true)
|
|
475
468
|
end
|
|
476
469
|
end
|
|
@@ -481,7 +474,6 @@ document_rels)
|
|
|
481
474
|
document.header_footer_parts.each do |part|
|
|
482
475
|
content["word/#{part[:target]}"] =
|
|
483
476
|
part[:content].to_xml(encoding: "UTF-8", prefix: true,
|
|
484
|
-
fix_boolean_elements: true,
|
|
485
477
|
standalone: true)
|
|
486
478
|
end
|
|
487
479
|
end
|
|
@@ -88,6 +88,7 @@ module Uniword
|
|
|
88
88
|
part.instance_variable_set(:@pending_namespace_data, nil)
|
|
89
89
|
part.instance_variable_set(:@import_declaration_plan, nil)
|
|
90
90
|
part.instance_variable_set(:@xml_input_namespaces, nil)
|
|
91
|
+
part.instance_variable_set(:@pending_plan_root_element, nil)
|
|
91
92
|
end
|
|
92
93
|
end
|
|
93
94
|
|
|
@@ -390,12 +391,7 @@ module Uniword
|
|
|
390
391
|
record_fix("R2", "Generated w15:docId in GUID format")
|
|
391
392
|
end
|
|
392
393
|
|
|
393
|
-
|
|
394
|
-
settings.mc_ignorable = Ooxml::Types::McIgnorable.new(
|
|
395
|
-
"w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du",
|
|
396
|
-
)
|
|
397
|
-
record_fix("R1", "Added mc:Ignorable to settings")
|
|
398
|
-
end
|
|
394
|
+
settings.mc_ignorable = nil
|
|
399
395
|
end
|
|
400
396
|
|
|
401
397
|
def reconcile_font_table
|
|
@@ -436,9 +432,7 @@ module Uniword
|
|
|
436
432
|
font_table.fonts << font
|
|
437
433
|
end
|
|
438
434
|
|
|
439
|
-
font_table.mc_ignorable
|
|
440
|
-
"w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du",
|
|
441
|
-
)
|
|
435
|
+
font_table.mc_ignorable = nil
|
|
442
436
|
record_fix("R13",
|
|
443
437
|
"Populated font table with profile fonts and signatures")
|
|
444
438
|
end
|
|
@@ -457,9 +451,7 @@ module Uniword
|
|
|
457
451
|
|
|
458
452
|
ensure_default_styles(styles)
|
|
459
453
|
|
|
460
|
-
styles.mc_ignorable
|
|
461
|
-
"w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du",
|
|
462
|
-
)
|
|
454
|
+
styles.mc_ignorable = nil
|
|
463
455
|
record_fix("R10",
|
|
464
456
|
"Ensured styles have docDefaults, latentStyles, and default styles")
|
|
465
457
|
end
|
|
@@ -468,12 +460,7 @@ module Uniword
|
|
|
468
460
|
return unless profile
|
|
469
461
|
return unless package.numbering
|
|
470
462
|
|
|
471
|
-
|
|
472
|
-
package.numbering.mc_ignorable = Ooxml::Types::McIgnorable.new(
|
|
473
|
-
"w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14",
|
|
474
|
-
)
|
|
475
|
-
record_fix("R1", "Added mc:Ignorable to numbering")
|
|
476
|
-
end
|
|
463
|
+
package.numbering.mc_ignorable = nil
|
|
477
464
|
|
|
478
465
|
# Validate instance → definition references
|
|
479
466
|
package.numbering.instances.each do |inst|
|
|
@@ -499,10 +486,8 @@ module Uniword
|
|
|
499
486
|
package.web_settings
|
|
500
487
|
end
|
|
501
488
|
|
|
502
|
-
ws.mc_ignorable
|
|
503
|
-
|
|
504
|
-
)
|
|
505
|
-
record_fix("R1", "Added mc:Ignorable to webSettings")
|
|
489
|
+
ws.mc_ignorable = nil
|
|
490
|
+
record_fix("R1", "Cleared mc:Ignorable on webSettings")
|
|
506
491
|
end
|
|
507
492
|
|
|
508
493
|
def reconcile_app_properties
|
|
@@ -596,9 +581,7 @@ module Uniword
|
|
|
596
581
|
return unless package.document&.body
|
|
597
582
|
|
|
598
583
|
doc = package.document
|
|
599
|
-
doc.mc_ignorable
|
|
600
|
-
"w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14",
|
|
601
|
-
)
|
|
584
|
+
doc.mc_ignorable = Ooxml::Types::McIgnorable.new("w14")
|
|
602
585
|
|
|
603
586
|
record_fix("R1", "Added mc:Ignorable to document body")
|
|
604
587
|
record_fix("R12", "Assigned rsid and paraId to paragraphs")
|
|
@@ -15,8 +15,7 @@ module Uniword
|
|
|
15
15
|
# @param document [DocumentRoot] The document to serialize
|
|
16
16
|
# @return [String] The serialized XML
|
|
17
17
|
def serialize(document)
|
|
18
|
-
document.to_xml(encoding: "UTF-8", prefix: true
|
|
19
|
-
fix_boolean_elements: true)
|
|
18
|
+
document.to_xml(encoding: "UTF-8", prefix: true)
|
|
20
19
|
end
|
|
21
20
|
|
|
22
21
|
# Serialize a document to XML and return as a Nokogiri document
|
data/lib/uniword/version.rb
CHANGED