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

Side by Side Diff: xfa/fde/css/fde_cssstyleselector.cpp

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 7 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 | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fde/css/fde_cssstylesheet.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 "xfa/fde/css/fde_cssstyleselector.h" 7 #include "xfa/fde/css/fde_cssstyleselector.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 } 537 }
538 void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl, 538 void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl,
539 const FX_WCHAR* psz, 539 const FX_WCHAR* psz,
540 int32_t iLen) { 540 int32_t iLen) {
541 ASSERT(pDecl && psz && iLen > 0); 541 ASSERT(pDecl && psz && iLen > 0);
542 std::unique_ptr<CFDE_CSSSyntaxParser> pSyntax(new CFDE_CSSSyntaxParser); 542 std::unique_ptr<CFDE_CSSSyntaxParser> pSyntax(new CFDE_CSSSyntaxParser);
543 if (!pSyntax->Init(psz, iLen, 32, TRUE)) 543 if (!pSyntax->Init(psz, iLen, 32, TRUE))
544 return; 544 return;
545 545
546 int32_t iLen2; 546 int32_t iLen2 = 0;
547 const FX_WCHAR* psz2; 547 const FX_WCHAR* psz2;
548 FDE_CSSPROPERTYARGS args; 548 FDE_CSSPROPERTYARGS args;
549 args.pStringCache = nullptr; 549 args.pStringCache = nullptr;
550 args.pStaticStore = m_pInlineStyleStore; 550 args.pStaticStore = m_pInlineStyleStore;
551 args.pProperty = nullptr; 551 args.pProperty = nullptr;
552 CFX_WideString wsName; 552 CFX_WideString wsName;
553 while (1) { 553 while (1) {
554 FDE_CSSSYNTAXSTATUS eStatus = pSyntax->DoSyntaxParse(); 554 FDE_CSSSYNTAXSTATUS eStatus = pSyntax->DoSyntaxParse();
555 if (eStatus == FDE_CSSSYNTAXSTATUS_PropertyName) { 555 if (eStatus == FDE_CSSSYNTAXSTATUS_PropertyName) {
556 psz2 = pSyntax->GetCurrentString(iLen2); 556 psz2 = pSyntax->GetCurrentString(iLen2);
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 return FDE_CSSTEXTTRANSFORM_LowerCase; 1774 return FDE_CSSTEXTTRANSFORM_LowerCase;
1775 default: 1775 default:
1776 return FDE_CSSTEXTTRANSFORM_None; 1776 return FDE_CSSTEXTTRANSFORM_None;
1777 } 1777 }
1778 } 1778 }
1779 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant( 1779 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant(
1780 FDE_CSSPROPERTYVALUE eValue) { 1780 FDE_CSSPROPERTYVALUE eValue) {
1781 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps 1781 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps
1782 : FDE_CSSFONTVARIANT_Normal; 1782 : FDE_CSSFONTVARIANT_Normal;
1783 } 1783 }
OLDNEW
« no previous file with comments | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fde/css/fde_cssstylesheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698