View | Details | Raw Unified | Return to bug 10221
Collapse All | Expand All

(-)pyExcelerator-0.6.3a/pyExcelerator/Column.py (-1 / +1 lines)
Lines 49-55 Link Here
49
49
50
50
51
class Column(object):
51
class Column(object):
52
    @accepts(object, int, Worksheet)
52
    #accepts(object, int, Worksheet)
53
    def __init__(self, indx, parent_sheet):
53
    def __init__(self, indx, parent_sheet):
54
        self._index = indx
54
        self._index = indx
55
        self._parent = parent_sheet
55
        self._parent = parent_sheet
(-)pyExcelerator-0.6.3a/pyExcelerator/Deco.py (-2 / +2 lines)
Lines 52-59 Link Here
52
if __name__ == '__main__':
52
if __name__ == '__main__':
53
    import types 
53
    import types 
54
54
55
    @returns(types.NoneType)
55
##    @returns(types.NoneType)
56
    @accepts(int, (int,float))
56
##    @accepts(int, (int,float))
57
    def func(arg1, arg2):
57
    def func(arg1, arg2):
58
        #return str(arg1 * arg2)
58
        #return str(arg1 * arg2)
59
        pass
59
        pass
(-)pyExcelerator-0.6.3a/pyExcelerator/__init__.py (-2 / +9 lines)
Lines 5-12 Link Here
5
5
6
import sys
6
import sys
7
if sys.version_info[:2] < (2, 4):
7
if sys.version_info[:2] < (2, 4):
8
    print >>sys.stderr, "Sorry, pyExcelerator requires Python 2.4 or later"
8
    def sorted(l, cmp=None, key=None, reverse=False):
9
    sys.exit(1)
9
        tmp = list(l)
10
        tmp.sort(cmp)
11
        return tmp
12
    import __builtin__
13
    __builtin__.sorted = sorted
14
    del __builtin__
15
##    print >>sys.stderr, "Sorry, pyExcelerator requires Python 2.4 or later"
16
##    sys.exit(1)
10
17
11
18
12
from Workbook import Workbook
19
from Workbook import Workbook
(-)pyExcelerator-0.6.3a/pyExcelerator/Row.py (-3 / +3 lines)
Lines 150-156 Link Here
150
        return self.__height_in_pixels
150
        return self.__height_in_pixels
151
151
152
152
153
    @accepts(object, Style.XFStyle)
153
    #accepts(object, Style.XFStyle)
154
    def set_style(self, style):
154
    def set_style(self, style):
155
        self.__adjust_height(style)
155
        self.__adjust_height(style)
156
        self.__xf_index = self.__parent_wb.add_style(style)
156
        self.__xf_index = self.__parent_wb.add_style(style)
Lines 204-210 Link Here
204
        return self.__idx
204
        return self.__idx
205
205
206
206
207
    @accepts(object, int, (str, unicode, int, float, dt.datetime, dt.time, dt.date, ExcelFormula.Formula), Style.XFStyle)
207
    #accepts(object, int, (str, unicode, int, float, dt.datetime, dt.time, dt.date, ExcelFormula.Formula), Style.XFStyle)
208
    def write(self, col, label, style):
208
    def write(self, col, label, style):
209
        self.__adjust_height(style)
209
        self.__adjust_height(style)
210
        self.__adjust_bound_col_idx(col)
210
        self.__adjust_bound_col_idx(col)
Lines 221-227 Link Here
221
        else:
221
        else:
222
            self.__cells.extend([ Cell.FormulaCell(self, col, self.__parent_wb.add_style(style), label) ])
222
            self.__cells.extend([ Cell.FormulaCell(self, col, self.__parent_wb.add_style(style), label) ])
223
223
224
    @accepts(object, int, int, Style.XFStyle)                        
224
    #accepts(object, int, int, Style.XFStyle)                        
225
    def write_blanks(self, c1, c2, style):
225
    def write_blanks(self, c1, c2, style):
226
        self.__adjust_height(style)
226
        self.__adjust_height(style)
227
        self.__adjust_bound_col_idx(c1, c2)
227
        self.__adjust_bound_col_idx(c1, c2)
(-)pyExcelerator-0.6.3a/pyExcelerator/Workbook.py (-25 / +25 lines)
Lines 95-101 Link Here
95
    #################################################################
95
    #################################################################
96
    ## Constructor
96
    ## Constructor
97
    #################################################################
97
    #################################################################
98
    @accepts(object)
98
    #accepts(object)
99
    def __init__(self):
99
    def __init__(self):
100
        self.__owner = 'None'       
100
        self.__owner = 'None'       
101
        self.__country_code = 0x07 
101
        self.__country_code = 0x07 
Lines 133-139 Link Here
133
    ## Properties, "getters", "setters"
133
    ## Properties, "getters", "setters"
134
    #################################################################
134
    #################################################################
135
135
136
    @accepts(object, str)
136
    #accepts(object, str)
137
    def set_owner(self, value):
137
    def set_owner(self, value):
138
        self.__owner = value
138
        self.__owner = value
139
139
Lines 144-150 Link Here
144
144
145
    #################################################################
145
    #################################################################
146
146
147
    @accepts(object, int)
147
    #accepts(object, int)
148
    def set_country_code(self, value):
148
    def set_country_code(self, value):
149
        self.__country_code = value
149
        self.__country_code = value
150
150
Lines 155-161 Link Here
155
155
156
    #################################################################
156
    #################################################################
157
157
158
    @accepts(object, bool)
158
    #accepts(object, bool)
159
    def set_wnd_protect(self, value):
159
    def set_wnd_protect(self, value):
160
        self.__wnd_protect = int(value)
160
        self.__wnd_protect = int(value)
161
161
Lines 166-172 Link Here
166
166
167
    #################################################################
167
    #################################################################
168
168
169
    @accepts(object, bool)
169
    #accepts(object, bool)
170
    def set_obj_protect(self, value):
170
    def set_obj_protect(self, value):
171
        self.__obj_protect = int(value)
171
        self.__obj_protect = int(value)
172
172
Lines 177-183 Link Here
177
177
178
    #################################################################
178
    #################################################################
179
179
180
    @accepts(object, bool)
180
    #accepts(object, bool)
181
    def set_protect(self, value):
181
    def set_protect(self, value):
182
        self.__protect = int(value)
182
        self.__protect = int(value)
183
183
Lines 188-194 Link Here
188
    
188
    
189
    #################################################################
189
    #################################################################
190
190
191
    @accepts(object, bool)
191
    #accepts(object, bool)
192
    def set_backup_on_save(self, value):
192
    def set_backup_on_save(self, value):
193
        self.__backup_on_save = int(value)
193
        self.__backup_on_save = int(value)
194
194
Lines 199-205 Link Here
199
199
200
    #################################################################
200
    #################################################################
201
201
202
    @accepts(object, int)
202
    #accepts(object, int)
203
    def set_hpos(self, value):
203
    def set_hpos(self, value):
204
        self.__hpos_twips = value & 0xFFFF
204
        self.__hpos_twips = value & 0xFFFF
205
205
Lines 210-216 Link Here
210
210
211
    #################################################################
211
    #################################################################
212
212
213
    @accepts(object, int)
213
    #accepts(object, int)
214
    def set_vpos(self, value):
214
    def set_vpos(self, value):
215
        self.__vpos_twips = value & 0xFFFF
215
        self.__vpos_twips = value & 0xFFFF
216
216
Lines 221-227 Link Here
221
221
222
    #################################################################
222
    #################################################################
223
223
224
    @accepts(object, int)
224
    #accepts(object, int)
225
    def set_width(self, value):
225
    def set_width(self, value):
226
        self.__width_twips = value & 0xFFFF
226
        self.__width_twips = value & 0xFFFF
227
227
Lines 232-238 Link Here
232
232
233
    #################################################################
233
    #################################################################
234
234
235
    @accepts(object, int)
235
    #accepts(object, int)
236
    def set_height(self, value):
236
    def set_height(self, value):
237
        self.__height_twips = value & 0xFFFF
237
        self.__height_twips = value & 0xFFFF
238
238
Lines 243-249 Link Here
243
243
244
    #################################################################
244
    #################################################################
245
245
246
    @accepts(object, int)
246
    #accepts(object, int)
247
    def set_active_sheet(self, value):
247
    def set_active_sheet(self, value):
248
        self.__active_sheet = value & 0xFFFF
248
        self.__active_sheet = value & 0xFFFF
249
        self.__first_tab_index = self.__active_sheet
249
        self.__first_tab_index = self.__active_sheet
Lines 255-261 Link Here
255
255
256
    #################################################################
256
    #################################################################
257
257
258
    @accepts(object, int)
258
    #accepts(object, int)
259
    def set_tab_width(self, value):
259
    def set_tab_width(self, value):
260
        self.__tab_width_twips = value & 0xFFFF
260
        self.__tab_width_twips = value & 0xFFFF
261
261
Lines 266-272 Link Here
266
266
267
    #################################################################
267
    #################################################################
268
268
269
    @accepts(object, bool)
269
    #accepts(object, bool)
270
    def set_wnd_visible(self, value):
270
    def set_wnd_visible(self, value):
271
        self.__wnd_hidden = int(not value)
271
        self.__wnd_hidden = int(not value)
272
272
Lines 277-283 Link Here
277
277
278
    #################################################################
278
    #################################################################
279
279
280
    @accepts(object, bool)
280
    #accepts(object, bool)
281
    def set_wnd_mini(self, value):
281
    def set_wnd_mini(self, value):
282
        self.__wnd_mini = int(value)
282
        self.__wnd_mini = int(value)
283
283
Lines 288-294 Link Here
288
288
289
    #################################################################
289
    #################################################################
290
290
291
    @accepts(object, bool)
291
    #accepts(object, bool)
292
    def set_hscroll_visible(self, value):
292
    def set_hscroll_visible(self, value):
293
        self.__hscroll_visible = int(value)
293
        self.__hscroll_visible = int(value)
294
294
Lines 299-305 Link Here
299
299
300
    #################################################################
300
    #################################################################
301
301
302
    @accepts(object, bool)
302
    #accepts(object, bool)
303
    def set_vscroll_visible(self, value):
303
    def set_vscroll_visible(self, value):
