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