Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | Friends

FL_DocLayout Class Reference

#include <fl_DocLayout.h>

List of all members.

Public Types

enum  backgroundCheckReason {
  bgcrNone = 0, bgcrDebugFlash = (1 << 0), bgcrSpelling = (1 << 1), bgcrSmartQuotes = (1 << 2),
  bgcrGrammar = (1 << 3)
}

Public Member Functions

 FL_DocLayout (PD_Document *doc, GR_Graphics *pG)
 ~FL_DocLayout ()
void fillLayouts (void)
bool loadPendingObjects (void)
bool AnchoredObjectHelper (double x, double y, UT_sint32 iPage, UT_UTF8String &allProps, PT_DocPosition &pos, fp_Page *&pPage)
void setView (FV_View *)
FV_ViewgetView (void) const
GR_GraphicsgetGraphics (void) const
void setGraphics (GR_Graphics *pG)
UT_uint32 getGraphicTick (void) const
void incrementGraphicTick (void)
PD_DocumentgetDocument (void) const
fl_BlockLayoutgetPendingBlockForSmartQuote (void) const
UT_uint32 getOffsetForSmartQuote (void) const
void setPendingSmartQuote (fl_BlockLayout *block, UT_uint32 offset)
void considerSmartQuoteCandidateAt (fl_BlockLayout *block, UT_uint32 offset)
void considerPendingSmartQuoteCandidate ()
void notifyBlockIsBeingDeleted (fl_BlockLayout *pBlock)
void setSkipUpdates (UT_uint32 numSkips)
UT_uint32 getSkipUpdates (void)
void setNeedsRedraw (void)
UT_sint32 getHeight () const
 Calculates the total height of the layout.
UT_sint32 getWidth () const
 Calculates the maximum width a page has in the layout.
void refreshRunProperties (void)
const GR_FontfindFont (const PP_AttrProp *pSpanAP, const PP_AttrProp *pBlockAP, const PP_AttrProp *pSectionAP, bool isField=false) const
const GR_FontfindFont (const PP_AttrProp *pSpanAP, const PP_AttrProp *pBlockAP, const PP_AttrProp *pSectionAP, GR_Graphics *pG, bool isField=false) const
void changeDocSections (const PX_ChangeRecord_StruxChange *pcrx, fl_DocSectionLayout *pDSL)
fp_PageaddNewPage (fl_DocSectionLayout *pOwner, bool bNoUpdate=false)
fp_PagegetFirstPage () const
fp_PagegetLastPage () const
fp_PagegetNthPage (int n) const
UT_sint32 countPages () const
UT_sint32 findPage (const fp_Page *pPage) const
void setFramePageNumbers (UT_sint32 iStartPage)
fl_FrameLayoutrelocateFrame (fl_FrameLayout *pFL, fl_BlockLayout *newBlock, const PP_PropertyVector &attributes=PP_NOPROPS, const PP_PropertyVector &properties=PP_NOPROPS)
void clearAllCountWraps (void)
bool addFramesToBeInserted (fp_FrameContainer *pFrame)
bool removeFramesToBeInserted (fp_FrameContainer *pFrame)
fp_FrameContainerfindFramesToBeInserted (fp_Page *pPage)
UT_sint32 getPercentFilled (void) const
void setPercentFilled (UT_sint32 iFill)
void setLayoutIsFilling (bool bisFill)
bool isLayoutFilling (void) const
fl_BlockLayoutfindBlockAtPosition (PT_DocPosition pos, bool bLookOnlyBefore=false) const
fl_BlockLayoutfindBlockAtPositionReverse (PT_DocPosition pos) const
void deletePage (fp_Page *pPage, bool bDontNotify)
void formatAll ()
void updateLayout ()
void updateOnViewModeChange ()
void rebuildFromHere (fl_DocSectionLayout *pDSL)
void updateColor ()
void addSection (fl_DocSectionLayout *)
void removeSection (fl_DocSectionLayout *)
void insertSectionAfter (fl_DocSectionLayout *pAfter, fl_DocSectionLayout *pNewSL)
void addHdrFtrSection (fl_SectionLayout *pHdrFtrSL)
void removeHdrFtrSection (fl_SectionLayout *pHdrFtrSL)
fl_DocSectionLayoutgetFirstSection (void) const
fl_DocSectionLayoutgetLastSection (void) const
fl_DocSectionLayoutfindSectionForHdrFtr (const char *pszHdrFtrID) const
void deleteEmptyColumnsAndPages (void)
void deleteEmptyPages (bool bDontNotify=false)
GR_EmbedManagergetEmbedManager (const char *szEmbedType)
UT_sint32 getDocPageHeight (void) const
UT_sint32 getDocPageWidth (void) const
UT_uint32 countFootnotes (void) const
void addFootnote (fl_FootnoteLayout *)
void removeFootnote (fl_FootnoteLayout *)
fl_FootnoteLayoutgetNthFootnote (UT_sint32 i) const
UT_sint32 getFootnoteVal (UT_uint32 footpid) const
fl_FootnoteLayoutfindFootnoteLayout (UT_uint32 footpid) const
FootnoteType getFootnoteType (void) const
void getStringFromFootnoteVal (UT_String &sVal, UT_sint32 iVal, FootnoteType iFootType) const
UT_sint32 getInitialFootVal (void) const
bool getRestartFootOnSection (void) const
bool getRestartFootOnPage (void) const
FootnoteType FootnoteTypeFromString (const gchar *pszStr)
void insertEndnoteContainer (fp_EndnoteContainer *pECon)
void removeEndnoteContainer (fp_EndnoteContainer *pECon)
fl_DocSectionLayoutgetDocSecForEndnote (fp_EndnoteContainer *pECon) const
UT_uint32 countEndnotes (void) const
void addEndnote (fl_EndnoteLayout *)
void removeEndnote (fl_EndnoteLayout *)
fl_EndnoteLayoutgetNthEndnote (UT_sint32 i) const
UT_sint32 getEndnoteVal (UT_uint32 endpid) const
fl_EndnoteLayoutfindEndnoteLayout (UT_uint32 endpid) const
FootnoteType getEndnoteType (void) const
UT_sint32 getInitialEndVal (void) const
bool getRestartEndOnSection (void) const
bool getPlaceEndAtDocEnd (void) const
bool getPlaceEndAtSecEnd (void) const
UT_uint32 countAnnotations (void) const
void addAnnotation (fl_AnnotationLayout *pAL)
void removeAnnotation (fl_AnnotationLayout *pAL)
fl_AnnotationLayoutgetNthAnnotation (UT_sint32 i) const
UT_sint32 getAnnotationVal (UT_uint32 footpid) const
fl_AnnotationLayoutfindAnnotationLayout (UT_uint32 footpid) const
bool displayAnnotations (void) const
void setDisplayAnnotations (bool bDisplayAnnotations)
bool collapseAnnotations (void)
bool displayRDFAnchors (void) const
void setDisplayRDFAnchors (bool v)
UT_sint32 getNumTOCs (void) const
fl_TOCLayoutgetNthTOC (UT_sint32 i) const
bool addOrRemoveBlockFromTOC (fl_BlockLayout *pBlock)
bool removeBlockFromTOC (fl_BlockLayout *pBlock)
bool isBlockInTOC (fl_BlockLayout *pBlock) const
bool getMatchingBlocksFromTOCs (fl_BlockLayout *pBlock, UT_GenericVector< fl_BlockLayout * > *pVecBlock) const
bool addTOC (fl_TOCLayout *pTOC)
bool removeTOC (fl_TOCLayout *pTOC)
void recalculateTOCFields (void)
bool updateTOCsOnBookmarkChange (const gchar *pBookmark)
bool getSmartQuotes (void) const
void addBackgroundCheckReason (UT_uint32 reason)
void removeBackgroundCheckReason (UT_uint32 reason)
bool hasBackgroundCheckReason (UT_uint32 reason) const
UT_uint32 getBackgroundCheckReasons () const
void triggerPendingBlock (fl_BlockLayout *pBL)
fl_AutoNumPtr getListByID (UT_uint32 id) const
fl_AutoNumPtr getNthList (UT_uint32 i) const
UT_uint32 getListsCount (void) const
void addList (const fl_AutoNumPtr &pAutoNum)
bool isLayoutDeleting (void) const
UT_uint32 getRedrawCount () const
void updatePropsNoRebuild (void)
void updatePropsRebuild (void)
PT_DocPosition getDocSize (void) const
UT_uint32 getLID (void) const
void notifyListeners (AV_ChangeMask mask)
void setQuickPrint (GR_Graphics *pGraphics)
GR_GraphicsgetQuickPrintGraphics (void) const
bool isQuickPrint (void) const
GR_EmbedManagergetQuickPrintEmbedManager (const char *szEmbedType)
bool setDocViewPageSize (const PP_AttrProp *pAP)
void setSaveContainerPointer (fp_Container *pContainer)
void setRebuiltBlock (fl_BlockLayout *pBlock)
fl_BlockLayoutgetRebuiltBlock (void) const
fp_ContainergetSavedContainerPointer (void) const
 FL_DocLayout ()
