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/fgas/layout/fgas_textbreak.h" | 7 #include "xfa/fgas/layout/fgas_textbreak.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 pTC->m_dwStatus = dwStatus; | 944 pTC->m_dwStatus = dwStatus; |
945 } | 945 } |
946 if (dwStatus <= FX_TXTBREAK_PieceBreak) { | 946 if (dwStatus <= FX_TXTBREAK_PieceBreak) { |
947 return dwStatus; | 947 return dwStatus; |
948 } | 948 } |
949 } | 949 } |
950 m_iReady = (m_pCurLine == m_pTxtLine1) ? 1 : 2; | 950 m_iReady = (m_pCurLine == m_pTxtLine1) ? 1 : 2; |
951 CFX_TxtLine* pNextLine = | 951 CFX_TxtLine* pNextLine = |
952 (m_pCurLine == m_pTxtLine1) ? m_pTxtLine2 : m_pTxtLine1; | 952 (m_pCurLine == m_pTxtLine1) ? m_pTxtLine2 : m_pTxtLine1; |
953 FX_BOOL bAllChars = (m_iCurAlignment > FX_TXTLINEALIGNMENT_Right); | 953 FX_BOOL bAllChars = (m_iCurAlignment > FX_TXTLINEALIGNMENT_Right); |
954 CFX_TPOArray tpos; | 954 CFX_TPOArray tpos(100); |
955 CFX_Char* pTC; | 955 CFX_Char* pTC; |
956 if (m_bArabicShapes) { | 956 if (m_bArabicShapes) { |
957 EndBreak_UpdateArabicShapes(); | 957 EndBreak_UpdateArabicShapes(); |
958 } | 958 } |
959 if (EndBreak_SplitLine(pNextLine, bAllChars, dwStatus)) { | 959 if (EndBreak_SplitLine(pNextLine, bAllChars, dwStatus)) { |
960 goto EndBreak_Ret; | 960 goto EndBreak_Ret; |
961 } | 961 } |
962 EndBreak_BidiLine(tpos, dwStatus); | 962 EndBreak_BidiLine(tpos, dwStatus); |
963 if (!m_bPagination && m_iCurAlignment > FX_TXTLINEALIGNMENT_Left) { | 963 if (!m_bPagination && m_iCurAlignment > FX_TXTLINEALIGNMENT_Left) { |
964 EndBreak_Alignment(tpos, bAllChars, dwStatus); | 964 EndBreak_Alignment(tpos, bAllChars, dwStatus); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 : m_iStart(0), m_iWidth(0), m_iArabicChars(0) { | 1698 : m_iStart(0), m_iWidth(0), m_iArabicChars(0) { |
1699 m_pLineChars = new CFX_TxtCharArray; | 1699 m_pLineChars = new CFX_TxtCharArray; |
1700 m_pLinePieces = new CFX_TxtPieceArray(16); | 1700 m_pLinePieces = new CFX_TxtPieceArray(16); |
1701 } | 1701 } |
1702 | 1702 |
1703 CFX_TxtLine::~CFX_TxtLine() { | 1703 CFX_TxtLine::~CFX_TxtLine() { |
1704 RemoveAll(); | 1704 RemoveAll(); |
1705 delete m_pLineChars; | 1705 delete m_pLineChars; |
1706 delete m_pLinePieces; | 1706 delete m_pLinePieces; |
1707 } | 1707 } |
OLD | NEW |