Applies the formatting options of self with its parents until no parent can be found
 @return [Workbook::Format] new Workbook::Format that is the result of merging current style with all its parent's styles.
765437
def flattened
      ff=Workbook::Format.new()
      formats.each{|a| ff.merge!(a) }
      return ff
    end
889748
def make_formatters(self):
        
        return [self.make_formatter(inner_w, spec['padding'], spec['align'],
                                    spec['overflow'])
                for spec, inner_w in zip(self.colspec, self.widths)]
801386
def pbt_top_parent
      record = self
      return nil unless record.pbt_parent
      no_repeat = PolyBelongsTo::SingletonSet.new
      while !no_repeat.include?(record.pbt_parent) && !record.pbt_parent.nil?
        no_repeat.add?(record)
        record = record.pbt_parent
      end
      record
    end
553613
def reformatted!
      self.class.format_fields.each do |field_name, format_method, options|
        formatted_value = send(format_method, get_field(field_name), options)
        set_field(field_name, formatted_value)
      end
      self
    end
646661
def rearrange
      if self.parent_id
        self.parent_ids = parent.parent_ids + [self.parent_id]
      else
        self.parent_ids = []
      end

      self.depth = parent_ids.size

      rearrange_children! if self.parent_ids_changed?
    end
1259849
def concat(row)
      row = Workbook::Row.new(row) unless row.class == Workbook::Row
      super(row)
    end
1164756
def from_fill_parent(cls, eg_fillProperties_parent):
        
        fill_elm = eg_fillProperties_parent.eg_fillProperties
        fill = _Fill(fill_elm)
        fill_format = cls(eg_fillProperties_parent, fill)
        return fill_format
644175
def reapply_styles
      selected.each do |selected_view|
        selected_view.rmq_data.styles.each do |style_name|
          apply_style_to_view selected_view, style_name
        end
      end
      self
    end
1224214
def button(text, options = {}, &block)
      Button.new(text, {parent: self}.merge!(options), &block)
    end
219761
def method_missing(mthd, *args, &block)
      new_recs = args.reduce([]) {|a, i| a.push(formatted_name(i)) if i.class.ancestors.include?(ActiveRecord::Base); a}
      result = @set.send(mthd,
        *(args.map do |arg|
            arg.class.ancestors.include?(ActiveRecord::Base) ? formatted_name(arg) : arg
          end
        ),
        &block
      )
      @set.to_a.select {|i| new_recs.include? i }.each {|f| @flagged << f}
      result
    end
1063446
def collapse_parent node=:current_index
      node = row_to_node if node == :current_index
      parent = node.parent
      return if parent.nil?
      goto_parent node
      collapse_node parent
    end
963846
def set_style(self):
        
        if self.current_format is None:
            assert self.base_format is not None
            self.current_format = QTextCharFormat(self.base_format)
        # Foreground color
        if self.foreground_color is None:
            qcolor = self.base_format.foreground()
        else:
            cstr = self.ANSI_COLORS[self.foreground_color-30][self.intensity]
            qcolor = QColor(cstr)
        self.current_format.setForeground(qcolor)
        # Background color
        if self.background_color is None:
            qcolor = self.base_format.background()
        else:
            cstr = self.ANSI_COLORS[self.background_color-40][self.intensity]
            qcolor = QColor(cstr)
        self.current_format.setBackground(qcolor)

        font = self.current_format.font()
        # Italic
        if self.italic is None:
            italic = self.base_format.fontItalic()
        else:
            italic = self.italic
        font.setItalic(italic)
        # Bold
        if self.bold is None:
            bold = self.base_format.font().bold()
        else:
            bold = self.bold
        font.setBold(bold)
        # Underline
        if self.underline is None:
            underline = self.base_format.font().underline()
        else:
            underline = self.underline
        font.setUnderline(underline)
        self.current_format.setFont(font)
1166986
def merge_in(old)
      merge(@class_methods, old.class_methods)
      merge(@instance_methods, old.instance_methods)
      merge(@attributes, old.attributes)
      merge(@constants, old.constants)
      merge(@includes, old.includes)
      if @comment.nil? || @comment.empty?
        @comment = old.comment
      else
        unless old.comment.nil? or old.comment.empty? then
          @comment << SM::Flow::RULE.new
          @comment.concat old.comment
        end
      end
    end
297888
def create_child(h={})
      c = self.class.new h.merge(:parent => self)
      c.colors = @colors if colored?
      children << c
      c
    end
46000
def format_options_to_cell(ask, options = @column_options)
      options.each do |key, value|
        if only_cell_option?(key)
          if ask.is_a? Hash
            ask.merge!(key => value)
          else            
            ask = [ask] unless ask.is_a? Array
            (ask.last.is_a? Hash and ask.last.has_key? :html) ? ask.last[:html].merge!(key => value) : ask << { :html =>  { key => value }} 
          end
        end
      end
      ask
    end
428765
def copy
            saved_doc = @document
            saved_parent = @parent

            @document = @parent = nil # do not process parent object and document in the copy

            # Perform the recursive copy (quite dirty).
            copyobj = Marshal.load(Marshal.dump(self))

            # restore saved values
            @document = saved_doc
            @parent = saved_parent

            copyobj.set_document(saved_doc) if copyobj.indirect?
            copyobj.parent = parent

            copyobj
        end
909824
def add_parent(self, parent):
        
        parent.add_child(self)
        self.parent = parent
        return parent