pt_PieceTable Class Reference

#include <pt_PieceTable.h>

List of all members.

Public Member Functions

 pt_PieceTable (PD_Document *pDocument)
 ~pt_PieceTable ()
void setPieceTableState (PTState pts)
PTState getPieceTableState () const
void beginMultiStepGlob (void)
void endMultiStepGlob (void)
void beginUserAtomicGlob (void)
void endUserAtomicGlob (void)
void setClean (void)
bool isDirty (void) const
bool canDo (bool bUndo) const
UT_uint32 undoCount (bool bUndo) const
bool undoCmd (void)
bool redoCmd (void)
bool getNthUndo (PX_ChangeRecord **ppcr, UT_uint32 undoNdx) const
bool getUndo (PX_ChangeRecord **ppcr, bool bStatic=false) const
bool getRedo (PX_ChangeRecord **ppcr) const
void clearUndo ()
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties)
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties, pf_Frag_Object **ppfo)
bool insertSpan (PT_DocPosition dpos, const UT_UCSChar *p, UT_uint32 length, fd_Field *pField=NULL, bool bAddChangeRec=true)
bool deleteSpan (PT_DocPosition dpos1, PT_DocPosition dpos2, PP_AttrProp *p_AttrProp_Before, UT_uint32 &iRealDeleteCount, bool bDontGlob=false)
bool deleteSpan (PT_DocPosition dpos1, PT_DocPosition dpos2, PP_AttrProp *p_AttrProp_Before, UT_uint32 &iRealDeleteCount, bool bDeleteTableStruxes, bool bDontGlob)
bool createAndSendCR (PT_DocPosition dpos, UT_sint32 iType, bool bSave, UT_Byte iGlob)
bool createAndSendDocPropCR (const gchar **pAtts, const gchar **pProps)
bool deleteSpanWithTable (PT_DocPosition dpos1, PT_DocPosition dpos2, PP_AttrProp *p_AttrProp_Before, UT_uint32 &iRealDeleteCount, bool bDeleteTableStrux)
bool deleteFieldFrag (pf_Frag *pf)
void deleteHdrFtrStrux (pf_Frag_Strux *pfs)
bool changeSpanFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties)
bool insertStrux (PT_DocPosition dpos, PTStruxType pts, pf_Frag_Strux **ppfs_ret=0)
bool insertStrux (PT_DocPosition dpos, PTStruxType pts, const gchar **attributes, const gchar **properties, pf_Frag_Strux **ppfs_ret=0)
bool changeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties, PTStruxType pts=PTX_StruxDummy)
bool changeStruxFmtNoUndo (PTChangeFmt ptc, pf_Frag_Strux *pfs, const gchar **attributes, const gchar **properties)
bool changeStruxFormatNoUpdate (PTChangeFmt ptc, pf_Frag_Strux *pfs, const gchar **attributes)
bool changeObjectFormatNoUpdate (PTChangeFmt ptc, pf_Frag_Object *pfo, const gchar **attributes, const gchar **properties)
bool changeStruxForLists (PL_StruxDocHandle sdh, const char *pszParentID)
bool changeSectionAttsNoUpdate (pf_Frag_Strux *pfStrux, const char *attr, const char *attvalue)
bool deleteStruxNoUpdate (PL_StruxDocHandle sdh)
bool deleteFragNoUpdate (pf_Frag *pf)
bool deleteStruxWithNotify (PL_StruxDocHandle sdh)
bool insertStruxNoUpdateBefore (PL_StruxDocHandle sdh, PTStruxType pts, const gchar **attributes)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const gchar **attrs, const gchar **props, bool bSkipEmbededSections)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const gchar **attrs, const gchar *props, bool bSkipEmbededSections)
bool insertFmtMark (PTChangeFmt ptc, PT_DocPosition dpos, PP_AttrProp *p_AttrProp)
bool deleteFmtMark (PT_DocPosition dpos)
PD_DocumentgetDocument (void)
bool appendStrux (PTStruxType pts, const gchar **attributes, pf_Frag_Strux **ppfs_ret=0)
bool appendStruxFmt (pf_Frag_Strux *pfs, const gchar **attributes)
bool appendLastStruxFmt (PTStruxType pts, const gchar **attrs, const gchar **props, bool bSkipEmbededSections)
bool appendLastStruxFmt (PTStruxType pts, const gchar **attrs, const gchar *props, bool bSkipEmbededSections)
bool appendFmt (const gchar **attributes)
bool appendFmt (const UT_GenericVector< const gchar * > *pVecAttributes)
bool appendSpan (const UT_UCSChar *p, UT_uint32 length)
bool appendObject (PTObjectType pto, const gchar **attributes)
bool appendFmtMark (void)
bool appendStyle (const gchar **attributes)
bool insertStruxBeforeFrag (pf_Frag *pF, PTStruxType pts, const gchar **attributes, pf_Frag_Strux **ppfs_ret=0)
bool insertSpanBeforeFrag (pf_Frag *pF, const UT_UCSChar *p, UT_uint32 length)
bool insertObjectBeforeFrag (pf_Frag *pF, PTObjectType pto, const gchar **attributes)
bool insertFmtMarkBeforeFrag (pf_Frag *pF)
bool insertFmtMarkBeforeFrag (pf_Frag *pF, const gchar **attributes)
bool removeStyle (const gchar *name)
size_t getStyleCount (void) const
bool tellListener (PL_Listener *pListener)
bool tellListenerSubset (PL_Listener *pListener, PD_DocumentRange *pDocRange)
bool addListener (PL_Listener *pListener, PL_ListenerId listenerId)
bool getAttrProp (PT_AttrPropIndex indexAP, const PP_AttrProp **ppAP) const
bool getSpanAttrProp (PL_StruxDocHandle sdh, UT_uint32 offset, bool bLeftSide, const PP_AttrProp **ppAP) const
const UT_UCSChargetPointer (PT_BufIndex bi) const
bool getBlockBuf (PL_StruxDocHandle sdh, UT_GrowBuf *pgb) const
bool getBounds (bool bEnd, PT_DocPosition &docPos) const
PT_DocPosition getStruxPosition (PL_StruxDocHandle sdh) const
PT_DocPosition getFragPosition (const pf_Frag *pfToFind) const
bool getFragFromPosition (PT_DocPosition docPos, pf_Frag **ppf, PT_BlockOffset *pOffset) const
bool getStruxOfTypeFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, PTStruxType pts, PL_StruxFmtHandle *psfh) const
bool getStruxOfTypeFromPosition (PT_DocPosition docPos, PTStruxType pts, PL_StruxDocHandle *sdh) const
 return the SDH of the last strux of the given type immediately prior to the given absolute document position.
