Class: PanesRecord

Inherits:
BiffRecord show all
Defined in:
lib/surpass/biff_record.rb

Overview

This record stores the position of window panes. It is part of the Sheet View Settings Block. If the sheet does not contain any splits, this record will not occur. A sheet can be split in two different ways, with unfrozen panes or with frozen panes. A flag in the WINDOW2 record specifies, if the panes are frozen, which affects the contents of this record.

Record PANE, BIFF2-BIFF8: Offset Size Contents 0 2 Position of the vertical split

(px, 0 = No vertical split):
Unfrozen pane: Width of the left pane(s)
(in twips = 1/20 of a point)
Frozen pane: Number of visible
columns in left pane(s)

2 2 Position of the horizontal split

(py, 0 = No horizontal split):
Unfrozen pane: Height of the top pane(s)
(in twips = 1/20 of a point)
Frozen pane: Number of visible
rows in top pane(s)

4 2 Index to first visible row

in bottom pane(s)

6 2 Index to first visible column

in right pane(s)

8 1 Identifier of pane with active

cell cursor
9

1 Not used (BIFF5-BIFF8 only, not written

in BIFF2-BIFF4)

If the panes are frozen, pane†0 is always active, regardless of the cursor position. The correct identifiers for all possible combinations of visible panes are shown in the following pictures.

px = 0, py = 0 px = 0, py > 0 ————————– ————|————- | | | | | | | 3 | | | | |

  • 3 - ————————–

| | | | | | | 2 | | | | | ————————– ————|————-

px > 0, py = 0 px > 0, py > 0 ————|————- ————|————- | | | | | | | | | | 3 | 2 | | | | | | |

  • 3 | 1 - ————————–

| | | | | | | | | | 1 | 0 | | | | | | | ————|————- ————|————-

Constant Summary collapse

RECORD_ID =
0x0041

Constants inherited from BiffRecord

BiffRecord::BIFF_LIMIT, BiffRecord::CONTINUE_RECORD_ID

Instance Attribute Summary

Attributes inherited from BiffRecord

#record_data

Instance Method Summary collapse

Methods inherited from BiffRecord

#record_header, #to_biff

Constructor Details

#initialize(px, py, first_row_bottom, first_col_right, active_pane) ⇒ PanesRecord

Returns a new instance of PanesRecord.



1210
1211
1212
# File 'lib/surpass/biff_record.rb', line 1210

def initialize(px, py, first_row_bottom, first_col_right, active_pane)
  @record_data = [px, py, first_row_bottom, first_col_right, active_pane].pack('v5')
end