| 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/fde/tto/fde_textout.h" | 7 #include "xfa/fde/tto/fde_textout.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 564 } |
| 565 if (rect.width < m_fFontSize || rect.height < m_fFontSize) { | 565 if (rect.width < m_fFontSize || rect.height < m_fFontSize) { |
| 566 return; | 566 return; |
| 567 } | 567 } |
| 568 FX_FLOAT fLineWidth = rect.width; | 568 FX_FLOAT fLineWidth = rect.width; |
| 569 if (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) { | 569 if (m_dwStyles & FDE_TTOSTYLE_VerticalLayout) { |
| 570 fLineWidth = rect.height; | 570 fLineWidth = rect.height; |
| 571 } | 571 } |
| 572 m_pTxtBreak->SetLineWidth(fLineWidth); | 572 m_pTxtBreak->SetLineWidth(fLineWidth); |
| 573 m_ttoLines.RemoveAll(TRUE); | 573 m_ttoLines.RemoveAll(TRUE); |
| 574 m_wsText.Empty(); | 574 m_wsText.clear(); |
| 575 LoadText(pwsStr, iLength, rect); | 575 LoadText(pwsStr, iLength, rect); |
| 576 if (m_dwStyles & FDE_TTOSTYLE_Ellipsis) { | 576 if (m_dwStyles & FDE_TTOSTYLE_Ellipsis) { |
| 577 ReplaceWidthEllipsis(); | 577 ReplaceWidthEllipsis(); |
| 578 } | 578 } |
| 579 Reload(rect); | 579 Reload(rect); |
| 580 DoAlignment(rect); | 580 DoAlignment(rect); |
| 581 OnDraw(rtClip); | 581 OnDraw(rtClip); |
| 582 } | 582 } |
| 583 void CFDE_TextOut::ExpandBuffer(int32_t iSize, int32_t iType) { | 583 void CFDE_TextOut::ExpandBuffer(int32_t iSize, int32_t iType) { |
| 584 switch (iType) { | 584 switch (iType) { |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 return NULL; | 1104 return NULL; |
| 1105 } | 1105 } |
| 1106 return m_pieces.GetPtrAt(index); | 1106 return m_pieces.GetPtrAt(index); |
| 1107 } | 1107 } |
| 1108 void CFDE_TTOLine::RemoveLast(int32_t iCount) { | 1108 void CFDE_TTOLine::RemoveLast(int32_t iCount) { |
| 1109 m_pieces.RemoveLast(iCount); | 1109 m_pieces.RemoveLast(iCount); |
| 1110 } | 1110 } |
| 1111 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { | 1111 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { |
| 1112 m_pieces.RemoveAll(bLeaveMemory); | 1112 m_pieces.RemoveAll(bLeaveMemory); |
| 1113 } | 1113 } |
| OLD | NEW |