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

Side by Side Diff: core/fpdfdoc/doc_formfield.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 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 | core/fxcrt/extension.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 "core/fpdfapi/fpdf_parser/include/cfdf_document.h" 7 #include "core/fpdfapi/fpdf_parser/include/cfdf_document.h"
8 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 8 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 if (bNotify && m_pForm->m_pFormNotify) { 717 if (bNotify && m_pForm->m_pFormNotify) {
718 int iRet = 0; 718 int iRet = 0;
719 if (GetType() == ListBox) 719 if (GetType() == ListBox)
720 iRet = m_pForm->m_pFormNotify->BeforeSelectionChange(this, csOptLabel); 720 iRet = m_pForm->m_pFormNotify->BeforeSelectionChange(this, csOptLabel);
721 if (GetType() == ComboBox) 721 if (GetType() == ComboBox)
722 iRet = m_pForm->m_pFormNotify->BeforeValueChange(this, csOptLabel); 722 iRet = m_pForm->m_pFormNotify->BeforeValueChange(this, csOptLabel);
723 if (iRet < 0) 723 if (iRet < 0)
724 return -1; 724 return -1;
725 } 725 }
726 726
727 CFX_ByteString csStr = PDF_EncodeText(csOptLabel, csOptLabel.GetLength()); 727 CFX_ByteString csStr =
728 PDF_EncodeText(csOptLabel.c_str(), csOptLabel.GetLength());
728 CPDF_Object* pValue = FPDF_GetFieldAttr(m_pDict, "Opt"); 729 CPDF_Object* pValue = FPDF_GetFieldAttr(m_pDict, "Opt");
729 CPDF_Array* pOpt = ToArray(pValue); 730 CPDF_Array* pOpt = ToArray(pValue);
730 if (!pOpt) { 731 if (!pOpt) {
731 pOpt = new CPDF_Array; 732 pOpt = new CPDF_Array;
732 m_pDict->SetAt("Opt", pOpt); 733 m_pDict->SetAt("Opt", pOpt);
733 } 734 }
734 735
735 int iCount = (int)pOpt->GetCount(); 736 int iCount = (int)pOpt->GetCount();
736 if (index < 0 || index >= iCount) { 737 if (index < 0 || index >= iCount) {
737 pOpt->AddString(csStr); 738 pOpt->AddString(csStr);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR") 1069 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR")
1069 ->GetDictBy("Font") 1070 ->GetDictBy("Font")
1070 ->GetDictBy(font_name.AsStringC()); 1071 ->GetDictBy(font_name.AsStringC());
1071 1072
1072 if (!pFontDict) { 1073 if (!pFontDict) {
1073 return; 1074 return;
1074 } 1075 }
1075 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); 1076 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict);
1076 m_FontSize = FX_atof(syntax.GetWord()); 1077 m_FontSize = FX_atof(syntax.GetWord());
1077 } 1078 }
OLDNEW
« no previous file with comments | « no previous file | core/fxcrt/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698