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)
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, PL_ObjectHandle odh, const gchar **attributes, const gchar **properties)
PT_AttrPropIndex getAPIFromSOH (PL_ObjectHandle odh)
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties)
bool insertObject (PT_DocPosition dpos, PTObjectType pto, const gchar **attributes, const gchar **properties, fd_Field **pField)
bool insertSpan (PT_DocPosition dpos, const UT_UCSChar *p, UT_uint32 length, 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 gchar **attributes, const gchar **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 changeDocPropeties (const gchar **szAtts, const gchar **pProps)
bool insertStrux (PT_DocPosition dpos, PTStruxType pts, const gchar **attributes, const gchar **properties, pf_Frag_Strux **ppfs_ret=0)
void deleteHdrFtrStrux (PL_StruxDocHandle sdh)
bool changeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties, PTStruxType pts)
bool changeStruxFmt (PTChangeFmt ptc, PT_DocPosition dpos1, PT_DocPosition dpos2, const gchar **attributes, const gchar **properties)
bool changeStruxFmtNoUndo (PTChangeFmt ptc, PL_StruxDocHandle sdh, const gchar **attributes, const gchar **properties)
bool changeStruxForLists (PL_StruxDocHandle sdh, const char *pszParentID)
bool insertFmtMark (PTChangeFmt ptc, PT_DocPosition dpos, PP_AttrProp *p_AttrProp)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const gchar **attrs, const gchar **props, bool bSkipEmbededSections)
bool changeLastStruxFmtNoUndo (PT_DocPosition dpos, PTStruxType pts, const gchar **attrs, const gchar *props, bool bSkipEmbededSections)
bool appendStrux (PTStruxType pts, const gchar **attributes, pf_Frag_Strux **ppfs_ret=0)
bool appendStruxFmt (pf_Frag_Strux *pfs, const gchar **attributes)
bool appendLastStruxFmt (PTStruxType pts, const gchar **attrs, const gchar **props, bool bSkipEmbededSections)
bool appendLastStruxFmt (PTStruxType pts, const gchar **attrs, const gchar *props, bool bSkipEmbededSections)
bool appendFmt (const gchar **attributes)
bool appendFmt (const UT_GenericVector< const gchar * > *pVecAttributes)
bool appendSpan (const UT_UCSChar *p, UT_uint32 length)
bool appendObject (PTObjectType pto, const gchar **attributes)
bool appendFmtMark (void)
bool appendStyle (const gchar **attributes)
bool changeStruxFormatNoUpdate (PTChangeFmt ptc, PL_StruxDocHandle sdh, const gchar **attributes)
bool insertStruxBeforeFrag (pf_Frag *pF, PTStruxType pts, const gchar **attributes, pf_Frag_Strux **ppfs_ret=0)
bool insertSpanBeforeFrag (pf_Frag *pF, const UT_UCSChar *p, UT_uint32 length)
bool insertObjectBeforeFrag (pf_Frag *pF, PTObjectType pto, const gchar **attributes)
bool insertFmtMarkBeforeFrag (pf_Frag *pF)
bool insertFmtMarkBeforeFrag (pf_Frag *pF, const gchar **attributes)
pf_FragfindFragOfType (pf_Frag::PFType iType, UT_sint32 iSubtype=-1, const pf_Frag *pfStart=NULL)
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)
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 (PL_StruxDocHandle sdh, UT_uint32 offset, bool bLeftSide, const PP_AttrProp **ppAP) const
bool getAttrProp (PT_AttrPropIndex apIndx, const PP_AttrProp **ppAP, PP_RevisionAttr **pRevisions, bool bShowRevisions, UT_uint32 iRevisionId, bool &bHiddenRevision) const
bool getSpanAttrProp (PL_StruxDocHandle sdh, UT_uint32 offset, bool bLeftSide, const PP_AttrProp **ppAP, PP_RevisionAttr **pRevisions, bool bShowRevisions, UT_uint32 iRevisionId, bool &bHiddenRevision) const
const UT_UCSChargetPointer (PT_BufIndex bi) const
bool getBlockBuf (PL_StruxDocHandle sdh, UT_GrowBuf *pgb) const
bool getBounds (bool bEnd, PT_DocPosition &docPos) const
PTStruxType getStruxType (PL_StruxDocHandle sdh) const
PT_DocPosition getStruxPosition (PL_StruxDocHandle sdh) const
bool getStruxFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, PL_StruxFmtHandle *psfh) const
bool getStruxOfTypeFromPosition (PL_ListenerId listenerId, PT_DocPosition docPos, PTStruxType pts, PL_StruxFmtHandle *psfh) const
bool getStruxOfTypeFromPosition (PT_DocPosition, PTStruxType pts, PL_StruxDocHandle *sdh) const
 return the SDH of the last strux of the given type immediately prior to the given absolute document position.
