ooxml_parser 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/ooxml_parser.rb +2 -0
  4. data/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart.rb +3 -2
  5. data/lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb +2 -1
  6. data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/group/old_docx_group.rb +1 -1
  7. data/lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape.rb +1 -1
  8. data/lib/ooxml_parser/common_parser/common_data/borders_properties.rb +11 -8
  9. data/lib/ooxml_parser/common_parser/common_data/colors/hsl_color.rb +12 -15
  10. data/lib/ooxml_parser/common_parser/common_data/colors/image/stretching.rb +1 -0
  11. data/lib/ooxml_parser/common_parser/common_data/colors/image/{fill_rectangle.rb → stretching/fill_rectangle.rb} +0 -0
  12. data/lib/ooxml_parser/common_parser/common_data/colors/image_fill.rb +1 -0
  13. data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color.rb +1 -2
  14. data/lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/gradient_color/linear_gradient.rb +10 -0
  15. data/lib/ooxml_parser/common_parser/common_data/hyperlink.rb +6 -1
  16. data/lib/ooxml_parser/common_parser/common_data/ooxml_document_object.rb +29 -1
  17. data/lib/ooxml_parser/common_parser/common_data/paragraph.rb +1 -0
  18. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_properties.rb +1 -1
  19. data/lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties.rb +1 -1
  20. data/lib/ooxml_parser/{pptx_parser/pptx_data/presentation/slide/shape/text_body → common_parser/common_data/paragraph}/text_field.rb +0 -0
  21. data/lib/ooxml_parser/common_parser/common_data/relationships.rb +31 -0
  22. data/lib/ooxml_parser/common_parser/common_data/relationships/relationship.rb +22 -0
  23. data/lib/ooxml_parser/common_parser/common_data/table.rb +1 -1
  24. data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style.rb +1 -0
  25. data/lib/ooxml_parser/common_parser/common_data/table/properties/table_style_elements.rb +1 -1
  26. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/cell_properties.rb +39 -96
  27. data/lib/ooxml_parser/common_parser/common_data/table/row/cell/merge.rb +7 -3
  28. data/lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb +1 -1
  29. data/lib/ooxml_parser/common_parser/common_data/table/table_grid.rb +1 -1
  30. data/lib/ooxml_parser/common_parser/common_data/table/table_properties.rb +5 -2
  31. data/lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb +33 -0
  32. data/lib/ooxml_parser/common_parser/parser.rb +17 -0
  33. data/lib/ooxml_parser/docx_parser/docx_data/document_structure.rb +15 -26
  34. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_background.rb +26 -0
  35. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/document_properties.rb +6 -1
  36. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb +5 -5
  37. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape.rb +9 -10
  38. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/frame_properties.rb +1 -1
  39. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/document_grid.rb +1 -1
  40. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/page_properties.rb +6 -13
  41. data/lib/ooxml_parser/docx_parser/docx_parser.rb +3 -7
  42. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation.rb +1 -2
  43. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_comment/presentation_comment_author.rb +2 -1
  44. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_theme.rb +1 -1
  45. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide.rb +13 -19
  46. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb +2 -2
  47. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/behavior/behavior.rb +1 -0
  48. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/set_time_node/set_time_node.rb +2 -0
  49. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node.rb +2 -0
  50. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing/condition.rb +2 -2
  51. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition.rb +3 -14
  52. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/{sound_action → transition}/sound_action.rb +2 -0
  53. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/{sound_action/sound → transition/sound_action}/sound.rb +1 -2
  54. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb +20 -0
  55. data/lib/ooxml_parser/pptx_parser/pptx_parser.rb +3 -7
  56. data/lib/ooxml_parser/version.rb +1 -1
  57. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook.rb +4 -3
  58. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet.rb +12 -1
  59. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row.rb +1 -1
  60. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell/cell_style/foreground_color.rb +2 -2
  61. data/lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell/cell_style/ooxml_font.rb +2 -4
  62. data/lib/ooxml_parser/xlsx_parser/xlsx_parser.rb +3 -7
  63. metadata +10 -16
  64. data/.overcommit.yml +0 -35
  65. data/Changelog.md +0 -25
  66. data/circle.yml +0 -3
  67. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/offset.rb +0 -10
  68. data/lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shadow.rb +0 -10
  69. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/shape_properties/extents.rb +0 -10
  70. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/shape_properties/offset.rb +0 -10
  71. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/text_body/paragraph.rb +0 -10
  72. data/lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shapes_grouping/shapes_grouping.rb +0 -9
  73. data/ooxml_parser.gemspec +0 -30
