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

Side by Side Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1097843003: Remove release method from CBA_AnnotItetator. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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 | « fpdfsdk/include/fsdk_baseform.h ('k') | no next file » | 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 #include "../../third_party/base/nonstd_unique_ptr.h"
7 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
8 #include "../include/fsdk_mgr.h" 9 #include "../include/fsdk_mgr.h"
9 #include "../include/fsdk_baseannot.h" 10 #include "../include/fsdk_baseannot.h"
10 #include "../include/fsdk_baseform.h" 11 #include "../include/fsdk_baseform.h"
11 #include "../include/formfiller/FFL_FormFiller.h" 12 #include "../include/formfiller/FFL_FormFiller.h"
12 #include "../include/fsdk_actionhandler.h" 13 #include "../include/fsdk_actionhandler.h"
13 14
14 #include "../include/javascript/IJavaScript.h" 15 #include "../include/javascript/IJavaScript.h"
15 16
16 //------------------------------------------------------------------------------ ------ 17 //------------------------------------------------------------------------------ ------
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 return m_pDocument; 1721 return m_pDocument;
1721 } 1722 }
1722 1723
1723 FX_BOOL CPDFSDK_InterForm::HighlightWidgets() 1724 FX_BOOL CPDFSDK_InterForm::HighlightWidgets()
1724 { 1725 {
1725 return FALSE; 1726 return FALSE;
1726 } 1727 }
1727 1728
1728 CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL b Next) const 1729 CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL b Next) const
1729 { 1730 {
1730 » ASSERT(pWidget != NULL); 1731 nonstd::unique_ptr<CBA_AnnotIterator> pIterator(
1732 new CBA_AnnotIterator(pWidget->GetPageView(), "Widget", ""));
1731 1733
1732 » CBA_AnnotIterator* pIterator = new CBA_AnnotIterator(pWidget->GetPageVie w(), "Widget", ""); 1734 » if (bNext) {
Lei Zhang 2015/04/20 20:32:49 nit: Can we get rid of the tabs. It's hard to read
Tom Sepez 2015/04/20 20:36:54 Done.
1733 » ASSERT(pIterator != NULL); 1735 » » return (CPDFSDK_Widget*)pIterator->GetNextAnnot(pWidget);
1734 1736 }
1735 » CPDFSDK_Widget* pRet = NULL; 1737 return (CPDFSDK_Widget*)pIterator->GetPrevAnnot(pWidget);
1736
1737 » if (bNext)
1738 » » pRet = (CPDFSDK_Widget*)pIterator->GetNextAnnot(pWidget);
1739 » else
1740 » » pRet = (CPDFSDK_Widget*)pIterator->GetPrevAnnot(pWidget);
1741
1742 » pIterator->Release();
1743 »
1744 » return pRet;
1745
1746 } 1738 }
1747 1739
1748 CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl) const 1740 CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl) const
1749 { 1741 {
1750 if(!pControl || !m_pInterForm) return NULL; 1742 if(!pControl || !m_pInterForm) return NULL;
1751 1743
1752 CPDFSDK_Widget* pWidget = NULL; 1744 CPDFSDK_Widget* pWidget = NULL;
1753 m_Map.Lookup(pControl, pWidget); 1745 m_Map.Lookup(pControl, pWidget);
1754 1746
1755 if (pWidget) return pWidget; 1747 if (pWidget) return pWidget;
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 2996
3005 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); 2997 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
3006 ASSERT(pPDFAnnot != NULL); 2998 ASSERT(pPDFAnnot != NULL);
3007 2999
3008 CPDF_Rect rcAnnot; 3000 CPDF_Rect rcAnnot;
3009 pPDFAnnot->GetRect(rcAnnot); 3001 pPDFAnnot->GetRect(rcAnnot);
3010 3002
3011 return rcAnnot; 3003 return rcAnnot;
3012 } 3004 }
3013 3005
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_baseform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698