surpass 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bnsignore +26 -0
- data/Rakefile +9 -0
- data/lib/surpass.rb +4 -1
- data/lib/surpass/ExcelFormula.g +74 -60
- data/lib/surpass/ExcelFormula.tokens +8 -6
- data/lib/surpass/ExcelFormulaLexer.rb +250 -123
- data/lib/surpass/ExcelFormulaParser.rb +321 -264
- data/lib/surpass/excel_magic.rb +1015 -1012
- data/lib/surpass/formula.rb +1 -0
- data/lib/surpass/row.rb +8 -0
- metadata +6 -9
- data/debug-examples/formula-cell.bin +0 -0
- data/debug-examples/formula-cell.rb +0 -14
- data/debug-examples/formula-record.bin +0 -0
- data/debug-examples/formula-record.rb +0 -15
data/lib/surpass/formula.rb
CHANGED
data/lib/surpass/row.rb
CHANGED
@@ -54,6 +54,11 @@ class Row
|
|
54
54
|
pix = (points*83.0/50.0 + 2.0/5.0).round
|
55
55
|
@height_in_pixels = pix if (pix > @height_in_pixels)
|
56
56
|
end
|
57
|
+
|
58
|
+
def set_height(height)
|
59
|
+
@height = height * 20 #This seems to correspond to row height in excel.
|
60
|
+
@height_mismatch = 1
|
61
|
+
end
|
57
62
|
|
58
63
|
def adjust_boundary_column_indexes(*args)
|
59
64
|
args.each do |a|
|
@@ -128,9 +133,12 @@ class Row
|
|
128
133
|
end
|
129
134
|
|
130
135
|
style_index = @parent_wb.styles.add(style)
|
136
|
+
|
137
|
+
raise "trying to write to cell #{self.index}, #{col} - already exists!" if cell(col)
|
131
138
|
|
132
139
|
adjust_height(style)
|
133
140
|
adjust_boundary_column_indexes(col)
|
141
|
+
|
134
142
|
case label
|
135
143
|
when TrueClass, FalseClass
|
136
144
|
@cells << BooleanCell.new(self, col, style_index, label)
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.9
|
9
|
+
version: 0.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ana Nelson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-13 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -27,8 +27,8 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 3
|
29
29
|
- 4
|
30
|
-
-
|
31
|
-
version: 3.4.
|
30
|
+
- 3
|
31
|
+
version: 3.4.3
|
32
32
|
type: :development
|
33
33
|
version_requirements: *id001
|
34
34
|
description: |-
|
@@ -51,15 +51,12 @@ extra_rdoc_files:
|
|
51
51
|
- lib/surpass/ExcelFormula.tokens
|
52
52
|
- lib/surpass/tokens.txt
|
53
53
|
files:
|
54
|
+
- .bnsignore
|
54
55
|
- History.txt
|
55
56
|
- LICENSE.txt
|
56
57
|
- README.txt
|
57
58
|
- Rakefile
|
58
59
|
- bin/surpass
|
59
|
-
- debug-examples/formula-cell.bin
|
60
|
-
- debug-examples/formula-cell.rb
|
61
|
-
- debug-examples/formula-record.bin
|
62
|
-
- debug-examples/formula-record.rb
|
63
60
|
- lib/surpass.rb
|
64
61
|
- lib/surpass/ExcelFormula.g
|
65
62
|
- lib/surpass/ExcelFormula.tokens
|
Binary file
|
Binary file
|