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

Unified Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 1911843002: Remove IFDE_CSSTagProvider. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_textlayout.cpp
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index c0a8895bc71264f981c95a70028f3b7e6c83ad24..b2030814bc339ac3ef9d180549f3b719949aca6f 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -21,40 +21,11 @@
#include "xfa/fxfa/include/xfa_ffdoc.h"
#include "xfa/fxfa/include/xfa_fontmgr.h"
-CXFA_CSSTagProvider::~CXFA_CSSTagProvider() {
- FX_POSITION pos = m_Attributes.GetStartPosition();
- while (pos) {
- CFX_WideString *pName = NULL, *pValue = NULL;
- m_Attributes.GetNextAssoc(pos, (void*&)pName, (void*&)pValue);
- delete pName;
- delete pValue;
- }
-}
-void CXFA_CSSTagProvider::GetNextAttribute(FX_POSITION& pos,
- CFX_WideStringC& wsAttr,
- CFX_WideStringC& wsValue) {
- if (pos == NULL) {
- return;
- }
- CFX_WideString* pName = NULL;
- CFX_WideString* pValue = NULL;
- m_Attributes.GetNextAssoc(pos, (void*&)pName, (void*&)pValue);
- wsAttr = pName->AsStringC();
- wsValue = pValue->AsStringC();
-}
-void CXFA_CSSTagProvider::SetAttribute(const CFX_WideString& wsAttr,
- const CFX_WideString& wsValue) {
- CFX_WideString* pName = new CFX_WideString();
- CFX_WideString* pValue = new CFX_WideString();
- *pName = wsAttr;
- *pValue = wsValue;
- m_Attributes.SetAt(pName, pValue);
-}
void CXFA_TextParseContext::SetDecls(const IFDE_CSSDeclaration** ppDeclArray,
int32_t iDeclCount) {
- if (iDeclCount <= 0 || ppDeclArray == NULL) {
+ if (iDeclCount <= 0 || !ppDeclArray)
return;
- }
+
m_dwMatchedDecls = iDeclCount;
m_ppMatchedDecls = FX_Alloc(IFDE_CSSDeclaration*, iDeclCount);
FXSYS_memcpy(m_ppMatchedDecls, ppDeclArray,
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698