Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: xfa/fxgraphics/cfx_graphics.cpp

Issue 2435603003: Cleanup unused methods and return values in FWL code. (Closed)
Patch Set: Fix typo Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxgraphics/cfx_graphics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxgraphics/cfx_graphics.cpp
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index b6574e800e7af5b76b2ec57fb88b60aa034cb9e7..bc8b18ba363d91b6dc802059a05df9e83c6cb1d3 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,
« no previous file with comments | « xfa/fxgraphics/cfx_graphics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698