LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwLayHelper Class Reference

Helps during the InsertCnt_ function to create new pages. More...

#include <layhelp.hxx>

Collaboration diagram for SwLayHelper:
[legend]

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
 
SwDocmpDoc
 
SwLayCacheImplmpImpl
 
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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SwLayHelper()

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::~SwLayHelper ( )

Definition at line 559 of file laycache.cxx.

References SwDoc::GetLayoutCache(), mpDoc, mpImpl, and SwLayoutCache::UnlockImpl().

Member Function Documentation

◆ CalcPageCount()

sal_uLong SwLayHelper::CalcPageCount ( )

◆ CheckFlyCache()

void SwLayHelper::CheckFlyCache ( SwPageFrame pPage)
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.

◆ CheckFlyCache_()

void SwLayHelper::CheckFlyCache_ ( SwPageFrame pPage)
private

◆ CheckInsert()

bool SwLayHelper::CheckInsert ( SwNodeOffset  nNodeIndex)

◆ CheckInsertPage()

bool SwLayHelper::CheckInsertPage ( )

Member Data Documentation

◆ mbBreakAfter

bool SwLayHelper::mbBreakAfter
private

Definition at line 114 of file layhelp.hxx.

Referenced by CheckInsert(), and CheckInsertPage().

◆ mbFirst

bool SwLayHelper::mbFirst
private

Definition at line 122 of file layhelp.hxx.

Referenced by CheckInsert().

◆ mnFlyIdx

size_t SwLayHelper::mnFlyIdx
private

the index in the fly cache array

Definition at line 121 of file layhelp.hxx.

Referenced by CheckFlyCache_().

◆ mnIndex

size_t SwLayHelper::mnIndex
private

the index in the page break array

Definition at line 120 of file layhelp.hxx.

Referenced by CheckInsert(), and SwLayHelper().

◆ mnMaxParaPerPage

sal_uLong SwLayHelper::mnMaxParaPerPage
private

Definition at line 117 of file layhelp.hxx.

Referenced by CalcPageCount(), CheckInsert(), CheckInsertPage(), and SwLayHelper().

◆ mnParagraphCnt

sal_uLong SwLayHelper::mnParagraphCnt
private

Definition at line 118 of file layhelp.hxx.

Referenced by CheckInsert(), and CheckInsertPage().

◆ mnStartOfContent

SwNodeOffset SwLayHelper::mnStartOfContent
private

Definition at line 119 of file layhelp.hxx.

Referenced by CheckInsert(), and SwLayHelper().

◆ mpDoc

SwDoc* SwLayHelper::mpDoc
private

Definition at line 115 of file layhelp.hxx.

Referenced by CalcPageCount(), SwLayHelper(), and ~SwLayHelper().

◆ mpImpl

SwLayCacheImpl* SwLayHelper::mpImpl
private

Definition at line 116 of file layhelp.hxx.

Referenced by CheckFlyCache(), CheckFlyCache_(), CheckInsert(), SwLayHelper(), and ~SwLayHelper().

◆ mrpActualSection

std::unique_ptr<SwActualSection>& SwLayHelper::mrpActualSection
private

Definition at line 113 of file layhelp.hxx.

Referenced by CheckInsert().

◆ mrpFrame

SwFrame* & SwLayHelper::mrpFrame
private

Definition at line 109 of file layhelp.hxx.

Referenced by CheckInsert(), and CheckInsertPage().

◆ mrpLay

SwLayoutFrame* & SwLayHelper::mrpLay
private

Definition at line 112 of file layhelp.hxx.

Referenced by CalcPageCount(), CheckInsert(), and CheckInsertPage().

◆ mrpPage

SwPageFrame* & SwLayHelper::mrpPage
private

Definition at line 111 of file layhelp.hxx.

Referenced by CheckInsert(), and CheckInsertPage().

◆ mrpPrv

SwFrame* & SwLayHelper::mrpPrv
private

Definition at line 110 of file layhelp.hxx.

Referenced by CheckInsert().


The documentation for this class was generated from the following files: