|
| | SnpFindAndReplace (void) |
| |
| | ~SnpFindAndReplace (void) |
| |
| IFindChangeService::FindChangeResult | Do_FindText (const IFindChangeOptions::SearchMode searchMode, const PMString &findString, const IWalkerScopeFactoryUtils::WalkScopeType findScope, const bool16 entireWord=kFalse, const bool16 caseSensitive=kFalse, const bool16 distinguishKanaType=kFalse, const bool16 distinguishKanaWidths=kTrue) |
| |
| IFindChangeService::FindChangeResult | Do_ReplaceText (const IFindChangeOptions::SearchMode searchMode, const PMString &findString, const PMString &replaceString, const IWalkerScopeFactoryUtils::WalkScopeType findScope, const ClassID &replaceMode, const bool16 entireWord=kFalse, const bool16 caseSensitive=kFalse, const bool16 distinguishKanaType=kFalse, const bool16 distinguishKanaWidths=kTrue) |
| |
| IFindChangeService::FindChangeResult | Do_FindGlyph (const Text::GlyphID findGlyphID, const IWalkerScopeFactoryUtils::WalkScopeType findScope) |
| |
| IFindChangeService::FindChangeResult | Do_ReplaceGlyph (const Text::GlyphID findGlyphID, const Text::GlyphID replaceGlyphID, const IWalkerScopeFactoryUtils::WalkScopeType findScope, const ClassID &replaceMode) |
| |
| ErrorCode | ReportError (const IFindChangeService::FindChangeResult status) |
| |
- How to set up and perform find change text,
- How to set up and perform find change text use grep (Grep search),
- How to set up and perform find change glyph,
- How to set up and perform find change frame object.
This snippet shows you how to do the equivalent of a search/replace in the find/change dialog. With this code snippet, you can either:
- find text,
- replace text.
- find text with grep,
- replace text with grep.
- find glyph,
- replace glyph.
- find object,
- replace object.
One of the most important interface for find/change is IFindChangeOptions. It caches/stores options that are needed to perform search or replace.
InDesign support find/change text, grep, glyph and object. They are specified in SearchMode in IFindChangeOptions, as kTextSearch, kGrepSearch, kGlyphSearch and kObjectSearch respectively.
Find/change functionalilty can be achive in following two steps:
- Set up find/change options
- Perform find or change Although these two step are coupled together in our sample code, they can separated executed. For example, you can set find/change text string and find/change glyph IDs first, then set search mode to kTextSearch and search for text. After that, reset search mode to kGlyphSearch and search for glyphs.
While this code snippet processes a multitude of commands to perform each task, there are still some useful find/change related commands that are not used in this code snippet.
[Commands for find/change based on formats]
- See Also
- IK2ServiceRegistry
- IK2ServiceProvider
- IFindChangeOptions
- IFindChangeCmdData
- ITextWalker
- ITextWalkerScope
- IWalkerScopeFactoryUtils
- ITextWalkerSelectionUtils
- IStringData
- IIntData
- IBoolData
- kFindStringCmdBoss
- kReplaceStringCmdBoss
- kScopeCmdBoss
- kFindTextCmdBoss
- kTWReplaceTextCmdBoss
- kReplaceFindTextCmdBoss
- kReplaceAllTextCmdBoss
- kEntireWordCmdBoss
- kCaseSensitiveCmdBoss
- kKanaSensitiveCmdBoss
- kWidthSensitiveCmdBoss