The previous implementation did not take the headers and footers
into account when resizing the diagram.
The implementation has been taken from AbstractArea::paintIntoRectArea().
This patch adds the method PrintingParameters::scaleFactor(), because
in branch 2.6 the class member PrintingParameters::scaleFactor was made
private.
BUG:405075
FIXED-IN:2.6.2