#include <pt_PieceTable.h>
typedef std::map<std::string, PD_Style *> pt_PieceTable::StyleMap [protected] |
pt_PieceTable::pt_PieceTable | ( | PD_Document * | pDocument | ) |
References loading, PTS_Create, and setPieceTableState().
pt_PieceTable::~pt_PieceTable | ( | ) |
References m_fragments, m_hashStyles, pf_Fragments::purgeFrags(), and UT_map_delete_all_second().
bool pt_PieceTable::_canCoalesceDeleteSpan | ( | PX_ChangeRecord_Span * | pcrSpan | ) | const [protected] |
References pt_VarSet::getBufIndex(), PX_ChangeRecord_Span::getBufIndex(), PX_ChangeRecord::getIndexAP(), PX_ChangeRecord_Span::getLength(), PX_ChangeRecord::getPosition(), PX_ChangeRecord::getType(), px_ChangeHistory::getUndo(), PX_ChangeRecord::isFromThisDoc(), m_history, m_varset, and UT_return_val_if_fail.
Referenced by _deleteSpanWithNotify().
bool pt_PieceTable::_canCoalesceInsertSpan | ( | PX_ChangeRecord_Span * | pcrSpan | ) | const [protected] |
References pt_VarSet::getBufIndex(), PX_ChangeRecord_Span::getBufIndex(), PX_ChangeRecord::getIndexAP(), PX_ChangeRecord_Span::getLength(), PX_ChangeRecord::getPosition(), PX_ChangeRecord::getType(), px_ChangeHistory::getUndo(), px_ChangeHistory::isDirty(), PX_ChangeRecord::isFromThisDoc(), m_history, m_varset, and UT_return_val_if_fail.
Referenced by _realInsertSpan().
void pt_PieceTable::_captureActiveSpan | ( | pf_Frag_Strux_Block * | pfsBlock | ) | [protected] |
bool pt_PieceTable::_changePointWithNotify | ( | PT_DocPosition | dpos | ) | [protected] |
References px_ChangeHistory::addChangeRecord(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord, PX_ChangeRecord::PXT_ChangePoint, and UT_return_val_if_fail.
Referenced by _realDeleteSpan().
bool pt_PieceTable::_checkSkipFootnote | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2, | |||
pf_Frag * | pf_End = NULL | |||
) | const [protected] |
References getFragFromPosition(), pf_Frag::getType(), and m_embeddedStrux.
Referenced by _realChangeSpanFmt(), and _realChangeStruxFmt().
PT_AttrPropIndex pt_PieceTable::_chooseIndexAP | ( | pf_Frag * | pf, | |
PT_BlockOffset | fragOffset | |||
) | [protected] |
References pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getPrev(), pf_Frag::getType(), pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PTO_Bookmark, PTO_Embed, PTO_Field, PTO_Hyperlink, PTO_Image, PTO_Math, PTO_RDFAnchor, and UT_ASSERT_HARMLESS.
Referenced by _insertFmtMarkFragWithNotify(), _realInsertObject(), and _realInsertSpan().
UT_uint32 pt_PieceTable::_computeBlockOffset | ( | pf_Frag_Strux * | pfs, | |
pf_Frag * | pfTarget | |||
) | const [protected] |
References pf_Frag::getLength(), and pf_Frag::getNext().
Referenced by _deleteFmtMarkWithNotify(), _deleteObjectWithNotify(), _deleteSpanWithNotify(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _insertFmtMarkFragWithNotify(), _realInsertObject(), and _realInsertSpan().
bool pt_PieceTable::_computeFmtMarkForNewBlock | ( | pf_Frag_Strux * | pfsBlock, | |
pf_Frag * | pfCurrent, | |||
PT_BlockOffset | fragOffset, | |||
PT_AttrPropIndex * | pFmtMarkAP | |||
) | [protected] |
References pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getPrev(), pf_Frag::getType(), pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PTO_Field, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by _realInsertStrux().
bool pt_PieceTable::_createBuiltinStyle | ( | const char * | szName, | |
bool | bDisplayed, | |||
const PP_PropertyVector & | attributes | |||
) | [protected] |
References getStyle(), m_hashStyles, m_pts, m_varset, PTS_Create, pt_VarSet::storeAP(), and UT_return_val_if_fail.
bool pt_PieceTable::_createObject | ( | PTObjectType | pto, | |
PT_AttrPropIndex | indexAP, | |||
pf_Frag_Object ** | ppfo | |||
) | [protected] |
References PD_Document::addBookmark(), pf_Frag_Object::getBookmark(), po_Bookmark::getBookmarkType(), po_Bookmark::getName(), m_pDocument, PTO_Annotation, PTO_Bookmark, PTO_Embed, PTO_Field, PTO_Hyperlink, PTO_Image, PTO_Math, PTO_RDFAnchor, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _insertObject(), and _makeObject().
bool pt_PieceTable::_createStrux | ( | PTStruxType | pts, | |
PT_AttrPropIndex | indexAP, | |||
pf_Frag_Strux ** | ppfs | |||
) | [protected] |
References PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_NOT_IMPLEMENTED.
Referenced by _doTheDo(), _makeStrux(), _realInsertStrux(), and insertStruxNoUpdateBefore().
bool pt_PieceTable::_deleteComplexSpan | ( | PT_DocPosition & | dpos1, | |
PT_DocPosition & | dpos2, | |||
UT_Stack * | stDelayStruxDelete | |||
) | [protected] |
References _deleteComplexSpanHAR(), _deleteFormatting(), _deleteObjectWithNotify(), _deleteSpanWithNotify(), _deleteStruxWithNotify(), _getStruxFromFragSkip(), _getStruxFromPosition(), _StruxIsNotTable(), pf_Frag_Object::getBookmark(), po_Bookmark::getBookmarkType(), getFragPosition(), getFragsFromPositions(), pf_Frag::getLength(), po_Bookmark::getName(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), isFootnote(), m_pDocument, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, UT_Stack::pop(), PT_XMLID, PTO_Annotation, PTO_Bookmark, PTO_Field, PTO_Hyperlink, PTO_RDFAnchor, UT_Stack::push(), PD_Document::removeBookmark(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_MIN, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.
Referenced by _realDeleteSpan().
bool pt_PieceTable::_deleteComplexSpan_norec | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2 | |||
) | [protected] |
References _deleteObjectWithNotify(), _deleteSpanWithNotify(), _deleteStruxWithNotify(), _getStruxFromPosition(), getFragsFromPositions(), pf_Frag::getLength(), pf_Frag::getType(), pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, UT_ASSERT_HARMLESS, UT_MIN, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by deleteFieldFrag().
bool pt_PieceTable::_deleteComplexSpanHAR | ( | pf_Frag_Object * | pO, | |
PT_DocPosition | dpos1, | |||
PT_DocPosition | dpos2, | |||
UT_uint32 & | length, | |||
PT_BlockOffset & | fragOffset_First, | |||
UT_uint32 & | lengthThisStep, | |||
pf_Frag_Strux *& | pfsContainer, | |||
pf_Frag *& | pfNewEnd, | |||
UT_uint32 & | fragOffsetNewEnd, | |||
const char * | startAttrCSTR | |||
) | [protected] |
Since hyperlinks, annotations, and rdf anchors are all very similar code, they are abstracted out here.
References _deleteObjectWithNotify(), _getStruxFromFragSkip(), gchar, getAttrProp(), getFragPosition(), pf_Frag::getIndexAP(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), pf_Frag::getPrev(), pf_Frag::getType(), PTO_Annotation, UT_ASSERT, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by _deleteComplexSpan().
bool pt_PieceTable::_deleteFmtMark | ( | pf_Frag_FmtMark * | pffm, | |
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _unlinkFrag().
Referenced by _deleteFmtMarkWithNotify(), _doTheDo(), and purgeFmtMarks().
bool pt_PieceTable::_deleteFmtMarkWithNotify | ( | PT_DocPosition | dpos, | |
pf_Frag_FmtMark * | pffm, | |||
pf_Frag_Strux * | pfs, | |||
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _computeBlockOffset(), _deleteFmtMark(), px_ChangeHistory::addChangeRecord(), pf_Frag::getIndexAP(), m_history, m_pDocument, m_pts, PD_Document::notifyListeners(), PTS_Editing, PX_ChangeRecord::PXT_DeleteFmtMark, and UT_return_val_if_fail.
Referenced by _deleteFormatting(), _realInsertSpan(), and deleteFmtMark().
bool pt_PieceTable::_deleteFormatting | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2 | |||
) | [protected] |
References _deleteFmtMarkWithNotify(), _deleteHdrFtrsFromSectionStruxIfPresent(), _getStruxFromFragSkip(), _getStruxFromPosition(), getFragsFromPositions(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _deleteComplexSpan(), and _realDeleteSpan().
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.
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(), 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(), and UT_DEBUGMSG.
Referenced by _deleteFormatting().
void pt_PieceTable::_deleteHdrFtrStruxWithNotify | ( | pf_Frag_Strux * | pfFragStruxHdrFtr | ) | [protected] |
This method deletes the Header/Footer from the pieceTable in the order that will allow an undo to recreate it.
References _deleteStruxWithNotify(), UT_GenericVector< T >::addItem(), deleteSpan(), getFragments(), getFragPosition(), UT_GenericVector< T >::getItemCount(), pf_Fragments::getLast(), pf_Frag::getLength(), pf_Frag::getNext(), UT_GenericVector< T >::getNthItem(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by _deleteHdrFtrsFromSectionStruxIfPresent(), and _realDeleteHdrFtrStrux().
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::_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::_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] |
References _computeBlockOffset(), _deleteObject(), px_ChangeHistory::addChangeRecord(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getXID(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord::PXT_DeleteObject, and UT_return_val_if_fail.
Referenced by _deleteComplexSpan(), _deleteComplexSpan_norec(), _deleteComplexSpanHAR(), and _realInsertStrux().
bool pt_PieceTable::_deleteSpan | ( | pf_Frag_Text * | pft, | |
UT_uint32 | fragOffset, | |||
PT_BufIndex | bi, | |||
UT_uint32 | length, | |||
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _unlinkFrag(), pf_Frag_Text::adjustOffsetLength(), pf_Frag_Text::changeLength(), pf_Frag_Text::getBufIndex(), pt_VarSet::getBufIndex(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Fragments::insertFrag(), m_fragments, m_varset, SETP, and UT_return_val_if_fail.
Referenced by _deleteSpanWithNotify(), and _doTheDo().
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] |
References _canCoalesceDeleteSpan(), _computeBlockOffset(), _deleteSpan(), px_ChangeHistory::addChangeRecord(), px_ChangeHistory::coalesceHistory(), pf_Frag_Text::getBufIndex(), pt_VarSet::getBufIndex(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getNext(), PD_Document::isCoalescingMasked(), m_history, m_pDocument, m_varset, PD_Document::notifyListeners(), PX_ChangeRecord::PXT_DeleteSpan, PX_ChangeRecord::setDocument(), SETP, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _deleteComplexSpan(), and _deleteComplexSpan_norec().
bool pt_PieceTable::_deleteStruxWithNotify | ( | PT_DocPosition | dpos, | |
pf_Frag_Strux * | pfs, | |||
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd, | |||
bool | bWithRec = true | |||
) | [protected] |
References _unlinkStrux(), px_ChangeHistory::addChangeRecord(), pf_Frag::getIndexAP(), pf_Frag_Strux::getStruxType(), pf_Frag::getXID(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord::PXT_DeleteStrux, and UT_return_val_if_fail.
Referenced by _deleteComplexSpan(), _deleteComplexSpan_norec(), _deleteHdrFtrStruxWithNotify(), _realDeleteSpan(), and deleteStruxWithNotify().
bool pt_PieceTable::_doTheDo | ( | const PX_ChangeRecord * | pcr, | |
bool | bUndo | |||
) | [protected] |
References _createStrux(), _deleteFmtMark(), _deleteObject(), _deleteSpan(), _fmtChangeFmtMark(), _fmtChangeObject(), _fmtChangeSpan(), _fmtChangeStrux(), _getStruxFromFrag(), _getStruxFromFragSkip(), _getStruxFromPosition(), _insertFmtMark(), _insertNoteInEmbeddedStruxList(), _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_Text, PTX_EndAnnotation, PTX_EndEndnote, PTX_EndFootnote, 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.
pf_Frag_Strux * pt_PieceTable::_findLastStruxOfType | ( | pf_Frag * | pfStart, | |
PTStruxType | pst, | |||
bool | bSkipEmbeded | |||
) | [protected] |
References _findLastStruxOfType(), PTX_StruxDummy, and UT_return_val_if_fail.
pf_Frag_Strux * pt_PieceTable::_findLastStruxOfType | ( | pf_Frag * | pfStart, | |
PTStruxType | pst, | |||
PTStruxType * | stopConditions, | |||
bool | bSkipEmbededSections | |||
) | [protected] |
MIQ11: Extends the old _findLastStruxOfType adding a stopCondition for failure and returning a Strux* directly in the case of success.
This is like a findBackwards() from a fragment.
stopConditions must be terminated with a PTX_StruxDummy entry like: PTStruxType stopCondition[] = { PTX_SectionTable, PTX_StruxDummy };
Find a fragment of strux type pst looking backwards from pfStart. If a strux fragment matching the stopCondition is found first then the function stops and returns 0. If no fragment with pst is found then 0 is returned.
MAYBE: extend this again to take yes() and no() functors so a function can call _findLastStruxOfType() and decide what is ok and what is not using those. boost::lambda would be handy to simplify the functors?
References pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), PTX_StruxDummy, and UT_return_val_if_fail.
Referenced by _findLastStruxOfType(), appendLastStruxFmt(), changeLastStruxFmtNoUndo(), and deleteSpan().
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, and UT_return_val_if_fail.
Referenced by _realInsertStrux().
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(), and UT_return_val_if_fail.
Referenced by _realInsertStrux().
bool pt_PieceTable::_fixHdrFtrReferences | ( | const gchar * | pszHdrType, | |
const gchar * | pszHdrId, | |||
bool | bNotional = false | |||
) | [protected] |
scan piecetable and remove any references to the hdr/ftr located at pos dpos bNotional indicates that the header has been marked deleted in revison mode, but not physically removed from the document
References _fmtChangeStruxWithNotify(), PP_RevisionAttr::addRevision(), PP_RevisionAttr::forceDirty(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), pf_Fragments::getFirst(), pf_Frag::getIndexAP(), pf_Frag::getNext(), PP_RevisionAttr::getNthRevision(), AD_Document::getRevisionId(), PP_RevisionAttr::getRevisionsCount(), PP_RevisionAttr::getRevisionWithId(), pf_Frag::getType(), PP_RevisionAttr::getXMLstring(), m_fragments, m_pDocument, pf_Frag::PFT_Strux, PP_REVISION_FMT_CHANGE, PTC_RemoveFmt, PTC_SetFmt, and UT_return_val_if_fail.
Referenced by deleteHdrFtrStrux(), and deleteSpan().
bool pt_PieceTable::_fmtChangeFmtMark | ( | pf_Frag_FmtMark * | pffm, | |
PT_AttrPropIndex | indexNewAP, | |||
pf_Frag ** | ppfNewEnd, | |||
UT_uint32 * | pfragOffsetNewEnd | |||
) | [protected] |
References pf_Frag::getNext(), pf_Frag::setIndexAP(), and SETP.
Referenced by _doTheDo(), and _fmtChangeFmtMarkWithNotify().
bool pt_PieceTable::_fmtChangeFmtMarkWithNotify | ( | PTChangeFmt | ptc, | |
pf_Frag_FmtMark * | pffm, | |||
PT_DocPosition | dpos, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Strux * | pfs, | |||
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _computeBlockOffset(), _fmtChangeFmtMark(), px_ChangeHistory::addChangeRecord(), getDocument(), pf_Frag::getIndexAP(), pf_Frag::getNext(), m_history, m_pDocument, m_pts, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PTS_Editing, PX_ChangeRecord::PXT_ChangeFmtMark, SETP, UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
Referenced by _insertFmtMarkFragWithNotify(), _realChangeSpanFmt(), and _realChangeStruxFmt().
bool pt_PieceTable::_fmtChangeObject | ( | pf_Frag_Object * | pfo, | |
PT_AttrPropIndex | indexNewAP, | |||
pf_Frag ** | ppfNewEnd, | |||
UT_uint32 * | pfragOffsetNewEnd | |||
) | [protected] |
References pf_Frag::getNext(), pf_Frag::setIndexAP(), and SETP.
Referenced by _doTheDo(), and _fmtChangeObjectWithNotify().
bool pt_PieceTable::_fmtChangeObjectWithNotify | ( | PTChangeFmt | ptc, | |
pf_Frag_Object * | pfo, | |||
UT_uint32 | fragOffset, | |||
PT_DocPosition | dpos, | |||
UT_uint32 | length, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Strux * | pfs, | |||
pf_Frag ** | ppfNewEnd, | |||
UT_uint32 * | pfragOffsetNewEnd, | |||
bool | bRevisionDelete | |||
) | [protected] |
References _computeBlockOffset(), _fmtChangeObject(), px_ChangeHistory::addChangeRecord(), getDocument(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), m_history, m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PX_ChangeRecord::PXT_ChangeObject, SETP, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_UNUSED.
Referenced by _realChangeSpanFmt(), and _realChangeStruxFmt().
bool pt_PieceTable::_fmtChangeSpan | ( | pf_Frag_Text * | pft, | |
UT_uint32 | fragOffset, | |||
UT_uint32 | length, | |||
PT_AttrPropIndex | indexNewAP, | |||
pf_Frag ** | ppfNewEnd, | |||
UT_uint32 * | pfragOffsetNewEnd | |||
) | [protected] |
References _unlinkFrag(), pf_Frag_Text::adjustOffsetLength(), pf_Frag_Text::changeLength(), pt_VarSet::getBufIndex(), pf_Frag_Text::getBufIndex(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag::getType(), pf_Fragments::insertFrag(), pt_VarSet::isContiguous(), m_fragments, m_varset, pf_Frag::setIndexAP(), SETP, and UT_return_val_if_fail.
Referenced by _doTheDo(), and _fmtChangeSpanWithNotify().
bool pt_PieceTable::_fmtChangeSpanWithNotify | ( | PTChangeFmt | ptc, | |
pf_Frag_Text * | pft, | |||
UT_uint32 | fragOffset, | |||
PT_DocPosition | dpos, | |||
UT_uint32 | length, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Strux * | pfs, | |||
pf_Frag ** | ppfNewEnd, | |||
UT_uint32 * | pfragOffsetNewEnd, | |||
bool | bRevisionDelete | |||
) | [protected] |
References _computeBlockOffset(), _fmtChangeSpan(), px_ChangeHistory::addChangeRecord(), pf_Frag_Text::getBufIndex(), pt_VarSet::getBufIndex(), getDocument(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), m_history, m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PX_ChangeRecord::PXT_ChangeSpan, SETP, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by _realChangeSpanFmt(), and _realChangeStruxFmt().
bool pt_PieceTable::_fmtChangeStrux | ( | pf_Frag_Strux * | pfs, | |
PT_AttrPropIndex | indexNewAP | |||
) | [protected] |
References pf_Frag::setIndexAP().
Referenced by _doTheDo(), _fmtChangeStruxWithNotify(), _realChangeSectionAttsNoUpdate(), _realChangeStruxForLists(), changeStruxFmtNoUndo(), and changeStruxFormatNoUpdate().
bool pt_PieceTable::_fmtChangeStruxWithNotify | ( | PTChangeFmt | ptc, | |
pf_Frag_Strux * | pfs, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
bool | bDoAll, | |||
bool | bRevisionDelete | |||
) | [protected] |
Don't broadcast changes to the endstruxs because will cause them to destroy the properties of the layout since they linked to the layout.
References _fmtChangeStrux(), px_ChangeHistory::addChangeRecord(), getDocument(), getFragPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Strux::getStruxType(), m_history, m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PX_ChangeRecord::PXT_ChangeStrux, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
bool pt_PieceTable::_fmtChangeStruxWithNotify | ( | PTChangeFmt | ptc, | |
pf_Frag_Strux * | pfs, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
bool | bRevisionDelete | |||
) | [protected] |
References _fmtChangeStrux(), px_ChangeHistory::addChangeRecord(), getDocument(), getFragPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Strux::getStruxType(), m_history, 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 _fixHdrFtrReferences(), _realChangeStruxFmt(), and changeStruxFmt().
pf_Frag_Strux * pt_PieceTable::_getBlockFromPosition | ( | PT_DocPosition | pos | ) | const [protected] |
Get the PTX_Block that contains the given document position.
Note that pos might itself point right at a PTX_Block in which case that is the block that is returned. This might return null if there is no containing block
References _getStruxOfTypeFromPosition(), getFragFromPosition(), PTX_Block, and tryDownCastStrux().
Referenced by getBlockFromPosition(), and inSameBlock().
UT_sint32 pt_PieceTable::_getNextChangeRecordNumber | ( | void | ) | [inline, protected] |
bool pt_PieceTable::_getNextStruxAfterFragSkip | ( | pf_Frag * | pfStart, | |
pf_Frag_Strux ** | ppfs | |||
) | [protected] |
References pf_Frag::getNext(), pf_Frag::getType(), isEndFootnote(), isFootnote(), and xxx_UT_DEBUGMSG.
Referenced by _insertStrux().
bool pt_PieceTable::_getSpanAttrPropHelper | ( | pf_Frag * | pf, | |
const PP_AttrProp ** | ppAP | |||
) | const [protected] |
References pt_VarSet::getAP(), pf_Frag::getIndexAP(), pf_Frag::getType(), m_varset, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by changeSpanFmt(), getSpanAttrProp(), and insertSpan().
bool pt_PieceTable::_getStruxFromFrag | ( | pf_Frag * | pfStart, | |
pf_Frag_Strux ** | ppfs | |||
) | const [protected] |
References pf_Frag::getPrev(), and pf_Frag::getType().
Referenced by _doTheDo(), _realInsertObject(), and _realInsertSpan().
bool pt_PieceTable::_getStruxFromFragSkip | ( | pf_Frag * | pfStart, | |
pf_Frag_Strux ** | ppfs | |||
) | const [protected] |
References pf_Frag::getPrev(), pf_Frag::getType(), isEndFootnote(), isFootnote(), and xxx_UT_DEBUGMSG.
Referenced by _deleteComplexSpan(), _deleteComplexSpanHAR(), _deleteFormatting(), _doTheDo(), _getStruxOfTypeFromPosition(), _insertFmtMarkFragWithNotify(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), _tweakDeleteSpanOnce(), deleteFmtMark(), and insertStrux().
bool pt_PieceTable::_getStruxFromPosition | ( | PT_DocPosition | docPos, | |
pf_Frag_Strux ** | ppfs, | |||
bool | bSkipFootnotes = false | |||
) | const [protected] |
References pf_Fragments::findFirstFragBeforePos(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag::getType(), isEndFootnote(), isFootnote(), m_fragments, pf_Frag::PFT_Strux, and xxx_UT_DEBUGMSG.
Referenced by _deleteComplexSpan(), _deleteComplexSpan_norec(), _deleteFormatting(), _doTheDo(), _getStruxOfTypeFromPosition(), _realChangeSpanFmt(), _realInsertStrux(), _tweakDeleteSpanOnce(), _tweakFieldSpan(), _unlinkStrux_Block(), getStruxFromPosition(), and insertStrux().
bool pt_PieceTable::_getStruxFromPositionSkip | ( | PT_DocPosition | docPos, | |
pf_Frag_Strux ** | ppfs | |||
) | const [protected] |
bool pt_PieceTable::_getStruxOfTypeFromPosition | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
pf_Frag_Strux ** | ppfs | |||
) | const [protected] |
References _getStruxFromFragSkip(), _getStruxFromPosition(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _getBlockFromPosition(), _insertFmtMarkFragWithNotify(), _realChangeStruxFmt(), _tweakDeleteSpanOnce(), changeStruxFmt(), getStruxOfTypeFromPosition(), and inSameBlock().
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::_insertFmtMarkFragWithNotify | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos, | |||
PP_AttrProp * | p_AttrProp | |||
) | [protected] |
bool pt_PieceTable::_insertFmtMarkFragWithNotify | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties | |||
) | [protected] |
References _chooseIndexAP(), _computeBlockOffset(), _fmtChangeFmtMarkWithNotify(), _getStruxFromFragSkip(), _getStruxOfTypeFromPosition(), _insertFmtMark(), px_ChangeHistory::addChangeRecord(), getDocument(), getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), m_history, m_pDocument, m_pts, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PTS_Editing, PTX_Block, PX_ChangeRecord::PXT_InsertFmtMark, UT_ASSERT, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _insertFmtMarkFragWithNotify(), _realChangeSpanFmt(), and _realDeleteSpan().
bool pt_PieceTable::_insertNoteInEmbeddedStruxList | ( | pf_Frag_Strux * | pfsNew | ) | [protected] |
References pt_PieceTable::embeddedStrux::beginNote, pt_PieceTable::embeddedStrux::endNote, pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_embeddedStrux, pt_PieceTable::embeddedStrux::type, UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by _doTheDo(), _realInsertStrux(), appendStrux(), insertStruxBeforeFrag(), and insertStruxNoUpdateBefore().
bool pt_PieceTable::_insertObject | ( | pf_Frag * | pf, | |
PT_BlockOffset | fragOffset, | |||
PTObjectType | pto, | |||
PT_AttrPropIndex | indexAP, | |||
pf_Frag_Object *& | pfo | |||
) | [protected] |
References _createObject(), pt_VarSet::getBufIndex(), pf_Frag::getLength(), pf_Frag::getPrev(), pf_Frag::getType(), getXID(), pf_Fragments::insertFrag(), m_fragments, m_varset, pf_Frag::setXID(), and UT_return_val_if_fail.
Referenced by _doTheDo(), and _realInsertObject().
bool pt_PieceTable::_insertSpan | ( | pf_Frag * | pf, | |
PT_BufIndex | bi, | |||
PT_BlockOffset | fragOffset, | |||
UT_uint32 | length, | |||
PT_AttrPropIndex | indexAP, | |||
fd_Field * | pField = NULL | |||
) | [protected] |
References pf_Frag_Text::adjustOffsetLength(), pf_Frag_Text::changeLength(), pt_VarSet::getBufIndex(), pf_Frag_Text::getBufIndex(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag::getType(), pf_Fragments::insertFrag(), pt_VarSet::isContiguous(), m_fragments, m_varset, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, pf_Fragments::unlinkFrag(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _doTheDo(), and _realInsertSpan().
void pt_PieceTable::_insertStrux | ( | pf_Frag * | pf, | |
PT_BlockOffset | fragOffset, | |||
pf_Frag_Strux * | pfsNew | |||
) | [protected] |
If we do an insert strux on a pf_Frag_Strux we actually insert the new strux BEFORE pf. In this case the container is actually in strux before this one. In this case pfsActual returns the rela containing strux.
References _getNextStruxAfterFragSkip(), pf_Frag_Text::changeLength(), pf_Frag_Text::getBufIndex(), pt_VarSet::getBufIndex(), pf_Frag::getField(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), pf_Fragments::insertFrag(), isEndFootnote(), m_fragments, m_varset, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, UT_ASSERT_HARMLESS, and UT_return_if_fail.
Referenced by _doTheDo(), and _realInsertStrux().
bool pt_PieceTable::_isSimpleDeleteSpan | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2 | |||
) | const [protected] |
References getFragsFromPositions(), pf_Frag::getLength(), pf_Frag::getPrev(), pf_Frag::getType(), and UT_return_val_if_fail.
Referenced by _realDeleteSpan().
bool pt_PieceTable::_lastUndoIsThisFmtMark | ( | PT_DocPosition | dpos | ) | [protected] |
bool pt_PieceTable::_loadBuiltinStyles | ( | void | ) | [protected] |
References _s, XAP_App::findNearestFont(), XAP_EncodingManager::get_instance(), XAP_App::getApp(), XAP_EncodingManager::getLanguageISOName(), XAP_EncodingManager::getLanguageISOTerritory(), XAP_App::getStringSet(), XAP_StringSet::getValue(), LIST_DEFAULT_INDENT, LIST_DEFAULT_INDENT_LABEL, s, UT_String_sprintf(), and UT_UTF8String::utf8_str().
Referenced by setPieceTableState().
bool pt_PieceTable::_makeFmtMark | ( | pf_Frag_FmtMark *& | pff | ) | [protected] |
References pf_Fragments::getFirst(), loading, m_fragments, m_pts, PTS_Loading, and UT_return_val_if_fail.
Referenced by _makeFmtMark(), appendFmtMark(), and insertFmtMarkBeforeFrag().
bool pt_PieceTable::_makeFmtMark | ( | pf_Frag_FmtMark *& | pff, | |
const PP_PropertyVector & | attributes | |||
) | [protected] |
References _makeFmtMark(), pf_Fragments::getFirst(), m_fragments, m_pts, m_varset, PTS_Loading, pt_VarSet::storeAP(), and UT_return_val_if_fail.
bool pt_PieceTable::_makeObject | ( | PTObjectType | pto, | |
const PP_PropertyVector & | attributes, | |||
pf_Frag_Object *& | pfo | |||
) | [protected] |
References _createObject(), pf_Fragments::getFirst(), m_fragments, m_pts, m_varset, PTS_Loading, pt_VarSet::storeAP(), and UT_return_val_if_fail.
Referenced by appendObject(), and insertObjectBeforeFrag().
bool pt_PieceTable::_makeStrux | ( | PTStruxType | pts, | |
const PP_PropertyVector & | attributes, | |||
pf_Frag_Strux *& | pfs | |||
) | [protected] |
References _createStrux(), m_pts, m_varset, PP_getAttribute(), PTS_Loading, PTX_Section, pt_VarSet::storeAP(), and UT_return_val_if_fail.
Referenced by appendStrux(), and insertStruxBeforeFrag().
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(), PP_std_copyProps(), PTC_AddFmt, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by changeSectionAttsNoUpdate().
bool pt_PieceTable::_realChangeSpanFmt | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos1, | |||
PT_DocPosition | dpos2, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
bool | bRevisionDelete | |||
) | [protected] |
References _checkSkipFootnote(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _getStruxFromFragSkip(), _getStruxFromPosition(), _insertFmtMarkFragWithNotify(), _tweakFieldSpan(), beginMultiStepGlob(), endMultiStepGlob(), pf_Fragments::findFirstFragBeforePos(), gchar, PD_Style::getAllProperties(), getDocument(), getFragFromPosition(), getFragsFromPositions(), UT_GenericVector< T >::getItemCount(), pf_Frag::getLength(), pf_Frag::getNext(), UT_GenericVector< T >::getNthItem(), px_ChangeHistory::getSavePosition(), PD_Document::getStyle(), pf_Frag::getType(), px_ChangeHistory::getUndo(), px_ChangeHistory::getUndoPos(), isEndFootnote(), isFootnote(), m_fragments, m_history, m_pts, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PP_getAttribute(), PT_STYLE_ATTRIBUTE_NAME, PTC_AddStyle, PTS_Editing, PX_ChangeRecord::setPersistance(), px_ChangeHistory::setSavePosition(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_MIN, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by changeSpanFmt(), and deleteSpan().
bool pt_PieceTable::_realChangeStruxFmt | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos1, | |||
PT_DocPosition | dpos2, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
PTStruxType | pts, | |||
bool | bRevisionDelete | |||
) | [protected] |
References _checkSkipFootnote(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _fmtChangeStruxWithNotify(), _getStruxFromFragSkip(), _getStruxOfTypeFromPosition(), ASSERT_PV_SIZE, beginMultiStepGlob(), endMultiStepGlob(), gchar, PD_Style::getAllProperties(), pt_VarSet::getAP(), PP_AttrProp::getAttribute(), getDocument(), getFragFromPosition(), pf_Frag::getIndexAP(), UT_GenericVector< T >::getItemCount(), pf_Frag::getLength(), pf_Frag::getNext(), UT_GenericVector< T >::getNthItem(), pf_Frag::getPos(), pf_Frag_Strux::getStruxType(), PD_Document::getStyle(), pf_Frag::getType(), isEndFootnote(), isFootnote(), isInsideFootnote(), m_pts, m_varset, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PP_getAttribute(), PT_STYLE_ATTRIBUTE_NAME, PTS_Editing, PTX_SectionEndnote, PTX_SectionTOC, UT_ASSERT, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by changeStruxFmt(), and deleteSpan().
bool pt_PieceTable::_realChangeStruxForLists | ( | pf_Frag_Strux * | sdh, | |
const char * | pszParentID, | |||
bool | bRevisionDelete | |||
) | [protected] |
This Method implements the change strux we need to reparent lists.
References _fmtChangeStrux(), px_ChangeHistory::addChangeRecord(), getDocument(), getFragPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Strux::getStruxType(), m_history, m_varset, pt_VarSet::mergeAP(), PP_std_copyProps(), PTC_AddFmt, PX_ChangeRecord::PXT_ChangeStrux, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by changeStruxForLists().
void pt_PieceTable::_realDeleteHdrFtrStrux | ( | pf_Frag_Strux * | pfs | ) | [protected] |
References _deleteHdrFtrStruxWithNotify().
Referenced by deleteHdrFtrStrux(), and deleteSpan().
bool pt_PieceTable::_realDeleteSpan | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2, | |||
PP_AttrProp * | p_AttrProp_Before, | |||
bool | bDeleteTableStruxes, | |||
bool | bDontGlob = false | |||
) | [protected] |
References _changePointWithNotify(), _deleteComplexSpan(), _deleteFormatting(), _deleteStruxWithNotify(), _insertFmtMarkFragWithNotify(), _isSimpleDeleteSpan(), _tweakDeleteSpan(), beginMultiStepGlob(), endMultiStepGlob(), getAttrProp(), UT_Stack::getDepth(), getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPos(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), m_pts, UT_Stack::pop(), PTC_AddFmt, PTS_Editing, PP_AttrProp::setAttribute(), UT_DEBUGMSG, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by deleteSpan().
bool pt_PieceTable::_realInsertObject | ( | PT_DocPosition | dpos, | |
PTObjectType | pto, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties | |||
) | [protected] |
References _computeBlockOffset(), _getStruxFromFrag(), _getStruxFromFragSkip(), _insertObject(), px_ChangeHistory::addChangeRecord(), pf_Frag::getField(), getFragFromPosition(), pf_Frag::getXID(), isEndFootnote(), m_history, m_pDocument, m_pts, m_varset, PD_Document::notifyListeners(), PTS_Editing, PX_ChangeRecord::PXT_InsertObject, pt_VarSet::storeAP(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by insertObject().
bool pt_PieceTable::_realInsertObject | ( | PT_DocPosition | dpos, | |
PTObjectType | pto, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Object ** | ppfo | |||
) | [protected] |
References _chooseIndexAP(), _computeBlockOffset(), _getStruxFromFrag(), _getStruxFromFragSkip(), _insertObject(), px_ChangeHistory::addChangeRecord(), pf_Frag::getField(), getFragFromPosition(), pf_Frag::getXID(), isEndFootnote(), m_history, m_pDocument, m_pts, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PTC_AddFmt, PTO_Embed, PTO_Math, PTS_Editing, PX_ChangeRecord::PXT_InsertObject, UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
bool pt_PieceTable::_realInsertSpan | ( | PT_DocPosition | dpos, | |
const UT_UCSChar * | p, | |||
UT_uint32 | length, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
fd_Field * | pField = NULL , |
|||
bool | bAddChangeRec = true | |||
) | [protected] |
References _canCoalesceInsertSpan(), _chooseIndexAP(), _computeBlockOffset(), _deleteFmtMarkWithNotify(), _getStruxFromFrag(), _getStruxFromFragSkip(), _insertSpan(), _lastUndoIsThisFmtMark(), px_ChangeHistory::addChangeRecord(), pt_VarSet::addIfUniqueAP(), pt_VarSet::appendBuf(), PP_AttrProp::areAnyOfTheseNamesPresent(), beginMultiStepGlob(), PP_AttrProp::cloneWithElimination(), px_ChangeHistory::coalesceHistory(), endMultiStepGlob(), getAttrProp(), getDocument(), pf_Frag::getField(), getFragFromPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag::getType(), PD_Document::isCoalescingMasked(), isEndFootnote(), m_history, m_pDocument, m_pts, m_varset, PP_AttrProp::markReadOnly(), pt_VarSet::mergeAP(), PD_Document::notifyListeners(), pf_Frag::PFT_Text, PTC_AddFmt, PTS_Editing, PX_ChangeRecord::PXT_InsertSpan, PX_ChangeRecord::setDocument(), undoCmd(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by insertSpan().
bool pt_PieceTable::_realInsertStrux | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Strux ** | ppfs_ret | |||
) | [protected] |
References _computeFmtMarkForNewBlock(), _createStrux(), _deleteObjectWithNotify(), _findNextHyperlink(), _findPrevHyperlink(), _getStruxFromFragSkip(), _getStruxFromPosition(), _insertFmtMarkAfterBlockWithNotify(), _insertNoteInEmbeddedStruxList(), _insertStrux(), px_ChangeHistory::addChangeRecord(), beginMultiStepGlob(), endMultiStepGlob(), getDocument(), getFragFromPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), pf_Frag::getXID(), getXID(), insertObject(), isEndFootnote(), isFootnote(), m_history, m_pDocument, m_pts, m_varset, pt_VarSet::mergeAP(), PD_Document::notifyListeners(), PTC_AddFmt, PTO_Hyperlink, PTS_Editing, PTX_Block, PTX_EndAnnotation, PTX_EndEndnote, PTX_EndFootnote, PTX_EndTOC, PTX_SectionAnnotation, PTX_SectionFrame, PX_ChangeRecord::PXT_InsertStrux, pf_Frag::setXID(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_UNUSED.
Referenced by insertStrux().
bool pt_PieceTable::_struxHasContent | ( | pf_Frag_Strux * | pfs | ) | const [protected] |
References pf_Frag::getNext(), and pf_Frag::getType().
bool pt_PieceTable::_struxIsEmpty | ( | pf_Frag_Strux * | pfs | ) | const [protected] |
References pf_Frag::getNext(), pf_Frag::getType(), and isFootnote().
Referenced by _unlinkStrux_Block().
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, and PTX_SectionCell.
Referenced by _deleteComplexSpan().
bool pt_PieceTable::_tellAndMaybeAddListener | ( | PL_Listener * | pListener, | |
PL_ListenerId | listenerId, | |||
bool | bAdd | |||
) | [protected] |
References pf_Frag_FmtMark::createSpecialChangeRecord(), pf_Frag_Object::createSpecialChangeRecord(), pf_Frag_Strux::createSpecialChangeRecord(), pf_Frag_Text::createSpecialChangeRecord(), DELETEP, pf_Fragments::getFirst(), pf_Frag::getNext(), pf_Frag::getPos(), getStruxOfTypeFromPosition(), PL_Listener::getType(), isEndFootnote(), m_fragments, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PL_Listener::populate(), PL_Listener::populateStrux(), PTX_Block, pf_Frag_Strux::setFmtHandle(), UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
Referenced by addListener(), and tellListener().
bool pt_PieceTable::_translateRevisionAttribute | ( | PP_RevisionAttr & | Revisions, | |
PT_AttrPropIndex | indexAP, | |||
PP_RevisionType | eType, | |||
PP_PropertyVector & | ppRevAttrib, | |||
PP_PropertyVector & | ppRevProps, | |||
const PP_PropertyVector & | ppAttrib, | |||
const PP_PropertyVector & | 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, PP_RevisionAttr::pruneForCumulativeResult(), PP_RevisionAttr::setRevision(), and UT_return_val_if_fail.
Referenced by insertObject(), insertSpan(), and insertStrux().
bool pt_PieceTable::_tweakDeleteSpan | ( | PT_DocPosition & | dpos1, | |
PT_DocPosition & | dpos2, | |||
UT_Stack * | pstDelayStruxDelete | |||
) | const [protected] |
References _tweakDeleteSpanOnce(), UT_Stack::getDepth(), getFragsFromPositions(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_bDoNotTweakPosition, PTO_Annotation, PTO_Bookmark, PTO_Hyperlink, and UT_return_val_if_fail.
Referenced by _realDeleteSpan().
bool pt_PieceTable::_tweakDeleteSpanOnce | ( | PT_DocPosition & | dpos1, | |
PT_DocPosition & | dpos2, | |||
UT_Stack * | pstDelayStruxDelete | |||
) | const [protected] |
References _getStruxFromFragSkip(), _getStruxFromPosition(), _getStruxOfTypeFromPosition(), _tweakFieldSpan(), getFragsFromPositions(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_bDoNotTweakPosition, pf_Frag::PFT_Strux, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_Stack::push(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _tweakDeleteSpan().
void pt_PieceTable::_tweakFieldSpan | ( | PT_DocPosition & | dpos1, | |
PT_DocPosition & | dpos2 | |||
) | const [protected] |
void pt_PieceTable::_unlinkFrag | ( | pf_Frag * | pf, | |
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References pf_Frag_Text::changeLength(), pf_Frag_Text::getBufIndex(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag::getType(), pt_VarSet::isContiguous(), m_fragments, m_varset, pf_Frag::PFT_Text, pf_Fragments::unlinkFrag(), UT_ASSERT, and xxx_UT_DEBUGMSG.
Referenced by _deleteFmtMark(), _deleteObject(), _deleteSpan(), _fmtChangeSpan(), _unlinkStrux_Block(), and _unlinkStrux_Section().
bool pt_PieceTable::_unlinkStrux | ( | pf_Frag_Strux * | pfs, | |
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _unlinkStrux_Block(), _unlinkStrux_Section(), pf_Frag_Strux::getStruxType(), PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_SHOULD_NOT_HAPPEN.
Referenced by _deleteStruxWithNotify(), and _doTheDo().
bool pt_PieceTable::_unlinkStrux_Block | ( | pf_Frag_Strux * | pfs, | |
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _getStruxFromPosition(), _struxIsEmpty(), _unlinkFrag(), pf_Frag::getNext(), pf_Frag::getPos(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), PTX_Block, PTX_EndCell, PTX_EndFrame, PTX_EndTable, PTX_Section, PTX_SectionCell, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by _unlinkStrux().
bool pt_PieceTable::_unlinkStrux_Section | ( | pf_Frag_Strux * | pfs, | |
pf_Frag ** | ppfEnd, | |||
UT_uint32 * | pfragOffsetEnd | |||
) | [protected] |
References _unlinkFrag(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), isEndFootnote(), isFootnote(), m_embeddedStrux, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _unlinkStrux().
bool pt_PieceTable::addListener | ( | PL_Listener * | pListener, | |
PL_ListenerId | listenerId | |||
) |
References _tellAndMaybeAddListener().
Referenced by PD_Document::addListener().
bool pt_PieceTable::appendFmt | ( | const PP_PropertyVector & | vecAttributes | ) |
References pf_Fragments::getFirst(), loading, m_fragments, m_pts, m_varset, PTS_Loading, pt_VarSet::storeAP(), and UT_return_val_if_fail.
Referenced by PD_Document::appendFmt(), PD_Document::appendSpan(), and PD_Document::insertSpanBeforeFrag().
bool pt_PieceTable::appendFmtMark | ( | void | ) |
References _makeFmtMark(), pf_Fragments::appendFrag(), and m_fragments.
Referenced by PD_Document::appendFmtMark(), and TFTEST_MAIN().
bool pt_PieceTable::appendLastStruxFmt | ( | PTStruxType | pst, | |
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | 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 PP_PropertyVector & | attributes, | |||
const std::string & | props, | |||
bool | bSkipEmbededSections | |||
) |
As above, but props represented by a single XML string
References appendLastStruxFmt(), FREEP, gchar, PP_std_copyProps(), UT_return_val_if_fail, and UT_splitPropsToArray().
bool pt_PieceTable::appendObject | ( | PTObjectType | pto, | |
const PP_PropertyVector & | attributes | |||
) |
References _makeObject(), pf_Fragments::appendFrag(), m_fragments, PP_getAttribute(), PT_XID_ATTRIBUTE_NAME, and pf_Frag::setXID().
Referenced by PD_Document::appendObject().
bool pt_PieceTable::appendSpan | ( | const UT_UCSChar * | p, | |
UT_uint32 | length | |||
) |
References pt_VarSet::appendBuf(), pf_Fragments::appendFrag(), pf_Frag_Text::changeLength(), pf_Frag_Text::getBufIndex(), pf_Fragments::getFirst(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), pf_Frag::getLength(), pf_Frag::getType(), pt_VarSet::isContiguous(), loading, m_fragments, m_pts, m_varset, PTS_Loading, and UT_return_val_if_fail.
Referenced by PD_Document::appendSpan().
bool pt_PieceTable::appendStrux | ( | PTStruxType | pts, | |
const PP_PropertyVector & | attributes, | |||
pf_Frag_Strux ** | ppfs_ret = 0 | |||
) |
References _insertNoteInEmbeddedStruxList(), _makeStrux(), pf_Fragments::appendFrag(), pf_Fragments::getLast(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), insertFmtMarkBeforeFrag(), m_fragments, PP_getAttribute(), PT_XID_ATTRIBUTE_NAME, PTX_EndAnnotation, PTX_EndEndnote, PTX_EndFootnote, and pf_Frag::setXID().
Referenced by PD_Document::appendStrux(), and TFTEST_MAIN().
bool pt_PieceTable::appendStruxFmt | ( | pf_Frag_Strux * | pfs, | |
const PP_PropertyVector & | attributes | |||
) |
changes formatting of a strux while loading document
References pt_VarSet::addIfUniqueAP(), PP_AttrProp::cloneWithReplacements(), getAttrProp(), pf_Fragments::getFirst(), pf_Frag::getIndexAP(), m_fragments, m_pts, m_varset, PP_AttrProp::markReadOnly(), PTS_Loading, pf_Frag::setIndexAP(), and UT_return_val_if_fail.
Referenced by PD_Document::appendStruxFmt().
bool pt_PieceTable::appendStyle | ( | const PP_PropertyVector & | attributes | ) |
void pt_PieceTable::beginMultiStepGlob | ( | void | ) |
References px_ChangeHistory::addChangeRecord(), getDocument(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord_Glob::PXF_MultiStepStart, PX_ChangeRecord::PXT_GlobMarker, PX_ChangeRecord::setCRNumber(), PX_ChangeRecord::setDocument(), and UT_return_if_fail.
Referenced by _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteSpan(), _realInsertSpan(), _realInsertStrux(), and changeStruxFmt().
void pt_PieceTable::beginUserAtomicGlob | ( | void | ) |
UT_sint32 pt_PieceTable::calcDocsize | ( | void | ) |
Itterate through the document to calculate the document size Don't call this in production code. This is used only for recovery and testing purposes
References pf_Fragments::getFirst(), getFragments(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getType(), size, and UT_ASSERT.
bool pt_PieceTable::canDo | ( | bool | bUndo | ) | const |
References px_ChangeHistory::canDo(), and m_history.
Referenced by PD_Document::canDo().
bool pt_PieceTable::changeLastStruxFmtNoUndo | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | attrs, | |||
const PP_PropertyVector & | props, | |||
bool | bSkipEmbededSections | |||
) |
References _findLastStruxOfType(), pt_VarSet::addIfUniqueAP(), PP_AttrProp::cloneWithReplacements(), pf_Fragments::findFirstFragBeforePos(), getAttrProp(), pf_Fragments::getFirst(), m_fragments, m_varset, PP_AttrProp::markReadOnly(), and UT_return_val_if_fail.
Referenced by changeLastStruxFmtNoUndo(), and PD_Document::changeLastStruxFmtNoUndo().
bool pt_PieceTable::changeLastStruxFmtNoUndo | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | attrs, | |||
const std::string & | props, | |||
bool | bSkipEmbededSections | |||
) |
References changeLastStruxFmtNoUndo(), FREEP, gchar, PP_std_copyProps(), UT_return_val_if_fail, and UT_splitPropsToArray().
bool pt_PieceTable::changeObjectFormatNoUpdate | ( | PTChangeFmt | ptc, | |
pf_Frag_Object * | pfo, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties | |||
) |
References getDocument(), pf_Frag::getIndexAP(), m_varset, pt_VarSet::mergeAP(), pf_Frag::setIndexAP(), UT_ASSERT_HARMLESS, and UT_UNUSED.
Referenced by PD_Document::changeObjectFormatNoUpdate().
bool pt_PieceTable::changeSectionAttsNoUpdate | ( | pf_Frag_Strux * | pfStrux, | |
const char * | attr, | |||
const char * | attvalue | |||
) |
References _realChangeSectionAttsNoUpdate().
Referenced by PD_Document::changeStruxAttsNoUpdate().
bool pt_PieceTable::changeSpanFmt | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos1, | |||
PT_DocPosition | dpos2, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties | |||
) |
References _getSpanAttrPropHelper(), _realChangeSpanFmt(), PP_RevisionAttr::addRevision(), gchar, PP_AttrProp::getAttribute(), getFragsFromPositions(), pf_Frag::getLength(), AD_Document::getRevisionId(), pf_Frag::getType(), PP_RevisionAttr::getXMLstring(), AD_Document::isMarkRevisions(), m_pDocument, PP_std_setPropsToNothing(), PTC_AddFmt, PTC_RemoveFmt, and UT_MIN.
Referenced by PD_Document::changeSpanFmt().
bool pt_PieceTable::changeStruxFmt | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos1, | |||
PT_DocPosition | dpos2, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
PTStruxType | pts = PTX_StruxDummy | |||
) |
References _fmtChangeStruxWithNotify(), _getStruxOfTypeFromPosition(), _realChangeStruxFmt(), PP_RevisionAttr::addRevision(), beginMultiStepGlob(), endMultiStepGlob(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), pf_Frag::getIndexAP(), pf_Frag::getNext(), AD_Document::getRevisionId(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), PP_RevisionAttr::getXMLstring(), AD_Document::isMarkRevisions(), m_pDocument, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PP_std_setPropsToValue(), PTC_RemoveFmt, PTX_StruxDummy, UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
Referenced by PD_Document::changeStruxFmt().
bool pt_PieceTable::changeStruxFmtNoUndo | ( | PTChangeFmt | ptc, | |
pf_Frag_Strux * | pfs, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | 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::changeStruxForLists | ( | pf_Frag_Strux * | sdh, | |
const char * | pszParentID | |||
) |
References _realChangeStruxForLists().
Referenced by PD_Document::changeStruxForLists().
bool pt_PieceTable::changeStruxFormatNoUpdate | ( | PTChangeFmt | ptc, | |
pf_Frag_Strux * | pfs, | |||
const PP_PropertyVector & | attributes | |||
) |
References _fmtChangeStrux(), getDocument(), pf_Frag::getIndexAP(), m_varset, pt_VarSet::mergeAP(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by PD_Document::_pruneSectionAPI(), and PD_Document::changeStruxFormatNoUpdate().
void pt_PieceTable::clearIfAtFmtMark | ( | PT_DocPosition | dpos | ) |
References _lastUndoIsThisFmtMark(), undoCmd(), and UT_DEBUGMSG.
Referenced by PD_Document::clearIfAtFmtMark().
void pt_PieceTable::clearUndo | ( | ) | [inline] |
Referenced by PD_Document::_clearUndo().
bool pt_PieceTable::createAndSendCR | ( | PT_DocPosition | dpos, | |
UT_sint32 | iType, | |||
bool | bSave, | |||
UT_Byte | iGlob | |||
) |
References px_ChangeHistory::addChangeRecord(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord, 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_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, PX_ChangeRecord::PXT_ListUpdate, PX_ChangeRecord::PXT_RemoveList, PX_ChangeRecord::PXT_StopList, PX_ChangeRecord::PXT_UpdateField, PX_ChangeRecord::PXT_UpdateLayout, UT_ASSERT, UT_DEBUGMSG, and UT_SHOULD_NOT_HAPPEN.
Referenced by PD_Document::createAndSendCR().
bool pt_PieceTable::createAndSendDocPropCR | ( | const PP_PropertyVector & | pAtts, | |
const PP_PropertyVector & | pProps | |||
) |
References pt_VarSet::addIfUniqueAP(), pf_Fragments::getFirst(), getFragments(), m_pDocument, m_varset, PD_Document::notifyListeners(), PX_ChangeRecord, PX_ChangeRecord::PXT_ChangeDocProp, PP_AttrProp::setAttributes(), and PP_AttrProp::setProperties().
Referenced by PD_Document::createAndSendDocPropCR().
bool pt_PieceTable::deleteFieldFrag | ( | pf_Frag * | pf | ) |
References _deleteComplexSpan_norec(), getFragPosition(), pf_Frag::getLength(), m_pts, PTS_Editing, and UT_return_val_if_fail.
Referenced by fd_Field::_deleteSpan().
bool pt_PieceTable::deleteFmtMark | ( | PT_DocPosition | dpos | ) |
Delete The first FmtMark found at the position given.
References _deleteFmtMarkWithNotify(), _getStruxFromFragSkip(), getFragFromPosition(), pf_Frag::getNext(), pf_Frag::getPrev(), and pf_Frag::getType().
Referenced by PD_Document::deleteFmtMark().
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().
void pt_PieceTable::deleteHdrFtrStrux | ( | pf_Frag_Strux * | pfs | ) |
References _fixHdrFtrReferences(), _realDeleteHdrFtrStrux(), deleteSpan(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), getFragPosition(), pf_Frag::getNext(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), AD_Document::isMarkRevisions(), m_pDocument, pf_Frag::PFT_Strux, and UT_return_if_fail.
Referenced by PD_Document::deleteHdrFtrStrux().
bool pt_PieceTable::deleteSpan | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2, | |||
PP_AttrProp * | p_AttrProp_Before, | |||
UT_uint32 & | iRealDeleteCount, | |||
bool | bDontGlob = false | |||
) |
Referenced by _deleteHdrFtrStruxWithNotify(), deleteHdrFtrStrux(), and deleteSpanWithTable().
bool pt_PieceTable::deleteSpan | ( | PT_DocPosition | dpos1, | |
PT_DocPosition | dpos2, | |||
PP_AttrProp * | p_AttrProp_Before, | |||
UT_uint32 & | iRealDeleteCount, | |||
bool | bDeleteTableStruxes, | |||
bool | bDontGlob | |||
) |
Add a change tracking attribute/value to the given fragment.
If the attribute already exists on the fragment then it is not modified.
References _findLastStruxOfType(), _fixHdrFtrReferences(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteHdrFtrStrux(), _realDeleteSpan(), ABIATTR_PARA_DELETED_REVISION, ABIATTR_PARA_END_DELETED_REVISION, ABIATTR_PARA_START_DELETED_REVISION, PP_RevisionAttr::addRevision(), pf_Frag_Strux::clearAllFmtHandles(), dumpDoc(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), getEndOfBlock(), getFragFromPosition(), getFragments(), getFragsFromPositions(), PP_RevisionAttr::getGreatestLesserOrEqualRevision(), PP_Revision::getId(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPos(), pf_Frag::getPrev(), AD_Document::getRevisionId(), pf_Frag_Strux::getStruxType(), PP_Revision::getType(), pf_Frag::getType(), PP_RevisionAttr::getXMLstring(), inSameBlock(), AD_Document::isMarkRevisions(), PD_Document::isVDNDinProgress(), m_pDocument, PP_RevisionAttr::mergeAttrIfNotAlreadyThere(), pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PP_REVISION_ADDITION_AND_FMT, PP_REVISION_DELETION, PTC_AddFmt, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, tostr(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_MIN, and UT_NOT_IMPLEMENTED.
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::deleteStruxNoUpdate | ( | pf_Frag_Strux * | sdh | ) |
Use this for deleting unneeded strux during doc import. Particularly useful for importing RTF.
References getFragments(), pf_Frag::getNext(), pf_Frag::getType(), pf_Fragments::unlinkFrag(), and UT_DEBUGMSG.
Referenced by PD_Document::deleteStrux(), and PD_Document::deleteStruxNoUpdate().
bool pt_PieceTable::deleteStruxWithNotify | ( | pf_Frag_Strux * | 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::dumpDoc | ( | const char * | msg, | |
PT_DocPosition | currentpos, | |||
PT_DocPosition | endpos | |||
) |
References PD_Document::getBounds(), getFragFromPosition(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getType(), m_pDocument, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PTO_Annotation, PTO_Bookmark, PTO_Embed, PTO_Field, PTO_Hyperlink, PTO_Image, PTO_Math, PTO_RDFAnchor, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndMarginnote, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionMarginnote, PTX_SectionTable, PTX_SectionTOC, PTX_StruxDummy, tryDownCastStrux(), UT_DEBUG_ONLY_ARG, and UT_DEBUGMSG.
Referenced by deleteSpan(), and PD_Document::dumpDoc().
void pt_PieceTable::endMultiStepGlob | ( | void | ) |
References px_ChangeHistory::addChangeRecord(), m_history, m_pDocument, PD_Document::notifyListeners(), PX_ChangeRecord_Glob::PXF_MultiStepEnd, PX_ChangeRecord::PXT_GlobMarker, and UT_return_if_fail.
Referenced by _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteSpan(), _realInsertSpan(), _realInsertStrux(), and changeStruxFmt().
void pt_PieceTable::endUserAtomicGlob | ( | void | ) |
bool pt_PieceTable::enumStyles | ( | UT_uint32 | k, | |
const char ** | pszName, | |||
const PD_Style ** | ppStyle | |||
) | const |
Do not use this function inside loops, used the other enumStyles() instead !!!
References PD_Style::getName(), UT_GenericVector< T >::getNthItem(), m_hashStyles, UT_ASSERT_HARMLESS, and UT_return_val_if_fail.
Referenced by PD_Document::enumStyles().
bool pt_PieceTable::enumStyles | ( | UT_GenericVector< PD_Style * > *& | pStyles | ) | const |
generate vector of styles the caller has to delete pStyle when done ...
References UT_GenericVector< T >::addItem(), and m_hashStyles.
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().
const std::map<std::string, PD_Style *>& pt_PieceTable::getAllStyles | ( | ) | const [inline] |
Referenced by PD_Document::areDocumentStylesheetsEqual().
bool pt_PieceTable::getAttrProp | ( | PT_AttrPropIndex | indexAP, | |
const PP_AttrProp ** | ppAP | |||
) | const |
References pt_VarSet::getAP(), m_varset, and UT_return_val_if_fail.
Referenced by _deleteComplexSpanHAR(), _deleteHdrFtrsFromSectionStruxIfPresent(), _findNextHyperlink(), _findPrevHyperlink(), _fixHdrFtrReferences(), PD_Style::_getAttributeExpand(), PD_Style::_getPropertyExpand(), _realDeleteSpan(), _realInsertSpan(), _translateRevisionAttribute(), PD_Document::acceptAllRevisions(), PD_Document::acceptRejectRevision(), PD_Style::addAttributes(), PD_Style::addProperties(), PD_Style::addProperty(), PD_DocumentRDF::addXMLIDsForObjects(), appendLastStruxFmt(), appendStruxFmt(), PD_Document::areDocumentFormatsEqual(), PD_Document::areDocumentStylesheetsEqual(), changeLastStruxFmtNoUndo(), changeStruxFmt(), deleteHdrFtrStrux(), deleteSpan(), PD_DocumentRDF::dumpObjectMarkersFromDocument(), PD_Document::findForwardStyleStrux(), PD_Document::findHdrFtrStrux(), PD_Document::findPreviousStyleStrux(), PD_Document::getAllUsedStyles(), PD_Style::getAttribute(), PD_Style::getAttributeCount(), PD_Style::getAttributeExpand(), PD_Document::getAttrProp(), PD_Style::getNthAttribute(), PD_Style::getNthProperty(), PD_DocumentRDF::getObjectsInScopeOfTypesForRange(), PD_Style::getProperty(), PD_Style::getPropertyCount(), PD_Style::getPropertyExpand(), PD_Style::getPropertyType(), PD_Document::getStyleFromSDH(), pf_Frag::getXMLID(), PD_Document::isInsertHyperLinkValid(), pf_Frag::operator==(), pf_Frag_Object::pf_Frag_Object(), PD_DocumentRDF::priv_addRelevantIDsForPosition(), PD_Document::rejectAllHigherRevisions(), PD_Document::removeStyle(), PD_Document::updateDocForStyleChange(), and PD_Document::verifySectionID().
bool pt_PieceTable::getBlockBuf | ( | pf_Frag_Strux * | sdh, | |
UT_GrowBuf * | pgb | |||
) | const |
Copy paragraph (block) into buffer
sdh | Paragraph to copy |
pgb | Buffer where text should be copied to |
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, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by PD_Document::getBlockBuf().
pf_Frag_Strux * pt_PieceTable::getBlockFromPosition | ( | PT_DocPosition | pos | ) | const |
References _getBlockFromPosition().
Referenced by PD_Document::getBlockFromPosition().
bool pt_PieceTable::getBounds | ( | bool | bEnd, | |
PT_DocPosition & | docPos | |||
) | const |
References pf_Fragments::getLast(), pf_Frag::getLength(), pf_Frag::getPos(), and m_fragments.
Referenced by PD_DocumentRDF::dumpObjectMarkersFromDocument(), PD_Document::getBounds(), and getPosEnd().
PD_Document * pt_PieceTable::getDocument | ( | void | ) |
References m_pDocument.
Referenced by _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _fmtChangeStruxWithNotify(), _insertFmtMarkFragWithNotify(), pf_Frag_Text::_isContentEqual(), _realChangeSectionAttsNoUpdate(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realChangeStruxForLists(), _realInsertSpan(), _realInsertStrux(), fd_Field::_throwChangeRec(), beginMultiStepGlob(), changeObjectFormatNoUpdate(), changeStruxFmtNoUndo(), changeStruxFormatNoUpdate(), px_ChangeHistory::getDoc(), insertStruxNoUpdateBefore(), tellListenerSubset(), TFTEST_MAIN(), and undoCmd().
pf_Frag * pt_PieceTable::getEndOfBlock | ( | PT_DocPosition | currentpos, | |
PT_DocPosition | endpos | |||
) |
MIQ11: Work out if we are deleting from one paragraph to another in a way that we want to emit a delta:merge to have the two paragraphs merged in ODT.
Appologies for the complexity of this method, there seem to be an interesting range of "what if..." questions that come up when you are deciding if something is a delta:merge or a delta:removed-content. Having a single method to trap all of those allows the caller to just mark things appropriately using the "revision" attribute.
For .abw format the explicit marking of start/end/para deleted matters less. But the marking needs to be made so that ODT can work properly.
The delta:merge and delta:removed-content allow two or more XML elements to be joined or removed respectively in ODT+GCT [1]. Although I talk about these markup constructs from a serialized ODT file, it is best to work out what has happened at the time of document editing rather than try to work backwards at save time. These pieces of markup are put in place again when a ODT+GCT file is read so that they can again be used during a save.
Basically delta:merge lets to join two paragraphs together into a single one. If you are just removing content from the start or end of a paragraph then you are better off just using delta:removed-content. If the deletion is for one or more complete paragraphs then it is cleaner to use delta:removed-content to get rid of those paragraphs. Likewise, if deleting from mid way through a paragraph to the end of a subsequent one then you are best off using delta:removed-content on the first paragraph content and delta:removed-content on the subsequent paragraphs. It is just these edge cases that this method contains and allows the caller to simply react if we are performing a delta:merge by marking things as needed.
There are three attributes which should be set to the revision number in which they occur. The start and end deleted attributes should only be added when we are performing a delta:merge.
ABIATTR_PARA_DELETED_REVISION The whole paragraph is deleted ABIATTR_PARA_START_DELETED_REVISION The start of the paragraph was deleted, causing it to join with the previous paragraph ABIATTR_PARA_END_DELETED_REVISION The end of this paragraph is deleted, causing a subsequent paragraph to join it's content with this one.
Consider first ABIATTR_PARA_END_DELETED_REVISION which should be set to the current revision if the deletion of the selection can join the next object at the same document scope.
Note that this should only be done when the deletion ends in the middle of a paragraph. Otherwise, we should delete the end content of the paragraph (its pcdata or PFT_Text) and contain the other paragraph(s) in delta:removed-content.
This is the case when:
deleting from a para to another para.
deleting from a para through an entire table to another para
This is NOT the case when:
deleting from a para into an image (draw:frame). In this case the para content to its end is deleted and the image is wrapped in delta:removed-content.
deleting from a para to a para in a table or to a para in another cell of this or another table. In this case starting with para1, para2...paran, tableA, ... celly If the selection extends from ra1 through into celly then The content of para1 "ra1" is deleted with delta:removed-content. para2...paran are enclosed in delta:removed-content to be deleted. Each cell in the selection which from tableA is handled as a subdocument.
Firstly, this is not a delta:merge if the start and end pos are contained within the same paragraph (and startpos+1 != endpos, see below).
__Document Level Considerations__
Failing that, we want to get the paragraph (PTX_Block) for both the first and second position, if both exist then we need to make sure they are in the same table cell or no cell at all. Finding the cell is done by seeking backward from the Block.
If we hit a table end or cell end marker (PTX_EndTable | PTX_EndCell) before we find a cell start (PTX_SectionCell) then we are in a paragraph that is at the top document scope. ie, a paragraph with "no cell".
__Delete To and From the exact Start/End of Paragraph__
Another two special cases; if we are deleting right through to the end of the last paragraph then we do not mark it as a delta:merge because we perfer to delete the end content of the first paragraph and delta:removed-content the other paragraphs as that is a simpler document. Similarly, if we are deleting from the start of a para through it's end then we mark that para with delta:removed-content and remove the starting content from the last para. If there are one or more paragraphs between these start/end cases they should be wrapped in delta:removed-content too.
__Single Character Delete/Backspace To Merge__ __Delete from starting PTX_Block into the para__
When marging two paragraphs using the backspace or delete key, the range is only a single character: startpos+1 == endpos. The startpos will be the PTX_Block and the endpos likely the first char in the PFT_Text. This case is a delta:merge because we are merging the second paragraph into the content of the first. Note that we handle this case when the start and end blocks are the same even when endpos > startpos+1 because the user might have a selection starting at the PTX_Block and into the second paragraph and delete the lot in one operation.
NOTES:
__Selection to Delete Para__
Note that in the GUI you have to select from the start of the previous line in order to delete a paragraph or to merge it with the previous one. eg, if the document text is as below, to merge the second paragraph you either place the carrot at the start of the second line and backspace or the end of the first line and delete.
This is para1 And the second one.
This seems natural enough, but to delete the whole second paragraph you have to start the text selection from the carrot position just after the "para1" string, ie, the end of the first line instead of the start of the second line.
__Variable Names__
MIQ11: I have omitted the pf prefix to pointers to fragments because most of the local variables are of that type.
[1] http://monkeyiq.blogspot.com/2011/04/change-tracking-why.html Get the first strux that marks the end of the block containing currentpos or null. The end of block strux has to be positioned before endpos or null is returned.
Note that if currentpos is itself a block this method will move over that PTX_Block before searching for the end of block.
References getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getPos(), pf_Frag::getType(), PTX_Block, PTX_SectionAnnotation, PTX_SectionEndnote, PTX_SectionFootnote, tryDownCastStrux(), and UT_DEBUGMSG.
Referenced by deleteSpan().
bool pt_PieceTable::getFragFromPosition | ( | PT_DocPosition | docPos, | |
pf_Frag ** | ppf, | |||
PT_BlockOffset * | pOffset | |||
) | const |
References pf_Fragments::findFirstFragBeforePos(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getPos(), pf_Frag::getType(), m_fragments, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _checkSkipFootnote(), _doTheDo(), _getBlockFromPosition(), _insertFmtMarkFragWithNotify(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteSpan(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), _tellListenerSubsetWalkRange(), deleteFmtMark(), deleteSpan(), PD_Document::deleteStrux(), dumpDoc(), PD_DocumentRDF::dumpObjectMarkersFromDocument(), FV_View::getChar(), getEndOfBlock(), PD_Document::getFragFromPosition(), getFragsFromPositions(), PD_DocumentRDF::getObjectsInScopeOfTypesForRange(), insertObject(), insertSpan(), PD_Document::isBlockAtPos(), PD_Document::isCellAtPos(), PD_Document::isEndFootnoteAtPos(), PD_Document::isEndFrameAtPos(), PD_Document::isEndTableAtPos(), PD_Document::isFootnoteAtPos(), PD_Document::isFrameAtPos(), PD_Document::isHdrFtrAtPos(), PD_Document::isInsertHyperLinkValid(), PD_Document::isSectionAtPos(), PD_Document::isTableAtPos(), PD_Document::isTOCAtPos(), PD_DocumentRDF::priv_addRelevantIDsForPosition(), and tellListenerSubset().
pf_Fragments& pt_PieceTable::getFragments | ( | void | ) | [inline] |
Referenced by _deleteHdrFtrsFromSectionStruxIfPresent(), _deleteHdrFtrStruxWithNotify(), PD_DocIterator::_findFrag(), IE_Imp_Text::_insertBlock(), IE_Imp_Text::_writeHeader(), PD_Document::areDocumentContentsEqual(), calcDocsize(), createAndSendDocPropCR(), deleteFragNoUpdate(), deleteSpan(), deleteStruxNoUpdate(), PD_Document::findBookmark(), PD_Document::findForwardStyleStrux(), PD_Document::findFragOfType(), PD_Document::findHdrFtrStrux(), PD_Document::findPreviousStyleStrux(), PD_Document::getAllUsedStyles(), PD_Document::getCellSDHFromRowCol(), PD_Document::getEndCellStruxFromCellSDH(), PD_Document::getEndTableStruxFromTableSDH(), PD_Document::getLastFrag(), PD_Document::getLastSectionMutableSDH(), PD_Document::getLastSectionSDH(), PD_Document::getLastStruxOfType(), pf_Frag::getNext(), pf_Frag::getNextStrux(), pf_Frag::getPos(), pf_Frag::getPrev(), PD_Document::getRowsColsFromTableSDH(), PD_Document::hasMath(), pf_Frag::lengthChanged(), PD_Document::miniDump(), PD_XMLIDCreator::rebuildCache(), PD_Document::removeListener(), PD_Document::removeStyle(), PD_Document::repairDoc(), pf_Frag::tryDownCastStrux(), PD_Document::updateDocForStyleChange(), PD_Document::updateFields(), and PD_Document::verifySectionID().
PT_DocPosition pt_PieceTable::getFragPosition | ( | const pf_Frag * | pfToFind | ) | const |
References pf_Frag::getPos().
Referenced by _deleteComplexSpan(), _deleteComplexSpanHAR(), _deleteHdrFtrStruxWithNotify(), _fmtChangeStruxWithNotify(), _insertFmtMarkAfterBlockWithNotify(), _realChangeStruxForLists(), _tweakFieldSpan(), changeStruxFmtNoUndo(), deleteFieldFrag(), deleteHdrFtrStrux(), PD_Document::getEmbeddedOffset(), getStruxPosition(), and fd_Field::update().
bool pt_PieceTable::getFragsFromPositions | ( | PT_DocPosition | dPos1, | |
PT_DocPosition | dPos2, | |||
pf_Frag ** | ppf1, | |||
PT_BlockOffset * | pOffset1, | |||
pf_Frag ** | ppf2, | |||
PT_BlockOffset * | pOffset2 | |||
) | const |
References getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag::getType(), and UT_return_val_if_fail.
Referenced by _deleteComplexSpan(), _deleteComplexSpan_norec(), _deleteFormatting(), _isSimpleDeleteSpan(), _realChangeSpanFmt(), _tweakDeleteSpan(), _tweakDeleteSpanOnce(), _tweakFieldSpan(), changeSpanFmt(), and deleteSpan().
bool pt_PieceTable::getNthUndo | ( | PX_ChangeRecord ** | ppcr, | |
UT_uint32 | undoNdx | |||
) | const [inline] |
PTState pt_PieceTable::getPieceTableState | ( | ) | const [inline] |
Referenced by PD_Document::setAttrProp().
const UT_UCSChar* pt_PieceTable::getPointer | ( | PT_BufIndex | bi | ) | const [inline] |
PT_DocPosition pt_PieceTable::getPosEnd | ( | ) |
References getBounds().
bool pt_PieceTable::getRedo | ( | PX_ChangeRecord ** | ppcr | ) | const [inline] |
bool pt_PieceTable::getSpanAttrProp | ( | pf_Frag_Strux * | sdh, | |
UT_uint32 | offset, | |||
bool | bLeftSide, | |||
const PP_AttrProp ** | ppAP | |||
) | const |
References _getSpanAttrPropHelper(), pf_Frag::getNext(), pf_Frag::getType(), isEndFootnote(), PTX_Block, and UT_return_val_if_fail.
Referenced by PD_Document::getSpanAttrProp().
bool pt_PieceTable::getStruxFromPosition | ( | PL_ListenerId | listenerId, | |
PT_DocPosition | docPos, | |||
fl_ContainerLayout ** | psfh | |||
) | const |
References _getStruxFromPosition(), and pf_Frag_Strux::getFmtHandle().
Referenced by PD_Document::getStruxFromPosition().
bool pt_PieceTable::getStruxOfTypeFromPosition | ( | PL_ListenerId | listenerId, | |
PT_DocPosition | docPos, | |||
PTStruxType | pts, | |||
fl_ContainerLayout ** | psfh | |||
) | const |
References _getStruxOfTypeFromPosition(), and pf_Frag_Strux::getFmtHandle().
Referenced by _tellAndMaybeAddListener(), fd_Field::_throwChangeRec(), PD_DocumentRDF::addXMLIDsForBlockAndTableCellForPosition(), PD_DocumentRDF::dumpObjectMarkersFromDocument(), PD_Document::getStruxOfTypeFromPosition(), and PD_DocumentRDF::priv_addRelevantIDsForPosition().
bool pt_PieceTable::getStruxOfTypeFromPosition | ( | PT_DocPosition | docPos, | |
PTStruxType | pts, | |||
pf_Frag_Strux ** | sdh | |||
) | const |
return the SDH of the last strux of the given type immediately prior to the given absolute document position.
References _getStruxOfTypeFromPosition().
PT_DocPosition pt_PieceTable::getStruxPosition | ( | pf_Frag_Strux * | sdh | ) | const |
References getFragPosition().
Referenced by PD_Document::getEmbeddedOffset(), and PD_Document::getStruxPosition().
bool pt_PieceTable::getStyle | ( | const char * | szName, | |
PD_Style ** | ppStyle | |||
) | const |
References m_hashStyles.
Referenced by _createBuiltinStyle(), PD_Document::addStyleAttributes(), PD_Document::addStyleProperties(), appendStyle(), PD_Document::getAllUsedStyles(), PD_Style::getBasedOn(), PD_Style::getFollowedBy(), PD_Document::getStyle(), PD_Document::getStyleFromSDH(), removeStyle(), PD_Document::removeStyle(), PD_Document::setAllStyleAttributes(), and PD_Document::updateDocForStyleChange().
size_t pt_PieceTable::getStyleCount | ( | void | ) | const |
References m_hashStyles.
Referenced by PD_Document::getStyleCount().
UT_uint32 pt_PieceTable::getTopXID | ( | ) | const [inline] |
References PX_ChangeRecord::m_iXID.
Referenced by PD_Document::getTopXID().
bool pt_PieceTable::getUndo | ( | PX_ChangeRecord ** | ppcr, | |
bool | bStatic = false | |||
) | const [inline] |
Referenced by Stateful_ViewListener::notify().
pt_VarSet& pt_PieceTable::getVarSet | ( | void | ) | [inline] |
Referenced by PD_Style::addAttributes(), PD_Style::addProperties(), PD_Style::addProperty(), PD_DocumentRDFMutation::commit(), PD_Document::createDataItem(), PD_DocumentRDF::getAP(), PD_Style::setAllAttributes(), PD_DocumentRDF::setAP(), PD_DocumentRDF::setupWithPieceTable(), and PD_Document::updateDocForStyleChange().
UT_uint32 pt_PieceTable::getXID | ( | ) |
References m_iXID.
Referenced by _insertObject(), _realInsertStrux(), fixMissingXIDs(), and PD_Document::getXID().
bool pt_PieceTable::hasEmbedStruxOfTypeInRange | ( | PT_DocPosition | posStart, | |
PT_DocPosition | posEnd, | |||
PTStruxType | iType | |||
) | const |
References m_embeddedStrux.
Referenced by PD_Document::hasEmbedStruxOfTypeInRange().
pf_Frag_Strux * pt_PieceTable::inSameBlock | ( | PT_DocPosition | startpos, | |
PT_DocPosition | endpos | |||
) |
Return the strux PTX_Block if both startpos and endpos are contained in the same block.
This way the method can be used both as a test to see if this is the case and the return value has added value if you actually want to inspect the block containing these positions too.
References _getBlockFromPosition(), _getStruxOfTypeFromPosition(), and PTX_Block.
Referenced by deleteSpan().
bool pt_PieceTable::insertFmtMark | ( | PTChangeFmt | ptc, | |
PT_DocPosition | dpos, | |||
PP_AttrProp * | p_AttrProp | |||
) | [inline] |
Referenced by PD_Document::insertFmtMark(), and PD_Document::insertSpan().
bool pt_PieceTable::insertFmtMarkBeforeFrag | ( | pf_Frag * | pF | ) |
References _makeFmtMark(), pf_Fragments::getFirst(), pf_Frag::getPrev(), pf_Fragments::insertFragBefore(), m_fragments, and UT_return_val_if_fail.
Referenced by appendStrux(), and PD_Document::insertFmtMarkBeforeFrag().
bool pt_PieceTable::insertFmtMarkBeforeFrag | ( | pf_Frag * | pF, | |
const PP_PropertyVector & | attributes | |||
) |
bool pt_PieceTable::insertObject | ( | PT_DocPosition | dpos, | |
PTObjectType | pto, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Object ** | ppfo | |||
) |
bool pt_PieceTable::insertObject | ( | PT_DocPosition | dpos, | |
PTObjectType | pto, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties | |||
) |
References _realInsertObject(), _translateRevisionAttribute(), getFragFromPosition(), pf_Frag::getIndexAP(), pf_Frag::getPrev(), pf_Frag::getType(), AD_Document::isMarkRevisions(), m_pDocument, PP_REVISION_ADDITION, and UT_return_val_if_fail.
Referenced by _realInsertStrux(), and PD_Document::insertObject().
bool pt_PieceTable::insertObjectBeforeFrag | ( | pf_Frag * | pF, | |
PTObjectType | pto, | |||
const PP_PropertyVector & | attributes | |||
) |
bool pt_PieceTable::insertSpan | ( | PT_DocPosition | dpos, | |
const UT_UCSChar * | p, | |||
UT_uint32 | length, | |||
fd_Field * | pField = NULL , |
|||
bool | bAddChangeRec = true | |||
) |
References _getSpanAttrPropHelper(), _realInsertSpan(), _translateRevisionAttribute(), gchar, PP_AttrProp::getAttribute(), getFragFromPosition(), pf_Frag::getIndexAP(), pf_Frag::getPrev(), pf_Frag::getType(), AD_Document::isMarkRevisions(), m_pDocument, PP_REVISION_ADDITION, PT_STYLE_ATTRIBUTE_NAME, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by PD_Document::insertSpan(), and fd_Field::update().
bool pt_PieceTable::insertSpanBeforeFrag | ( | pf_Frag * | pF, | |
const UT_UCSChar * | p, | |||
UT_uint32 | length | |||
) |
References pt_VarSet::appendBuf(), pf_Frag_Text::changeLength(), pf_Frag_Text::getBufIndex(), pf_Fragments::getFirst(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getPrev(), pf_Frag::getType(), pf_Fragments::insertFragBefore(), pt_VarSet::isContiguous(), loading, m_fragments, m_pts, m_varset, PTS_Loading, and UT_return_val_if_fail.
Referenced by PD_Document::insertSpanBeforeFrag().
bool pt_PieceTable::insertStrux | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
pf_Frag_Strux ** | ppfs_ret = 0 | |||
) |
References _getStruxFromFragSkip(), _getStruxFromPosition(), _realInsertStrux(), _translateRevisionAttribute(), pf_Frag::getIndexAP(), pf_Frag_Strux::getStruxType(), isEndFootnote(), AD_Document::isMarkRevisions(), m_pDocument, PP_REVISION_ADDITION, and UT_return_val_if_fail.
Referenced by PD_Document::insertStrux().
bool pt_PieceTable::insertStrux | ( | PT_DocPosition | dpos, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | attributes, | |||
const PP_PropertyVector & | properties, | |||
pf_Frag_Strux ** | ppfs_ret = 0 | |||
) |
bool pt_PieceTable::insertStruxBeforeFrag | ( | pf_Frag * | pF, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | attributes, | |||
pf_Frag_Strux ** | ppfs_ret = 0 | |||
) |
bool pt_PieceTable::insertStruxNoUpdateBefore | ( | pf_Frag_Strux * | sdh, | |
PTStruxType | pts, | |||
const PP_PropertyVector & | 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(), _insertNoteInEmbeddedStruxList(), getDocument(), pf_Frag::getIndexAP(), pf_Frag::getPrev(), pf_Fragments::insertFrag(), m_fragments, m_pDocument, m_varset, pt_VarSet::mergeAP(), PD_Document::miniDump(), PTC_AddFmt, PTX_EndAnnotation, PTX_EndEndnote, PTX_EndFootnote, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_UNUSED.
Referenced by PD_Document::insertStruxNoUpdateBefore().
bool pt_PieceTable::isDirty | ( | void | ) | const |
References px_ChangeHistory::isDirty(), and m_history.
Referenced by PD_Document::isDirty().
bool pt_PieceTable::isDoingTheDo | ( | void | ) | const [inline] |
Referenced by px_ChangeHistory::addChangeRecord(), and PD_Document::isDoingTheDo().
bool pt_PieceTable::isEndFootnote | ( | pf_Frag * | pf | ) | const |
References pf_Frag_Strux::getStruxType(), and pf_Frag::getType().
Referenced by _deleteComplexSpan(), _deleteFormatting(), _doTheDo(), _findNextHyperlink(), _findPrevHyperlink(), _getNextStruxAfterFragSkip(), _getStruxFromFragSkip(), _getStruxFromPosition(), _getStruxOfTypeFromPosition(), _insertFmtMarkFragWithNotify(), _insertStrux(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteSpan(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), _tellAndMaybeAddListener(), _unlinkStrux_Section(), getBlockBuf(), PD_Document::getNextStrux(), getSpanAttrProp(), insertStrux(), PD_Document::isEndFootnoteAtPos(), and PD_Document::repairDoc().
bool pt_PieceTable::isFootnote | ( | pf_Frag * | pf | ) | const |
References pf_Frag_Strux::getStruxType(), and pf_Frag::getType().
Referenced by _deleteComplexSpan(), _findNextHyperlink(), _findPrevHyperlink(), _getNextStruxAfterFragSkip(), _getStruxFromFragSkip(), _getStruxFromPosition(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realInsertStrux(), _struxIsEmpty(), _unlinkStrux_Section(), getBlockBuf(), PD_Document::getEmbeddedOffset(), PD_Document::getNextStrux(), and PD_Document::isFootnoteAtPos().
bool pt_PieceTable::isInsideFootnote | ( | PT_DocPosition | dpos, | |
pf_Frag ** | pfBegin = NULL | |||
) | const |
References m_embeddedStrux.
Referenced by _realChangeStruxFmt().
bool pt_PieceTable::purgeFmtMarks | ( | ) |
References _deleteFmtMark(), pf_Fragments::getFirst(), pf_Frag::getNext(), pf_Frag::getType(), m_fragments, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by PD_Document::purgeFmtMarks().
bool pt_PieceTable::redoCmd | ( | void | ) |
bool pt_PieceTable::removeStyle | ( | const gchar * | name | ) |
References gchar, getStyle(), PD_Style::isUserDefined(), m_hashStyles, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_return_val_if_fail.
Referenced by PD_Document::removeStyle().
void pt_PieceTable::s_getLocalisedStyleName | ( | const char * | szStyle, | |
std::string & | utf8 | |||
) | [static] |
References XAP_App::getApp(), XAP_App::getStringSet(), XAP_StringSet::getValueUTF8(), and ST_LOCALISED_STYLES::pStyle.
Referenced by AP_Win32Dialog_FormatTOC_Layout::_fillGUI(), AP_Win32Dialog_FormatTOC_General::_fillGUI(), AP_UnixDialog_FormatTOC::_fillGUI(), AP_Win32Dialog_Stylist::_fillTree(), AP_UnixDialog_Stylist::_fillTree(), AP_Win32Dialog_Styles::_onInitDialog(), AP_Win32Dialog_Styles::_populateCList(), AP_UnixDialog_Styles::_populateCList(), AP_UnixDialog_Styles::_populateModify(), EV_Win32Toolbar::_refreshItem(), AP_Win32Dialog_FormatTOC_Layout::loadCtrlsValuesForDetailsLevel(), EV_UnixToolbar::refreshToolbar(), EV_Win32Toolbar::repopulateStyles(), EV_UnixToolbar::repopulateStyles(), AP_Win32Dialog_FormatTOC::setMainLevel(), AP_UnixDialog_FormatTOC::setMainLevel(), AP_Win32Dialog_FormatTOC::setStyle(), AP_UnixDialog_Stylist::setStyleInGUI(), EV_UnixToolbar::synthesize(), and EV_QtToolbar::synthesize().
const char * pt_PieceTable::s_getUnlocalisedStyleName | ( | const char * | szLocStyle | ) | [static] |
void pt_PieceTable::setClean | ( | void | ) |
References m_history, and px_ChangeHistory::setClean().
Referenced by PD_Document::_setClean().
void pt_PieceTable::setCRNumber | ( | UT_sint32 | iCRNumber | ) | [inline] |
void pt_PieceTable::setDoNotTweakPosition | ( | bool | b | ) | [inline] |
Referenced by PD_Document::tellPTDoNotTweakPosition().
void pt_PieceTable::setPieceTableState | ( | PTState | pts | ) |
References _loadBuiltinStyles(), pf_Fragments::appendFrag(), m_fragments, m_pts, m_varset, pf_Frag::PFT_EndOfDoc, PTS_Create, PTS_Editing, PTS_Loading, pt_VarSet::setPieceTableState(), and UT_return_if_fail.
Referenced by PD_Document::_importFile(), PD_Document::createRawDocument(), PD_Document::finishRawCreation(), PD_Document::newDocument(), pt_PieceTable(), and TFTEST_MAIN().
void pt_PieceTable::setXIDThreshold | ( | UT_uint32 | i | ) | [inline] |
References PX_ChangeRecord::m_iXID.
Referenced by PD_Document::_importFile(), and PD_Document::setAttrProp().
bool pt_PieceTable::tellListener | ( | PL_Listener * | pListener | ) |
References _tellAndMaybeAddListener().
Referenced by PD_Document::tellListener().
bool pt_PieceTable::tellListenerSubset | ( | PL_Listener * | pListener, | |
PD_DocumentRange * | pDocRange, | |||
PL_ListenerCoupleCloser * | closer = 0 | |||
) |
Emit the start tag for things that are closed in the selected range but are not opened in that range.
Note that we walk backwards from the start of the range in order to find the matching open tags as quickly as possible even if the selection is at the end of a really large document.
A null delegate is used while we are walking backwards. If we allowed the closer to emit to the real delegate then the calls to populate() on the delegate would happen in reverse document order. So we walk backwards to find the real startPos that the closer needs and then refresh the closer by walking the range again (in case it uses stacks which were erased during the reverse walk), and then use the real delegate and walk forwards from the correct startPos that we just found. This is admittedly a bit tricky, but for a 1000 page document we really really don't want to walk all the way from the start, so walking the range twice is likely to be a small trade off in performance.
emit the close tag for things that were left open in the range.
References _tellListenerSubsetWalkRange(), pf_Frag_FmtMark::createSpecialChangeRecord(), pf_Frag_Object::createSpecialChangeRecord(), pf_Frag_Strux::createSpecialChangeRecord(), pf_Frag_Text::createSpecialChangeRecord(), DELETEP, finishedFunctorFinishingListener(), PL_ListenerCoupleCloser::getAfterContentListener(), PL_ListenerCoupleCloser::getBeforeContentListener(), getDocument(), getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getNext(), PL_ListenerCoupleCloser::getNullContentListener(), pf_Frag::getType(), PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, pf_Frag::PFT_EndOfDoc, pf_Frag::PFT_FmtMark, pf_Frag::PFT_Object, pf_Frag::PFT_Strux, pf_Frag::PFT_Text, PL_ListenerCoupleCloser::populate(), PL_Listener::populate(), PL_ListenerCoupleCloser::populateStrux(), PL_Listener::populateStrux(), PL_ListenerCoupleCloser::reset(), PL_ListenerCoupleCloser::setDelegate(), PL_ListenerCoupleCloser::setDocument(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by PD_Document::tellListenerSubset().
bool pt_PieceTable::undoCmd | ( | void | ) |
References _doTheDo(), PX_ChangeRecord::getAdjustment(), getDocument(), GETGLOBFLAGS, px_ChangeHistory::getUndo(), m_history, m_pDocument, PX_ChangeRecord::reverse(), PX_ChangeRecord::setAdjustment(), PX_ChangeRecord::setCRNumber(), PX_ChangeRecord::setDocument(), px_ChangeHistory::setScanningUndoGLOB(), PD_Document::updateFields(), and UT_return_val_if_fail.
Referenced by _realInsertSpan(), clearIfAtFmtMark(), and PD_Document::undoCmd().
UT_uint32 pt_PieceTable::undoCount | ( | bool | bUndo | ) | const |
References px_ChangeHistory::getSavePosition(), px_ChangeHistory::getUndoPos(), and m_history.
Referenced by PD_Document::undoCount().
friend class PX_ChangeRecord [friend] |
Referenced by _changePointWithNotify(), createAndSendCR(), and createAndSendDocPropCR().
struct { ... } pt_PieceTable::loading [protected] |
Referenced by _makeFmtMark(), appendFmt(), appendSpan(), insertSpanBeforeFrag(), and pt_PieceTable().
UT_uint32 pt_PieceTable::m_atomicGlobCount [protected] |
Referenced by beginUserAtomicGlob(), and endUserAtomicGlob().
bool pt_PieceTable::m_bDoingTheDo [protected] |
Referenced by _doTheDo().
bool pt_PieceTable::m_bDoNotTweakPosition [protected] |
Referenced by _tweakDeleteSpan(), _tweakDeleteSpanOnce(), and _tweakFieldSpan().
std::list<embeddedStrux> pt_PieceTable::m_embeddedStrux [protected] |
pf_Fragments pt_PieceTable::m_fragments [protected] |
Referenced by _deleteSpan(), _findNextHyperlink(), _fixHdrFtrReferences(), _fmtChangeSpan(), _getStruxFromPosition(), _insertFmtMark(), _insertObject(), _insertSpan(), _insertStrux(), _makeFmtMark(), _makeObject(), _realChangeSpanFmt(), _tellAndMaybeAddListener(), _unlinkFrag(), appendFmt(), appendFmtMark(), appendLastStruxFmt(), appendObject(), appendSpan(), appendStrux(), appendStruxFmt(), changeLastStruxFmtNoUndo(), fixMissingXIDs(), getBounds(), getFragFromPosition(), insertFmtMarkBeforeFrag(), insertObjectBeforeFrag(), insertSpanBeforeFrag(), insertStruxBeforeFrag(), insertStruxNoUpdateBefore(), purgeFmtMarks(), setPieceTableState(), and ~pt_PieceTable().
StyleMap pt_PieceTable::m_hashStyles [protected] |
Referenced by _createBuiltinStyle(), appendStyle(), enumStyles(), getStyle(), getStyleCount(), removeStyle(), and ~pt_PieceTable().
px_ChangeHistory pt_PieceTable::m_history [protected] |
Referenced by _canCoalesceDeleteSpan(), _canCoalesceInsertSpan(), _changePointWithNotify(), _deleteFmtMarkWithNotify(), _deleteObjectWithNotify(), _deleteSpanWithNotify(), _deleteStruxWithNotify(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _fmtChangeStruxWithNotify(), _insertFmtMarkAfterBlockWithNotify(), _insertFmtMarkFragWithNotify(), _lastUndoIsThisFmtMark(), _realChangeSpanFmt(), _realChangeStruxForLists(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), beginMultiStepGlob(), beginUserAtomicGlob(), canDo(), createAndSendCR(), endMultiStepGlob(), endUserAtomicGlob(), isDirty(), redoCmd(), setClean(), undoCmd(), and undoCount().
UT_sint32 pt_PieceTable::m_iCurCRNumber [protected] |
UT_uint32 pt_PieceTable::m_iXID [protected] |
Referenced by PX_ChangeRecord::getXID(), and getXID().
PD_Document* pt_PieceTable::m_pDocument [protected] |
Referenced by _changePointWithNotify(), _createObject(), _deleteComplexSpan(), _deleteFmtMarkWithNotify(), _deleteObjectWithNotify(), _deleteSpanWithNotify(), _deleteStruxWithNotify(), _doTheDo(), _fixHdrFtrReferences(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpanWithNotify(), _fmtChangeStruxWithNotify(), _insertFmtMarkAfterBlockWithNotify(), _insertFmtMarkFragWithNotify(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), _translateRevisionAttribute(), beginMultiStepGlob(), beginUserAtomicGlob(), changeSpanFmt(), changeStruxFmt(), changeStruxFmtNoUndo(), createAndSendCR(), createAndSendDocPropCR(), deleteHdrFtrStrux(), deleteSpan(), dumpDoc(), endMultiStepGlob(), endUserAtomicGlob(), getDocument(), insertObject(), insertSpan(), insertStrux(), insertStruxNoUpdateBefore(), and undoCmd().
PTState pt_PieceTable::m_pts [protected] |
Referenced by _createBuiltinStyle(), _deleteFmtMarkWithNotify(), _fmtChangeFmtMarkWithNotify(), _insertFmtMarkAfterBlockWithNotify(), _insertFmtMarkFragWithNotify(), _makeFmtMark(), _makeObject(), _makeStrux(), _realChangeSpanFmt(), _realChangeStruxFmt(), _realDeleteSpan(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), appendFmt(), appendLastStruxFmt(), appendSpan(), appendStruxFmt(), deleteFieldFrag(), insertSpanBeforeFrag(), and setPieceTableState().
pt_VarSet pt_PieceTable::m_varset [protected] |
Referenced by _canCoalesceDeleteSpan(), _canCoalesceInsertSpan(), _createBuiltinStyle(), _deleteSpan(), _deleteSpanWithNotify(), _fmtChangeFmtMarkWithNotify(), _fmtChangeObjectWithNotify(), _fmtChangeSpan(), _fmtChangeSpanWithNotify(), _fmtChangeStruxWithNotify(), _getSpanAttrPropHelper(), _insertFmtMark(), _insertFmtMarkFragWithNotify(), _insertObject(), _insertSpan(), _insertStrux(), _makeFmtMark(), _makeObject(), _makeStrux(), _realChangeSectionAttsNoUpdate(), _realChangeStruxFmt(), _realChangeStruxForLists(), _realInsertObject(), _realInsertSpan(), _realInsertStrux(), _unlinkFrag(), appendFmt(), appendLastStruxFmt(), appendSpan(), appendStruxFmt(), appendStyle(), changeLastStruxFmtNoUndo(), changeObjectFormatNoUpdate(), changeStruxFmtNoUndo(), changeStruxFormatNoUpdate(), createAndSendDocPropCR(), getAttrProp(), insertSpanBeforeFrag(), insertStruxNoUpdateBefore(), and setPieceTableState().