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/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fsdk_mgr.h" | 8 #include "../include/fsdk_mgr.h" |
9 #include "../include/fsdk_baseannot.h" | 9 #include "../include/fsdk_baseannot.h" |
10 #include "../include/fsdk_baseform.h" | 10 #include "../include/fsdk_baseform.h" |
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 if (CPDF_Dictionary* pImageDict = pImage->GetDict()) | 1557 if (CPDF_Dictionary* pImageDict = pImage->GetDict()) |
1558 { | 1558 { |
1559 sImageAlias = pImageDict->GetString("Name"); | 1559 sImageAlias = pImageDict->GetString("Name"); |
1560 if (sImageAlias.IsEmpty()) | 1560 if (sImageAlias.IsEmpty()) |
1561 sImageAlias = "IMG"; | 1561 sImageAlias = "IMG"; |
1562 } | 1562 } |
1563 | 1563 |
1564 CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources"); | 1564 CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources"); |
1565 if (!pStreamResList) | 1565 if (!pStreamResList) |
1566 { | 1566 { |
1567 » » pStreamResList = FX_NEW CPDF_Dictionary(); | 1567 » » pStreamResList = new CPDF_Dictionary(); |
1568 pStreamDict->SetAt("Resources", pStreamResList); | 1568 pStreamDict->SetAt("Resources", pStreamResList); |
1569 } | 1569 } |
1570 | 1570 |
1571 » if (pStreamResList) | 1571 » if (pStreamResList) |
1572 { | 1572 { |
1573 » » CPDF_Dictionary* pXObject = FX_NEW CPDF_Dictionary;» »
» | 1573 » » CPDF_Dictionary* pXObject = new CPDF_Dictionary; |
1574 pXObject->SetAtReference(sImageAlias, pDoc, pImage); | 1574 pXObject->SetAtReference(sImageAlias, pDoc, pImage); |
1575 pStreamResList->SetAt("XObject", pXObject); | 1575 pStreamResList->SetAt("XObject", pXObject); |
1576 } | 1576 } |
1577 } | 1577 } |
1578 | 1578 |
1579 void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) | 1579 void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) |
1580 { | 1580 { |
1581 ASSERT(m_pAnnot != NULL); | 1581 ASSERT(m_pAnnot != NULL); |
1582 ASSERT(m_pAnnot->m_pAnnotDict != NULL); | 1582 ASSERT(m_pAnnot->m_pAnnotDict != NULL); |
1583 | 1583 |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3004 | 3004 |
3005 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3005 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
3006 ASSERT(pPDFAnnot != NULL); | 3006 ASSERT(pPDFAnnot != NULL); |
3007 | 3007 |
3008 CPDF_Rect rcAnnot; | 3008 CPDF_Rect rcAnnot; |
3009 pPDFAnnot->GetRect(rcAnnot); | 3009 pPDFAnnot->GetRect(rcAnnot); |
3010 | 3010 |
3011 return rcAnnot; | 3011 return rcAnnot; |
3012 } | 3012 } |
3013 | 3013 |
OLD | NEW |