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

Side by Side Diff: fpdfsdk/include/fsdk_annothandler.h

Issue 1297723002: CFX_MapByteStringToPtr considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Const auto& Created 5 years, 4 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
« no previous file with comments | « core/src/fxge/ge/fx_ge_text.cpp ('k') | fpdfsdk/include/javascript/global.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
9 9
10 #include <map>
11
10 #include "../../core/include/fxcrt/fx_basic.h" 12 #include "../../core/include/fxcrt/fx_basic.h"
11 13
12 class CFFL_IFormFiller; 14 class CFFL_IFormFiller;
13 class CFX_RenderDevice; 15 class CFX_RenderDevice;
14 class CPDFDoc_Environment; 16 class CPDFDoc_Environment;
15 class CPDFSDK_Annot; 17 class CPDFSDK_Annot;
16 class CPDFSDK_PageView; 18 class CPDFSDK_PageView;
17 class CPDF_Annot; 19 class CPDF_Annot;
18 class CPDF_Matrix; 20 class CPDF_Matrix;
19 class CPDF_Point; 21 class CPDF_Point;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, 292 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView,
291 CPDFSDK_Annot* pAnnot, 293 CPDFSDK_Annot* pAnnot,
292 const CPDF_Point& point); 294 const CPDF_Point& point);
293 295
294 private: 296 private:
295 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; 297 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const;
296 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); 298 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext);
297 299
298 private: 300 private:
299 CBA_AnnotHandlerArray m_Handlers; 301 CBA_AnnotHandlerArray m_Handlers;
300 CFX_MapByteStringToPtr m_mapType2Handler; 302 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler;
301 CPDFDoc_Environment* m_pApp; 303 CPDFDoc_Environment* m_pApp;
302 }; 304 };
303 305
304 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); 306 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2);
305 307
306 class CPDFSDK_AnnotIterator { 308 class CPDFSDK_AnnotIterator {
307 public: 309 public:
308 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, 310 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView,
309 FX_BOOL bReverse, 311 FX_BOOL bReverse,
310 FX_BOOL bIgnoreTopmost = FALSE, 312 FX_BOOL bIgnoreTopmost = FALSE,
(...skipping 18 matching lines...) Expand all
329 CPDFSDK_Annot* NextAnnot(int& index); 331 CPDFSDK_Annot* NextAnnot(int& index);
330 CPDFSDK_Annot* PrevAnnot(int& index); 332 CPDFSDK_Annot* PrevAnnot(int& index);
331 333
332 CFX_PtrArray m_pIteratorAnnotList; 334 CFX_PtrArray m_pIteratorAnnotList;
333 FX_BOOL m_bReverse; 335 FX_BOOL m_bReverse;
334 FX_BOOL m_bIgnoreTopmost; 336 FX_BOOL m_bIgnoreTopmost;
335 FX_BOOL m_bCircle; 337 FX_BOOL m_bCircle;
336 }; 338 };
337 339
338 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 340 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_text.cpp ('k') | fpdfsdk/include/javascript/global.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698