mirror of
				https://github.com/fralx/LimeReport.git
				synced 2025-11-04 07:01:26 +03:00 
			
		
		
		
	checkLostHeadersInPrevColumn() has been added
This commit is contained in:
		@@ -1201,6 +1201,7 @@ BandDesignIntf *ReportRender::renderData(BandDesignIntf *patternBand)
 | 
				
			|||||||
void ReportRender::startNewColumn(){
 | 
					void ReportRender::startNewColumn(){
 | 
				
			||||||
    if (m_currentColumn < m_maxHeightByColumn.size()-1){
 | 
					    if (m_currentColumn < m_maxHeightByColumn.size()-1){
 | 
				
			||||||
        m_currentColumn++;
 | 
					        m_currentColumn++;
 | 
				
			||||||
 | 
					        checkLostHeadersInPrevColumn();
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        savePage();
 | 
					        savePage();
 | 
				
			||||||
        startNewPage();
 | 
					        startNewPage();
 | 
				
			||||||
@@ -1339,6 +1340,38 @@ void ReportRender::checkLostHeadersOnPrevPage()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void ReportRender::checkLostHeadersInPrevColumn()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    QVector<BandDesignIntf*> lostHeaders;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QMutableListIterator<BandDesignIntf*>it(m_renderPageItem->bands());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    it.toBack();
 | 
				
			||||||
 | 
					    if (it.hasPrevious()){
 | 
				
			||||||
 | 
					        if (it.previous()->isFooter()){
 | 
				
			||||||
 | 
					                if (it.hasPrevious()) it.previous();
 | 
				
			||||||
 | 
					                else return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    while (it.hasPrevious()){
 | 
				
			||||||
 | 
					        if (it.value()->isHeader()){
 | 
				
			||||||
 | 
					            if (it.value()->reprintOnEachPage()){
 | 
				
			||||||
 | 
					                delete it.value();
 | 
				
			||||||
 | 
					            } else { lostHeaders.append(it.value());}
 | 
				
			||||||
 | 
					            it.remove();
 | 
				
			||||||
 | 
					            it.previous();
 | 
				
			||||||
 | 
					        } else break;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (lostHeaders.size() > 0){
 | 
				
			||||||
 | 
					        qSort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
 | 
				
			||||||
 | 
					        foreach(BandDesignIntf* header, lostHeaders){
 | 
				
			||||||
 | 
					            registerBand(header);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BandDesignIntf* ReportRender::findEnclosingGroup()
 | 
					BandDesignIntf* ReportRender::findEnclosingGroup()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    BandDesignIntf* result=0;
 | 
					    BandDesignIntf* result=0;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,6 +157,7 @@ private:
 | 
				
			|||||||
    void    checkFooterGroup(BandDesignIntf* groupBand);
 | 
					    void    checkFooterGroup(BandDesignIntf* groupBand);
 | 
				
			||||||
    void    pasteGroups();
 | 
					    void    pasteGroups();
 | 
				
			||||||
    void    checkLostHeadersOnPrevPage();
 | 
					    void    checkLostHeadersOnPrevPage();
 | 
				
			||||||
 | 
					    void    checkLostHeadersInPrevColumn();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    BandDesignIntf* findEnclosingGroup();
 | 
					    BandDesignIntf* findEnclosingGroup();
 | 
				
			||||||
    bool    registerBand(BandDesignIntf* band, bool registerInChildren=true);
 | 
					    bool    registerBand(BandDesignIntf* band, bool registerInChildren=true);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user