pf_FraggetFragFromPosition (PT_DocPosition docPos) const
bool getNextStruxOfType (PL_StruxDocHandle sdh, PTStruxType pts, PL_StruxDocHandle *nextsdh)
 Return the sdh of type pts immediately after sdh.
bool getPrevStruxOfType (PL_StruxDocHandle sdh, PTStruxType pts, PL_StruxDocHandle *prevsdh)
 Return the sdh of type pts immediately prior to sdh.
bool getNextStrux (PL_StruxDocHandle sdh, PL_StruxDocHandle *nextSDH)
 get the next strux after the strux given.
virtual bool createDataItem (const char *szName, bool bBase64, const UT_ByteBuf *pByteBuf, const std::string &mime_type, void **ppHandle)
virtual bool replaceDataItem (const char *szName, const UT_ByteBuf *pByteBuf)
virtual bool getDataItemDataByName (const char *szName, const UT_ByteBuf **ppByteBuf, std::string *pMimeType, void **ppHandle) const
bool setDataItemToken (void *pHandle, void *pToken)
bool getDataItemData (void *pHandle, const char **pszName, const UT_ByteBuf **ppByteBuf, const void **ppToken) const
bool getDataItemFileExtension (const char *szDataID, std::string &sExt, bool bDot=true) const
bool enumDataItems (UT_uint32 k, void **ppHandle, const char **pszName, const UT_ByteBuf **ppByteBuf, std::string *pMimeType) const
PL_StruxDocHandle findHdrFtrStrux (const gchar *pszHdtFtr, const gchar *pszHdrFtrID)
bool verifySectionID (const gchar *pszId)
PL_StruxDocHandle getLastSectionSDH (void)
PL_StruxDocHandle getLastStruxOfType (PTStruxType pts)
bool changeStruxAttsNoUpdate (PL_StruxDocHandle sdh, const char *attr, const char *attvalue)
bool deleteStruxNoUpdate (PL_StruxDocHandle sdh)
bool deleteFragNoUpdate (pf_Frag *pf)
bool insertStruxNoUpdateBefore (PL_StruxDocHandle sdh, PTStruxType pts, const gchar **attributes)
bool isStruxBeforeThis (PL_StruxDocHandle sdh, PTStruxType pts)
PT_AttrPropIndex getAPIFromSDH (PL_StruxDocHandle sdh)
bool getAttributeFromSDH (PL_StruxDocHandle sdh, bool bShowRevisions, UT_uint32 iRevisionLevel, const char *szAttribute, const char **pszValue)
bool getPropertyFromSDH (PL_StruxDocHandle sdh, bool bShowRevisions, UT_uint32 iRevisionLevel, const char *szProperty, const char **pszValue)
void getAllUsedStyles (UT_GenericVector< PD_Style * > *pVecStyles)
PL_StruxFmtHandle getNthFmtHandle (PL_StruxDocHandle sdh, UT_uint32 n)
bool getStyle (const char *szName, PD_Style **ppStyle) const
PD_StylegetStyleFromSDH (PL_StruxDocHandle sdh)
PL_StruxDocHandle getPrevNumberedHeadingStyle (PL_StruxDocHandle 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 addStyleProperty (const gchar *szStyleName, const gchar *szPropertyName, const gchar *szPropertyValue)
bool addStyleProperties (const gchar *szStyleName, const gchar **pProperties)
bool setAllStyleAttributes (const gchar *szStyleName, const gchar **pAttribs)
bool addStyleAttributes (const gchar *szStyleName, const gchar **pAttribs)
PL_StruxDocHandle findPreviousStyleStrux (const gchar *szStyle, PT_DocPosition pos)
PL_StruxDocHandle findForwardStyleStrux (const gchar *szStyle, PT_DocPosition pos)
bool updateDocForStyleChange (const gchar *szStyleName, bool isParaStyle)
void updateAllLayoutsInDoc (PL_StruxDocHandle sdh)
void clearIfAtFmtMark (PT_DocPosition dpos)
virtual UT_uint32 getLastSavedAsType () const
UT_uint32 getLastOpenedType () const
bool updateFields (void)
bool getField (PL_StruxDocHandle sdh, UT_uint32 offset, fd_Field *&pField)
po_BookmarkgetBookmark (PL_StruxDocHandle 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 (PL_StruxDocHandle sdh, PT_DocPosition posOff, PL_StruxDocHandle &sdhEmbedded)
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)
PL_StruxDocHandle getEndTableStruxFromTableSDH (PL_StruxDocHandle tableSDH)
PL_StruxDocHandle getEndCellStruxFromCellSDH (PL_StruxDocHandle cellSDH)
PL_StruxDocHandle getEndTableStruxFromTablePos (PT_DocPosition posTable)
bool getRowsColsFromTableSDH (PL_StruxDocHandle tableSDH, bool bShowRevisions, UT_uint32 iRevisionLevel, UT_sint32 *numRows, UT_sint32 *numCols)
PL_StruxDocHandle getCellSDHFromRowCol (PL_StruxDocHandle tableSDH, bool bShowRevisions, UT_uint32 iRevisionLevel, UT_sint32 row, UT_sint32 col)
void miniDump (PL_StruxDocHandle sdh, UT_sint32 nstruxes)
bool isInsertHyperLinkValid (PT_DocPosition pos) const
fl_AutoNumgetListByID (UT_uint32 id) const
fl_AutoNumgetNthList (UT_uint32 i) const
bool enumLists (UT_uint32 k, fl_AutoNum **pAutoNum)
UT_uint32 getListsCount (void) const
void addList (fl_AutoNum *pAutoNum)
bool appendList (const gchar **attributes)
bool fixListHierarchy (void)
void removeList (fl_AutoNum *pAutoNum, PL_StruxDocHandle sdh)
void listUpdate (PL_StruxDocHandle sdh)
void StopList (PL_StruxDocHandle 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 gchar **attributes)
const fp_PageSizegetPageSize (void) const
bool isBookmarkUnique (const gchar *pName) const
bool isBookmarkRelativeLink (const gchar *pName) const
UT_sint32 getBookmarkCount () const
const gchar * 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 (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
bool areStylesLocked () const
void lockStyles (bool b)
virtual void setMetaDataProp (const UT_String &key, const UT_UTF8String &value)
virtual bool getMetaDataProp (const UT_String &key, UT_UTF8String &outProp) const
virtual void setAnnotationProp (const UT_String &key, const UT_UTF8String &value)
virtual bool getAnnotationProp (const UT_String &key, UT_UTF8String &outProp) const
UT_GenericStringMap
< UT_UTF8String * > & 
getMetaData ()
const PP_AttrPropgetAttrProp () const
PT_AttrPropIndex getAttrPropIndex () const
bool setAttrProp (const gchar **ppAttr)
bool setAttributes (const gchar **ppAttr)
bool setProperties (const gchar **ppProps)
void setDontImmediatelyLayout (bool b)
bool isDontImmediateLayout (void) const
UT_UTF8String getMailMergeField (const UT_String &key) const
bool mailMergeFieldExists (const UT_String &key) const
void setMailMergeField (const UT_String &key, const UT_UTF8String &value)
void clearMailMergeMap ()
void setMailMergeLink (const char *file)
const UT_UTF8StringgetMailMergeLink () const
const UT_GenericStringMap
< UT_UTF8String * > & 
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 ()
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)
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)

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 Member Functions