@@ -8,8 +8,8 @@ module OoxmlParser
8
8
 
9
9
  def self.parse(animation_effect_node)
10
10
  animation_effect = AnimationEffect.new
11
- animation_effect.transition = animation_effect_node.attribute('transition').value
12
- animation_effect.filter = animation_effect_node.attribute('filter').value
11
+ animation_effect.transition = animation_effect_node.attribute('transition').value if animation_effect_node.attribute('transition')
12
+ animation_effect.filter = animation_effect_node.attribute('filter').value if animation_effect_node.attribute('filter')
13
13
  animation_effect_node.xpath('*').each do |animation_effect_node_child|
14
14
  case animation_effect_node_child.name
15
15
  when 'cBhvr'
@@ -1,3 +1,4 @@
1
+ require_relative 'target_element'
1
2
  module OoxmlParser
2
3
  class Behavior
3
4
  attr_accessor :common_time_node, :attribute_name_list, :target
@@ -1,3 +1,5 @@
1
+ require_relative 'behavior/behavior'
2
+
1
3
  module OoxmlParser
2
4
  class SetTimeNode
3
5
  attr_accessor :behavior, :to
@@ -1,4 +1,6 @@
1
1
  require_relative 'time_node/common_timing'
2
+ require_relative 'animation_effect/animation_effect'
3
+ require_relative 'set_time_node/set_time_node'
2
4
  module OoxmlParser
3
5
  class TimeNode
4
6
  attr_accessor :type, :common_time_node, :previous_conditions_list, :next_conditions_list
@@ -10,8 +10,8 @@ module OoxmlParser
10
10
 
11
11
  def self.parse(condition_node)
12
12
  condition = Condition.new
13
- condition.event = condition_node.attribute('evt').value
14
- condition.delay = condition_node.attribute('delay').value
13
+ condition.event = condition_node.attribute('evt').value if condition_node.attribute('evt')
14
+ condition.delay = condition_node.attribute('delay').value if condition_node.attribute('delay')
15
15
  condition
16
16
  end
17
17
 
@@ -1,3 +1,4 @@
1
+ require_relative 'transition/sound_action'
1
2
  require_relative 'transition_properties/transition_properties'
2
3
  module OoxmlParser
3
4
  class Transition < OOXMLDocumentObject
@@ -10,20 +11,8 @@ module OoxmlParser
10
11
  def self.parse(transition_node)
11
12
  transition = Transition.new
12
13
  transition_node.xpath('*').each do |transition_node_child|
13
- transition.properties.type = transition_node_child.name.to_sym
14
- case transition_node_child.name
15
- when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
16
- transition.properties.direction = Alignment.parse(transition_node_child.attribute('dir'))
17
- when 'cut', 'fade'
18
- transition.properties.through_black = OOXMLDocumentObject.option_enabled?(transition_node_child, 'thruBlk')
19
- when 'split'
20
- transition.properties.direction = Alignment.parse(transition_node_child.attribute('dir'))
21
- transition.properties.orientation = transition_node_child.attribute('orient').value.to_sym if transition_node_child.attribute('orient').value
22
- when 'wheel', 'wheelReverse'
23
- transition.properties.spokes = OOXMLDocumentObject.option_enabled?(transition_node_child, 'spokes')
24
- when 'sndAc'
25
- transition.sound_action = SoundAction.parse(transition_node_child)
26
- end
14
+ transition.properties = TransitionProperties.parse(transition_node_child)
15
+ transition.sound_action = SoundAction.parse(transition_node_child)
27
16
  end
