Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: core/fxcrt/include/fx_basic.h

Issue 1980293004: Pass objects instead of strings for undo/redo records. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FXCRT_INCLUDE_FX_BASIC_H_ 7 #ifndef CORE_FXCRT_INCLUDE_FX_BASIC_H_
8 #define CORE_FXCRT_INCLUDE_FX_BASIC_H_ 8 #define CORE_FXCRT_INCLUDE_FX_BASIC_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 CFX_WideTextBuf& operator<<(int i); 103 CFX_WideTextBuf& operator<<(int i);
104 CFX_WideTextBuf& operator<<(double f); 104 CFX_WideTextBuf& operator<<(double f);
105 CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz); 105 CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz);
106 CFX_WideTextBuf& operator<<(const CFX_WideStringC& str); 106 CFX_WideTextBuf& operator<<(const CFX_WideStringC& str);
107 CFX_WideTextBuf& operator<<(const CFX_WideString& str); 107 CFX_WideTextBuf& operator<<(const CFX_WideString& str);
108 CFX_WideTextBuf& operator<<(const CFX_WideTextBuf& buf); 108 CFX_WideTextBuf& operator<<(const CFX_WideTextBuf& buf);
109 }; 109 };
110 110
111 #ifdef PDF_ENABLE_XFA
112 class CFX_ArchiveSaver {
113 public:
114 CFX_ArchiveSaver() : m_pStream(NULL) {}
115
116 CFX_ArchiveSaver& operator<<(uint8_t i);
117
118 CFX_ArchiveSaver& operator<<(int i);
119
120 CFX_ArchiveSaver& operator<<(uint32_t i);
121
122 CFX_ArchiveSaver& operator<<(FX_FLOAT i);
123
124 CFX_ArchiveSaver& operator<<(double i);
125
126 CFX_ArchiveSaver& operator<<(const CFX_ByteStringC& bstr);
127
128 CFX_ArchiveSaver& operator<<(const FX_WCHAR* bstr);
129
130 CFX_ArchiveSaver& operator<<(const CFX_WideString& wstr);
131
132 void Write(const void* pData, FX_STRSIZE dwSize);
133
134 intptr_t GetLength() { return m_SavingBuf.GetSize(); }
135
136 const uint8_t* GetBuffer() { return m_SavingBuf.GetBuffer(); }
137
138 void SetStream(IFX_FileStream* pStream) { m_pStream = pStream; }
139
140 protected:
141 CFX_BinaryBuf m_SavingBuf;
142
143 IFX_FileStream* m_pStream;
144 };
145 class CFX_ArchiveLoader {
146 public:
147 CFX_ArchiveLoader(const uint8_t* pData, uint32_t dwSize);
148
149 CFX_ArchiveLoader& operator>>(uint8_t& i);
150
151 CFX_ArchiveLoader& operator>>(int& i);
152
153 CFX_ArchiveLoader& operator>>(uint32_t& i);
154
155 CFX_ArchiveLoader& operator>>(FX_FLOAT& i);
156
157 CFX_ArchiveLoader& operator>>(double& i);
158
159 CFX_ArchiveLoader& operator>>(CFX_ByteString& bstr);
160
161 CFX_ArchiveLoader& operator>>(CFX_WideString& wstr);
162
163 FX_BOOL IsEOF();
164
165 FX_BOOL Read(void* pBuf, uint32_t dwSize);
166
167 protected:
168 uint32_t m_LoadingPos;
169
170 const uint8_t* m_pLoadingBuf;
171
172 uint32_t m_LoadingSize;
173 };
174 #endif // PDF_ENABLE_XFA
175
176 class CFX_FileBufferArchive { 111 class CFX_FileBufferArchive {
177 public: 112 public:
178 CFX_FileBufferArchive(); 113 CFX_FileBufferArchive();
179 ~CFX_FileBufferArchive(); 114 ~CFX_FileBufferArchive();
180 115
181 void Clear(); 116 void Clear();
182 bool Flush(); 117 bool Flush();
183 int32_t AppendBlock(const void* pBuf, size_t size); 118 int32_t AppendBlock(const void* pBuf, size_t size);
184 int32_t AppendByte(uint8_t byte); 119 int32_t AppendByte(uint8_t byte);
185 int32_t AppendDWord(uint32_t i); 120 int32_t AppendDWord(uint32_t i);
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 FX_FLOAT c; 997 FX_FLOAT c;
1063 FX_FLOAT d; 998 FX_FLOAT d;
1064 FX_FLOAT e; 999 FX_FLOAT e;
1065 FX_FLOAT f; 1000 FX_FLOAT f;
1066 FX_FLOAT g; 1001 FX_FLOAT g;
1067 FX_FLOAT h; 1002 FX_FLOAT h;
1068 FX_FLOAT i; 1003 FX_FLOAT i;
1069 }; 1004 };
1070 1005
1071 #endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_ 1006 #endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698