diff options
Diffstat (limited to 'fpdfsdk/fxedit')
-rw-r--r-- | fpdfsdk/fxedit/fxet_ap.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp index 6f064b2ce8..5bf61365c5 100644 --- a/fpdfsdk/fxedit/fxet_ap.cpp +++ b/fpdfsdk/fxedit/fxet_ap.cpp @@ -18,12 +18,10 @@ CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, if (SubWord > 0) { Word = SubWord; } else { - FX_DWORD dwCharCode = -1; - - if (pPDFFont->IsUnicodeCompatible()) - dwCharCode = pPDFFont->CharCodeFromUnicode(Word); - else - dwCharCode = pFontMap->CharCodeFromUnicode(nFontIndex, Word); + FX_DWORD dwCharCode = + pPDFFont->IsUnicodeCompatible() + ? pPDFFont->CharCodeFromUnicode(Word) + : pFontMap->CharCodeFromUnicode(nFontIndex, Word); if (dwCharCode > 0) { pPDFFont->AppendChar(sWord, dwCharCode); |