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

Side by Side Diff: fpdfsdk/fsdk_baseform.cpp

Issue 2227883002: Use smart pointers for class owned pointers in xfa/fxfa (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_font.h » ('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_baseform.h" 7 #include "fpdfsdk/include/fsdk_baseform.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 CFX_WideString sName; 108 CFX_WideString sName;
109 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) { 109 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) {
110 sName = GetAnnotName(); 110 sName = GetAnnotName();
111 if (sName.IsEmpty()) 111 if (sName.IsEmpty())
112 sName = GetName(); 112 sName = GetName();
113 } else { 113 } else {
114 sName = GetName(); 114 sName = GetName();
115 } 115 }
116 116
117 if (!sName.IsEmpty()) 117 if (!sName.IsEmpty())
118 m_hMixXFAWidget = pDocView->GetWidgetByName(sName); 118 m_hMixXFAWidget = pDocView->GetWidgetByName(sName, nullptr);
119 } 119 }
120 } 120 }
121 return m_hMixXFAWidget; 121 return m_hMixXFAWidget;
122 } 122 }
123 123
124 return nullptr; 124 return nullptr;
125 } 125 }
126 126
127 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() { 127 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
128 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); 128 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument();
129 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); 129 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
130 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { 130 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) {
131 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) { 131 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) {
132 CFX_WideString sName = GetName(); 132 CFX_WideString sName = GetName();
133 if (!sName.IsEmpty()) 133 if (!sName.IsEmpty())
134 return pDocView->GetWidgetByName(sName); 134 return pDocView->GetWidgetByName(sName, nullptr);
135 } 135 }
136 } 136 }
137 137
138 return nullptr; 138 return nullptr;
139 } 139 }
140 140
141 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const { 141 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const {
142 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); 142 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument();
143 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); 143 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
144 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { 144 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) {
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 break; 2861 break;
2862 } 2862 }
2863 } 2863 }
2864 } 2864 }
2865 2865
2866 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { 2866 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) {
2867 CFX_FloatRect rcAnnot; 2867 CFX_FloatRect rcAnnot;
2868 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); 2868 pAnnot->GetPDFAnnot()->GetRect(rcAnnot);
2869 return rcAnnot; 2869 return rcAnnot;
2870 } 2870 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698