28
17
  transition_node.attributes.each do |key, value|
29
18
  case key
@@ -1,8 +1,10 @@
1
+ require_relative 'sound_action/sound'
1
2
  module OoxmlParser
2
3
  class SoundAction
3
4
  attr_accessor :start_sound, :end_sound
4
5
 
5
6
  def self.parse(sound_action_node)
7
+ return nil unless sound_action_node.name == 'sndAc'
6
8
  sound_action = SoundAction.new
7
9
  sound_action_node.xpath('*').each do |sound_action_node_child|
8
10
  case sound_action_node_child.name
@@ -9,8 +9,7 @@ module OoxmlParser
9
9
 
10
10
  def self.parse(sound_node)
11
11
  sound = Sound.new
12
- path_to_original_file = dir + OOXMLDocumentObject.get_link_from_rels(sound_node.attribute('embed').value)
13
- sound.path = FileHelper.copy_file(path_to_original_file, "#{DEFAULT_DIRECTORY_FOR_MEDIA}/media_from_#{File.basename(OOXMLDocumentObject.path_to_folder)}/")
12
+ sound.path = OOXMLDocumentObject.copy_media_file("#{OOXMLDocumentObject.root_subfolder}/#{get_link_from_rels(sound_node.attribute('embed').value).gsub('..', '')}")
14
13
  sound.name = sound_node.attribute('name').value
15
14
  sound
16
15
  end
@@ -5,5 +5,25 @@ module OoxmlParser
5
5
  def initialize(type = nil)
6
6
  @type = type
7
7
  end
8
+
9
+ # Parse TransitionProperties object
10
+ # @param node [Nokogiri::XML:Element] node to parse
11
+ # @return [TransitionProperties] result of parsing
12
+ def self.parse(node)
13
+ transition_properties = TransitionProperties.new
14
+ transition_properties.type = node.name.to_sym
15
+ case node.name
16
+ when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
17
+ transition_properties.direction = Alignment.parse(node.attribute('dir')) if node.attribute('dir')
18
+ when 'cut', 'fade'
19
+ transition_properties.through_black = OOXMLDocumentObject.option_enabled?(node, 'thruBlk')
20
+ when 'split'
21
+ transition_properties.direction = Alignment.parse(node.attribute('dir')) if node.attribute('dir')
22
+ transition_properties.orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
23
+ when 'wheel', 'wheelReverse'
24
+ transition_properties.spokes = OOXMLDocumentObject.option_enabled?(node, 'spokes')
25
+ end
26
+ transition_properties
27
+ end
8
28
  end
9
29
  end
@@ -3,13 +3,9 @@ require_relative 'pptx_data/presentation.rb'
3
3
  module OoxmlParser
4
4
  class PptxParser
5
5
  def self.parse_pptx(path_to_file)
6
- path_to_zip_file = OOXMLDocumentObject.copy_file_and_rename_to_zip(path_to_file)
7
- OOXMLDocumentObject.unzip_file(path_to_zip_file, path_to_zip_file.sub(File.basename(path_to_zip_file), ''))
8
- OOXMLDocumentObject.path_to_folder = path_to_zip_file.sub(File.basename(path_to_zip_file), '')
9
- pptx_model = Presentation.parse(OOXMLDocumentObject.path_to_folder)
10
- pptx_model.file_path = path_to_file
11
- FileUtils.remove_dir(OOXMLDocumentObject.path_to_folder)
12
- pptx_model
6
+ Parser.parse(path_to_file) do
7
+ Presentation.parse
8
+ end
13
9
  end
14
10
  end
15
11
  end
@@ -1,6 +1,6 @@
1
1
  module OoxmlParser
2
2
  # This module holds the RuboCop version information.
