InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInCopyWorkFlowUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: cparrish
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 __IInCopyWorkFlowUtils__
25 #define __IInCopyWorkFlowUtils__
26 
27 #include "IStyleInfoMapData.h"
28 
29 #include "GraphicTypes.h"
30 #include "InCopyWorkflowID.h"
31 #include "UIDList.h"
32 
33 class UIDRef;
34 class WideString;
36 class ITextModel;
37 class IStyleNameTable;
38 class InCopyTextStyle;
40 class ITextTarget;
41 class IDocument;
42 class RangeData;
43 
51 {
52 public:
53  enum {kDefaultIID = IID_IIINCOPYWORKFLOWUTILS};
54 
60  virtual void SetFileTypeCreator(
61  const IDFile& file,
62  FileTypeInfoID type
63  ) = 0;
64 
71  virtual UID FindSwatchByName(
72  IDataBase* db,
73  const PMString swatchName
74  ) = 0;
75 
83  virtual UID ColorFromAttr(
84  const UIDRef& storyRef,
85  const WideString& elemName,
86  IInCopyXMLElementAttr* iAttrs
87  ) = 0;
88 
96  virtual UID CreateTintSwatch(
97  IDataBase* db,
98  const PMString tintName,
99  const PMReal tintPercent
100  ) = 0;
101 
112  virtual UID CreateGradient(
113  IDataBase* db,
114  const PMString& gradientName,
115  const GradientType gradientType,
116  K2Vector<UID> stopColor,
117  K2Vector<PMReal> stopPos,
118  K2Vector<PMReal> midPoint
119  ) = 0;
120 
127  virtual void MakeQName(
128  const WideString& localName,
129  WideString& qName
130  ) = 0;
131 
137  virtual ConstWString GrabQName(
138  const WideString& localName
139  ) = 0;
140 
146  ConstWString GrabQName(const UTF16TextChar* localName)
147  { return this->GrabQName(WideString(localName)); }
148 
156  ITextModel *textModel,
157  bool16 bForceCreate = kTrue
158  ) = 0;
159 
160 
169  IDocument *document,
170  int32 index
171  ) = 0;
172 
179  virtual int32 CopyInlines(
180  const UIDRef& oldStory,
181  const UIDRef& newStory
182  ) = 0;
183 
191  virtual TextIndex FindInlineInStory(
192  TextIndex startPos,
193  const UIDRef& tgtStory,
194  const int32 inLineUIDVal
195  ) = 0;
196 
205  virtual void SearchStoriesForInline(
206  IDataBase *db,
207  const int32 inLineUIDVal,
208  UIDRef& tgtStory,
209  TextIndex& startPos,
210  UIDList *omitStories
211  ) = 0;
212 
219  virtual void MapInlineToOriginal(
220  TextIndex index,
221  const UIDRef& newStory,
222  const UIDRef& originalInline
223  ) = 0;
224 
225 
231  virtual void GetInlineInCopyStories(
232  IDocument *doc,
233  UIDList& stories
234  ) = 0;
235 
242  virtual UIDList GetNonInCopyTextAndGraphicStories( const IDocument *fromDoc, bool16 doIncludeMasterItems = kTrue ) const = 0;
243 
251  virtual UIDList GetNonInCopyTextStories( const IDocument *fromDoc, bool16 doIncludeMasterItems = kTrue ) const = 0;
252 
261  virtual UIDList GetNonInCopyGraphicStories( const IDocument *fromDoc, bool16 doIncludeMasterItems = kTrue ) const = 0;
262 
274  virtual UIDList GetAllGraphics( const IDocument *fromDoc, bool16 all = kTrue, UID thisLayer = kInvalidUID, bool16 doIncludeMasterItems = kTrue ) const = 0;
275 
282  virtual UIDRef GetFirstGraphicStory( const UIDRef& fromDoc ) const = 0;
283 
290  virtual UIDRef GetStandaloneStory( const UIDRef& fromDoc ) const = 0;
291 
296  virtual bool16 IsImporting() = 0;
297 
303  virtual void SetImporting(bool16 importing) = 0;
304 
311  virtual bool16 GetElementName(ClassID cls, WideString *elementName) = 0;
312 
318  virtual UIDRef GetContainingInCopyStory( const UIDRef& linkedItemRef ) const = 0;
319 
326  virtual UIDRef GetOutermostParentStory(const UIDRef& target, const RangeData& range) const = 0;
327 
333  virtual bool16 IsAFormObject(const UIDRef& itemRef) const = 0;
334 };
335 
336 #endif // __IInCopyWorkFlowUtils__