Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSectionDetail.cpp
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU Lesser General Public | 15 | * You should have received a copy of the GNU Lesser General Public | ||
16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #include "KReportDesignerSectionDetail.h" | 19 | #include "KReportDesignerSectionDetail.h" | ||
20 | #include "KReportDesignerSectionDetailGroup.h" | 20 | #include "KReportDesignerSectionDetailGroup.h" | ||
21 | #include "KReportDesignerSection.h" | 21 | #include "KReportDesignerSection.h" | ||
22 | #include "KReportDesigner.h" | 22 | #include "KReportDesigner.h" | ||
23 | #include "KReportUtils.h" | ||||
23 | #include "kreport_debug.h" | 24 | #include "kreport_debug.h" | ||
24 | 25 | | |||
25 | #include <QVBoxLayout> | 26 | #include <QVBoxLayout> | ||
26 | #include <QDomDocument> | 27 | #include <QDomDocument> | ||
27 | 28 | | |||
28 | //! @internal | 29 | //! @internal | ||
29 | class Q_DECL_HIDDEN KReportDesignerSectionDetail::Private | 30 | class Q_DECL_HIDDEN KReportDesignerSectionDetail::Private | ||
30 | { | 31 | { | ||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 108 | for (int i = 0; i < nl.count(); i++) { | |||
111 | if (n == QLatin1String("pagebreak")) { | 112 | if (n == QLatin1String("pagebreak")) { | ||
112 | QDomElement eThis = node.toElement(); | 113 | QDomElement eThis = node.toElement(); | ||
113 | if (eThis.attribute(QLatin1String("when")) == QLatin1String("at end")) | 114 | if (eThis.attribute(QLatin1String("when")) == QLatin1String("at end")) | ||
114 | setPageBreak(BreakAtEnd); | 115 | setPageBreak(BreakAtEnd); | ||
115 | } else if (n == QLatin1String("report:group")) { | 116 | } else if (n == QLatin1String("report:group")) { | ||
116 | KReportDesignerSectionDetailGroup * rsdg = new KReportDesignerSectionDetailGroup(QLatin1String("unnamed"), this, this); | 117 | KReportDesignerSectionDetailGroup * rsdg = new KReportDesignerSectionDetailGroup(QLatin1String("unnamed"), this, this); | ||
117 | rsdg->initFromXML( node.toElement() ); | 118 | rsdg->initFromXML( node.toElement() ); | ||
118 | insertGroupSection(groupSectionCount(), rsdg); | 119 | insertGroupSection(groupSectionCount(), rsdg); | ||
119 | } else if (n == QLatin1String("report:section") && node.toElement().attribute(QLatin1String("report:section-type")) == QLatin1String("detail")) { | 120 | } else if (n == QLatin1String("report:section") | ||
121 | && KReportUtils::readSectionTypeNameAttribute(node.toElement()) == QLatin1String("detail")) | ||||
122 | { | ||||
120 | //kreportDebug() << "Creating detail section"; | 123 | // kreportDebug() << "Creating detail section"; | ||
121 | d->detail->initFromXML(node); | 124 | d->detail->initFromXML(node); | ||
122 | } else { | 125 | } else { | ||
123 | // unknown element | 126 | // unknown element | ||
124 | kreportWarning() << "while parsing section encountered and unknown element: " << n; | 127 | kreportWarning() << "while parsing section encountered and unknown element: " << n; | ||
125 | } | 128 | } | ||
126 | } | 129 | } | ||
127 | 130 | | |||
128 | } | 131 | } | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |