/trunk/Scribus/scribus/pageitem_table.h |
---|
702,7 → 702,7 |
// Undo/redo row height action |
void restoreTableRowHeight(SimpleState *state, bool isUndo); |
// Undo/redo column widht action |
// Undo/redo column width action |
void restoreTableColumnWidth(SimpleState *state, bool isUndo); |
private: |
/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps |
---|
19969,7 → 19969,7 |
/fid () def |
} ifelse |
% Read the postcode, country code and service code fields seperated by GS |
% Read the postcode, country code and service code fields separated by GS |
barcode <1d> search pop /pcode exch def |
pop <1d> search pop /ccode exch def |
pop <1d> search pop /scode exch def |
20408,7 → 20408,7 |
% Recompose the secondary parity codewords |
/secchk [ 0 1 scodes 1 sub { dup secochk exch get exch secechk exch get } for ] def |
% Concatinate the data into final codewords |
% Concatenate the data into final codewords |
/codewords [ |
pri aload pop |
pri 10 rscodes aload pop |
23996,7 → 23996,7 |
} if |
% Check for groups of blank rows unless data is encoded horizontally |
% in a symbol of sufficent width to overcome up to six consecutive 0s |
% in a symbol of sufficient width to overcome up to six consecutive 0s |
% in two neighbouring 5 of 9 dot patterns |
rows 2 mod 0 eq columns 12 le or { |
/sum 0 def /p 0 def |
/trunk/Scribus/scribus/plugins/scripter/python/safe_eval.py |
---|
472,17 → 472,17 |
def test_lowlevel(self): |
# lowlevel tricks to access 'object' |
self.assertRaises(SafeEvalException, \ |
timed_safe_eval, "().__class__.mro()[1].__subclasses__()") |
def test_timeout_ok(self): |
# attempt to exectute 'slow' code which finishes within timelimit |
def test(): time.sleep(2) |
env = {'test':test} |
timed_safe_eval("test()", env, timeout_secs = 5) |
def test_timeout_exceed(self): |
# attempt to exectute code which never teminates |
self.assertRaises(SafeEvalException, \ |
timed_safe_eval, "().__class__.mro()[1].__subclasses__()") |
def test_timeout_ok(self): |
# attempt to execute 'slow' code which finishes within timelimit |
def test(): time.sleep(2) |
env = {'test':test} |
timed_safe_eval("test()", env, timeout_secs = 5) |
def test_timeout_exceed(self): |
# attempt to execute code which never teminates |
self.assertRaises(SafeEvalException, \ |
timed_safe_eval, "while 1: pass") |
def test_invalid_context(self): |
/trunk/Scribus/scribus/plugins/scripter/python/scripter_runtime.py |
---|
161,13 → 161,13 |
h = hash_source(filename, code) |
if runtime_config.has_option("permissions", h): |
return runtime_config.getbool("permissions", h) |
problems = checkCode(code) |
if problems and len(problems) == 1 and isinstance(problems[0], SyntaxError): |
return True # let's ignore it and let excepthook hande the error later |
elif problems: |
ok = permitdlg.ask(filename, problems) |
if ok == -2: # deny and remember |
problems = checkCode(code) |
if problems and len(problems) == 1 and isinstance(problems[0], SyntaxError): |
return True # let's ignore it and let excepthook handle the error later |
elif problems: |
ok = permitdlg.ask(filename, problems) |
if ok == -2: # deny and remember |
runtime_config.set("permissions", h, False) |
return False |
elif ok == 2: # deny |
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/FontSample.py |
---|
707,16 → 707,16 |
set_odd_even(pageNum) |
lineHeight = 1 # include the one point of space below top margin |
lineHeight = lineHeight + draw_horiz_line(0, dD['paperLeftSide'], dD['paperLeftSide'] + dD['paperTextWidth'], 1) |
usuableArea = dD['paperHeight'] - \ |
dD['paperTopMargin'] - \ |
lineHeight - \ |
dD['paperBottomMargin'] - \ |
dD['paperPageNumVertOffset'] |
usableArea = dD['paperHeight'] - \ |
dD['paperTopMargin'] - \ |
lineHeight - \ |
dD['paperBottomMargin'] - \ |
dD['paperPageNumVertOffset'] |
blockHeight = draw_sample_block(fontList[0], dD['paperLeftSide'], 0, dD['paperTextWidth'], 1) |
pageBlocks = int(usuableArea / blockHeight) |
pageBlocks = int(usableArea / blockHeight) |
#print blockHeight |
#print "Usuable area %s points high" % usuableArea |
#print "Usable area %s points high" % usableArea |
#print "Used space on page is %s points high" % (blockHeight * pageBlocks) |
if not getSizeOnly: |
/trunk/Scribus/scribus/ui/query.cpp |
---|
130,6 → 130,6 |
void Query::setValidator(const QRegularExpression& rx) |
{ |
QValidator* vaild = new QRegularExpressionValidator( rx, this ); |
answerEdit->setValidator(vaild); |
QValidator* valid = new QRegularExpressionValidator( rx, this ); |
answerEdit->setValidator(valid); |
} |