304
        self.__vscroll_visible = int(value)
304
        self.__vscroll_visible = int(value)
305
305
Lines 310-316 Link Here
310
310
311
    #################################################################
311
    #################################################################
312
312
313
    @accepts(object, bool)
313
    #accepts(object, bool)
314
    def set_tabs_visible(self, value):
314
    def set_tabs_visible(self, value):
315
        self.__tabs_visible = int(value)
315
        self.__tabs_visible = int(value)
316
316
Lines 321-327 Link Here
321
321
322
    #################################################################
322
    #################################################################
323
323
324
    @accepts(object, bool)
324
    #accepts(object, bool)
325
    def set_dates_1904(self, value):
325
    def set_dates_1904(self, value):
326
        self.__dates_1904 = int(value)
326
        self.__dates_1904 = int(value)
327
327
Lines 332-338 Link Here
332
332
333
    #################################################################
333
    #################################################################
334
334
335
    @accepts(object, bool)
335
    #accepts(object, bool)
336
    def set_use_cell_values(self, value):
336
    def set_use_cell_values(self, value):
337
        self.__use_cell_values = int(value)
337
        self.__use_cell_values = int(value)
338
338
Lines 352-376 Link Here
352
    ## Methods
352
    ## Methods
353
    ##################################################################
353
    ##################################################################
354
354
355
    @accepts(object, Style.XFStyle)
355
    #accepts(object, Style.XFStyle)
356
    def add_style(self, style):
356
    def add_style(self, style):
357
        return self.__styles.add(style)
357
        return self.__styles.add(style)
358
358
359
    @accepts(object, (str, unicode))    
359
    #accepts(object, (str, unicode))    
360
    def add_str(self, s):
360
    def add_str(self, s):
361
        return self.__sst.add_str(s)
361
        return self.__sst.add_str(s)
362
        
362
        
363
    @accepts(object, str)    
363
    #accepts(object, str)    
364
    def str_index(self, s):
364
    def str_index(self, s):
365
        return self.__sst.str_index(s)
365
        return self.__sst.str_index(s)
366
        
366
        
367
    @accepts(object, (str, unicode))    
367
    #accepts(object, (str, unicode))    
368
    def add_sheet(self, sheetname):
368
    def add_sheet(self, sheetname):
369
        import Worksheet
369
        import Worksheet
370
        self.__worksheets.append(Worksheet.Worksheet(sheetname, self))
370
        self.__worksheets.append(Worksheet.Worksheet(sheetname, self))
371
        return self.__worksheets[-1]
371
        return self.__worksheets[-1]
372
372
373
    @accepts(object, int)    
373
    #accepts(object, int)    
374
    def get_sheet(self, sheetnum):
374
    def get_sheet(self, sheetnum):
375
        return self.__worksheets[sheetnum]
375
        return self.__worksheets[sheetnum]
376
        
376
        
(-)pyExcelerator-0.6.3a/pyExcelerator/Worksheet.py (-79 / +79 lines)
Lines 91-97 Link Here
91
    #################################################################
91
    #################################################################
92
    ## Constructor
92
    ## Constructor
93
    #################################################################
93
    #################################################################
94
    @accepts(object, (str, unicode), Workbook)
94
    #accepts(object, (str, unicode), Workbook)
95
    def __init__(self, sheetname, parent_book):
95
    def __init__(self, sheetname, parent_book):
96
        import Row
96
        import Row
97
        self.Row = Row.Row
97
        self.Row = Row.Row
Lines 197-203 Link Here
197
    ## Properties, "getters", "setters"
197
    ## Properties, "getters", "setters"
198
    #################################################################
198
    #################################################################
199
199
200
    @accepts(object, (str, unicode))
200
    #accepts(object, (str, unicode))
201
    def set_name(self, value):
201
    def set_name(self, value):
202
        self.__name = value
202
        self.__name = value
203
203
Lines 243-249 Link Here
243
243
244
    #################################################################
244
    #################################################################
245
245
246
    @accepts(object, bool)
246
    #accepts(object, bool)
247
    def set_show_formulas(self, value):
247
    def set_show_formulas(self, value):
248
        self.__show_formulas = int(value)
248
        self.__show_formulas = int(value)
249
249
Lines 254-260 Link Here
254
254
255
    #################################################################
255
    #################################################################
256
256
257
    @accepts(object, bool)
257
    #accepts(object, bool)
258
    def set_show_grid(self, value):
258
    def set_show_grid(self, value):
259
        self.__show_grid = int(value)
259
        self.__show_grid = int(value)
260
260
Lines 265-271 Link Here
265
265
266
    #################################################################
266
    #################################################################
267
267
268
    @accepts(object, bool)
268
    #accepts(object, bool)
269
    def set_show_headers(self, value):
269
    def set_show_headers(self, value):
270
        self.__show_headers = int(value)
270
        self.__show_headers = int(value)
271
271
Lines 276-282 Link Here
276
276
277
    #################################################################
277
    #################################################################
278
278
279
    @accepts(object, bool)
279
    #accepts(object, bool)
280
    def set_panes_frozen(self, value):
280
    def set_panes_frozen(self, value):
281
        self.__panes_frozen = int(value)
