| 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/fxfa/app/xfa_textlayout.h" | 7 #include "xfa/fxfa/app/xfa_textlayout.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 m_mapXMLNodeToParseContext.RemoveAll(); | 88 m_mapXMLNodeToParseContext.RemoveAll(); |
| 89 m_pAllocator.reset(); | 89 m_pAllocator.reset(); |
| 90 } | 90 } |
| 91 void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) { | 91 void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) { |
| 92 if (!pTextProvider) | 92 if (!pTextProvider) |
| 93 return; | 93 return; |
| 94 | 94 |
| 95 if (!m_pSelector) { | 95 if (!m_pSelector) { |
| 96 CXFA_FFDoc* pDoc = pTextProvider->GetDocNode(); | 96 CXFA_FFDoc* pDoc = pTextProvider->GetDocNode(); |
| 97 IFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr(); | 97 CFGAS_FontMgr* pFontMgr = pDoc->GetApp()->GetFDEFontMgr(); |
| 98 ASSERT(pFontMgr); | 98 ASSERT(pFontMgr); |
| 99 m_pSelector.reset(new CFDE_CSSStyleSelector(pFontMgr)); | 99 m_pSelector.reset(new CFDE_CSSStyleSelector(pFontMgr)); |
| 100 FX_FLOAT fFontSize = 10; | 100 FX_FLOAT fFontSize = 10; |
| 101 CXFA_Font font = pTextProvider->GetFontNode(); | 101 CXFA_Font font = pTextProvider->GetFontNode(); |
| 102 if (font) { | 102 if (font) { |
| 103 fFontSize = font.GetFontSize(); | 103 fFontSize = font.GetFontSize(); |
| 104 } | 104 } |
| 105 m_pSelector->SetDefFontSize(fFontSize); | 105 m_pSelector->SetDefFontSize(fFontSize); |
| 106 } | 106 } |
| 107 if (!m_pUASheet) { | 107 if (!m_pUASheet) { |
| (...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2094 m_tabstops.RemoveAll(); | 2094 m_tabstops.RemoveAll(); |
| 2095 m_iTabCount = 0; | 2095 m_iTabCount = 0; |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 void CXFA_TextTabstopsContext::Reset() { | 2098 void CXFA_TextTabstopsContext::Reset() { |
| 2099 m_iTabIndex = -1; | 2099 m_iTabIndex = -1; |
| 2100 m_bTabstops = false; | 2100 m_bTabstops = false; |
| 2101 m_fTabWidth = 0; | 2101 m_fTabWidth = 0; |
| 2102 m_fLeft = 0; | 2102 m_fLeft = 0; |
| 2103 } | 2103 } |
| OLD | NEW |