Method: Worksheet#window_2_record

Defined in:
lib/surpass/worksheet.rb

#window_2_recordObject



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/surpass/worksheet.rb', line 474

def window_2_record
  options = 0
  options |= (as_numeric(@show_formulas       ) & 0x01) << 0
  options |= (as_numeric(@show_grid           ) & 0x01) << 1
  options |= (as_numeric(@show_headers        ) & 0x01) << 2
  options |= (as_numeric(@panes_frozen        ) & 0x01) << 3
  options |= (as_numeric(@show_empty_as_zero  ) & 0x01) << 4
  options |= (as_numeric(@auto_colour_grid    ) & 0x01) << 5
  options |= (as_numeric(@cols_right_to_left  ) & 0x01) << 6
  options |= (as_numeric(@show_outline        ) & 0x01) << 7
  options |= (as_numeric(@remove_splits       ) & 0x01) << 8
  options |= (as_numeric(@selected            ) & 0x01) << 9
  options |= (as_numeric(@sheet_visible       ) & 0x01) << 10
  options |= (as_numeric(@page_preview        ) & 0x01) << 11

  if @page_preview != 0
    if @preview_magn == 0
      scl_magn = 60
    else
      scl_magn = @preview_magn
    end
  else
    scl_magn = @normal_magn
  end
  
  Window2Record.new(options, @first_visible_row, @first_visible_col, @grid_colour, @preview_magn, @normal_magn, scl_magn).to_biff
end