Module: Writexlsx::Worksheet::CommentsSupport

Included in:
Writexlsx::Worksheet
Defined in:
lib/write_xlsx/worksheet/comments_support.rb

Instance Method Summary collapse

Instance Method Details

#buttons_dataObject

:nodoc:



52
53
54
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 52

def buttons_data  # :nodoc:
  @buttons_array
end

#comments_author=(author) ⇒ Object

This method is used to set the default author of all cell comments.



22
23
24
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 22

def comments_author=(author)
  @comments_author = author || ''
end

#comments_visible?Boolean

:nodoc:

Returns:

  • (Boolean)


15
16
17
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 15

def comments_visible? # :nodoc:
  !!@comments_visible
end

#has_comments?Boolean

:nodoc:

Returns:

  • (Boolean)


40
41
42
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 40

def has_comments? # :nodoc:
  !@comments.empty?
end

#has_header_vml?Boolean

:nodoc:

Returns:

  • (Boolean)


48
49
50
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 48

def has_header_vml?  # :nodoc:
  !(header_images.empty? && footer_images.empty?)
end

#has_vml?Boolean

:nodoc:

Returns:

  • (Boolean)


44
45
46
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 44

def has_vml?  # :nodoc:
  @has_vml
end

#header_images_dataObject

:nodoc:



56
57
58
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 56

def header_images_data  # :nodoc:
  @header_images_array
end

#num_comments_blockObject



36
37
38
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 36

def num_comments_block
  @comments.size / 1024
end

#set_comments_author(author) ⇒ Object

This method is deprecated. use comments_author=().



27
28
29
30
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 27

def set_comments_author(author)
  put_deprecate_message("#{self}.set_comments_author")
  self.comments_author = author
end

#show_comments(visible = true) ⇒ Object

This method is used to make all cell comments visible when a worksheet is opened.



11
12
13
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 11

def show_comments(visible = true)
  @comments_visible = visible
end

#sorted_commentsObject

:nodoc:



32
33
34
# File 'lib/write_xlsx/worksheet/comments_support.rb', line 32

def sorted_comments # :nodoc:
  @comments.sorted_comments
end