InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFindChangeService.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Wai Cheuk
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IFindChangeService__
25 #define __IFindChangeService__
26 
27 #ifndef __IPMUnknown__
28 #include "IPMUnknown.h"
29 #endif
30 
31 #include "ITextWalker.h"
32 #include "WideString.h"
33 
34 class IUIDRefListData;
35 
40 {
41 public:
42  enum FindChangeResult { kFailure, kSuccess, kNotFound, kFoundCompleted, kReplaceAllCompleted };
43 
54  virtual FindChangeResult SearchText(TextIndex& start, TextIndex& end) = 0;
55 
64  virtual FindChangeResult ReplaceText(TextIndex& start, TextIndex& end) = 0;
65 
75  virtual FindChangeResult ReplaceAndSearchText(TextIndex& start, TextIndex& end) = 0;
76 
83  virtual FindChangeResult ReplaceAllText(int32* replaceCount) = 0;
84 
97  virtual FindChangeResult SearchForFont(const UIDRef& doc, TextIndex& start, TextIndex &end, UID fontUID, const PMString& fontStyleName) = 0;
98 
109  virtual FindChangeResult ReplaceFont(TextIndex& start, TextIndex &end, UID newFontUID, const PMString& newFontStyleName) = 0;
110 
121  virtual FindChangeResult ReplaceAllFont(int32* replaceCount, UID findFontUID, const PMString& findFontStyleName, UID newFontUID, const PMString& newFontStyleName) = 0;
122 
127  virtual void Halt() = 0;
128 
136  virtual FindChangeResult SearchObject(UIDRef& foundObject,bool16 initializeWalker = kFalse) = 0 ;
137 
144  virtual FindChangeResult ReplaceObject(bool16 initializeWalker = kFalse) = 0;
145 
153  virtual FindChangeResult ReplaceAndSearchObject(UIDRef& nextMatch,bool16 initializeWalker = kFalse) = 0;
154 
165  virtual FindChangeResult ReplaceAllObject(int32* foundCount,int32* fullyChangedCount,int32* partiallyChangedCount,bool16 initializeWalker = kFalse) = 0;
166 
178  virtual FindChangeResult ReplaceAllFont(const UIDRef& doc, int32* replaceCount, UID findFontUID, const PMString& findFontStyleName, UID newFontUID, const PMString& newFontStyleName) = 0;
179 
180 
189  virtual IFindChangeService::FindChangeResult SearchColor(PMString& selectedPropertyName, int32& numberOfPropertiesFound, bool16 initializeWalker = kFalse) = 0;
190 
197  virtual IFindChangeService::FindChangeResult ReplaceColor(bool16 initializeWalker = kFalse) = 0;
198 
209  virtual IFindChangeService::FindChangeResult ReplaceAllColor(int32* foundCount, int32* fullyChangedCount, int32* partiallyChangedCount, IUIDRefListData* uidRefListData, bool16 initializeWalker = kFalse) = 0;
210 
219  virtual IFindChangeService::FindChangeResult ReplaceAndSearchColor(PMString& selectedPropertyName, int32& numberOfPropertiesFound, bool16 initializeWalker = kFalse) = 0;
220 
221 };
222 
223 #endif