InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFindChangeService Class Referenceabstract
Inheritance diagram for IFindChangeService:
IPMUnknown

Public Types

enum  FindChangeResult {
  kFailure, kSuccess, kNotFound, kFoundCompleted,
  kReplaceAllCompleted
}
 

Public Member Functions

virtual FindChangeResult SearchText (TextIndex &start, TextIndex &end)=0
 
virtual FindChangeResult ReplaceText (TextIndex &start, TextIndex &end)=0
 
virtual FindChangeResult ReplaceAndSearchText (TextIndex &start, TextIndex &end)=0
 
virtual FindChangeResult ReplaceAllText (int32 *replaceCount)=0
 
virtual FindChangeResult SearchForFont (const UIDRef &doc, TextIndex &start, TextIndex &end, UID fontUID, const PMString &fontStyleName)=0
 
virtual FindChangeResult ReplaceFont (TextIndex &start, TextIndex &end, UID newFontUID, const PMString &newFontStyleName)=0
 
virtual FindChangeResult ReplaceAllFont (int32 *replaceCount, UID findFontUID, const PMString &findFontStyleName, UID newFontUID, const PMString &newFontStyleName)=0
 
virtual void Halt ()=0
 
virtual FindChangeResult SearchObject (UIDRef &foundObject, bool16 initializeWalker=kFalse)=0
 
virtual FindChangeResult ReplaceObject (bool16 initializeWalker=kFalse)=0
 
virtual FindChangeResult ReplaceAndSearchObject (UIDRef &nextMatch, bool16 initializeWalker=kFalse)=0
 
virtual FindChangeResult ReplaceAllObject (int32 *foundCount, int32 *fullyChangedCount, int32 *partiallyChangedCount, bool16 initializeWalker=kFalse)=0
 
virtual FindChangeResult ReplaceAllFont (const UIDRef &doc, int32 *replaceCount, UID findFontUID, const PMString &findFontStyleName, UID newFontUID, const PMString &newFontStyleName)=0
 
virtual
IFindChangeService::FindChangeResult 
SearchColor (PMString &selectedPropertyName, int32 &numberOfPropertiesFound, bool16 initializeWalker=kFalse)=0
 
virtual
IFindChangeService::FindChangeResult 
ReplaceColor (bool16 initializeWalker=kFalse)=0
 
virtual
IFindChangeService::FindChangeResult 
ReplaceAllColor (int32 *foundCount, int32 *fullyChangedCount, int32 *partiallyChangedCount, IUIDRefListData *uidRefListData, bool16 initializeWalker=kFalse)=0
 
virtual
IFindChangeService::FindChangeResult 
ReplaceAndSearchColor (PMString &selectedPropertyName, int32 &numberOfPropertiesFound, bool16 initializeWalker=kFalse)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual void IFindChangeService::Halt ()
pure virtual

Halt walker if walking

virtual IFindChangeService::FindChangeResult IFindChangeService::ReplaceAllColor (int32 * foundCount,
int32 * fullyChangedCount,
int32 * partiallyChangedCount,
IUIDRefListDatauidRefListData,
bool16 initializeWalker = kFalse 
)
pure virtual

Replaces all found object's color attributes with target attributes

Parameters
foundCountOUT gives number of objects found
fullyChangedCountOUT gives number of objects fully changed as per change criteria
partiallyChangedCountOUT gives number of objects partially changed as per change criteria
uidRefListDataOUT gives uidRef of linked assets which can't be changed
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult
virtual FindChangeResult IFindChangeService::ReplaceAllFont (int32 * replaceCount,
UID findFontUID,
const PMStringfindFontStyleName,
UID newFontUID,
const PMStringnewFontStyleName 
)
pure virtual

replace all fonts with new font

Parameters
replaceCountOUT total replacement count
findFontUIDfont family UID to find
findFontStyleNamefont style to find
newFontUIDnew font UID to replace found UID with
newFontStyleNamenew font style to replace found style with
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::ReplaceAllFont (const UIDRefdoc,
int32 * replaceCount,
UID findFontUID,
const PMStringfindFontStyleName,
UID newFontUID,
const PMStringnewFontStyleName 
)
pure virtual

replace all fonts with new font

Parameters
docdocument to to replace
replaceCountOUT total replacement count
findFontUIDfont family UID to find
findFontStyleNamefont style to find
newFontUIDnew font UID to replace found UID with
newFontStyleNamenew font style to replace found style with
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::ReplaceAllObject (int32 * foundCount,
int32 * fullyChangedCount,
int32 * partiallyChangedCount,
bool16 initializeWalker = kFalse 
)
pure virtual

Replaces all found object's attributes with target attributes

