 Chromium Code Reviews
 Chromium Code Reviews Issue 2457673003:
  Fix some FX_BOOL / int noise in fxfa  (Closed)
    
  
    Issue 2457673003:
  Fix some FX_BOOL / int noise in fxfa  (Closed) 
  | OLD | NEW | 
|---|---|
| 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/fxfa/app/xfa_textlayout.h" | 7 #include "xfa/fxfa/app/xfa_textlayout.h" | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 | 10 | 
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1269 RenderString(pDevice.get(), pSolidBrush.get(), pPieceLine, j, pCharPos, | 1269 RenderString(pDevice.get(), pSolidBrush.get(), pPieceLine, j, pCharPos, | 
| 1270 tmDoc2Device); | 1270 tmDoc2Device); | 
| 1271 } | 1271 } | 
| 1272 for (j = 0; j < iPieces; j++) { | 1272 for (j = 0; j < iPieces; j++) { | 
| 1273 RenderPath(pDevice.get(), pPen.get(), pPieceLine, j, pCharPos, | 1273 RenderPath(pDevice.get(), pPen.get(), pPieceLine, j, pCharPos, | 
| 1274 tmDoc2Device); | 1274 tmDoc2Device); | 
| 1275 } | 1275 } | 
| 1276 } | 1276 } | 
| 1277 pDevice->RestoreState(); | 1277 pDevice->RestoreState(); | 
| 1278 FX_Free(pCharPos); | 1278 FX_Free(pCharPos); | 
| 1279 return iPieceLines; | 1279 return iPieceLines > 0; | 
| 
Tom Sepez
2016/10/27 21:04:50
another count
 | |
| 1280 } | 1280 } | 
| 1281 void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) { | 1281 void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) { | 
| 1282 fHeight -= fBottom; | 1282 fHeight -= fBottom; | 
| 1283 if (fHeight < 0.1f) { | 1283 if (fHeight < 0.1f) { | 
| 1284 return; | 1284 return; | 
| 1285 } | 1285 } | 
| 1286 switch (m_textParser.GetVAlign(m_pTextProvider)) { | 1286 switch (m_textParser.GetVAlign(m_pTextProvider)) { | 
| 1287 case XFA_ATTRIBUTEENUM_Middle: | 1287 case XFA_ATTRIBUTEENUM_Middle: | 
| 1288 fHeight /= 2.0f; | 1288 fHeight /= 2.0f; | 
| 1289 break; | 1289 break; | 
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2095 m_tabstops.RemoveAll(); | 2095 m_tabstops.RemoveAll(); | 
| 2096 m_iTabCount = 0; | 2096 m_iTabCount = 0; | 
| 2097 } | 2097 } | 
| 2098 | 2098 | 
| 2099 void CXFA_TextTabstopsContext::Reset() { | 2099 void CXFA_TextTabstopsContext::Reset() { | 
| 2100 m_iTabIndex = -1; | 2100 m_iTabIndex = -1; | 
| 2101 m_bTabstops = FALSE; | 2101 m_bTabstops = FALSE; | 
| 2102 m_fTabWidth = 0; | 2102 m_fTabWidth = 0; | 
| 2103 m_fLeft = 0; | 2103 m_fLeft = 0; | 
| 2104 } | 2104 } | 
| OLD | NEW |