InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDocumentLog Class Referenceabstract

#include <idocumentlog.h>

Inheritance diagram for IDocumentLog:
IPMUnknown

Classes

class  DocEvent
 

Public Types

enum  { kDefaultIID = IID_IDOCUMENTLOG }
 
enum  PlatformType {
  kMacintosh = 0, kWindows = 1, kMacintoshX64 = 2, kWindowsX64 = 3,
  kWasm = 4
}
 
enum  EventType {
  kFirstEventType = 0, kNoEvent = kFirstEventType, kRecoveredFile = 1, kRecoveredMiniSave = 2,
  kConverted = 3, kOpenACopy = 4, kOpenWithMissingPlugins = 5, kSaveAs = 6,
  kCreated = 7, kTransfered = 8, kConvertedFromQXP = 9, kConvertedFromPM = 10,
  kBookSync = 11, kBookRepage = 12, kConvertedFromINX = 13, kMostRecentSave = 14,
  kBookUpdateXRef = 15, kOpenAClone = 16, kUsedContentDropper = 17, kUsedLayoutAdjustment = 18,
  kExportedEPUB2 = 19, kExportedEPUB3 = 20, kExportedHTMLFXL = 22, kCreatedInTWS = 23,
  kCreatedInComp = 24, kLastEventType = 25
}
 
enum  LineBreaking { kPlatformLineBreaks, kCLineBreaks }
 

Public Member Functions

virtual void SetMaxEntries (int32 maximumNumberOfEvents)=0
 
virtual bool16 InfoIsAvailable () const =0
 
virtual void AddEvent (EventType what)=0
 
virtual int32 EventCount () const =0
 
virtual int32 EventCountOfType (EventType what) const =0
 
virtual bool16 GetEventInfo (int32 i, DocEvent &event) const =0
 
virtual bool16 GetEventInfoOfType (EventType what, int32 i, DocEvent &event) const =0
 
virtual bool16 HasHadEvent (EventType what) const =0
 
virtual void SerializeAsEventLog (IPMStream *s, IDocumentLog::LineBreaking lineBreaks) const =0
 
virtual const char * GetEventDescription (EventType what) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface records a little bit of information about major events that have happened to a document. The document log maintains information about a certain set of events. The document log has 2 sets of information about these events. 1) It knows whether the document has ever experienced a certain event. 2) It keeps a list of the most recent events, with additional information about each of them. This list is finite length to avoid growing the log too much. This means that you cannot rely on the document log still having information about any particular event. For example, you can't count on using the document log to determine what version of InDesign a document was created in, because the creation event may no longer be available.

It's sometimes useful to examine this information when a document is discovered that has some problems. If you open a document in InDesign or InCopy, you can view the document log by holding down cmd/cntrl and bringing up the 'About InDesign...' or 'About InCopy...' dialog. Click the 'Write Log File' button to get a text file with this log information written to it.

Member Enumeration Documentation

Enumerator
kFirstEventType 

kFirstEventType not a real event type

kNoEvent 

kNoEvent not a real event type

kRecoveredFile 

kRecoveredFile the file was recovered after a crash or power failure

kRecoveredMiniSave 

kRecoveredFile the minsave file for this document was recovered after a crash or power failure

kConverted 

kConverted the document was converted from one version to another

kOpenACopy 

kOpenACopy a copy of the document was opened

kOpenWithMissingPlugins 

kOpenWithMissingPlugins the document was opened with missing plugins

kSaveAs 

kSaveAs the document was saved to a new file

kCreated 

kCreated the document was created

kTransfered 

kTransfered seems to be obsolete. It's not used. Perhaps it was intended to be used when a document was opened on the opposite platform, but it isn't.

kConvertedFromQXP 

kConvertedFromQXP document was converted from a Quark XPress document

kConvertedFromPM 

kConvertedFromPM document was converted from a PageMaker document

kBookSync 

kBookSync document involved in a book synchronization

