| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 return CPVT_WordRange(wpStart, wpEnd); | 496 return CPVT_WordRange(wpStart, wpEnd); |
| 497 } | 497 } |
| 498 | 498 |
| 499 return CPVT_WordRange(); | 499 return CPVT_WordRange(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 CFX_ByteString CPWL_Edit::GetTextAppearanceStream( | 502 CFX_ByteString CPWL_Edit::GetTextAppearanceStream( |
| 503 const CFX_FloatPoint& ptOffset) const { | 503 const CFX_FloatPoint& ptOffset) const { |
| 504 CFX_ByteTextBuf sRet; | 504 CFX_ByteTextBuf sRet; |
| 505 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); | 505 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); |
| 506 | |
| 507 if (sEdit.GetLength() > 0) { | 506 if (sEdit.GetLength() > 0) { |
| 508 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() | 507 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() |
| 509 << sEdit.AsStringC() << "ET\n"; | 508 << sEdit.AsStringC() << "ET\n"; |
| 510 } | 509 } |
| 511 | 510 return sRet.MakeString(); |
| 512 return sRet.AsStringC(); | |
| 513 } | 511 } |
| 514 | 512 |
| 515 CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( | 513 CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( |
| 516 const CFX_FloatPoint& ptOffset) const { | 514 const CFX_FloatPoint& ptOffset) const { |
| 517 if (m_pEditCaret) | 515 if (m_pEditCaret) |
| 518 return m_pEditCaret->GetCaretAppearanceStream(ptOffset); | 516 return m_pEditCaret->GetCaretAppearanceStream(ptOffset); |
| 519 | 517 |
| 520 return CFX_ByteString(); | 518 return CFX_ByteString(); |
| 521 } | 519 } |
| 522 | 520 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 } | 934 } |
| 937 | 935 |
| 938 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, | 936 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, |
| 939 const CFX_FloatPoint& ptOffset) { | 937 const CFX_FloatPoint& ptOffset) { |
| 940 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; | 938 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; |
| 941 IFX_Edit::GeneratePageObjects( | 939 IFX_Edit::GeneratePageObjects( |
| 942 pObjectHolder, m_pEdit, ptOffset, NULL, | 940 pObjectHolder, m_pEdit, ptOffset, NULL, |
| 943 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), | 941 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), |
| 944 ObjArray); | 942 ObjArray); |
| 945 } | 943 } |
| OLD | NEW |