InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpXMLSampleHelper.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
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 __SnpXMLSampleHelper_H_DEFINED__
25 #define __SnpXMLSampleHelper_H_DEFINED__
26 
27 #include "SnpXMLHelper.h"
28 
29 
36 
37 public:
38 
41 
43  virtual ~SnpXMLSampleHelper() {}
44 
53  UIDRef AcquireParaStyle(const UIDRef& documentUIDRef, const PMString& name);
54 
62  UIDRef AcquireCharStyle(const UIDRef& documentUIDRef, const PMString& name);
63 
72  UIDRef AcquireStyle(const UIDRef& documentUIDRef,
73  const PMString& name,
74  const PMIID& styleIID,
75  const ClassID& createCmdClassID);
76 
85  UIDRef CreateRectangleFrame(const UIDRef& documentUIDRef, const PMRect& rect,
86  int32 spreadNum, int32 pageNum);
87 
92  ErrorCode CreateSampleDTD(const IDFile& file);
93 
99  ErrorCode CreateSampleTaggedStory(const UIDRef& textModelUIDRef,
100  bool16 noOptionalContent = kFalse);
101 
107  ErrorCode CreateSampleXML(const IDFile& file, bool16 extendedElements = kFalse);
108 
117  UIDRef CreateStoryThroughFrame(const UIDRef& documentUIDRef, const PMRect& rect,
118  int32 spreadNum, int32 pageNum) ;
119 
130  ErrorCode CreateTableThroughFrame(const UIDRef& documentUIDRef,
131  const PMRect& rect,
132  UIDRef& outTableUIDRef,
133  UIDRef& outTextModelUIDRef,
134  int32 nRows=2, int32 nCols=2);
135 
141  void GetNextRect(PMRect& outRect);
142 
148  IDFile GetSampleFile(const PMString& extension);
149 
159  ErrorCode InsertStyledLine(const UIDRef& textModelUIDRef,
160  const PMString& lineText,
161  const TextIndex& insertionPoint,
162  const UIDRef& styleUIDRef,
163  TextIndex& outNextTextIndex);
164 
168  void ResetRectCounts();
169 
175  void SaveLineToStream(const PMString& str, IPMStream* stream);
176 
177 private:
178 
179  static int32 nRectsCreated;
180  static int32 nColsCreated;
181 };
182 
183 
184 
185 #endif // __SnpXMLSampleHelper_H_DEFINED__
186 
187 //End, SnpXMLSampleHelper.h