3
3
  module Version
4
- STRING = '0.1.1'.freeze
4
+ STRING = '0.1.2'.freeze
5
5
  end
6
6
  end
@@ -3,6 +3,8 @@ require_relative 'workbook/worksheet'
3
3
  module OoxmlParser
4
4
  class XLSXWorkbook < CommonDocumentStructure
5
5
  attr_accessor :worksheets
6
+ # @return [PresentationTheme] theme of Workbook
7
+ attr_accessor :theme
6
8
 
7
9
  def initialize(worksheets = [])
8
10
  @worksheets = worksheets
@@ -62,16 +64,15 @@ module OoxmlParser
62
64
  formulas
63
65
  end
64
66
 
65
- def self.parse(path_to_folder)
67
+ def self.parse
66
68
  workbook = XLSXWorkbook.new
67
- OOXMLDocumentObject.path_to_folder = path_to_folder
68
69
  OOXMLDocumentObject.xmls_stack = []
69
70
  OOXMLDocumentObject.root_subfolder = 'xl/'
70
71
  self.shared_strings = nil
71
72
  OOXMLDocumentObject.add_to_xmls_stack('xl/workbook.xml')
72
73
  doc = Nokogiri::XML.parse(File.open(OOXMLDocumentObject.current_xml))
73
74
  XLSXWorkbook.styles_node = Nokogiri::XML(File.open("#{OOXMLDocumentObject.path_to_folder}/#{OOXMLDocumentObject.root_subfolder}/styles.xml"))
74
- PresentationTheme.parse("xl/#{link_to_theme_xml}") if link_to_theme_xml
75
+ workbook.theme = PresentationTheme.parse("xl/#{link_to_theme_xml}") if link_to_theme_xml
75
76
  doc.xpath('xmlns:workbook/xmlns:sheets/xmlns:sheet').each do |sheet|
76
77
  workbook.worksheets << Worksheet.parse('xl/' + OOXMLDocumentObject.get_link_from_rels(sheet.attribute('id').value))
77
78
  workbook.worksheets.last.name = sheet.attribute('name').value
@@ -10,6 +10,10 @@ module OoxmlParser
10
10
  class Worksheet < OOXMLDocumentObject
11
11
  attr_accessor :name, :rows, :merge, :charts, :hyperlinks, :drawings, :comments, :columns, :sheet_format_properties,
12
12
  :autofilter, :table_parts, :sheet_views
13
+ # @return [String] xml name of sheet
14
+ attr_accessor :xml_name
15
+ # @return [Relationships] array of relationships
16
+ attr_accessor :relationships
13
17
 
14
18
  def initialize
15
19
  @columns = []
@@ -23,9 +27,16 @@ module OoxmlParser
23
27
  @table_parts = []
24
28
  end
25
29
 
30
+ def parse_relationships
31
+ OOXMLDocumentObject.add_to_xmls_stack("#{OOXMLDocumentObject.root_subfolder}/worksheets/_rels/#{@xml_name}.rels")
32
+ @relationships = Relationships.parse(Nokogiri::XML(File.open(OOXMLDocumentObject.current_xml)).xpath('*').first) if File.exist?(OOXMLDocumentObject.current_xml)
33
+ OOXMLDocumentObject.xmls_stack.pop
34
+ end
35
+
26
36
  def self.parse(path_to_xml_file)
27
37
  worksheet = Worksheet.new
28
- @current_sheet_xml_name = File.basename path_to_xml_file
38
+ worksheet.xml_name = File.basename path_to_xml_file
39
+ worksheet.parse_relationships
29
40
  OOXMLDocumentObject.add_to_xmls_stack("#{OOXMLDocumentObject.root_subfolder}/worksheets/#{File.basename(path_to_xml_file)}")
30
41
  doc = Nokogiri::XML(File.open(OOXMLDocumentObject.current_xml))
31
42
  sheet = doc.search('//xmlns:worksheet').first
