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

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

Powered by Google App Engine
This is Rietveld 408576698