bool addAuthorAttributeIfBlank (const gchar **szAttsIn, const gchar **&szAttsOut, UT_String &storage)
bool addAuthorAttributeIfBlank (PP_AttrProp *&p_AttrProp)
bool _buildAuthorProps (pp_Author *pAuthor, const gchar **&szProps)
bool _exportInitVisDirection (PT_DocPosition pos)
bool _exportFindVisDirectionRunAtPos (PT_DocPosition pos)

Private Attributes

bool m_ballowListUpdates
pt_PieceTablem_pPieceTable
UT_GenericVector< PL_Listener * > m_vecListeners
UT_GenericVector< fl_AutoNum * > m_vecLists
bool m_bHasListStopped
UT_GenericStringMap< struct
_dataItemPair * > 
m_hashDataItems
IEFileType m_lastOpenedType
IEFileType m_lastSavedAsType
bool m_bDoingPaste
bool m_bAllowInsertPointChange
bool m_bRedrawHappenning
bool m_bLoading
UT_Vector m_vBookmarkNames
bool m_bLockedStyles
UT_GenericStringMap
< UT_UTF8String * > 
m_metaDataMap
PT_AttrPropIndex m_indexAP
bool m_bDontImmediatelyLayout
UT_GenericStringMap
< UT_UTF8String * > 
m_mailMergeMap
UT_UCS4Char m_iLastDirMarker
UT_UTF8String 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


Detailed Description

PD_Document is the representation for a document.

Constructor & Destructor Documentation

PD_Document::PD_Document (  ) 

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


Member Function Documentation

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

Implements AD_Document.

References ADDOCUMENT_ABIWORD.

UT_Error PD_Document::readFromFile ( const char *  szFilename,
int  ieft,
const char *  impProps = NULL 
) [virtual]

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().

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

References _importFile().

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::importStyles ( const char *  szFilename,
int  ieft,
bool  bDocProps = false 
) [virtual]

UT_Error PD_Document::newDocument ( void   )  [virtual]

UT_Error PD_Document::saveAs ( GsfOutput *  output,
int  ieft,
bool  cpy = false,
const char *  expProps = NULL 
)

UT_Error PD_Document::createRawDocument ( void   ) 

