Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportPreRenderer.cpp
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Line(s) | 323 | { | |||
---|---|---|---|---|---|
378 | 378 | | |||
379 | return sectionHeight; | 379 | return sectionHeight; | ||
380 | } | 380 | } | ||
381 | 381 | | |||
382 | #ifdef KREPORT_SCRIPTING | 382 | #ifdef KREPORT_SCRIPTING | ||
383 | void KReportPreRendererPrivate::initEngine() | 383 | void KReportPreRendererPrivate::initEngine() | ||
384 | { | 384 | { | ||
385 | delete m_scriptHandler; | 385 | delete m_scriptHandler; | ||
386 | m_scriptHandler = new KReportScriptHandler(m_dataSource, m_reportDocument); | 386 | m_scriptHandler = new KReportScriptHandler(m_dataSource, scriptSource, m_reportDocument); | ||
387 | 387 | | |||
388 | connect(this, SIGNAL(enteredGroup(QString,QVariant)), m_scriptHandler, SLOT(slotEnteredGroup(QString,QVariant))); | 388 | connect(this, SIGNAL(enteredGroup(QString,QVariant)), m_scriptHandler, SLOT(slotEnteredGroup(QString,QVariant))); | ||
389 | 389 | | |||
390 | connect(this, SIGNAL(exitedGroup(QString,QVariant)), m_scriptHandler, SLOT(slotExitedGroup(QString,QVariant))); | 390 | connect(this, SIGNAL(exitedGroup(QString,QVariant)), m_scriptHandler, SLOT(slotExitedGroup(QString,QVariant))); | ||
391 | 391 | | |||
392 | connect(this, SIGNAL(renderingSection(KReportSectionData*,OROPage*,QPointF)), m_scriptHandler, SLOT(slotEnteredSection(KReportSectionData*,OROPage*,QPointF))); | 392 | connect(this, SIGNAL(renderingSection(KReportSectionData*,OROPage*,QPointF)), m_scriptHandler, SLOT(slotEnteredSection(KReportSectionData*,OROPage*,QPointF))); | ||
393 | } | 393 | } | ||
394 | #endif | 394 | #endif | ||
▲ Show 20 Lines • Show All 263 Lines • ▼ Show 20 Line(s) | |||||
658 | void KReportPreRenderer::setSourceData(KReportDataSource *dataSource) | 658 | void KReportPreRenderer::setSourceData(KReportDataSource *dataSource) | ||
659 | { | 659 | { | ||
660 | if (d && dataSource != d->m_dataSource) { | 660 | if (d && dataSource != d->m_dataSource) { | ||
661 | delete d->m_dataSource; | 661 | delete d->m_dataSource; | ||
662 | d->m_dataSource = dataSource; | 662 | d->m_dataSource = dataSource; | ||
663 | } | 663 | } | ||
664 | } | 664 | } | ||
665 | 665 | | |||
666 | void KReportPreRenderer::setScriptSource(KReportScriptSource *source) | ||||
667 | { | ||||
668 | if (d) { | ||||
669 | d->scriptSource = source; | ||||
670 | } | ||||
671 | } | ||||
672 | | ||||
673 | | ||||
666 | bool KReportPreRenderer::setDocument(const QDomElement &document) | 674 | bool KReportPreRenderer::setDocument(const QDomElement &document) | ||
667 | { | 675 | { | ||
668 | delete d->m_document; | 676 | delete d->m_document; | ||
669 | d->m_valid = false; | 677 | d->m_valid = false; | ||
670 | 678 | | |||
671 | if (document.tagName() != QLatin1String("report:content")) { | 679 | if (document.tagName() != QLatin1String("report:content")) { | ||
672 | kreportWarning() << "report schema is invalid"; | 680 | kreportWarning() << "report schema is invalid"; | ||
673 | return false; | 681 | return false; | ||
Show All 24 Lines |