| 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 #ifndef XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 7 #ifndef XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
| 8 #define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 8 #define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
| 9 | 9 |
| 10 #include "xfa/fde/css/fde_css.h" | 10 #include "xfa/fde/css/fde_css.h" |
| 11 #include "xfa/fde/fde_renderdevice.h" | 11 #include "xfa/fde/fde_gedevice.h" |
| 12 #include "xfa/fgas/layout/fgas_rtfbreak.h" | 12 #include "xfa/fgas/layout/fgas_rtfbreak.h" |
| 13 #include "xfa/fxfa/include/xfa_ffdoc.h" | 13 #include "xfa/fxfa/include/xfa_ffdoc.h" |
| 14 #include "xfa/fxfa/parser/xfa_object.h" | 14 #include "xfa/fxfa/parser/xfa_object.h" |
| 15 | 15 |
| 16 #define XFA_LOADERCNTXTFLG_FILTERSPACE 0x001 | 16 #define XFA_LOADERCNTXTFLG_FILTERSPACE 0x001 |
| 17 | 17 |
| 18 class CXFA_Para; | 18 class CXFA_Para; |
| 19 class CXFA_Font; | 19 class CXFA_Font; |
| 20 class CXFA_TextProvider; | 20 class CXFA_TextProvider; |
| 21 class CXFA_TextTabstopsContext; | 21 class CXFA_TextTabstopsContext; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 FX_FLOAT fSpaceAbove, | 368 FX_FLOAT fSpaceAbove, |
| 369 FX_BOOL bSavePieces); | 369 FX_BOOL bSavePieces); |
| 370 void AppendTextLine(uint32_t dwStatus, | 370 void AppendTextLine(uint32_t dwStatus, |
| 371 FX_FLOAT& fLinePos, | 371 FX_FLOAT& fLinePos, |
| 372 FX_BOOL bSavePieces, | 372 FX_BOOL bSavePieces, |
| 373 FX_BOOL bEndBreak = FALSE); | 373 FX_BOOL bEndBreak = FALSE); |
| 374 void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bDefault); | 374 void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bDefault); |
| 375 FX_BOOL IsEnd(FX_BOOL bSavePieces); | 375 FX_BOOL IsEnd(FX_BOOL bSavePieces); |
| 376 void ProcessText(CFX_WideString& wsText); | 376 void ProcessText(CFX_WideString& wsText); |
| 377 void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom); | 377 void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom); |
| 378 void RenderString(IFDE_RenderDevice* pDevice, | 378 void RenderString(CFDE_RenderDevice* pDevice, |
| 379 CFDE_Brush* pBrush, | 379 CFDE_Brush* pBrush, |
| 380 CXFA_PieceLine* pPieceLine, | 380 CXFA_PieceLine* pPieceLine, |
| 381 int32_t iPiece, | 381 int32_t iPiece, |
| 382 FXTEXT_CHARPOS* pCharPos, | 382 FXTEXT_CHARPOS* pCharPos, |
| 383 const CFX_Matrix& tmDoc2Device); | 383 const CFX_Matrix& tmDoc2Device); |
| 384 void RenderPath(IFDE_RenderDevice* pDevice, | 384 void RenderPath(CFDE_RenderDevice* pDevice, |
| 385 CFDE_Pen* pPen, | 385 CFDE_Pen* pPen, |
| 386 CXFA_PieceLine* pPieceLine, | 386 CXFA_PieceLine* pPieceLine, |
| 387 int32_t iPiece, | 387 int32_t iPiece, |
| 388 FXTEXT_CHARPOS* pCharPos, | 388 FXTEXT_CHARPOS* pCharPos, |
| 389 const CFX_Matrix& tmDoc2Device); | 389 const CFX_Matrix& tmDoc2Device); |
| 390 int32_t GetDisplayPos(const XFA_TextPiece* pPiece, | 390 int32_t GetDisplayPos(const XFA_TextPiece* pPiece, |
| 391 FXTEXT_CHARPOS* pCharPos, | 391 FXTEXT_CHARPOS* pCharPos, |
| 392 FX_BOOL bCharCode = FALSE); | 392 FX_BOOL bCharCode = FALSE); |
| 393 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); | 393 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); |
| 394 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); | 394 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); |
| 395 FX_BOOL Layout(int32_t iBlock); | 395 FX_BOOL Layout(int32_t iBlock); |
| 396 int32_t CountBlocks() const; | 396 int32_t CountBlocks() const; |
| 397 | 397 |
| 398 CXFA_TextProvider* m_pTextProvider; | 398 CXFA_TextProvider* m_pTextProvider; |
| 399 CXFA_Node* m_pTextDataNode; | 399 CXFA_Node* m_pTextDataNode; |
| 400 FX_BOOL m_bRichText; | 400 FX_BOOL m_bRichText; |
| 401 IFX_MEMAllocator* m_pAllocator; | 401 IFX_MEMAllocator* m_pAllocator; |
| 402 CFX_RTFBreak* m_pBreak; | 402 CFX_RTFBreak* m_pBreak; |
| 403 CXFA_LoaderContext* m_pLoader; | 403 CXFA_LoaderContext* m_pLoader; |
| 404 int32_t m_iLines; | 404 int32_t m_iLines; |
| 405 FX_FLOAT m_fMaxWidth; | 405 FX_FLOAT m_fMaxWidth; |
| 406 CXFA_TextParser m_textParser; | 406 CXFA_TextParser m_textParser; |
| 407 CXFA_PieceLineArray m_pieceLines; | 407 CXFA_PieceLineArray m_pieceLines; |
| 408 CXFA_TextTabstopsContext* m_pTabstopContext; | 408 CXFA_TextTabstopsContext* m_pTabstopContext; |
| 409 FX_BOOL m_bBlockContinue; | 409 FX_BOOL m_bBlockContinue; |
| 410 }; | 410 }; |
| 411 | 411 |
| 412 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 412 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
| OLD | NEW |