LibreOffice Module sw (master) 1
|
Helps during the InsertCnt_ function to create new pages. More...
#include <layhelp.hxx>
Public Member Functions | |
SwLayHelper (SwDoc *pD, SwFrame *&rpF, SwFrame *&rpP, SwPageFrame *&rpPg, SwLayoutFrame *&rpL, std::unique_ptr< SwActualSection > &rpA, SwNodeOffset nNodeIndex, bool bCache) | |
helper class, which utilizes the layout cache information to distribute the document content to the right pages. More... | |
~SwLayHelper () | |
sal_uLong | CalcPageCount () |
Does NOT really calculate the page count, it returns the page count value from the layout cache, if available, otherwise it estimates the page count. More... | |
bool | CheckInsert (SwNodeOffset nNodeIndex) |
entry point for the InsertCnt_-function. More... | |
bool | CheckInsertPage () |
inserts a page and return true, if More... | |
void | CheckFlyCache (SwPageFrame *pPage) |
Look for fresh text frames at this (new) page and set them to the right position, if they are in the fly cache. More... | |
Private Member Functions | |
void | CheckFlyCache_ (SwPageFrame *pPage) |
If a new page is inserted, the last page is analysed. More... | |
Private Attributes | |
SwFrame *& | mrpFrame |
SwFrame *& | mrpPrv |
SwPageFrame *& | mrpPage |
SwLayoutFrame *& | mrpLay |
std::unique_ptr< SwActualSection > & | mrpActualSection |
bool | mbBreakAfter |
SwDoc * | mpDoc |
SwLayCacheImpl * | mpImpl |
sal_uLong | mnMaxParaPerPage |
sal_uLong | mnParagraphCnt |
SwNodeOffset | mnStartOfContent |
size_t | mnIndex |
the index in the page break array More... | |
size_t | mnFlyIdx |
the index in the fly cache array More... | |
bool | mbFirst: 1 |
Helps during the InsertCnt_ function to create new pages.
If there's a layout cache available, this information is used.
Definition at line 107 of file layhelp.hxx.
SwLayHelper::SwLayHelper | ( | SwDoc * | pD, |
SwFrame *& | rpF, | ||
SwFrame *& | rpP, | ||
SwPageFrame *& | rpPg, | ||
SwLayoutFrame *& | rpL, | ||
std::unique_ptr< SwActualSection > & | rpA, | ||
SwNodeOffset | nNodeIndex, | ||
bool | bCache | ||
) |
helper class, which utilizes the layout cache information to distribute the document content to the right pages.
It's used by the InsertCnt_(..)-function. If there's no layout cache, the distribution to the pages is more a guess, but a guess with statistical background.
Definition at line 519 of file laycache.cxx.
References SwNodes::GetEndOfContent(), SwNode::GetIndex(), SwDoc::GetLayoutCache(), SwDoc::GetNodes(), SwLayoutCache::LockImpl(), mnIndex, mnMaxParaPerPage, mnStartOfContent, mpDoc, mpImpl, NODE_OFFSET_MAX(), SwNode::StartOfSectionNode(), and SwLayoutCache::UnlockImpl().
SwLayHelper::~SwLayHelper | ( | ) |
Definition at line 559 of file laycache.cxx.
References SwDoc::GetLayoutCache(), mpDoc, mpImpl, and SwLayoutCache::UnlockImpl().
sal_uLong SwLayHelper::CalcPageCount | ( | ) |
Does NOT really calculate the page count, it returns the page count value from the layout cache, if available, otherwise it estimates the page count.
Definition at line 572 of file laycache.cxx.
References SwViewOption::getBrowseMode(), SwRootFrame::GetCurrShell(), IDocumentStatistics::GetDocStat(), SwNodes::GetEndOfAutotext(), SwNodes::GetEndOfContent(), SwNodes::GetEndOfExtras(), SwNodes::GetEndOfInserts(), SwDoc::getIDocumentStatistics(), SwNode::GetIndex(), SwDoc::GetLayoutCache(), SwDoc::GetNodes(), SwFrame::getRootFrame(), SwDoc::GetTableFrameFormats(), SwViewShell::GetViewOptions(), SwLayoutCache::LockImpl(), min(), mnMaxParaPerPage, mpDoc, mrpLay, SwDocStat::nPage, SwDocStat::nPara, sw::FrameFormats< value_type >::size(), SwLayCacheImpl::size(), and SwLayoutCache::UnlockImpl().
|
inline |
Look for fresh text frames at this (new) page and set them to the right position, if they are in the fly cache.
Definition at line 136 of file layhelp.hxx.
References CheckFlyCache_(), and mpImpl.
|
private |
If a new page is inserted, the last page is analysed.
If there are text frames with default position, the fly cache is checked, if these frames are stored in the cache.
Definition at line 968 of file laycache.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), SwFlyFrame::DynCastFlyFrame(), FAR_AWAY, SwLayCacheImpl::GetFlyCache(), SwLayCacheImpl::GetFlyCount(), SwFrameAreaDefinition::getFrameArea(), SwPageFrame::GetPhyPageNum(), SwPageFrame::GetSortedObjs(), GetUserCall(), SwRect::Height(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), SwLayCacheImpl::IsUseFlyCache(), SwRect::Left(), mnFlyIdx, mpImpl, SwFlyCache::nPageNum, nPgNum, SwRect::Pos(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size(), SwRect::Top(), and SwRect::Width().
Referenced by CheckFlyCache(), and CheckInsert().
bool SwLayHelper::CheckInsert | ( | SwNodeOffset | nNodeIndex | ) |
entry point for the InsertCnt_-function.
The document content index is checked either it is in the layout cache either it's time to insert a page cause the maximal estimation of content per page is reached. A really big table or long paragraph may contains more than one page, in this case the needed count of pages will inserted.
Definition at line 713 of file laycache.cxx.
References CheckFlyCache_(), CheckInsertPage(), COMPLETE_STRING, SwFrame::FindPageFrame(), SwLayCacheImpl::GetBreakIndex(), SwLayCacheImpl::GetBreakOfst(), SwLayCacheImpl::GetBreakType(), SwTextFrame::GetFollow(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), SwFrame::GetNext(), SwFrame::GetNextLayoutLeaf(), SwTabFrame::GetTable(), SwTable::GetTabLines(), SwTextFrame::GetText(), SwFrame::GetUpper(), SwRect::Height(), SwSectionFrame::Init(), SwFrame::InsertBefore(), SwFrame::InsertBehind(), SwFrameAreaDefinition::isFrameAreaSizeValid(), SwFrame::IsLayoutFrame(), SwFrame::IsTabFrame(), SwFrame::IsTextFrame(), Lower, SwLayoutFrame::Lower(), SwTextFrame::ManipOfst(), mbBreakAfter, mbFirst, mnIndex, mnMaxParaPerPage, mnParagraphCnt, mnStartOfContent, mpImpl, mrpActualSection, mrpFrame, mrpLay, mrpPage, mrpPrv, nType, SwRect::Pos(), RegistFlys(), SwRowFrame::RegistFlys(), SwFrame::RemoveFromLayout(), SwRowFrame::SetRepeatedHeadline(), size, SW_LAYCACHE_IO_REC_PAGES, SW_LAYCACHE_IO_REC_PARA, and SW_LAYCACHE_IO_REC_TABLE.
bool SwLayHelper::CheckInsertPage | ( | ) |
inserts a page and return true, if
The break after flag is set, if the actual content wants a break after.
Definition at line 636 of file laycache.cxx.
References SwFootnoteBossFrame::FindBodyCont(), SvxFormatBreakItem::GetBreak(), SwFrame::GetBreakItem(), SwPageDesc::GetFollow(), SwFrame::GetLower(), SwFrame::GetNext(), SwFormatPageDesc::GetNumOffset(), SwFormatPageDesc::GetPageDesc(), SwPageFrame::GetPageDesc(), SwFrame::GetPageDescItem(), SwFrame::GetUpper(), InsertNewPage(), SwPageFrame::IsEmptyPage(), SwFrame::IsFlowFrame(), sw::IsRightPageByNumber(), SwLayoutFrame::Lower(), mbBreakAfter, mnMaxParaPerPage, mnParagraphCnt, mrpFrame, mrpLay, mrpPage, and SwFrame::OnRightPage().
Referenced by CheckInsert().
|
private |
Definition at line 114 of file layhelp.hxx.
Referenced by CheckInsert(), and CheckInsertPage().
|
private |
Definition at line 122 of file layhelp.hxx.
Referenced by CheckInsert().
|
private |
the index in the fly cache array
Definition at line 121 of file layhelp.hxx.
Referenced by CheckFlyCache_().
|
private |
the index in the page break array
Definition at line 120 of file layhelp.hxx.
Referenced by CheckInsert(), and SwLayHelper().
|
private |
Definition at line 117 of file layhelp.hxx.
Referenced by CalcPageCount(), CheckInsert(), CheckInsertPage(), and SwLayHelper().
|
private |
Definition at line 118 of file layhelp.hxx.
Referenced by CheckInsert(), and CheckInsertPage().
|
private |
Definition at line 119 of file layhelp.hxx.
Referenced by CheckInsert(), and SwLayHelper().
|
private |
Definition at line 115 of file layhelp.hxx.
Referenced by CalcPageCount(), SwLayHelper(), and ~SwLayHelper().
|
private |
Definition at line 116 of file layhelp.hxx.
Referenced by CheckFlyCache(), CheckFlyCache_(), CheckInsert(), SwLayHelper(), and ~SwLayHelper().
|
private |
Definition at line 113 of file layhelp.hxx.
Referenced by CheckInsert().
|
private |
Definition at line 109 of file layhelp.hxx.
Referenced by CheckInsert(), and CheckInsertPage().
|
private |
Definition at line 112 of file layhelp.hxx.
Referenced by CalcPageCount(), CheckInsert(), and CheckInsertPage().
|
private |
Definition at line 111 of file layhelp.hxx.
Referenced by CheckInsert(), and CheckInsertPage().
|
private |
Definition at line 110 of file layhelp.hxx.
Referenced by CheckInsert().