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

PD_Document Class Reference

#include <pd_Document.h>

Inheritance diagram for PD_Document:
AD_Document

List of all members.

Public Member Functions

 PD_Document ()
virtual AD_DOCUMENT_TYPE getType () const
virtual UT_Error readFromFile (const char *szFilename, int ieft, const char *impProps=NULL)
virtual UT_Error importFile (const char *szFilename, int ieft, bool markClean=false, bool bImportStylesFirst=true, const char *impProps=NULL)
UT_Error readFromFile (GsfInput *input, int ieft, const char *impProps=NULL)
UT_Error importFile (GsfInput *input, int ieft, bool markClean=false, bool bImportStylesFirst=true, const char *impProps=NULL)
virtual UT_Error importStyles (const char *szFilename, int ieft, bool bDocProps=false)
AP_StatusBargetStatusBar (void)
void updateStatus (void)
virtual UT_Error newDocument (void)
UT_Error saveAs (GsfOutput *output, int ieft, bool cpy=false, const char *expProps=NULL)
UT_Error createRawDocument (void)
void finishRawCreation (void)
virtual bool isDirty (void) const
virtual void forceDirty ()
bool isConnected (void)
virtual bool canDo (bool bUndo) const
virtual UT_uint32 undoCount (bool bUndo) const
virtual bool undoCmd (UT_uint32 repeatCount)
virtual bool redoCmd (UT_uint32 repeatCount)
bool isDoingTheDo (void) const
void removeCaret (const std::string &sCaretID)
void addPageReferencedImage (UT_UTF8String &sImageId, UT_sint32 iPage, double xInch, double yInch, const char *pzProps)
void addPageReferencedTextbox (UT_ByteBuf &sContent, UT_sint32 iPage, double xInch, double yInch, const char *pzProps)
ImagePagegetNthImagePage (UT_sint32 iImagePage)
TextboxPagegetNthTextboxPage (UT_sint32 iTextboxPage)
void clearAllPendingObjects (void)
void setShowAuthors (bool bAuthors)
bool isShowAuthors (void) const
bool isExportAuthorAtts (void) const
void setExportAuthorAtts (bool bExport)
UT_GenericVector< pp_Author * > & getAuthors ()
UT_sint32 getMyAuthorInt (void) const
void setMyAuthorInt (UT_sint32 iAuthor)
UT_sint32 getLastAuthorInt (void) const
UT_sint32 getNumAuthors (void) const
pp_AuthorgetNthAuthor (UT_sint32 i) const
pp_AuthorgetAuthorByInt (UT_sint32 i) const
pp_AuthoraddAuthor (UT_sint32 iAuthor)
bool sendAddAuthorCR (pp_Author *pAuthor)
bool sendChangeAuthorCR (pp_Author *pAuthor)
UT_sint32 findFirstFreeAuthorInt (void) const
void beginUserAtomicGlob (void)
void endUserAtomicGlob (void)
void setMarginChangeOnly (bool b)
bool isMarginChangeOnly (void) const
bool changeObjectFormatNoUpdate (PTChangeFmt ptc, pf_Frag_Object *odh, const PP_PropertyVector &attributes, const PP_PropertyVector &properties)
PT_AttrPropIndex getAPIFromSOH (pf_Frag_Object *odh)
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const PP_PropertyVector &attributes, const PP_PropertyVector &properties)
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const PP_PropertyVector &attributes, const PP_PropertyVector &properties, fd_Field **pField)
bool insertSpan (PT_DocPosition dpos, const UT_UCSChar *p, UT_uint32 length, PP_AttrProp *p_AttrProp=NULL, UT_uint32 *insertedSpanLength=NULL)
bool insertSpan (PT_DocPosition dpos, const std::string &s, PP_AttrProp *p_AttrProp=NULL)
bool deleteSpan (PT_DocPosition dpos1, PT_DocPosition dpos2, PP_AttrProp *p_AttrProp_Before, UT_uint32 &iRealDeleteCount, bool bDeleteTableStruxes=false)
bool deleteFmtMark (PT_DocPosition dpos)
bool changeSpanFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const PP_PropertyVector &attributes, const PP_PropertyVector &properties)
bool insertStrux (PT_DocPosition dpos, PTStruxType pts, pf_Frag_Strux **ppfs_ret=0)
bool deleteStrux (PT_DocPosition dpos, PTStruxType pts, bool bRecordChange)
bool createAndSendCR (PT_DocPosition dpos, UT_sint32 iType, bool bsave, UT_Byte iGlob)
virtual bool createAndSendDocPropCR (const gchar **pAtts, const gchar **pProps)
bool createAndSendDocPropCR (const PP_PropertyVector &pAtts, const PP_PropertyVector &pProps)
bool changeDocPropeties (const PP_PropertyVector &szAtts, const PP_PropertyVector &pProps)
bool insertStrux (PT_DocPosition dpos, PTStruxType pts, const PP_PropertyVector &attributes, const PP_PropertyVector &properties, pf_Frag_Strux **ppfs_ret=NULL)
void deleteHdrFtrStrux (pf_Frag_Strux *sdh)
bool changeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const PP_PropertyVector &attributes, const PP_PropertyVector &properties, PTStruxType pts)
bool changeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const PP_PropertyVector &attributes, const PP_PropertyVector &properties)
bool changeStruxFmtNoUndo (PTChangeFmt ptc, pf_Frag_Strux *sdh, const PP_PropertyVector &attributes, const PP_PropertyVector &properties)
bool changeStruxForLists (pf_Frag_Strux *sdh, const char *pszParentID)
bool insertFmtMark (PTChangeFmt ptc, PT_DocPosition dpos, PP_AttrProp *p_AttrProp)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const PP_PropertyVector &attrs, const PP_PropertyVector &props, bool bSkipEmbededSections)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const PP_PropertyVector &attrs, const std::string &props, bool bSkipEmbededSections)
bool appendStrux (PTStruxType pts, const PP_PropertyVector &attributes, pf_Frag_Strux **ppfs_ret=0)
bool appendStruxFmt (pf_Frag_Strux *pfs, const PP_PropertyVector &attributes)
bool appendLastStruxFmt (PTStruxType pts, const PP_PropertyVector &attrs, const PP_PropertyVector &props, bool bSkipEmbededSections)
bool appendLastStruxFmt (PTStruxType pts, const PP_PropertyVector &attrs, const std::string &props, bool bSkipEmbededSections)
bool appendFmt (const PP_PropertyVector &vecAttributes)
bool appendSpan (const UT_UCSChar *p, UT_uint32 length)
bool appendObject (PTObjectType pto, const PP_PropertyVector &attributes)
bool appendFmtMark (void)
bool appendStyle (const PP_PropertyVector &attributes)
bool changeStruxFormatNoUpdate (PTChangeFmt ptc, pf_Frag_Strux *sdh, const PP_PropertyVector &attributes)
bool insertStruxBeforeFrag (pf_Frag *pF, PTStruxType pts, const PP_PropertyVector &attributes, pf_Frag_Strux **ppfs_ret=0)
bool insertSpanBeforeFrag (pf_Frag *pF, const UT_UCSChar *p, UT_uint32 length)
bool insertObjectBeforeFrag (pf_Frag *pF, PTObjectType pto, const PP_PropertyVector &attributes)
bool insertFmtMarkBeforeFrag (pf_Frag *pF)
bool insertFmtMarkBeforeFrag (pf_Frag *pF, const PP_PropertyVector &attributes)
pf_FragfindFragOfType (pf_Frag::PFType iType, UT_sint32 iSubtype=-1, pf_Frag *pfStart=NULL) const
pf_FraggetLastFrag () const
bool checkForSuspect (void)
bool repairDoc (void)
bool removeStyle (const gchar *name)
bool tellListener (PL_Listener *pListener)
bool tellListenerSubset (PL_Listener *pListener, PD_DocumentRange *pDocRange, PL_ListenerCoupleCloser *closer=0)
bool addListener (PL_Listener *pListener, PL_ListenerId *pListenerId)
bool removeListener (PL_ListenerId listenerId)
bool signalListeners (UT_uint32 iSignal) const
bool notifyListeners (const pf_Frag_Strux *pfs, const PX_ChangeRecord *pcr) const
bool notifyListeners (const pf_Frag_Strux *pfs, pf_Frag_Strux *pfsNew, const PX_ChangeRecord *pcr) const
void deferNotifications (void)
void processDeferredNotifications (void)
UT_sint32 getAdjustmentForCR (const PX_ChangeRecord *pcr) const
bool getAttrProp (PT_AttrPropIndex indexAP, const PP_AttrProp **ppAP) const
bool getSpanAttrProp (pf_Frag_Strux *sdh, UT_uint32 offset, bool bLeftSide, const PP_AttrProp **ppAP) const
bool getAttrProp (PT_AttrPropIndex apIndx, const PP_AttrProp **ppAP, std::unique_ptr< PP_RevisionAttr > &pRevisions, bool bShowRevisions, UT_uint32 iRevisionId, bool &bHiddenRevision) const
bool getSpanAttrProp (pf_Frag_Strux *sdh, UT_uint32 offset, bool bLeftSide, const PP_AttrProp **ppAP, std::unique_ptr< PP_RevisionAttr > &pRevisions, bool bShowRevisions, UT_uint32 iRevisionId, bool &bHiddenRevision) const
const UT_UCSChargetPointer (PT_BufIndex bi) const
bool getBlockBuf (pf_Frag_Strux *sdh, UT_GrowBuf *pgb) const
bool getBounds (bool bEnd, PT_DocPosition &docPos) const
PTStruxType getStruxType (pf_Frag_Strux *sdh) const
PT_DocPosition getStruxPosition (pf_Frag_Strux *sdh) const
bool getStruxFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, fl_ContainerLayout **psfh) const
bool getStruxOfTypeFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, PTStruxType pts, fl_ContainerLayout **psfh) const
bool getStruxOfTypeFromPosition (PT_DocPosition, 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.
pf_Frag_StruxgetBlockFromPosition (PT_DocPosition pos) const
pf_FraggetFragFromPosition (PT_DocPosition docPos) const
bool getNextStruxOfType (pf_Frag_Strux *sdh, PTStruxType pts, pf_Frag_Strux **nextsdh)
 Return the sdh of type pts immediately after sdh.
bool getPrevStruxOfType (pf_Frag_Strux *sdh, PTStruxType pts, pf_Frag_Strux **prevsdh)
 Return the sdh of type pts immediately prior to sdh.
bool getNextStrux (pf_Frag_Strux *sdh, pf_Frag_Strux **nextSDH)
 get the next strux after the strux given.
virtual bool createDataItem (const char *szName, bool bBase64, const UT_ConstByteBufPtr &pByteBuf, const std::string &mime_type, PD_DataItemHandle *ppHandle)
virtual bool replaceDataItem (const char *szName, const UT_ConstByteBufPtr &pByteBuf)
virtual bool getDataItemDataByName (const char *szName, UT_ConstByteBufPtr &pByteBuf, std::string *pMimeType, PD_DataItemHandle *ppHandle) const
bool setDataItemToken (PD_DataItemHandle pHandle, void *pToken) const
bool getDataItemData (PD_DataItemHandle pHandle, const char **pszName, UT_ConstByteBufPtr &pByteBuf, const void **ppToken) const
bool getDataItemFileExtension (const char *szDataID, std::string &sExt, bool bDot=true) const
bool enumDataItems (UT_uint32 k, PD_DataItemHandle *ppHandle, const char **pszName, UT_ConstByteBufPtr &pByteBuf, std::string *pMimeType) const
pf_Frag_StruxfindHdrFtrStrux (const gchar *pszHdtFtr, const gchar *pszHdrFtrID)
bool verifySectionID (const gchar *pszId)
const pf_Frag_StruxgetLastSectionSDH (void) const
pf_Frag_StruxgetLastSectionMutableSDH (void)
pf_Frag_StruxgetLastStruxOfType (PTStruxType pts)
bool changeStruxAttsNoUpdate (pf_Frag_Strux *sdh, const char *attr, const char *attvalue)
bool deleteStruxNoUpdate (pf_Frag_Strux *sdh)
bool deleteFragNoUpdate (pf_Frag *pf)
bool insertStruxNoUpdateBefore (pf_Frag_Strux *sdh, PTStruxType pts, const PP_PropertyVector &attributes)
bool isStruxBeforeThis (pf_Frag_Strux *sdh, PTStruxType pts)
PT_AttrPropIndex getAPIFromSDH (pf_Frag_Strux *sdh)
bool getAttributeFromSDH (pf_Frag_Strux *sdh, bool bShowRevisions, UT_uint32 iRevisionLevel, const char *szAttribute, const char **pszValue)
bool getPropertyFromSDH (const pf_Frag_Strux *sdh, bool bShowRevisions, UT_uint32 iRevisionLevel, const char *szProperty, const char **pszValue) const
void getAllUsedStyles (UT_GenericVector< PD_Style * > *pVecStyles)
fl_ContainerLayoutgetNthFmtHandle (pf_Frag_Strux *sdh, UT_uint32 n)
const char * getDefaultStyle () const
bool getStyle (const char *szName, PD_Style **ppStyle) const
PD_StylegetStyleFromSDH (pf_Frag_Strux *sdh)
pf_Frag_StruxgetPrevNumberedHeadingStyle (pf_Frag_Strux *sdh)
size_t getStyleCount (void)
bool enumStyles (UT_uint32 k, const char **pszName, const PD_Style **ppStyle) const
bool enumStyles (UT_GenericVector< PD_Style * > *&pStyles) const
bool getStyleProperty (const gchar *szStyleName, const gchar *szPropertyName, const gchar *&szPropertyValue)
bool addStyleProperty (const gchar *szStyleName, const gchar *szPropertyName, const gchar *szPropertyValue)
bool addStyleProperties (const gchar *szStyleName, const PP_PropertyVector &pProperties)
bool setAllStyleAttributes (const gchar *szStyleName, const PP_PropertyVector &pAttribs)
bool addStyleAttributes (const gchar *szStyleName, const PP_PropertyVector &pAttribs)
pf_Frag_StruxfindPreviousStyleStrux (const gchar *szStyle, PT_DocPosition pos)
pf_Frag_StruxfindForwardStyleStrux (const gchar *szStyle, PT_DocPosition pos)
bool updateDocForStyleChange (const gchar *szStyleName, bool isParaStyle)
void updateAllLayoutsInDoc (pf_Frag_Strux *sdh)
void clearIfAtFmtMark (PT_DocPosition dpos)
virtual UT_uint32 getLastSavedAsType () const
UT_uint32 getLastOpenedType () const
bool updateFields (void)
bool getField (pf_Frag_Strux *sdh, UT_uint32 offset, fd_Field *&pField)
po_BookmarkgetBookmark (pf_Frag_Strux *sdh, UT_uint32 offset)
pf_FragfindBookmark (const char *pName, bool bEnd=false, pf_Frag *pfStart=NULL)
bool hasMath (void)
void setDontChangeInsPoint (void)
void allowChangeInsPoint (void)
bool getAllowChangeInsPoint (void) const
bool isFootnoteAtPos (PT_DocPosition pos)
bool isEndFootnoteAtPos (PT_DocPosition pos)
UT_sint32 getEmbeddedOffset (pf_Frag_Strux *sdh, PT_DocPosition posOff, pf_Frag_Strux *&sdhEmbedded)
bool hasEmbedStruxOfTypeInRange (PT_DocPosition posStart, PT_DocPosition posEnd, PTStruxType iType) const
bool isTOCAtPos (PT_DocPosition pos)
bool isFrameAtPos (PT_DocPosition pos)
bool isEndFrameAtPos (PT_DocPosition pos)
bool isHdrFtrAtPos (PT_DocPosition pos)
bool isSectionAtPos (PT_DocPosition pos)
bool isBlockAtPos (PT_DocPosition pos)
bool isTableAtPos (PT_DocPosition pos)
bool isEndTableAtPos (PT_DocPosition pos)
bool isCellAtPos (PT_DocPosition pos)
pf_Frag_StruxgetEndTableStruxFromTableSDH (pf_Frag_Strux *tableSDH)
pf_Frag_StruxgetEndCellStruxFromCellSDH (pf_Frag_Strux *cellSDH)
pf_Frag_StruxgetEndTableStruxFromTablePos (PT_DocPosition posTable)
bool getRowsColsFromTableSDH (pf_Frag_Strux *tableSDH, bool bShowRevisions, UT_uint32 iRevisionLevel, UT_sint32 *numRows, UT_sint32 *numCols)
pf_Frag_StruxgetCellSDHFromRowCol (pf_Frag_Strux *tableSDH, bool bShowRevisions, UT_uint32 iRevisionLevel, UT_sint32 row, UT_sint32 col)
void miniDump (pf_Frag_Strux *sdh, UT_sint32 nstruxes)
bool dumpDoc (const char *msg, PT_DocPosition currentpos, PT_DocPosition endpos)
bool isInsertHyperLinkValid (PT_DocPosition pos) const
fl_AutoNumPtr getListByID (UT_uint32 id) const
fl_AutoNumPtr getNthList (UT_uint32 i) const
bool enumLists (UT_uint32 k, fl_AutoNumConstPtr &pAutoNum)
UT_uint32 getListsCount (void) const
void addList (const fl_AutoNumPtr &pAutoNum)
bool appendList (const PP_PropertyVector &attributes)
bool fixListHierarchy (void)
void removeList (const fl_AutoNumPtr &pAutoNum, pf_Frag_Strux *sdh)
void listUpdate (pf_Frag_Strux *sdh)
void StopList (pf_Frag_Strux *sdh)
void disableListUpdates (void)
void enableListUpdates (void)
void updateDirtyLists (void)
bool areListUpdatesAllowed (void)
void setHasListStopped (bool bStop)
bool hasListStopped (void) const
void setDoingPaste (void)
void clearDoingPaste (void)
bool isDoingPaste (void)
void setRedrawHappenning (bool bIsHappening)
bool isRedrawHappenning (void) const
bool convertPercentToInches (const char *szPercent, UT_UTF8String &sInches)
bool setPageSizeFromFile (const PP_PropertyVector &attributes)
const fp_PageSizegetPageSize (void) const
bool isBookmarkUnique (const gchar *pName) const
bool isBookmarkRelativeLink (const gchar *pName) const
UT_sint32 getBookmarkCount () const
const std::string & getNthBookmark (UT_sint32 n) const
void addBookmark (const gchar *pName)
void removeBookmark (const gchar *pName)
virtual void setMarkRevisions (bool bMark)
void setMarkRevisionsNoNotify (bool bMark)
virtual bool acceptRejectRevision (bool bReject, UT_uint32 iStart, UT_uint32 iEnd, UT_uint32 iLevel)
virtual bool rejectAllHigherRevisions (UT_uint32 iLevel)
virtual bool acceptAllRevisions ()
const PP_AttrPropexplodeRevisions (std::unique_ptr< PP_RevisionAttr > &pRevisions, const PP_AttrProp *pAP, bool bShow, UT_uint32 iId, bool &bHiddenRevision) const
virtual void purgeRevisionTable (bool bUnconditional=false)
void notifyPieceTableChangeStart (void)
void notifyPieceTableChangeEnd (void)
pt_PieceTablegetPieceTable (void) const
PD_DocumentRDFHandle getDocumentRDF (void) const
PD_XMLIDCreatorHandle makeXMLIDCreator ()
bool areStylesLocked () const
void lockStyles (bool b)
virtual void setMetaDataProp (const std::string &key, const std::string &value)
virtual bool getMetaDataProp (const std::string &key, std::string &outProp) const
virtual void setAnnotationProp (const std::string &key, const std::string &value)
virtual bool getAnnotationProp (const std::string &key, std::string &outProp) const
const std::map< std::string,
std::string > & 
getMetaData () const
const PP_AttrPropgetAttrProp () const
PT_AttrPropIndex getAttrPropIndex () const
bool setAttrProp (const PP_PropertyVector &ppAttr)
bool setAttributes (const PP_PropertyVector &ppAttr)
bool setProperties (const PP_PropertyVector &ppProps)
void setDontImmediatelyLayout (bool b)
bool isDontImmediateLayout (void) const
std::string getMailMergeField (const std::string &key) const
bool mailMergeFieldExists (const std::string &key) const
void setMailMergeField (const std::string &key, const std::string &value)
void clearMailMergeMap ()
void setMailMergeLink (const char *file)
const std::string & getMailMergeLink () const
const std::map< std::string,
std::string > & 
getMailMergeMap () const
void invalidateCache (void)
UT_uint32 getUID (UT_UniqueId::idType t)
bool setMinUID (UT_UniqueId::idType t, UT_uint32 i)
bool isIdUnique (UT_UniqueId::idType t, UT_uint32 i) const
virtual bool areDocumentContentsEqual (const AD_Document &d, UT_uint32 &pos) const
virtual bool areDocumentFormatsEqual (const AD_Document &d, UT_uint32 &pos) const
virtual bool areDocumentStylesheetsEqual (const AD_Document &d) const
bool findFirstDifferenceInContent (PT_DocPosition &pos, UT_sint32 &iOffset2, const PD_Document &d) const
bool findWhereSimilarityResumes (PT_DocPosition &pos, UT_sint32 &iOffset2, UT_uint32 &iKnownLength, const PD_Document &d) const
virtual void setAutoRevisioning (bool autorev)
virtual UT_uint32 getXID () const
virtual UT_uint32 getTopXID () const
void fixMissingXIDs ()
UT_uint32 getFragXIDforVersion (const pf_Frag *pf, UT_uint32 iVersion) const
void removeConnections (void)
void changeConnectedDocument (PD_Document *pDoc)
UT_sint32 getNewHdrHeight (void) const
UT_sint32 getNewFtrHeight (void) const
void setNewHdrHeight (UT_sint32 newHeight)
void setNewFtrHeight (UT_sint32 newHeight)
bool purgeFmtMarks ()
void tellPTDoNotTweakPosition (bool b)
void setVDNDinProgress (bool b)
bool isVDNDinProgress () const
UT_sint32 getCRNumber () const
void setCRNumber (UT_sint32 iCRCounter)
UT_sint32 getNextCRNumber (void)
std::list< AV_View * > getAllViews () const
void getAllViews (UT_GenericVector< AV_View * > *vecViews) const
void ignoreSignals (void)
void dontIgnoreSignals (void)
void setClean (void)
void setCoalescingMask (bool mask)
bool isCoalescingMasked () const
bool exportGetVisDirectionAtPos (PT_DocPosition pos, UT_BidiCharType &type)
const std::string & getUserName () const

Public Attributes

fp_PageSize m_docPageSize
IE_FileInfo m_fileImpExpInfo

Protected Member Functions

virtual ~PD_Document ()
virtual UT_Error _saveAs (const char *szFilename, int ieft, const char *expProps=NULL)
virtual UT_Error _saveAs (const char *szFilename, int ieft, bool cpy, const char *expProps=NULL)
virtual UT_Error _saveAs (GsfOutput *output, int ieft, bool cpy, const char *expProps)
virtual UT_Error _save (void)
void _setClean (void)
void _destroyDataItemData (void)
bool _syncFileTypes (bool bReadSaveWriteOpen)
bool _acceptRejectRevision (bool bReject, UT_uint32 iStart, UT_uint32 iEnd, const PP_Revision *pRev, PP_RevisionAttr &RevAttr, pf_Frag *pf, bool &bDeleted)
virtual void _clearUndo ()
UT_Error _importFile (const char *szFilename, int ieft, bool markClean, bool bImportStylesFirst, bool isImportFile, const char *impProps)
UT_Error _importFile (GsfInput *input, int ieft, bool markClean, bool bImportStylesFirst, bool bIsImportFile, const char *impProps)
bool _removeRepeatedHdrFtr (pf_Frag_Strux *pfs, UT_GenericVector< pf_Frag_Strux * > *vecHdrFtrs, UT_sint32 i)
bool _pruneSectionAPI (pf_Frag_Strux *pfs, const char *szHType, UT_GenericVector< pf_Frag_Strux * > *vecHdrFtrs)
bool _matchSection (pf_Frag_Strux *pfs, UT_GenericVector< pf_Frag_Strux * > *vecSections)
bool _removeHdrFtr (pf_Frag_Strux *pfs)
bool _checkAndFixTable (pf_Frag_Strux *pfs)

Private Types

typedef std::map< std::string,
PD_DataItemHandle
hash_data_items_t

Private Member Functions

bool addAuthorAttributeIfBlank (PP_PropertyVector &atts)
bool addAuthorAttributeIfBlank (PP_AttrProp *&p_AttrProp)
bool _buildAuthorProps (pp_Author *pAuthor, PP_PropertyVector &props)
bool _exportInitVisDirection (PT_DocPosition pos)
bool _exportFindVisDirectionRunAtPos (PT_DocPosition pos)
bool _sendAuthorCR (const char *attrName, pp_Author *pAuthor)
 private method share by send*AuthorCR()

Private Attributes

bool m_ballowListUpdates
pt_PieceTablem_pPieceTable
PD_DocumentRDFHandle m_hDocumentRDF
UT_GenericVector< PL_Listener * > m_vecListeners
std::vector< fl_AutoNumPtrm_vecLists
std::unordered_map< UT_uint32,
fl_AutoNumPtr
m_mapLists
bool m_bHasListStopped
hash_data_items_t m_hashDataItems
IEFileType m_lastOpenedType
IEFileType m_lastSavedAsType
bool m_bDoingPaste
bool m_bAllowInsertPointChange
bool m_bRedrawHappenning
bool m_bLoading
std::vector< std::string > m_vBookmarkNames
bool m_bLockedStyles
std::map< std::string,
std::string > 
m_metaDataMap
PT_AttrPropIndex m_indexAP
bool m_bDontImmediatelyLayout
std::map< std::string,
std::string > 
m_mailMergeMap
UT_UCS4Char m_iLastDirMarker
std::string m_mailMergeLink
const fl_BlockLayoutm_pVDBl
fp_Runm_pVDRun
PT_DocPosition m_iVDLastPos
UT_UniqueId m_UID
UT_sint32 m_iNewHdrHeight
UT_sint32 m_iNewFtrHeight
bool m_bMarginChangeOnly
UT_GenericVector< pf_Frag * > m_vecSuspectFrags
bool m_bVDND
UT_sint32 m_iCRCounter
UT_sint32 m_iUpdateCount
bool m_bIgnoreSignals
bool m_bCoalescingMask
bool m_bShowAuthors
UT_GenericVector< pp_Author * > m_vecAuthors
bool m_bExportAuthorAtts
UT_sint32 m_iMyAuthorInt
UT_sint32 m_iLastAuthorInt
UT_GenericVector< ImagePage * > m_pPendingImagePage
UT_GenericVector< TextboxPage * > m_pPendingTextboxPage
UT_sint32 m_iStruxCount
std::string m_sUserName

Detailed Description

PD_Document is the representation for a document.


Member Typedef Documentation

typedef std::map<std::string, PD_DataItemHandle> PD_Document::hash_data_items_t [private]

Constructor & Destructor Documentation

PD_Document::~PD_Document (  )  [protected, virtual]

Member Function Documentation

bool PD_Document::_checkAndFixTable ( pf_Frag_Strux pfs  )  [protected]

This method looks to see if we have a table strux without a matching cell or an endtable without a matching endcell preceding it If we do it deletes the table/endtable.

References pt_PieceTable::deleteFragNoUpdate(), pf_Frag::getNext(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), and m_pPieceTable.

Referenced by repairDoc().

void PD_Document::_clearUndo (  )  [protected, virtual]
void PD_Document::_destroyDataItemData ( void   )  [protected]
UT_Error PD_Document::_importFile ( const char *  szFilename,
int  ieft,
bool  markClean,
bool  bImportStylesFirst,
bool  isImportFile,
const char *  impProps 
) [protected]

References UT_DEBUGMSG, and UT_go_file_open().

Referenced by importFile(), and readFromFile().

bool PD_Document::_matchSection ( pf_Frag_Strux pfs,
UT_GenericVector< pf_Frag_Strux * > *  vecSections 
) [protected]

pfs point to a header footer section. This Method returns true if there is a section that has a reference to it's HdrFtr type and id

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

Referenced by repairDoc().

bool PD_Document::_pruneSectionAPI ( pf_Frag_Strux pfs,
const char *  szHType,
UT_GenericVector< pf_Frag_Strux * > *  vecHdrFtrs 
) [protected]

This scans the HdrFtrs to see if there is a match for the header/footer type in the section strux pfs. Return true of a prune happened

References pt_PieceTable::changeStruxFormatNoUpdate(), getAttributeFromSDH(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_pPieceTable, PTC_RemoveFmt, and UT_DEBUGMSG.

Referenced by repairDoc().

bool PD_Document::_removeHdrFtr ( pf_Frag_Strux pfs  )  [protected]

Remove the HdrFtr starting at pfs. No changeRecords are cre created. Only used for document repair during import.

References pt_PieceTable::deleteFragNoUpdate(), pf_Frag::getNext(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_pPieceTable, and UT_DEBUGMSG.

Referenced by _removeRepeatedHdrFtr(), and repairDoc().

bool PD_Document::_removeRepeatedHdrFtr ( pf_Frag_Strux pfs,
UT_GenericVector< pf_Frag_Strux * > *  vecHdrFtrs,
UT_sint32  iStart 
) [protected]

Look for a Hdr/Ftr with exactly the same identification as that of the input strux. If we find a match delete the HdrFtr

References _removeHdrFtr(), UT_GenericVector< T >::deleteNthItem(), getAttributeFromSDH(), UT_GenericVector< T >::getItemCount(), and UT_GenericVector< T >::getNthItem().

Referenced by repairDoc().

UT_Error PD_Document::_saveAs ( const char *  szFilename,
int  ieft,
const char *  expProps = NULL 
) [protected, virtual]

Implements AD_Document.

Referenced by saveAs().

bool PD_Document::_sendAuthorCR ( const char *  attrName,
pp_Author pAuthor 
) [private]

private method share by send*AuthorCR()

Parameters:
attrName the value of the PT_DOCPROP_ATTRIBUTE_NAME attribute

References _buildAuthorProps(), createAndSendDocPropCR(), and UT_return_val_if_fail.

Referenced by sendAddAuthorCR(), and sendChangeAuthorCR().

void PD_Document::_setClean ( void   )  [protected]
bool PD_Document::_syncFileTypes ( bool  bReadSaveWriteOpen  )  [protected]

Synchronize the last opened/last saves filetypes.

Parameters:
bReadLastSavedAsType True to write last opened and read last saved type; otherwise, write last saved type from last opened type.

There are actually two filetypes - one for importers and one for exporters. This function tries to synchronize the one to the other.

References IE_Exp::fileTypeForSuffixes(), IE_Imp::fileTypeForSuffixes(), IEFT_Bogus, IEFT_Unknown, m_lastOpenedType, m_lastSavedAsType, IE_Imp::suffixesForFileType(), and IE_Exp::suffixesForFileType().

Referenced by _importFile(), _save(), and _saveAs().

bool PD_Document::acceptRejectRevision ( bool  bReject,
UT_uint32  iPos1,
UT_uint32  iPos2,
UT_uint32  iLevel 
) [virtual]

accepts or reject top visible revision between document positions iStart and iEnd.

Parameters:
bReject true if revisions are to be rejected
iPos1 document position to start at
iPos2 document position to finish at
iLevel the highest revision level to accept
Returns:
true on success

NB: For each fragment this function removes the highest revision <= iLevel. For example, if iLevel is 3 and fragment contains revisions 1,2, 4, revision 2 will be removed.

Implements AD_Document.

References _acceptRejectRevision(), beginUserAtomicGlob(), endUserAtomicGlob(), gchar, PP_AttrProp::getAttribute(), pt_PieceTable::getAttrProp(), PD_DocIterator::getFrag(), PP_RevisionAttr::getGreatestLesserOrEqualRevision(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag::getPos(), PD_DocIterator::getPosition(), PD_DocIterator::getStatus(), m_pPieceTable, notifyPieceTableChangeEnd(), notifyPieceTableChangeStart(), PD_SIGNAL_UPDATE_LAYOUT, PD_DocIterator::reset(), signalListeners(), UT_ASSERT_HARMLESS, UT_MAX, UT_MIN, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, and UTIter_OK.

Referenced by FV_View::cmdAcceptRejectRevision().

bool PD_Document::addAuthorAttributeIfBlank ( PP_PropertyVector atts  )  [private]

Add the current documents UUID as the author to the attribute list if the author attribute is not present. Returns true if author attribute is already present. false if we add it.

References addAuthor(), findFirstFreeAuthorInt(), getMyAuthorInt(), m_iLastAuthorInt, PP_getAttribute(), PT_AUTHOR_NAME, sendAddAuthorCR(), setMyAuthorInt(), and UT_std_string_sprintf().

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

bool PD_Document::addAuthorAttributeIfBlank ( PP_AttrProp *&  p_AttrProp  )  [private]

Add the current documents UUID as the author to the ppAttrProps if the attribute is not set. returns true if author is set

References addAuthor(), findFirstFreeAuthorInt(), gchar, PP_AttrProp::getAttribute(), getMyAuthorInt(), m_iLastAuthorInt, PT_AUTHOR_NAME, sendAddAuthorCR(), PP_AttrProp::setAttribute(), setMyAuthorInt(), UT_std_string_sprintf(), and xxx_UT_DEBUGMSG.

void PD_Document::addBookmark ( const gchar *  pName  ) 
void PD_Document::addPageReferencedImage ( UT_UTF8String sImageId,
UT_sint32  iPage,
double  xInch,
double  yInch,
const char *  pzProps 
)
void PD_Document::addPageReferencedTextbox ( UT_ByteBuf sContent,
UT_sint32  iPage,
double  xInch,
double  yInch,
const char *  pzProps 
)
bool PD_Document::addStyleAttributes ( const gchar *  szStyleName,
const PP_PropertyVector pAttribs 
)

This methods changes the attributes of a style (basedon,followedby)

Parameters:
szStyleName the const gchar * name of the style
pAttribs The list of attributes of the updated style.

References PD_Style::getBasedOn(), PD_Style::getFollowedBy(), pt_PieceTable::getStyle(), m_pPieceTable, and updateDocForStyleChange().

Referenced by AP_Dialog_Styles::_populateAbiPreview(), and AP_Dialog_Styles::updateCurrentStyle().

bool PD_Document::addStyleProperties ( const gchar *  szStyleName,
const PP_PropertyVector pProperties 
)
bool PD_Document::addStyleProperty ( const gchar *  szStyleName,
const gchar *  szPropertyName,
const gchar *  szPropertyValue 
)
bool PD_Document::appendLastStruxFmt ( PTStruxType  pts,
const PP_PropertyVector attrs,
const std::string &  props,
bool  bSkipEmbededSections 
)
bool PD_Document::appendLastStruxFmt ( PTStruxType  pts,
const PP_PropertyVector attributes,
const PP_PropertyVector props,
bool  bSkipEmbededSections 
)

appends given fmt to the last strux in document

References pt_PieceTable::appendLastStruxFmt(), m_pPieceTable, updateStatus(), and UT_return_val_if_fail.

bool PD_Document::appendStrux ( PTStruxType  pts,
const PP_PropertyVector attributes,
pf_Frag_Strux **  ppfs_ret = 0 
)

References pt_PieceTable::appendStrux(), checkForSuspect(), m_pPieceTable, PTX_EndCell, PTX_Section, updateStatus(), and UT_return_val_if_fail.

Referenced by IE_Imp_RTF::_appendField(), IE_Imp_RTF::_appendHdrFtr(), IE_Imp_MsWord_97::_appendObjectHdrFtr(), IE_Imp_MsWord_97::_appendSpanHdrFtr(), IE_Imp_MsWord_97::_appendStrux(), IE_Imp_MsWord_97::_appendStruxHdrFtr(), OpenWriter_ContentStream_Listener::_closeCell(), OpenWriter_ContentStream_Listener::_closeTable(), ODi_Frame_ListenerState::_drawTextBox(), ODi_TextContent_ListenerState::_flushPendingParagraphBreak(), ODi_TextContent_ListenerState::_insertAnnotation(), IE_Imp_MsWord_97::_insertBookmark(), IE_Imp_MsWord_97::_insertHeaderSection(), ODi_TextContent_ListenerState::_insureInBlock(), OpenWriter_ContentStream_Listener::_insureInBlock(), OpenWriter_ContentStream_Listener::_insureInSection(), ODi_TextContent_ListenerState::_openAbiSection(), OpenWriter_ContentStream_Listener::_openCell(), OpenWriter_ContentStream_Listener::_openTable(), ODi_Table_ListenerState::_parseCellStart(), IE_Imp_RTF::_parseFldinstBlock(), ODi_Table_ListenerState::_parseTableStart(), ODi_TextContent_ListenerState::_startParagraphElement(), IE_Imp_RTF::addFrame(), OXML_Section::addToPT(), OXML_Element_TextBox::addToPT(), OXML_Element_Table::addToPT(), OXML_Element_Paragraph::addToPT(), OXML_Element_Image::addToPT(), OXML_Element_Cell::addToPT(), OXML_Section::addToPTAsEndnote(), OXML_Section::addToPTAsFootnote(), OXML_Section::addToPTAsHdrFtr(), IE_Imp_XHTML::appendStrux(), IE_Imp::appendStrux(), IE_Imp_RTF::ApplyParagraphAttributes(), IE_Imp_RTF::ApplySectionAttributes(), IE_Imp_RTF::CloseTable(), ie_imp_table::deleteRow(), ODi_TextContent_ListenerState::endElement(), ODi_TableOfContent_ListenerState::endElement(), ODi_Table_ListenerState::endElement(), ODi_Frame_ListenerState::endElement(), IE_Imp_RTF::FlushStoredChars(), IE_Imp_RTF::HandleAbiEmbed(), IE_Imp_RTF::HandleAbiMathml(), IE_Imp_RTF::HandleBookmark(), IE_Imp_RTF::HandleCell(), IE_Imp_RTF::HandleField(), IE_Imp_RTF::HandleNote(), IE_Imp_RTF::HandleShape(), IE_Imp_RTF::InsertImage(), newDocument(), IE_Imp_RTF::OpenTable(), IE_Exp_DocRangeListener::populate(), IE_Exp_DocRangeListener::populateStrux(), repairDoc(), ODi_TextContent_ListenerState::startElement(), ODi_Style_MasterPage::startElement(), OpenWriter_ContentStream_Listener::startElement(), IE_Imp_TableHelper::tableStart(), and IE_Imp_ShpGroupParser::~IE_Imp_ShpGroupParser().

bool PD_Document::appendStruxFmt ( pf_Frag_Strux pfs,
const PP_PropertyVector attributes 
)
bool PD_Document::areDocumentContentsEqual ( const AD_Document D,
UT_uint32 pos 
) const [virtual]

Returns true if the contents of the two documents are identical if the function returns false, pos contains the document position at which first difference was encountered

Implements AD_Document.

References d, PD_DocIterator::getChar(), PD_DocIterator::getFrag(), pt_PieceTable::getFragments(), pf_Fragments::getLast(), pf_Frag::getLength(), pf_Frag::getPos(), PD_DocIterator::getPosition(), PD_DocIterator::getStatus(), pf_Frag::getType(), AD_Document::getType(), pf_Frag::isContentEqual(), m_pPieceTable, UT_MIN, UT_return_val_if_fail, and UTIter_OK.

bool PD_Document::areDocumentFormatsEqual ( const AD_Document D,
UT_uint32 pos 
) const [virtual]

Compare the format of the this document to another document; returns true if document formats are identical

If the function returns false, pos contains the document position at which first difference was encountered

NB: If the document contents are known not to be equal, it makes no sense to call this function.

Implements AD_Document.

References UT_GenericStringMap< T >::contains(), d, pt_PieceTable::getAttrProp(), PD_DocIterator::getFrag(), pf_Frag::getIndexAP(), pf_Frag::getLength(), PD_DocIterator::getPosition(), PD_DocIterator::getStatus(), AD_Document::getType(), UT_GenericStringMap< T >::insert(), PP_AttrProp::isEquivalent(), m_pPieceTable, s, UT_MIN, UT_return_val_if_fail, UT_String_sprintf(), and UTIter_OK.

bool PD_Document::areDocumentStylesheetsEqual ( const AD_Document D  )  const [virtual]
bool PD_Document::areStylesLocked (  )  const [inline]
void PD_Document::beginUserAtomicGlob ( void   ) 

References pt_PieceTable::beginUserAtomicGlob(), and m_pPieceTable.

Referenced by FV_Base::_beginGlob(), FV_View::_changeCellParams(), FV_View::_charInsert(), FV_View::_deleteHyperlink(), FV_View::_deleteSelection(), FV_View::_deleteXMLID(), ABI_Collab_Import::_disableUpdates(), FV_View::_findReplace(), FV_View::_findReplaceReverse(), FV_View::_insertField(), FV_View::_MergeCells(), FV_VisualDragText::_mouseDrag(), acceptAllRevisions(), acceptRejectRevision(), AP_Dialog_Lists::Apply(), ApplySemanticStylesheets(), FV_View::changeListStyle(), FV_View::cmdAutoFitTable(), FV_View::cmdAutoSizeCols(), FV_View::cmdAutoSizeRows(), FV_View::cmdCharDelete(), FV_View::cmdCharInsert(), FV_View::cmdDeleteCell(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteEmbed(), FV_View::cmdDeleteRow(), FV_View::cmdDeleteTable(), FV_View::cmdInsertCol(), FV_View::cmdInsertEmbed(), FV_View::cmdInsertGraphic(), FV_View::cmdInsertLatexMath(), FV_View::cmdInsertMathML(), FV_View::cmdInsertPositionedGraphic(), FV_View::cmdInsertRow(), FV_View::cmdInsertTable(), FV_View::cmdInsertTOC(), FV_View::cmdPaste(), FV_View::cmdPasteSelectionAt(), FV_View::cmdRemoveHdrFtr(), FV_View::cmdSplitCells(), FV_View::cmdStartList(), FV_View::cmdStopList(), FV_View::cmdTableToText(), FV_View::cmdTextToTable(), FV_View::cmdUpdateEmbed(), FV_View::convertInLineToPositioned(), FV_View::convertPositionedToInLine(), FV_View::createThisHdrFtr(), fl_BlockLayout::doclistener_insertSpan(), FV_View::endDragSelection(), FV_View::findReplaceAll(), FV_View::insertAnnotation(), FV_View::insertFootnote(), FV_View::insertFootnoteSection(), FV_View::insertHeaderFooter(), FV_View::insertPageNum(), FV_View::insertParagraphBreak(), FV_View::insertParagraphBreaknoListUpdate(), FV_View::insertSectionBreak(), FV_View::insertSymbol(), FV_View::pasteFromLocalTo(), FV_Selection::pasteRowOrCol(), FV_View::populateThisHdrFtr(), FV_View::processPageNumber(), FV_View::processSelectedBlocks(), rejectAllHigherRevisions(), FL_DocLayout::relocateFrame(), FV_View::removeThisHdrFtr(), FV_View::resetCharFormat(), FV_View::setAnnotationText(), FV_View::setBlockIndents(), FV_View::setCharFormat(), FV_View::setStyleAtPos(), FV_View::SetupSavePieceTableState(), and FV_View::toggleCase().

bool PD_Document::canDo ( bool  bUndo  )  const [virtual]

Implements AD_Document.

References pt_PieceTable::canDo(), and m_pPieceTable.

Referenced by FV_View::canDo().

void PD_Document::changeConnectedDocument ( PD_Document pDoc  ) 
bool PD_Document::changeLastStruxFmtNoUndo ( PT_DocPosition  dpos,
PTStruxType  pts,
const PP_PropertyVector attrs,
const PP_PropertyVector props,
bool  bSkipEmbededSections 
)
bool PD_Document::changeLastStruxFmtNoUndo ( PT_DocPosition  dpos,
PTStruxType  pts,
const PP_PropertyVector attrs,
const std::string &  props,
bool  bSkipEmbededSections 
)
bool PD_Document::changeObjectFormatNoUpdate ( PTChangeFmt  ptc,
pf_Frag_Object odh,
const PP_PropertyVector attributes,
const PP_PropertyVector properties 
)

Change the attributes of an object without generating a Change Record. Use with extreme care.

References pt_PieceTable::changeObjectFormatNoUpdate(), and m_pPieceTable.

Referenced by fp_ImageRun::_lookupProperties(), fp_MathRun::_updatePropValuesIfNeeded(), and fp_EmbedRun::_updatePropValuesIfNeeded().

bool PD_Document::changeStruxFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const PP_PropertyVector attributes,
const PP_PropertyVector properties 
)

This method changes *all* the strux fragments in the specified region.

References pt_PieceTable::changeStruxFmt(), isDoingTheDo(), and m_pPieceTable.

bool PD_Document::changeStruxFmt ( PTChangeFmt  ptc,
PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
const PP_PropertyVector attributes,
const PP_PropertyVector properties,
PTStruxType  pts 
)

References pt_PieceTable::changeStruxFmt(), isDoingTheDo(), and m_pPieceTable.

Referenced by _acceptRejectRevision(), FV_View::_changeCellAttach(), FV_View::_changeCellParams(), FV_View::_changeCellTo(), FV_View::_deleteSelection(), ABI_Collab_Import::_import(), FV_View::_restoreCellParams(), IE_Imp::appendStruxFmt(), IE_Imp_RTF::ApplyParagraphAttributes(), IE_Imp_RTF::ApplySectionAttributes(), FV_View::changeListStyle(), IE_Imp_RTF::closePastedTableIfNeeded(), FV_View::cmdAutoFitTable(), FV_View::cmdAutoSizeCols(), FV_View::cmdAutoSizeRows(), FV_View::cmdCharDelete(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteRow(), FV_View::cmdInsertCol(), FV_View::cmdInsertRow(), FV_View::cmdSplitCells(), fl_BlockLayout::doclistener_insertBlock(), IE_Imp_RTF::HandleAbiEndTable(), IE_Imp_RTF::HandleAbiTable(), FG_GraphicVector::insertAtStrux(), FG_GraphicRaster::insertAtStrux(), FV_View::insertFootnote(), FV_View::insertHeaderFooter(), FV_FrameEdit::mouseRelease(), fl_BlockLayout::prependList(), FV_View::processPageNumber(), FV_View::processSelectedBlocks(), fl_BlockLayout::remItemFromList(), FV_View::removeStruxAttrProps(), fl_BlockLayout::resumeList(), FV_View::setAnnotationAuthor(), FV_View::setAnnotationText(), FV_View::setAnnotationTitle(), FV_View::setBlockFormat(), FV_View::setBlockIndents(), FV_View::setCellFormat(), FV_View::setCollapsedRange(), fl_BlockLayout::setDominantDirection(), FV_View::setFrameFormat(), FV_View::setSectionFormat(), FV_View::setStyleAtPos(), FV_View::setTableFormat(), FV_View::setTOCProps(), and fl_BlockLayout::StopListInBlock().

bool PD_Document::changeStruxFmtNoUndo ( PTChangeFmt  ptc,
pf_Frag_Strux sdh,
const PP_PropertyVector attributes,
const PP_PropertyVector properties 
)
bool PD_Document::changeStruxForLists ( pf_Frag_Strux sdh,
const char *  pszParentID 
)

This Method is used to change just the parentID of each strux in a list without updating the fl_Layouts.

References pt_PieceTable::changeStruxForLists(), and m_pPieceTable.

Referenced by fl_AutoNum::_setParent().

bool PD_Document::changeStruxFormatNoUpdate ( PTChangeFmt  ptc,
pf_Frag_Strux sdh,
const PP_PropertyVector attributes 
)
bool PD_Document::checkForSuspect ( void   ) 

This method is called after appendspan, appendObject, appendfmtMark and checks to see if there is an invalid strux just before. If it see one, it marks the strux as suspect for verification after the load is over. Really useful for importers.

References UT_GenericVector< T >::addItem(), getLastFrag(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), and m_vecSuspectFrags.

Referenced by appendFmt(), appendFmtMark(), appendObject(), appendSpan(), appendStrux(), and repairDoc().

void PD_Document::clearAllPendingObjects ( void   ) 
void PD_Document::clearDoingPaste ( void   ) 
void PD_Document::clearIfAtFmtMark ( PT_DocPosition  dpos  ) 
void PD_Document::clearMailMergeMap (  ) 
bool PD_Document::convertPercentToInches ( const char *  szPercent,
UT_UTF8String sInches 
)
bool PD_Document::createAndSendCR ( PT_DocPosition  dpos,
UT_sint32  iType,
bool  bSave,
UT_Byte  iGlob 
)

Create a changerecord object and broadcast it to all the listeners. If bsave is true save the CR in th eunod stack.

References pt_PieceTable::createAndSendCR(), and m_pPieceTable.

Referenced by ABI_Collab_Import::_import().

bool PD_Document::createAndSendDocPropCR ( const gchar **  pAtts,
const gchar **  pProps 
) [virtual]
bool PD_Document::createAndSendDocPropCR ( const PP_PropertyVector pAtts,
const PP_PropertyVector pProps 
)

This method creates DocProp Change Record and broadcasts it to the listeners

References pt_PieceTable::createAndSendDocPropCR(), and m_pPieceTable.

void PD_Document::deferNotifications ( void   ) 
bool PD_Document::deleteFmtMark ( PT_DocPosition  dpos  ) 
bool PD_Document::deleteFragNoUpdate ( pf_Frag pf  ) 

This method deletes a frag without throwing a change record. pf is the frag that gets deleted.. Use with extreme care. Should only be used for document import.

References pt_PieceTable::deleteFragNoUpdate(), and m_pPieceTable.

Referenced by ODi_TextContent_ListenerState::endElement(), and IE_Imp_RTF::HandleShape().

void PD_Document::deleteHdrFtrStrux ( pf_Frag_Strux sdh  ) 

This method deletes the HdrFtr strux pointed to by sdh

References pt_PieceTable::deleteHdrFtrStrux(), pf_Frag::getType(), m_pPieceTable, and UT_return_if_fail.

Referenced by FV_View::_removeThisHdrFtr().

bool PD_Document::deleteStrux ( PT_DocPosition  dpos,
PTStruxType  pts,
bool  bRecordChange 
)

This method deletes a strux of the type specified at the position requested. if bRecordChange is fale no change record is recorded. This method was created soled for the use of AbiCollab. Use with extreme care. Should only be needed by AbiCollab

References pt_PieceTable::deleteStruxNoUpdate(), pt_PieceTable::deleteStruxWithNotify(), pt_PieceTable::getFragFromPosition(), pf_Frag::getLength(), pf_Frag::getPrev(), getStruxPosition(), pf_Frag::getType(), and m_pPieceTable.

Referenced by ABI_Collab_Import::_import().

bool PD_Document::deleteStruxNoUpdate ( pf_Frag_Strux sdh  ) 

This method deletes a strux without throwing a change record. sdh is the StruxDocHandle that gets deleted.. Use with extreme care. Should only be used for document import.

References pt_PieceTable::deleteStruxNoUpdate(), and m_pPieceTable.

Referenced by ie_imp_table::_removeAllStruxes(), IE_Imp_RTF::CloseTable(), ie_imp_table::deleteRow(), ie_imp_table::removeExtraneousCells(), and ie_imp_table::writeAllCellPropsInDoc().

void PD_Document::dontIgnoreSignals ( void   )  [inline]
bool PD_Document::dumpDoc ( const char *  msg,
PT_DocPosition  currentpos,
PT_DocPosition  endpos 
)
void PD_Document::endUserAtomicGlob ( void   ) 

References pt_PieceTable::endUserAtomicGlob(), and m_pPieceTable.

Referenced by FV_View::_charInsert(), FV_View::_deleteHyperlink(), FV_View::_deleteSelection(), FV_View::_deleteXMLID(), ABI_Collab_Import::_enableUpdates(), FV_Base::_endGlob(), FV_View::_findReplace(), FV_View::_findReplaceReverse(), FV_View::_insertField(), FV_View::_MergeCells(), FV_View::_restoreCellParams(), acceptAllRevisions(), acceptRejectRevision(), AP_Dialog_Lists::Apply(), ApplySemanticStylesheets(), FV_View::changeListStyle(), FV_View::cmdAutoFitTable(), FV_View::cmdAutoSizeCols(), FV_View::cmdAutoSizeRows(), FV_View::cmdCharDelete(), FV_View::cmdCharInsert(), FV_View::cmdDeleteCell(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteEmbed(), FV_View::cmdDeleteRow(), FV_View::cmdDeleteTable(), FV_View::cmdInsertCol(), FV_View::cmdInsertEmbed(), FV_View::cmdInsertGraphic(), FV_View::cmdInsertGraphicAtStrux(), FV_View::cmdInsertLatexMath(), FV_View::cmdInsertMathML(), FV_View::cmdInsertPositionedGraphic(), FV_View::cmdInsertRow(), FV_View::cmdInsertTable(), FV_View::cmdInsertTOC(), FV_View::cmdPaste(), FV_View::cmdPasteSelectionAt(), FV_View::cmdRemoveHdrFtr(), FV_View::cmdSplitCells(), FV_View::cmdStartList(), FV_View::cmdStopList(), FV_View::cmdTableToText(), FV_View::cmdTextToTable(), FV_View::cmdUpdateEmbed(), FV_View::convertInLineToPositioned(), FV_View::convertPositionedToInLine(), FV_View::createThisHdrFtr(), fl_BlockLayout::doclistener_insertSpan(), FV_View::endDragSelection(), FV_View::findReplaceAll(), FV_View::insertAnnotation(), FV_View::insertFootnote(), FV_View::insertFootnoteSection(), FV_View::insertHeaderFooter(), FV_View::insertPageNum(), FV_View::insertParagraphBreak(), FV_View::insertParagraphBreaknoListUpdate(), FV_View::insertSectionBreak(), FV_View::insertSymbol(), FV_VisualDragText::mouseRelease(), FV_View::pasteFromLocalTo(), FV_Selection::pasteRowOrCol(), FV_View::populateThisHdrFtr(), FV_View::processPageNumber(), FV_View::processSelectedBlocks(), rejectAllHigherRevisions(), FL_DocLayout::relocateFrame(), FV_View::removeThisHdrFtr(), FV_View::resetCharFormat(), FV_View::RestoreSavedPieceTableState(), FV_View::setAnnotationText(), FV_View::setBlockIndents(), FV_View::setCharFormat(), FV_View::setStyleAtPos(), and FV_View::toggleCase().

bool PD_Document::enumStyles ( UT_GenericVector< PD_Style * > *&  pStyles  )  const
const PP_AttrProp * PD_Document::explodeRevisions ( std::unique_ptr< PP_RevisionAttr > &  pRevisions,
const PP_AttrProp pAP,
bool  bShow,
UT_uint32  iId,
bool &  bHiddenRevision 
) const

If the input pAP contains revision attribute, this function returns AP in which the revision attribute has been inflated into actual properties and attributes (the return AP lives in the PT varset, so it is not to be modified, deleted, etc., but the caller)

bShow indicates whether revisions are shown or hidden (view - dependent) iId is the id of revision to be shown (view - dependent)

on return bHiddenRevision indicates if the element associated with pAP is to be hidden or visible

References PP_AttrProp::explodeStyle(), gchar, PP_AttrProp::getAttribute(), PP_AttrProp::getAttributes(), getAttrProp(), PP_Revision::getId(), getPieceTable(), PP_AttrProp::getProperties(), PP_Revision::getType(), AD_Document::isMarkRevisions(), PP_AttrProp::markReadOnly(), PD_MAX_REVISION, PP_REVISION_FMT_CHANGE, PP_AttrProp::prune(), PP_AttrProp::setAttributes(), PP_AttrProp::setProperties(), PP_AttrProp::setRevisedIndex(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_MIN, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.

Referenced by getAttrProp(), getSpanAttrProp(), and fl_ShadowListener::populateStrux().

bool PD_Document::exportGetVisDirectionAtPos ( PT_DocPosition  pos,
UT_BidiCharType type 
)

Some exporters (RTF) need to know the visual direction at each position in the document as it is being exported. The problem is that visual direction is a property of the layout not of the document itself (I shall not make any comments about badly designed file formats here!). Since our document is not directly aware of any of its layouts, we have to find a listener for FL_DocLayout that is registered with this document (it does not matter if there are more FL_DocLayout listeners registered, the visual direction will be same for all, so we grab the first one), and from the listener we can get access to the layout, down to the runs which carry the information that we need. Tomas, May 3, 2003

References _exportFindVisDirectionRunAtPos(), _exportInitVisDirection(), fp_Run::getVisDirection(), m_bLoading, m_iVDLastPos, m_pVDRun, and UT_return_val_if_fail.

Referenced by s_RTF_ListenerWriteDoc::_outputData().

bool PD_Document::findFirstDifferenceInContent ( PT_DocPosition pos,
UT_sint32 iOffset2,
const PD_Document d 
) const

finds the position of the first difference in content between this document and document d, starting search at given position

Parameters:
pos when called this variable should contian document offset at which to start searching; on success this variable will contain offset of the difference in present document
iOffset2 when called contains offset to be added to pos to locate identical position in document d
d the document to compare with
Returns:
returns false if no difference was found, true otherwise

References PD_DocIterator::getChar(), PD_DocIterator::getFrag(), pf_Frag::getLength(), pf_Frag::getPos(), PD_DocIterator::getPosition(), PD_DocIterator::getStatus(), pf_Frag::getType(), pf_Frag::isContentEqual(), m_pPieceTable, UT_ASSERT_HARMLESS, UT_MIN, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, and UTIter_OK.

UT_sint32 PD_Document::findFirstFreeAuthorInt ( void   )  const
pf_Frag_Strux * PD_Document::findForwardStyleStrux ( const gchar *  szStyle,
PT_DocPosition  pos 
)

This method scans the document forwards for a strux with the style name szStyle in it.

Parameters:
pStyle a pointer to style to be scanned for.
pos the document position to start from.
Returns:
the sdh of the strux found.

References gchar, pt_PieceTable::getAttrProp(), pt_PieceTable::getFragments(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), pf_Frag::getNext(), getStruxOfTypeFromPosition(), pf_Frag::getType(), m_pPieceTable, PT_STYLE_ATTRIBUTE_NAME, PTX_Block, and UT_return_val_if_fail.

Referenced by FV_View::setStyleAtPos().

pf_Frag_Strux * PD_Document::findHdrFtrStrux ( const gchar *  pszHdrFtr,
const gchar *  pszHdrFtrID 
)

This method scans the document to look for a HdrFtr strux.

Parameters:
const char * pszHdrFtr The particular attribute that identifies the strux as "header" "footer" "header-even" etc.
const char * pszHdrFtrID the unique string to match with Docsection.
Returns:
a pf_Frag_Strux* of the matching frag or NULL if none found.

References gchar, pt_PieceTable::getAttrProp(), pf_Fragments::getFirst(), pt_PieceTable::getFragments(), pf_Frag::getIndexAP(), pf_Fragments::getLast(), pf_Frag::getNext(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_pPieceTable, PT_ID_ATTRIBUTE_NAME, PT_TYPE_ATTRIBUTE_NAME, and UT_return_val_if_fail.

Referenced by IE_Exp_RTF::exportHdrFtr().

pf_Frag_Strux * PD_Document::findPreviousStyleStrux ( const gchar *  szStyle,
PT_DocPosition  pos 
)

This method scans the document backwards for a struc with the style name szStyle in it.

Parameters:
pStyle a pointer to style to be scanned for.
pos the document position to start from.
Returns:
the sdh of the strux found.

References gchar, pt_PieceTable::getAttrProp(), pf_Fragments::getFirst(), pt_PieceTable::getFragments(), pf_Frag::getIndexAP(), pf_Frag::getPrev(), getStruxOfTypeFromPosition(), pf_Frag::getType(), m_pPieceTable, PT_STYLE_ATTRIBUTE_NAME, PTX_Block, and UT_return_val_if_fail.

Referenced by FV_View::setStyleAtPos().

bool PD_Document::findWhereSimilarityResumes ( PT_DocPosition pos,
UT_sint32 iOffset2,
UT_uint32 iKnownLength,
const PD_Document d 
) const

Starting to search this document at position pos where the two documents are known to become different, attepts to find location at which similarities resume

Parameters:
pos,: when called, should contain offset in present document at which the difference starts; on successfult return it will contain offset in present document where similarities resume
iOffset2,: when called contains offset to be added to position pos in order to correctly position start of the search in document d; on return it contains offset to be add to pos in order to obtain correct location of the resumption of similarites in document d
iKnownLength,: on return contains the minium guaranteed length of the similarity
d the document to which this document is to be compared
Returns:
returns true if it succeeds; if no further similarities are found returns false

References PD_DocIterator::find(), PD_DocIterator::getPosition(), PD_DocIterator::getStatus(), m_pPieceTable, PD_DocIterator::setPosition(), and UT_return_val_if_fail.

bool PD_Document::fixListHierarchy ( void   ) 
void PD_Document::fixMissingXIDs (  ) 
void PD_Document::forceDirty (  )  [virtual]

force the document into being dirty and signal this to our listeners

Reimplemented from AD_Document.

References AD_Document::_setForceDirty(), isDirty(), PD_SIGNAL_DOCDIRTY_CHANGED, and signalListeners().

Referenced by AccountHandler::_handlePacket(), AbiCollabSaveInterceptor::_saveFailed(), Defun1(), and PD_DocumentRDF::maybeSetDocumentDirty().

void PD_Document::getAllViews ( UT_GenericVector< AV_View * > *  vecViews  )  const
bool PD_Document::getAnnotationProp ( const std::string &  key,
std::string &  outProp 
) const [virtual]

Implements AD_Document.

References UT_ASSERT, and UT_NOT_IMPLEMENTED.

bool PD_Document::getAttributeFromSDH ( pf_Frag_Strux sdh,
bool  bShowRevisions,
UT_uint32  iRevisionLevel,
const char *  szAttribute,
const char **  pszRetValue 
)

This method returns the value associated with attribute szAttribute at picetable strux given by sdh. NB: attributes and props are view-specific because of revision attributes

Parameters:
pf_Frag_Strux* sdh (pf_Frag_Strux) where we want to find the value
bool bShowRevisions -- revisions setting for the view (FV_View::isShowRevisions())
UT_uint32 iRevisionLevel -- the revision level of the view (FV_View::getRevisionLevel())
const char * szAttribute the attribute we're looking for.
const char ** pszValue the value of the attribute.
Returns:
true if the attribute was present at the sdh

Don't FREEP *pszRetValue!!!

References gchar, getAttrProp(), pf_Frag::getIndexAP(), and UT_return_val_if_fail.

Referenced by _matchSection(), _pruneSectionAPI(), _removeRepeatedHdrFtr(), FV_View::_removeThisHdrFtr(), fl_AutoNum::fixHierarchy(), and FV_View::isImageAtStrux().

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

References pt_PieceTable::getAttrProp(), and m_pPieceTable.

Referenced by PL_Psion_Listener::_addInLine(), ABI_Collab_Export::_buildPacket(), IE_Exp_HTML::_buildStyleTree(), ODe_AbiDocListener::_closeBookmark(), ODe_AbiDocListener::_closeRDFAnchor(), fl_BlockLayout::_doInsertFieldRun(), s_WML_Listener::_emitTOC(), ODe_AbiDocListener::_endAnnotation(), s_RTF_ListenerWriteDoc::_fillCellProps(), s_RTF_ListenerWriteDoc::_fillTableProps(), s_RTF_ListenerWriteDoc::_getColumnWidthInches(), fp_MathRun::_getLayoutPropFromObject(), fp_EmbedRun::_getLayoutPropFromObject(), ODe_AbiDocListener::_getObjectKey(), IE_Exp_HTML_Listener::_getObjectKey(), IE_Exp_HTML_Listener::_handleAnnotationData(), s_XSL_FO_Listener::_handleBookmark(), s_WML_Listener::_handleBookmark(), s_DocBook_Listener::_handleBookmark(), Text_Listener::_handleDirMarker(), s_DocBook_Listener::_handleDocument(), s_XSL_FO_Listener::_handleEmbedded(), s_WML_Listener::_handleEmbedded(), s_DocBook_Listener::_handleEmbedded(), s_XSL_FO_Listener::_handleField(), s_WML_Listener::_handleField(), s_DocBook_Listener::_handleField(), s_DocBook_Listener::_handleFootnote(), s_XSL_FO_Listener::_handleFrame(), s_DocBook_Listener::_handleHdrFtr(), s_XSL_FO_Listener::_handleHyperlink(), s_WML_Listener::_handleHyperlink(), s_DocBook_Listener::_handleHyperlink(), s_XSL_FO_Listener::_handleImage(), s_WML_Listener::_handleImage(), IE_Exp_HTML_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_XSL_FO_Listener::_handleMath(), s_WML_Listener::_handleMath(), s_DocBook_Listener::_handleMath(), s_XSL_FO_Listener::_handlePageSize(), s_XSL_FO_Listener::_handlePositionedImage(), s_DocBook_Listener::_handlePositionedImage(), s_DocBook_Listener::_handleTOC(), ODe_AbiDocListener::_insertEmbeddedImage(), IE_Exp_HTML_Listener::_insertEmbeddedImage(), PL_Psion_Listener::_insertImage(), IE_Exp_HTML_Listener::_insertImage(), ODe_AbiDocListener::_insertInlinedImage(), ODe_AbiDocListener::_insertMath(), IE_Exp_HTML_Listener::_insertMath(), IE_Exp_HTML_Listener::_insertPosImage(), IE_Exp_HTML_Listener::_insertTOC(), fp_ImageRun::_lookupProperties(), FL_DocLayout::_lookupProperties(), IE_Exp_HTML_Listener::_makeStylesheet(), ABI_Collab_Export::_mapPropsAtts(), ODe_AbiDocListener::_openAnnotation(), IE_Exp_HTML_Listener::_openAnnotation(), ODe_AbiDocListener::_openBlock(), s_XSL_FO_Listener::_openBlock(), WordPerfect_Listener::_openBlock(), Passepartout_Listener::_openBlock(), OO_Listener::_openBlock(), s_KWord_1_Listener::_openBlock(), IE_Exp_HTML_Listener::_openBlock(), ODe_AbiDocListener::_openBookmark(), IE_Exp_HTML_Listener::_openBookmark(), ODe_AbiDocListener::_openCell(), IE_Exp_HTML_Listener::_openCell(), ODe_AbiDocListener::_openEndnote(), IE_Exp_HTML_Listener::_openEndnote(), ODe_AbiDocListener::_openField(), IE_Exp_HTML_Listener::_openField(), Passepartout_Listener::_openFont(), ODe_AbiDocListener::_openFootnote(), IE_Exp_HTML_Listener::_openFootnote(), ODe_AbiDocListener::_openFrame(), s_RTF_ListenerWriteDoc::_openFrame(), IE_Exp_HTML_Listener::_openFrame(), IE_Exp_HTML_Listener::_openHeading(), ODe_AbiDocListener::_openHyperlink(), IE_Exp_HTML_Listener::_openHyperlink(), IE_Exp_HTML_Listener::_openList(), s_WML_Listener::_openParagraph(), PL_Psion_Listener::_openParagraph(), s_LaTeX_Listener::_openParagraph(), s_DocBook_Listener::_openParagraph(), ODe_AbiDocListener::_openRDFAnchor(), IE_Exp_HTML_Listener::_openRow(), ODe_AbiDocListener::_openSection(), s_WML_Listener::_openSection(), s_LaTeX_Listener::_openSection(), IE_Exp_HTML_Listener::_openSection(), s_DocBook_Listener::_openSection(), ODe_AbiDocListener::_openSpan(), s_XSL_FO_Listener::_openSpan(), WordPerfect_Listener::_openSpan(), s_WML_Listener::_openSpan(), s_RTF_ListenerWriteDoc::_openSpan(), s_RTF_ListenerGetProps::_openSpan(), OO_Listener::_openSpan(), s_LaTeX_Listener::_openSpan(), s_KWord_1_Listener::_openSpan(), IE_Exp_HTML_Listener::_openSpan(), s_HRText_Listener::_openSpan(), s_DocBook_Listener::_openSpan(), ODe_AbiDocListener::_openTable(), IE_Exp_HTML_Listener::_openTable(), s_RTF_ListenerWriteDoc::_openTag(), s_HRText_Listener::_openTag(), s_AbiWord_1_Listener::_openTag(), IE_Exp_HTML_Listener::_openTextbox(), ODe_AbiDocListener::_openTOC(), s_LaTeX_Listener::_outputBabelPackage(), s_RTF_ListenerWriteDoc::_rtf_open_block(), s_RTF_ListenerWriteDoc::_rtf_open_section(), s_RTF_ListenerGetProps::_searchCellAPI(), s_RTF_ListenerGetProps::_searchTableAPI(), PL_Psion_Listener::_setStyleLayout(), fp_MathRun::_updatePropValuesIfNeeded(), fp_EmbedRun::_updatePropValuesIfNeeded(), IE_Exp_RTF::_write_parafmt(), IE_Exp_RTF::_write_rtf_header(), s_RTF_ListenerWriteDoc::_writeAnnotation(), s_RTF_ListenerWriteDoc::_writeBookmark(), s_RTF_ListenerWriteDoc::_writeFieldPreamble(), s_RTF_ListenerWriteDoc::_writeHyperlink(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), s_KWord_1_Listener::_writeMarginSize(), s_RTF_ListenerWriteDoc::_writeRDFAnchor(), s_RTF_ListenerWriteDoc::_writeTOC(), IE_Exp_OpenXML_Listener::addDocumentStyles(), IE_Exp_OpenXML_Listener::addLists(), ODe_Styles::addStyle(), PD_DocumentRDF::addXMLIDsForBlockAndTableCellForPosition(), fl_SectionLayout::bl_doclistener_insertSection(), fl_DocListener::change(), FV_View::cmdInsertCol(), FV_View::cmdInsertRow(), FV_View::cmdSplitCells(), Defun1(), Defun_EV_GetMenuItemState_Fn(), fl_DocSectionLayout::doclistener_changeStrux(), fl_BlockLayout::doclistener_insertSection(), PD_DocumentRDF::dumpObjectMarkersFromDocument(), ODe_Styles::fetchRegularStyleStyles(), AP_Dialog_FormatTOC::fillTOCPropsFromDoc(), FV_View::FV_View(), FV_View::getAllAttrProp(), fl_Layout::getAttrProp(), s_AbiWord_1_Listener::getObjectKey(), IE_Exp_DocRangeListener::IE_Exp_DocRangeListener(), GR_LasemMathManager::loadEmbedData(), GR_GOChartManager::loadEmbedData(), PP_AttrProp::miniDump(), Passepartout_Listener::Passepartout_Listener(), PD_Bookmark::PD_Bookmark(), ODe_AbiDocListener::populate(), IE_Imp_PasteListener::populate(), s_RTF_ListenerWriteDoc::populate(), IE_Exp_OpenXML_Listener::populate(), OO_Listener::populate(), s_LaTeX_Listener::populate(), IE_Exp_HTML_BookmarkListener::populate(), IE_Exp_HTML_Listener::populate(), IE_Exp_DocRangeListener::populate(), s_AbiWord_1_Listener::populate(), ODe_AbiDocListener::populateStrux(), TOC_Listener::populateStrux(), IE_Imp_PasteListener::populateStrux(), s_XSL_FO_Listener::populateStrux(), Text_Listener::populateStrux(), s_RTF_ListenerWriteDoc::populateStrux(), s_RTF_ListenerGetProps::populateStrux(), PL_Psion_Listener::populateStrux(), Passepartout_Listener::populateStrux(), IE_Exp_OpenXML_Listener::populateStrux(), s_LaTeX_Listener::populateStrux(), s_KWord_1_Listener::populateStrux(), IE_Exp_HTML_HeaderFooterListener::populateStrux(), s_HRText_Listener::populateStrux(), IE_Exp_DocRangeListener::populateStrux(), fl_ShadowListener::populateStrux(), fl_DocListener::populateStrux(), PP_evalProperty(), PD_DocumentRDF::priv_addRelevantIDsForPosition(), RDFAnchor::RDFAnchor(), PD_XMLIDCreator::rebuildCache(), s_doLangDlg(), ie_PartTable::setCellApi(), AP_Dialog_FormatFrame::setCurFrameProps(), ie_PartTable::setTableApi(), IE_Exp_HTML_StyleListener::styleCheck(), Text_Listener::Text_Listener(), PD_RDFModelFromStartEndPos::updateAPList(), and OO_StylesWriter::writeStyles().

bool PD_Document::getAttrProp ( PT_AttrPropIndex  apIndx,
const PP_AttrProp **  ppAP,
std::unique_ptr< PP_RevisionAttr > &  pRevisions,
bool  bShowRevisions,
UT_uint32  iRevisionId,
bool &  bHiddenRevision 
) const
const PP_AttrProp * PD_Document::getAttrProp (  )  const
UT_GenericVector<pp_Author*>& PD_Document::getAuthors (  )  [inline]
bool PD_Document::getBlockBuf ( pf_Frag_Strux sdh,
UT_GrowBuf pgb 
) const
pf_Frag_Strux * PD_Document::getBlockFromPosition ( PT_DocPosition  pos  )  const
pf_Frag_Strux * PD_Document::getCellSDHFromRowCol ( pf_Frag_Strux tableSDH,
bool  bShowRevisions,
UT_uint32  iRevisionLevel,
UT_sint32  row,
UT_sint32  col 
)

The method returns the SDH of the cell at the location given by (rows,columns) in table pointed to by tableSDH. Returns NULL if the requested location is not contained in the cell.

Parameters:
pf_Frag_Strux* tableSDH SDH of the table in question
UT_sint32 row row location.
UT_sint32 col column location

References getEndTableStruxFromTableSDH(), pt_PieceTable::getFragments(), pf_Fragments::getLast(), pf_Frag::getNext(), getPropertyFromSDH(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_pPieceTable, UT_ASSERT, and UT_return_val_if_fail.

Referenced by s_RTF_ListenerWriteDoc::_newRow(), fp_FieldTableSumCols::calculateValue(), fp_FieldTableSumRows::calculateValue(), FV_View::cmdTextToTable(), Defun1(), FV_View::findCellPosAt(), s_RTF_ListenerWriteDoc::getRightOfCell(), FV_View::setCellFormat(), and ie_Table::setCellRowCol().

UT_sint32 PD_Document::getCRNumber (  )  const [inline]
bool PD_Document::getDataItemData ( PD_DataItemHandle  pHandle,
const char **  pszName,
UT_ConstByteBufPtr pByteBuf,
const void **  ppToken 
) const
bool PD_Document::getDataItemDataByName ( const char *  szName,
UT_ConstByteBufPtr pByteBuf,
std::string *  pMimeType,
PD_DataItemHandle ppHandle 
) const [virtual]
bool PD_Document::getDataItemFileExtension ( const char *  szDataID,
std::string &  sExt,
bool  bDot = true 
) const

This function accepts a data ID and assigns the file extension of the corresponding data item.

Parameters:
szDataID The incoming data ID to look up
sExt The extension string that is populated on success
bDot A boolean to determine whether the extension string will be prefixed with a dot ('.'). Defaults to true.
Returns:
Returns true only if the data item is found _and_ an extension is assigned.

References getDataItemDataByName(), UT_DEBUGMSG, and UT_return_val_if_fail.

Referenced by s_XSL_FO_Listener::_handleImage(), s_WML_Listener::_handleImage(), IE_Exp_HTML_Listener::_handleImage(), s_XSL_FO_Listener::_handlePositionedImage(), ODe_AbiDocListener::_insertInlinedImage(), OXML_Element_Image::serialize(), ODe_ManifestWriter::writeManifest(), and ODe_PicturesWriter::writePictures().

const char * PD_Document::getDefaultStyle (  )  const
UT_sint32 PD_Document::getEmbeddedOffset ( pf_Frag_Strux sdh,
PT_DocPosition  posoff,
pf_Frag_Strux *&  sdhEmbedded 
)

This method returns the offset to a an embedded strux And a pointer to the embedded strux found. If no emebedded strux is found in the block we return -1 ans NULL

References pt_PieceTable::getFragPosition(), pf_Frag::getNext(), pt_PieceTable::getStruxPosition(), pf_Frag_Strux::getStruxType(), pt_PieceTable::isFootnote(), m_pPieceTable, and UT_return_val_if_fail.

Referenced by fl_BlockLayout::getEmbeddedOffset().

pf_Frag_Strux * PD_Document::getEndCellStruxFromCellSDH ( pf_Frag_Strux cellSDH  ) 
pf_Frag_Strux * PD_Document::getEndTableStruxFromTablePos ( PT_DocPosition  tablePos  ) 

This method returns the end table strux associated with the table strux tableSDH Returns NULL on failure to find it.

References getEndTableStruxFromTableSDH(), getStruxOfTypeFromPosition(), and PTX_SectionTable.

Referenced by FV_View::setCellFormat().

bool PD_Document::getField ( pf_Frag_Strux sdh,
UT_uint32  offset,
fd_Field *&  pField 
)
UT_uint32 PD_Document::getFragXIDforVersion ( const pf_Frag pf,
UT_uint32  iVersion 
) const

This function evaluates the xid value for the given frament and version level.

The XID is a document-unique identifier of the frag; when we compare documents, we are interested not in document uniqueness but global uniqueness. We convert the document-unique xid to a globaly unique id by combining the xid with the UUID of document version: identical xid's in two documents represent identical elements if, and only if, the version UUIDs for the version of the document in which the element was created are identical. Therefore, as a part of the version record, we store the highest xid used in the document. This way we can determine in which version of the document the frag was created, based on its xid.

Frags that have xid aboved the version threshold need to be treated as frags without xid.

References AD_Document::findHistoryRecord(), AD_Document::getDocVersion(), getTopXID(), pf_Frag::getXID(), UT_return_val_if_fail, and v.

UT_sint32 PD_Document::getLastAuthorInt ( void   )  const

Returns the most recently received author int

References m_iLastAuthorInt.

Referenced by FV_View::updateCarets().

UT_uint32 PD_Document::getLastOpenedType (  )  const [inline]

Referenced by AbiCommand::parseTokens().

virtual UT_uint32 PD_Document::getLastSavedAsType (  )  const [inline, virtual]

Implements AD_Document.

pf_Frag_Strux * PD_Document::getLastSectionMutableSDH ( void   ) 
const pf_Frag_Strux * PD_Document::getLastSectionSDH ( void   )  const
std::string PD_Document::getMailMergeField ( const std::string &  key  )  const
const std::string& PD_Document::getMailMergeLink (  )  const [inline]
const std::map<std::string, std::string>& PD_Document::getMailMergeMap (  )  const [inline]
const std::map<std::string,std::string>& PD_Document::getMetaData (  )  const [inline]
UT_sint32 PD_Document::getMyAuthorInt ( void   )  const

Returns the integer mapping for this session

References m_iMyAuthorInt.

Referenced by addAuthorAttributeIfBlank(), and FV_View::addCaret().

UT_sint32 PD_Document::getNewFtrHeight ( void   )  const [inline]
UT_sint32 PD_Document::getNewHdrHeight ( void   )  const [inline]
UT_sint32 PD_Document::getNextCRNumber ( void   ) 

References m_iCRCounter.

Referenced by PX_ChangeRecord::setCRNumber().

bool PD_Document::getNextStrux ( pf_Frag_Strux sdh,
pf_Frag_Strux **  nextsdh 
)
pp_Author * PD_Document::getNthAuthor ( UT_sint32  i  )  const
const std::string& PD_Document::getNthBookmark ( UT_sint32  n  )  const [inline]
UT_sint32 PD_Document::getNumAuthors ( void   )  const
const fp_PageSize* PD_Document::getPageSize ( void   )  const [inline]
pf_Frag_Strux * PD_Document::getPrevNumberedHeadingStyle ( pf_Frag_Strux sdh  ) 

Find previous style of type numbered heading or basedon numbered heading

Parameters:
sdh The StruxDocHandle of the fragment where we start to look from.
Returns:
PD_Style of the first Numbered Heading, otherwise NULL

References PD_Style::getBasedOn(), PD_Style::getName(), pf_Frag::getPrev(), getStyleFromSDH(), and pf_Frag::getType().

Referenced by FV_View::setStyleAtPos().

bool PD_Document::getPrevStruxOfType ( pf_Frag_Strux sdh,
PTStruxType  pts,
pf_Frag_Strux **  prevsdh 
)
bool PD_Document::getPropertyFromSDH ( const pf_Frag_Strux sdh,
bool  bShowRevisions,
UT_uint32  iRevisionLevel,
const char *  szProperty,
const char **  pszRetValue 
) const

This method returns the value associated with attribute szProperty at picetable strux given by sdh. NB: attributes and props are view-specific because of revision attributes

Parameters:
pf_Frag_Strux* sdh (pf_Frag_Strux) where we want to find the value
bool bShowRevisions -- revisions setting for the view (FV_View::isShowRevisions())
UT_uint32 iRevisionLevel -- the revision level of the view (FV_View::getRevisionLevel())
const char * szProperty the Property we're looking for.
const char ** pszValue the value of the property.
Returns:
true if the property was present at the sdh

Don't FREEP *pszRetValue!!!

References gchar, getAttrProp(), pf_Frag::getIndexAP(), and UT_return_val_if_fail.

Referenced by IE_Exp_RTF::_output_ListRTF(), IE_Imp_RTF::closePastedTableIfNeeded(), FV_View::cmdDeleteCell(), convertPercentToInches(), FV_View::getCellLineStyle(), FV_View::getCellParams(), FV_View::getCellProperty(), getCellSDHFromRowCol(), s_RTF_ListenerWriteDoc::getRightOfCell(), getRowsColsFromTableSDH(), IE_Imp_RTF::HandleAbiEndTable(), IE_Imp_RTF::HandleAbiTable(), and miniDump().

bool PD_Document::getRowsColsFromTableSDH ( pf_Frag_Strux tableSDH,
bool  bShowRevisions,
UT_uint32  iRevisionLevel,
UT_sint32 numRows,
UT_sint32 numCols 
)

The method returns the number of rows and columns in table pointed to by tableSDH

Parameters:
pf_Frag_Strux* tableSDH SDH of the table in question
UT_sint32 * numRows pointer to the number of rows returned
UT_sint32 * numCols pointer to the number of cols returned

References getEndTableStruxFromTableSDH(), pt_PieceTable::getFragments(), pf_Fragments::getLast(), pf_Frag::getNext(), getPropertyFromSDH(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_pPieceTable, UT_ASSERT, and UT_return_val_if_fail.

Referenced by ie_PartTable::_setRowsCols(), FV_View::cmdMergeCells(), FV_View::cmdSelectColumn(), FV_View::cmdTableToText(), Defun1(), and FV_View::setCellFormat().

bool PD_Document::getSpanAttrProp ( pf_Frag_Strux sdh,
UT_uint32  offset,
bool  bLeftSide,
const PP_AttrProp **  ppAP 
) const
bool PD_Document::getSpanAttrProp ( pf_Frag_Strux sdh,
UT_uint32  offset,
bool  bLeftSide,
const PP_AttrProp **  ppAP,
std::unique_ptr< PP_RevisionAttr > &  pRevisions,
bool  bShowRevisions,
UT_uint32  iRevisionId,
bool &  bHiddenRevision 
) const

retrieves span AP corresponding to revision settings

pRevisions : [out] the representation of the rev. attribute associated with the AP; if the caller does not need this, the pointer can be set to null

References explodeRevisions(), gchar, PP_AttrProp::getAttribute(), getAttrProp(), PP_AttrProp::getRevisedIndex(), PP_AttrProp::getRevisionHidden(), PP_AttrProp::getRevisionState(), getSpanAttrProp(), PP_RevisionState::isEqual(), AD_Document::isMarkRevisions(), and UT_return_val_if_fail.

bool PD_Document::getStruxFromPosition ( PL_ListenerId  listenerId,
PT_DocPosition  docPos,
fl_ContainerLayout **  psfh 
) const
bool PD_Document::getStruxOfTypeFromPosition ( PL_ListenerId  listenerId,
PT_DocPosition  docPos,
PTStruxType  pts,
fl_ContainerLayout **  psfh 
) const

References pt_PieceTable::getStruxOfTypeFromPosition(), and m_pPieceTable.

Referenced by FV_View::_deleteCellAt(), FV_View::_findGetNextBlockBuffer(), s_RTF_ListenerWriteDoc::_getFieldValue(), FV_View::_getMouseContext(), ABI_Collab_Import::_import(), IE_Imp_Text::_insertBlock(), FV_View::_MergeCells(), s_RTF_ListenerWriteDoc::_open_table(), IE_Exp_RTF::_write_rtf_header(), IE_Imp_RTF::ApplyParagraphAttributes(), fp_FieldTableSumCols::calculateValue(), fp_FieldTableSumRows::calculateValue(), IE_Imp_RTF::closePastedTableIfNeeded(), FV_View::cmdAdvanceNextPrevCell(), FV_View::cmdDeleteCell(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteRow(), FV_View::cmdDeleteTable(), FV_View::cmdInsertCol(), FV_View::cmdInsertRow(), FV_View::cmdInsertTable(), FV_View::cmdMergeCells(), FV_View::cmdSelectColumn(), FV_View::cmdSplitCells(), FV_View::cmdTableToText(), FV_View::cmdTextToTable(), Defun1(), AP_Dialog_FormatTOC::fillTOCPropsFromDoc(), fl_HdrFtrShadow::findBlockAtPosition(), FL_DocLayout::findBlockAtPosition(), FL_DocLayout::findBlockAtPositionReverse(), FV_View::findCellPosAt(), findForwardStyleStrux(), findPreviousStyleStrux(), FV_View::getCellLineStyle(), FV_View::getCellParams(), FV_View::getCellProperty(), fl_BlockLayout::getEnclosingBlock(), getEndTableStruxFromTablePos(), FV_View::getFrameLayout(), IE_Imp_RTF::HandleAbiEndTable(), IE_Imp_RTF::HandleAbiTable(), IE_Imp_RTF::HandleDeltaMoveID(), FV_View::isImageAtStrux(), FV_View::isInTable(), fl_HdrFtrSectionLayout::isPointInHere(), FV_View::isPointLegal(), IE_Imp_RTF::mapID(), FV_Selection::pasteRowOrCol(), FV_View::setBlockFormat(), FV_View::setCellFormat(), AP_Dialog_FormatFrame::setCurFrameProps(), FV_FrameEdit::setDragType(), FV_View::setTableFormat(), and fl_BlockLayout::updateEnclosingBlockIfNeeded().

bool PD_Document::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.

This sdh is actually a (void *) pointer to a pf_Frag_Strux

References pt_PieceTable::getStruxOfTypeFromPosition(), and m_pPieceTable.

PT_DocPosition PD_Document::getStruxPosition ( pf_Frag_Strux sdh  )  const

References pt_PieceTable::getStruxPosition(), and m_pPieceTable.

Referenced by FV_View::_deleteCellAt(), FV_View::_findGetNextBlockBuffer(), FV_View::_MergeCells(), s_RTF_ListenerWriteDoc::_open_table(), FV_View::_populateThisHdrFtr(), FV_Selection::addCellToSelection(), fl_HdrFtrSectionLayout::addPage(), AP_Dialog_Lists::Apply(), fp_FieldTOCNumRun::calculateValue(), fp_FieldTableSumCols::calculateValue(), fp_FieldTableSumRows::calculateValue(), fp_FieldListLabelRun::calculateValue(), FV_View::changeListStyle(), IE_Imp_RTF::closePastedTableIfNeeded(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteRow(), FV_View::cmdDeleteTable(), FV_View::cmdInsertCol(), FV_View::cmdInsertRow(), FV_View::cmdInsertTable(), FV_View::cmdMergeCells(), FV_View::cmdSelectColumn(), FV_View::cmdSplitCells(), FV_View::cmdTableToText(), FV_View::cmdTextToTable(), compareListItems(), fl_ContainerLayout::containsAnnotationLayouts(), fl_ContainerLayout::containsFootnoteLayouts(), Defun1(), FV_FrameEdit::deleteFrame(), deleteStrux(), fl_BlockLayout::doclistener_insertSection(), IE_Exp_RTF::exportHdrFtr(), fl_AutoNum::findAndSetParentItem(), FV_View::findCellPosAt(), FV_View::getAnnotationText(), fl_TOCLayout::getDocPosition(), fl_FrameLayout::getDocPosition(), fl_EmbedLayout::getDocPosition(), fl_BlockLayout::getEnclosingBlock(), fl_TOCLayout::getLength(), fl_CellLayout::getLength(), fl_TableLayout::getLength(), fl_FrameLayout::getLength(), fl_EmbedLayout::getLength(), fl_BlockLayout::getLength(), fl_ContainerLayout::getPosition(), fl_BlockLayout::getPosition(), IE_Imp_RTF::HandleAbiEndTable(), IE_Imp_RTF::HandleAbiTable(), FV_View::insertAnnotationDescription(), fl_CellLayout::isCellSelected(), fl_AutoNum::isContainedByList(), FV_View::isInTable(), FV_View::isPointLegal(), listUpdate(), FV_FrameEdit::mouseRelease(), FV_Selection::pasteRowOrCol(), IE_Exp_HTML_HeaderFooterListener::populateStrux(), s_DocBook_Listener::populateStrux(), FL_DocLayout::relocateFrame(), removeList(), FV_View::selectAnnotation(), FV_View::setAnnotationAuthor(), FV_View::setAnnotationText(), FV_View::setAnnotationTitle(), FV_View::setBlockIndents(), FV_View::setCellFormat(), FV_View::setTableFormat(), fl_BlockLayout::shuffleEmbeddedIfNeeded(), StopList(), updateAllLayoutsInDoc(), and fl_BlockLayout::updateEnclosingBlockIfNeeded().

PTStruxType PD_Document::getStruxType ( pf_Frag_Strux sdh  )  const
PD_Style * PD_Document::getStyleFromSDH ( pf_Frag_Strux sdh  ) 
bool PD_Document::getStyleProperty ( const gchar *  szStyleName,
const gchar *  szPropertyName,
const gchar *&  szPropertyValue 
)

Referenced by FV_View::cmdInsertTable().

UT_uint32 PD_Document::getTopXID (  )  const [virtual]
virtual AD_DOCUMENT_TYPE PD_Document::getType ( void   )  const [inline, virtual]

Implements AD_Document.

const std::string& PD_Document::getUserName (  )  const [inline]

Referenced by insertAnnotation().

UT_uint32 PD_Document::getXID (  )  const [virtual]

Implements AD_Document.

References pt_PieceTable::getXID(), and m_pPieceTable.

Referenced by createDataItem().

bool PD_Document::hasListStopped ( void   )  const [inline]
bool PD_Document::hasMath ( void   ) 
void PD_Document::ignoreSignals ( void   )  [inline]
UT_Error PD_Document::importFile ( GsfInput *  input,
int  ieft,
bool  markClean = false,
bool  bImportStylesFirst = true,
const char *  impProps = NULL 
)

References _importFile().

UT_Error PD_Document::importFile ( const char *  szFilename,
int  ieft,
bool  markClean = false,
bool  bImportStylesFirst = true,
const char *  impProps = NULL 
) [virtual]

Implements AD_Document.

References _importFile().

Referenced by newDocument(), and IE_Imp_EPUB::readStructure().

bool PD_Document::insertFmtMark ( PTChangeFmt  ptc,
PT_DocPosition  dpos,
PP_AttrProp p_AttrProp 
)
bool PD_Document::insertFmtMarkBeforeFrag ( pf_Frag pF,
const PP_PropertyVector attributes 
)
bool PD_Document::insertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const PP_PropertyVector attributes,
const PP_PropertyVector properties,
fd_Field **  pField 
)
bool PD_Document::insertSpan ( PT_DocPosition  dpos,
const std::string &  s,
PP_AttrProp p_AttrProp = NULL 
)
bool PD_Document::insertStrux ( PT_DocPosition  dpos,
PTStruxType  pts,
const PP_PropertyVector attributes,
const PP_PropertyVector properties,
pf_Frag_Strux **  ppfs_ret = NULL 
)
bool PD_Document::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 pf_Frag_Strux::getStruxType(), pt_PieceTable::insertStruxNoUpdateBefore(), and m_pPieceTable.

Referenced by IE_Imp_RTF::CloseTable(), IE_Imp_RTF::HandleCell(), and ie_imp_table_control::NewRow().

void PD_Document::invalidateCache ( void   ) 

References m_iVDLastPos, m_pVDBl, and m_pVDRun.

Referenced by IE_Exp::IE_Exp(), and IE_Imp::IE_Imp().

bool PD_Document::isBlockAtPos ( PT_DocPosition  pos  ) 
bool PD_Document::isBookmarkRelativeLink ( const gchar *  pName  )  const

Returns true if pName looks like a relative link, rather than a bookmark.

Current heuristic: if pName contains a ., then it's a rel link; otherwise it's a bookmark.

References gchar, and UT_ASSERT_HARMLESS.

Referenced by FV_View::cmdInsertHyperlink().

bool PD_Document::isBookmarkUnique ( const gchar *  pName  )  const
bool PD_Document::isCoalescingMasked (  )  const [inline]
bool PD_Document::isConnected ( void   ) 

Return true if the document has an abicollab connection

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), PL_Listener::getType(), and m_vecListeners.

Referenced by Defun(), and s_closeWindow().

bool PD_Document::isDontImmediateLayout ( void   )  const [inline]
bool PD_Document::isExportAuthorAtts ( void   )  const
bool PD_Document::isHdrFtrAtPos ( PT_DocPosition  pos  ) 
bool PD_Document::isIdUnique ( UT_UniqueId::idType  t,
UT_uint32  i 
) const [inline]
bool PD_Document::isInsertHyperLinkValid ( PT_DocPosition  pos  )  const

Returns true if it is legal to insert a hperlink at this position. Looks to see if there is An open hyperlink or annotation upstream.

References gchar, pt_PieceTable::getAttrProp(), pt_PieceTable::getFragFromPosition(), pf_Frag_Object::getObjectType(), pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), m_pPieceTable, PT_ANNOTATION_NUMBER, PT_HYPERLINK_TARGET_NAME, PT_RDF_XMLID, and UT_return_val_if_fail.

bool PD_Document::isMarginChangeOnly ( void   )  const
bool PD_Document::isRedrawHappenning ( void   )  const [inline]
bool PD_Document::isSectionAtPos ( PT_DocPosition  pos  ) 
bool PD_Document::isShowAuthors ( void   )  const [inline]
bool PD_Document::isStruxBeforeThis ( pf_Frag_Strux sdh,
PTStruxType  pts 
)

This method examines the frag immediately before the given sdh and decides if it matches the strux type given.

References pf_Frag::getPrev(), pf_Frag_Strux::getStruxType(), and pf_Frag::getType().

bool PD_Document::isVDNDinProgress (  )  const [inline]
void PD_Document::lockStyles ( bool  b  ) 

References m_bLockedStyles, and setAttributes().

Referenced by Defun1().

bool PD_Document::mailMergeFieldExists ( const std::string &  key  )  const
PD_XMLIDCreatorHandle PD_Document::makeXMLIDCreator (  ) 

Referenced by IE_Imp_RTF::IE_Imp_RTF().

bool PD_Document::notifyListeners ( const pf_Frag_Strux pfs,
const PX_ChangeRecord pcr 
) const
void PD_Document::processDeferredNotifications ( void   ) 
bool PD_Document::purgeFmtMarks (  ) 

This function crawls over the entire document and removes all fmt marks. It is principally meant to do PT clean up on import (for example, the structure of MS Word documents is such that we end up with a myriad of superfluous fmt marks in the document), and should be called by an importer at the end of import process.

References m_pPieceTable, and pt_PieceTable::purgeFmtMarks().

Referenced by IE_Imp_MsWord_97::_docProc(), acceptAllRevisions(), and rejectAllHigherRevisions().

UT_Error PD_Document::readFromFile ( GsfInput *  input,
int  ieft,
const char *  impProps = NULL 
)

References _importFile().

bool PD_Document::redoCmd ( UT_uint32  repeatCount  )  [virtual]

Implements AD_Document.

References m_pPieceTable, and pt_PieceTable::redoCmd().

Referenced by FV_View::cmdRedo().

void PD_Document::removeBookmark ( const gchar *  pName  ) 
void PD_Document::removeCaret ( const std::string &  sCaretID  ) 
void PD_Document::removeConnections ( void   ) 

Remove all AbiCollab connections. We should do this before the document is destructed.

References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), PL_Listener::getType(), m_vecListeners, and removeListener().

Referenced by ~PD_Document().

bool PD_Document::replaceDataItem ( const char *  szName,
const UT_ConstByteBufPtr pByteBuf 
) [virtual]

Replace the contents of the pre-existing data item with this new data item (pByteBuf). Used when updating a preview of an embedded object.

Implements AD_Document.

References m_hashDataItems, _dataItemPair::pBuf, and UT_return_val_if_fail.

UT_Error PD_Document::saveAs ( GsfOutput *  output,
int  ieft,
bool  cpy = false,
const char *  expProps = NULL 
)
bool PD_Document::sendAddAuthorCR ( pp_Author pAuthor  ) 
bool PD_Document::sendChangeAuthorCR ( pp_Author pAuthor  ) 
bool PD_Document::setAllStyleAttributes ( const gchar *  szStyleName,
const PP_PropertyVector attribs 
)

This methods changes the attributes /properties of a style (basedon,followedby) plus the properties. We have to save the indexAP of the pre-existing style and broadcast it out witht e change records.

Parameters:
szStyleName the const gchar * name of the style
attribs The list of attributes/properties of the updated style.

References PD_Style::getBasedOn(), PD_Style::getFollowedBy(), pt_PieceTable::getStyle(), m_pPieceTable, and updateDocForStyleChange().

Referenced by AP_Dialog_Styles::applyModifiedStyleToDoc().

void PD_Document::setAnnotationProp ( const std::string &  key,
const std::string &  value 
) [virtual]

Implements AD_Document.

References UT_ASSERT, and UT_NOT_IMPLEMENTED.

bool PD_Document::setAttributes ( const PP_PropertyVector ppAttr  ) 
bool PD_Document::setAttrProp ( const PP_PropertyVector ppAttr  ) 

Sets document attributes and properties can only be used while loading documents

Parameters:
const gchar ** ppAttr: array of attribute/value pairs

if ppAttr == NULL and m_indexAP == 0xffffffff, the function creates a new AP and sets it to the default values hardcoded in it

if ppAttr == NULL and m_indexAP != 0xffffffff, the function does nothing

if ppAttr != NULL the function overlays passed attributes over the existing attributes (creating a new AP first if necessary)

When initialising document attributes and props, we need to set m_indexAP to 0xffffffff and then call setAttributes(NULL).

Importers should just call setAttributes(NULL) in the initialisation stage, this ensures that default values are set without overwriting existing values if those were set by the caller of the importer.

Tomas, Dec 6, 2003

References ABIWORD_FILEFORMAT_VERSION, AP_PREF_KEY_DefaultDirectionRtl, XAP_App::getApp(), UT_LocaleInfo::getLanguage(), pt_PieceTable::getPieceTableState(), XAP_App::getPrefs(), XAP_Prefs::getPrefsValueBool(), UT_LocaleInfo::getTerritory(), m_indexAP, m_pPieceTable, PP_getAttribute(), PTC_AddFmt, XAP_App::s_szBuild_Version, setAttributes(), setProperties(), pt_PieceTable::setXIDThreshold(), UT_DEBUGMSG, UT_return_val_if_fail, and VARSET.

Referenced by _importFile(), IE_Imp_MsWord_97::_loadFile(), IE_Imp_RTF::_parseFile(), createRawDocument(), and newDocument().

void PD_Document::setAutoRevisioning ( bool  autorev  )  [virtual]

Reimplemented from AD_Document.

References PD_SIGNAL_REFORMAT_LAYOUT, and signalListeners().

Referenced by Defun1(), and IE_Imp_AbiWord_1::endElement().

void PD_Document::setClean ( void   )  [inline]
void PD_Document::setCoalescingMask ( bool  mask  )  [inline]

Referenced by AbiCollab::AbiCollab().

void PD_Document::setCRNumber ( UT_sint32  iCRCounter  )  [inline]
bool PD_Document::setDataItemToken ( PD_DataItemHandle  pHandle,
void *  pToken 
) const
void PD_Document::setDoingPaste ( void   ) 
void PD_Document::setExportAuthorAtts ( bool  bExport  ) 

References m_bExportAuthorAtts.

void PD_Document::setHasListStopped ( bool  bStop  )  [inline]
void PD_Document::setMailMergeField ( const std::string &  key,
const std::string &  value 
)
void PD_Document::setMailMergeLink ( const char *  file  )  [inline]
void PD_Document::setMarginChangeOnly ( bool  b  ) 
void PD_Document::setMarkRevisions ( bool  bMark  )  [virtual]
void PD_Document::setMarkRevisionsNoNotify ( bool  bMark  )  [inline]
void PD_Document::setMyAuthorInt ( UT_sint32  iAuthor  ) 
void PD_Document::setNewFtrHeight ( UT_sint32  newHeight  )  [inline]
void PD_Document::setNewHdrHeight ( UT_sint32  newHeight  )  [inline]
void PD_Document::setRedrawHappenning ( bool  bIsHappening  )  [inline]
void PD_Document::setVDNDinProgress ( bool  b  )  [inline]
void PD_Document::tellPTDoNotTweakPosition ( bool  b  ) 
bool PD_Document::undoCmd ( UT_uint32  repeatCount  )  [virtual]
UT_uint32 PD_Document::undoCount ( bool  bUndo  )  const [virtual]
void PD_Document::updateAllLayoutsInDoc ( pf_Frag_Strux sdh  ) 

This method updates all the layouts associated with the document.

References pf_Frag::getIndexAP(), getStruxPosition(), pf_Frag::getXID(), notifyListeners(), and PX_ChangeRecord::PXT_ChangeStrux.

bool PD_Document::verifySectionID ( const gchar *  pszId  ) 

Member Data Documentation

Referenced by signalListeners().

Referenced by setShowAuthors().

bool PD_Document::m_bVDND [private]
std::string PD_Document::m_mailMergeLink [private]
std::map<std::string, std::string> PD_Document::m_mailMergeMap [private]
std::map<std::string, std::string> PD_Document::m_metaDataMap [private]

Referenced by getMetaDataProp(), and setMetaDataProp().

Referenced by _checkAndFixTable(), _clearUndo(), _importFile(), _pruneSectionAPI(), _removeHdrFtr(), _setClean(), acceptAllRevisions(), acceptRejectRevision(), addListener(), addStyleAttributes(), addStyleProperties(), appendFmt(), appendFmtMark(), appendLastStruxFmt(), appendObject(), appendSpan(), appendStrux(), appendStruxFmt(), appendStyle(), areDocumentContentsEqual(), areDocumentFormatsEqual(), areDocumentStylesheetsEqual(), beginUserAtomicGlob(), canDo(), changeLastStruxFmtNoUndo(), changeObjectFormatNoUpdate(), changeSpanFmt(), changeStruxAttsNoUpdate(), changeStruxFmt(), changeStruxFmtNoUndo(), changeStruxForLists(), changeStruxFormatNoUpdate(), clearIfAtFmtMark(), createAndSendCR(), createAndSendDocPropCR(), createDataItem(), createRawDocument(), deleteFmtMark(), deleteFragNoUpdate(), deleteHdrFtrStrux(), deleteSpan(), deleteStrux(), deleteStruxNoUpdate(), dumpDoc(), endUserAtomicGlob(), enumStyles(), findFirstDifferenceInContent(), findForwardStyleStrux(), findFragOfType(), findHdrFtrStrux(), findPreviousStyleStrux(), findWhereSimilarityResumes(), finishRawCreation(), fixMissingXIDs(), getAllUsedStyles(), getAttrProp(), getBlockBuf(), getBlockFromPosition(), getBounds(), getCellSDHFromRowCol(), getEmbeddedOffset(), getEndCellStruxFromCellSDH(), getEndTableStruxFromTableSDH(), getFragFromPosition(), getLastFrag(), getLastSectionMutableSDH(), getLastSectionSDH(), getLastStruxOfType(), getNextStrux(), getPointer(), getRowsColsFromTableSDH(), getSpanAttrProp(), getStruxFromPosition(), getStruxOfTypeFromPosition(), getStruxPosition(), getStyle(), getStyleCount(), getStyleFromSDH(), getTopXID(), getXID(), hasEmbedStruxOfTypeInRange(), importStyles(), insertFmtMark(), insertFmtMarkBeforeFrag(), insertObject(), insertObjectBeforeFrag(), insertSpan(), insertSpanBeforeFrag(), insertStrux(), insertStruxBeforeFrag(), insertStruxNoUpdateBefore(), isBlockAtPos(), isCellAtPos(), isDirty(), isDoingTheDo(), isEndFootnoteAtPos(), isEndFrameAtPos(), isEndTableAtPos(), isFootnoteAtPos(), isFrameAtPos(), isHdrFtrAtPos(), isInsertHyperLinkValid(), isSectionAtPos(), isTableAtPos(), isTOCAtPos(), miniDump(), newDocument(), purgeFmtMarks(), redoCmd(), rejectAllHigherRevisions(), removeListener(), removeStyle(), repairDoc(), setAllStyleAttributes(), setAttrProp(), tellListener(), tellListenerSubset(), tellPTDoNotTweakPosition(), undoCmd(), undoCount(), updateDocForStyleChange(), updateFields(), verifySectionID(), and ~PD_Document().

std::string PD_Document::m_sUserName [private]

Referenced by newDocument(), and PD_Document().

std::vector<std::string> PD_Document::m_vBookmarkNames [private]

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