bool getStruxFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, PL_StruxFmtHandle *psfh) const
bool getFragsFromPositions (PT_DocPosition dPos1, PT_DocPosition dPos2, pf_Frag **ppf1, PT_BlockOffset *pOffset1, pf_Frag **ppf2, PT_BlockOffset *pOffset2) const
bool getStyle (const char *szName, PD_Style **ppStyle) const
bool enumStyles (UT_uint32 k, const char **pszName, const PD_Style **ppStyle) const
bool enumStyles (UT_GenericVector< PD_Style * > *&pStyles) const
const UT_GenericStringMap
< PD_Style * > & 
getAllStyles () const
bool isEndFootnote (pf_Frag *pf) const
bool isFootnote (pf_Frag *pf) const
void clearIfAtFmtMark (PT_DocPosition dpos)
UT_uint32 getFragNumber (pf_Frag *pFrag) const
pt_VarSetgetVarSet (void)
pf_FragmentsgetFragments (void)
bool purgeFmtMarks ()
bool isDoingTheDo (void) const
void setDoNotTweakPosition (bool b)
UT_uint32 getXID ()
UT_uint32 getTopXID () const
void setXIDThreshold (UT_uint32 i)
void fixMissingXIDs ()
void setCRNumber (UT_sint32 iCRNumber)

Static Public Member Functions

static void s_getLocalisedStyleName (const char *szStyle, UT_UTF8String &utf8)

Protected Member Functions

