![]() | InDesign SDK 20.5 |
#include <redlineiterator.h>
Public Member Functions | |
| virtual | ~RedlineIterator () |
| virtual void | MoveToBeginning () |
| virtual bool16 | MoveToPosition (TextIndex t, int32 c=-1)=0 |
| virtual TextIndex | GetCurrentPosition (int32 *changePos=nil, int32 *numChanges=nil)=0 |
| virtual int32 | GetCurrentLength ()=0 |
| virtual bool16 | ProcessAccept (const RangeData *range=nil, bool16 doingAcceptAll=kFalse, bool16 restoreSelection=kFalse) |
| virtual bool16 | ProcessReject (const RangeData *range=nil, bool16 doingRejectAll=kFalse, bool16 restoreSelection=kFalse) |
| virtual bool16 | ProcessAcceptIncrement (const RangeData *range=nil, bool16 doingAcceptAll=kFalse, bool16 restoreSelection=kFalse) |
| virtual bool16 | ProcessRejectIncrement (const RangeData *range=nil, bool16 doingRejectAll=kFalse, bool16 restoreSelection=kFalse) |
| virtual bool16 | ProcessRejectDecrement (const RangeData *range=nil, bool16 doingRejectAll=kFalse, bool16 restoreSelection=kFalse) |
| virtual bool16 | Increment (bool16 skipUnchanged)=0 |
| virtual bool16 | Decrement (bool16 skipUnchanged)=0 |
| virtual const VOSRedlineChange * | GetCurrentChangeRecord (TextIndex *pPosition=nil, int32 *pLength=nil) |
| virtual const VOS_RedlineObject * | QueryCurrentObject () |
| virtual void | DescribeUser (PMString &user) |
| virtual void | DescribeType (PMString &type) |
| virtual void | DescribeTimeStamp (PMString &time) |
| virtual UIDRef | DescribeChangeContent (PMString &detail, int32 maxLength=32) |
This class provides a way to iterate thru tracked changes. Create a new iterator using IRedlineDataStrand::NewRedlineIterator(), the caller is responsible for destroying the iterator.
When text is deleted, a change record is placed on a vos redline object on the character that followed the deleted text and the text is copied to a story thread so that it can be retrieved and displayed in galley view. When text is inserted, a change record is placed on a vos redline object in place and it's length is the number of characters inserted.
If the character following text that is deleted is an insert change then we have a situation where the insert change is nested. In this case, it is possible to iterate thru changes and the current position would be the same even though the iterator incremented/ecremented. Calling the accessor methods will return the appropriate change record information given the state of an internal flag or the useUI flag if passed when the iterator was constructed (via newredlineiterator). Accepting a nested insert will not affect the delete change; however, rejecting a nested insert will also reject the delete change.
| virtual |
Destructor
| pure virtual |
Decrements to the previous change record, returns false if there are no previous records.
| skipUnchanged | IN whether or not to skip vos redline object without a change record |
| virtual |
Sets detail equal to the deleted text string of the current delete text change record (if any), constrained by the maxLength.
| detail | OUT current deleted text content string |
| maxLength | IN constrain detail param to this length |
| virtual |
Sets time equal to the time stamp of the current change record.
| time | OUT current change time stamp |
| virtual |
Sets type equal to the type of the current change record. Current values are "RL Insert" or "RL Delete"; to determine if the change is moved text versus added text check for type of "RL Insert" and use the GetIsMovedText() method for VOSRedlineChange objects.
| type | OUT current change type |
| virtual |
Sets user equal to the author of the current change record.
| user | OUT current user name |
| virtual |
Returns the current change record, nil if there is no current change record, and sets pPosition equal to GetCurrentPosition and pLength equal to GetCurrentLength. Note: the item pointed to by the returned value from is allocated with new, the caller is responsible for deallocating the memory.
| pPosition | OUT current change's text index |
| pLength | OUT current change's length |
| pure virtual |
Returns the length of the vos redline object. Note: for delete changes this is always 1, to get the length of the delete text use DescribeChangeContent() and examine the PMString.
| pure virtual |
Returns current text position of the iterator.
| changePos | OUT position of the change at this text index |
| numChanges | OUT number of changes at this text position |
| pure virtual |
Increments to the next change record, returns false if there are no records beyond the current record.
| skipUnchanged | IN whether or not to skip vos redline object without a change record |
| virtual |
Move iterator to beginning of the story, text position = 0.
| pure virtual |
Move iterator to specified text position at the first change record (default) or the change specified, returns false if text position is off the end of the story.
| t | IN the text index to move to |
| c | IN the change index to move to |
| virtual |
Accepts the current change record, returns kFalse if no change to accept or there was error processing accept command.
| range | IN the text range to accept, nil means accept current change only |
| doingAcceptAll | IN whether or not accepting all changes, passed to command |
| restoreSelection | IN whether or not selection should restore, passed to command |
| virtual |
Accepts the current change record and increments to the next change record, returns false if there were not records beyond the accepted change.
| range | IN the text range to accept, nil means accept current change only |
| doingAcceptAll | IN whether or not accepting all changes, passed to command |
| restoreSelection | IN whether or not selection should restore, passed to command |
| virtual |
Rejects the current change record, returns kFalse if no change to reject or there was error processing reject command.
| range | IN the text range to reject, nil means reject current change only |
| doingRejectAll | IN whether or not rejecting all changes, passed to command |
| restoreSelection | IN whether or not selection should restore, passed to command |
| virtual |
Rejects the current change record and decrements to the previous change record, returns false if there are no records before the rejected change.
| range | IN the text range to reject, nil means reject current change only |
| doingRejectAll | IN whether or not rejecting all changes, passed to command |
| restoreSelection | IN whether or not selection should restore, passed to command |
| virtual |
Rejects the current change record and increments to the next change record, returns false if there are no records beyond the rejected change.
| range | IN the text range to reject, nil means reject current change only |
| doingRejectAll | IN whether or not rejecting all changes, passed to command |
| restoreSelection | IN whether or not selection should restore, passed to command |
| virtual |
Returns the current vos redline object, nil if there is no current object.