module OoxmlParser::TableStylePropertiesHelper

Helper method for working with TableStyleProperties

Constants

TABLE_STYLES_NAMES_HASH
Hash

short names for table styles

Public Instance Methods

fill_empty_table_styles() click to toggle source

Fill all empty tables styles with default value To make last changes in parsing table styles compatible with `ooxml_parser` 0.1.2 and earlier @return [Nothing]

# File lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties/table_style_properties_helper.rb, line 33
def fill_empty_table_styles
  TABLE_STYLES_NAMES_HASH.each_value do |current_table_style|
    style_exist = false
    @table_style_properties_list.each do |existing_style|
      style_exist = true if existing_style.type == current_table_style
    end
    next if style_exist

    @table_style_properties_list << TableStyleProperties.new(type: current_table_style)
  end
end