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 "autoreflow.h" | 7 #include "autoreflow.h" |
8 #define approachto(a,b,c) (FXSYS_fabs((float)((a)-(b)))>(c) ? 0 : 1) | 8 #define approachto(a,b,c) (FXSYS_fabs((float)((a)-(b)))>(c) ? 0 : 1) |
9 int FPDF_ProcessInterObj(const CPDF_PageObject* pPrevObj, const CPDF_PageObject*
pObj) | 9 int FPDF_ProcessInterObj(const CPDF_PageObject* pPrevObj, const CPDF_PageObject*
pObj) |
10 { | 10 { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 i--; | 409 i--; |
410 count--; | 410 count--; |
411 } else { | 411 } else { |
412 plastCell = pCell; | 412 plastCell = pCell; |
413 } | 413 } |
414 } | 414 } |
415 } | 415 } |
416 void CPDF_AutoReflowLayoutProvider::ProcessObj(CFX_PtrArray& cellArray, CPDF_Pag
eObject* pObj, CFX_AffineMatrix matrix) | 416 void CPDF_AutoReflowLayoutProvider::ProcessObj(CFX_PtrArray& cellArray, CPDF_Pag
eObject* pObj, CFX_AffineMatrix matrix) |
417 { | 417 { |
418 } | 418 } |
419 FX_INT32 CPDF_AutoReflowLayoutProvider::LogicPreObj(CPDF_PageObject* pObj) | 419 int32_t CPDF_AutoReflowLayoutProvider::LogicPreObj(CPDF_PageObject* pObj) |
420 { | 420 { |
421 CPDF_PageObject* pPreObj = m_pPreObj; | 421 CPDF_PageObject* pPreObj = m_pPreObj; |
422 m_pPreObj = pObj; | 422 m_pPreObj = pObj; |
423 if(!pPreObj) { | 423 if(!pPreObj) { |
424 return 0; | 424 return 0; |
425 } | 425 } |
426 if(pPreObj->m_Type != pObj->m_Type) { | 426 if(pPreObj->m_Type != pObj->m_Type) { |
427 return 0; | 427 return 0; |
428 } | 428 } |
429 CFX_FloatRect rcCurObj(pObj->m_Left, pObj->m_Bottom, pObj->m_Right, pObj->m_
Top); | 429 CFX_FloatRect rcCurObj(pObj->m_Left, pObj->m_Bottom, pObj->m_Right, pObj->m_
Top); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 pTextObj->GetItemInfo(i + 1, &Item); | 772 pTextObj->GetItemInfo(i + 1, &Item); |
773 return Item.m_OriginX; | 773 return Item.m_OriginX; |
774 } | 774 } |
775 } | 775 } |
776 return Item.m_OriginX; | 776 return Item.m_OriginX; |
777 } | 777 } |
778 CFX_AffineMatrix matrix; | 778 CFX_AffineMatrix matrix; |
779 FX_RECT rect = pObj->GetBBox(&matrix); | 779 FX_RECT rect = pObj->GetBBox(&matrix); |
780 return (FX_FLOAT)(rect.Width()); | 780 return (FX_FLOAT)(rect.Width()); |
781 } | 781 } |
OLD | NEW |