summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_edit.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-07 23:24:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-07 23:24:09 +0000
commit69e19e2c0b6753a69470840226456858cdef5773 (patch)
treed7e2890b20c6a9fe683bcd5903b8cd957d1ef2f2 /fpdfsdk/pwl/cpwl_edit.cpp
parente4d2cffd31a1f705f04d11223444455aa35923a6 (diff)
downloadpdfium-69e19e2c0b6753a69470840226456858cdef5773.tar.xz
Make CPDF_Font::GetFontBBox() return the bounding box.
Instead of using an out parameter. Fix nits in the only caller as well. Change-Id: I04eb92705b2fbda001191c36da972eee499acbc7 Reviewed-on: https://pdfium-review.googlesource.com/39490 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_edit.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index 41f2517a0a..5e28a4aa02 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -369,14 +369,13 @@ bool CPWL_Edit::IsTextFull() const {
return m_pEdit->IsTextFull();
}
-float CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont,
+float CPWL_Edit::GetCharArrayAutoFontSize(const CPDF_Font* pFont,
const CFX_FloatRect& rcPlate,
int32_t nCharArray) {
if (!pFont || pFont->IsStandardFont())
return 0.0f;
- FX_RECT rcBBox;
- pFont->GetFontBBox(rcBBox);
+ const FX_RECT& rcBBox = pFont->GetFontBBox();
CFX_FloatRect rcCell = rcPlate;
float xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width();