write_xlsx 0.51.0 → 0.54.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +39 -0
- data/Gemfile +4 -14
- data/LICENSE.txt +3 -1
- data/README.rdoc +5 -0
- data/Rakefile +4 -71
- data/examples/chart_radar.rb +127 -0
- data/examples/chart_secondary_axis.rb +1 -1
- data/lib/write_xlsx/chart/area.rb +7 -18
- data/lib/write_xlsx/chart/bar.rb +20 -23
- data/lib/write_xlsx/chart/column.rb +7 -20
- data/lib/write_xlsx/chart/radar.rb +94 -0
- data/lib/write_xlsx/chart/stock.rb +6 -0
- data/lib/write_xlsx/chart.rb +317 -116
- data/lib/write_xlsx/package/xml_writer_simple.rb +2 -2
- data/lib/write_xlsx/version.rb +5 -0
- data/test/chart/test_write_a_latin.rb +22 -0
- data/test/chart/test_write_auto.rb +1 -1
- data/test/chart/test_write_ax_id.rb +1 -1
- data/test/chart/test_write_ax_pos.rb +1 -1
- data/test/chart/test_write_cross_ax.rb +1 -1
- data/test/chart/test_write_crosses.rb +1 -1
- data/test/chart/test_write_d_lbls.rb +18 -18
- data/test/chart/test_write_idx.rb +1 -1
- data/test/chart/test_write_label_align.rb +1 -1
- data/test/chart/test_write_label_offset.rb +1 -1
- data/test/chart/test_write_lang.rb +1 -1
- data/test/chart/test_write_layout.rb +1 -1
- data/test/chart/test_write_legend.rb +1 -1
- data/test/chart/test_write_legend_pos.rb +1 -1
- data/test/chart/test_write_major_gridlines.rb +2 -2
- data/test/chart/test_write_marker.rb +1 -1
- data/test/chart/test_write_marker_size.rb +1 -1
- data/test/chart/test_write_marker_value.rb +1 -1
- data/test/chart/test_write_num_cache.rb +1 -1
- data/test/chart/test_write_number_format.rb +40 -2
- data/test/chart/test_write_order.rb +1 -1
- data/test/chart/test_write_orientation.rb +1 -1
- data/test/chart/test_write_page_margins.rb +1 -1
- data/test/chart/test_write_page_setup.rb +1 -1
- data/test/chart/test_write_plot_vis_only.rb +1 -1
- data/test/chart/test_write_pt_count.rb +1 -1
- data/test/chart/test_write_style.rb +1 -1
- data/test/chart/test_write_symbol.rb +1 -1
- data/test/chart/test_write_tick_lbl_pos.rb +1 -1
- data/test/drawing/test_write_a_graphic_frame_locks.rb +1 -1
- data/test/drawing/test_write_c_chart.rb +1 -1
- data/test/drawing/test_write_c_nv_graphic_frame_pr.rb +2 -2
- data/test/drawing/test_write_c_nv_pr.rb +1 -1
- data/test/drawing/test_write_ext.rb +1 -1
- data/test/drawing/test_write_pos.rb +1 -1
- data/test/drawing/test_write_xfrm_extension.rb +1 -1
- data/test/drawing/test_write_xfrm_offset.rb +1 -1
- data/test/helper.rb +1 -1
- data/test/package/content_types/test_write_default.rb +1 -1
- data/test/package/content_types/test_write_override.rb +1 -1
- data/test/package/table/test_write_auto_filter.rb +1 -1
- data/test/package/table/test_write_table_column.rb +1 -1
- data/test/package/table/test_write_table_style_info.rb +1 -1
- data/test/package/vml/test_write_fill.rb +1 -1
- data/test/package/vml/test_write_idmap.rb +1 -1
- data/test/package/vml/test_write_move_with_cells.rb +1 -1
- data/test/package/vml/test_write_path.rb +2 -2
- data/test/package/vml/test_write_shadow.rb +1 -1
- data/test/package/vml/test_write_shapelayout.rb +1 -1
- data/test/package/vml/test_write_shapetype.rb +1 -1
- data/test/package/vml/test_write_size_with_cells.rb +1 -1
- data/test/package/vml/test_write_stroke.rb +1 -1
- data/test/perl_output/chart_radar.xlsx +0 -0
- data/test/perl_output/chart_secondary_axis.xlsx +0 -0
- data/test/regression/test_chart_axis22.rb +45 -0
- data/test/regression/test_chart_axis23.rb +46 -0
- data/test/regression/test_chart_axis24.rb +46 -0
- data/test/regression/test_chart_font01.rb +54 -0
- data/test/regression/test_chart_font02.rb +56 -0
- data/test/regression/test_chart_font03.rb +59 -0
- data/test/regression/test_chart_font04.rb +57 -0
- data/test/regression/test_chart_font05.rb +54 -0
- data/test/regression/test_chart_font06.rb +84 -0
- data/test/regression/test_chart_radar01.rb +39 -0
- data/test/regression/test_chart_radar02.rb +43 -0
- data/test/regression/test_chart_radar03.rb +43 -0
- data/test/regression/test_escapes04.rb +30 -0
- data/test/regression/test_escapes05.rb +31 -0
- data/test/regression/test_rich_string01.rb +1 -1
- data/test/regression/test_rich_string02.rb +1 -1
- data/test/regression/test_rich_string03.rb +1 -1
- data/test/regression/test_rich_string04.rb +1 -1
- data/test/regression/test_rich_string05.rb +1 -1
- data/test/regression/test_rich_string06.rb +1 -1
- data/test/regression/test_rich_string07.rb +1 -1
- data/test/regression/test_rich_string08.rb +1 -1
- data/test/regression/test_rich_string09.rb +1 -1
- data/test/regression/test_rich_string10.rb +1 -1
- data/test/regression/test_rich_string11.rb +1 -1
- data/test/regression/test_shape_connect01.rb +1 -1
- data/test/regression/test_shape_connect02.rb +1 -1
- data/test/regression/test_shape_connect03.rb +1 -1
- data/test/regression/test_shape_connect04.rb +1 -1
- data/test/regression/xlsx_files/chart_axis22.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis23.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis24.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_radar01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_radar02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_radar03.xlsx +0 -0
- data/test/regression/xlsx_files/escapes04.xlsx +0 -0
- data/test/regression/xlsx_files/escapes05.xlsx +0 -0
- data/test/test_example_match.rb +119 -1
- data/test/test_xml_writer_simple.rb +4 -4
- data/test/worksheet/test_write_autofilter.rb +21 -21
- data/test/worksheet/test_write_brk.rb +1 -1
- data/test/worksheet/test_write_col_breaks.rb +2 -2
- data/test/worksheet/test_write_col_info.rb +6 -6
- data/test/worksheet/test_write_custom_filter.rb +1 -1
- data/test/worksheet/test_write_custom_filters.rb +2 -2
- data/test/worksheet/test_write_dimension.rb +9 -9
- data/test/worksheet/test_write_ext.rb +1 -1
- data/test/worksheet/test_write_ext_lst.rb +1 -1
- data/test/worksheet/test_write_filter.rb +1 -1
- data/test/worksheet/test_write_filter_column.rb +1 -1
- data/test/worksheet/test_write_filters.rb +3 -3
- data/test/worksheet/test_write_hyperlink.rb +4 -4
- data/test/worksheet/test_write_hyperlinks.rb +2 -2
- data/test/worksheet/test_write_legacy_drawing.rb +1 -1
- data/test/worksheet/test_write_merge_cell.rb +1 -1
- data/test/worksheet/test_write_mx_plv.rb +1 -1
- data/test/worksheet/test_write_page_margins.rb +11 -11
- data/test/worksheet/test_write_page_set_up_pr.rb +1 -1
- data/test/worksheet/test_write_page_setup.rb +4 -4
- data/test/worksheet/test_write_pane.rb +14 -14
- data/test/worksheet/test_write_phonetic_pr.rb +1 -1
- data/test/worksheet/test_write_print_options.rb +5 -5
- data/test/worksheet/test_write_row_breaks.rb +2 -2
- data/test/worksheet/test_write_row_element.rb +1 -1
- data/test/worksheet/test_write_selection.rb +1 -1
- data/test/worksheet/test_write_sheet_calc_pr.rb +1 -1
- data/test/worksheet/test_write_sheet_data.rb +1 -1
- data/test/worksheet/test_write_sheet_format_pr.rb +1 -1
- data/test/worksheet/test_write_sheet_pr.rb +3 -3
- data/test/worksheet/test_write_sheet_protection.rb +18 -18
- data/test/worksheet/test_write_sheet_view.rb +6 -6
- data/test/worksheet/test_write_sheet_view1.rb +6 -6
- data/test/worksheet/test_write_sheet_view2.rb +5 -5
- data/test/worksheet/test_write_sheet_view3.rb +8 -8
- data/test/worksheet/test_write_sheet_view4.rb +8 -8
- data/test/worksheet/test_write_sheet_view5.rb +7 -7
- data/test/worksheet/test_write_sheet_view6.rb +4 -4
- data/test/worksheet/test_write_sheet_view7.rb +6 -6
- data/test/worksheet/test_write_sheet_view8.rb +4 -4
- data/test/worksheet/test_write_sheet_view9.rb +4 -4
- data/test/worksheet/test_write_tab_color.rb +1 -1
- data/write_xlsx.gemspec +18 -935
- metadata +881 -32
- data/VERSION +0 -1
- data/test/chart/test_write_num_fmt.rb +0 -16
@@ -13,7 +13,7 @@ class TestWritePageSetUpPr < Test::Unit::TestCase
|
|
13
13
|
@worksheet.instance_variable_get(:@print_style).fit_page = true
|
14
14
|
@worksheet.__send__('write_page_set_up_pr')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<pageSetUpPr fitToPage="1"
|
16
|
+
expected = '<pageSetUpPr fitToPage="1"/>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
end
|
@@ -24,7 +24,7 @@ class TestWorksheetWritePageSetup < Test::Unit::TestCase
|
|
24
24
|
@worksheet.set_landscape
|
25
25
|
@worksheet.__send__('write_page_setup')
|
26
26
|
result = @worksheet.instance_variable_get(:@writer).string
|
27
|
-
expected = '<pageSetup orientation="landscape"
|
27
|
+
expected = '<pageSetup orientation="landscape"/>'
|
28
28
|
assert_equal(expected, result)
|
29
29
|
end
|
30
30
|
|
@@ -32,7 +32,7 @@ class TestWorksheetWritePageSetup < Test::Unit::TestCase
|
|
32
32
|
@worksheet.set_portrait
|
33
33
|
@worksheet.__send__('write_page_setup')
|
34
34
|
result = @worksheet.instance_variable_get(:@writer).string
|
35
|
-
expected = '<pageSetup orientation="portrait"
|
35
|
+
expected = '<pageSetup orientation="portrait"/>'
|
36
36
|
assert_equal(expected, result)
|
37
37
|
end
|
38
38
|
|
@@ -40,7 +40,7 @@ class TestWorksheetWritePageSetup < Test::Unit::TestCase
|
|
40
40
|
@worksheet.paper = 9
|
41
41
|
@worksheet.__send__('write_page_setup')
|
42
42
|
result = @worksheet.instance_variable_get(:@writer).string
|
43
|
-
expected = '<pageSetup paperSize="9" orientation="portrait"
|
43
|
+
expected = '<pageSetup paperSize="9" orientation="portrait"/>'
|
44
44
|
assert_equal(expected, result)
|
45
45
|
end
|
46
46
|
|
@@ -48,7 +48,7 @@ class TestWorksheetWritePageSetup < Test::Unit::TestCase
|
|
48
48
|
@worksheet.print_across
|
49
49
|
@worksheet.__send__('write_page_setup')
|
50
50
|
result = @worksheet.instance_variable_get(:@writer).string
|
51
|
-
expected = '<pageSetup pageOrder="overThenDown" orientation="portrait"
|
51
|
+
expected = '<pageSetup pageOrder="overThenDown" orientation="portrait"/>'
|
52
52
|
assert_equal(expected, result)
|
53
53
|
end
|
54
54
|
end
|
@@ -13,7 +13,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
13
13
|
@worksheet.freeze_panes(1)
|
14
14
|
@worksheet.__send__('write_panes')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"
|
16
|
+
expected = '<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
|
@@ -21,7 +21,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
21
21
|
@worksheet.freeze_panes(0, 1)
|
22
22
|
@worksheet.__send__('write_panes')
|
23
23
|
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<pane xSplit="1" topLeftCell="B1" activePane="topRight" state="frozen"
|
24
|
+
expected = '<pane xSplit="1" topLeftCell="B1" activePane="topRight" state="frozen"/>'
|
25
25
|
assert_equal(expected, result)
|
26
26
|
end
|
27
27
|
|
@@ -29,7 +29,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
29
29
|
@worksheet.freeze_panes(1, 1)
|
30
30
|
@worksheet.__send__('write_panes')
|
31
31
|
result = @worksheet.instance_variable_get(:@writer).string
|
32
|
-
expected = '<pane xSplit="1" ySplit="1" topLeftCell="B2" activePane="bottomRight" state="frozen"
|
32
|
+
expected = '<pane xSplit="1" ySplit="1" topLeftCell="B2" activePane="bottomRight" state="frozen"/>'
|
33
33
|
assert_equal(expected, result)
|
34
34
|
end
|
35
35
|
|
@@ -37,7 +37,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
37
37
|
@worksheet.freeze_panes(1, 0, 19)
|
38
38
|
@worksheet.__send__('write_panes')
|
39
39
|
result = @worksheet.instance_variable_get(:@writer).string
|
40
|
-
expected = '<pane ySplit="1" topLeftCell="A20" activePane="bottomLeft" state="frozen"
|
40
|
+
expected = '<pane ySplit="1" topLeftCell="A20" activePane="bottomLeft" state="frozen"/>'
|
41
41
|
assert_equal(expected, result)
|
42
42
|
end
|
43
43
|
|
@@ -45,7 +45,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
45
45
|
@worksheet.freeze_panes('G4')
|
46
46
|
@worksheet.__send__('write_panes')
|
47
47
|
result = @worksheet.instance_variable_get(:@writer).string
|
48
|
-
expected = '<pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozen"
|
48
|
+
expected = '<pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozen"/>'
|
49
49
|
assert_equal(expected, result)
|
50
50
|
end
|
51
51
|
|
@@ -53,7 +53,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
53
53
|
@worksheet.freeze_panes(3, 6, 3, 6, 1)
|
54
54
|
@worksheet.__send__('write_panes')
|
55
55
|
result = @worksheet.instance_variable_get(:@writer).string
|
56
|
-
expected = '<pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozenSplit"
|
56
|
+
expected = '<pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozenSplit"/>'
|
57
57
|
assert_equal(expected, result)
|
58
58
|
end
|
59
59
|
|
@@ -61,7 +61,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
61
61
|
@worksheet.split_panes(15)
|
62
62
|
@worksheet.__send__('write_panes')
|
63
63
|
result = @worksheet.instance_variable_get(:@writer).string
|
64
|
-
expected = '<pane ySplit="600" topLeftCell="A2"
|
64
|
+
expected = '<pane ySplit="600" topLeftCell="A2"/>'
|
65
65
|
assert_equal(expected, result)
|
66
66
|
end
|
67
67
|
|
@@ -69,7 +69,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
69
69
|
@worksheet.split_panes(30)
|
70
70
|
@worksheet.__send__('write_panes')
|
71
71
|
result = @worksheet.instance_variable_get(:@writer).string
|
72
|
-
expected = '<pane ySplit="900" topLeftCell="A3"
|
72
|
+
expected = '<pane ySplit="900" topLeftCell="A3"/>'
|
73
73
|
assert_equal(expected, result)
|
74
74
|
end
|
75
75
|
|
@@ -77,7 +77,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
77
77
|
@worksheet.split_panes(105)
|
78
78
|
@worksheet.__send__('write_panes')
|
79
79
|
result = @worksheet.instance_variable_get(:@writer).string
|
80
|
-
expected = '<pane ySplit="2400" topLeftCell="A8"
|
80
|
+
expected = '<pane ySplit="2400" topLeftCell="A8"/>'
|
81
81
|
assert_equal(expected, result)
|
82
82
|
end
|
83
83
|
|
@@ -85,7 +85,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
85
85
|
@worksheet.split_panes(0, 8.43)
|
86
86
|
@worksheet.__send__('write_panes')
|
87
87
|
result = @worksheet.instance_variable_get(:@writer).string
|
88
|
-
expected = '<pane xSplit="1350" topLeftCell="B1"
|
88
|
+
expected = '<pane xSplit="1350" topLeftCell="B1"/>'
|
89
89
|
assert_equal(expected, result)
|
90
90
|
end
|
91
91
|
|
@@ -93,7 +93,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
93
93
|
@worksheet.split_panes(0, 17.57)
|
94
94
|
@worksheet.__send__('write_panes')
|
95
95
|
result = @worksheet.instance_variable_get(:@writer).string
|
96
|
-
expected = '<pane xSplit="2310" topLeftCell="C1"
|
96
|
+
expected = '<pane xSplit="2310" topLeftCell="C1"/>'
|
97
97
|
assert_equal(expected, result)
|
98
98
|
end
|
99
99
|
|
@@ -101,7 +101,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
101
101
|
@worksheet.split_panes(0, 45)
|
102
102
|
@worksheet.__send__('write_panes')
|
103
103
|
result = @worksheet.instance_variable_get(:@writer).string
|
104
|
-
expected = '<pane xSplit="5190" topLeftCell="F1"
|
104
|
+
expected = '<pane xSplit="5190" topLeftCell="F1"/>'
|
105
105
|
assert_equal(expected, result)
|
106
106
|
end
|
107
107
|
|
@@ -109,7 +109,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
109
109
|
@worksheet.split_panes(15, 8.43)
|
110
110
|
@worksheet.__send__('write_panes')
|
111
111
|
result = @worksheet.instance_variable_get(:@writer).string
|
112
|
-
expected = '<pane xSplit="1350" ySplit="600" topLeftCell="B2"
|
112
|
+
expected = '<pane xSplit="1350" ySplit="600" topLeftCell="B2"/>'
|
113
113
|
assert_equal(expected, result)
|
114
114
|
end
|
115
115
|
|
@@ -117,7 +117,7 @@ class TestWritePane < Test::Unit::TestCase
|
|
117
117
|
@worksheet.split_panes(45, 54.14)
|
118
118
|
@worksheet.__send__('write_panes')
|
119
119
|
result = @worksheet.instance_variable_get(:@writer).string
|
120
|
-
expected = '<pane xSplit="6150" ySplit="1200" topLeftCell="G4"
|
120
|
+
expected = '<pane xSplit="6150" ySplit="1200" topLeftCell="G4"/>'
|
121
121
|
assert_equal(expected, result)
|
122
122
|
end
|
123
123
|
end
|
@@ -13,7 +13,7 @@ class TestWritePhoneticPr < Test::Unit::TestCase
|
|
13
13
|
def test_write_phonetic_pr
|
14
14
|
@worksheet.__send__('write_phonetic_pr')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<phoneticPr fontId="1" type="noConversion"
|
16
|
+
expected = '<phoneticPr fontId="1" type="noConversion"/>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
end
|
@@ -21,7 +21,7 @@ class TestWritePrintOptions < Test::Unit::TestCase
|
|
21
21
|
@worksheet.center_horizontally
|
22
22
|
@worksheet.__send__('write_print_options')
|
23
23
|
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<printOptions horizontalCentered="1"
|
24
|
+
expected = '<printOptions horizontalCentered="1"/>'
|
25
25
|
assert_equal(expected, result)
|
26
26
|
end
|
27
27
|
|
@@ -29,7 +29,7 @@ class TestWritePrintOptions < Test::Unit::TestCase
|
|
29
29
|
@worksheet.center_vertically
|
30
30
|
@worksheet.__send__('write_print_options')
|
31
31
|
result = @worksheet.instance_variable_get(:@writer).string
|
32
|
-
expected = '<printOptions verticalCentered="1"
|
32
|
+
expected = '<printOptions verticalCentered="1"/>'
|
33
33
|
assert_equal(expected, result)
|
34
34
|
end
|
35
35
|
|
@@ -38,7 +38,7 @@ class TestWritePrintOptions < Test::Unit::TestCase
|
|
38
38
|
@worksheet.center_vertically
|
39
39
|
@worksheet.__send__('write_print_options')
|
40
40
|
result = @worksheet.instance_variable_get(:@writer).string
|
41
|
-
expected = '<printOptions horizontalCentered="1" verticalCentered="1"
|
41
|
+
expected = '<printOptions horizontalCentered="1" verticalCentered="1"/>'
|
42
42
|
assert_equal(expected, result)
|
43
43
|
end
|
44
44
|
|
@@ -54,7 +54,7 @@ class TestWritePrintOptions < Test::Unit::TestCase
|
|
54
54
|
@worksheet.hide_gridlines(false)
|
55
55
|
@worksheet.__send__('write_print_options')
|
56
56
|
result = @worksheet.instance_variable_get(:@writer).string
|
57
|
-
expected = '<printOptions gridLines="1"
|
57
|
+
expected = '<printOptions gridLines="1"/>'
|
58
58
|
assert_equal(expected, result)
|
59
59
|
end
|
60
60
|
=begin
|
@@ -70,7 +70,7 @@ class TestWritePrintOptions < Test::Unit::TestCase
|
|
70
70
|
@worksheet.hide_gridlines(false)
|
71
71
|
@worksheet.__send__('write_print_options', 2)
|
72
72
|
result = @worksheet.instance_variable_get(:@writer).string
|
73
|
-
expected = '<printOptions gridLines="1"
|
73
|
+
expected = '<printOptions gridLines="1"/>'
|
74
74
|
assert_equal(expected, result)
|
75
75
|
end
|
76
76
|
=end
|
@@ -13,7 +13,7 @@ class TestWriteRowBreaks < Test::Unit::TestCase
|
|
13
13
|
@worksheet.instance_variable_get(:@print_style).hbreaks = [1]
|
14
14
|
@worksheet.__send__('write_row_breaks')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<rowBreaks count="1" manualBreakCount="1"><brk id="1" max="16383" man="1"
|
16
|
+
expected = '<rowBreaks count="1" manualBreakCount="1"><brk id="1" max="16383" man="1"/></rowBreaks>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
|
@@ -21,7 +21,7 @@ class TestWriteRowBreaks < Test::Unit::TestCase
|
|
21
21
|
@worksheet.instance_variable_get(:@print_style).hbreaks = [15, 7, 3, 0]
|
22
22
|
@worksheet.__send__('write_row_breaks')
|
23
23
|
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<rowBreaks count="3" manualBreakCount="3"><brk id="3" max="16383" man="1"
|
24
|
+
expected = '<rowBreaks count="3" manualBreakCount="3"><brk id="3" max="16383" man="1"/><brk id="7" max="16383" man="1"/><brk id="15" max="16383" man="1"/></rowBreaks>'
|
25
25
|
assert_equal(expected, result)
|
26
26
|
end
|
27
27
|
end
|
@@ -63,7 +63,7 @@ class TestWriteRow < Test::Unit::TestCase
|
|
63
63
|
def test_write_empty_row_12_nil_24_nil_1
|
64
64
|
@worksheet.__send__('write_empty_row', 12, nil, 24, nil, 1)
|
65
65
|
result = @worksheet.instance_variable_get(:@writer).string
|
66
|
-
expected = '<row r="13" ht="24" hidden="1" customHeight="1"
|
66
|
+
expected = '<row r="13" ht="24" hidden="1" customHeight="1"/>'
|
67
67
|
assert_equal(expected, result)
|
68
68
|
end
|
69
69
|
end
|
@@ -12,7 +12,7 @@ class TestWriteSelection < Test::Unit::TestCase
|
|
12
12
|
def test_write_selection
|
13
13
|
@worksheet.__send__('write_selection', nil, 'A1', 'A1')
|
14
14
|
result = @worksheet.instance_variable_get(:@writer).string
|
15
|
-
expected = '<selection activeCell="A1" sqref="A1"
|
15
|
+
expected = '<selection activeCell="A1" sqref="A1"/>'
|
16
16
|
assert_equal(expected, result)
|
17
17
|
end
|
18
18
|
end
|
@@ -12,7 +12,7 @@ class TestWriteSheetCalcPr < Test::Unit::TestCase
|
|
12
12
|
def test_write_sheet_calc_pr
|
13
13
|
@worksheet.__send__('write_sheet_calc_pr')
|
14
14
|
result = @worksheet.instance_variable_get(:@writer).string
|
15
|
-
expected = '<sheetCalcPr fullCalcOnLoad="1"
|
15
|
+
expected = '<sheetCalcPr fullCalcOnLoad="1"/>'
|
16
16
|
assert_equal(expected, result)
|
17
17
|
end
|
18
18
|
end
|
@@ -12,7 +12,7 @@ class TestWriteSheetData < Test::Unit::TestCase
|
|
12
12
|
def test_write_sheet_data
|
13
13
|
@worksheet.__send__('write_sheet_data')
|
14
14
|
result = @worksheet.instance_variable_get(:@writer).string
|
15
|
-
expected = '<sheetData
|
15
|
+
expected = '<sheetData/>'
|
16
16
|
assert_equal(expected, result)
|
17
17
|
end
|
18
18
|
end
|
@@ -12,7 +12,7 @@ class TestWriteSheetFormatPr < Test::Unit::TestCase
|
|
12
12
|
def test_write_sheet_format_pr
|
13
13
|
@worksheet.__send__('write_sheet_format_pr')
|
14
14
|
result = @worksheet.instance_variable_get(:@writer).string
|
15
|
-
expected = '<sheetFormatPr defaultRowHeight="15"
|
15
|
+
expected = '<sheetFormatPr defaultRowHeight="15"/>'
|
16
16
|
assert_equal(expected, result)
|
17
17
|
end
|
18
18
|
end
|
@@ -13,7 +13,7 @@ class TestWriteSheetPr < Test::Unit::TestCase
|
|
13
13
|
@worksheet.instance_variable_get(:@print_style).fit_page = true
|
14
14
|
@worksheet.__send__('write_sheet_pr')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<sheetPr><pageSetUpPr fitToPage="1"
|
16
|
+
expected = '<sheetPr><pageSetUpPr fitToPage="1"/></sheetPr>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
|
@@ -21,7 +21,7 @@ class TestWriteSheetPr < Test::Unit::TestCase
|
|
21
21
|
@worksheet.set_tab_color('red')
|
22
22
|
@worksheet.__send__('write_sheet_pr')
|
23
23
|
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<sheetPr><tabColor rgb="FFFF0000"
|
24
|
+
expected = '<sheetPr><tabColor rgb="FFFF0000"/></sheetPr>'
|
25
25
|
assert_equal(expected, result)
|
26
26
|
end
|
27
27
|
|
@@ -30,7 +30,7 @@ class TestWriteSheetPr < Test::Unit::TestCase
|
|
30
30
|
@worksheet.set_tab_color('red')
|
31
31
|
@worksheet.__send__('write_sheet_pr')
|
32
32
|
result = @worksheet.instance_variable_get(:@writer).string
|
33
|
-
expected = '<sheetPr><tabColor rgb="FFFF0000"
|
33
|
+
expected = '<sheetPr><tabColor rgb="FFFF0000"/><pageSetUpPr fitToPage="1"/></sheetPr>'
|
34
34
|
assert_equal(expected, result)
|
35
35
|
end
|
36
36
|
end
|
@@ -13,7 +13,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
13
13
|
@worksheet.protect
|
14
14
|
@worksheet.__send__('write_sheet_protection')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1"
|
16
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1"/>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
|
@@ -21,7 +21,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
21
21
|
@worksheet.protect('password')
|
22
22
|
@worksheet.__send__('write_sheet_protection')
|
23
23
|
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<sheetProtection password="83AF" sheet="1" objects="1" scenarios="1"
|
24
|
+
expected = '<sheetProtection password="83AF" sheet="1" objects="1" scenarios="1"/>'
|
25
25
|
assert_equal(expected, result)
|
26
26
|
end
|
27
27
|
|
@@ -29,7 +29,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
29
29
|
@worksheet.protect('', :select_locked_cells => false)
|
30
30
|
@worksheet.__send__('write_sheet_protection')
|
31
31
|
result = @worksheet.instance_variable_get(:@writer).string
|
32
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" selectLockedCells="1"
|
32
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" selectLockedCells="1"/>'
|
33
33
|
assert_equal(expected, result)
|
34
34
|
end
|
35
35
|
|
@@ -37,7 +37,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
37
37
|
@worksheet.protect('', :format_cells => true)
|
38
38
|
@worksheet.__send__('write_sheet_protection')
|
39
39
|
result = @worksheet.instance_variable_get(:@writer).string
|
40
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatCells="0"
|
40
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatCells="0"/>'
|
41
41
|
assert_equal(expected, result)
|
42
42
|
end
|
43
43
|
|
@@ -45,7 +45,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
45
45
|
@worksheet.protect('', :format_columns => true)
|
46
46
|
@worksheet.__send__('write_sheet_protection')
|
47
47
|
result = @worksheet.instance_variable_get(:@writer).string
|
48
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatColumns="0"
|
48
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatColumns="0"/>'
|
49
49
|
assert_equal(expected, result)
|
50
50
|
end
|
51
51
|
|
@@ -53,7 +53,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
53
53
|
@worksheet.protect('', :format_rows => true)
|
54
54
|
@worksheet.__send__('write_sheet_protection')
|
55
55
|
result = @worksheet.instance_variable_get(:@writer).string
|
56
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatRows="0"
|
56
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatRows="0"/>'
|
57
57
|
assert_equal(expected, result)
|
58
58
|
end
|
59
59
|
|
@@ -61,7 +61,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
61
61
|
@worksheet.protect('', :insert_columns => true)
|
62
62
|
@worksheet.__send__('write_sheet_protection')
|
63
63
|
result = @worksheet.instance_variable_get(:@writer).string
|
64
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertColumns="0"
|
64
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertColumns="0"/>'
|
65
65
|
assert_equal(expected, result)
|
66
66
|
end
|
67
67
|
|
@@ -69,7 +69,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
69
69
|
@worksheet.protect('', :insert_rows => true)
|
70
70
|
@worksheet.__send__('write_sheet_protection')
|
71
71
|
result = @worksheet.instance_variable_get(:@writer).string
|
72
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertRows="0"
|
72
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertRows="0"/>'
|
73
73
|
assert_equal(expected, result)
|
74
74
|
end
|
75
75
|
|
@@ -77,7 +77,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
77
77
|
@worksheet.protect('', :insert_hyperlinks => true)
|
78
78
|
@worksheet.__send__('write_sheet_protection')
|
79
79
|
result = @worksheet.instance_variable_get(:@writer).string
|
80
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertHyperlinks="0"
|
80
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" insertHyperlinks="0"/>'
|
81
81
|
assert_equal(expected, result)
|
82
82
|
end
|
83
83
|
|
@@ -85,7 +85,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
85
85
|
@worksheet.protect('', :delete_columns => true)
|
86
86
|
@worksheet.__send__('write_sheet_protection')
|
87
87
|
result = @worksheet.instance_variable_get(:@writer).string
|
88
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" deleteColumns="0"
|
88
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" deleteColumns="0"/>'
|
89
89
|
assert_equal(expected, result)
|
90
90
|
end
|
91
91
|
|
@@ -93,7 +93,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
93
93
|
@worksheet.protect('', :delete_rows => true)
|
94
94
|
@worksheet.__send__('write_sheet_protection')
|
95
95
|
result = @worksheet.instance_variable_get(:@writer).string
|
96
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" deleteRows="0"
|
96
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" deleteRows="0"/>'
|
97
97
|
assert_equal(expected, result)
|
98
98
|
end
|
99
99
|
|
@@ -101,7 +101,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
101
101
|
@worksheet.protect('', :sort => true)
|
102
102
|
@worksheet.__send__('write_sheet_protection')
|
103
103
|
result = @worksheet.instance_variable_get(:@writer).string
|
104
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" sort="0"
|
104
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" sort="0"/>'
|
105
105
|
assert_equal(expected, result)
|
106
106
|
end
|
107
107
|
|
@@ -109,7 +109,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
109
109
|
@worksheet.protect('', :autofilter => true)
|
110
110
|
@worksheet.__send__('write_sheet_protection')
|
111
111
|
result = @worksheet.instance_variable_get(:@writer).string
|
112
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" autoFilter="0"
|
112
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" autoFilter="0"/>'
|
113
113
|
assert_equal(expected, result)
|
114
114
|
end
|
115
115
|
|
@@ -117,7 +117,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
117
117
|
@worksheet.protect('', :pivot_tables => true)
|
118
118
|
@worksheet.__send__('write_sheet_protection')
|
119
119
|
result = @worksheet.instance_variable_get(:@writer).string
|
120
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" pivotTables="0"
|
120
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" pivotTables="0"/>'
|
121
121
|
assert_equal(expected, result)
|
122
122
|
end
|
123
123
|
|
@@ -125,7 +125,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
125
125
|
@worksheet.protect('', :objects => true)
|
126
126
|
@worksheet.__send__('write_sheet_protection')
|
127
127
|
result = @worksheet.instance_variable_get(:@writer).string
|
128
|
-
expected = '<sheetProtection sheet="1" scenarios="1"
|
128
|
+
expected = '<sheetProtection sheet="1" scenarios="1"/>'
|
129
129
|
assert_equal(expected, result)
|
130
130
|
end
|
131
131
|
|
@@ -133,7 +133,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
133
133
|
@worksheet.protect('', :scenarios => true)
|
134
134
|
@worksheet.__send__('write_sheet_protection')
|
135
135
|
result = @worksheet.instance_variable_get(:@writer).string
|
136
|
-
expected = '<sheetProtection sheet="1" objects="1"
|
136
|
+
expected = '<sheetProtection sheet="1" objects="1"/>'
|
137
137
|
assert_equal(expected, result)
|
138
138
|
end
|
139
139
|
|
@@ -142,7 +142,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
142
142
|
:select_locked_cells => false, :select_unlocked_cells => false)
|
143
143
|
@worksheet.__send__('write_sheet_protection')
|
144
144
|
result = @worksheet.instance_variable_get(:@writer).string
|
145
|
-
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatCells="0" selectLockedCells="1" selectUnlockedCells="1"
|
145
|
+
expected = '<sheetProtection sheet="1" objects="1" scenarios="1" formatCells="0" selectLockedCells="1" selectUnlockedCells="1"/>'
|
146
146
|
assert_equal(expected, result)
|
147
147
|
end
|
148
148
|
|
@@ -168,7 +168,7 @@ class TestWriteSheetProtection < Test::Unit::TestCase
|
|
168
168
|
@worksheet.protect(password, options)
|
169
169
|
@worksheet.__send__('write_sheet_protection')
|
170
170
|
result = @worksheet.instance_variable_get(:@writer).string
|
171
|
-
expected = '<sheetProtection password="996B" sheet="1" formatCells="0" formatColumns="0" formatRows="0" insertColumns="0" insertRows="0" insertHyperlinks="0" deleteColumns="0" deleteRows="0" selectLockedCells="1" sort="0" autoFilter="0" pivotTables="0" selectUnlockedCells="1"
|
171
|
+
expected = '<sheetProtection password="996B" sheet="1" formatCells="0" formatColumns="0" formatRows="0" insertColumns="0" insertRows="0" insertHyperlinks="0" deleteColumns="0" deleteRows="0" selectLockedCells="1" sort="0" autoFilter="0" pivotTables="0" selectUnlockedCells="1"/>'
|
172
172
|
assert_equal(expected, result)
|
173
173
|
end
|
174
174
|
end
|
@@ -12,7 +12,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
12
12
|
def test_write_sheet_view_tab_not_selected
|
13
13
|
@worksheet.__send__('write_sheet_view')
|
14
14
|
result = @worksheet.instance_variable_get(:@writer).string
|
15
|
-
expected = '<sheetView workbookViewId="0"
|
15
|
+
expected = '<sheetView workbookViewId="0"/>'
|
16
16
|
assert_equal(expected, result)
|
17
17
|
end
|
18
18
|
|
@@ -20,7 +20,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
20
20
|
@worksheet.select
|
21
21
|
@worksheet.__send__('write_sheet_view')
|
22
22
|
result = @worksheet.instance_variable_get(:@writer).string
|
23
|
-
expected = '<sheetView tabSelected="1" workbookViewId="0"
|
23
|
+
expected = '<sheetView tabSelected="1" workbookViewId="0"/>'
|
24
24
|
assert_equal(expected, result)
|
25
25
|
end
|
26
26
|
|
@@ -29,7 +29,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
29
29
|
@worksheet.hide_gridlines
|
30
30
|
@worksheet.__send__('write_sheet_view')
|
31
31
|
result = @worksheet.instance_variable_get(:@writer).string
|
32
|
-
expected = '<sheetView tabSelected="1" workbookViewId="0"
|
32
|
+
expected = '<sheetView tabSelected="1" workbookViewId="0"/>'
|
33
33
|
assert_equal(expected, result)
|
34
34
|
end
|
35
35
|
|
@@ -38,7 +38,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
38
38
|
@worksheet.hide_gridlines(true)
|
39
39
|
@worksheet.__send__('write_sheet_view')
|
40
40
|
result = @worksheet.instance_variable_get(:@writer).string
|
41
|
-
expected = '<sheetView showGridLines="0" tabSelected="1" workbookViewId="0"
|
41
|
+
expected = '<sheetView showGridLines="0" tabSelected="1" workbookViewId="0"/>'
|
42
42
|
assert_equal(expected, result)
|
43
43
|
end
|
44
44
|
|
@@ -47,7 +47,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
47
47
|
@worksheet.hide_gridlines(false)
|
48
48
|
@worksheet.__send__('write_sheet_view')
|
49
49
|
result = @worksheet.instance_variable_get(:@writer).string
|
50
|
-
expected = '<sheetView tabSelected="1" workbookViewId="0"
|
50
|
+
expected = '<sheetView tabSelected="1" workbookViewId="0"/>'
|
51
51
|
assert_equal(expected, result)
|
52
52
|
end
|
53
53
|
|
@@ -56,7 +56,7 @@ class TestWriteSheetView < Test::Unit::TestCase
|
|
56
56
|
@worksheet.hide_gridlines(2)
|
57
57
|
@worksheet.__send__('write_sheet_view')
|
58
58
|
result = @worksheet.instance_variable_get(:@writer).string
|
59
|
-
expected = '<sheetView showGridLines="0" tabSelected="1" workbookViewId="0"
|
59
|
+
expected = '<sheetView showGridLines="0" tabSelected="1" workbookViewId="0"/>'
|
60
60
|
assert_equal(expected, result)
|
61
61
|
end
|
62
62
|
end
|
@@ -13,7 +13,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
13
13
|
@worksheet.select
|
14
14
|
@worksheet.__send__('write_sheet_views')
|
15
15
|
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"
|
16
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"/></sheetViews>'
|
17
17
|
assert_equal(expected, result)
|
18
18
|
end
|
19
19
|
|
@@ -22,7 +22,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
22
22
|
@worksheet.set_zoom(100)
|
23
23
|
@worksheet.__send__('write_sheet_views')
|
24
24
|
result = @worksheet.instance_variable_get(:@writer).string
|
25
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"
|
25
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"/></sheetViews>'
|
26
26
|
assert_equal(expected, result)
|
27
27
|
end
|
28
28
|
|
@@ -31,7 +31,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
31
31
|
@worksheet.set_zoom(200)
|
32
32
|
@worksheet.__send__('write_sheet_views')
|
33
33
|
result = @worksheet.instance_variable_get(:@writer).string
|
34
|
-
expected = '<sheetViews><sheetView tabSelected="1" zoomScale="200" zoomScaleNormal="200" workbookViewId="0"
|
34
|
+
expected = '<sheetViews><sheetView tabSelected="1" zoomScale="200" zoomScaleNormal="200" workbookViewId="0"/></sheetViews>'
|
35
35
|
assert_equal(expected, result)
|
36
36
|
end
|
37
37
|
|
@@ -40,7 +40,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
40
40
|
@worksheet.right_to_left
|
41
41
|
@worksheet.__send__('write_sheet_views')
|
42
42
|
result = @worksheet.instance_variable_get(:@writer).string
|
43
|
-
expected = '<sheetViews><sheetView rightToLeft="1" tabSelected="1" workbookViewId="0"
|
43
|
+
expected = '<sheetViews><sheetView rightToLeft="1" tabSelected="1" workbookViewId="0"/></sheetViews>'
|
44
44
|
assert_equal(expected, result)
|
45
45
|
end
|
46
46
|
|
@@ -49,7 +49,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
49
49
|
@worksheet.hide_zero
|
50
50
|
@worksheet.__send__('write_sheet_views')
|
51
51
|
result = @worksheet.instance_variable_get(:@writer).string
|
52
|
-
expected = '<sheetViews><sheetView showZeros="0" tabSelected="1" workbookViewId="0"
|
52
|
+
expected = '<sheetViews><sheetView showZeros="0" tabSelected="1" workbookViewId="0"/></sheetViews>'
|
53
53
|
assert_equal(expected, result)
|
54
54
|
end
|
55
55
|
|
@@ -58,7 +58,7 @@ class TestWriteSheetView1 < Test::Unit::TestCase
|
|
58
58
|
@worksheet.set_page_view
|
59
59
|
@worksheet.__send__('write_sheet_views')
|
60
60
|
result = @worksheet.instance_variable_get(:@writer).string
|
61
|
-
expected = '<sheetViews><sheetView tabSelected="1" view="pageLayout" workbookViewId="0"
|
61
|
+
expected = '<sheetViews><sheetView tabSelected="1" view="pageLayout" workbookViewId="0"/></sheetViews>'
|
62
62
|
assert_equal(expected, result)
|
63
63
|
end
|
64
64
|
end
|
@@ -14,7 +14,7 @@ class TestWriteSheetView2 < Test::Unit::TestCase
|
|
14
14
|
@worksheet.freeze_panes(1)
|
15
15
|
@worksheet.__send__('write_sheet_views')
|
16
16
|
result = @worksheet.instance_variable_get(:@writer).string
|
17
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"
|
17
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft"/></sheetView></sheetViews>'
|
18
18
|
assert_equal(expected, result)
|
19
19
|
end
|
20
20
|
|
@@ -23,7 +23,7 @@ class TestWriteSheetView2 < Test::Unit::TestCase
|
|
23
23
|
@worksheet.freeze_panes(0, 1)
|
24
24
|
@worksheet.__send__('write_sheet_views')
|
25
25
|
result = @worksheet.instance_variable_get(:@writer).string
|
26
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="1" topLeftCell="B1" activePane="topRight" state="frozen"
|
26
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="1" topLeftCell="B1" activePane="topRight" state="frozen"/><selection pane="topRight"/></sheetView></sheetViews>'
|
27
27
|
assert_equal(expected, result)
|
28
28
|
end
|
29
29
|
|
@@ -32,7 +32,7 @@ class TestWriteSheetView2 < Test::Unit::TestCase
|
|
32
32
|
@worksheet.freeze_panes(1, 1)
|
33
33
|
@worksheet.__send__('write_sheet_views')
|
34
34
|
result = @worksheet.instance_variable_get(:@writer).string
|
35
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="1" ySplit="1" topLeftCell="B2" activePane="bottomRight" state="frozen"
|
35
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="1" ySplit="1" topLeftCell="B2" activePane="bottomRight" state="frozen"/><selection pane="topRight" activeCell="B1" sqref="B1"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/><selection pane="bottomRight"/></sheetView></sheetViews>'
|
36
36
|
assert_equal(expected, result)
|
37
37
|
end
|
38
38
|
|
@@ -41,7 +41,7 @@ class TestWriteSheetView2 < Test::Unit::TestCase
|
|
41
41
|
@worksheet.freeze_panes('G4')
|
42
42
|
@worksheet.__send__('write_sheet_views')
|
43
43
|
result = @worksheet.instance_variable_get(:@writer).string
|
44
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozen"
|
44
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozen"/><selection pane="topRight" activeCell="G1" sqref="G1"/><selection pane="bottomLeft" activeCell="A4" sqref="A4"/><selection pane="bottomRight"/></sheetView></sheetViews>'
|
45
45
|
assert_equal(expected, result)
|
46
46
|
end
|
47
47
|
|
@@ -50,7 +50,7 @@ class TestWriteSheetView2 < Test::Unit::TestCase
|
|
50
50
|
@worksheet.freeze_panes(3, 6, 3, 6, 1)
|
51
51
|
@worksheet.__send__('write_sheet_views')
|
52
52
|
result = @worksheet.instance_variable_get(:@writer).string
|
53
|
-
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozenSplit"
|
53
|
+
expected = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="6" ySplit="3" topLeftCell="G4" activePane="bottomRight" state="frozenSplit"/><selection pane="topRight" activeCell="G1" sqref="G1"/><selection pane="bottomLeft" activeCell="A4" sqref="A4"/><selection pane="bottomRight"/></sheetView></sheetViews>';
|
54
54
|
assert_equal(expected, result)
|
55
55
|
end
|
56
56
|
end
|