fl_BlockLayoutspellQueueHead (void) const
void setSpellQueueHead (fl_BlockLayout *h)
void setSpellQueueTail (fl_BlockLayout *t)
 FL_DocLayout ()
fl_BlockLayoutspellQueueHead (void) const
void setSpellQueueHead (fl_BlockLayout *h)
void setSpellQueueTail (fl_BlockLayout *t)

Public Attributes

fp_PageSize m_docViewPageSize

Protected Member Functions

void _toggleAutoSmartQuotes (bool bSQ)
void _setDocPageDimensions (void)

Static Protected Member Functions

static void _backgroundCheck (UT_Worker *pTimer)
static void _prefsListener (class XAP_Prefs *, UT_StringPtrMap *, void *)
static void _redrawUpdate (UT_Worker *pTimer)

Private Member Functions

void _lookupProperties (void)

Private Attributes

GR_Graphicsm_pG
PD_Documentm_pDoc
FV_Viewm_pView
fl_DocListenerm_pDocListener
PL_ListenerId m_lid
UT_GenericVector< fp_Page * > m_vecPages
fl_DocSectionLayoutm_pFirstSection
fl_DocSectionLayoutm_pLastSection
fl_BlockLayoutm_toSpellCheckHead
fl_BlockLayoutm_toSpellCheckTail
const fl_BlockLayoutm_pPendingBlockForSpell
fl_PartOfBlockPtr m_pPendingWordForSpell
bool m_bSpellCheckCaps
bool m_bSpellCheckNumbers
bool m_bSpellCheckInternet
bool m_bAutoSpellCheck
UT_uint32 m_uDocBackgroundCheckReasons
bool m_bStopSpellChecking
bool m_bImSpellCheckingNow
fl_BlockLayoutm_pPendingBlockForSmartQuote
UT_uint32 m_uOffsetForSmartQuote
char m_szCurrentTransparentColor [10]
UT_Workerm_pBackgroundCheckTimer
XAP_Prefsm_pPrefs
UT_Timerm_pRedrawUpdateTimer
UT_uint32 m_iSkipUpdates
bool m_bDeletingLayout
bool m_bisLayoutFilling
UT_uint32 m_iRedrawCount
UT_sint32 m_iPageWidth
UT_sint32 m_iPageHeight
UT_GenericVector
< fl_FootnoteLayout * > 
m_vecFootnotes
UT_GenericVector
< fl_AnnotationLayout * > 
m_vecAnnotations
UT_GenericVector
< fl_EndnoteLayout * > 
m_vecEndnotes
FootnoteType m_FootnoteType
UT_sint32 m_iFootnoteVal
bool m_bRestartFootSection
bool m_bRestartFootPage
UT_sint32 m_iEndnoteVal
FootnoteType m_EndnoteType
bool m_bRestartEndSection
bool m_bPlaceAtDocEnd
bool m_bPlaceAtSecEnd
UT_uint32 m_iGraphicTick
UT_GenericVector< fl_TOCLayout * > m_vecTOC
PT_DocPosition m_iDocSize
UT_sint32 m_iFilled
bool m_bSpellCheckInProgress
std::map< std::string,
GR_EmbedManager * > 
m_mapEmbedManager
bool m_bAutoGrammarCheck
fl_BlockLayoutm_PendingBlockForGrammar
UT_sint32 m_iGrammarCount
bool m_bFinishedInitialCheck
PT_DocPosition m_iPrevPos
std::map< std::string,
GR_EmbedManager * > 
m_mapQuickPrintEmbedManager
GR_Graphicsm_pQuickPrintGraphics
bool m_bIsQuickPrint
bool m_bDisplayAnnotations
bool m_bDisplayRDFAnchors
fp_Containerm_pSavedContainer
fl_BlockLayoutm_pRebuiltBlockLayout
UT_GenericVector
< fp_FrameContainer * > 
m_vecFramesToBeInserted

