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

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_Edit.cpp

Issue 809993004: Get rid of FX_LPCSTR cast. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 11 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
« fpdfsdk/src/jsapi/fxjs_v8.cpp ('K') | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | no next file » | 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 "../../include/pdfwindow/PDFWindow.h" 7 #include "../../include/pdfwindow/PDFWindow.h"
8 #include "../../include/pdfwindow/PWL_Wnd.h" 8 #include "../../include/pdfwindow/PWL_Wnd.h"
9 #include "../../include/pdfwindow/PWL_EditCtrl.h" 9 #include "../../include/pdfwindow/PWL_EditCtrl.h"
10 #include "../../include/pdfwindow/PWL_Edit.h" 10 #include "../../include/pdfwindow/PWL_Edit.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 void CPWL_Edit::SetText(FX_LPCWSTR csText) 39 void CPWL_Edit::SetText(FX_LPCWSTR csText)
40 { 40 {
41 CFX_WideString swText = csText; 41 CFX_WideString swText = csText;
42 42
43 if (HasFlag(PES_RICH)) 43 if (HasFlag(PES_RICH))
44 { 44 {
45 CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText); 45 CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText);
46 46
47 » » if (CXML_Element * pXML = CXML_Element::Parse((FX_LPCSTR)sValue, sValue.GetLength())) 47 if (CXML_Element * pXML = CXML_Element::Parse(sValue.c_str(), sValue.Get Length()))
brucedawson 2014/12/30 23:13:02 Indent.
48 { 48 {
49 FX_INT32 nCount = pXML->CountChildren(); 49 FX_INT32 nCount = pXML->CountChildren();
50 FX_BOOL bFirst = TRUE; 50 FX_BOOL bFirst = TRUE;
51 51
52 swText.Empty(); 52 swText.Empty();
53 53
54 for (FX_INT32 i=0; i<nCount; i++) 54 for (FX_INT32 i=0; i<nCount; i++)
55 { 55 {
56 if (CXML_Element * pSubElement = pXML->GetElemen t(i)) 56 if (CXML_Element * pSubElement = pXML->GetElemen t(i))
57 { 57 {
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 IFX_Edit::GeneratePageObjects(pPageObjects, m_pEdit, ptOffset, NULL, CPW L_Utils::PWLColorToFXColor(GetTextColor(),GetTransparency()), ObjArray); 1314 IFX_Edit::GeneratePageObjects(pPageObjects, m_pEdit, ptOffset, NULL, CPW L_Utils::PWLColorToFXColor(GetTextColor(),GetTransparency()), ObjArray);
1315 } 1315 }
1316 1316
1317 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjects* pPageObjects, 1317 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjects* pPageObjects,
1318 const CP DF_Point& ptOffset) 1318 const CP DF_Point& ptOffset)
1319 { 1319 {
1320 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; 1320 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray;
1321 IFX_Edit::GeneratePageObjects(pPageObjects, m_pEdit, ptOffset, NULL, CPW L_Utils::PWLColorToFXColor(GetTextColor(),GetTransparency()), ObjArray); 1321 IFX_Edit::GeneratePageObjects(pPageObjects, m_pEdit, ptOffset, NULL, CPW L_Utils::PWLColorToFXColor(GetTextColor(),GetTransparency()), ObjArray);
1322 } 1322 }
1323 1323
OLDNEW
« fpdfsdk/src/jsapi/fxjs_v8.cpp ('K') | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698