summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 09:17:20 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 15:04:51 +0000
commit1b08df18300bbc67dabd12fb35ab6ce1732a1024 (patch)
tree9773931c8d18709860c9fbc1177e290e7713044e /xfa/fwl
parentac2e04797b258115b2dc768a56377d7e78038f42 (diff)
downloadpdfium-1b08df18300bbc67dabd12fb35ab6ce1732a1024.tar.xz
Convert Get methods to return instead of using out params.
This Cl changes several Get methods to return their values instead of using out parameters. Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9 Reviewed-on: https://pdfium-review.googlesource.com/2556 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_edit.cpp5
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp13
2 files changed, 7 insertions, 11 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 667104df74..a227176ed0 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -1115,11 +1115,8 @@ void CFWL_Edit::ShowCaret(CFX_RectF* pRect) {
if (!pDocEnvironment)
return;
- CFX_Matrix mt;
- pXFAWidget->GetRotateMatrix(mt);
-
CFX_RectF rt(*pRect);
- mt.TransformRect(rt);
+ pXFAWidget->GetRotateMatrix().TransformRect(rt);
pDocEnvironment->DisplayCaret(pXFAWidget, true, &rt);
}
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 6e537a4ad9..0af93dc38b 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -432,16 +432,15 @@ void CFWL_WidgetMgr::OnDrawWidget(CFWL_Widget* pWidget,
CFX_RectF clipCopy(0, 0, pWidget->GetWidgetRect().Size());
CFX_RectF clipBounds;
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ || \
- _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_
- pWidget->GetDelegate()->OnDrawWidget(pGraphics, pMatrix);
- pGraphics->GetClipRect(clipBounds);
- clipCopy = clipBounds;
-#elif _FX_OS_ == _FX_MACOSX_
+#if _FX_OS_ == _FX_MACOSX_
if (IsFormDisabled()) {
+#endif // _FX_OS_ == _FX_MACOSX_
+
pWidget->GetDelegate()->OnDrawWidget(pGraphics, pMatrix);
- pGraphics->GetClipRect(clipBounds);
+ clipBounds = pGraphics->GetClipRect();
clipCopy = clipBounds;
+
+#if _FX_OS_ == _FX_MACOSX_
} else {
clipBounds = CFX_RectF(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d);
const_cast<CFX_Matrix*>(pMatrix)->SetIdentity(); // FIXME: const cast.