| 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 "xfa/fxfa/include/xfa_ffwidget.h" | 7 #include "xfa/fxfa/include/xfa_ffwidget.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 } else { | 997 } else { |
| 998 bsContent = CFX_ByteString::FromUnicode(wsImage); | 998 bsContent = CFX_ByteString::FromUnicode(wsImage); |
| 999 pImageFileRead = FX_CreateMemoryStream( | 999 pImageFileRead = FX_CreateMemoryStream( |
| 1000 (uint8_t*)(const uint8_t*)bsContent, bsContent.GetLength()); | 1000 (uint8_t*)(const uint8_t*)bsContent, bsContent.GetLength()); |
| 1001 } | 1001 } |
| 1002 } else { | 1002 } else { |
| 1003 CFX_WideString wsURL = wsHref; | 1003 CFX_WideString wsURL = wsHref; |
| 1004 if (wsURL.Left(7) != FX_WSTRC(L"http://") && | 1004 if (wsURL.Left(7) != FX_WSTRC(L"http://") && |
| 1005 wsURL.Left(6) != FX_WSTRC(L"ftp://")) { | 1005 wsURL.Left(6) != FX_WSTRC(L"ftp://")) { |
| 1006 CFX_DIBitmap* pBitmap = | 1006 CFX_DIBitmap* pBitmap = |
| 1007 pDoc->GetPDFNamedImage(wsURL.AsWideStringC(), iImageXDpi, iImageYDpi); | 1007 pDoc->GetPDFNamedImage(wsURL.AsStringC(), iImageXDpi, iImageYDpi); |
| 1008 if (pBitmap) { | 1008 if (pBitmap) { |
| 1009 bNameImage = TRUE; | 1009 bNameImage = TRUE; |
| 1010 return pBitmap; | 1010 return pBitmap; |
| 1011 } | 1011 } |
| 1012 } | 1012 } |
| 1013 pImageFileRead = pDoc->GetDocProvider()->OpenLinkedFile(pDoc, wsURL); | 1013 pImageFileRead = pDoc->GetDocProvider()->OpenLinkedFile(pDoc, wsURL); |
| 1014 } | 1014 } |
| 1015 if (!pImageFileRead) { | 1015 if (!pImageFileRead) { |
| 1016 FX_Free(pImageBuffer); | 1016 FX_Free(pImageBuffer); |
| 1017 return NULL; | 1017 return NULL; |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1957 iType != XFA_ELEMENT_Rectangle) { | 1957 iType != XFA_ELEMENT_Rectangle) { |
| 1958 return; | 1958 return; |
| 1959 } | 1959 } |
| 1960 CXFA_StrokeArray strokes; | 1960 CXFA_StrokeArray strokes; |
| 1961 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { | 1961 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { |
| 1962 box.GetStrokes(strokes); | 1962 box.GetStrokes(strokes); |
| 1963 } | 1963 } |
| 1964 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 1964 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 1965 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 1965 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 1966 } | 1966 } |
| OLD | NEW |