Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: fpdfsdk/fxedit/fxet_ap.cpp

Issue 1835693002: Remove FX_DWORD from fpdfsdk/ and testing/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/fsdk_mgr.cpp ('k') | fpdfsdk/fxedit/fxet_edit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/fpdfapi/fpdf_font/include/cpdf_font.h" 7 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
8 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" 8 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h"
9 #include "fpdfsdk/include/fxedit/fx_edit.h" 9 #include "fpdfsdk/include/fxedit/fx_edit.h"
10 #include "fpdfsdk/include/fxedit/fxet_edit.h" 10 #include "fpdfsdk/include/fxedit/fxet_edit.h"
11 11
12 CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, 12 CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap,
13 int32_t nFontIndex, 13 int32_t nFontIndex,
14 uint16_t Word, 14 uint16_t Word,
15 uint16_t SubWord) { 15 uint16_t SubWord) {
16 CFX_ByteString sWord; 16 CFX_ByteString sWord;
17 if (CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex)) { 17 if (CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex)) {
18 if (SubWord > 0) { 18 if (SubWord > 0) {
19 Word = SubWord; 19 Word = SubWord;
20 } else { 20 } else {
21 FX_DWORD dwCharCode = 21 uint32_t dwCharCode =
22 pPDFFont->IsUnicodeCompatible() 22 pPDFFont->IsUnicodeCompatible()
23 ? pPDFFont->CharCodeFromUnicode(Word) 23 ? pPDFFont->CharCodeFromUnicode(Word)
24 : pFontMap->CharCodeFromUnicode(nFontIndex, Word); 24 : pFontMap->CharCodeFromUnicode(nFontIndex, Word);
25 25
26 if (dwCharCode > 0) { 26 if (dwCharCode > 0) {
27 pPDFFont->AppendChar(sWord, dwCharCode); 27 pPDFFont->AppendChar(sWord, dwCharCode);
28 return sWord; 28 return sWord;
29 } 29 }
30 } 30 }
31 31
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 sRet << word.ptWord.x + ptOffset.x << " " 195 sRet << word.ptWord.x + ptOffset.x << " "
196 << line.ptLine.y + line.fLineDescent << " " << word.fWidth << " " 196 << line.ptLine.y + line.fLineDescent << " " << word.fWidth << " "
197 << line.fLineAscent - line.fLineDescent << " re\nf\n"; 197 << line.fLineAscent - line.fLineDescent << " re\nf\n";
198 } 198 }
199 } 199 }
200 } 200 }
201 } 201 }
202 202
203 return sRet.GetByteString(); 203 return sRet.GetByteString();
204 } 204 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_mgr.cpp ('k') | fpdfsdk/fxedit/fxet_edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698