private float pValidateSectionAspecAux(float top, cReportSection sec) {
cReportSectionLine secLn = null;
float topLn = 0;
int i = 0;
float secLnHeight = 0;
float width = 0;
cReportPaperInfo w_paperInfo = m_report.getPaperInfo();
width = CSReportPaint.cGlobals.getRectFromPaperSize(
m_report.getPaperInfo(),
w_paperInfo.getPaperSize(),
w_paperInfo.getOrientation()).Width;
topLn = top;
cReportAspect w_aspect;
for (i = 1; i <= sec.getSectionLines().count() - 1; i++) {
secLn = sec.getSectionLines().item(i);
w_aspect = secLn.getAspect();
w_aspect.setTop(topLn);
w_aspect.setWidth(width);
if (w_aspect.getHeight() < C_MIN_HEIGHT_SECTION) {
w_aspect.setHeight(C_MIN_HEIGHT_SECTION);
}
topLn = topLn + w_aspect.getHeight();
secLnHeight = secLnHeight + w_aspect.getHeight();
}
cReportSectionLines w_sectionLines = sec.getSectionLines();
secLn = w_sectionLines.item(w_sectionLines.count());
w_aspect = secLn.getAspect();
w_aspect.setTop(topLn);
w_aspect.setHeight(sec.getAspect().getHeight() - secLnHeight);
if (w_aspect.getHeight() < C_MIN_HEIGHT_SECTION) {
w_aspect.setHeight(C_MIN_HEIGHT_SECTION);
}
secLnHeight = secLnHeight + w_aspect.getHeight();
w_aspect = sec.getAspect();
w_aspect.setHeight(secLnHeight);
if (w_aspect.getHeight() < C_MIN_HEIGHT_SECTION) {
w_aspect.setHeight(C_MIN_HEIGHT_SECTION);
}
w_aspect.setWidth(width);
w_aspect.setTop(top);
topLn = top;
top = top + w_aspect.getHeight();
pChangeTopSection(sec, 0, false, false);
return top;
}