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

Side by Side Diff: xfa/fde/cfde_txtedtpage.cpp

Issue 2459073002: Continue fixing FX_BOOL / int noise (Closed)
Patch Set: Drop file Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fde/css/fde_cssdeclaration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fde/cfde_txtedtpage.h" 7 #include "xfa/fde/cfde_txtedtpage.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 m_pBgnParag->GetLineRange(nStartLine - nStartLineInParag, nPageStart, nTemp); 288 m_pBgnParag->GetLineRange(nStartLine - nStartLineInParag, nPageStart, nTemp);
289 nEndParag = m_pEditEngine->Line2Parag(nBgnParag, nStartLineInParag, nEndLine, 289 nEndParag = m_pEditEngine->Line2Parag(nBgnParag, nStartLineInParag, nEndLine,
290 nEndLineInParag); 290 nEndLineInParag);
291 m_pEndParag = 291 m_pEndParag =
292 static_cast<CFDE_TxtEdtParag*>(m_pEditEngine->GetParag(nEndParag)); 292 static_cast<CFDE_TxtEdtParag*>(m_pEditEngine->GetParag(nEndParag));
293 m_pEndParag->LoadParag(); 293 m_pEndParag->LoadParag();
294 m_pEndParag->GetLineRange(nEndLine - nEndLineInParag, nPageEnd, nTemp); 294 m_pEndParag->GetLineRange(nEndLine - nEndLineInParag, nPageEnd, nTemp);
295 nPageEnd += (nTemp - 1); 295 nPageEnd += (nTemp - 1);
296 FX_BOOL bVertial = pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_DocVertical; 296 FX_BOOL bVertial = pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_DocVertical;
297 FX_BOOL bLineReserve = 297 FX_BOOL bLineReserve =
298 pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve; 298 !!(pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
299 FX_FLOAT fLineStart = 299 FX_FLOAT fLineStart =
300 bVertial 300 bVertial
301 ? (bLineReserve ? (pParams->fPlateWidth - pParams->fLineSpace) : 0.0f) 301 ? (bLineReserve ? (pParams->fPlateWidth - pParams->fLineSpace) : 0.0f)
302 : 0.0f; 302 : 0.0f;
303 FX_FLOAT fLineStep = 303 FX_FLOAT fLineStep =
304 (bVertial && bLineReserve) ? (-pParams->fLineSpace) : pParams->fLineSpace; 304 (bVertial && bLineReserve) ? (-pParams->fLineSpace) : pParams->fLineSpace;
305 FX_FLOAT fLinePos = fLineStart; 305 FX_FLOAT fLinePos = fLineStart;
306 if (!m_pTextSet) 306 if (!m_pTextSet)
307 m_pTextSet.reset(new CFDE_TxtEdtTextSet(this)); 307 m_pTextSet.reset(new CFDE_TxtEdtTextSet(this));
308 308
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 ptF.x = rtF.left; 509 ptF.x = rtF.left;
510 } else if (ptF.x >= rtF.right()) { 510 } else if (ptF.x >= rtF.right()) {
511 ptF.x = rtF.right() - fTolerance; 511 ptF.x = rtF.right() - fTolerance;
512 } 512 }
513 if (ptF.y < rtF.top) { 513 if (ptF.y < rtF.top) {
514 ptF.y = rtF.top; 514 ptF.y = rtF.top;
515 } else if (ptF.y >= rtF.bottom()) { 515 } else if (ptF.y >= rtF.bottom()) {
516 ptF.y = rtF.bottom() - fTolerance; 516 ptF.y = rtF.bottom() - fTolerance;
517 } 517 }
518 } 518 }
OLDNEW
« no previous file with comments | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fde/css/fde_cssdeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698