summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-29 11:24:29 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-29 11:24:29 -0800
commitd5e7b355b8c4c22ff770547797cbc536bdc95d5b (patch)
tree4c0607b1701f23753a71b42c02b74764dd4bfd38 /fpdfsdk
parenta74e9c9d3b0d98c5d6042d7ca739cd921a4524db (diff)
downloadpdfium-d5e7b355b8c4c22ff770547797cbc536bdc95d5b.tar.xz
Fixup FX_RECT and FX_SMALL_RECT classes.
Put these first, so later on more complicated classes can have constructors that take these as arguments. Add better constructors, and call appropriately. Also don't be afraid to return these from methods since RVO. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1745683002 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 28b8114ed6..27e5e2352a 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -701,12 +701,8 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot,
CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot) {
CFX_ByteString sSubType = pAnnot->GetSubType();
-
- if (sSubType == BFFT_SIGNATURE) {
- } else {
- if (m_pFormFiller)
- return m_pFormFiller->GetViewBBox(pPageView, pAnnot);
- }
+ if (sSubType != BFFT_SIGNATURE && m_pFormFiller)
+ return CFX_FloatRect(m_pFormFiller->GetViewBBox(pPageView, pAnnot));
return CFX_FloatRect(0, 0, 0, 0);
}