mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Finish 1.4.111
# Conflicts: # limereport/lrreportrender.cpp
This commit is contained in:
commit
94305e85eb
@ -120,7 +120,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 4
|
LIMEREPORT_VERSION_MINOR = 4
|
||||||
LIMEREPORT_VERSION_RELEASE = 110
|
LIMEREPORT_VERSION_RELEASE = 111
|
||||||
|
|
||||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||||
|
@ -381,7 +381,7 @@ int BandDesignIntf::maxChildIndex(BandDesignIntf::BandsType bandType) const{
|
|||||||
int BandDesignIntf::maxChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands) const{
|
int BandDesignIntf::maxChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands) const{
|
||||||
int curIndex = bandIndex();
|
int curIndex = bandIndex();
|
||||||
foreach(BandDesignIntf* childBand, childBands()){
|
foreach(BandDesignIntf* childBand, childBands()){
|
||||||
if (!ignoredBands.contains(childBand->bandType()) && childBand->bandIndex()>bandIndex()){
|
if (!ignoredBands.contains(childBand->bandType())){
|
||||||
curIndex = std::max(curIndex,childBand->maxChildIndex(ignoredBands));
|
curIndex = std::max(curIndex,childBand->maxChildIndex(ignoredBands));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,17 +225,22 @@ int PageItemDesignIntf::calcBandIndex(BandDesignIntf::BandsType bandType, BandDe
|
|||||||
|
|
||||||
int bandIndex=-1;
|
int bandIndex=-1;
|
||||||
qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex);
|
qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex);
|
||||||
foreach(BandDesignIntf* band,m_bands){
|
if (bandType != BandDesignIntf::Data){
|
||||||
if ((band->bandType() == BandDesignIntf::GroupHeader) && ( band->bandType() > bandType)) break;
|
foreach(BandDesignIntf* band,m_bands){
|
||||||
if ((band->bandType() <= bandType)){
|
if ((band->bandType() == BandDesignIntf::GroupHeader) && ( band->bandType() > bandType)) break;
|
||||||
if (bandIndex <= band->bandIndex()) {
|
if ((band->bandType() <= bandType)){
|
||||||
if (bandType != BandDesignIntf::Data){
|
if (bandIndex <= band->bandIndex()) {
|
||||||
bandIndex=band->maxChildIndex(bandType)+1;
|
bandIndex=band->maxChildIndex(bandType)+1;
|
||||||
} else {
|
|
||||||
bandIndex=band->maxChildIndex()+1;
|
|
||||||
}
|
}
|
||||||
}
|
} else { increaseBandIndex = true; break;}
|
||||||
} else { increaseBandIndex = true; break;}
|
}
|
||||||
|
} else {
|
||||||
|
int maxChildIndex = 0;
|
||||||
|
foreach(BandDesignIntf* band, m_bands){
|
||||||
|
if (band->bandType() == BandDesignIntf::Data)
|
||||||
|
maxChildIndex = std::max(maxChildIndex, band->maxChildIndex());
|
||||||
|
}
|
||||||
|
bandIndex = std::max(bandIndex, maxChildIndex+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bandIndex==-1) {
|
if (bandIndex==-1) {
|
||||||
|
@ -789,22 +789,11 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
|||||||
if (gb&&gb->isNeedToClose(datasources())){
|
if (gb&&gb->isNeedToClose(datasources())){
|
||||||
if (band->childBands().count()>0){
|
if (band->childBands().count()>0){
|
||||||
bool didGoBack = dataSource->prior();
|
bool didGoBack = dataSource->prior();
|
||||||
foreach (BandDesignIntf* subBand, band->childrenByType(BandDesignIntf::GroupHeader)) {
|
renderGroupFooterByHeader(band);
|
||||||
foreach(BandDesignIntf* footer, subBand->childrenByType(BandDesignIntf::GroupFooter)){
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
closeDataGroup(subBand);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)) {
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (didGoBack){
|
if (didGoBack){
|
||||||
dataSource->next();
|
dataSource->next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closeDataGroup(band);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gb && !gb->isStarted()){
|
if (gb && !gb->isStarted()){
|
||||||
@ -834,13 +823,14 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReportRender::renderGroupFooterByHeader(BandDesignIntf* groupHeader){
|
void ReportRender::renderGroupFooterByHeader(BandDesignIntf* groupHeader){
|
||||||
|
if (groupHeader->reprintOnEachPage()) m_reprintableBands.removeOne(groupHeader);
|
||||||
foreach (BandDesignIntf* header, groupHeader->childrenByType(BandDesignIntf::GroupHeader)){
|
foreach (BandDesignIntf* header, groupHeader->childrenByType(BandDesignIntf::GroupHeader)){
|
||||||
renderGroupFooterByHeader(header);
|
renderGroupFooterByHeader(header);
|
||||||
}
|
}
|
||||||
foreach (BandDesignIntf* footer, groupHeader->childrenByType(BandDesignIntf::GroupFooter)){
|
foreach (BandDesignIntf* footer, groupHeader->childrenByType(BandDesignIntf::GroupFooter)){
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
renderBand(footer, 0, StartNewPageAsNeeded);
|
||||||
}
|
}
|
||||||
recalcIfNeeded(groupHeader);
|
closeDataGroup(groupHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
||||||
@ -848,14 +838,7 @@ void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
|||||||
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
|
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
|
||||||
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
||||||
if (gb && gb->isStarted()){
|
if (gb && gb->isStarted()){
|
||||||
if (band->reprintOnEachPage()) m_reprintableBands.removeOne(band);
|
renderGroupFooterByHeader(band);
|
||||||
foreach(BandDesignIntf* header, band->childrenByType(BandDesignIntf::GroupHeader)){
|
|
||||||
renderGroupFooterByHeader(header);
|
|
||||||
}
|
|
||||||
foreach(BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)){
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
closeDataGroup(band);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user