| 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/fxcrt/fx_xml.h" | 8 #include "../../include/fxcrt/fx_xml.h" |
| 9 typedef struct _PDFDOC_METADATA { | 9 typedef struct _PDFDOC_METADATA { |
| 10 CPDF_Document *m_pDoc; | 10 CPDF_Document *m_pDoc; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("Alt")); | 106 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("Alt")); |
| 107 if (!pElmnt) { | 107 if (!pElmnt) { |
| 108 continue; | 108 continue; |
| 109 } | 109 } |
| 110 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("li")); | 110 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("li")); |
| 111 if (!pElmnt) { | 111 if (!pElmnt) { |
| 112 continue; | 112 continue; |
| 113 } | 113 } |
| 114 wsStr = pElmnt->GetContent(0); | 114 wsStr = pElmnt->GetContent(0); |
| 115 return wsStr.GetLength(); | 115 return wsStr.GetLength(); |
| 116 } else if (bsItem == FX_BSTRC("Author")) { | 116 } |
| 117 if (bsItem == FX_BSTRC("Author")) { |
| 117 CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag); | 118 CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag); |
| 118 if (!pElmnt) { | 119 if (!pElmnt) { |
| 119 continue; | 120 continue; |
| 120 } | 121 } |
| 121 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("Seq")); | 122 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("Seq")); |
| 122 if (!pElmnt) { | 123 if (!pElmnt) { |
| 123 continue; | 124 continue; |
| 124 } | 125 } |
| 125 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("li")); | 126 pElmnt = pElmnt->GetElement(NULL, FX_BSTRC("li")); |
| 126 if (!pElmnt) { | 127 if (!pElmnt) { |
| 127 continue; | 128 continue; |
| 128 } | 129 } |
| 129 wsStr = pElmnt->GetContent(0); | 130 wsStr = pElmnt->GetContent(0); |
| 130 return wsStr.GetLength(); | 131 return wsStr.GetLength(); |
| 131 } else { | |
| 132 CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag); | |
| 133 if (!pElmnt) { | |
| 134 continue; | |
| 135 } | |
| 136 wsStr = pElmnt->GetContent(0); | |
| 137 return wsStr.GetLength(); | |
| 138 } | 132 } |
| 133 CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag); |
| 134 if (!pElmnt) { |
| 135 continue; |
| 136 } |
| 137 wsStr = pElmnt->GetContent(0); |
| 138 return wsStr.GetLength(); |
| 139 } | 139 } |
| 140 return -1; | 140 return -1; |
| 141 } | 141 } |
| 142 CXML_Element* CPDF_Metadata::GetRoot() const | 142 CXML_Element* CPDF_Metadata::GetRoot() const |
| 143 { | 143 { |
| 144 return ((PDFDOC_LPMETADATA)m_pData)->m_pXmlElmnt; | 144 return ((PDFDOC_LPMETADATA)m_pData)->m_pXmlElmnt; |
| 145 } | 145 } |
| 146 CXML_Element* CPDF_Metadata::GetRDF() const | 146 CXML_Element* CPDF_Metadata::GetRDF() const |
| 147 { | 147 { |
| 148 return ((PDFDOC_LPMETADATA)m_pData)->m_pElmntRdf; | 148 return ((PDFDOC_LPMETADATA)m_pData)->m_pElmntRdf; |
| 149 } | 149 } |
| OLD | NEW |