@@ -10,7 +10,7 @@ module OoxmlParser
10
10
 
11
11
  def self.parse(row_node)
12
12
  row = XlsxRow.new
13
- row.height = row_node.attribute('ht').value if OOXMLDocumentObject.option_enabled?(row_node, 'customHeight')
13
+ row.height = row_node.attribute('ht').value if OOXMLDocumentObject.option_enabled?(row_node, 'customHeight') && row_node.attribute('ht')
14
14
  row.hidden = OOXMLDocumentObject.option_enabled?(row_node, 'hidden')
15
15
  row_node.xpath('xmlns:c').each { |cell_node| row.cells[Coordinates.parse_coordinates_from_string(cell_node.attribute('r').value.to_s).get_column_number.to_i - 1] = XlsxCell.parse(cell_node) }
16
16
  row
@@ -16,8 +16,8 @@ module OoxmlParser
16
16
  fill_color = ForegroundColor.new
17
17
  fill_style_node = XLSXWorkbook.styles_node.xpath('//xmlns:fill')[style_number.to_i].xpath('xmlns:patternFill')
18
18
  if fill_style_node && !fill_style_node.empty?
19
- fill_color.type = fill_style_node.attribute('patternType').value.to_sym
20
- fill_color.color = Color.parse_color_tag(fill_style_node.xpath('xmlns:fgColor').first)
19
+ fill_color.type = fill_style_node.attribute('patternType').value.to_sym if fill_style_node.attribute('patternType')
20
+ fill_color.color = Color.parse_color_tag(fill_style_node.xpath('xmlns:fgColor').first) if fill_style_node.xpath('xmlns:fgColor')
21
21
  end
22
22
  fill_color
23
23
  end
@@ -13,7 +13,7 @@ module OoxmlParser
13
13
  def self.parse(style_number)
14
14
  font = OOXMLFont.new
15
15
  font_style_node = XLSXWorkbook.styles_node.xpath('//xmlns:font')[style_number.to_i]
16
- font.name = font_style_node.xpath('xmlns:name').first.attribute('val').value
16
+ font.name = font_style_node.xpath('xmlns:name').first.attribute('val').value if font_style_node.xpath('xmlns:name').first
17
17
  font.size = font_style_node.xpath('xmlns:sz').first.attribute('val').value.to_i if font_style_node.xpath('xmlns:sz').first
18
18
  font.font_style = FontStyle.new
19
19
  font_style_node.xpath('*').each do |font_style_node_child|
@@ -25,9 +25,7 @@ module OoxmlParser
25
25
  when 'strike'
26
26
  font.font_style.strike = :single
27
27
  when 'u'
28
- unless font_style_node_child.attribute('val').value == 'none' && font_style_node_child
29
- font.font_style.underlined = Underline.new((font_style_node_child.attribute('val').value || :single).to_sym)
30
- end
28
+ font.font_style.underlined = Underline.new(:single)
31
29
  when 'color'
32
30
  font.color = Color.parse_color_tag(font_style_node_child)
33
31
  end
@@ -3,13 +3,9 @@ require_relative 'xlsx_data/view_model/workbook'
3
3
  module OoxmlParser
4
4
  class XlsxParser
5
5
  def self.parse_xlsx(path_to_file)
6
- path_to_zip_file = OOXMLDocumentObject.copy_file_and_rename_to_zip(path_to_file)
7
- OOXMLDocumentObject.unzip_file(path_to_zip_file, path_to_zip_file.sub(File.basename(path_to_zip_file), ''))
8
- OOXMLDocumentObject.path_to_folder = path_to_zip_file.sub(File.basename(path_to_zip_file), '')
9
- xlsx_model = XLSXWorkbook.parse(OOXMLDocumentObject.path_to_folder)
10
- xlsx_model.file_path = path_to_file
11
- FileUtils.remove_dir(OOXMLDocumentObject.path_to_folder)
12
- xlsx_model
6
+ Parser.parse(path_to_file) do
7
+ XLSXWorkbook.parse
8
+ end
13
9
  end