Parameters
foundCountOUT gives number of objects found
fullyChangedCountOUT gives number of objects fully changed as per change criteria
partiallyChangedCountOUT gives number of objects partially changed as per change criteria
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult
virtual FindChangeResult IFindChangeService::ReplaceAllText (int32 * replaceCount)
pure virtual

ReplaceAllText

Parameters
replaceCountOUT if replace all is successful, it returns kReplaceAllCompleted and the total replacement count in replaceCount field
Returns
FindChangeResult returns kFailure if error
virtual IFindChangeService::FindChangeResult IFindChangeService::ReplaceAndSearchColor (PMStringselectedPropertyName,
int32 & numberOfPropertiesFound,
bool16 initializeWalker = kFalse 
)
pure virtual

Replaces the found object's color attributes with the target attributes and searches next color attribute

Parameters
selectedPropertyNameOUT found attribute name.
numberOfPropertiesFoundOUT no of properties found.
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult
virtual FindChangeResult IFindChangeService::ReplaceAndSearchObject (UIDRefnextMatch,
bool16 initializeWalker = kFalse 
)
pure virtual

Replaces the found object's attributes with the target attributes and searches next object

Parameters
nextMatchOUT next matched object.
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult
virtual FindChangeResult IFindChangeService::ReplaceAndSearchText (TextIndex & start,
TextIndex & end 
)
pure virtual

if both replace and search are successful, it returns kSuccess and the corresponding text position in start and end if replace is successful but no more text item is found, it returns kFoundCompleted. Start and end equal kInvalidTextIndex if replace and search fail due to error conditions, it returns kFailure. Start and end equal kInvalidTextIndex.

Parameters
start
end
Returns
FindChangeResult
virtual IFindChangeService::FindChangeResult IFindChangeService::ReplaceColor (bool16 initializeWalker = kFalse)
pure virtual

Replaces the found object's color attributes with the target attributes

Parameters
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::ReplaceFont (TextIndex & start,
TextIndex & end,
UID newFontUID,
const PMStringnewFontStyleName 
)
pure virtual

if a text item is replaced successfully, it returns kSuccess and the corresponding text position in start and end if the replacement fails due to error conditions, it returns kFailure. Start and end equal kInvalidTextIndex.

Parameters
startOUT start position.
endOUT end position.
newFontUIDnew font UID to replace with
newFontStyleNamenew font style to replace with
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::ReplaceObject (bool16 initializeWalker = kFalse)
pure virtual

Replaces the found object's attributes with the target attributes

Parameters
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::ReplaceText (TextIndex & start,
TextIndex & end 
)
pure virtual

if a text item is replaced successfully, it returns kSuccess and the corresponding text position in start and end if the replacement fails due to error conditions, it returns kFailure. Start and end equal kInvalidTextIndex.

Parameters
start
end
Returns
FindChangeResult returns kFailure if error
virtual IFindChangeService::FindChangeResult IFindChangeService::SearchColor (PMStringselectedPropertyName,
int32 & numberOfPropertiesFound,
bool16 initializeWalker = kFalse 
)
pure virtual

Search for a color attribute

Parameters
selectedPropertyNameOUT found attribute name.
numberOfPropertiesFoundOUT no of properties found.
initializeWalkerIN kFalse if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::SearchForFont (const UIDRefdoc,
TextIndex & start,
TextIndex & end,
UID fontUID,
const PMStringfontStyleName 
)
pure virtual

if a font is found it returns kSuccess and the corresponding text position in start and end. if a text item is not found it returns kNotFound. Start and end equal kInvalidTextIndex if the search is completed and at least one item was found, it returns kFoundCompleted. Start and end equal kInvalidTextIndex. if the search fails due to error condition, it returns kFailure. Start and end equal kInvalidTextIndex.

Parameters
doc
start
end
fontUID
fontStyleName
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::SearchObject (UIDReffoundObject,
bool16 initializeWalker = kFalse 
)
pure virtual

search for an object

Parameters
foundObjectOUT found object.
initializeWalkerIN kTrue if you want to re-initialize the walker and kFalse if you want to use as is
Returns
FindChangeResult returns kFailure if error
virtual FindChangeResult IFindChangeService::SearchText (TextIndex & start,
TextIndex & end 
)
pure virtual

if a text item is found it returns kSuccess and the corresponding text position in start and end if a text item is not found it returns kNotFound. Start and end equal kInvalidTextIndex if the search is completed and at least one item was found, it returns kFoundCompleted. Start and end equal kInvalidTextIndex. if the search fails due to error condition, it returns kFailure. Start and end equal kInvalidTextIndex.

Parameters
startOUT found start position.
endOUT found end position.
Returns
FindChangeResult returns kFailure if error