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

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

Issue 1888103002: Replace calls to deprecated CFX_{Wide,Byte}String::Empty() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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') | xfa/fde/tto/fde_textout.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/pdfwindow/PWL_Edit.h" 7 #include "fpdfsdk/pdfwindow/PWL_Edit.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 CFX_WideString swText = csText; 39 CFX_WideString swText = csText;
40 40
41 if (HasFlag(PES_RICH)) { 41 if (HasFlag(PES_RICH)) {
42 CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText); 42 CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText);
43 43
44 if (CXML_Element* pXML = 44 if (CXML_Element* pXML =
45 CXML_Element::Parse(sValue.c_str(), sValue.GetLength())) { 45 CXML_Element::Parse(sValue.c_str(), sValue.GetLength())) {
46 int32_t nCount = pXML->CountChildren(); 46 int32_t nCount = pXML->CountChildren();
47 FX_BOOL bFirst = TRUE; 47 FX_BOOL bFirst = TRUE;
48 48
49 swText.Empty(); 49 swText.clear();
50 50
51 for (int32_t i = 0; i < nCount; i++) { 51 for (int32_t i = 0; i < nCount; i++) {
52 if (CXML_Element* pSubElement = pXML->GetElement(i)) { 52 if (CXML_Element* pSubElement = pXML->GetElement(i)) {
53 CFX_ByteString tag = pSubElement->GetTagName(); 53 CFX_ByteString tag = pSubElement->GetTagName();
54 if (tag.EqualNoCase("p")) { 54 if (tag.EqualNoCase("p")) {
55 int nChild = pSubElement->CountChildren(); 55 int nChild = pSubElement->CountChildren();
56 CFX_WideString swSection; 56 CFX_WideString swSection;
57 for (int32_t j = 0; j < nChild; j++) { 57 for (int32_t j = 0; j < nChild; j++) {
58 swSection += pSubElement->GetContent(j); 58 swSection += pSubElement->GetContent(j);
59 } 59 }
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 } 1138 }
1139 1139
1140 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, 1140 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder,
1141 const CFX_FloatPoint& ptOffset) { 1141 const CFX_FloatPoint& ptOffset) {
1142 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; 1142 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray;
1143 IFX_Edit::GeneratePageObjects( 1143 IFX_Edit::GeneratePageObjects(
1144 pObjectHolder, m_pEdit, ptOffset, NULL, 1144 pObjectHolder, m_pEdit, ptOffset, NULL,
1145 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), 1145 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()),
1146 ObjArray); 1146 ObjArray);
1147 } 1147 }
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_string.h ('k') | xfa/fde/tto/fde_textout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698