281
        self.__panes_frozen = int(value)
282
282
Lines 287-293 Link Here
287
287
288
    #################################################################
288
    #################################################################
289
289
290
    @accepts(object, bool)
290
    #accepts(object, bool)
291
    def set_show_empty_as_zero(self, value):
291
    def set_show_empty_as_zero(self, value):
292
        self.__show_empty_as_zero = int(value)
292
        self.__show_empty_as_zero = int(value)
293
293
Lines 298-304 Link Here
298
298
299
    #################################################################
299
    #################################################################
300
300
301
    @accepts(object, bool)
301
    #accepts(object, bool)
302
    def set_auto_colour_grid(self, value):
302
    def set_auto_colour_grid(self, value):
303
        self.__auto_colour_grid = int(value)
303
        self.__auto_colour_grid = int(value)
304
304
Lines 309-315 Link Here
309
309
310
    #################################################################
310
    #################################################################
311
311
312
    @accepts(object, bool)
312
    #accepts(object, bool)
313
    def set_cols_right_to_left(self, value):
313
    def set_cols_right_to_left(self, value):
314
        self.__cols_right_to_left = int(value)
314
        self.__cols_right_to_left = int(value)
315
315
Lines 320-326 Link Here
320
320
321
    #################################################################
321
    #################################################################
322
322
323
    @accepts(object, bool)
323
    #accepts(object, bool)
324
    def set_show_outline(self, value):
324
    def set_show_outline(self, value):
325
        self.__show_outline = int(value)
325
        self.__show_outline = int(value)
326
326
Lines 331-337 Link Here
331
331
332
    #################################################################
332
    #################################################################
333
333
334
    @accepts(object, bool)
334
    #accepts(object, bool)
335
    def set_remove_splits(self, value):
335
    def set_remove_splits(self, value):
336
        self.__remove_splits = int(value)
336
        self.__remove_splits = int(value)
337
337
Lines 342-348 Link Here
342
342
343
    #################################################################
343
    #################################################################
344
344
345
    @accepts(object, bool)
345
    #accepts(object, bool)
346
    def set_selected(self, value):
346
    def set_selected(self, value):
347
        self.__selected = int(value)
347
        self.__selected = int(value)
348
348
Lines 353-359 Link Here
353
353
354
    #################################################################
354
    #################################################################
355
355
356
    @accepts(object, bool)
356
    #accepts(object, bool)
357
    def set_hidden(self, value):
357
    def set_hidden(self, value):
358
        self.__hidden = int(value)
358
        self.__hidden = int(value)
359
359
Lines 364-370 Link Here
364
364
365
    #################################################################
365
    #################################################################
366
366
367
    @accepts(object, bool)
367
    #accepts(object, bool)
368
    def set_page_preview(self, value):
368
    def set_page_preview(self, value):
369
        self.__page_preview = int(value)
369
        self.__page_preview = int(value)
370
370
Lines 375-381 Link Here
375
375
376
    #################################################################
376
    #################################################################
377
377
378
    @accepts(object, int)
378
    #accepts(object, int)
379
    def set_first_visible_row(self, value):
379
    def set_first_visible_row(self, value):
380
        self.__first_visible_row = value
380
        self.__first_visible_row = value
381
381
Lines 386-392 Link Here
386
386
387
    #################################################################
387
    #################################################################
388
388
389
    @accepts(object, int)
389
    #accepts(object, int)
390
    def set_first_visible_col(self, value):
390
    def set_first_visible_col(self, value):
391
        self.__first_visible_col = value
391
        self.__first_visible_col = value
392
392
Lines 397-403 Link Here
397
397
398
    #################################################################
398
    #################################################################
399
399
400
    @accepts(object, int)
400
    #accepts(object, int)
401
    def set_grid_colour(self, value):
401
    def set_grid_colour(self, value):
402
        self.__grid_colour = value
402
        self.__grid_colour = value
403
403
Lines 408-414 Link Here
408
408
409
    #################################################################
409
    #################################################################
410
410
411
    @accepts(object, int)
411
    #accepts(object, int)
412
    def set_preview_magn(self, value):
412
    def set_preview_magn(self, value):
413
        self.__preview_magn = value
413
        self.__preview_magn = value
414
414
Lines 419-425 Link Here
419
419
420
    #################################################################
420
    #################################################################
421
421
422
    @accepts(object, int)
422
    #accepts(object, int)
423
    def set_normal_magn(self, value):
423
    def set_normal_magn(self, value):
424
        self.__normal_magn = value
424
        self.__normal_magn = value
425
425
Lines 430-436 Link Here
430
430
431
    #################################################################
431
    #################################################################
432
432
433
    @accepts(object, int)
433
    #accepts(object, int)
434
    def set_vert_split_pos(self, value):
434
    def set_vert_split_pos(self, value):
435
        self.__vert_split_pos = abs(value)
435
        self.__vert_split_pos = abs(value)
436
436
Lines 441-447 Link Here
441
441
442
    #################################################################
442
    #################################################################
443
443
444
    @accepts(object, int)
444
    #accepts(object, int)
445
    def set_horz_split_pos(self, value):
445
    def set_horz_split_pos(self, value):
