Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportPreRenderer.cpp
Show All 16 Lines | |||||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #include "KReportPreRenderer.h" | 19 | #include "KReportPreRenderer.h" | ||
20 | #include "KReportPreRenderer_p.h" | 20 | #include "KReportPreRenderer_p.h" | ||
21 | #include "KReportAsyncItemManager_p.h" | 21 | #include "KReportAsyncItemManager_p.h" | ||
22 | #include "KReportOneRecordData_p.h" | 22 | #include "KReportOneRecordData_p.h" | ||
23 | 23 | | |||
24 | #include "KReportRenderObjects.h" | 24 | #include "KReportRenderObjects.h" | ||
25 | #include "KReportData.h" | 25 | #include "KReportDataSource.h" | ||
26 | #include "KReportItemBase.h" | 26 | #include "KReportItemBase.h" | ||
27 | #include "KReportDocument.h" | 27 | #include "KReportDocument.h" | ||
28 | #include "KReportDetailSectionData.h" | 28 | #include "KReportDetailSectionData.h" | ||
29 | #include "KReportLabelSizeInfo.h" | 29 | #include "KReportLabelSizeInfo.h" | ||
30 | #include "KReportPageSize.h" | 30 | #include "KReportPageSize.h" | ||
31 | #include "KReportUtils_p.h" | 31 | #include "KReportUtils_p.h" | ||
32 | 32 | | |||
33 | #ifdef KREPORT_SCRIPTING | 33 | #ifdef KREPORT_SCRIPTING | ||
▲ Show 20 Lines • Show All 490 Lines • ▼ Show 20 Line(s) | 521 | if (!m_reportDocument->pageLayout().orientation() == QPageLayout::Portrait) { | |||
524 | h = (label.width() / 100.0); | 524 | h = (label.width() / 100.0); | ||
525 | hg = (label.xGap() / 100.0); | 525 | hg = (label.xGap() / 100.0); | ||
526 | numCols = label.rows(); | 526 | numCols = label.rows(); | ||
527 | numRows = label.columns(); | 527 | numRows = label.columns(); | ||
528 | } | 528 | } | ||
529 | 529 | | |||
530 | KReportDetailSectionData * detailData = m_reportDocument->m_detailSection; | 530 | KReportDetailSectionData * detailData = m_reportDocument->m_detailSection; | ||
531 | if (detailData->m_detailSection) { | 531 | if (detailData->m_detailSection) { | ||
532 | KReportData *mydata = m_kodata; | 532 | KReportDataSource *mydata = m_kodata; | ||
533 | 533 | | |||
534 | if (mydata && mydata->recordCount() > 0) { /* && !((query = orqThis->getQuery())->eof()))*/ | 534 | if (mydata && mydata->recordCount() > 0) { /* && !((query = orqThis->getQuery())->eof()))*/ | ||
535 | if (!mydata->moveFirst()) { | 535 | if (!mydata->moveFirst()) { | ||
536 | return false; | 536 | return false; | ||
537 | } | 537 | } | ||
538 | int row = 0; | 538 | int row = 0; | ||
539 | int col = 0; | 539 | int col = 0; | ||
540 | do { | 540 | do { | ||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | |||||
650 | // delete d->m_document; | 650 | // delete d->m_document; | ||
651 | if (!d->generateDocument()) { | 651 | if (!d->generateDocument()) { | ||
652 | delete d->m_document; | 652 | delete d->m_document; | ||
653 | d->m_document = 0; | 653 | d->m_document = 0; | ||
654 | } | 654 | } | ||
655 | return d->m_document; | 655 | return d->m_document; | ||
656 | } | 656 | } | ||
657 | 657 | | |||
658 | void KReportPreRenderer::setSourceData(KReportData *data) | 658 | void KReportPreRenderer::setSourceData(KReportDataSource *data) | ||
staniek: data -> dataSource | |||||
659 | { | 659 | { | ||
660 | if (d && data != d->m_kodata) { | 660 | if (d && data != d->m_kodata) { | ||
661 | delete d->m_kodata; | 661 | delete d->m_kodata; | ||
662 | d->m_kodata = data; | 662 | d->m_kodata = data; | ||
663 | } | 663 | } | ||
664 | } | 664 | } | ||
665 | 665 | | |||
666 | bool KReportPreRenderer::setDocument(const QDomElement &document) | 666 | bool KReportPreRenderer::setDocument(const QDomElement &document) | ||
Show All 31 Lines |
data -> dataSource