summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics/cfx_graphics.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-20 07:19:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-20 07:19:43 -0700
commit73895de7dea3737d1a25801001b8efe186c6f5a3 (patch)
tree8754626255699818c34d336fccc75926a5958345 /xfa/fxgraphics/cfx_graphics.cpp
parent2a38a02b0492de0576c2e5b5e7d550f969367f9d (diff)
downloadpdfium-73895de7dea3737d1a25801001b8efe186c6f5a3.tar.xz
Cleanup unused methods and return values in FWL code.
This CL does an initial pass to remove unused methods and return values in the FWL code base. Review-Url: https://chromiumcodereview.appspot.com/2435603003
Diffstat (limited to 'xfa/fxgraphics/cfx_graphics.cpp')
-rw-r--r--xfa/fxgraphics/cfx_graphics.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index b6574e800e..bc8b18ba36 100644
--- a/xfa/fxgraphics/cfx_graphics.cpp
+++ b/xfa/fxgraphics/cfx_graphics.cpp
@@ -954,20 +954,19 @@ FWL_Error CFX_Graphics::ShowText(const CFX_PointF& point,
return FWL_Error::PropertyInvalid;
}
-FWL_Error CFX_Graphics::CalcTextRect(CFX_RectF& rect,
- const CFX_WideString& text,
- FX_BOOL isMultiline,
- CFX_Matrix* matrix) {
- if (m_type == FX_CONTEXT_Device && m_renderDevice) {
- int32_t length = text.GetLength();
- uint32_t* charCodes = FX_Alloc(uint32_t, length);
- FXTEXT_CHARPOS* charPos = FX_Alloc(FXTEXT_CHARPOS, length);
- CalcTextInfo(text, charCodes, charPos, rect);
- FX_Free(charPos);
- FX_Free(charCodes);
- return FWL_Error::Succeeded;
- }
- return FWL_Error::PropertyInvalid;
+void CFX_Graphics::CalcTextRect(CFX_RectF& rect,
+ const CFX_WideString& text,
+ FX_BOOL isMultiline,
+ CFX_Matrix* matrix) {
+ if (m_type != FX_CONTEXT_Device || !m_renderDevice)
+ return;
+
+ int32_t length = text.GetLength();
+ uint32_t* charCodes = FX_Alloc(uint32_t, length);
+ FXTEXT_CHARPOS* charPos = FX_Alloc(FXTEXT_CHARPOS, length);
+ CalcTextInfo(text, charCodes, charPos, rect);
+ FX_Free(charPos);
+ FX_Free(charCodes);
}
FWL_Error CFX_Graphics::Transfer(CFX_Graphics* graphics,