446
        self.__horz_split_pos = abs(value)
446
        self.__horz_split_pos = abs(value)
447
447
Lines 452-458 Link Here
452
452
453
    #################################################################
453
    #################################################################
454
454
455
    @accepts(object, int)
455
    #accepts(object, int)
456
    def set_vert_split_first_visible(self, value):
456
    def set_vert_split_first_visible(self, value):
457
        self.__vert_split_first_visible = abs(value)
457
        self.__vert_split_first_visible = abs(value)
458
458
Lines 463-469 Link Here
463
463
464
    #################################################################
464
    #################################################################
465
465
466
    @accepts(object, int)
466
    #accepts(object, int)
467
    def set_horz_split_first_visible(self, value):
467
    def set_horz_split_first_visible(self, value):
468
        self.__horz_split_first_visible = abs(value)
468
        self.__horz_split_first_visible = abs(value)
469
469
Lines 474-480 Link Here
474
474
475
    #################################################################
475
    #################################################################
476
476
477
    #@accepts(object, int)
477
    ##accepts(object, int)
478
    #def set_split_active_pane(self, value):
478
    #def set_split_active_pane(self, value):
479
    #    self.__split_active_pane = abs(value) & 0x03
479
    #    self.__split_active_pane = abs(value) & 0x03
480
    #
480
    #
Lines 485-491 Link Here
485
485
486
    #################################################################
486
    #################################################################
487
487
488
    #@accepts(object, int)
488
    ##accepts(object, int)
489
    #def set_row_gut_width(self, value):
489
    #def set_row_gut_width(self, value):
490
    #    self.__row_gut_width = value
490
    #    self.__row_gut_width = value
491
    #
491
    #
Lines 496-502 Link Here
496
    #
496
    #
497
    #################################################################
497
    #################################################################
498
    #
498
    #
499
    #@accepts(object, int)
499
    ##accepts(object, int)
500
    #def set_col_gut_height(self, value):
500
    #def set_col_gut_height(self, value):
501
    #    self.__col_gut_height = value
501
    #    self.__col_gut_height = value
502
    #
502
    #
Lines 507-513 Link Here
507
    #
507
    #
508
    #################################################################
508
    #################################################################
509
509
510
    @accepts(object, bool)
510
    #accepts(object, bool)
511
    def set_show_auto_page_breaks(self, value):
511
    def set_show_auto_page_breaks(self, value):
512
        self.__show_auto_page_breaks = int(value)
512
        self.__show_auto_page_breaks = int(value)
513
513
Lines 518-524 Link Here
518
518
519
    #################################################################
519
    #################################################################
520
520
521
    @accepts(object, bool)
521
    #accepts(object, bool)
522
    def set_dialogue_sheet(self, value):
522
    def set_dialogue_sheet(self, value):
523
        self.__dialogue_sheet = int(value)
523
        self.__dialogue_sheet = int(value)
524
524
Lines 529-535 Link Here
529
529
530
    #################################################################
530
    #################################################################
531
531
532
    @accepts(object, bool)
532
    #accepts(object, bool)
533
    def set_auto_style_outline(self, value):
533
    def set_auto_style_outline(self, value):
534
        self.__auto_style_outline = int(value)
534
        self.__auto_style_outline = int(value)
535
535
Lines 540-546 Link Here
540
540
541
    #################################################################
541
    #################################################################
542
542
543
    @accepts(object, bool)
543
    #accepts(object, bool)
544
    def set_outline_below(self, value):
544
    def set_outline_below(self, value):
545
        self.__outline_below = int(value)
545
        self.__outline_below = int(value)
546
546
Lines 551-557 Link Here
551
551
552
    #################################################################
552
    #################################################################
553
553
554
    @accepts(object, bool)
554
    #accepts(object, bool)
555
    def set_outline_right(self, value):
555
    def set_outline_right(self, value):
556
        self.__outline_right = int(value)
556
        self.__outline_right = int(value)
557
557
Lines 562-568 Link Here
562
562
563
    #################################################################
563
    #################################################################
564
564
565
    @accepts(object, int)
565
    #accepts(object, int)
566
    def set_fit_num_pages(self, value):
566
    def set_fit_num_pages(self, value):
567
        self.__fit_num_pages = value
567
        self.__fit_num_pages = value
568
568
Lines 573-579 Link Here
573
573
574
    #################################################################
574
    #################################################################
575
575
576
    @accepts(object, bool)
576
    #accepts(object, bool)
577
    def set_show_row_outline(self, value):
577
    def set_show_row_outline(self, value):
578
        self.__show_row_outline = int(value)
578
        self.__show_row_outline = int(value)
579
579
Lines 584-590 Link Here
584
584
585
    #################################################################
585
    #################################################################
586
586
587
    @accepts(object, bool)
587
    #accepts(object, bool)
588
    def set_show_col_outline(self, value):
588
    def set_show_col_outline(self, value):
589
        self.__show_col_outline = int(value)
589
        self.__show_col_outline = int(value)
590
590
Lines 595-601 Link Here
595
595
596
    #################################################################
596
    #################################################################
597
597
598
    @accepts(object, bool)
598
    #accepts(object, bool)
599
    def set_alt_expr_eval(self, value):
