diff options
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_FontMap.cpp | 7 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_FontMap.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp index a7c42698cd..ddf496fbb0 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp @@ -180,10 +180,7 @@ int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, return nFontIndex; CFX_ByteString sAlias; - CPDF_Font* pFont = nullptr; - if (bFind) - pFont = FindFontSameCharset(sAlias, nCharset); - + CPDF_Font* pFont = bFind ? FindFontSameCharset(&sAlias, nCharset) : nullptr; if (!pFont) { CFX_ByteString sTemp = sFontName; pFont = AddFontToDocument(GetDocument(), sTemp, nCharset); @@ -193,7 +190,7 @@ int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, return AddFontData(pFont, sAlias, nCharset); } -CPDF_Font* CPWL_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, +CPDF_Font* CPWL_FontMap::FindFontSameCharset(CFX_ByteString* sFontAlias, int32_t nCharset) { return nullptr; } diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h index c14fcd7cd3..21535305ae 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/pdfwindow/PWL_FontMap.h @@ -53,7 +53,7 @@ class CPWL_FontMap : public IPVT_FontMap { protected: virtual void Initialize(); virtual CPDF_Document* GetDocument(); - virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, + virtual CPDF_Font* FindFontSameCharset(CFX_ByteString* sFontAlias, int32_t nCharset); virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); |