ooxml_parser 0.12.0 → 0.12.1
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/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb +3 -1
- data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/docx_paragraph_run_helpers.rb +8 -4
- data/lib/ooxml_parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70f22490ee51df42e0fcdab9b647c19ee44adcef3ad22a2af2ee68de346b8fcd
|
4
|
+
data.tar.gz: e7faaec854030bb9b6b435401c78d50f1421bbf12eac175c8772eba608b92ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c1dadbed29dddce8f84bb2df7c09b50fa117608f66fb5f4895259618d7659e772cf7617de7e5ea7979d914800d589eff122a6022670daeaad73de1817b013c
|
7
|
+
data.tar.gz: bb7a942fbc164badb3b066bd5fea520f972b8821929f10027f3f4be9e91161cbe7d11f4f5c519559da51280db12d7aa9f487dd31a24179e2bb8846b167e25cae
|
data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb
CHANGED
@@ -11,7 +11,7 @@ module OoxmlParser
|
|
11
11
|
# Class for working with DocxParagraphRun
|
12
12
|
class DocxParagraphRun < OOXMLDocumentObject
|
13
13
|
include DocxParagraphRunHelpers
|
14
|
-
attr_accessor :number, :font, :vertical_align, :size, :font_color, :
|
14
|
+
attr_accessor :number, :font, :vertical_align, :size, :font_color, :font_style, :text, :drawings,
|
15
15
|
:link, :highlight, :effect, :caps, :w,
|
16
16
|
:position, :em, :spacing, :break, :touch, :shape, :footnote, :endnote, :fld_char, :style,
|
17
17
|
:comments, :alternate_content, :page_number, :text_outline, :text_fill
|
@@ -22,6 +22,8 @@ module OoxmlParser
|
|
22
22
|
attr_accessor :run_properties
|
23
23
|
# @return [RunObject] object of run
|
24
24
|
attr_accessor :object
|
25
|
+
# @return [Shade] shade properties
|
26
|
+
attr_accessor :shade
|
25
27
|
|
26
28
|
def initialize(parent: nil)
|
27
29
|
@number = 0
|
@@ -53,10 +53,7 @@ module OoxmlParser
|
|
53
53
|
when 'color'
|
54
54
|
parse_color_tag(node_child)
|
55
55
|
when 'shd'
|
56
|
-
|
57
|
-
unless node_child.attribute('fill').value == 'auto' || node_child.attribute('fill').value == '' || node_child.attribute('fill').value == 'null'
|
58
|
-
self.background_color = Color.new(parent: self).parse_hex_string(node_child.attribute('fill').value)
|
59
|
-
end
|
56
|
+
@shade = Shade.new(parent: self).parse(node_child)
|
60
57
|
when 'u', 'uCs'
|
61
58
|
parse_underline(node_child)
|
62
59
|
when 'strike'
|
@@ -68,6 +65,13 @@ module OoxmlParser
|
|
68
65
|
self
|
69
66
|
end
|
70
67
|
|
68
|
+
# Temp method to return background color
|
69
|
+
# Need to be compatible with older versions
|
70
|
+
# @return [OoxmlParser::Color]
|
71
|
+
def background_color
|
72
|
+
shade.to_background_color
|
73
|
+
end
|
74
|
+
|
71
75
|
private
|
72
76
|
|
73
77
|
# Parse `color` tag
|
data/lib/ooxml_parser/version.rb
CHANGED