599
    def set_alt_expr_eval(self, value):
600
        self.__alt_expr_eval = int(value)
600
        self.__alt_expr_eval = int(value)
601
601
Lines 606-612 Link Here
606
606
607
    #################################################################
607
    #################################################################
608
608
609
    @accepts(object, bool)
609
    #accepts(object, bool)
610
    def set_alt_formula_entries(self, value):
610
    def set_alt_formula_entries(self, value):
611
        self.__alt_formula_entries = int(value)
611
        self.__alt_formula_entries = int(value)
612
612
Lines 617-623 Link Here
617
617
618
    #################################################################
618
    #################################################################
619
619
620
    @accepts(object, int)
620
    #accepts(object, int)
621
    def set_row_default_height(self, value):
621
    def set_row_default_height(self, value):
622
        self.__row_default_height = value
622
        self.__row_default_height = value
623
623
Lines 628-634 Link Here
628
628
629
    #################################################################
629
    #################################################################
630
630
631
    @accepts(object, int)
631
    #accepts(object, int)
632
    def set_col_default_width(self, value):
632
    def set_col_default_width(self, value):
633
        self.__col_default_width = value
633
        self.__col_default_width = value
634
634
Lines 639-645 Link Here
639
639
640
    #################################################################
640
    #################################################################
641
641
642
    @accepts(object, int)
642
    #accepts(object, int)
643
    def set_calc_mode(self, value):
643
    def set_calc_mode(self, value):
644
        self.__calc_mode = value & 0x03
644
        self.__calc_mode = value & 0x03
645
645
Lines 650-656 Link Here
650
650
651
    #################################################################
651
    #################################################################
652
652
653
    @accepts(object, int)
653
    #accepts(object, int)
654
    def set_calc_count(self, value):
654
    def set_calc_count(self, value):
655
        self.__calc_count = value
655
        self.__calc_count = value
656
656
Lines 661-667 Link Here
661
661
662
    #################################################################
662
    #################################################################
663
663
664
    @accepts(object, bool)
664
    #accepts(object, bool)
665
    def set_RC_ref_mode(self, value):
665
    def set_RC_ref_mode(self, value):
666
        self.__RC_ref_mode = int(value)
666
        self.__RC_ref_mode = int(value)
667
667
Lines 672-678 Link Here
672
672
673
    #################################################################
673
    #################################################################
674
674
675
    @accepts(object, bool)
675
    #accepts(object, bool)
676
    def set_iterations_on(self, value):
676
    def set_iterations_on(self, value):
677
        self.__iterations_on = int(value)
677
        self.__iterations_on = int(value)
678
678
Lines 683-689 Link Here
683
683
684
    #################################################################
684
    #################################################################
685
685
686
    @accepts(object, float)
686
    #accepts(object, float)
687
    def set_delta(self, value):
687
    def set_delta(self, value):
688
        self.__delta = value
688
        self.__delta = value
689
689
Lines 694-700 Link Here
694
694
695
    #################################################################
695
    #################################################################
696
696
697
    @accepts(object, bool)
697
    #accepts(object, bool)
698
    def set_save_recalc(self, value):
698
    def set_save_recalc(self, value):
699
        self.__save_recalc = int(value)
699
        self.__save_recalc = int(value)
700
700
Lines 705-711 Link Here
705
705
706
    #################################################################
706
    #################################################################
707
707
708
    @accepts(object, bool)
708
    #accepts(object, bool)
709
    def set_print_headers(self, value):
709
    def set_print_headers(self, value):
710
        self.__print_headers = int(value)
710
        self.__print_headers = int(value)
711
711
Lines 716-722 Link Here
716
716
717
    #################################################################
717
    #################################################################
718
718
719
    @accepts(object, bool)
719
    #accepts(object, bool)
720
    def set_print_grid(self, value):
720
    def set_print_grid(self, value):
721
        self.__print_grid = int(value)
721
        self.__print_grid = int(value)
722
722
Lines 727-733 Link Here
727
727
728
    #################################################################
728
    #################################################################
729
    #
729
    #
730
    #@accepts(object, bool)
730
    ##accepts(object, bool)
731
    #def set_grid_set(self, value):
731
    #def set_grid_set(self, value):
732
    #    self.__grid_set = int(value)
732
    #    self.__grid_set = int(value)
733
    #
733
    #
Lines 738-744 Link Here
738
    #
738
    #
739
    #################################################################
739
    #################################################################
740
740
741
    @accepts(object, list)
741
    #accepts(object, list)
742
    def set_vert_page_breaks(self, value):
742
    def set_vert_page_breaks(self, value):
743
        self.__vert_page_breaks = value
743
        self.__vert_page_breaks = value
744
744
Lines 749-755 Link Here
749
749
750
    #################################################################
750
    #################################################################
751
751
752
    @accepts(object, list)
752
    #accepts(object, list)
753
    def set_horz_page_breaks(self, value):
753
    def set_horz_page_breaks(self, value):
754
        self.__horz_page_breaks = value
754
        self.__horz_page_breaks = value
755
755
Lines 760-766 Link Here
760
760
761
    #################################################################
761
    #################################################################
762
762
763
    @accepts(object, (str, unicode))
