| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|