ooxml_parser 0.34.1 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dc34421044dd53e46d0d5c355dac61acfe6bbb825381cb4c1d0aca2b5b78daf
4
- data.tar.gz: d7ef26c1cdc5d94a7c355ae64437f23663d5c1579d651427bbac0bf83a03964e
3
+ metadata.gz: 836b1f53810ef1ab5717cf7652d4b7a95dcc3a85bc4ec9cf752737a8358e4bbf
4
+ data.tar.gz: d34904dbdfd71e530fd6e4841350d5a2e4aa451e276f9ceae3e5def4ba6cf88a
5
5
  SHA512:
6
- metadata.gz: 358fb82db492d965faeb84fcb356d18db1e04c759bd17e2cb76398abe20b353e76fb7f4359c7235f2004f4acdc440c0b1fb8bddc8b0075c65f5832caca0d8c16
7
- data.tar.gz: e1d817d32dc5de38bb6ae960a50300068405fc079eb63f14c266a4cf472840f706e54586996b45ba80cb4af16c6615a05eafc56889a55f1289ea32fa1a551c66
6
+ metadata.gz: b6bd00887e2cfb939a2e398a7bb11563257d4eb7e3bd472660fca7075beeb49dc7a6bd4a4690ca7058d94df535080d5a08e92a1875f2c45391c67c12563dbf8d
7
+ data.tar.gz: 73964ba2f185ada0b486b63b40e69c379ad2b3b46687b635c5a19cb04a1466e900fb1b9a16be678dfaed8f7f450c56b311d9c472247594128392aea4202d071c
@@ -5,7 +5,7 @@ module OoxmlParser
5
5
  # Class for parsing `c:tx` object
6
6
  class SeriesText < OOXMLDocumentObject
7
7
  # @return [NumberStringReference] String reference of series
8
- attr_accessor :string
8
+ attr_accessor :reference
9
9
 
10
10
  # Parse Order
11
11
  # @param [Nokogiri::XML:Node] node with Order
@@ -13,8 +13,8 @@ module OoxmlParser
13
13
  def parse(node)
14
14
  node.xpath('*').each do |series_child|
15
15
  case series_child.name
16
- when 'strRef'
17
- @string = NumberStringReference.new(parent: self).parse(series_child)
16
+ when 'strRef', 'numRef'
17
+ @reference = NumberStringReference.new(parent: self).parse(series_child)
18
18
  end
19
19
  end
20
20
  self
@@ -15,7 +15,7 @@ module OoxmlParser
15
15
  # Parse string in hex
16
16
  # @param [String] hex_string with or without alpha-channel
17
17
  def parse_hex_string(hex_string)
18
- return self if AUTO_STRING_VALUE == hex_string
18
+ return self if hex_string == AUTO_STRING_VALUE
19
19
 
20
20
  case hex_string.length
21
21
  when 3
@@ -13,7 +13,7 @@ module OoxmlParser
13
13
  node.attributes.each do |key, value|
14
14
  case key
15
15
  when 'style'
16
- @style = value_to_symbol(value)
16
+ @style = value_to_symbol(value) unless value.value == 'none'
17
17
  end
18
18
  end
19
19
 
@@ -34,7 +34,7 @@ module OoxmlParser
34
34
  .paragraph_properties_default
35
35
  .raw_node, 0)
36
36
  end
37
- if @styles&.document_defaults&.run_properties_default
37
+ if @styles&.document_defaults&.run_properties_default&.run_properties
38
38
  DocumentStructure.default_run_style = DocxParagraphRun.new(parent: self)
39
39
  .parse_properties(@styles
40
40
  .document_defaults
@@ -243,7 +243,10 @@ module OoxmlParser
243
243
  def ind
244
244
  return @ind if @ind != Indents.new
245
245
 
246
- root_object.styles&.default_style(:paragraph)&.paragraph_properties&.indent
246
+ indents_from_styles = root_object.styles&.default_style(:paragraph)&.paragraph_properties&.indent
247
+ return indents_from_styles if indents_from_styles
248
+
249
+ Indents.new
247
250
  end
248
251
 
249
252
  # Fill data from styles
@@ -4,6 +4,6 @@ module OoxmlParser
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
6
  # [String] Version of Gem
7
- STRING = '0.34.1'
7
+ STRING = '0.35.0'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ooxml_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.1
4
+ version: 0.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-11-10 00:00:00.000000000 Z
13
+ date: 2023-04-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -74,14 +74,14 @@ dependencies:
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '3'
77
+ version: '4'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '3'
84
+ version: '4'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rake
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -618,14 +618,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
618
618
  requirements:
619
619
  - - ">="
620
620
  - !ruby/object:Gem::Version
621
- version: '2.6'
621
+ version: '2.7'
622
622
  required_rubygems_version: !ruby/object:Gem::Requirement
623
623
  requirements:
624
624
  - - ">="
625
625
  - !ruby/object:Gem::Version
626
626
  version: '0'
627
627
  requirements: []
628
- rubygems_version: 3.3.25
628
+ rubygems_version: 3.4.12
629
629
  signing_key:
630
630
  specification_version: 4
631
631
  summary: OoxmlParser Gem