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

Side by Side Diff: fpdfsdk/formfiller/cba_fontmap.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again Created 4 years, 9 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 | « core/fxge/win32/fx_win32_gdipext.cpp ('k') | fpdfsdk/fpdfppo.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 "fpdfsdk/formfiller/cba_fontmap.h" 7 #include "fpdfsdk/formfiller/cba_fontmap.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { 200 CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
201 CPDF_Dictionary* pAcroFormDict = NULL; 201 CPDF_Dictionary* pAcroFormDict = NULL;
202 const bool bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget"); 202 const bool bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget");
203 if (bWidget) { 203 if (bWidget) {
204 if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot()) 204 if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot())
205 pAcroFormDict = pRootDict->GetDictBy("AcroForm"); 205 pAcroFormDict = pRootDict->GetDictBy("AcroForm");
206 } 206 }
207 207
208 CFX_ByteString sDA; 208 CFX_ByteString sDA;
209 CPDF_Object* pObj; 209 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pAnnotDict, "DA");
210 if ((pObj = FPDF_GetFieldAttr(m_pAnnotDict, "DA"))) 210 if (pObj)
211 sDA = pObj->GetString(); 211 sDA = pObj->GetString();
212 212
213 if (bWidget) { 213 if (bWidget) {
214 if (sDA.IsEmpty()) { 214 if (sDA.IsEmpty()) {
215 pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA"); 215 pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA");
216 sDA = pObj ? pObj->GetString() : CFX_ByteString(); 216 sDA = pObj ? pObj->GetString() : CFX_ByteString();
217 } 217 }
218 } 218 }
219 219
220 CPDF_Dictionary* pFontDict = NULL; 220 CPDF_Dictionary* pFontDict = NULL;
(...skipping 30 matching lines...) Expand all
251 251
252 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr; 252 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr;
253 } 253 }
254 254
255 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) { 255 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) {
256 m_sAPType = sAPType; 256 m_sAPType = sAPType;
257 257
258 Reset(); 258 Reset();
259 Initialize(); 259 Initialize();
260 } 260 }
OLDNEW
« no previous file with comments | « core/fxge/win32/fx_win32_gdipext.cpp ('k') | fpdfsdk/fpdfppo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698