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

Side by Side Diff: fpdfsdk/fsdk_annothandler.cpp

Issue 1986503002: XFA_WIDGETSTATUS, LAYOUTSTATUS and WIDGETFILTER cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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_ffdocview.cpp » ('j') | xfa/fxfa/include/fxfa.h » ('J')
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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 delete pWidget; 775 delete pWidget;
776 } 776 }
777 777
778 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, 778 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
779 CPDFSDK_Annot* pAnnot) { 779 CPDFSDK_Annot* pAnnot) {
780 ASSERT(pAnnot); 780 ASSERT(pAnnot);
781 781
782 CFX_RectF rcBBox; 782 CFX_RectF rcBBox;
783 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); 783 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType();
784 if (eType == XFA_ELEMENT_Signature) 784 if (eType == XFA_ELEMENT_Signature)
785 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WIDGETSTATUS_Visible, TRUE); 785 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE);
786 else 786 else
787 pAnnot->GetXFAWidget()->GetBBox(rcBBox, 0); 787 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None);
788 788
789 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, 789 CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
790 rcBBox.top + rcBBox.height); 790 rcBBox.top + rcBBox.height);
791 rcWidget.left -= 1.0f; 791 rcWidget.left -= 1.0f;
792 rcWidget.right += 1.0f; 792 rcWidget.right += 1.0f;
793 rcWidget.bottom -= 1.0f; 793 rcWidget.bottom -= 1.0f;
794 rcWidget.top += 1.0f; 794 rcWidget.top += 1.0f;
795 795
796 return rcWidget; 796 return rcWidget;
797 } 797 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1093
1094 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 1094 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
1095 if (m_pos < m_iteratorAnnotList.size()) 1095 if (m_pos < m_iteratorAnnotList.size())
1096 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 1096 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
1097 return nullptr; 1097 return nullptr;
1098 } 1098 }
1099 1099
1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 1100 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
1101 return m_bReverse ? PrevAnnot() : NextAnnot(); 1101 return m_bReverse ? PrevAnnot() : NextAnnot();
1102 } 1102 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | xfa/fxfa/include/fxfa.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698