14
10
  end
15
11
  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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Lobashov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-17 00:00:00.000000000 Z
12
+ date: 2016-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -61,11 +61,8 @@ executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
- - ".overcommit.yml"
65
- - Changelog.md
66
64
  - LICENSE.txt
67
65
  - README.md
68
- - circle.yml
69
66
  - lib/ooxml_parser.rb
70
67
  - lib/ooxml_parser/common_parser/common_data/alingment.rb
71
68
  - lib/ooxml_parser/common_parser/common_data/alternate_content/alternate_content.rb
@@ -130,8 +127,8 @@ files:
130
127
  - lib/ooxml_parser/common_parser/common_data/colors/color_alpha_channel.rb
131
128
  - lib/ooxml_parser/common_parser/common_data/colors/color_properties.rb
132
129
  - lib/ooxml_parser/common_parser/common_data/colors/hsl_color.rb
133
- - lib/ooxml_parser/common_parser/common_data/colors/image/fill_rectangle.rb
134
130
  - lib/ooxml_parser/common_parser/common_data/colors/image/stretching.rb
131
+ - lib/ooxml_parser/common_parser/common_data/colors/image/stretching/fill_rectangle.rb
135
132
  - lib/ooxml_parser/common_parser/common_data/colors/image_fill.rb
136
133
  - lib/ooxml_parser/common_parser/common_data/colors/image_properties.rb
137
134
  - lib/ooxml_parser/common_parser/common_data/colors/presentation_fill.rb
@@ -156,6 +153,9 @@ files:
156
153
  - lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering/numbering_properties.rb
157
154
  - lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering/numbering_properties/numbering_level.rb
158
155
  - lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing.rb
156
+ - lib/ooxml_parser/common_parser/common_data/paragraph/text_field.rb
157
+ - lib/ooxml_parser/common_parser/common_data/relationships.rb
158
+ - lib/ooxml_parser/common_parser/common_data/relationships/relationship.rb
159
159
  - lib/ooxml_parser/common_parser/common_data/table.rb
160
160
  - lib/ooxml_parser/common_parser/common_data/table/margins/paragraph_margins.rb
161
161
  - lib/ooxml_parser/common_parser/common_data/table/margins/table_margins.rb
@@ -177,8 +177,10 @@ files:
177
177
  - lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb
178
178
  - lib/ooxml_parser/common_parser/common_data/table/table_grid.rb
179
179
  - lib/ooxml_parser/common_parser/common_data/table/table_properties.rb
180
+ - lib/ooxml_parser/common_parser/common_data/table/table_properties/table_borders.rb
180
181
  - lib/ooxml_parser/common_parser/common_data/underline.rb
181
182
  - lib/ooxml_parser/common_parser/common_document_structure.rb
183
+ - lib/ooxml_parser/common_parser/parser.rb
182
184
  - lib/ooxml_parser/configuration.rb
183
185
  - lib/ooxml_parser/docx_parser/docx_data/document_structure.rb
184
186
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/comment.rb
@@ -202,8 +204,6 @@ files:
202
204
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/radical.rb
203
205
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run.rb
204
206
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape.rb
205
- - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/offset.rb
206
- - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shadow.rb
207
207
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties.rb
208
208
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_margins.rb
209
209
  - lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_paragraph_run/shape/shape_properties/shape_size.rb
@@ -237,11 +237,6 @@ files:
237
237
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/graphic_frame/graphic_frame.rb
238
238
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
239
239
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/non_visual_shape_properties/hyperlinks/hyperlink_for_hover.rb
240
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/shape_properties/extents.rb
241
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/shape_properties/offset.rb
242
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/text_body/paragraph.rb
243
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shape/text_body/text_field.rb
244
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/shapes_grouping/shapes_grouping.rb
245
240
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/shapes_grouping.rb
246
241
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/shapes_grouping/grouping_properties.rb
247
242
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing.rb
@@ -252,9 +247,9 @@ files:
252
247
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node.rb
253
248
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing.rb
254
249
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/time_node/common_timing/condition.rb
255
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/sound_action/sound/sound.rb
256
- - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/sound_action/sound_action.rb
257
250
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition.rb
251
+ - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb
252
+ - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb
258
253
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb
259
254
  - lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide_size.rb
