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 "core/include/fpdfapi/fpdf_parser_decode.h" |
7 #include "core/include/fpdfapi/fpdf_resource.h" | 8 #include "core/include/fpdfapi/fpdf_resource.h" |
8 #include "fpdfsdk/include/fxedit/fx_edit.h" | 9 #include "fpdfsdk/include/fxedit/fx_edit.h" |
9 #include "fpdfsdk/include/fxedit/fxet_edit.h" | 10 #include "fpdfsdk/include/fxedit/fxet_edit.h" |
10 | 11 |
11 CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, | 12 CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, |
12 int32_t nFontIndex, | 13 int32_t nFontIndex, |
13 FX_WORD Word, | 14 FX_WORD Word, |
14 FX_WORD SubWord) { | 15 FX_WORD SubWord) { |
15 CFX_ByteString sWord; | 16 CFX_ByteString sWord; |
16 if (CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex)) { | 17 if (CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex)) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 sRet << word.ptWord.x + ptOffset.x << " " | 197 sRet << word.ptWord.x + ptOffset.x << " " |
197 << line.ptLine.y + line.fLineDescent << " " << word.fWidth << " " | 198 << line.ptLine.y + line.fLineDescent << " " << word.fWidth << " " |
198 << line.fLineAscent - line.fLineDescent << " re\nf\n"; | 199 << line.fLineAscent - line.fLineDescent << " re\nf\n"; |
199 } | 200 } |
200 } | 201 } |
201 } | 202 } |
202 } | 203 } |
203 | 204 |
204 return sRet.GetByteString(); | 205 return sRet.GetByteString(); |
205 } | 206 } |
OLD | NEW |