763
    #accepts(object, (str, unicode))
764
    def set_header_str(self, value):
764
    def set_header_str(self, value):
765
        self.__header_str = value
765
        self.__header_str = value
766
766
Lines 771-777 Link Here
771
771
772
    #################################################################
772
    #################################################################
773
773
774
    @accepts(object, (str, unicode))
774
    #accepts(object, (str, unicode))
775
    def set_footer_str(self, value):
775
    def set_footer_str(self, value):
776
        self.__footer_str = value
776
        self.__footer_str = value
777
777
Lines 782-788 Link Here
782
782
783
    #################################################################
783
    #################################################################
784
784
785
    @accepts(object, bool)
785
    #accepts(object, bool)
786
    def set_print_centered_vert(self, value):
786
    def set_print_centered_vert(self, value):
787
        self.__print_centered_vert = int(value)
787
        self.__print_centered_vert = int(value)
788
788
Lines 793-799 Link Here
793
793
794
    #################################################################
794
    #################################################################
795
795
796
    @accepts(object, bool)
796
    #accepts(object, bool)
797
    def set_print_centered_horz(self, value):
797
    def set_print_centered_horz(self, value):
798
        self.__print_centered_horz = int(value)
798
        self.__print_centered_horz = int(value)
799
799
Lines 804-810 Link Here
804
804
805
    #################################################################
805
    #################################################################
806
806
807
    @accepts(object, float)
807
    #accepts(object, float)
808
    def set_left_margin(self, value):
808
    def set_left_margin(self, value):
809
        self.__left_margin = value
809
        self.__left_margin = value
810
810
Lines 815-821 Link Here
815
815
816
    #################################################################
816
    #################################################################
817
817
818
    @accepts(object, float)
818
    #accepts(object, float)
819
    def set_right_margin(self, value):
819
    def set_right_margin(self, value):
820
        self.__right_margin = value
820
        self.__right_margin = value
821
821
Lines 826-832 Link Here
826
826
827
    #################################################################
827
    #################################################################
828
828
829
    @accepts(object, float)
829
    #accepts(object, float)
830
    def set_top_margin(self, value):
830
    def set_top_margin(self, value):
831
        self.__top_margin = value
831
        self.__top_margin = value
832
832
Lines 837-843 Link Here
837
837
838
    #################################################################
838
    #################################################################
839
839
840
    @accepts(object, float)
840
    #accepts(object, float)
841
    def set_bottom_margin(self, value):
841
    def set_bottom_margin(self, value):
842
        self.__bottom_margin = value
842
        self.__bottom_margin = value
843
843
Lines 848-854 Link Here
848
848
849
    #################################################################
849
    #################################################################
850
850
851
    @accepts(object, int)
851
    #accepts(object, int)
852
    def set_paper_size_code(self, value):
852
    def set_paper_size_code(self, value):
853
        self.__paper_size_code = value
853
        self.__paper_size_code = value
854
854
Lines 859-865 Link Here
859
859
860
    #################################################################
860
    #################################################################
861
861
862
    @accepts(object, int)
862
    #accepts(object, int)
863
    def set_print_scaling(self, value):
863
    def set_print_scaling(self, value):
864
        self.__print_scaling = value
864
        self.__print_scaling = value
865
865
Lines 870-876 Link Here
870
870
871
    #################################################################
871
    #################################################################
872
872
873
    @accepts(object, int)
873
    #accepts(object, int)
874
    def set_start_page_number(self, value):
874
    def set_start_page_number(self, value):
875
        self.__start_page_number = value
875
        self.__start_page_number = value
876
876
Lines 881-887 Link Here
881
881
882
    #################################################################
882
    #################################################################
883
883
884
    @accepts(object, int)
884
    #accepts(object, int)
885
    def set_fit_width_to_pages(self, value):
885
    def set_fit_width_to_pages(self, value):
886
        self.__fit_width_to_pages = value
886
        self.__fit_width_to_pages = value
887
887
Lines 892-898 Link Here
892
892
893
    #################################################################
893
    #################################################################
894
894
895
    @accepts(object, int)
895
    #accepts(object, int)
896
    def set_fit_height_to_pages(self, value):
896
    def set_fit_height_to_pages(self, value):
897
        self.__fit_height_to_pages = value
897
        self.__fit_height_to_pages = value
898
898
Lines 903-909 Link Here
903
903
904
    #################################################################
904
    #################################################################
905
905
906
    @accepts(object, bool)
906
    #accepts(object, bool)
907
    def set_print_in_rows(self, value):
907
    def set_print_in_rows(self, value):
908
        self.__print_in_rows = int(value)
908
        self.__print_in_rows = int(value)
909
909
Lines 914-920 Link Here
914
914
915
    #################################################################
915
    #################################################################
916
916
917
    @accepts(object, bool)
917
    #accepts(object, bool)
918
    def set_portrait(self, value):
918
    def set_portrait(self, value):
919
        self.__portrait = int(value)
919
        self.__portrait = int(value)
920
920
Lines 925-931 Link Here
925
925
926
    #################################################################
926
    #################################################################
927
927
928
    @accepts(object, bool)
928
    #accepts(object, bool)
929
    def set_print_colour(self, value):