kBookRepage 

kBookSync document involved in a book re pagination

kConvertedFromINX 

kConvertedFromINX document was converted from InDesign Interchange format

kMostRecentSave 

kMostRecentSave This event preserves information about the most recent save of the document

kBookUpdateXRef 

kBookUpdateXRef document involved in updating cross-references for book

kOpenAClone 

kOpenAClone a clone of the document was opened

kUsedContentDropper 

kContentDropper user made at least one drop

kUsedLayoutAdjustment 

kUsedLayoutAdjustment user used LA

kExportedEPUB2 

kExportedEPUB2 user made at least one EPUB2 export

kExportedEPUB3 

kExportedEPUB3 user made at least one EPUB3 export

kExportedHTMLFXL 

DEPRECATED: kExportedSWF user made at least one SWF export kExportedHTMLFXL user made at least one HTML-Fixed-Layout export

kCreatedInTWS 

kCreatedInTWS the document was created in touch workspace

kCreatedInComp 

kCreatedInComp the document was created in Comp & sent to ID via IDML route

kLastEventType 

kLastEventType not a valid event type NOTE: Do not simply just add an even without checking the ReadWrite() method in DocumentLog.cpp to see if a converter is required.

Enumerator
kPlatformLineBreaks 

kPlatformLineBreaks platform dependent line endings - "\r" on mac, "\n" on windows

kCLineBreaks 

kCLineBreaks c-style line endings "\n"

Enumerator
kWindows 

32 bit on the apple Macintosh platform

kMacintoshX64 

32 bit on the Microsoft windows platform

kWindowsX64 

64 bit on the apple Macintosh platform - not used in CS4 or earlier

kWasm 

64 bit on the Microsoft windows platform - new in CS4 - not used in CS3 or earlier

Member Function Documentation

virtual void IDocumentLog::AddEvent (EventType what)
pure virtual

Add a new event to the log. May remove an old entry to make room for the new one.

Parameters
whattype of new event to record
virtual int32 IDocumentLog::EventCount () const
pure virtual

Return the number of events in the log.

Returns
count of available events
virtual int32 IDocumentLog::EventCountOfType (EventType what) const
pure virtual

Return the number of events in the log of a certain type

Parameters
whattype of event to count
Returns
count of available events of the requested type
virtual const char* IDocumentLog::GetEventDescription (EventType what) const
pure virtual

Return a human readable version of the event type

virtual bool16 IDocumentLog::GetEventInfo (int32 i,
DocEventevent 
) const
pure virtual

Return the n'th event

Parameters
iindex of the event
Returns
kFalse if the nth event was not found, else kTrue
virtual bool16 IDocumentLog::GetEventInfoOfType (EventType what,
int32 i,
DocEventevent 
) const
pure virtual

Return the n'th event of type what.

Parameters
whattype of event to return
iindex of the event
Returns
kFalse if the nth event of this type was not found, else kTrue
virtual bool16 IDocumentLog::HasHadEvent (EventType what) const
pure virtual

Return true if there have ever been any events of this type. There may be events of this type that were purged out of the log; if so, this will still return true.

Parameters
whattype of event to check for
Returns
kFalse if the requested event has never happened to this document. kTrue if it has.
virtual bool16 IDocumentLog::InfoIsAvailable () const
pure virtual

Returns true if the log has been initialized & written to disk

Returns
kTrue if the log has info
virtual void IDocumentLog::SerializeAsEventLog (IPMStreams,
IDocumentLog::LineBreaking lineBreaks 
) const
pure virtual

Return a human readable version of the log, written out into the stream.

Parameters
sthe stream to write to
lineBreaksthe style of linebreaks to put into the stream
virtual void IDocumentLog::SetMaxEntries (int32 maximumNumberOfEvents)
pure virtual

Set the maximum number of entries that the log will keep

Parameters
maximumNumberOfEventshow many MRU entries to keep