InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXRefInfoData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Jianlan Song
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 
25 #include "IPMUnknown.h"
26 #include "HyperlinkID.h"
27 #include "IXRefFormat.h"
28 #include "IHyperlinkUtils.h"
29 
32 typedef struct StampInfo
33 {
34  StampInfo() : storyUID(kInvalidUID), version (0) {}
35  StampInfo(UID initStoryUID, uint32 initVersion) : storyUID(initStoryUID), version(initVersion) {}
36 
37  StampInfo& operator=(const StampInfo& s)
38  {
39  if (this != &s)
40  {
41  storyUID = s.storyUID;
42  version = s.version;
43  }
44  return *this;
45  }
46 
47  bool operator==(const StampInfo& s) const
48  {
49  return ((storyUID == s.storyUID) &&
50  (version == s.version));
51  }
52 
53  bool operator!=(const StampInfo& s) const
54  {
55  return !(*this == s);
56  }
57 
58 
59  UID storyUID;
60  uint32 version;
61 } StampInfo;
62 
70 class IXRefInfoData : public IPMUnknown
71 {
72 public:
73  enum { kDefaultIID = IID_IXREFINFODATA };
74 
78  virtual void SetIsXRef(bool16 isXRef) = 0;
82  virtual bool16 IsXRef() const = 0;
83 
87  virtual UID GetXRefFormat() const = 0;
91  virtual void SetXRefFormat(UID formatUID) = 0;
92 
97  virtual void SetSourceStamp(UID storyUID, uint32 version) = 0;
98  virtual void GetSourceStamp(UID& storyUID, uint32& version) const = 0;
99  virtual void GetSourceStamp(StampInfo& stamp) const = 0;
100 
105  virtual void SetDestinationStamp(UID storyUID, uint32 version) = 0;
106  virtual void GetDestinationStamp(UID& storyUID, uint32& version) const = 0;
107  virtual void GetDestinationStamp(StampInfo& stamp) const = 0;
108 
112  virtual void SetExternDocStamp(uint32 docStamp) = 0;
113  virtual uint32 GetExternDocStamp() const = 0;
114 
118  virtual void SetDoNotUpdate(bool16 doNotUpdate) = 0;
119 
123  virtual bool16 DoNotUpdate() const = 0;
124 
128  virtual void SetDestinationStatusChangeCount(uint32 destStatusChgCnt) = 0;
129 
133  virtual uint32 GetDestinationStatusChangeCount() const = 0;
134 
140  virtual bool16 IsOutOfDate() const = 0;
141 
148  virtual bool16 NeedStatusCheck() const = 0;
149 
154  virtual bool16 CheckXRefStatus(bool16& linkChanged) = 0;
155 
156  virtual PMString GetPageNumString() const = 0;
157 
158  virtual PMString GetChapterNumString() const = 0;
159 
169  virtual IHyperlinkUtils::XRefDestStatus GetXRefSourceContent(UIDRef destUIDRef, PMString& newContent, K2Vector<CharStyleRange>& charStyleRanges,
170  K2Vector<uint32>& pageNumLocations, K2Vector<uint32>& chapterNumLocations, std::map<TextIndex, WideString>* variableLocations,
171  std::map<TextIndex, TextIndex>* inlineLocations) = 0;
172 };
173