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

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 958423005: Handle overlapping links and widgets. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | core/src/fpdfdoc/doc_form.cpp » ('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 _FPDF_DOC_H_ 7 #ifndef _FPDF_DOC_H_
8 #define _FPDF_DOC_H_ 8 #define _FPDF_DOC_H_
9 #ifndef _FPDF_PARSER_ 9 #ifndef _FPDF_PARSER_
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 void SetFileName(FX_WSTR wsFileName, FX_BOOL bURL = F ALSE); 522 void SetFileName(FX_WSTR wsFileName, FX_BOOL bURL = F ALSE);
523 protected: 523 protected:
524 524
525 CPDF_Object *m_pObj; 525 CPDF_Object *m_pObj;
526 }; 526 };
527 class CPDF_LinkList : public CFX_Object 527 class CPDF_LinkList : public CFX_Object
528 { 528 {
529 public: 529 public:
530 530
531 CPDF_LinkList(CPDF_Document* pDoc) 531 CPDF_LinkList();
532 {
533 m_pDocument = pDoc;
534 }
535 532
536 ~CPDF_LinkList(); 533 ~CPDF_LinkList();
537 534
538 CPDF_Link GetLinkAtPoint(CPDF_Page* pPage, FX_FLOAT pdf_x, FX_FLOAT pdf_y); 535 CPDF_Link GetLinkAtPoint(CPDF_Page* pPage, FX_FLOAT pdf_x, FX_FLOAT pdf_y);
539 536
540 int CountLinks(CPDF_Page* pPage);
541
542 CPDF_Link GetLink(CPDF_Page* pPage, int index);
543
544 CPDF_Document* GetDocument() const
545 {
546 return m_pDocument;
547 }
548 protected: 537 protected:
549 538
550 CPDF_Document* m_pDocument;
551
552 CFX_MapPtrToPtr m_PageMap; 539 CFX_MapPtrToPtr m_PageMap;
553 540
554 CFX_PtrArray* GetPageLinks(CPDF_Page* pPage); 541 CFX_PtrArray* GetPageLinks(CPDF_Page* pPage);
542 static FX_BOOL IsLink(CPDF_Dictionary* pAnnot);
543 static FX_BOOL IsWidget(CPDF_Dictionary* pAnnot);
544 static CFX_FloatRect GetWidgetRect(CPDF_Dictionary* pWidget);
555 545
556 void LoadPageLinks(CPDF_Page* pPage, CFX_PtrA rray* pList); 546 void LoadPageLinks(CPDF_Page* pPage, CFX_PtrA rray* pList);
557 }; 547 };
558 class CPDF_Link : public CFX_Object 548 class CPDF_Link : public CFX_Object
559 { 549 {
560 public: 550 public:
561 551
562 CPDF_Link(CPDF_Dictionary* pDict = NULL) 552 CPDF_Link(CPDF_Dictionary* pDict = NULL)
563 { 553 {
564 m_pDict = pDict; 554 m_pDict = pDict;
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try); 1758 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try);
1769 1759
1770 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry); 1760 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry);
1771 1761
1772 CFX_WideString GetCaption(FX_BSTR csEntry); 1762 CFX_WideString GetCaption(FX_BSTR csEntry);
1773 1763
1774 CPDF_Stream* GetIcon(FX_BSTR csEntry); 1764 CPDF_Stream* GetIcon(FX_BSTR csEntry);
1775 friend class CPDF_FormControl; 1765 friend class CPDF_FormControl;
1776 }; 1766 };
1777 #endif 1767 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698