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

Unified Diff: xfa/fde/cfde_txtedtengine.cpp

Issue 2459073002: Continue fixing FX_BOOL / int noise (Closed)
Patch Set: 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
Index: xfa/fde/cfde_txtedtengine.cpp
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 32df561d7eaf5647097320974cd3dcae9ef8a507..60ad6090a61302cbd9368aad19e456132006a87c 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -1339,7 +1339,7 @@ FX_BOOL CFDE_TxtEdtEngine::MoveUp(CFX_PointF& ptCaret) {
ptCaret.x = m_rtCaret.left + m_rtCaret.width / 2 - m_Param.fLineSpace;
ptCaret.y = m_fCaretPosReserve;
FX_BOOL bLineReserve =
- m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve;
+ !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
if (ptCaret.x < rtContent.left) {
if (bLineReserve) {
if (m_nCaretPage == CountPages() - 1) {
@@ -1383,7 +1383,7 @@ FX_BOOL CFDE_TxtEdtEngine::MoveDown(CFX_PointF& ptCaret) {
ptCaret.y = m_fCaretPosReserve;
if (ptCaret.x >= rtContent.right()) {
FX_BOOL bLineReserve =
- m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve;
+ !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
if (bLineReserve) {
if (m_nCaretPage == 0) {
return FALSE;
@@ -1566,7 +1566,7 @@ void CFDE_TxtEdtEngine::GetCaretRect(CFX_RectF& rtCaret,
FX_BOOL bBefore) {
IFDE_TxtEdtPage* pPage = m_PagePtrArray[m_nCaretPage];
m_Param.pEventSink->On_PageLoad(this, m_nCaretPage, 0);
- FX_BOOL bCombText = m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText;
+ FX_BOOL bCombText = !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText);
int32_t nIndexInpage = nCaret - pPage->GetCharStart();
if (bBefore && bCombText && nIndexInpage > 0) {
nIndexInpage--;

Powered by Google App Engine
This is Rietveld 408576698