# frozen_string_literal: true
module Axlsx
# A collection of break objects that define row breaks (page breaks) for printing and preview
class RowBreaks < SimpleTypedList
def initialize
super(Break)
end
# Adds a row break
# @param [Hash] options The options for the break to be created.
# max and man values are fixed.
# @see Break
def add_break(options)
# force feed the Excel default
self << Break.new(options.merge(max: 16383, man: true))
last
end
#
#
#
#
#
def to_xml_string(str = +'')
return if empty?
str << ''
each { |brk| brk.to_xml_string(str) }
str << ''
end
end
end