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

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: Separate reload & delete. 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
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 CPDFSDK_Annot* pAnnot); 310 CPDFSDK_Annot* pAnnot);
309 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, 311 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView,
310 CPDFSDK_Annot* pAnnot, 312 CPDFSDK_Annot* pAnnot,
311 const CPDF_Point& point); 313 const CPDF_Point& point);
312 314
313 private: 315 private:
314 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; 316 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const;
315 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); 317 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext);
316 318
317 private: 319 private:
318 CBA_AnnotHandlerArray m_Handlers; 320 CBA_AnnotHandlerArray m_Handlers;
Lei Zhang 2015/08/15 00:35:44 Can we just get rid of |m_Handlers| and give owner
Tom Sepez 2015/08/17 20:15:26 Follow-up.
319 CFX_MapByteStringToPtr m_mapType2Handler; 321 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler;
320 CPDFDoc_Environment* m_pApp; 322 CPDFDoc_Environment* m_pApp;
321 }; 323 };
322 324
323 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); 325 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2);
324 326
325 class CPDFSDK_AnnotIterator { 327 class CPDFSDK_AnnotIterator {
326 public: 328 public:
327 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, 329 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView,
328 FX_BOOL bReverse, 330 FX_BOOL bReverse,
329 FX_BOOL bIgnoreTopmost = FALSE, 331 FX_BOOL bIgnoreTopmost = FALSE,
(...skipping 18 matching lines...) Expand all
348 CPDFSDK_Annot* NextAnnot(int& index); 350 CPDFSDK_Annot* NextAnnot(int& index);
349 CPDFSDK_Annot* PrevAnnot(int& index); 351 CPDFSDK_Annot* PrevAnnot(int& index);
350 352
351 CFX_PtrArray m_pIteratorAnnotList; 353 CFX_PtrArray m_pIteratorAnnotList;
352 FX_BOOL m_bReverse; 354 FX_BOOL m_bReverse;
353 FX_BOOL m_bIgnoreTopmost; 355 FX_BOOL m_bIgnoreTopmost;
354 FX_BOOL m_bCircle; 356 FX_BOOL m_bCircle;
355 }; 357 };
356 358
357 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 359 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698