Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportHTMLTableRenderer_p.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 84 | { | |||
---|---|---|---|---|---|
92 | QDir d(m_tempDirName); | 92 | QDir d(m_tempDirName); | ||
93 | 93 | | |||
94 | // Render Each Section | 94 | // Render Each Section | ||
95 | body = QLatin1String("<table>\n"); | 95 | body = QLatin1String("<table>\n"); | ||
96 | for (int s = 0; s < document->sectionCount(); s++) { | 96 | for (int s = 0; s < document->sectionCount(); s++) { | ||
97 | OROSection *section = document->section(s); | 97 | OROSection *section = document->section(s); | ||
98 | section->sortPrimitives(Qt::Horizontal); | 98 | section->sortPrimitives(Qt::Horizontal); | ||
99 | 99 | | |||
100 | if (section->type() == KReportSectionData::GroupHeader || | 100 | if (section->type() == KReportSectionData::Type::GroupHeader | ||
101 | section->type() == KReportSectionData::GroupFooter || | 101 | || section->type() == KReportSectionData::Type::GroupFooter | ||
102 | section->type() == KReportSectionData::Detail || | 102 | || section->type() == KReportSectionData::Type::Detail | ||
103 | section->type() == KReportSectionData::ReportHeader || | 103 | || section->type() == KReportSectionData::Type::ReportHeader | ||
104 | section->type() == KReportSectionData::ReportFooter || | 104 | || section->type() == KReportSectionData::Type::ReportFooter | ||
105 | (section->type() == KReportSectionData::PageHeaderAny && !renderedPageHeader) || | 105 | || (section->type() == KReportSectionData::Type::PageHeaderAny && !renderedPageHeader) | ||
106 | (section->type() == KReportSectionData::PageFooterAny && !renderedPageFooter && s > document->sectionCount() - 2)) { //render the page foot right at the end, it will either be the last or second last section if there is a report footer | 106 | || (section->type() == KReportSectionData::Type::PageFooterAny && !renderedPageFooter | ||
107 | if (section->type() == KReportSectionData::PageHeaderAny) | 107 | && s > document->sectionCount() - 2)) | ||
108 | { // render the page foot right at the end, it | ||||
109 | // will either be the last or second last | ||||
110 | // section if there is a report footer | ||||
111 | if (section->type() == KReportSectionData::Type::PageHeaderAny) | ||||
108 | renderedPageHeader = true; | 112 | renderedPageHeader = true; | ||
109 | 113 | | |||
110 | if (section->type() == KReportSectionData::PageFooterAny) | 114 | if (section->type() == KReportSectionData::Type::PageFooterAny) | ||
111 | renderedPageFooter = true; | 115 | renderedPageFooter = true; | ||
112 | 116 | | |||
113 | tr = QLatin1String("<tr style=\"background-color: ") + section->backgroundColor().name() + QLatin1String("\">\n"); | 117 | tr = QLatin1String("<tr style=\"background-color: ") + section->backgroundColor().name() + QLatin1String("\">\n"); | ||
114 | //Render the objects in each section | 118 | //Render the objects in each section | ||
115 | for (int i = 0; i < section->primitiveCount(); i++) { | 119 | for (int i = 0; i < section->primitiveCount(); i++) { | ||
116 | OROPrimitive * prim = section->primitive(i); | 120 | OROPrimitive * prim = section->primitive(i); | ||
117 | 121 | | |||
118 | if (OROTextBox *tb = dynamic_cast<OROTextBox*>(prim)) { | 122 | if (OROTextBox *tb = dynamic_cast<OROTextBox*>(prim)) { | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |