Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_Icon.cpp

Issue 1194933003: Make CPDF_Object::GetString() a virtual method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/pdfwindow/PDFWindow.h" 7 #include "../../include/pdfwindow/PDFWindow.h"
8 #include "../../include/pdfwindow/PWL_Wnd.h" 8 #include "../../include/pdfwindow/PWL_Wnd.h"
9 #include "../../include/pdfwindow/PWL_Icon.h" 9 #include "../../include/pdfwindow/PWL_Icon.h"
10 #include "../../include/pdfwindow/PWL_Utils.h" 10 #include "../../include/pdfwindow/PWL_Utils.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 CFX_ByteString CPWL_Image::GetImageAlias() 94 CFX_ByteString CPWL_Image::GetImageAlias()
95 { 95 {
96 if (m_sImageAlias.IsEmpty()) 96 if (m_sImageAlias.IsEmpty())
97 { 97 {
98 if (m_pPDFStream) 98 if (m_pPDFStream)
99 { 99 {
100 if (CPDF_Dictionary * pDict = m_pPDFStream->GetDict()) 100 if (CPDF_Dictionary * pDict = m_pPDFStream->GetDict())
101 { 101 {
102 » » » » return pDict->GetString("Name"); 102 » » » » return pDict->GetStringAt("Name");
103 } 103 }
104 } 104 }
105 } 105 }
106 else 106 else
107 return m_sImageAlias; 107 return m_sImageAlias;
108 108
109 return CFX_ByteString(); 109 return CFX_ByteString();
110 } 110 }
111 111
112 void CPWL_Image::SetImageAlias(const FX_CHAR* sImageAlias) 112 void CPWL_Image::SetImageAlias(const FX_CHAR* sImageAlias)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 FX_FLOAT fPlateWidth,fPlateHeight; 254 FX_FLOAT fPlateWidth,fPlateHeight;
255 CPDF_Rect rcPlate = GetClientRect(); 255 CPDF_Rect rcPlate = GetClientRect();
256 fPlateWidth = rcPlate.right - rcPlate.left; 256 fPlateWidth = rcPlate.right - rcPlate.left;
257 fPlateHeight = rcPlate.top - rcPlate.bottom; 257 fPlateHeight = rcPlate.top - rcPlate.bottom;
258 258
259 x = (fPlateWidth - fImageFactWidth) * fLeft; 259 x = (fPlateWidth - fImageFactWidth) * fLeft;
260 y = (fPlateHeight - fImageFactHeight) * fBottom; 260 y = (fPlateHeight - fImageFactHeight) * fBottom;
261 } 261 }
262 262
OLDNEW
« core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('K') | « fpdfsdk/src/fsdk_mgr.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698