Friends

class fl_DocListener
class fl_BlockLayout

Member Enumeration Documentation

Enumerator:
bgcrNone 
bgcrDebugFlash 
bgcrSpelling 
bgcrSmartQuotes 
bgcrGrammar 

Constructor & Destructor Documentation

FL_DocLayout::FL_DocLayout ( PD_Document doc,
GR_Graphics pG 
)
FL_DocLayout::~FL_DocLayout (  ) 
FL_DocLayout::FL_DocLayout (  )  [inline]
FL_DocLayout::FL_DocLayout (  )  [inline]

Member Function Documentation

static void FL_DocLayout::_backgroundCheck ( UT_Worker pTimer  )  [static, protected]
void FL_DocLayout::_lookupProperties ( void   )  [private]
void FL_DocLayout::_prefsListener ( class XAP_Prefs pPrefs,
UT_StringPtrMap ,
void *  data 
) [static, protected]
void FL_DocLayout::_redrawUpdate ( UT_Worker pTimer  )  [static, protected]
void FL_DocLayout::_setDocPageDimensions ( void   )  [protected]
void FL_DocLayout::_toggleAutoSmartQuotes ( bool  bSQ  )  [protected]
void FL_DocLayout::addAnnotation ( fl_AnnotationLayout pFL  ) 
void FL_DocLayout::addBackgroundCheckReason ( UT_uint32  reason  )  [inline]

Referenced by _toggleAutoSmartQuotes(), and setView().

void FL_DocLayout::addEndnote ( fl_EndnoteLayout pFL  ) 

Add a footnote layout to the vector remembering them.

References UT_GenericVector< T >::addItem(), and m_vecEndnotes.

Referenced by fl_EndnoteLayout::fl_EndnoteLayout().

void FL_DocLayout::addFootnote ( fl_FootnoteLayout pFL  ) 

Add a footnote layout to the vector remembering them.

References UT_GenericVector< T >::addItem(), and m_vecFootnotes.

Referenced by fl_FootnoteLayout::fl_FootnoteLayout().

bool FL_DocLayout::addFramesToBeInserted ( fp_FrameContainer pFrame  ) 

add a frame to the list of frames that need to be inserted on a page later in the document than its parent block. A frame can be placed up to 3 pages after its parent block. This list is needed during the initial layout stage.

References UT_GenericVector< T >::addItem(), and m_vecFramesToBeInserted.

Referenced by fl_BlockLayout::setFramesOnPage().

void FL_DocLayout::addHdrFtrSection ( fl_SectionLayout pHdrFtrSL  ) 

Include the header/footer section layouts AFTER the last DocSection in the the getNext, getPrev list. This will ensure that the headers/footers will be formatted and updated correctly.

Parameters:
fl_SectionLayout * pHdrFtrSL the header/footer layout to be inserted into the sectionlayout linked list. The structure of this linked list is as follows. pDSL->pDSL->pDSL....pDSL->pEndnoteSL->pHdrFtrSL->pHdrFtrSL->NULL ^ ^ m_pFirstSection m_pLastSection

ie we have all the DocSections in a linked list followed by all the Header/ Footer sections. This reflects the locations in the piece table where the header/footer sections are located at the end of the document.

References fl_ContainerLayout::getNext(), fl_SectionLayout::getType(), m_pLastSection, fl_ContainerLayout::setNext(), fl_ContainerLayout::setPrev(), and UT_ASSERT.

Referenced by fl_SectionLayout::bl_doclistener_insertSection(), fl_DocListener::change(), fl_BlockLayout::doclistener_insertSection(), and fl_DocListener::populateStrux().

void FL_DocLayout::addList ( const fl_AutoNumPtr pAutoNum  )  [inline]

References PD_Document::addList(), and m_pDoc.

fp_Page * FL_DocLayout::addNewPage ( fl_DocSectionLayout pOwner,
bool  bNoUpdate = false 
)
bool FL_DocLayout::addOrRemoveBlockFromTOC ( fl_BlockLayout pBlock  ) 

This method scans all the TOC in the document and adds or removes the supplied block if it needs to be either added or removed from a TOC. This method returns true if pBlock is in at least one TOC

References fl_TOCLayout::addBlock(), getNthTOC(), getNumTOCs(), fl_BlockLayout::getStyle(), fl_TOCLayout::isBlockInTOC(), fl_TOCLayout::isStyleInTOC(), and fl_TOCLayout::removeBlock().

Referenced by fl_BlockLayout::_lookupProperties(), fl_BlockLayout::doclistener_deleteStrux(), fl_BlockLayout::fl_BlockLayout(), and fl_BlockLayout::format().

void FL_DocLayout::addSection ( fl_DocSectionLayout pSL  ) 

This method appends a DocSectionLayout onto the linked list of SectionLayout's and updates the m_pFirstSection and m_pLastSection member variables accordingly. The structure of this linked list is as follows. pDSL->pDSL->....pDSL->pEndnoteSL->pHdrFtrSL->pHdrFtrSL->NULL ^ ^ m_pFirstSection m_pLastSection ie we have all the DocSections in a linked list followed by all the Header/ Footer sections. This reflects the locations in the piece table where the header/footer sections are located at the end of the document.

Parameters:
fl_DocSectionLayout * pSL the DocSectionLayout to be appended.
fl_DocSectionLayout* pAfter the DocSectionLayout after which our new DocSectionLayout is inserted.

References insertSectionAfter(), m_pFirstSection, m_pLastSection, fl_ContainerLayout::setNext(), fl_ContainerLayout::setPrev(), and UT_ASSERT.

Referenced by fl_DocListener::populateStrux().

