| 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 "../../third_party/base/nonstd_unique_ptr.h" | 7 #include "../../third_party/base/nonstd_unique_ptr.h" |
| 8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_util.h" | 10 #include "../include/fpdfxfa/fpdfxfa_util.h" |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 pImageDict->SetAtString("Name", "ImgC"); | 1119 pImageDict->SetAtString("Name", "ImgC"); |
| 1120 } | 1120 } |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 CPDF_IconFit iconFit = pControl->GetIconFit(); | 1123 CPDF_IconFit iconFit = pControl->GetIconFit(); |
| 1124 | 1124 |
| 1125 CPDFSDK_Document* pDoc = m_pInterForm->GetDocument(); | 1125 CPDFSDK_Document* pDoc = m_pInterForm->GetDocument(); |
| 1126 ASSERT(pDoc != NULL); | 1126 ASSERT(pDoc != NULL); |
| 1127 CPDFDoc_Environment* pEnv = pDoc->GetEnv(); | 1127 CPDFDoc_Environment* pEnv = pDoc->GetEnv(); |
| 1128 | 1128 |
| 1129 CBA_FontMap FontMap( | 1129 CBA_FontMap FontMap(this, pEnv->GetSysHandler()); |
| 1130 this, | |
| 1131 pEnv->GetSysHandler()); //, | |
| 1132 //ISystemHandle::GetSystemHandler(m_pBaseForm->Ge
tEnv())); | |
| 1133 FontMap.Initial(); | 1130 FontMap.Initial(); |
| 1134 | 1131 |
| 1135 FontMap.SetAPType("N"); | 1132 FontMap.SetAPType("N"); |
| 1136 | 1133 |
| 1137 CFX_ByteString csAP = | 1134 CFX_ByteString csAP = |
| 1138 CPWL_Utils::GetRectFillAppStream(rcWindow, crBackground) + | 1135 CPWL_Utils::GetRectFillAppStream(rcWindow, crBackground) + |
| 1139 CPWL_Utils::GetBorderAppStream(rcWindow, fBorderWidth, crBorder, | 1136 CPWL_Utils::GetBorderAppStream(rcWindow, fBorderWidth, crBorder, |
| 1140 crLeftTop, crRightBottom, nBorderStyle, | 1137 crLeftTop, crRightBottom, nBorderStyle, |
| 1141 dsBorder) + | 1138 dsBorder) + |
| 1142 CPWL_Utils::GetPushButtonAppStream( | 1139 CPWL_Utils::GetPushButtonAppStream( |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 | 1679 |
| 1683 CFX_ByteTextBuf sBody, sLines; | 1680 CFX_ByteTextBuf sBody, sLines; |
| 1684 | 1681 |
| 1685 if (IFX_Edit* pEdit = IFX_Edit::NewEdit()) { | 1682 if (IFX_Edit* pEdit = IFX_Edit::NewEdit()) { |
| 1686 pEdit->EnableRefresh(FALSE); | 1683 pEdit->EnableRefresh(FALSE); |
| 1687 | 1684 |
| 1688 CPDFSDK_Document* pDoc = m_pInterForm->GetDocument(); | 1685 CPDFSDK_Document* pDoc = m_pInterForm->GetDocument(); |
| 1689 ASSERT(pDoc != NULL); | 1686 ASSERT(pDoc != NULL); |
| 1690 CPDFDoc_Environment* pEnv = pDoc->GetEnv(); | 1687 CPDFDoc_Environment* pEnv = pDoc->GetEnv(); |
| 1691 | 1688 |
| 1692 CBA_FontMap FontMap( | 1689 CBA_FontMap FontMap(this, pEnv->GetSysHandler()); |
| 1693 this, | |
| 1694 pEnv->GetSysHandler()); //, | |
| 1695 //ISystemHandle::GetSystemHandler(m_pBaseForm->
GetEnv())); | |
| 1696 FontMap.Initial(); | 1690 FontMap.Initial(); |
| 1697 pEdit->SetFontMap(&FontMap); | 1691 pEdit->SetFontMap(&FontMap); |
| 1698 | 1692 |
| 1699 CPDF_Rect rcClient = GetClientRect(); | 1693 CPDF_Rect rcClient = GetClientRect(); |
| 1700 pEdit->SetPlateRect(rcClient); | 1694 pEdit->SetPlateRect(rcClient); |
| 1701 pEdit->SetAlignmentH(pControl->GetControlAlignment()); | 1695 pEdit->SetAlignmentH(pControl->GetControlAlignment()); |
| 1702 | 1696 |
| 1703 FX_DWORD dwFieldFlags = pField->GetFieldFlags(); | 1697 FX_DWORD dwFieldFlags = pField->GetFieldFlags(); |
| 1704 FX_BOOL bMultiLine = (dwFieldFlags >> 12) & 1; | 1698 FX_BOOL bMultiLine = (dwFieldFlags >> 12) & 1; |
| 1705 | 1699 |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 ASSERT(pAnnot != NULL); | 3359 ASSERT(pAnnot != NULL); |
| 3366 | 3360 |
| 3367 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3361 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
| 3368 ASSERT(pPDFAnnot != NULL); | 3362 ASSERT(pPDFAnnot != NULL); |
| 3369 | 3363 |
| 3370 CPDF_Rect rcAnnot; | 3364 CPDF_Rect rcAnnot; |
| 3371 pPDFAnnot->GetRect(rcAnnot); | 3365 pPDFAnnot->GetRect(rcAnnot); |
| 3372 | 3366 |
| 3373 return rcAnnot; | 3367 return rcAnnot; |
| 3374 } | 3368 } |
| OLD | NEW |