bool _realInsertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties)
bool _realInsertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties, pf_Frag_Object **ppfo)
bool _realInsertSpan (PT_DocPosition dpos, const UT_UCSChar *p, UT_uint32 length, const gchar **attributes, const gchar **properties, fd_Field *pField=NULL, bool bAddChangeRec=true)
bool _realDeleteSpan (PT_DocPosition dpos1, PT_DocPosition dpos2, PP_AttrProp *p_AttrProp_Before, bool bDeleteTableStruxes, bool bDontGlob=false)
void _realDeleteHdrFtrStrux (pf_Frag_Strux *pfs)
bool _realChangeSpanFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties, bool bRevisionDelete)
bool _realInsertStrux (PT_DocPosition dpos, PTStruxType pts, const gchar **attributes, const gchar **properties, pf_Frag_Strux **ppfs_ret)
bool _realChangeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties, PTStruxType pts, bool bRevisionDelete)
bool _realChangeStruxForLists (PL_StruxDocHandle sdh, const char *pszParentID, bool bRevisionDelete)
bool _realChangeSectionAttsNoUpdate (pf_Frag_Strux *pfStrux, const char *attr, const char *attvalue)
pf_Frag_findLastStruxOfType (pf_Frag *pfStart, PTStruxType pst, bool bSkipEmbeded)
pf_Frag_findPrevHyperlink (pf_Frag *pfStart)
pf_Frag_findNextHyperlink (pf_Frag *pfStart)
bool _tellAndMaybeAddListener (PL_Listener *pListener, PL_ListenerId listenerId, bool bAdd)
void _captureActiveSpan (pf_Frag_Strux_Block *pfsBlock)
PT_AttrPropIndex _chooseIndexAP (pf_Frag *pf, PT_BlockOffset fragOffset)
bool _canCoalesceInsertSpan (PX_ChangeRecord_Span *pcrSpan) const
bool _createStrux (PTStruxType pts, PT_AttrPropIndex indexAP, pf_Frag_Strux **ppfs)
void _insertStrux (pf_Frag *pf, PT_BlockOffset fragOffset, pf_Frag_Strux *pfsNew)
bool _insertObject (pf_Frag *pf, PT_BlockOffset fragOffset, PTObjectType pto, PT_AttrPropIndex indexAP, pf_Frag_Object *&pfo)
bool _createObject (PTObjectType pto, PT_AttrPropIndex indexAP, pf_Frag_Object **ppfo)
bool _insertSpan (pf_Frag *pf, PT_BufIndex bi, PT_BlockOffset fragOffset, UT_uint32 length, PT_AttrPropIndex indexAP, fd_Field *pField=NULL)
bool _StruxIsNotTable (pf_Frag_Strux *pfs)
bool _deleteSpan (pf_Frag_Text *pft, UT_uint32 fragOffset, PT_BufIndex bi, UT_uint32 length, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
void _unlinkFrag (pf_Frag *pf, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _getStruxFromPosition (PT_DocPosition docPos, pf_Frag_Strux **ppfs, bool bSkipFootnotes=false) const
bool _getStruxOfTypeFromPosition (PT_DocPosition dpos, PTStruxType pts, pf_Frag_Strux **ppfs) const
bool _doTheDo (const PX_ChangeRecord *pcr, bool bUndo)
bool _struxHasContent (pf_Frag_Strux *pfs) const
bool _struxIsEmpty (pf_Frag_Strux *pfs) const
bool _unlinkStrux (pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _unlinkStrux_Block (pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _unlinkStrux_Section (pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _canCoalesceDeleteSpan (PX_ChangeRecord_Span *pcrSpan) const
bool _deleteSpanWithNotify (PT_DocPosition dpos, pf_Frag_Text *pft, UT_uint32 fragOffset, UT_uint32 length, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd, bool bAddChangeRec=true)
bool _isSimpleDeleteSpan (PT_DocPosition dpos1, PT_DocPosition dpos2) const
void _tweakFieldSpan (PT_DocPosition &dpos1, PT_DocPosition &dpos2) const
bool _tweakDeleteSpanOnce (PT_DocPosition &dpos1, PT_DocPosition &dpos2, UT_Stack *pstDelayStruxDelete) const
bool _tweakDeleteSpan (PT_DocPosition &dpos1, PT_DocPosition &dpos2, UT_Stack *pstDelayStruxDelete) const
bool _deleteFormatting (PT_DocPosition dpos1, PT_DocPosition dpos2)
bool _deleteComplexSpan (PT_DocPosition &dpos1, PT_DocPosition &dpos2, UT_Stack *stDelayStruxDelete)
bool _deleteComplexSpan_norec (PT_DocPosition dpos1, PT_DocPosition dpos2)
bool _deleteObject (pf_Frag_Object *pfo, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _deleteObjectWithNotify (PT_DocPosition dpos, pf_Frag_Object *pfo, UT_uint32 fragOffset, UT_uint32 length, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd, bool bAddChangeRec=true)
bool _deleteObject_norec (PT_DocPosition dpos, pf_Frag_Object *pfo, UT_uint32 fragOffset, UT_uint32 length, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _deleteStruxWithNotify (PT_DocPosition dpos, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd, bool bWithRec=true)
bool _deleteHdrFtrsFromSectionStruxIfPresent (pf_Frag_Strux_Section *pfStruxSec)
void _deleteHdrFtrStruxWithNotify (pf_Frag_Strux *pfFragStruxHdrFtr)
bool _fixHdrFtrReferences (const gchar *pType, const gchar *pId, bool bNotional=false)
bool _fmtChangeStrux (pf_Frag_Strux *pfs, PT_AttrPropIndex indexNewAP)
bool _fmtChangeStruxWithNotify (PTChangeFmt ptc, pf_Frag_Strux *pfs, const gchar **attributes, const gchar **properties, bool bRevisionDelete)
bool _fmtChangeStruxWithNotify (PTChangeFmt ptc, pf_Frag_Strux *pfs, const gchar **attributes, const gchar **properties, bool bDoAll, bool bRevisionDelete)
bool _fmtChangeSpan (pf_Frag_Text *pft, UT_uint32 fragOffset, UT_uint32 length, PT_AttrPropIndex indexNewAP, pf_Frag **ppfNewEnd, UT_uint32 *pfragOffsetNewEnd)
bool _fmtChangeSpanWithNotify (PTChangeFmt ptc, pf_Frag_Text *pft, UT_uint32 fragOffset, PT_DocPosition dpos, UT_uint32 length, const gchar **attributes, const gchar **properties, pf_Frag_Strux *pfs, pf_Frag **ppfNewEnd, UT_uint32 *pfragOffsetNewEnd, bool bRevisionDelete)
bool _fmtChangeObject (pf_Frag_Object *pfo, PT_AttrPropIndex indexNewAP, pf_Frag **ppfNewEnd, UT_uint32 *pfragOffsetNewEnd)
bool _fmtChangeObjectWithNotify (PTChangeFmt ptc, pf_Frag_Object *pfo, UT_uint32 fragOffset, PT_DocPosition dpos, UT_uint32 length, const gchar **attributes, const gchar **properties, pf_Frag_Strux *pfs, pf_Frag **ppfNewEnd, UT_uint32 *pfragOffsetNewEnd, bool bRevisionDelete)
bool _getStruxFromFrag (pf_Frag *pfStart, pf_Frag_Strux **ppfs) const
bool _getStruxFromFragSkip (pf_Frag *pfStart, pf_Frag_Strux **ppfs) const
bool _getNextStruxAfterFragSkip (pf_Frag *pfStart, pf_Frag_Strux **ppfs)
bool _getStruxFromPositionSkip (PT_DocPosition docPos, pf_Frag_Strux **ppfs) const
UT_uint32 _computeBlockOffset (pf_Frag_Strux *pfs, pf_Frag *pfTarget) const
bool _loadBuiltinStyles (void)
bool _createBuiltinStyle (const char *szName, bool bDisplayed, const gchar **attributes)
bool _insertFmtMarkFragWithNotify (PTChangeFmt ptc, PT_DocPosition dpos, const gchar **attributes, const gchar **properties)
bool _insertFmtMarkFragWithNotify (PTChangeFmt ptc, PT_DocPosition dpos, PP_AttrProp *p_AttrProp)
bool _insertFmtMark (pf_Frag *pf, UT_uint32 fragOffset, PT_AttrPropIndex api)
bool _insertFmtMarkAfterBlockWithNotify (pf_Frag_Strux *pfsBlock, PT_DocPosition dpos, PT_AttrPropIndex api)
bool _deleteFmtMarkWithNotify (PT_DocPosition dpos, pf_Frag_FmtMark *pffm, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _deleteFmtMark (pf_Frag_FmtMark *pffm, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _fmtChangeFmtMarkWithNotify (PTChangeFmt ptc, pf_Frag_FmtMark *pffm, PT_DocPosition dpos, const gchar **attributes, const gchar **properties, pf_Frag_Strux *pfs, pf_Frag **ppfEnd, UT_uint32 *pfragOffsetEnd)
bool _fmtChangeFmtMark (pf_Frag_FmtMark *pffm, PT_AttrPropIndex indexNewAP, pf_Frag **ppfNewEnd, UT_uint32 *pfragOffsetNewEnd)
bool _computeFmtMarkForNewBlock (pf_Frag_Strux *pfsBlock, pf_Frag *pfCurrent, PT_BlockOffset fragOffset, PT_AttrPropIndex *pFmtMarkAP)
bool _getSpanAttrPropHelper (pf_Frag *pf, const PP_AttrProp **ppAP) const
bool _lastUndoIsThisFmtMark (PT_DocPosition dpos)
bool _changePointWithNotify (PT_DocPosition dpos)
bool _makeStrux (PTStruxType pts, const gchar **attributes, pf_Frag_Strux *&pfs)
bool _makeObject (PTObjectType pto, const gchar **attributes, pf_Frag_Object *&pfo)
bool _makeFmtMark (pf_Frag_FmtMark *&pff)
bool _makeFmtMark (pf_Frag_FmtMark *&pff, const gchar **attributes)
UT_sint32 _getNextChangeRecordNumber (void)
bool _translateRevisionAttribute (PP_RevisionAttr &Revisions, PT_AttrPropIndex indexAP, PP_RevisionType eType, const gchar **&ppRevAttrib, const gchar **&ppRevProps, const gchar **ppAttrib, const gchar **ppProps)

Protected Attributes

PTState m_pts
pt_VarSet m_varset
px_ChangeHistory m_history
pf_Fragments m_fragments
UT_GenericStringMap< PD_Style * > m_hashStyles
struct {
   PT_AttrPropIndex   m_indexCurrentInlineAP
loading
PD_Documentm_pDocument
UT_uint32 m_atomicGlobCount
bool m_bDoingTheDo
bool m_bDoNotTweakPosition
UT_uint32 m_iXID
UT_sint32 m_iCurCRNumber

Friends

class PX_ChangeRecord


Constructor & Destructor Documentation

pt_PieceTable::pt_PieceTable ( PD_Document pDocument  ) 

pt_PieceTable::~pt_PieceTable (  ) 


Member Function Documentation

void pt_PieceTable::setPieceTableState ( PTState  pts  ) 

PTState pt_PieceTable::getPieceTableState (  )  const [inline]

void pt_PieceTable::beginMultiStepGlob ( void   ) 

void pt_PieceTable::endMultiStepGlob ( void   ) 

void pt_PieceTable::beginUserAtomicGlob ( void   ) 

void pt_PieceTable::endUserAtomicGlob ( void   ) 

void pt_PieceTable::setClean ( void   ) 

bool pt_PieceTable::isDirty ( void   )  const

bool pt_PieceTable::canDo ( bool  bUndo  )  const

References px_ChangeHistory::canDo(), and m_history.

Referenced by PD_Document::canDo().

UT_uint32 pt_PieceTable::undoCount ( bool  bUndo  )  const

bool pt_PieceTable::undoCmd ( void   ) 

bool pt_PieceTable::redoCmd ( void   ) 

bool pt_PieceTable::getNthUndo ( PX_ChangeRecord **  ppcr,
UT_uint32  undoNdx 
) const [inline]

bool pt_PieceTable::getUndo ( PX_ChangeRecord **  ppcr,
bool  bStatic = false 
) const [inline]

bool pt_PieceTable::getRedo ( PX_ChangeRecord **  ppcr  )  const [inline]

void pt_PieceTable::clearUndo (  )  [inline]

Referenced by PD_Document::_clearUndo().

void pt_PieceTable::s_getLocalisedStyleName ( const char *  szStyle,
UT_UTF8String utf8 
) [static]

bool pt_PieceTable::_realInsertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const gchar **  attributes,
const gchar **  properties 
) [protected]

bool pt_PieceTable::_realInsertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Object **  ppfo 
) [protected]

bool pt_PieceTable::_realInsertSpan ( PT_DocPosition  dpos,
const UT_UCSChar p,
UT_uint32  length,
const gchar **  attributes,
const gchar **  properties,
fd_Field pField = NULL,
bool  bAddChangeRec = true 
) [protected]

bool pt_PieceTable::_realDeleteSpan ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
PP_AttrProp p_AttrProp_Before,
bool  bDeleteTableStruxes,
bool  bDontGlob = false 
) [protected]

void pt_PieceTable::_realDeleteHdrFtrStrux ( pf_Frag_Strux pfs  )  [protected]

bool pt_PieceTable::_realChangeSpanFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const gchar **  attributes,
const gchar **  properties,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_realInsertStrux ( PT_DocPosition  dpos,
PTStruxType  pts,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Strux **  ppfs_ret 
) [protected]

bool pt_PieceTable::_realChangeStruxFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const gchar **  attributes,
const gchar **  properties,
PTStruxType  pts,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_realChangeStruxForLists ( PL_StruxDocHandle  sdh,
const char *  pszParentID,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_realChangeSectionAttsNoUpdate ( pf_Frag_Strux pfs,
const char *  atts,
const char *  attsValue 
) [protected]

This Method implements the change strux we need to reparent lists.

References _fmtChangeStrux(), getDocument(), pf_Frag::getIndexAP(), m_varset, pt_VarSet::mergeAP(), PTC_AddFmt, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.

Referenced by changeSectionAttsNoUpdate().

bool pt_PieceTable::insertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const gchar **  attributes,
const gchar **  properties 
)

bool pt_PieceTable::insertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Object **  ppfo 
)

bool pt_PieceTable::insertSpan ( PT_DocPosition  dpos,
const UT_UCSChar p,
UT_uint32  length,
fd_Field pField = NULL,
bool  bAddChangeRec = true 
)

bool pt_PieceTable::deleteSpan ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
PP_AttrProp p_AttrProp_Before,
UT_uint32 iRealDeleteCount,
bool  bDontGlob = false 
)

bool pt_PieceTable::deleteSpan ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
PP_AttrProp p_AttrProp_Before,
UT_uint32 iRealDeleteCount,
bool  bDeleteTableStruxes,
bool  bDontGlob 
)

bool pt_PieceTable::createAndSendCR ( PT_DocPosition  dpos,
UT_sint32  iType,
bool  bSave,
UT_Byte  iGlob 
)

bool pt_PieceTable::createAndSendDocPropCR ( const gchar **  pAtts,
const gchar **  pProps 
)

bool pt_PieceTable::deleteSpanWithTable ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
PP_AttrProp p_AttrProp_Before,
UT_uint32 iRealDeleteCount,
bool  bDeleteTableStrux 
)

References deleteSpan().

Referenced by PD_Document::deleteSpan().

bool pt_PieceTable::deleteFieldFrag ( pf_Frag pf  ) 

void pt_PieceTable::deleteHdrFtrStrux ( pf_Frag_Strux pfs  ) 

bool pt_PieceTable::changeSpanFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const gchar **  attributes,
const gchar **  properties 
)

bool pt_PieceTable::insertStrux ( PT_DocPosition  dpos,
PTStruxType  pts,
pf_Frag_Strux **  ppfs_ret = 0 
)

bool pt_PieceTable::insertStrux ( PT_DocPosition  dpos,
PTStruxType  pts,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Strux **  ppfs_ret = 0 
)

bool pt_PieceTable::changeStruxFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const gchar **  attributes,
const gchar **  properties,
PTStruxType  pts = PTX_StruxDummy 
)

bool pt_PieceTable::changeStruxFmtNoUndo ( PTChangeFmt  ptc,
pf_Frag_Strux pfs,
const gchar **  attributes,
const gchar **  properties 
)

This method sends out change records to the layouts but it does put revision marks on them nor are they saved in the undo stack. It's used by the strux resizer for the hdrftr and maybe later for the frame.

References _fmtChangeStrux(), getDocument(), getFragPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Strux::getStruxType(), m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PX_ChangeRecord::PXT_ChangeStrux, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.

Referenced by PD_Document::changeStruxFmtNoUndo().

bool pt_PieceTable::changeStruxFormatNoUpdate ( PTChangeFmt  ptc,
pf_Frag_Strux pfs,
const gchar **  attributes 
)

bool pt_PieceTable::changeObjectFormatNoUpdate ( PTChangeFmt  ptc,
pf_Frag_Object pfo,
const gchar **  attributes,
const gchar **  properties 
)

bool pt_PieceTable::changeStruxForLists ( PL_StruxDocHandle  sdh,
const char *  pszParentID 
)

bool pt_PieceTable::changeSectionAttsNoUpdate ( pf_Frag_Strux pfStrux,
const char *  attr,
const char *  attvalue 
)

bool pt_PieceTable::deleteStruxNoUpdate ( PL_StruxDocHandle  sdh  ) 

Use this for deleting unneeded strux during doc import. Particularly useful for importing RTF.

References getFragments(), pf_Frag::getNext(), pf_Frag::getType(), pf_Frag::PFT_FmtMark, pf_Fragments::unlinkFrag(), and UT_DEBUGMSG.

Referenced by PD_Document::deleteStrux(), and PD_Document::deleteStruxNoUpdate().

bool pt_PieceTable::deleteFragNoUpdate ( pf_Frag pf  ) 

Use this for deleting unused sections of the document during import. In Particular use this to remove unused headers/footers.

References getFragments(), pf_Fragments::unlinkFrag(), and UT_DEBUGMSG.

Referenced by PD_Document::_checkAndFixTable(), PD_Document::_removeHdrFtr(), and PD_Document::deleteFragNoUpdate().

bool pt_PieceTable::deleteStruxWithNotify ( PL_StruxDocHandle  sdh  ) 

Delete the single strux given in sdh and create and record a change record.

References _deleteStruxWithNotify(), and pf_Frag::getPos().

Referenced by PD_Document::deleteStrux().

bool pt_PieceTable::insertStruxNoUpdateBefore ( PL_StruxDocHandle  sdh,
PTStruxType  pts,
const gchar **  attributes 
)

This method inserts a strux of type pts immediately before the sdh given. Attributes of the strux can be optionally passed. This method does not throw a change record and should only be used under exceptional circumstances to repair the piecetable during loading. It was necessary to import RTF tables.

References _createStrux(), getDocument(), pf_Frag::getIndexAP(), pf_Frag::getPrev(), pf_Fragments::insertFrag(), m_fragments, m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::miniDump(), PTC_AddFmt, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_UNUSED.

Referenced by PD_Document::insertStruxNoUpdateBefore().

bool pt_PieceTable::changeLastStruxFmtNoUndo ( PT_DocPosition  dpos,
PTStruxType  pts,
const gchar **  attrs,
const gchar **  props,
bool  bSkipEmbededSections 
)

bool pt_PieceTable::changeLastStruxFmtNoUndo ( PT_DocPosition  dpos,
PTStruxType  pts,
const gchar **  attrs,
const gchar *  props,
bool  bSkipEmbededSections 
)

bool pt_PieceTable::insertFmtMark ( PTChangeFmt  ptc,
PT_DocPosition  dpos,
PP_AttrProp p_AttrProp 
) [inline]

bool pt_PieceTable::deleteFmtMark ( PT_DocPosition  dpos  ) 

PD_Document * pt_PieceTable::getDocument ( void   ) 

bool pt_PieceTable::appendStrux ( PTStruxType  pts,
const gchar **  attributes,
pf_Frag_Strux **  ppfs_ret = 0 
)

bool pt_PieceTable::appendStruxFmt ( pf_Frag_Strux pfs,
const gchar **  attributes 
)

bool pt_PieceTable::appendLastStruxFmt ( PTStruxType  pst,
const gchar **  attributes,
const gchar **  props,
bool  bSkipEmbededSections 
)

Changes formating of the last strux of type pts bSkipEmbededSections indicates whether when an end of an embeded section is encountered, the entire section is to be skipped over, for example if the end of the document looks like

<footnote>

</footnote>

when searching for

if bSkipEmbededSections == true the paragraph before <footnote> will be modified

References _findLastStruxOfType(), pt_VarSet::addIfUniqueAP(), PP_AttrProp::cloneWithReplacements(), getAttrProp(), pf_Fragments::getFirst(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), m_fragments, m_pts, m_varset, PP_AttrProp::markReadOnly(), PTS_Loading, pf_Frag::setIndexAP(), and UT_return_val_if_fail.

Referenced by appendLastStruxFmt(), and PD_Document::appendLastStruxFmt().

bool pt_PieceTable::appendLastStruxFmt ( PTStruxType  pst,
const gchar **  attributes,
const gchar *  props,
bool  bSkipEmbededSections 
)

As above, but props represented by a single XML string

References appendLastStruxFmt(), FREEP, gchar, UT_return_val_if_fail, and UT_splitPropsToArray().

bool pt_PieceTable::appendFmt ( const gchar **  attributes  ) 

bool pt_PieceTable::appendFmt ( const UT_GenericVector< const gchar * > *  pVecAttributes  ) 

bool pt_PieceTable::appendSpan ( const UT_UCSChar p,
UT_uint32  length 
)

bool pt_PieceTable::appendObject ( PTObjectType  pto,
const gchar **  attributes 
)

bool pt_PieceTable::appendFmtMark ( void   ) 

bool pt_PieceTable::appendStyle ( const gchar **  attributes  ) 

bool pt_PieceTable::insertStruxBeforeFrag ( pf_Frag pF,
PTStruxType  pts,
const gchar **  attributes,
pf_Frag_Strux **  ppfs_ret = 0 
)

bool pt_PieceTable::insertSpanBeforeFrag ( pf_Frag pF,
const UT_UCSChar p,
UT_uint32  length 
)

bool pt_PieceTable::insertObjectBeforeFrag ( pf_Frag pF,
PTObjectType  pto,
const gchar **  attributes 
)

bool pt_PieceTable::insertFmtMarkBeforeFrag ( pf_Frag pF  ) 

bool pt_PieceTable::insertFmtMarkBeforeFrag ( pf_Frag pF,
const gchar **  attributes 
)

bool pt_PieceTable::removeStyle ( const gchar *  name  ) 

size_t pt_PieceTable::getStyleCount ( void   )  const

bool pt_PieceTable::tellListener ( PL_Listener pListener  ) 

bool pt_PieceTable::tellListenerSubset ( PL_Listener pListener,
PD_DocumentRange pDocRange 
)

bool pt_PieceTable::addListener ( PL_Listener pListener,
PL_ListenerId  listenerId 
)

bool pt_PieceTable::getAttrProp ( PT_AttrPropIndex  indexAP,
const PP_AttrProp **  ppAP 
) const

bool pt_PieceTable::getSpanAttrProp ( PL_StruxDocHandle  sdh,
UT_uint32  offset,
bool  bLeftSide,
const PP_AttrProp **  ppAP 
) const

const UT_UCSChar* pt_PieceTable::getPointer ( PT_BufIndex  bi  )  const [inline]

bool pt_PieceTable::getBlockBuf ( PL_StruxDocHandle  sdh,
UT_GrowBuf pgb 
) const

Copy paragraph (block) into buffer

Parameters:
sdh Paragraph to copy
Return values:
pgb Buffer where text should be copied to
Returns:
Always returns true
Copy the contents (unicode character data) of the paragraph (block) into the growbuf given. We append the content onto the growbuf.

References pf_Frag_Text::getBufIndex(), pf_Frag::getLength(), UT_GrowBuf::getLength(), pf_Frag::getNext(), getPointer(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), UT_GrowBuf::ins(), isEndFootnote(), isFootnote(), pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PTX_Block, PTX_SectionTOC, UCS_ABI_OBJECT, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.

Referenced by PD_Document::getBlockBuf().

bool pt_PieceTable::getBounds ( bool  bEnd,
PT_DocPosition docPos 
) const

PT_DocPosition pt_PieceTable::getStruxPosition ( PL_StruxDocHandle  sdh  )  const

PT_DocPosition pt_PieceTable::getFragPosition ( const pf_Frag pfToFind  )  const

bool pt_PieceTable::getFragFromPosition ( PT_DocPosition  docPos,
pf_Frag **  ppf,
PT_BlockOffset pOffset 
) const

bool pt_PieceTable::getStruxOfTypeFromPosition ( PL_ListenerId  listenerId,
PT_DocPosition  docPos,
PTStruxType  pts,
PL_StruxFmtHandle psfh 
) const

bool pt_PieceTable::getStruxOfTypeFromPosition ( PT_DocPosition  docPos,
PTStruxType  pts,
PL_StruxDocHandle sdh 
) const

return the SDH of the last strux of the given type immediately prior to the given absolute document position.

References _getStruxOfTypeFromPosition().

bool pt_PieceTable::getStruxFromPosition ( PL_ListenerId  listenerId,
PT_DocPosition  docPos,
PL_StruxFmtHandle psfh 
) const

bool pt_PieceTable::getFragsFromPositions ( PT_DocPosition  dPos1,
PT_DocPosition  dPos2,
pf_Frag **  ppf1,
PT_BlockOffset pOffset1,
pf_Frag **  ppf2,
PT_BlockOffset pOffset2 
) const

bool pt_PieceTable::getStyle ( const char *  szName,
PD_Style **  ppStyle 
) const

bool pt_PieceTable::enumStyles ( UT_uint32  k,
const char **  pszName,
const PD_Style **  ppStyle 
) const

bool pt_PieceTable::enumStyles ( UT_GenericVector< PD_Style * > *&  pStyles  )  const

generate vector of styles the caller has to delete pStyle when done ...

References UT_GenericStringMap< T >::enumerate(), and m_hashStyles.

const UT_GenericStringMap<PD_Style *>& pt_PieceTable::getAllStyles (  )  const [inline]

bool pt_PieceTable::isEndFootnote ( pf_Frag pf  )  const

bool pt_PieceTable::isFootnote ( pf_Frag pf  )  const

void pt_PieceTable::clearIfAtFmtMark ( PT_DocPosition  dpos  ) 

UT_uint32 pt_PieceTable::getFragNumber ( pf_Frag pFrag  )  const [inline]

Referenced by getFragFromPosition().

pt_VarSet& pt_PieceTable::getVarSet ( void   )  [inline]

pf_Fragments& pt_PieceTable::getFragments ( void   )  [inline]

bool pt_PieceTable::purgeFmtMarks (  ) 

bool pt_PieceTable::isDoingTheDo ( void   )  const [inline]

void pt_PieceTable::setDoNotTweakPosition ( bool  b  )  [inline]

UT_uint32 pt_PieceTable::getXID (  ) 

UT_uint32 pt_PieceTable::getTopXID (  )  const [inline]

void pt_PieceTable::setXIDThreshold ( UT_uint32  i  )  [inline]

void pt_PieceTable::fixMissingXIDs (  ) 

This function crawls the entire PT and assignes new xid to any fragment that should have one and does not. It is primarily to be used by exporters (accessed throught PD_Document wrapper)

References pf_Fragments::getFirst(), pf_Frag::getNext(), getXID(), pf_Frag::getXID(), m_fragments, pf_Frag::setXID(), and pf_Frag::usesXID().

Referenced by PD_Document::fixMissingXIDs().

void pt_PieceTable::setCRNumber ( UT_sint32  iCRNumber  )  [inline]

pf_Frag * pt_PieceTable::_findLastStruxOfType ( pf_Frag pfStart,
PTStruxType  pst,
bool  bSkipEmbeded 
) [protected]

pf_Frag * pt_PieceTable::_findPrevHyperlink ( pf_Frag pfStart  )  [protected]

Scan backwards from the given frag until a start hyperlink is found. This method is used to determine if a frag is inside a hyperlink span. Returns NULL if: (a) It encounters a strux first. (b) It encounters an end hyperlink first (c) It encounters the begin of document

FIXME!! Should this code work for annotations too?

References gchar, getAttrProp(), pf_Frag::getIndexAP(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), pf_Frag::getPrev(), pf_Frag::getType(), isEndFootnote(), isFootnote(), pf_Frag::PFT_Object, pf_Frag::PFT_Strux, PTO_Hyperlink, and UT_return_val_if_fail.

Referenced by _realInsertStrux().

pf_Frag * pt_PieceTable::_findNextHyperlink ( pf_Frag pfStart  )  [protected]

Scan backwards fromthe given frag until an end hyperlink is found. This method is used to determine if a frag is inside a hyperlink span. Returns NULL if: (a) It encounters a strux first. (b) It encounters a start hyperlink first (c) It encounters the end of document

References gchar, getAttrProp(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), pf_Frag::getType(), isEndFootnote(), isFootnote(), m_fragments, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, PTO_Hyperlink, and UT_return_val_if_fail.

Referenced by _realInsertStrux().

bool pt_PieceTable::_tellAndMaybeAddListener ( PL_Listener pListener,
PL_ListenerId  listenerId,
bool  bAdd 
) [protected]

void pt_PieceTable::_captureActiveSpan ( pf_Frag_Strux_Block pfsBlock  )  [protected]

PT_AttrPropIndex pt_PieceTable::_chooseIndexAP ( pf_Frag pf,
PT_BlockOffset  fragOffset 
) [protected]

bool pt_PieceTable::_canCoalesceInsertSpan ( PX_ChangeRecord_Span pcrSpan  )  const [protected]

bool pt_PieceTable::_createStrux ( PTStruxType  pts,
PT_AttrPropIndex  indexAP,
pf_Frag_Strux **  ppfs 
) [protected]

void pt_PieceTable::_insertStrux ( pf_Frag pf,
PT_BlockOffset  fragOffset,
pf_Frag_Strux pfsNew 
) [protected]

bool pt_PieceTable::_insertObject ( pf_Frag pf,
PT_BlockOffset  fragOffset,
PTObjectType  pto,
PT_AttrPropIndex  indexAP,
pf_Frag_Object *&  pfo 
) [protected]

bool pt_PieceTable::_createObject ( PTObjectType  pto,
PT_AttrPropIndex  indexAP,
pf_Frag_Object **  ppfo 
) [protected]

bool pt_PieceTable::_insertSpan ( pf_Frag pf,
PT_BufIndex  bi,
PT_BlockOffset  fragOffset,
UT_uint32  length,
PT_AttrPropIndex  indexAP,
fd_Field pField = NULL 
) [protected]

bool pt_PieceTable::_StruxIsNotTable ( pf_Frag_Strux pfs  )  [protected]

Returns true if pfs is not a strux connected with a table or frame

References pf_Frag_Strux::getStruxType(), PTX_EndCell, PTX_EndFrame, PTX_EndTable, PTX_SectionCell, PTX_SectionFrame, and PTX_SectionTable.

Referenced by _deleteComplexSpan().

bool pt_PieceTable::_deleteSpan ( pf_Frag_Text pft,
UT_uint32  fragOffset,
PT_BufIndex  bi,
UT_uint32  length,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

void pt_PieceTable::_unlinkFrag ( pf_Frag pf,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_getStruxFromPosition ( PT_DocPosition  docPos,
pf_Frag_Strux **  ppfs,
bool  bSkipFootnotes = false 
) const [protected]

bool pt_PieceTable::_getStruxOfTypeFromPosition ( PT_DocPosition  dpos,
PTStruxType  pts,
pf_Frag_Strux **  ppfs 
) const [protected]

bool pt_PieceTable::_doTheDo ( const PX_ChangeRecord pcr,
bool  bUndo 
) [protected]

References _createStrux(), _deleteFmtMark(), _deleteObject(), _deleteSpan(), _fmtChangeFmtMark(), _fmtChangeObject(), _fmtChangeSpan(), _fmtChangeStrux(), _getStruxFromFrag(), _getStruxFromFragSkip(), _getStruxFromPosition(), _insertFmtMark(), _insertObject(), _insertSpan(), _insertStrux(), _unlinkStrux(), PX_ChangeRecord_FmtMarkChange::AdjustBlockOffset(), PX_ChangeRecord_FmtMark::AdjustBlockOffset(), PX_ChangeRecord_ObjectChange::AdjustBlockOffset(), PX_ChangeRecord_Object::AdjustBlockOffset(), PX_ChangeRecord_SpanChange::AdjustBlockOffset(), PX_ChangeRecord_Span::AdjustBlockOffset(), DONE, PX_ChangeRecord_Span::getBlockOffset(), PX_ChangeRecord_Span::getBufIndex(), pf_Frag::getField(), PX_ChangeRecord_Span::getField(), getFragFromPosition(), pf_Frag::getIndexAP(), PX_ChangeRecord::getIndexAP(), PX_ChangeRecord_SpanChange::getLength(), pf_Frag::getLength(), PX_ChangeRecord_Span::getLength(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), PX_ChangeRecord_Object::getObjectType(), pf_Frag::getPos(), PX_ChangeRecord::getPosition(), pf_Frag::getPrev(), PX_ChangeRecord_Strux::getStruxType(), pf_Frag::getType(), PX_ChangeRecord::getType(), isEndFootnote(), m_bDoingTheDo, m_pDocument, PD_Document::notifyListeners(), pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PTO_Embed, PTO_Math, PX_ChangeRecord::PXT_ChangeFmtMark, PX_ChangeRecord::PXT_ChangeObject, PX_ChangeRecord::PXT_ChangePoint, PX_ChangeRecord::PXT_ChangeSpan, PX_ChangeRecord::PXT_ChangeStrux, PX_ChangeRecord::PXT_DeleteFmtMark, PX_ChangeRecord::PXT_DeleteObject, PX_ChangeRecord::PXT_DeleteSpan, PX_ChangeRecord::PXT_DeleteStrux, PX_ChangeRecord::PXT_GlobMarker, PX_ChangeRecord::PXT_InsertFmtMark, PX_ChangeRecord::PXT_InsertObject, PX_ChangeRecord::PXT_InsertSpan, PX_ChangeRecord::PXT_InsertStrux, pf_Frag_Text::setField(), PX_ChangeRecord_Object::setObjectHandle(), UNDO_return_val_if_fail, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_MIN, and xxx_UT_DEBUGMSG.

Referenced by redoCmd(), and undoCmd().

bool pt_PieceTable::_struxHasContent ( pf_Frag_Strux pfs  )  const [protected]

bool pt_PieceTable::_struxIsEmpty ( pf_Frag_Strux pfs  )  const [protected]

bool pt_PieceTable::_unlinkStrux ( pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_unlinkStrux_Block ( pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_unlinkStrux_Section ( pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_canCoalesceDeleteSpan ( PX_ChangeRecord_Span pcrSpan  )  const [protected]

bool pt_PieceTable::_deleteSpanWithNotify ( PT_DocPosition  dpos,
pf_Frag_Text pft,
UT_uint32  fragOffset,
UT_uint32  length,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd,
bool  bAddChangeRec = true 
) [protected]

bool pt_PieceTable::_isSimpleDeleteSpan ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2 
) const [protected]

void pt_PieceTable::_tweakFieldSpan ( PT_DocPosition dpos1,
PT_DocPosition dpos2 
) const [protected]

bool pt_PieceTable::_tweakDeleteSpanOnce ( PT_DocPosition dpos1,
PT_DocPosition dpos2,
UT_Stack pstDelayStruxDelete 
) const [protected]

bool pt_PieceTable::_tweakDeleteSpan ( PT_DocPosition dpos1,
PT_DocPosition dpos2,
UT_Stack pstDelayStruxDelete 
) const [protected]

bool pt_PieceTable::_deleteFormatting ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2 
) [protected]

bool pt_PieceTable::_deleteComplexSpan ( PT_DocPosition dpos1,
PT_DocPosition dpos2,
UT_Stack stDelayStruxDelete 
) [protected]

bool pt_PieceTable::_deleteComplexSpan_norec ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2 
) [protected]

bool pt_PieceTable::_deleteObject ( pf_Frag_Object pfo,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

References _unlinkFrag(), and xxx_UT_DEBUGMSG.

Referenced by _deleteObjectWithNotify(), and _doTheDo().

bool pt_PieceTable::_deleteObjectWithNotify ( PT_DocPosition  dpos,
pf_Frag_Object pfo,
UT_uint32  fragOffset,
UT_uint32  length,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd,
bool  bAddChangeRec = true 
) [protected]

bool pt_PieceTable::_deleteObject_norec ( PT_DocPosition  dpos,
pf_Frag_Object pfo,
UT_uint32  fragOffset,
UT_uint32  length,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_deleteStruxWithNotify ( PT_DocPosition  dpos,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd,
bool  bWithRec = true 
) [protected]

bool pt_PieceTable::_deleteHdrFtrsFromSectionStruxIfPresent ( pf_Frag_Strux_Section pfStruxSec  )  [protected]

This method scans the piecetAble from the section Frag_strux given looking for any Header/Footers that belong to the strux. If it finds them, they are deleted with notifications.

Parameters:
pf_Frag_Strux_Section pfStruxSec the Section strux that might have headers or footers belonging to it. These must be deleted with notification otherwise they won't be recreated on an undo

References _deleteHdrFtrStruxWithNotify(), UT_GenericVector< T >::addItem(), UT_String::c_str(), pf_Fragments::cleanFrags(), UT_GenericVector< T >::clear(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), getFragments(), pf_Frag::getIndexAP(), UT_GenericVector< T >::getItemCount(), pf_Fragments::getLast(), pf_Frag::getNext(), UT_GenericVector< T >::getNthItem(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), pf_Frag::PFT_Strux, PTX_SectionHdrFtr, and UT_DEBUGMSG.

Referenced by _deleteFormatting().

void pt_PieceTable::_deleteHdrFtrStruxWithNotify ( pf_Frag_Strux pfFragStruxHdrFtr  )  [protected]

bool pt_PieceTable::_fixHdrFtrReferences ( const gchar *  pszHdrType,
const gchar *  pszHdrId,
bool  bNotional = false 
) [protected]

bool pt_PieceTable::_fmtChangeStrux ( pf_Frag_Strux pfs,
PT_AttrPropIndex  indexNewAP 
) [protected]

bool pt_PieceTable::_fmtChangeStruxWithNotify ( PTChangeFmt  ptc,
pf_Frag_Strux pfs,
const gchar **  attributes,
const gchar **  properties,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_fmtChangeStruxWithNotify ( PTChangeFmt  ptc,
pf_Frag_Strux pfs,
const gchar **  attributes,
const gchar **  properties,
bool  bDoAll,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_fmtChangeSpan ( pf_Frag_Text pft,
UT_uint32  fragOffset,
UT_uint32  length,
PT_AttrPropIndex  indexNewAP,
pf_Frag **  ppfNewEnd,
UT_uint32 pfragOffsetNewEnd 
) [protected]

bool pt_PieceTable::_fmtChangeSpanWithNotify ( PTChangeFmt  ptc,
pf_Frag_Text pft,
UT_uint32  fragOffset,
PT_DocPosition  dpos,
UT_uint32  length,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Strux pfs,
pf_Frag **  ppfNewEnd,
UT_uint32 pfragOffsetNewEnd,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_fmtChangeObject ( pf_Frag_Object pfo,
PT_AttrPropIndex  indexNewAP,
pf_Frag **  ppfNewEnd,
UT_uint32 pfragOffsetNewEnd 
) [protected]

bool pt_PieceTable::_fmtChangeObjectWithNotify ( PTChangeFmt  ptc,
pf_Frag_Object pfo,
UT_uint32  fragOffset,
PT_DocPosition  dpos,
UT_uint32  length,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Strux pfs,
pf_Frag **  ppfNewEnd,
UT_uint32 pfragOffsetNewEnd,
bool  bRevisionDelete 
) [protected]

bool pt_PieceTable::_getStruxFromFrag ( pf_Frag pfStart,
pf_Frag_Strux **  ppfs 
) const [protected]

bool pt_PieceTable::_getStruxFromFragSkip ( pf_Frag pfStart,
pf_Frag_Strux **  ppfs 
) const [protected]

bool pt_PieceTable::_getNextStruxAfterFragSkip ( pf_Frag pfStart,
pf_Frag_Strux **  ppfs 
) [protected]

bool pt_PieceTable::_getStruxFromPositionSkip ( PT_DocPosition  docPos,
pf_Frag_Strux **  ppfs 
) const [protected]

UT_uint32 pt_PieceTable::_computeBlockOffset ( pf_Frag_Strux pfs,
pf_Frag pfTarget 
) const [protected]

bool pt_PieceTable::_loadBuiltinStyles ( void   )  [protected]

bool pt_PieceTable::_createBuiltinStyle ( const char *  szName,
bool  bDisplayed,
const gchar **  attributes 
) [protected]

bool pt_PieceTable::_insertFmtMarkFragWithNotify ( PTChangeFmt  ptc,
PT_DocPosition  dpos,
const gchar **  attributes,
const gchar **  properties 
) [protected]

bool pt_PieceTable::_insertFmtMarkFragWithNotify ( PTChangeFmt  ptc,
PT_DocPosition  dpos,
PP_AttrProp p_AttrProp 
) [protected]

bool pt_PieceTable::_insertFmtMark ( pf_Frag pf,
UT_uint32  fragOffset,
PT_AttrPropIndex  api 
) [protected]

bool pt_PieceTable::_insertFmtMarkAfterBlockWithNotify ( pf_Frag_Strux pfsBlock,
PT_DocPosition  dpos,
PT_AttrPropIndex  api 
) [protected]

bool pt_PieceTable::_deleteFmtMarkWithNotify ( PT_DocPosition  dpos,
pf_Frag_FmtMark pffm,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_deleteFmtMark ( pf_Frag_FmtMark pffm,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_fmtChangeFmtMarkWithNotify ( PTChangeFmt  ptc,
pf_Frag_FmtMark pffm,
PT_DocPosition  dpos,
const gchar **  attributes,
const gchar **  properties,
pf_Frag_Strux pfs,
pf_Frag **  ppfEnd,
UT_uint32 pfragOffsetEnd 
) [protected]

bool pt_PieceTable::_fmtChangeFmtMark ( pf_Frag_FmtMark pffm,
PT_AttrPropIndex  indexNewAP,
pf_Frag **  ppfNewEnd,
UT_uint32 pfragOffsetNewEnd 
) [protected]

bool pt_PieceTable::_computeFmtMarkForNewBlock ( pf_Frag_Strux pfsBlock,
pf_Frag pfCurrent,
PT_BlockOffset  fragOffset,
PT_AttrPropIndex pFmtMarkAP 
) [protected]

bool pt_PieceTable::_getSpanAttrPropHelper ( pf_Frag pf,
const PP_AttrProp **  ppAP 
) const [protected]

bool pt_PieceTable::_lastUndoIsThisFmtMark ( PT_DocPosition  dpos  )  [protected]

bool pt_PieceTable::_changePointWithNotify ( PT_DocPosition  dpos  )  [protected]

bool pt_PieceTable::_makeStrux ( PTStruxType  pts,
const gchar **  attributes,
pf_Frag_Strux *&  pfs 
) [protected]

bool pt_PieceTable::_makeObject ( PTObjectType  pto,
const gchar **  attributes,
pf_Frag_Object *&  pfo 
) [protected]

bool pt_PieceTable::_makeFmtMark ( pf_Frag_FmtMark *&  pff  )  [protected]

bool pt_PieceTable::_makeFmtMark ( pf_Frag_FmtMark *&  pff,
const gchar **  attributes 
) [protected]

UT_sint32 pt_PieceTable::_getNextChangeRecordNumber ( void   )  [inline, protected]

bool pt_PieceTable::_translateRevisionAttribute ( PP_RevisionAttr Revisions,
PT_AttrPropIndex  indexAP,
PP_RevisionType  eType,
const gchar **&  ppRevAttrib,
const gchar **&  ppRevProps,
const gchar **  ppAttrib,
const gchar **  ppProps 
) [protected]

A helper function which translates a revision attribute associated with fragment of type pts at pos dpos into arrays of attributes and properties suitable for passing into formating and other funcitons.

Revisions -- an instance of an empty PP_RevisionsAttr (i.e., PP_RevisionsAttr(NULL);)

ppRevAttrib -- pointers to arrays of attributes and properties; the actual props and attribs are ppRevProps found inside the Revisions variable, so the returned pointers are only valid within the Revisions scope !!!.

ppAttrib -- pointers to any attributes/properties that are to be added to this revision, can be NULL ppProps

References PP_RevisionAttr::addRevision(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), PP_RevisionAttr::getLastRevision(), AD_Document::getRevisionId(), PP_RevisionAttr::getXMLstring(), AD_Document::isMarkRevisions(), m_pDocument, name, PP_RevisionAttr::pruneForCumulativeResult(), PP_RevisionAttr::setRevision(), and UT_return_val_if_fail.

Referenced by insertObject(), insertSpan(), and insertStrux().


Friends And Related Function Documentation

friend class PX_ChangeRecord [friend]


Member Data Documentation