bool FL_DocLayout::addTOC ( fl_TOCLayout pTOC  ) 
bool FL_DocLayout::AnchoredObjectHelper ( double  x,
double  y,
UT_sint32  iPage,
UT_UTF8String allProps,
PT_DocPosition pos,
fp_Page *&  pPage 
)
void FL_DocLayout::changeDocSections ( const PX_ChangeRecord_StruxChange pcrx,
fl_DocSectionLayout pDSL 
)
void FL_DocLayout::clearAllCountWraps ( void   ) 
bool FL_DocLayout::collapseAnnotations ( void   ) 

Collapse all the blocks containing Annotations. This is useful for when we toggle displaying/hiding annotations.

References fl_AnnotationLayout::collapse(), fl_BlockLayout::collapse(), countAnnotations(), fl_EmbedLayout::getContainingBlock(), fl_ContainerLayout::getFirstLayout(), and getNthAnnotation().

Referenced by _prefsListener().

void FL_DocLayout::considerPendingSmartQuoteCandidate (  )  [inline]
void FL_DocLayout::considerSmartQuoteCandidateAt ( fl_BlockLayout block,
UT_uint32  offset 
)
UT_uint32 FL_DocLayout::countAnnotations ( void   )  const

This simply returns the number of annotations in the document.

References UT_GenericVector< T >::getItemCount(), and m_vecAnnotations.

Referenced by addAnnotation(), collapseAnnotations(), FV_View::countAnnotations(), FV_View::getClosestAnnotation(), and removeAnnotation().

UT_uint32 FL_DocLayout::countEndnotes ( void   )  const

This simply returns the number of footnotes in the document.

References UT_GenericVector< T >::getItemCount(), and m_vecEndnotes.

Referenced by FV_View::getClosestEndnote().

UT_uint32 FL_DocLayout::countFootnotes ( void   )  const

This simply returns the number of footnotes in the document.

References UT_GenericVector< T >::getItemCount(), and m_vecFootnotes.

Referenced by FV_View::getClosestFootnote().

UT_sint32 FL_DocLayout::countPages (  )  const
void FL_DocLayout::deleteEmptyColumnsAndPages ( void   ) 
void FL_DocLayout::deleteEmptyPages ( bool  bDontNotify = false  ) 
void FL_DocLayout::deletePage ( fp_Page pPage,
bool  bDontNotify 
)
bool FL_DocLayout::displayAnnotations ( void   )  const
bool FL_DocLayout::displayRDFAnchors ( void   )  const
void FL_DocLayout::fillLayouts ( void   ) 

This Method fills the layout structures from the PieceTable.