929
    def set_print_colour(self, value):
930
        self.__print_not_colour = int(not value)
930
        self.__print_not_colour = int(not value)
931
931
Lines 936-942 Link Here
936
936
937
    #################################################################
937
    #################################################################
938
938
939
    @accepts(object, bool)
939
    #accepts(object, bool)
940
    def set_print_draft(self, value):
940
    def set_print_draft(self, value):
941
        self.__print_draft = int(value)
941
        self.__print_draft = int(value)
942
942
Lines 947-953 Link Here
947
947
948
    #################################################################
948
    #################################################################
949
949
950
    @accepts(object, bool)
950
    #accepts(object, bool)
951
    def set_print_notes(self, value):
951
    def set_print_notes(self, value):
952
        self.__print_notes = int(value)
952
        self.__print_notes = int(value)
953
953
Lines 958-964 Link Here
958
958
959
    #################################################################
959
    #################################################################
960
960
961
    @accepts(object, bool)
961
    #accepts(object, bool)
962
    def set_print_notes_at_end(self, value):
962
    def set_print_notes_at_end(self, value):
963
        self.__print_notes_at_end = int(value)
963
        self.__print_notes_at_end = int(value)
964
964
Lines 969-975 Link Here
969
969
970
    #################################################################
970
    #################################################################
971
971
972
    @accepts(object, bool)
972
    #accepts(object, bool)
973
    def set_print_omit_errors(self, value):
973
    def set_print_omit_errors(self, value):
974
        self.__print_omit_errors = int(value)
974
        self.__print_omit_errors = int(value)
975
975
Lines 980-986 Link Here
980
980
981
    #################################################################
981
    #################################################################
982
982
983
    @accepts(object, int)
983
    #accepts(object, int)
984
    def set_print_hres(self, value):
984
    def set_print_hres(self, value):
985
        self.__print_hres = value
985
        self.__print_hres = value
986
986
Lines 991-997 Link Here
991
991
992
    #################################################################
992
    #################################################################
993
993
994
    @accepts(object, int)
994
    #accepts(object, int)
995
    def set_print_vres(self, value):
995
    def set_print_vres(self, value):
996
        self.__print_vres = value
996
        self.__print_vres = value
997
997
Lines 1002-1008 Link Here
1002
1002
1003
    #################################################################
1003
    #################################################################
1004
1004
1005
    @accepts(object, float)
1005
    #accepts(object, float)
1006
    def set_header_margin(self, value):
1006
    def set_header_margin(self, value):
1007
        self.__header_margin = value
1007
        self.__header_margin = value
1008
1008
Lines 1013-1019 Link Here
1013
1013
1014
    #################################################################
1014
    #################################################################
1015
1015
1016
    @accepts(object, float)
1016
    #accepts(object, float)
1017
    def set_footer_margin(self, value):
1017
    def set_footer_margin(self, value):
1018
        self.__footer_margin = value
1018
        self.__footer_margin = value
1019
1019
Lines 1024-1030 Link Here
1024
1024
1025
    #################################################################
1025
    #################################################################
1026
1026
1027
    @accepts(object, int)
1027
    #accepts(object, int)
1028
    def set_copies_num(self, value):
1028
    def set_copies_num(self, value):
1029
        self.__copies_num = value
1029
        self.__copies_num = value
1030
1030
Lines 1035-1041 Link Here
1035
1035
1036
    ##################################################################
1036
    ##################################################################
1037
1037
1038
    @accepts(object, bool)
1038
    #accepts(object, bool)
1039
    def set_wnd_protect(self, value):
1039
    def set_wnd_protect(self, value):
1040
        self.__wnd_protect = int(value)
1040
        self.__wnd_protect = int(value)
1041
1041
Lines 1046-1052 Link Here
1046
1046
1047
    #################################################################
1047
    #################################################################
1048
1048
1049
    @accepts(object, bool)
1049
    #accepts(object, bool)
1050
    def set_obj_protect(self, value):
1050
    def set_obj_protect(self, value):
1051
        self.__obj_protect = int(value)
1051
        self.__obj_protect = int(value)
1052
1052
Lines 1057-1063 Link Here
1057
1057
1058
    #################################################################
1058
    #################################################################
1059
1059
1060
    @accepts(object, bool)
1060
    #accepts(object, bool)
1061
    def set_protect(self, value):
1061
    def set_protect(self, value):
1062
        self.__protect = int(value)
1062
        self.__protect = int(value)
1063
1063
Lines 1068-1074 Link Here
1068
1068
1069
    #################################################################
1069
    #################################################################
1070
1070
1071
    @accepts(object, bool)
1071
    #accepts(object, bool)
1072
    def set_scen_protect(self, value):
1072
    def set_scen_protect(self, value):
1073
        self.__scen_protect = int(value)
1073
        self.__scen_protect = int(value)
1074
1074
Lines 1079-1085 Link Here
1079
1079
1080
    #################################################################
1080
    #################################################################
1081
1081
1082
    @accepts(object, str)
1082
    #accepts(object, str)
1083
    def set_password(self, value):
1083
    def set_password(self, value):
1084
        self.__password = value
1084
        self.__password = value
1085
1085

Return to bug 10221