data pre-processing and replacement for ugly if condition
Authored by: grether 2012-08-02
Parent: [r20462]
Child: [r20464]