1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.millscript.office.excel.records;
22
23 import org.millscript.office.excel.Record;
24 import org.millscript.office.excel.blocks.SheetViewSettings;
25
26 /**
27 *
28 */
29 public class Window2 extends Record implements SheetViewSettings {
30
31 private int cachedMagnificationFactorInNormalView;
32
33 private int cachedMagnificationFactorInPageBreakPreview;
34
35 private int indexToFirstVisibleTabColumn;
36
37 private int indexToFirstVisibleTabRow;
38
39 private int indexToGridLineColor;
40
41 private char window2Options;
42
43 public boolean automaticGridLineColour() {
44 return 0 != ( this.window2Options & 0x0020 );
45 }
46
47 public boolean columnsFromRightToLeft() {
48 return 0 != ( this.window2Options & 0x0040 );
49 }
50
51 public boolean panesAreFrozen() {
52 return 0 != ( this.window2Options & 0x0008 );
53 }
54
55 public boolean removeSplitsIfPaneFreezeIsRemoved() {
56 return 0 != ( this.window2Options & 0x0100 );
57 }
58
59 /**
60 * @param factor The cachedMagnificationFactorInNormalView to set.
61 */
62 public void setCachedMagnificationFactorInNormalView( final int factor ) {
63 this.cachedMagnificationFactorInNormalView = factor;
64 }
65
66 /**
67 * @param factor The cachedMagnificationFactorInPageBreakPreview to set.
68 */
69 public void setCachedMagnificationFactorInPageBreakPreview( final int factor ) {
70 this.cachedMagnificationFactorInPageBreakPreview = factor;
71 }
72
73 /**
74 * @param index The indexToFirstVisibleTabColumn to set.
75 */
76 public void setIndexToFirstVisibleTabColumn( final int index ) {
77 this.indexToFirstVisibleTabColumn = index;
78 }
79
80 /**
81 * @param index The indexToFirstVisibleTabRow to set.
82 */
83 public void setIndexToFirstVisibleTabRow( final int index ) {
84 this.indexToFirstVisibleTabRow = index;
85 }
86
87 /**
88 * @param index The indexToGridLineColor to set.
89 */
90 public void setIndexToGridLineColor( final int index ) {
91 this.indexToGridLineColor = index;
92 }
93
94 /**
95 * @param options The options to set.
96 */
97 public void setOptions( final char options ) {
98 this.window2Options = options;
99 }
100
101 public boolean sheetSelected() {
102 return 0 != ( this.window2Options & 0x0200 );
103 }
104
105 public boolean sheetVisible() {
106 return 0 != ( this.window2Options & 0x0400 );
107 }
108
109 public boolean showFormulas() {
110 return 0 != ( this.window2Options & 0x0001 );
111 }
112
113 public boolean showGridLines() {
114 return 0 != ( this.window2Options & 0x0002 );
115 }
116
117 public boolean showInPageBreakPreview() {
118 return 0 != ( this.window2Options & 0x0800 );
119 }
120
121 public boolean showOutlineSymbols() {
122 return 0 != ( this.window2Options & 0x0080 );
123 }
124
125 public boolean showSheetHeaders() {
126 return 0 != ( this.window2Options & 0x0004 );
127 }
128
129 public boolean showZeroValues() {
130 return 0 != ( this.window2Options & 0x0010 );
131 }
132
133 }