Remove unused code 

An other set of fixes for #5860.  In this pr I reviewed all unused code Scrutinizer issues. The most obvious issues are fixed in this pr. 
This should probably be re-included, as the `preDrawBarcode()` may be used in subclasses (that may be outside the framework)