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

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

Issue 1254703002: FX_BOOL considered harmful, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_FontMap.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_IconList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 int32_t CPWL_Icon::GetScaleMethod() 140 int32_t CPWL_Icon::GetScaleMethod()
141 { 141 {
142 if (m_pIconFit) 142 if (m_pIconFit)
143 return m_pIconFit->GetScaleMethod(); 143 return m_pIconFit->GetScaleMethod();
144 144
145 return 0; 145 return 0;
146 } 146 }
147 147
148 FX_BOOL»CPWL_Icon::IsProportionalScale() 148 bool» CPWL_Icon::IsProportionalScale()
149 { 149 {
150 if (m_pIconFit) 150 if (m_pIconFit)
151 return m_pIconFit->IsProportionalScale(); 151 return m_pIconFit->IsProportionalScale();
152 152
153 » return FALSE; 153 » return false;
154 } 154 }
155 155
156 void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom) 156 void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom)
157 { 157 {
158 if (m_pIconFit) 158 if (m_pIconFit)
159 { 159 {
160 //m_pIconFit->GetIconPosition(fLeft,fBottom); 160 //m_pIconFit->GetIconPosition(fLeft,fBottom);
161 fLeft = 0.0f; 161 fLeft = 0.0f;
162 fBottom = 0.0f; 162 fBottom = 0.0f;
163 CPDF_Array* pA = m_pIconFit->m_pDict ? m_pIconFit->m_pDict->GetA rray("A") : NULL; 163 CPDF_Array* pA = m_pIconFit->m_pDict ? m_pIconFit->m_pDict->GetA rray("A") : NULL;
164 if (pA != NULL) 164 if (pA != NULL)
165 { 165 {
166 FX_DWORD dwCount = pA->GetCount(); 166 FX_DWORD dwCount = pA->GetCount();
167 if (dwCount > 0) fLeft = pA->GetNumber(0); 167 if (dwCount > 0) fLeft = pA->GetNumber(0);
168 if (dwCount > 1) fBottom = pA->GetNumber(1); 168 if (dwCount > 1) fBottom = pA->GetNumber(1);
169 } 169 }
170 } 170 }
171 else 171 else
172 { 172 {
173 fLeft = 0.0f; 173 fLeft = 0.0f;
174 fBottom = 0.0f; 174 fBottom = 0.0f;
175 } 175 }
176 } 176 }
177 177
178 FX_BOOL CPWL_Icon::GetFittingBounds() 178 bool CPWL_Icon::GetFittingBounds()
179 { 179 {
180 if (m_pIconFit) 180 if (m_pIconFit)
181 return m_pIconFit->GetFittingBounds(); 181 return m_pIconFit->GetFittingBounds();
182 182
183 » return FALSE; 183 » return false;
184 } 184 }
185 185
186 void CPWL_Icon::GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale) 186 void CPWL_Icon::GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale)
187 { 187 {
188 fHScale = 1.0f; 188 fHScale = 1.0f;
189 fVScale = 1.0f; 189 fVScale = 1.0f;
190 190
191 if (m_pPDFStream) 191 if (m_pPDFStream)
192 { 192 {
193 FX_FLOAT fImageWidth,fImageHeight; 193 FX_FLOAT fImageWidth,fImageHeight;
(...skipping 59 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
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_FontMap.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_IconList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698