References _lookupProperties(), _setDocPageDimensions(), PD_Document::addListener(), FV_View::clearCursorWait(), UT_GenericVector< T >::deleteNthItem(), GR_Graphics::DGP_PAPER, PD_Document::enableListUpdates(), fl_TOCLayout::fillTOC(), fl_DocListener, fl_ContainerLayout::format(), formatAll(), FV_DOCPOS_BOD, PD_Document::getBounds(), fl_ContainerLayout::getContainerType(), getDocument(), getGraphics(), UT_GenericVector< T >::getItemCount(), getLastPage(), PD_Document::getListsCount(), fl_ContainerLayout::getNext(), UT_GenericVector< T >::getNthItem(), PD_Document::getNthList(), getNthTOC(), getNumTOCs(), AV_View::getParentData(), fl_TOCLayout::getSectionLayout(), AP_StatusBar::hideProgressBar(), fp_Page::insertFrameContainer(), fl_TOCLayout::isTOCEmpty(), loadPendingObjects(), m_bFinishedInitialCheck, PD_Document::m_docPageSize, m_docViewPageSize, m_iDocSize, m_iGrammarCount, m_iPrevPos, m_lid, m_pDoc, m_pDocListener, m_pView, m_vecFramesToBeInserted, FV_View::moveInsPtTo(), PROGRESS_STARTBAR, PROGRESS_STOPBAR, GR_Graphics::queryProperties(), PD_Document::setDontImmediatelyLayout(), setFramePageNumbers(), fl_DocListener::setHoldTableLayout(), AV_View::setLayoutIsFilling(), setLayoutIsFilling(), FV_View::setPoint(), AP_StatusBar::setStatusProgressType(), XAP_Frame::setYScrollRange(), AP_StatusBar::showProgressBar(), PD_Document::updateDirtyLists(), updateLayout(), FV_View::updateLayout(), FV_View::updateScreen(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, and fl_TOCLayout::verifyBookmarkAssumptions().

Referenced by FakeAccountHandler::_loadDocument(), AP_Frame::_replaceView(), IE_Exp_S5::_writeDocument(), IE_Exp_Cairo::_writeDocument(), AP_Preview_Abi::AP_Preview_Abi(), XAP_UnixDialog_Print::BeginPrint(), FV_View::copyTextToClipboard(), Defun1(), Print_MailMerge_Listener::fireUpdate(), AP_Convert::print(), AP_Convert::printFirstPage(), AbiCommand::replaceDocument(), s_doPrint(), s_pasteFile(), and IE_FieldUpdater::updateFields().

fl_AnnotationLayout * FL_DocLayout::findAnnotationLayout ( UT_uint32  annpid  )  const
fl_BlockLayout * FL_DocLayout::findBlockAtPosition ( PT_DocPosition  pos,
bool  bLookOnlyBefore = false 
) const

Find block at document position

Parameters:
pos Document position
Returns:
Block at specified position. If bLookOnlyBefore = true, it returns NULL if no block can be found If bLookOnlyBefore = false, it returns the first block to the right of that position (it may still return NULL).

References fl_ContainerLayout::canContainPoint(), FV_View::clearHdrFtrEdit(), fl_HdrFtrShadow::findBlockAtPosition(), fl_HdrFtrShadow::findMatchingContainer(), FL_CONTAINER_HDRFTR, PD_Document::getBounds(), fl_ContainerLayout::getContainerType(), FV_View::getEditShadow(), fl_HdrFtrSectionLayout::getFirstShadow(), fl_HdrFtrShadow::getHdrFtrSectionLayout(), fl_ContainerLayout::getPrevBlockInDocument(), fl_BlockLayout::getSectionLayout(), PD_Document::getStruxOfTypeFromPosition(), fl_Layout::getType(), getView(), PD_Document::isEndFootnoteAtPos(), PD_Document::isFootnoteAtPos(), FV_View::isHdrFtrEdit(), isLayoutFilling(), fl_HdrFtrSectionLayout::isPointInHere(), m_lid, m_pDoc, fl_ContainerLayout::myContainingLayout(), PTX_Block, PTX_Section, FV_View::setHdrFtrEdit(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.

Referenced by AP_Dialog_Paragraph::_createPreviewFromGC(), PD_Document::_exportInitVisDirection(), FV_View::_findBlockAtPosition(), FV_View::_findGetNextBlockBuffer(), fl_AnnotationLayout::_insertAnnotationContainer(), fl_FootnoteLayout::_insertFootnoteContainer(), FV_View::_isSpaceBefore(), AnchoredObjectHelper(), fp_FieldTOCNumRun::calculateValue(), fp_FieldListLabelRun::calculateValue(), FV_View::cmdCharInsert(), FV_View::cmdDeleteCol(), fl_EmbedLayout::doclistener_deleteStrux(), fl_AnnotationLayout::getAnnotationRun(), FV_View::getAnnotationText(), FV_View::getEmbedDepth(), FV_View::getSelectionText(), FV_View::getTableAtPos(), FV_View::getTextBetweenPos(), FV_View::insertSymbol(), FV_View::isInTable(), AP_Dialog_SplitCells::setAllSensitivities(), AP_Dialog_MergeCells::setAllSensitivities(), and FV_View::toggleCase().

fl_BlockLayout * FL_DocLayout::findBlockAtPositionReverse ( PT_DocPosition  pos  )  const
fl_EndnoteLayout * FL_DocLayout::findEndnoteLayout ( UT_uint32  footpid  )  const

This method returns the footnote layout associated with the input PID

References fl_EndnoteLayout::getEndnotePID(), UT_GenericVector< T >::getItemCount(), getNthEndnote(), and m_vecEndnotes.

Referenced by getEndnoteVal().

const GR_Font * FL_DocLayout::findFont ( const PP_AttrProp pSpanAP,
const PP_AttrProp pBlockAP,
const PP_AttrProp pSectionAP,
bool  isField = false 
) const
const GR_Font * FL_DocLayout::findFont ( const PP_AttrProp pSpanAP,
const PP_AttrProp pBlockAP,
const PP_AttrProp pSectionAP,
GR_Graphics pG,
bool  isField = false 
) const
fl_FootnoteLayout * FL_DocLayout::findFootnoteLayout ( UT_uint32  footpid  )  const

This method returns the footnote layout associated with the input PID

References fl_FootnoteLayout::getFootnotePID(), UT_GenericVector< T >::getItemCount(), getNthFootnote(), and m_vecFootnotes.

Referenced by fp_Line::getFootnoteContainers(), and getFootnoteVal().

fp_FrameContainer * FL_DocLayout::findFramesToBeInserted ( fp_Page pPage  ) 

find a frame that needs to be inserted on page pPage. Only frames that are inserted on a page later in the document than their parent block are placed in this list. This list is needed during the initial layout stage.

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), fp_Page::getPageNumber(), fp_FrameContainer::getPreferedPageNo(), and m_vecFramesToBeInserted.

Referenced by fl_DocSectionLayout::getNewContainer().

UT_sint32 FL_DocLayout::findPage ( const fp_Page pPage  )  const
fl_DocSectionLayout * FL_DocLayout::findSectionForHdrFtr ( const char *  pszHdrFtrID  )  const
FootnoteType FL_DocLayout::FootnoteTypeFromString ( const gchar *  pszFootnoteType  ) 
void FL_DocLayout::formatAll ( void   ) 
UT_sint32 FL_DocLayout::getAnnotationVal ( UT_uint32  annpid  )  const

This returns the position of the Annotation in the vector of annotations. This is useful for calculating the annotionation positioning it in a annotation section

References fl_AnnotationLayout::getAnnotationPID(), UT_GenericVector< T >::getItemCount(), getNthAnnotation(), and m_vecAnnotations.

Referenced by fp_AnnotationRun::_setValue(), and fp_AnnotationContainer::getValue().

UT_uint32 FL_DocLayout::getBackgroundCheckReasons (  )  const [inline]
UT_sint32 FL_DocLayout::getDocPageHeight ( void   )  const [inline]

Referenced by fp_Page::getHeight().

UT_sint32 FL_DocLayout::getDocPageWidth ( void   )  const [inline]

Referenced by fp_Page::getWidth().

fl_DocSectionLayout * FL_DocLayout::getDocSecForEndnote ( fp_EndnoteContainer pECon  )  const
PT_DocPosition FL_DocLayout::getDocSize ( void   )  const [inline]
PD_Document* FL_DocLayout::getDocument ( void   )  const [inline]
GR_EmbedManager * FL_DocLayout::getEmbedManager ( const char *  szEmbedType  ) 
FootnoteType FL_DocLayout::getEndnoteType ( void   )  const [inline]
UT_sint32 FL_DocLayout::getEndnoteVal ( UT_uint32  footpid  )  const

This returns the position of the Endnote in the document. This is useful for calculating the Endnote's value and positioning it in a footnote section

References findEndnoteLayout(), fl_EmbedLayout::getDocPosition(), fl_EmbedLayout::getDocSectionLayout(), UT_GenericVector< T >::getItemCount(), getNthEndnote(), m_bRestartEndSection, m_iEndnoteVal, and m_vecEndnotes.

Referenced by fp_FieldEndnoteRefRun::calculateValue(), fp_FieldEndnoteAnchorRun::calculateValue(), and fp_EndnoteContainer::getValue().

fp_Page * FL_DocLayout::getFirstPage (  )  const
fl_DocSectionLayout* FL_DocLayout::getFirstSection ( void   )  const [inline]
FootnoteType FL_DocLayout::getFootnoteType ( void   )  const
UT_sint32 FL_DocLayout::getFootnoteVal ( UT_uint32  footpid  )  const
GR_Graphics* FL_DocLayout::getGraphics ( void   )  const [inline]
UT_uint32 FL_DocLayout::getGraphicTick ( void   )  const [inline]
UT_sint32 FL_DocLayout::getHeight ( void   )  const
UT_sint32 FL_DocLayout::getInitialEndVal ( void   )  const [inline]
UT_sint32 FL_DocLayout::getInitialFootVal ( void   )  const [inline]
fp_Page * FL_DocLayout::getLastPage (  )  const
fl_DocSectionLayout* FL_DocLayout::getLastSection ( void   )  const [inline]
UT_uint32 FL_DocLayout::getLID ( void   )  const [inline]
fl_AutoNumPtr FL_DocLayout::getListByID ( UT_uint32  id  )  const [inline]
UT_uint32 FL_DocLayout::getListsCount ( void   )  const [inline]
bool FL_DocLayout::getMatchingBlocksFromTOCs ( fl_BlockLayout pBlock,
UT_GenericVector< fl_BlockLayout * > *  pVecBlocks 
) const
fl_AnnotationLayout * FL_DocLayout::getNthAnnotation ( UT_sint32  i  )  const
fl_EndnoteLayout * FL_DocLayout::getNthEndnote ( UT_sint32  i  )  const

get a pointer to the Nth footnote layout in the vector remembering them.

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_vecEndnotes, and UT_ASSERT.

Referenced by findEndnoteLayout(), FV_View::getClosestEndnote(), and getEndnoteVal().

fl_FootnoteLayout * FL_DocLayout::getNthFootnote ( UT_sint32  i  )  const

get a pointer to the Nth footnote layout in the vector remembering them.

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_vecFootnotes, and UT_ASSERT.

Referenced by findFootnoteLayout(), FV_View::getClosestFootnote(), and getFootnoteVal().

fl_AutoNumPtr FL_DocLayout::getNthList ( UT_uint32  i  )  const [inline]
fp_Page * FL_DocLayout::getNthPage ( int  n  )  const
fl_TOCLayout * FL_DocLayout::getNthTOC ( UT_sint32  i  )  const
UT_sint32 FL_DocLayout::getNumTOCs ( void   )  const
UT_uint32 FL_DocLayout::getOffsetForSmartQuote ( void   )  const [inline]
fl_BlockLayout* FL_DocLayout::getPendingBlockForSmartQuote ( void   )  const [inline]
UT_sint32 FL_DocLayout::getPercentFilled ( void   )  const [inline]
bool FL_DocLayout::getPlaceEndAtDocEnd ( void   )  const [inline]
bool FL_DocLayout::getPlaceEndAtSecEnd ( void   )  const [inline]
GR_EmbedManager * FL_DocLayout::getQuickPrintEmbedManager ( const char *  szEmbedType  ) 
GR_Graphics * FL_DocLayout::getQuickPrintGraphics ( void   )  const

References m_pQuickPrintGraphics.

Referenced by fp_Run::getGraphics().

fl_BlockLayout * FL_DocLayout::getRebuiltBlock ( void   )  const
UT_uint32 FL_DocLayout::getRedrawCount (  )  const [inline]
bool FL_DocLayout::getRestartEndOnSection ( void   )  const [inline]
bool FL_DocLayout::getRestartFootOnPage ( void   )  const [inline]
bool FL_DocLayout::getRestartFootOnSection ( void   )  const [inline]
fp_Container * FL_DocLayout::getSavedContainerPointer ( void   )  const
UT_uint32 FL_DocLayout::getSkipUpdates ( void   )  [inline]

Referenced by _redrawUpdate().

bool FL_DocLayout::getSmartQuotes ( void   )  const [inline]
void FL_DocLayout::getStringFromFootnoteVal ( UT_String sVal,
UT_sint32  iVal,
FootnoteType  iFootType 
) const
FV_View* FL_DocLayout::getView ( void   )  const [inline]

Referenced by fp_Line::_createMapOfRuns(), fp_TextRun::_draw(), fp_CellContainer::_drawBoundaries(), fp_Column::_drawBoundaries(), fp_TableContainer::_drawBrokenBoundaries(), fp_ShadowContainer::_drawHdrFtrBoundaries(), fp_TextRun::_drawInvisibleSpaces(), fp_CellContainer::_getBrokenRect(), fl_DocSectionLayout::_HdrFtrChangeCallback(), fl_TableLayout::_lookupMarginProperties(), fl_FrameLayout::_lookupMarginProperties(), fl_TableLayout::_lookupProperties(), fl_DocSectionLayout::_lookupProperties(), fl_FrameLayout::_lookupProperties(), AP_Win32App::_pasteFormatFromClipboard(), _prefsListener(), _redrawUpdate(), fl_CellLayout::_updateCell(), fl_DocSectionLayout::bl_doclistener_insertAnnotation(), fl_TableLayout::bl_doclistener_insertBlock(), fl_CellLayout::bl_doclistener_insertCell(), fl_TableLayout::bl_doclistener_insertCell(), fl_CellLayout::bl_doclistener_insertEndCell(), fl_EmbedLayout::bl_doclistener_insertEndEmbed(), fl_FrameLayout::bl_doclistener_insertEndFrame(), fl_TableLayout::bl_doclistener_insertEndTable(), fl_TOCLayout::bl_doclistener_insertEndTOC(), fl_DocSectionLayout::bl_doclistener_insertFootnote(), fl_SectionLayout::bl_doclistener_insertSection(), fl_TableLayout::bl_doclistener_insertTable(), fl_HdrFtrSectionLayout::bl_doclistener_insertTable(), fl_SectionLayout::bl_doclistener_insertTable(), fl_ContainerLayout::canContainPoint(), fl_DocListener::change(), fl_Squiggles::clear(), fp_ShadowContainer::clearScreen(), fl_HdrFtrSectionLayout::collapse(), fl_FrameLayout::collapse(), fl_DocSectionLayout::doclistener_deleteStrux(), fl_EmbedLayout::doclistener_deleteStrux(), fl_BlockLayout::doclistener_deleteStrux(), fp_ShadowContainer::draw(), fp_Line::drawBorders(), fp_CellContainer::drawBroken(), fp_CellContainer::drawSelectedCell(), Drop(), fl_HdrFtrShadow::findBlockAtPosition(), findBlockAtPosition(), findBlockAtPositionReverse(), fl_DocListener::fl_DocListener(), fl_DocSectionLayout::format(), fl_FrameLayout::format(), fl_EndnoteLayout::format(), fp_Line::getAbsLeftRight(), PD_Document::getAllViews(), fl_ContainerLayout::getAP(), getHeight(), fp_CellContainer::getScreenPositions(), fl_ContainerLayout::getSpanAP(), getStringFromFootnoteVal(), fp_VerticalContainer::getView(), getWidth(), fl_FrameLayout::insertBlockAfter(), fl_CellLayout::isCellSelected(), fp_Container::isOnScreen(), fl_ContainerLayout::isOnScreen(), fp_ShadowContainer::layout(), loadPendingObjects(), fl_FrameLayout::miniFormat(), fl_ShadowListener::populate(), fl_ShadowListener::populateStrux(), fl_DocListener::populateStrux(), fl_DocListener::processDeferredNotifications(), fl_FrameLayout::recalculateFields(), fl_HdrFtrShadow::redrawUpdate(), AP_Dialog_Spell::runModal(), setDocViewPageSize(), fl_DocSectionLayout::setPaperColor(), fl_TOCLayout::setSelected(), fl_DocListener::signal(), updateColor(), fl_DocSectionLayout::updateDocSection(), fl_DocSectionLayout::updateLayout(), fl_FrameLayout::updateLayout(), fl_TableLayout::updateTable(), and fl_FrameLayout::~fl_FrameLayout().

UT_sint32 FL_DocLayout::getWidth ( void   )  const
bool FL_DocLayout::hasBackgroundCheckReason ( UT_uint32  reason  )  const [inline]
void FL_DocLayout::incrementGraphicTick ( void   )  [inline]
void FL_DocLayout::insertEndnoteContainer ( fp_EndnoteContainer pECon  ) 
void FL_DocLayout::insertSectionAfter ( fl_DocSectionLayout pAfter,
fl_DocSectionLayout pNewSL 
)

This method inserts a DocSectionLayout into the linked list of SectionLayout's and updates the m_pFirstSection and m_pLastSection member variables accordingly

Parameters:
fl_DocSectionLayout * pNewSL the DocSectionLayout to be inserted.
fl_DocSectionLayout* pAfter the DocSectionLayout after which our new DocSectionLayout is inserted.

References fl_ContainerLayout::getNext(), m_pLastSection, fl_ContainerLayout::setNext(), fl_ContainerLayout::setPrev(), and UT_return_if_fail.

Referenced by addSection(), and fl_BlockLayout::doclistener_insertSection().

bool FL_DocLayout::isBlockInTOC ( fl_BlockLayout pBlock  )  const

returns true if the block is in at least one TOC.

References getNthTOC(), getNumTOCs(), and fl_TOCLayout::isBlockInTOC().

Referenced by fl_BlockLayout::doclistener_deleteStrux().

bool FL_DocLayout::isLayoutDeleting ( void   )  const [inline]
bool FL_DocLayout::isLayoutFilling ( void   )  const [inline]
bool FL_DocLayout::isQuickPrint ( void   )  const [inline]
bool FL_DocLayout::loadPendingObjects ( void   ) 
void FL_DocLayout::notifyBlockIsBeingDeleted ( fl_BlockLayout pBlock  ) 
void FL_DocLayout::notifyListeners ( AV_ChangeMask  mask  ) 
void FL_DocLayout::rebuildFromHere ( fl_DocSectionLayout pDSL  ) 
void FL_DocLayout::recalculateTOCFields ( void   ) 
void FL_DocLayout::refreshRunProperties ( void   ) 

This method is used to reset the colorization such as what occurs when showAuthors state is changed.

References fl_SectionLayout::getFirstBlock(), getFirstSection(), fl_ContainerLayout::getNextBlockInDocument(), and fl_BlockLayout::refreshRunProperties().

Referenced by fl_DocListener::change(), setQuickPrint(), and PD_Document::setShowAuthors().

fl_FrameLayout * FL_DocLayout::relocateFrame ( fl_FrameLayout pFL,
fl_BlockLayout newBlock,
const PP_PropertyVector attributes = PP_NOPROPS,
const PP_PropertyVector properties = PP_NOPROPS 
)
void FL_DocLayout::removeAnnotation ( fl_AnnotationLayout pFL  ) 
void FL_DocLayout::removeBackgroundCheckReason ( UT_uint32  reason  )  [inline]

Referenced by _toggleAutoSmartQuotes().

bool FL_DocLayout::removeBlockFromTOC ( fl_BlockLayout pBlock  ) 

Remove pBlock from all the TOC's it's in. Return false if there are no TOC's in the Doc. return true otherwise.

References getNthTOC(), getNumTOCs(), fl_TOCLayout::isBlockInTOC(), and fl_TOCLayout::removeBlock().

Referenced by fl_BlockLayout::_lookupProperties(), fl_BlockLayout::doclistener_deleteStrux(), and fl_BlockLayout::~fl_BlockLayout().

void FL_DocLayout::removeEndnote ( fl_EndnoteLayout pFL  ) 
void FL_DocLayout::removeEndnoteContainer ( fp_EndnoteContainer pECon  ) 
void FL_DocLayout::removeFootnote ( fl_FootnoteLayout pFL  ) 
bool FL_DocLayout::removeFramesToBeInserted ( fp_FrameContainer pFrame  ) 

remove a frame from the list of frames that need to be inserted on a page later in the document.

References UT_GenericVector< T >::deleteNthItem(), UT_GenericVector< T >::findItem(), and m_vecFramesToBeInserted.

Referenced by fl_DocSectionLayout::getNewContainer().

void FL_DocLayout::removeHdrFtrSection ( fl_SectionLayout pHdrFtrSL  ) 

This method removes a header/footer layout from the section linked list.

Parameters:
fl_SectionLayout * pHdrFtrSL is the header/footer section to be removed

References fl_ContainerLayout::getNext(), fl_ContainerLayout::getPrev(), fl_ContainerLayout::setNext(), fl_ContainerLayout::setPrev(), and UT_return_if_fail.

Referenced by fl_HdrFtrSectionLayout::~fl_HdrFtrSectionLayout().

void FL_DocLayout::removeSection ( fl_DocSectionLayout pSL  ) 

This method removes a DocSectionLayout from the linked list of SectionLayout's and updates the m_pFirstSection and m_pLastSection member variables accordingly

Parameters:
fl_DocSectionLayout * pSL the DocSectionLayout to be removed.

References fl_ContainerLayout::getNext(), fl_DocSectionLayout::getNextDocSection(), fl_ContainerLayout::getPrev(), fl_DocSectionLayout::getPrevDocSection(), m_pFirstSection, m_pLastSection, fl_ContainerLayout::setNext(), fl_ContainerLayout::setPrev(), UT_ASSERT, and UT_return_if_fail.

Referenced by fl_HdrFtrSectionLayout::changeIntoHdrFtrSection(), and fl_DocSectionLayout::doclistener_deleteStrux().

bool FL_DocLayout::removeTOC ( fl_TOCLayout pTOC  ) 
void FL_DocLayout::setDisplayAnnotations ( bool  bDisplayAnnotations  ) 

References m_bDisplayAnnotations.

void FL_DocLayout::setDisplayRDFAnchors ( bool  v  ) 

References m_bDisplayRDFAnchors.

bool FL_DocLayout::setDocViewPageSize ( const PP_AttrProp pAP  ) 
void FL_DocLayout::setFramePageNumbers ( UT_sint32  iStartPage  ) 

Starting from page iStartPage, set the page numbers of the frames in the document.

References countPages(), getNthPage(), and fp_Page::setPageNumberInFrames().

Referenced by fb_ColumnBreaker::_breakSection(), deletePage(), and fillLayouts().

void FL_DocLayout::setGraphics ( GR_Graphics pG  ) 

Change the graphics pointer for this layout.Needed for quick zoom.

References m_iGraphicTick, m_pG, and updatePropsRebuild().

Referenced by FV_View::replaceGraphics().

void FL_DocLayout::setLayoutIsFilling ( bool  bisFill  )  [inline]

Referenced by fillLayouts(), and FL_DocLayout().

void FL_DocLayout::setNeedsRedraw ( void   ) 
void FL_DocLayout::setPendingSmartQuote ( fl_BlockLayout block,
UT_uint32  offset 
)
void FL_DocLayout::setPercentFilled ( UT_sint32  iFill  )  [inline]
void FL_DocLayout::setQuickPrint ( GR_Graphics pGraphics  ) 
void FL_DocLayout::setRebuiltBlock ( fl_BlockLayout pBlock  ) 
void FL_DocLayout::setSaveContainerPointer ( fp_Container pContainer  ) 

Code to deal with Dangling Pointers in fb_ColumnBreaker. Unfortunately there is no way to avoid the problem that some containers will get deleted during a page wrap. Even more unfortunately we need to hold a pointer to a container in fb_ColumnBreaker that coukd get deleted. This code allows us to detect and repair the damage when this occurs.

The save the pointer that might be left dangling. This methos is called from fb_ColumnBreak. We set a boolean inside this class that tells us we need signal fl_Doclayout that it has been deleted. The pointer m_pRebuiltBlock is the block that contains the Container. The pointer to it will be set within BlockLayout when the container gets deleted

References m_pRebuiltBlockLayout, m_pSavedContainer, and fp_ContainerObject::setAllowDelete().

Referenced by fb_ColumnBreaker::_breakSection().

void FL_DocLayout::setSkipUpdates ( UT_uint32  numSkips  )  [inline]
void FL_DocLayout::setSpellQueueHead ( fl_BlockLayout h  )  [inline]
void FL_DocLayout::setSpellQueueHead ( fl_BlockLayout h  )  [inline]

References m_toSpellCheckHead.

void FL_DocLayout::setSpellQueueTail ( fl_BlockLayout t  )  [inline]

References m_toSpellCheckTail.

void FL_DocLayout::setSpellQueueTail ( fl_BlockLayout t  )  [inline]
void FL_DocLayout::setView ( FV_View pView  ) 
fl_BlockLayout* FL_DocLayout::spellQueueHead ( void   )  const [inline]

References m_toSpellCheckHead.

fl_BlockLayout* FL_DocLayout::spellQueueHead ( void   )  const [inline]
void FL_DocLayout::triggerPendingBlock ( fl_BlockLayout pBL  ) 
void FL_DocLayout::updateColor (  ) 
void FL_DocLayout::updateLayout ( void   ) 
void FL_DocLayout::updateOnViewModeChange (  ) 
void FL_DocLayout::updatePropsNoRebuild ( void   ) 

References _lookupProperties().

Referenced by fl_DocListener::signal().

void FL_DocLayout::updatePropsRebuild ( void   ) 
bool FL_DocLayout::updateTOCsOnBookmarkChange ( const gchar *  pBookmark  ) 

Friends And Related Function Documentation

friend class fl_BlockLayout [friend]
friend class fl_DocListener [friend]

Referenced by fillLayouts().


Member Data Documentation

Referenced by _prefsListener(), and setView().

Referenced by _prefsListener().

Referenced by ~FL_DocLayout().

Referenced by fillLayouts().

Referenced by setQuickPrint().

Referenced by _lookupProperties().

Referenced by _lookupProperties().

Referenced by _lookupProperties(), and getEndnoteVal().

Referenced by _prefsListener().

Referenced by _prefsListener().

Referenced by _prefsListener().

Referenced by ~FL_DocLayout().

Referenced by _lookupProperties().

Referenced by fillLayouts().

Referenced by _lookupProperties(), and getEndnoteVal().

Referenced by fillLayouts(), and setView().

Referenced by _prefsListener(), and setGraphics().

Referenced by _setDocPageDimensions().

Referenced by _setDocPageDimensions().

Referenced by fillLayouts(), and setView().

Referenced by _redrawUpdate().

std::map<std::string, GR_EmbedManager *> FL_DocLayout::m_mapEmbedManager [private]

Referenced by getEmbedManager(), and ~FL_DocLayout().

std::map<std::string, GR_EmbedManager *> FL_DocLayout::m_mapQuickPrintEmbedManager [private]

Referenced by ~FL_DocLayout().

Referenced by fillLayouts(), and ~FL_DocLayout().

Referenced by FL_DocLayout(), and ~FL_DocLayout().

Referenced by main(), and setSpellQueueTail().

Referenced by setPendingSmartQuote().


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