Cleanup string passing in core/fpdf*
Return strings where possible.
Add missing consts to strings passed by ref.
Convert non-const cases to pointers.
Rename a few methods to be clearer.
Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c
Reviewed-on: https://pdfium-review.googlesource.com/3951
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 12c3508..c7dc260 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -2482,12 +2482,10 @@
if (!pFormControl)
return false;
- CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
-
- CFX_ByteString csFontNameTag;
float fFontSize;
- FieldAppearance.GetFont(csFontNameTag, fFontSize);
- vp << (int)fFontSize;
+ CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
+ FieldAppearance.GetFont(&fFontSize);
+ vp << static_cast<int>(fFontSize);
return true;
}