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

Side by Side Diff: fpdfsdk/fsdk_baseform.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 | « core/fxcrt/include/fx_string.h ('k') | fpdfsdk/javascript/PublicMethods.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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 return m_bAppModified; 711 return m_bAppModified;
712 } 712 }
713 713
714 #ifdef PDF_ENABLE_XFA 714 #ifdef PDF_ENABLE_XFA
715 void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) { 715 void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) {
716 switch (GetFieldType()) { 716 switch (GetFieldType()) {
717 case FIELDTYPE_TEXTFIELD: 717 case FIELDTYPE_TEXTFIELD:
718 case FIELDTYPE_COMBOBOX: { 718 case FIELDTYPE_COMBOBOX: {
719 FX_BOOL bFormated = FALSE; 719 FX_BOOL bFormated = FALSE;
720 CFX_WideString sValue = OnFormat(bFormated); 720 CFX_WideString sValue = OnFormat(bFormated);
721 ResetAppearance(bFormated ? sValue : nullptr, TRUE); 721 ResetAppearance(bFormated ? sValue.c_str() : nullptr, TRUE);
722 } break; 722 } break;
723 default: 723 default:
724 ResetAppearance(nullptr, FALSE); 724 ResetAppearance(nullptr, FALSE);
725 break; 725 break;
726 } 726 }
727 } 727 }
728 #endif // PDF_ENABLE_XFA 728 #endif // PDF_ENABLE_XFA
729 729
730 void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, 730 void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue,
731 FX_BOOL bValueChanged) { 731 FX_BOOL bValueChanged) {
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 } 1539 }
1540 1540
1541 int nMaxLen = pField->GetMaxLen(); 1541 int nMaxLen = pField->GetMaxLen();
1542 FX_BOOL bCharArray = (dwFieldFlags >> 24) & 1; 1542 FX_BOOL bCharArray = (dwFieldFlags >> 24) & 1;
1543 FX_FLOAT fFontSize = GetFontSize(); 1543 FX_FLOAT fFontSize = GetFontSize();
1544 1544
1545 #ifdef PDF_ENABLE_XFA 1545 #ifdef PDF_ENABLE_XFA
1546 CFX_WideString sValueTmp; 1546 CFX_WideString sValueTmp;
1547 if (!sValue && GetMixXFAWidget()) { 1547 if (!sValue && GetMixXFAWidget()) {
1548 sValueTmp = GetValue(TRUE); 1548 sValueTmp = GetValue(TRUE);
1549 sValue = sValueTmp; 1549 sValue = sValueTmp.c_str();
1550 } 1550 }
1551 #endif // PDF_ENABLE_XFA 1551 #endif // PDF_ENABLE_XFA
1552 1552
1553 if (nMaxLen > 0) { 1553 if (nMaxLen > 0) {
1554 if (bCharArray) { 1554 if (bCharArray) {
1555 pEdit->SetCharArray(nMaxLen); 1555 pEdit->SetCharArray(nMaxLen);
1556 1556
1557 if (IsFloatZero(fFontSize)) { 1557 if (IsFloatZero(fFontSize)) {
1558 fFontSize = CPWL_Edit::GetCharArrayAutoFontSize( 1558 fFontSize = CPWL_Edit::GetCharArrayAutoFontSize(
1559 font_map.GetPDFFont(0), rcClient, nMaxLen); 1559 font_map.GetPDFFont(0), rcClient, nMaxLen);
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 break; 2825 break;
2826 } 2826 }
2827 } 2827 }
2828 } 2828 }
2829 2829
2830 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { 2830 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) {
2831 CFX_FloatRect rcAnnot; 2831 CFX_FloatRect rcAnnot;
2832 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); 2832 pAnnot->GetPDFAnnot()->GetRect(rcAnnot);
2833 return rcAnnot; 2833 return rcAnnot;
2834 } 2834 }
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_string.h ('k') | fpdfsdk/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698