diff options
Diffstat (limited to 'core/fpdfdoc/cpdf_defaultappearance.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_defaultappearance.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp index 1873c1ae58..28213aa33b 100644 --- a/core/fpdfdoc/cpdf_defaultappearance.cpp +++ b/core/fpdfdoc/cpdf_defaultappearance.cpp @@ -36,20 +36,19 @@ CFX_ByteString CPDF_DefaultAppearance::GetFontString() { return csFont; } -void CPDF_DefaultAppearance::GetFont(CFX_ByteString& csFontNameTag, - float& fFontSize) { - csFontNameTag = ""; - fFontSize = 0; +CFX_ByteString CPDF_DefaultAppearance::GetFont(float* fFontSize) { + *fFontSize = 0.0f; if (m_csDA.IsEmpty()) - return; + return CFX_ByteString(); + CFX_ByteString csFontNameTag; CPDF_SimpleParser syntax(m_csDA.AsStringC()); if (syntax.FindTagParamFromStart("Tf", 2)) { csFontNameTag = CFX_ByteString(syntax.GetWord()); csFontNameTag.Delete(0, 1); - fFontSize = FX_atof(syntax.GetWord()); + *fFontSize = FX_atof(syntax.GetWord()); } - csFontNameTag = PDF_NameDecode(csFontNameTag); + return PDF_NameDecode(csFontNameTag); } bool CPDF_DefaultAppearance::HasColor(PaintOperation nOperation) { |