void PD_Document::finishRawCreation ( void   ) 

bool PD_Document::isDirty ( void   )  const [virtual]

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(), and Defun1().

bool PD_Document::isConnected ( void   ) 

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

Implements AD_Document.

References pt_PieceTable::canDo(), and m_pPieceTable.

Referenced by FV_View::canDo().

UT_uint32 PD_Document::undoCount ( bool  bUndo  )  const [virtual]

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

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

Implements AD_Document.

References m_pPieceTable, and pt_PieceTable::redoCmd().

Referenced by FV_View::cmdRedo().

bool PD_Document::isDoingTheDo ( void   )  const

void PD_Document::removeCaret ( const std::string &  sCaretID  ) 

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 
)

ImagePage * PD_Document::getNthImagePage ( UT_sint32  iImagePage  ) 

TextboxPage * PD_Document::getNthTextboxPage ( UT_sint32  iTextboxPage  ) 

void PD_Document::clearAllPendingObjects ( void   ) 

void PD_Document::setShowAuthors ( bool  bAuthors  ) 

bool PD_Document::isShowAuthors ( void   )  const [inline]

bool PD_Document::isExportAuthorAtts ( void   )  const

void PD_Document::setExportAuthorAtts ( bool  bExport  ) 

References m_bExportAuthorAtts.

