Sha256: fd014c9ab0942edf76557ad67aeaa52030defe8c067b54b8f35d6d2e441a0db7
Contents?: true
Size: 1.83 KB
Versions: 3
Compression:
Stored size: 1.83 KB
Contents
module Axlsx class VmlShape attr_reader :row attr_reader :column attr_reader :left_column attr_reader :left_offset attr_reader :top_row attr_reader :top_offset attr_reader :right_column attr_reader :right_offset attr_reader :bottom_row attr_reader :bottom_offset def initialize(comment, options={}) @row = @column = 0 @left_column = 0 @left_offset = 15 @top_row = 0 @top_offset = 2 @right_column = 0 @right_offset = 50 @bottom_row = 0 @bottom_offset = 5 options.each do |o| self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" end end def xml_to_string(str ='') str << <<SHAME_ON_YOU <v:shape id="_x0000_s#{@comments.worksheet.index+1}07#{index+1}" type="#_x0000_t202" style='position:absolute;margin-left:104pt;margin-top:2pt;width:800px;height:27pt;z-index:1;mso-wrap-style:tight' fillcolor="#ffffa1 [80]" o:insetmode="auto"> <v:fill color2="#ffffa1 [80]"/> <v:shadow on="t" obscured="t"/> <v:path o:connecttype="none"/> <v:textbox style='mso-fit-text-with-word-wrap:t'> <div style='text-align:left'></div> </v:textbox> <x:ClientData ObjectType="Note"> <x:MoveWithCells/> <x:SizeWithCells/> # LeftColumn, LeftOffset, TopRow, TopOffset, RightColumn, RightOffset, BottomRow, BottomOffset. <x:Anchor>#{comment.comments.worksheet[comment.ref].index + 1}, 15, #{comment.comments.worksheet[comment.ref].row.index}, 2, #{comment.comments.worksheet[comment.ref].index + 5}, 50, #{comment.comments.worksheet[comment.ref].row.index + 5}, 5</x:Anchor> <x:AutoFill>False</x:AutoFill> <x:Row>#{comment.comments.worksheet[comment.ref].row.index}</x:Row> <x:Column>#{comment.comments.worksheet[comment.ref].index}</x:Column> <x:Visible/> </x:ClientData> </v:shape> SHAME_ON_YOU end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
axlsx-1.1.7 | lib/axlsx/drawing/vml_shape.rb~ |
axlsx-1.1.6 | lib/axlsx/drawing/vml_shape.rb~ |
axlsx-1.1.5 | lib/axlsx/drawing/vml_shape.rb~ |