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

Side by Side Diff: fpdfsdk/fsdk_annothandler.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks Created 4 years, 6 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 | xfa/fxfa/app/xfa_ffdoc.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 #include "fpdfsdk/include/fsdk_annothandler.h" 7 #include "fpdfsdk/include/fsdk_annothandler.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 delete pWidget; 846 delete pWidget;
847 } 847 }
848 848
849 void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} 849 void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {}
850 850
851 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, 851 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
852 CPDFSDK_Annot* pAnnot) { 852 CPDFSDK_Annot* pAnnot) {
853 ASSERT(pAnnot); 853 ASSERT(pAnnot);
854 854
855 CFX_RectF rcBBox; 855 CFX_RectF rcBBox;
856 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); 856 XFA_Element eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType();
857 if (eType == XFA_ELEMENT_Signature) 857 if (eType == XFA_Element::Signature)
858 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE); 858 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE);
859 else 859 else
860 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None); 860 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None);
861 861
862 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, 862 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
863 rcBBox.top + rcBBox.height); 863 rcBBox.top + rcBBox.height);
864 rcWidget.left -= 1.0f; 864 rcWidget.left -= 1.0f;
865 rcWidget.right += 1.0f; 865 rcWidget.right += 1.0f;
866 rcWidget.bottom -= 1.0f; 866 rcWidget.bottom -= 1.0f;
867 rcWidget.top += 1.0f; 867 rcWidget.top += 1.0f;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 1170
1171 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 1171 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
1172 if (m_pos < m_iteratorAnnotList.size()) 1172 if (m_pos < m_iteratorAnnotList.size())
1173 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 1173 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
1174 return nullptr; 1174 return nullptr;
1175 } 1175 }
1176 1176
1177 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 1177 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
1178 return m_bReverse ? PrevAnnot() : NextAnnot(); 1178 return m_bReverse ? PrevAnnot() : NextAnnot();
1179 } 1179 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fxfa/app/xfa_ffdoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698