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 "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "../../include/fpdfdoc/fpdf_doc.h" |
8 #include "../../include/fpdfdoc/fpdf_vt.h" | 8 #include "../../include/fpdfdoc/fpdf_vt.h" |
9 #include "pdf_vt.h" | 9 #include "pdf_vt.h" |
10 const uint8_t gFontSizeSteps[] = { 4, 6, 8, 9, 10, 12, 14, 18, 20, 25,
30, 35, 40, 45, 50, 55, 60, 70, 80, 90, 100, 110, 120, 130, 144}; | 10 const uint8_t gFontSizeSteps[] = { 4, 6, 8, 9, 10, 12, 14, 18, 20, 25,
30, 35, 40, 45, 50, 55, 60, 70, 80, 90, 100, 110, 120, 130, 144}; |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 m_wSubWord(0), | 815 m_wSubWord(0), |
816 m_fFontSize(0.0f), | 816 m_fFontSize(0.0f), |
817 m_bInitial(FALSE), | 817 m_bInitial(FALSE), |
818 m_bRichText(FALSE), | 818 m_bRichText(FALSE), |
819 m_pVTProvider(NULL), | 819 m_pVTProvider(NULL), |
820 m_pVTIterator(NULL) | 820 m_pVTIterator(NULL) |
821 { | 821 { |
822 } | 822 } |
823 CPDF_VariableText::~CPDF_VariableText() | 823 CPDF_VariableText::~CPDF_VariableText() |
824 { | 824 { |
825 if (m_pVTIterator) { | 825 delete m_pVTIterator; |
826 delete m_pVTIterator; | 826 m_pVTIterator = NULL; |
827 m_pVTIterator = NULL; | |
828 } | |
829 ResetAll(); | 827 ResetAll(); |
830 } | 828 } |
831 void CPDF_VariableText::Initialize() | 829 void CPDF_VariableText::Initialize() |
832 { | 830 { |
833 if (!m_bInitial) { | 831 if (!m_bInitial) { |
834 CPVT_SectionInfo secinfo; | 832 CPVT_SectionInfo secinfo; |
835 if (m_bRichText) { | 833 if (m_bRichText) { |
836 secinfo.pSecProps = new CPVT_SecProps(0.0f, 0.0f, 0); | 834 secinfo.pSecProps = new CPVT_SecProps(0.0f, 0.0f, 0); |
837 secinfo.pWordProps = new CPVT_WordProps(GetDefaultFontIndex(), PVT_D
EFAULT_FONTSIZE, 0, 0, 0); | 835 secinfo.pWordProps = new CPVT_WordProps(GetDefaultFontIndex(), PVT_D
EFAULT_FONTSIZE, 0, 0, 0); |
838 } | 836 } |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1848 if (pSection->m_SecInfo.pSecProps) { | 1846 if (pSection->m_SecInfo.pSecProps) { |
1849 *pSection->m_SecInfo.pSecProps = section.SecProps; | 1847 *pSection->m_SecInfo.pSecProps = section.SecProps; |
1850 } | 1848 } |
1851 if (pSection->m_SecInfo.pWordProps) { | 1849 if (pSection->m_SecInfo.pWordProps) { |
1852 *pSection->m_SecInfo.pWordProps = section.WordProps; | 1850 *pSection->m_SecInfo.pWordProps = section.WordProps; |
1853 } | 1851 } |
1854 return TRUE; | 1852 return TRUE; |
1855 } | 1853 } |
1856 return FALSE; | 1854 return FALSE; |
1857 } | 1855 } |
OLD | NEW |