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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 } | 381 } |
382 break; | 382 break; |
383 } | 383 } |
384 default: | 384 default: |
385 break; | 385 break; |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 CFX_FloatRect rcClip; | 389 CFX_FloatRect rcClip; |
390 CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange(); | 390 CPVT_WordRange wrRange = m_pEdit->GetVisibleWordRange(); |
391 CPVT_WordRange* pRange = NULL; | 391 CPVT_WordRange* pRange = nullptr; |
392 | 392 |
393 if (!HasFlag(PES_TEXTOVERFLOW)) { | 393 if (!HasFlag(PES_TEXTOVERFLOW)) { |
394 rcClip = GetClientRect(); | 394 rcClip = GetClientRect(); |
395 pRange = &wrRange; | 395 pRange = &wrRange; |
396 } | 396 } |
397 CFX_SystemHandler* pSysHandler = GetSystemHandler(); | 397 CFX_SystemHandler* pSysHandler = GetSystemHandler(); |
398 IFX_Edit::DrawEdit( | 398 IFX_Edit::DrawEdit( |
399 pDevice, pUser2Device, m_pEdit, | 399 pDevice, pUser2Device, m_pEdit, |
400 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), | 400 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), |
401 CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor(), GetTransparency()), | 401 CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor(), GetTransparency()), |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 | 931 |
932 range.Set(wpStart, wpEnd); | 932 range.Set(wpStart, wpEnd); |
933 return range; | 933 return range; |
934 } | 934 } |
935 | 935 |
936 void CPWL_Edit::GeneratePageObjects( | 936 void CPWL_Edit::GeneratePageObjects( |
937 CPDF_PageObjectHolder* pObjectHolder, | 937 CPDF_PageObjectHolder* pObjectHolder, |
938 const CFX_FloatPoint& ptOffset, | 938 const CFX_FloatPoint& ptOffset, |
939 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) { | 939 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) { |
940 IFX_Edit::GeneratePageObjects( | 940 IFX_Edit::GeneratePageObjects( |
941 pObjectHolder, m_pEdit, ptOffset, NULL, | 941 pObjectHolder, m_pEdit, ptOffset, nullptr, |
942 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), | 942 CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), |
943 ObjArray); | 943 ObjArray); |
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, NULL, | 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 |