| 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->IsString()) { | 621 if (pOpt->IsString()) |
| 622 swItem = pOpt->GetUnicodeText(); | 622 swItem = pOpt->GetUnicodeText(); |
| 623 } else if (pOpt->GetType() == PDFOBJ_ARRAY) { | 623 else if (CPDF_Array* pArray = pOpt->AsArray()) |
| 624 swItem = | 624 swItem = pArray->GetElementValue(1)->GetUnicodeText(); |
| 625 ((CPDF_Array*)pOpt)->GetElementValue(1)->GetUnicodeText(); | 625 |
| 626 } | |
| 627 FX_BOOL bSelected = FALSE; | 626 FX_BOOL bSelected = FALSE; |
| 628 if (pSels) { | 627 if (pSels) { |
| 629 for (FX_DWORD s = 0, ssz = pSels->GetCount(); s < ssz; s++) { | 628 for (FX_DWORD s = 0, ssz = pSels->GetCount(); s < ssz; s++) { |
| 630 if (i == pSels->GetInteger(s)) { | 629 if (i == pSels->GetInteger(s)) { |
| 631 bSelected = TRUE; | 630 bSelected = TRUE; |
| 632 break; | 631 break; |
| 633 } | 632 } |
| 634 } | 633 } |
| 635 } | 634 } |
| 636 CPDF_VariableText vt; | 635 CPDF_VariableText vt; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 << "\n"; | 929 << "\n"; |
| 931 break; | 930 break; |
| 932 case CT_CMYK: | 931 case CT_CMYK: |
| 933 sColorStream << color.fColor1 << " " << color.fColor2 << " " | 932 sColorStream << color.fColor1 << " " << color.fColor2 << " " |
| 934 << color.fColor3 << " " << color.fColor4 << " " | 933 << color.fColor3 << " " << color.fColor4 << " " |
| 935 << (bFillOrStroke ? "k" : "K") << "\n"; | 934 << (bFillOrStroke ? "k" : "K") << "\n"; |
| 936 break; | 935 break; |
| 937 } | 936 } |
| 938 return sColorStream.GetByteString(); | 937 return sColorStream.GetByteString(); |
| 939 } | 938 } |
| OLD | NEW |