Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerSectionDetailGroup.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 "KReportDesignerSectionDetailGroup.h" | 19 | #include "KReportDesignerSectionDetailGroup.h" | ||
20 | #include "KReportDesigner.h" | 20 | #include "KReportDesigner.h" | ||
21 | #include "KReportDesignerSection.h" | 21 | #include "KReportDesignerSection.h" | ||
22 | #include "KReportDesignerSectionDetail.h" | 22 | #include "KReportDesignerSectionDetail.h" | ||
23 | #include "KReportUtils.h" | ||||
23 | #include "kreport_debug.h" | 24 | #include "kreport_debug.h" | ||
24 | 25 | | |||
25 | #include <QDomElement> | 26 | #include <QDomElement> | ||
26 | #include <QDomDocument> | 27 | #include <QDomDocument> | ||
27 | 28 | | |||
28 | //! @internal | 29 | //! @internal | ||
29 | class Q_DECL_HIDDEN KReportDesignerSectionDetailGroup::Private | 30 | class Q_DECL_HIDDEN KReportDesignerSectionDetailGroup::Private | ||
30 | { | 31 | { | ||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 111 | { | |||
124 | if (element.attribute(QLatin1String("report:group-sort"), QLatin1String("ascending")) == QLatin1String("ascending")) { | 125 | if (element.attribute(QLatin1String("report:group-sort"), QLatin1String("ascending")) == QLatin1String("ascending")) { | ||
125 | setSort(Qt::AscendingOrder); | 126 | setSort(Qt::AscendingOrder); | ||
126 | } | 127 | } | ||
127 | else { | 128 | else { | ||
128 | setSort(Qt::DescendingOrder); | 129 | setSort(Qt::DescendingOrder); | ||
129 | } | 130 | } | ||
130 | 131 | | |||
131 | for ( QDomElement e = element.firstChildElement( QLatin1String("report:section") ); ! e.isNull(); e = e.nextSiblingElement( QLatin1String("report:section") ) ) { | 132 | for ( QDomElement e = element.firstChildElement( QLatin1String("report:section") ); ! e.isNull(); e = e.nextSiblingElement( QLatin1String("report:section") ) ) { | ||
132 | QString s = e.attribute( QLatin1String("report:section-type") ); | 133 | const QString s = KReportUtils::readSectionTypeNameAttribute(e); | ||
133 | if ( s == QLatin1String("group-header") ) { | 134 | if ( s == QLatin1String("group-header") ) { | ||
134 | setGroupHeaderVisible( true ); | 135 | setGroupHeaderVisible( true ); | ||
135 | d->groupHeader->initFromXML( e ); | 136 | d->groupHeader->initFromXML( e ); | ||
136 | } else if ( s == QLatin1String("group-footer") ) { | 137 | } else if ( s == QLatin1String("group-footer") ) { | ||
137 | setGroupFooterVisible( true ); | 138 | setGroupFooterVisible( true ); | ||
138 | d->groupFooter->initFromXML( e ); | 139 | d->groupFooter->initFromXML( e ); | ||
139 | } | 140 | } | ||
140 | } | 141 | } | ||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |