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_rtfbreak.h" | 7 #include "xfa/fgas/layout/fgas_rtfbreak.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 CFX_RTFChar& tc = m_pCurLine->GetChar(iCount - 1); | 639 CFX_RTFChar& tc = m_pCurLine->GetChar(iCount - 1); |
640 tc.m_dwStatus = dwStatus; | 640 tc.m_dwStatus = dwStatus; |
641 if (dwStatus <= FX_RTFBREAK_PieceBreak) { | 641 if (dwStatus <= FX_RTFBREAK_PieceBreak) { |
642 return dwStatus; | 642 return dwStatus; |
643 } | 643 } |
644 } | 644 } |
645 m_iReady = (m_pCurLine == &m_RTFLine1) ? 1 : 2; | 645 m_iReady = (m_pCurLine == &m_RTFLine1) ? 1 : 2; |
646 CFX_RTFLine* pNextLine = | 646 CFX_RTFLine* pNextLine = |
647 (m_pCurLine == &m_RTFLine1) ? &m_RTFLine2 : &m_RTFLine1; | 647 (m_pCurLine == &m_RTFLine1) ? &m_RTFLine2 : &m_RTFLine1; |
648 FX_BOOL bAllChars = (m_iAlignment > FX_RTFLINEALIGNMENT_Right); | 648 FX_BOOL bAllChars = (m_iAlignment > FX_RTFLINEALIGNMENT_Right); |
649 CFX_TPOArray tpos; | 649 CFX_TPOArray tpos(100); |
650 if (EndBreak_SplitLine(pNextLine, bAllChars, dwStatus)) { | 650 if (EndBreak_SplitLine(pNextLine, bAllChars, dwStatus)) { |
651 goto EndBreak_Ret; | 651 goto EndBreak_Ret; |
652 } | 652 } |
653 if (!m_bCharCode) { | 653 if (!m_bCharCode) { |
654 EndBreak_BidiLine(tpos, dwStatus); | 654 EndBreak_BidiLine(tpos, dwStatus); |
655 } | 655 } |
656 if (!m_bPagination && m_iAlignment > FX_RTFLINEALIGNMENT_Left) { | 656 if (!m_bPagination && m_iAlignment > FX_RTFLINEALIGNMENT_Left) { |
657 EndBreak_Alignment(tpos, bAllChars, dwStatus); | 657 EndBreak_Alignment(tpos, bAllChars, dwStatus); |
658 } | 658 } |
659 EndBreak_Ret: | 659 EndBreak_Ret: |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 iLength(0), | 1549 iLength(0), |
1550 pFont(nullptr), | 1550 pFont(nullptr), |
1551 fFontSize(12.0f), | 1551 fFontSize(12.0f), |
1552 dwLayoutStyles(0), | 1552 dwLayoutStyles(0), |
1553 iCharRotation(0), | 1553 iCharRotation(0), |
1554 iBidiLevel(0), | 1554 iBidiLevel(0), |
1555 pRect(nullptr), | 1555 pRect(nullptr), |
1556 wLineBreakChar(L'\n'), | 1556 wLineBreakChar(L'\n'), |
1557 iHorizontalScale(100), | 1557 iHorizontalScale(100), |
1558 iVerticalScale(100) {} | 1558 iVerticalScale(100) {} |
OLD | NEW |