| 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_ap.h" | 7 #include "../../include/fpdfdoc/fpdf_ap.h" |
| 8 #include "../../include/fpdfdoc/fpdf_doc.h" | 8 #include "../../include/fpdfdoc/fpdf_doc.h" |
| 9 #include "../../include/fpdfdoc/fpdf_vt.h" | 9 #include "../../include/fpdfdoc/fpdf_vt.h" |
| 10 #include "doc_utils.h" | 10 #include "doc_utils.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 : 0; | 611 : 0; |
| 612 CFX_ByteTextBuf sBody; | 612 CFX_ByteTextBuf sBody; |
| 613 if (pOpts) { | 613 if (pOpts) { |
| 614 FX_FLOAT fy = rcBody.top; | 614 FX_FLOAT fy = rcBody.top; |
| 615 for (int32_t i = nTop, sz = pOpts->GetCount(); i < sz; i++) { | 615 for (int32_t i = nTop, sz = pOpts->GetCount(); i < sz; i++) { |
| 616 if (IsFloatSmaller(fy, rcBody.bottom)) { | 616 if (IsFloatSmaller(fy, rcBody.bottom)) { |
| 617 break; | 617 break; |
| 618 } | 618 } |
| 619 if (CPDF_Object* pOpt = pOpts->GetElementValue(i)) { | 619 if (CPDF_Object* pOpt = pOpts->GetElementValue(i)) { |
| 620 CFX_WideString swItem; | 620 CFX_WideString swItem; |
| 621 if (pOpt->GetType() == PDFOBJ_STRING) { | 621 if (pOpt->IsString()) { |
| 622 swItem = pOpt->GetUnicodeText(); | 622 swItem = pOpt->GetUnicodeText(); |
| 623 } else if (pOpt->GetType() == PDFOBJ_ARRAY) { | 623 } else if (pOpt->GetType() == PDFOBJ_ARRAY) { |
| 624 swItem = | 624 swItem = |
| 625 ((CPDF_Array*)pOpt)->GetElementValue(1)->GetUnicodeText(); | 625 ((CPDF_Array*)pOpt)->GetElementValue(1)->GetUnicodeText(); |
| 626 } | 626 } |
| 627 FX_BOOL bSelected = FALSE; | 627 FX_BOOL bSelected = FALSE; |
| 628 if (pSels) { | 628 if (pSels) { |
| 629 for (FX_DWORD s = 0, ssz = pSels->GetCount(); s < ssz; s++) { | 629 for (FX_DWORD s = 0, ssz = pSels->GetCount(); s < ssz; s++) { |
| 630 if (i == pSels->GetInteger(s)) { | 630 if (i == pSels->GetInteger(s)) { |
| 631 bSelected = TRUE; | 631 bSelected = TRUE; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 << "\n"; | 930 << "\n"; |
| 931 break; | 931 break; |
| 932 case CT_CMYK: | 932 case CT_CMYK: |
| 933 sColorStream << color.fColor1 << " " << color.fColor2 << " " | 933 sColorStream << color.fColor1 << " " << color.fColor2 << " " |
| 934 << color.fColor3 << " " << color.fColor4 << " " | 934 << color.fColor3 << " " << color.fColor4 << " " |
| 935 << (bFillOrStroke ? "k" : "K") << "\n"; | 935 << (bFillOrStroke ? "k" : "K") << "\n"; |
| 936 break; | 936 break; |
| 937 } | 937 } |
| 938 return sColorStream.GetByteString(); | 938 return sColorStream.GetByteString(); |
| 939 } | 939 } |
| OLD | NEW |