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

Side by Side Diff: fpdfsdk/fsdk_baseform.cpp

Issue 1891673003: Pass CFX_WideString to CXFA_FFDocView::GetWidgetByName. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 4 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 | « no previous file | xfa/fxfa/app/xfa_ffdocview.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_baseform.h" 7 #include "fpdfsdk/include/fsdk_baseform.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 CFX_WideString sName; 57 CFX_WideString sName;
58 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) { 58 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) {
59 sName = GetAnnotName(); 59 sName = GetAnnotName();
60 if (sName.IsEmpty()) 60 if (sName.IsEmpty())
61 sName = GetName(); 61 sName = GetName();
62 } else { 62 } else {
63 sName = GetName(); 63 sName = GetName();
64 } 64 }
65 65
66 if (!sName.IsEmpty()) 66 if (!sName.IsEmpty())
67 m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsStringC()); 67 m_hMixXFAWidget = pDocView->GetWidgetByName(sName);
68 } 68 }
69 } 69 }
70 return m_hMixXFAWidget; 70 return m_hMixXFAWidget;
71 } 71 }
72 72
73 return NULL; 73 return NULL;
74 } 74 }
75 75
76 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() { 76 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
77 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); 77 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument();
78 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); 78 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
79 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { 79 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) {
80 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) { 80 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) {
81 CFX_WideString sName = GetName(); 81 CFX_WideString sName = GetName();
82 if (!sName.IsEmpty()) 82 if (!sName.IsEmpty())
83 return pDocView->GetWidgetByName(sName.AsStringC()); 83 return pDocView->GetWidgetByName(sName);
84 } 84 }
85 } 85 }
86 86
87 return nullptr; 87 return nullptr;
88 } 88 }
89 89
90 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const { 90 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const {
91 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); 91 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument();
92 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); 92 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
93 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { 93 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) {
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2824 break; 2824 break;
2825 } 2825 }
2826 } 2826 }
2827 } 2827 }
2828 2828
2829 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { 2829 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) {
2830 CFX_FloatRect rcAnnot; 2830 CFX_FloatRect rcAnnot;
2831 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); 2831 pAnnot->GetPDFAnnot()->GetRect(rcAnnot);
2832 return rcAnnot; 2832 return rcAnnot;
2833 } 2833 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698