UT_GenericVector<pp_Author*>& PD_Document::getAuthors (  )  [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().

void PD_Document::setMyAuthorInt ( UT_sint32  iAuthor  ) 

UT_sint32 PD_Document::getLastAuthorInt ( void   )  const

Returns the most recently received author int

References m_iLastAuthorInt.

Referenced by FV_View::updateCarets().

UT_sint32 PD_Document::getNumAuthors ( void   )  const

pp_Author * PD_Document::getNthAuthor ( UT_sint32  i  )  const

pp_Author * PD_Document::getAuthorByInt ( UT_sint32  i  )  const

pp_Author * PD_Document::addAuthor ( UT_sint32  iAuthor  ) 

bool PD_Document::sendAddAuthorCR ( pp_Author pAuthor  ) 

bool PD_Document::sendChangeAuthorCR ( pp_Author pAuthor  ) 

UT_sint32 PD_Document::findFirstFreeAuthorInt ( void   )  const

bool PD_Document::addAuthorAttributeIfBlank ( const gchar **  szAttsIn,
const gchar **&  szAttsOut,
UT_String storage 
) [private]

Add the current documents UUID as the author to the attribute list if the author attribute is not present. The caller must delete [] the szAttsOut after use.

Parameters:
storage an UT_String storage for until the properties are copied. Returns true if author attribute is present.

References addAuthor(), UT_String::c_str(), findFirstFreeAuthorInt(), gchar, getMyAuthorInt(), m_iLastAuthorInt, PT_AUTHOR_NAME, sendAddAuthorCR(), setMyAuthorInt(), UT_String_sprintf(), and xxx_UT_DEBUGMSG.

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(), UT_String::c_str(), findFirstFreeAuthorInt(), gchar, PP_AttrProp::getAttribute(), getMyAuthorInt(), m_iLastAuthorInt, PT_AUTHOR_NAME, sendAddAuthorCR(), PP_AttrProp::setAttribute(), setMyAuthorInt(), UT_String_sprintf(), and xxx_UT_DEBUGMSG.

bool PD_Document::_buildAuthorProps ( pp_Author pAuthor,
const gchar **&  szProps 
) [private]

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(), 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(), FV_View::changeListStyle(), FV_View::cmdAutoFitTable(), FV_View::cmdAutoSizeCols(), FV_View::cmdAutoSizeRows(), 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(), 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().

void PD_Document::endUserAtomicGlob ( void   ) 

References pt_PieceTable::endUserAtomicGlob(), and m_pPieceTable.

Referenced by FV_View::_charInsert(), FV_View::_deleteHyperlink(), FV_View::_deleteSelection(), 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(), FV_View::changeListStyle(), FV_View::cmdAutoFitTable(), FV_View::cmdAutoSizeCols(), FV_View::cmdAutoSizeRows(), 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(), 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().

void PD_Document::setMarginChangeOnly ( bool  b  ) 

bool PD_Document::isMarginChangeOnly ( void   )  const

bool PD_Document::changeObjectFormatNoUpdate ( PTChangeFmt  ptc,
PL_ObjectHandle  odh,
const gchar **  attributes,
const gchar **  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().

PT_AttrPropIndex PD_Document::getAPIFromSOH ( PL_ObjectHandle  odh  ) 

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

bool PD_Document::insertObject ( PT_DocPosition  dpos,
PTObjectType  pto,
const gchar **  attributes,
const gchar **  properties,
fd_Field **  pField 
)

bool PD_Document::insertSpan ( PT_DocPosition  dpos,
const UT_UCSChar p,
UT_uint32  length,
PP_AttrProp p_AttrProp = NULL 
)

bool PD_Document::deleteSpan ( PT_DocPosition  dpos1,
PT_DocPosition  dpos2,
PP_AttrProp p_AttrProp_Before,
UT_uint32 iRealDeleteCount,
bool  bDeleteTableStruxes = false 
)

bool PD_Document::deleteFmtMark ( PT_DocPosition  dpos  ) 

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

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

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(), m_pPieceTable, and pf_Frag::PFT_Strux.

Referenced by ABI_Collab_Import::_import().

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]

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

Implements AD_Document.

References pt_PieceTable::createAndSendDocPropCR(), and m_pPieceTable.

Referenced by sendAddAuthorCR(), sendChangeAuthorCR(), setMetaDataProp(), and setPageSizeFromFile().

bool PD_Document::changeDocPropeties ( const gchar **  pAtts,
const gchar **  pProps 
)

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

void PD_Document::deleteHdrFtrStrux ( PL_StruxDocHandle  sdh  ) 

This method deletes the HdrFtr strux pointed to by sdh

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

Referenced by FV_View::_removeThisHdrFtr().

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

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

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

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

bool PD_Document::changeStruxFmtNoUndo ( PTChangeFmt  ptc,
PL_StruxDocHandle  sdh,
const gchar **  attributes,
const gchar **  properties 
)

bool PD_Document::changeStruxForLists ( PL_StruxDocHandle  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::insertFmtMark ( PTChangeFmt  ptc,
PT_DocPosition  dpos,
PP_AttrProp p_AttrProp 
)

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

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

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

References pt_PieceTable::appendStrux(), checkForSuspect(), XAP_App::getApp(), XAP_App::getLastFocussedFrame(), m_pPieceTable, XAP_Frame::nullUpdate(), PTX_EndCell, PTX_Section, 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_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::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(), 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 gchar **  attributes 
)

bool PD_Document::appendLastStruxFmt ( PTStruxType  pts,
const gchar **  attributes,
const gchar **  props,
bool  bSkipEmbededSections 
)

appends given fmt to the last strux in document

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

bool PD_Document::appendLastStruxFmt ( PTStruxType  pts,
const gchar **  attrs,
const gchar *  props,
bool  bSkipEmbededSections 
)

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

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

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

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

bool PD_Document::appendFmtMark ( void   ) 

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

bool PD_Document::changeStruxFormatNoUpdate ( PTChangeFmt  ptc,
PL_StruxDocHandle  sdh,
const gchar **  attributes 
)

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

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

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

bool PD_Document::insertFmtMarkBeforeFrag ( pf_Frag pF  ) 

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

pf_Frag * PD_Document::findFragOfType ( pf_Frag::PFType  iType,
UT_sint32  iSubtype = -1,
const pf_Frag pfStart = NULL 
)

pf_Frag * PD_Document::getLastFrag (  )  const

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(), m_vecSuspectFrags, pf_Frag::PFT_Strux, PTX_Block, PTX_EndAnnotation, PTX_EndEndnote, and PTX_EndFootnote.

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

bool PD_Document::repairDoc ( void   ) 

bool PD_Document::removeStyle ( const gchar *  pszName  ) 

bool PD_Document::tellListener ( PL_Listener pListener  ) 

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

bool PD_Document::addListener ( PL_Listener pListener,
PL_ListenerId pListenerId 
)

bool PD_Document::removeListener ( PL_ListenerId  listenerId  ) 

bool PD_Document::signalListeners ( UT_uint32  iSignal  )  const

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

bool PD_Document::notifyListeners ( const pf_Frag_Strux pfs,
pf_Frag_Strux pfsNew,
const PX_ChangeRecord pcr 
) const

void PD_Document::deferNotifications ( void   ) 

void PD_Document::processDeferredNotifications ( void   ) 

UT_sint32 PD_Document::getAdjustmentForCR ( const PX_ChangeRecord pcr  )  const

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(), fl_BlockLayout::_doInsertFieldRun(), s_WML_Listener::_emitTOC(), s_HTML_Listener::_emitTOC(), s_RTF_ListenerWriteDoc::_fillCellProps(), s_RTF_ListenerWriteDoc::_fillTableProps(), s_RTF_ListenerWriteDoc::_getColumnWidthInches(), fp_MathRun::_getLayoutPropFromObject(), fp_EmbedRun::_getLayoutPropFromObject(), ODe_AbiDocListener::_getObjectKey(), s_HTML_Listener::_handleAnnotationMark(), s_XSL_FO_Listener::_handleBookmark(), s_WML_Listener::_handleBookmark(), s_HTML_Listener::_handleBookmark(), s_DocBook_Listener::_handleBookmark(), Text_Listener::_handleDirMarker(), s_DocBook_Listener::_handleDocument(), s_XSL_FO_Listener::_handleEmbedded(), s_WML_Listener::_handleEmbedded(), s_HTML_Listener::_handleEmbedded(), s_DocBook_Listener::_handleEmbedded(), s_XSL_FO_Listener::_handleField(), s_WML_Listener::_handleField(), s_HTML_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_HTML_Listener::_handleHyperlink(), s_DocBook_Listener::_handleHyperlink(), s_XSL_FO_Listener::_handleImage(), s_WML_Listener::_handleImage(), s_HTML_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_XSL_FO_Listener::_handleMath(), s_WML_Listener::_handleMath(), s_HTML_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(), PL_Psion_Listener::_insertImage(), ODe_AbiDocListener::_insertInlinedImage(), ODe_AbiDocListener::_insertMath(), fp_ImageRun::_lookupProperties(), FL_DocLayout::_lookupProperties(), ABI_Collab_Export::_mapPropsAtts(), ODe_AbiDocListener::_openAnnotation(), ODe_AbiDocListener::_openBlock(), s_XSL_FO_Listener::_openBlock(), WordPerfect_Listener::_openBlock(), Passepartout_Listener::_openBlock(), OO_Listener::_openBlock(), s_KWord_1_Listener::_openBlock(), ODe_AbiDocListener::_openBookmark(), ODe_AbiDocListener::_openCell(), s_HTML_Listener::_openCell(), ODe_AbiDocListener::_openEndnote(), ODe_AbiDocListener::_openField(), Passepartout_Listener::_openFont(), ODe_AbiDocListener::_openFootnote(), ODe_AbiDocListener::_openFrame(), s_RTF_ListenerWriteDoc::_openFrame(), ODe_AbiDocListener::_openHyperlink(), s_WML_Listener::_openParagraph(), PL_Psion_Listener::_openParagraph(), s_LaTeX_Listener::_openParagraph(), s_DocBook_Listener::_openParagraph(), s_HTML_Listener::_openPosImage(), s_HTML_Listener::_openRow(), ODe_AbiDocListener::_openSection(), s_WML_Listener::_openSection(), s_LaTeX_Listener::_openSection(), s_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(), s_HTML_Listener::_openSpan(), s_HRText_Listener::_openSpan(), s_DocBook_Listener::_openSpan(), ODe_AbiDocListener::_openTable(), s_HTML_Listener::_openTable(), s_RTF_ListenerWriteDoc::_openTag(), s_HTML_Listener::_openTag(), s_HRText_Listener::_openTag(), s_AbiWord_1_Listener::_openTag(), s_HTML_Listener::_openTextBox(), ODe_AbiDocListener::_openTOC(), s_LaTeX_Listener::_outputBabelPackage(), s_HTML_Listener::_outputBegin(), 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::_writeTOC(), IE_Exp_OpenXML_Listener::addDocumentStyles(), IE_Exp_OpenXML_Listener::addLists(), fl_SectionLayout::bl_doclistener_insertSection(), fl_DocListener::change(), Defun1(), Defun_EV_GetMenuItemState_Fn(), fl_DocSectionLayout::doclistener_changeStrux(), fl_BlockLayout::doclistener_insertSection(), ODe_Styles::fetchRegularStyleStyles(), AP_Dialog_FormatTOC::fillTOCPropsFromDoc(), FV_View::FV_View(), FV_View::getAllAttrProp(), fl_Layout::getAttrProp(), s_AbiWord_1_Listener::getObjectKey(), GR_MathManager::loadEmbedData(), GR_GOChartManager::loadEmbedData(), GR_MathManager::makeSnapShot(), PP_AttrProp::miniDump(), Passepartout_Listener::Passepartout_Listener(), ODe_AbiDocListener::populate(), IE_Imp_PasteListener::populate(), s_RTF_ListenerWriteDoc::populate(), IE_Exp_OpenXML_Listener::populate(), OO_Listener::populate(), s_LaTeX_Listener::populate(), s_AbiWord_1_Listener::populate(), TOC_Listener::populateStrux(), IE_Imp_PasteListener::populateStrux(), s_XSL_FO_Listener::populateStrux(), Text_Listener::populateStrux(), s_RTF_ListenerWriteDoc::populateStrux(), PL_Psion_Listener::populateStrux(), Passepartout_Listener::populateStrux(), IE_Exp_OpenXML_Listener::populateStrux(), s_LaTeX_Listener::populateStrux(), s_KWord_1_Listener::populateStrux(), s_HTML_HdrFtr_Listener::populateStrux(), s_HTML_Listener::populateStrux(), s_HRText_Listener::populateStrux(), fl_ShadowListener::populateStrux(), fl_DocListener::populateStrux(), PP_evalProperty(), s_doLangDlg(), ie_PartTable::setCellApi(), AP_Dialog_FormatFrame::setCurFrameProps(), ie_PartTable::setTableApi(), s_StyleTree::styleCheck(), Text_Listener::Text_Listener(), and OO_StylesWriter::writeStyles().

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

bool PD_Document::getAttrProp ( PT_AttrPropIndex  apIndx,
const PP_AttrProp **  ppAP,
PP_RevisionAttr **  pRevisions,
bool  bShowRevisions,
UT_uint32  iRevisionId,
bool &  bHiddenRevision 
) const

bool PD_Document::getSpanAttrProp ( PL_StruxDocHandle  sdh,
UT_uint32  offset,
bool  bLeftSide,
const PP_AttrProp **  ppAP,
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.

const UT_UCSChar * PD_Document::getPointer ( PT_BufIndex  bi  )  const

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

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

PTStruxType PD_Document::getStruxType ( PL_StruxDocHandle  sdh  )  const

PT_DocPosition PD_Document::getStruxPosition ( PL_StruxDocHandle  sdh  )  const

References pt_PieceTable::getStruxPosition(), and m_pPieceTable.

Referenced by FV_View::_deleteCellAt(), FV_View::_findGetNextBlockBuffer(), FV_View::_insertCellAfter(), 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::cmdAdvanceNextPrevCell(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteRow(), FV_View::cmdDeleteTable(), FV_View::cmdEditAnnotationWithDialog(), 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(), 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(), fl_CellLayout::isCellSelected(), fl_AutoNum::isContainedByList(), FV_View::isInTable(), FV_View::isPointLegal(), listUpdate(), FV_FrameEdit::mouseRelease(), FV_Selection::pasteRowOrCol(), s_HTML_HdrFtr_Listener::populateStrux(), s_DocBook_Listener::populateStrux(), 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().

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

bool PD_Document::getStruxOfTypeFromPosition ( PL_ListenerId  listenerId,
PT_DocPosition  docPos,
PTStruxType  pts,
PL_StruxFmtHandle 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::_insertCellAfter(), 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(), FV_View::isImageAtStrux(), fl_HdrFtrSectionLayout::isPointInHere(), FV_View::isPointLegal(), IE_Imp_RTF::mapID(), FV_Selection::pasteRowOrCol(), 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,
PL_StruxDocHandle 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.

pf_Frag * PD_Document::getFragFromPosition ( PT_DocPosition  docPos  )  const

bool PD_Document::getNextStruxOfType ( PL_StruxDocHandle  sdh,
PTStruxType  pts,
PL_StruxDocHandle nextsdh 
)

bool PD_Document::getPrevStruxOfType ( PL_StruxDocHandle  sdh,
PTStruxType  pts,
PL_StruxDocHandle prevsdh 
)

bool PD_Document::getNextStrux ( PL_StruxDocHandle  sdh,
PL_StruxDocHandle nextsdh 
)

bool PD_Document::createDataItem ( const char *  szName,
bool  bBase64,
const UT_ByteBuf pByteBuf,
const std::string &  mime_type,
void **  ppHandle 
) [virtual]

bool PD_Document::replaceDataItem ( const char *  szName,
const UT_ByteBuf 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 UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), UT_ByteBuf::ins(), m_hashDataItems, _dataItemPair::pBuf, UT_ByteBuf::truncate(), and UT_return_val_if_fail.

bool PD_Document::getDataItemDataByName ( const char *  szName,
const UT_ByteBuf **  ppByteBuf,
std::string *  pMimeType,
void **  ppHandle 
) const [virtual]

bool PD_Document::setDataItemToken ( void *  pHandle,
void *  pToken 
)

bool PD_Document::getDataItemData ( void *  pHandle,
const char **  pszName,
const UT_ByteBuf **  ppByteBuf,
const void **  ppToken 
) const

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(), s_HTML_Listener::_handleImage(), s_XSL_FO_Listener::_handlePositionedImage(), and OXML_Element_Image::serialize().

bool PD_Document::enumDataItems ( UT_uint32  k,
void **  ppHandle,
const char **  pszName,
const UT_ByteBuf **  ppByteBuf,
std::string *  pMimeType 
) const

PL_StruxDocHandle 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 PL_StruxDocHandle 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, pf_Frag::PFT_Strux, PT_ID_ATTRIBUTE_NAME, PT_TYPE_ATTRIBUTE_NAME, PTX_SectionHdrFtr, and UT_return_val_if_fail.

Referenced by IE_Exp_RTF::exportHdrFtr().

bool PD_Document::verifySectionID ( const gchar *  pszId  ) 

PL_StruxDocHandle PD_Document::getLastSectionSDH ( void   ) 

PL_StruxDocHandle PD_Document::getLastStruxOfType ( PTStruxType  pts  ) 

bool PD_Document::changeStruxAttsNoUpdate ( PL_StruxDocHandle  sdh,
const char *  attr,
const char *  attvalue 
)

bool PD_Document::deleteStruxNoUpdate ( PL_StruxDocHandle  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().

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().

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

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

References pf_Frag_Strux::getStruxType(), pt_PieceTable::insertStruxNoUpdateBefore(), m_pPieceTable, and PTX_Section.

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

bool PD_Document::isStruxBeforeThis ( PL_StruxDocHandle  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(), pf_Frag::getType(), and pf_Frag::PFT_Strux.

Referenced by IE_Imp_RTF::HandleCell().

PT_AttrPropIndex PD_Document::getAPIFromSDH ( PL_StruxDocHandle  sdh  ) 

Get API fromthe supplied StruxDocHandle

NB: this method does not take into account revisions settings; you either have to further process the AP at the index using the explodeRevisions() methods or you can retrieve specific props and attrs using getPropertyFromSDH() and getAttributeFromSDH().

References pf_Frag::getIndexAP().

Referenced by s_RTF_ListenerWriteDoc::_open_table(), IE_Exp_RTF::_write_rtf_header(), AP_Dialog_FormatTOC::fillTOCPropsFromDoc(), ie_Table::setCellRowCol(), and AP_Dialog_FormatFrame::setCurFrameProps().

bool PD_Document::getAttributeFromSDH ( PL_StruxDocHandle  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:
PL_StruxDocHandle 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::getPropertyFromSDH ( PL_StruxDocHandle  sdh,
bool  bShowRevisions,
UT_uint32  iRevisionLevel,
const char *  szProperty,
const char **  pszRetValue 
)

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:
PL_StruxDocHandle 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 FV_View::_changeCellParams(), IE_Exp_RTF::_output_ListRTF(), IE_Imp_RTF::closePastedTableIfNeeded(), FV_View::cmdDeleteCell(), FV_View::cmdDeleteCol(), FV_View::cmdDeleteRow(), FV_View::cmdInsertCol(), FV_View::cmdInsertRow(), FV_View::cmdSplitCells(), 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().

void PD_Document::getAllUsedStyles ( UT_GenericVector< PD_Style * > *  pVecStyles  ) 

PL_StruxFmtHandle PD_Document::getNthFmtHandle ( PL_StruxDocHandle  sdh,
UT_uint32  n 
)

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

PD_Style * PD_Document::getStyleFromSDH ( PL_StruxDocHandle  sdh  ) 

PL_StruxDocHandle PD_Document::getPrevNumberedHeadingStyle ( PL_StruxDocHandle  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(), pf_Frag::getType(), and pf_Frag::PFT_Strux.

Referenced by FV_View::setStyleAtPos().

size_t PD_Document::getStyleCount ( void   ) 

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

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

bool PD_Document::addStyleProperty ( const gchar *  szStyleName,
const gchar *  szPropertyName,
const gchar *  szPropertyValue 
)

bool PD_Document::addStyleProperties ( const gchar *  szStyleName,
const gchar **  pProperties 
)

bool PD_Document::setAllStyleAttributes ( const gchar *  szStyleName,
const gchar **  pAttribs 
)

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
pAttribs 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().

bool PD_Document::addStyleAttributes ( const gchar *  szStyleName,
const gchar **  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().

PL_StruxDocHandle 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, pf_Frag::PFT_Strux, PT_STYLE_ATTRIBUTE_NAME, PTX_Block, and UT_return_val_if_fail.

Referenced by FV_View::setStyleAtPos().

PL_StruxDocHandle 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, pf_Frag::PFT_Strux, PT_STYLE_ATTRIBUTE_NAME, PTX_Block, and UT_return_val_if_fail.

Referenced by FV_View::setStyleAtPos().

bool PD_Document::updateDocForStyleChange ( const gchar *  szStyle,
bool  isParaStyle 
)

void PD_Document::updateAllLayoutsInDoc ( PL_StruxDocHandle  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.

void PD_Document::clearIfAtFmtMark ( PT_DocPosition  dpos  ) 

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

Implements AD_Document.

UT_uint32 PD_Document::getLastOpenedType (  )  const [inline]

Referenced by AbiCommand::parseTokens().

bool PD_Document::updateFields ( void   ) 

bool PD_Document::getField ( PL_StruxDocHandle  sdh,
UT_uint32  offset,
fd_Field *&  pField 
)

po_Bookmark * PD_Document::getBookmark ( PL_StruxDocHandle  sdh,
UT_uint32  offset 
)

pf_Frag * PD_Document::findBookmark ( const char *  pName,
bool  bEnd = false,
pf_Frag pfStart = NULL 
)

bool PD_Document::hasMath ( void   ) 

void PD_Document::setDontChangeInsPoint ( void   ) 

void PD_Document::allowChangeInsPoint ( void   )