| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 m_bFocus = TRUE; | 458 m_bFocus = TRUE; |
| 459 } | 459 } |
| 460 | 460 |
| 461 void CPWL_Edit::OnKillFocus() { | 461 void CPWL_Edit::OnKillFocus() { |
| 462 ShowVScrollBar(FALSE); | 462 ShowVScrollBar(FALSE); |
| 463 | 463 |
| 464 m_pEdit->SelectNone(); | 464 m_pEdit->SelectNone(); |
| 465 SetCaret(FALSE, CFX_FloatPoint(0.0f, 0.0f), CFX_FloatPoint(0.0f, 0.0f)); | 465 SetCaret(FALSE, CFX_FloatPoint(0.0f, 0.0f), CFX_FloatPoint(0.0f, 0.0f)); |
| 466 | 466 |
| 467 SetCharSet(0); | 467 SetCharSet(FXFONT_ANSI_CHARSET); |
| 468 | 468 |
| 469 if (!IsReadOnly()) { | 469 if (!IsReadOnly()) { |
| 470 if (IPWL_FocusHandler* pFocusHandler = GetFocusHandler()) | 470 if (IPWL_FocusHandler* pFocusHandler = GetFocusHandler()) |
| 471 pFocusHandler->OnKillFocus(this); | 471 pFocusHandler->OnKillFocus(this); |
| 472 } | 472 } |
| 473 | 473 |
| 474 m_bFocus = FALSE; | 474 m_bFocus = FALSE; |
| 475 } | 475 } |
| 476 | 476 |
| 477 void CPWL_Edit::SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint /* = TRUE*/) { | 477 void CPWL_Edit::SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint /* = TRUE*/) { |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 } | 944 } |
| 945 | 945 |
| 946 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, | 946 void CPWL_Edit::GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, |
| 947 const CFX_FloatPoint& ptOffset) { | 947 const CFX_FloatPoint& ptOffset) { |
| 948 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; | 948 CFX_ArrayTemplate<CPDF_TextObject*> ObjArray; |
| 949 IFX_Edit::GeneratePageObjects( | 949 IFX_Edit::GeneratePageObjects( |
| 950 pObjectHolder, m_pEdit, ptOffset, nullptr, | 950 pObjectHolder, m_pEdit, ptOffset, nullptr, |
| 951 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), | 951 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), |
| 952 ObjArray); | 952 ObjArray); |
| 953 } | 953 } |
| OLD | NEW |