260
255
  - lib/ooxml_parser/pptx_parser/pptx_parser.rb
@@ -281,7 +276,6 @@ files:
281
276
  - lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_row/xlsx_cell/cell_style/ooxml_font.rb
282
277
  - lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_table.rb
283
278
  - lib/ooxml_parser/xlsx_parser/xlsx_parser.rb
284
- - ooxml_parser.gemspec
285
279
  homepage: http://rubygems.org/gems/ooxml_parser
286
280
  licenses:
287
281
  - AGPL-3.0
data/.overcommit.yml DELETED
@@ -1,35 +0,0 @@
1
- # Use this file to configure the Overcommit hooks you wish to use. This will
2
- # extend the default configuration defined in:
3
- # https://github.com/brigade/overcommit/blob/master/config/default.yml
4
- #
5
- # At the topmost level of this YAML file is a key representing type of hook
6
- # being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
7
- # customize each hook, such as whether to only run it on certain files (via
8
- # `include`), whether to only display output if it fails (via `quiet`), etc.
9
- #
10
- # For a complete list of hooks, see:
11
- # https://github.com/brigade/overcommit/tree/master/lib/overcommit/hook
12
- #
13
- # For a complete list of options that you can use to customize hooks, see:
14
- # https://github.com/brigade/overcommit#configuration
15
- #
16
- # Uncomment the following lines to make the configuration take effect.
17
-
18
- #PreCommit:
19
- # RuboCop:
20
- # enabled: true
21
- # on_warn: fail # Treat all warnings as failures
22
- #
23
- # TrailingWhitespace:
24
- # exclude:
25
- # - '**/db/structure.sql' # Ignore trailing whitespace in generated files
26
- #
27
- #PostCheckout:
28
- # ALL: # Special hook name that customizes all hooks of this type
29
- # quiet: true # Change all post-checkout hooks to only display output on failure
30
- #
31
- # IndexTags:
32
- # enabled: true # Generate a tags file with `ctags` each time HEAD changes
33
- PreCommit:
34
- RuboCop:
35
- enabled: true
data/Changelog.md DELETED
@@ -1,25 +0,0 @@
1
- # Change log
2
-
3
- ## master (unreleased)
4
-
5
- ## 0.1.1 (2016-05-17)
6
-
7
- ### New features
8
- * Add ability to configure units of measurements
9
- * Add support of `line_3d`, `bar3DChart`, `pie3DChart` charts
10
- * Add parsing text direction in table cell
11
- * Refactor parsing page size of document
12
- * Refactor parsing page margins of docx
13
- * Refactor parsing columns data of docx
14
- * Some minor RuboCop refactor
15
- * Add parsing `fldSimple` inside hyperlinks
16
- * Add support of `wp14:pctPosHOffset` and `wp14:pctPosVOffset`
17
- * Add support of parsing `w:noBreakHyphen`, `w:tab` in PargraphRun
18
- * Add support of Table Row Properties - Height
19
- * Add variable to store original file path in all parsers
20
-
21
- ### Fixes
22
- * Fix parsing shape in paragraph run
23
-
24
- ## 0.1.0
25
- * Initial release of `ooxml_parser` gem
data/circle.yml DELETED
@@ -1,3 +0,0 @@
1
- machine:
2
- ruby:
3
- version: 2.3.0
@@ -1,10 +0,0 @@
1
- module OoxmlParser
2
- class Offset
3
- attr_accessor :x, :y
4
-
5
- def initialize(x = '', y = '')
6
- @x = x
7
- @y = y
8
- end
9
- end
10
- end