summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_textlayout.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-21 13:37:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 13:37:10 -0700
commitbc1cbabe8d8bfa74d25160c14afa30d5b40df335 (patch)
treebc8ba8fbf303f863ca62d71f0bad013bd622309a /xfa/fxfa/app/xfa_textlayout.cpp
parent5d9da0c1255a75dd9b7b2005f8b7d6ae4948feaf (diff)
downloadpdfium-bc1cbabe8d8bfa74d25160c14afa30d5b40df335.tar.xz
Remove IFDE_CSSTagProvider.
There is only one subsclass, use that instead. Remove the use of WideStringC in the API. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1911843002
Diffstat (limited to 'xfa/fxfa/app/xfa_textlayout.cpp')
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index c0a8895bc7..b2030814bc 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,