| 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 CFX_ByteString CPWL_Edit::GetTextAppearanceStream( | 701 CFX_ByteString CPWL_Edit::GetTextAppearanceStream( |
| 702 const CFX_FloatPoint& ptOffset) const { | 702 const CFX_FloatPoint& ptOffset) const { |
| 703 CFX_ByteTextBuf sRet; | 703 CFX_ByteTextBuf sRet; |
| 704 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); | 704 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); |
| 705 | 705 |
| 706 if (sEdit.GetLength() > 0) { | 706 if (sEdit.GetLength() > 0) { |
| 707 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() | 707 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() |
| 708 << sEdit.AsStringC() << "ET\n"; | 708 << sEdit.AsStringC() << "ET\n"; |
| 709 } | 709 } |
| 710 | 710 |
| 711 return sRet.GetByteString(); | 711 return sRet.AsStringC(); |
| 712 } | 712 } |
| 713 | 713 |
| 714 CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( | 714 CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( |
| 715 const CFX_FloatPoint& ptOffset) const { | 715 const CFX_FloatPoint& ptOffset) const { |
| 716 if (m_pEditCaret) | 716 if (m_pEditCaret) |
| 717 return m_pEditCaret->GetCaretAppearanceStream(ptOffset); | 717 return m_pEditCaret->GetCaretAppearanceStream(ptOffset); |
| 718 | 718 |
| 719 return CFX_ByteString(); | 719 return CFX_ByteString(); |
| 720 } | 720 } |
| 721 | 721 |
| (...skipping 416 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 |