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/fxedit/include/fxet_edit.h" | 7 #include "fpdfsdk/fxedit/fxet_edit.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "core/fpdfapi/fpdf_font/cpdf_font.h" | 13 #include "core/fpdfapi/fpdf_font/cpdf_font.h" |
14 #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" | 14 #include "core/fpdfapi/fpdf_page/cpdf_pageobject.h" |
15 #include "core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h" | 15 #include "core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h" |
16 #include "core/fpdfapi/fpdf_page/cpdf_pathobject.h" | 16 #include "core/fpdfapi/fpdf_page/cpdf_pathobject.h" |
17 #include "core/fpdfapi/fpdf_page/cpdf_textobject.h" | 17 #include "core/fpdfapi/fpdf_page/cpdf_textobject.h" |
18 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" | 18 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" |
19 #include "core/fpdfapi/fpdf_render/cpdf_renderoptions.h" | 19 #include "core/fpdfapi/fpdf_render/cpdf_renderoptions.h" |
20 #include "core/fpdfapi/fpdf_render/cpdf_textrenderer.h" | 20 #include "core/fpdfapi/fpdf_render/cpdf_textrenderer.h" |
21 #include "core/fpdfdoc/cpvt_section.h" | 21 #include "core/fpdfdoc/cpvt_section.h" |
22 #include "core/fpdfdoc/cpvt_word.h" | 22 #include "core/fpdfdoc/cpvt_word.h" |
23 #include "core/fpdfdoc/ipvt_fontmap.h" | 23 #include "core/fpdfdoc/ipvt_fontmap.h" |
24 #include "core/fxge/cfx_graphstatedata.h" | 24 #include "core/fxge/cfx_graphstatedata.h" |
25 #include "core/fxge/cfx_pathdata.h" | 25 #include "core/fxge/cfx_pathdata.h" |
26 #include "core/fxge/cfx_renderdevice.h" | 26 #include "core/fxge/cfx_renderdevice.h" |
27 #include "fpdfsdk/cfx_systemhandler.h" | 27 #include "fpdfsdk/cfx_systemhandler.h" |
28 #include "fpdfsdk/fxedit/include/fx_edit.h" | 28 #include "fpdfsdk/fxedit/fx_edit.h" |
29 #include "fpdfsdk/pdfwindow/PWL_Edit.h" | 29 #include "fpdfsdk/pdfwindow/PWL_Edit.h" |
30 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" | 30 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 const int kEditUndoMaxItems = 10000; | 34 const int kEditUndoMaxItems = 10000; |
35 | 35 |
36 CFX_ByteString GetWordRenderString(const CFX_ByteString& strWords) { | 36 CFX_ByteString GetWordRenderString(const CFX_ByteString& strWords) { |
37 if (strWords.GetLength() > 0) | 37 if (strWords.GetLength() > 0) |
38 return PDF_EncodeString(strWords) + " Tj\n"; | 38 return PDF_EncodeString(strWords) + " Tj\n"; |
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2523 int32_t CFX_Edit_RectArray::GetSize() const { | 2523 int32_t CFX_Edit_RectArray::GetSize() const { |
2524 return m_Rects.GetSize(); | 2524 return m_Rects.GetSize(); |
2525 } | 2525 } |
2526 | 2526 |
2527 CFX_FloatRect* CFX_Edit_RectArray::GetAt(int32_t nIndex) const { | 2527 CFX_FloatRect* CFX_Edit_RectArray::GetAt(int32_t nIndex) const { |
2528 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) | 2528 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) |
2529 return nullptr; | 2529 return nullptr; |
2530 | 2530 |
2531 return m_Rects.GetAt(nIndex); | 2531 return m_Rects.GetAt(nIndex); |
2532 } | 2532 } |
OLD | NEW |