Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportPluginInterface.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | |||||
61 | { | 61 | { | ||
62 | d->metaData = metaData; | 62 | d->metaData = metaData; | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | bool KReportPluginInterface::loadElement(KReportElement *el, const QDomElement &dom, KReportDesignReadingStatus *status) | 65 | bool KReportPluginInterface::loadElement(KReportElement *el, const QDomElement &dom, KReportDesignReadingStatus *status) | ||
66 | { | 66 | { | ||
67 | Q_ASSERT(el); | 67 | Q_ASSERT(el); | ||
68 | Q_UNUSED(status); | 68 | Q_UNUSED(status); | ||
69 | el->setName(KReportUtils::attr(dom, "report:name", QString())); | 69 | el->setName(KReportUtils::readNameAttribute(dom)); | ||
70 | el->setRect(KReportUtils::readRectAttributes(dom, el->rect())); | 70 | el->setRect(KReportUtils::readRectAttributes(dom, el->rect())); | ||
71 | el->setZ(KReportUtils::attr(dom, "report:z-index", el->z())); | 71 | el->setZ(KReportUtils::readZAttribute(dom, el->z())); | ||
72 | 72 | | |||
73 | const QDomElement textStyleDom = dom.firstChildElement(QLatin1String("report:text-style")); | 73 | const QDomElement textStyleDom | ||
74 | el->setForegroundColor(KReportUtils::attr(textStyleDom, "fo:foreground-color", el->foregroundColor())); | 74 | = dom.firstChildElement(QLatin1String("report:text-style")); | ||
75 | el->setBackgroundColor(KReportUtils::attr(textStyleDom, "fo:background-color", el->backgroundColor())); | 75 | el->setForegroundColor(KReportUtils::attr( | ||
76 | el->setBackgroundOpacity(KReportUtils::attrPercent(textStyleDom, "fo:background-opacity", el->backgroundOpacity())); | 76 | textStyleDom, QLatin1String("fo:foreground-color"), el->foregroundColor())); | ||
77 | el->setBackgroundColor(KReportUtils::attr( | ||||
78 | textStyleDom, QLatin1String("fo:background-color"), el->backgroundColor())); | ||||
79 | el->setBackgroundOpacity(KReportUtils::attrPercent( | ||||
80 | textStyleDom, QLatin1String("fo:background-opacity"), el->backgroundOpacity())); | ||||
77 | return true; | 81 | return true; | ||
78 | } | 82 | } |