summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-25 16:46:22 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-25 16:46:22 -0500
commit27990e23f651cc3c06fe2952bb14731a34f6d7b1 (patch)
treebea1d67f1c235350875b8533d921f48b6ef60f09 /xfa
parent32982d3531f15561271b7d67062c8b3e21bd3af9 (diff)
downloadpdfium-27990e23f651cc3c06fe2952bb14731a34f6d7b1.tar.xz
Remove fde_mem.h
The fde_memory.h include wasn't needed. This CL converts the FDE_NewWith and FDE_DeleteWith calls to their FXTARGET_ counterparts. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736053002 .
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fdp/include/fde_mem.h17
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.cpp9
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.cpp113
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp10
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h3
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp16
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp14
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.h5
8 files changed, 87 insertions, 100 deletions
diff --git a/xfa/src/fdp/include/fde_mem.h b/xfa/src/fdp/include/fde_mem.h
deleted file mode 100644
index 9a292bef04..0000000000
--- a/xfa/src/fdp/include/fde_mem.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-// TODO(thestig): Remove this file and do IWYU.
-
-#ifndef XFA_SRC_FDP_INCLUDE_FDE_MEM_H_
-#define XFA_SRC_FDP_INCLUDE_FDE_MEM_H_
-
-#include "core/include/fxcrt/fx_memory.h"
-
-#define FDE_NewWith FXTARGET_NewWith
-#define FDE_DeleteWith FXTARGET_DeleteWith
-
-#endif // XFA_SRC_FDP_INCLUDE_FDE_MEM_H_
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index bf6338bc39..ca9e552dbf 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.cpp
@@ -6,7 +6,6 @@
#include <algorithm>
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fdp/src/css/fde_csscache.h"
#include "xfa/src/foxitlib.h"
@@ -27,7 +26,7 @@ CFDE_CSSStyleSheetCache::CFDE_CSSStyleSheetCache()
CFDE_CSSStyleSheetCache::~CFDE_CSSStyleSheetCache() {
for (const auto& pair : m_Stylesheets) {
- FDE_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, pair.second);
+ FXTARGET_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, pair.second);
}
m_Stylesheets.clear();
if (m_pFixedStore) {
@@ -57,7 +56,7 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(const CFX_ByteStringC& szKey,
RemoveLowestActivityItem();
}
m_Stylesheets[szKey] =
- FDE_NewWith(m_pFixedStore) FDE_CSSCACHEITEM(pStyleSheet);
+ FXTARGET_NewWith(m_pFixedStore) FDE_CSSCACHEITEM(pStyleSheet);
}
}
IFDE_CSSStyleSheet* CFDE_CSSStyleSheetCache::GetStyleSheet(
@@ -76,7 +75,7 @@ void CFDE_CSSStyleSheetCache::RemoveStyleSheet(const CFX_ByteStringC& szKey) {
if (it == m_Stylesheets.end()) {
return;
}
- FDE_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, it->second);
+ FXTARGET_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, it->second);
m_Stylesheets.erase(it);
}
void CFDE_CSSStyleSheetCache::RemoveLowestActivityItem() {
@@ -93,7 +92,7 @@ void CFDE_CSSStyleSheetCache::RemoveLowestActivityItem() {
}
}
if (found != m_Stylesheets.end()) {
- FDE_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, found->second);
+ FXTARGET_DeleteWith(FDE_CSSCACHEITEM, m_pFixedStore, found->second);
m_Stylesheets.erase(found);
}
}
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
index 46cb42bb59..57b36daa82 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
@@ -6,7 +6,6 @@
#include "xfa/src/fdp/src/css/fde_cssdeclaration.h"
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
@@ -84,19 +83,19 @@ IFDE_CSSPrimitiveValue* CFDE_CSSDeclaration::NewNumberValue(
if (eUnit == FDE_CSSPRIMITIVETYPE_Number && FXSYS_fabs(fValue) < 0.001f) {
return &s_ZeroValue;
}
- return FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eUnit, fValue);
+ return FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eUnit, fValue);
}
inline IFDE_CSSPrimitiveValue* CFDE_CSSDeclaration::NewEnumValue(
IFX_MEMAllocator* pStaticStore,
FDE_CSSPROPERTYVALUE eValue) const {
- return FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eValue);
+ return FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eValue);
}
void CFDE_CSSDeclaration::AddPropertyHolder(IFX_MEMAllocator* pStaticStore,
FDE_CSSPROPERTY eProperty,
IFDE_CSSValue* pValue,
FX_BOOL bImportant) {
FDE_CSSPROPERTYHOLDER* pHolder =
- FDE_NewWith(pStaticStore) FDE_CSSPROPERTYHOLDER;
+ FXTARGET_NewWith(pStaticStore) FDE_CSSPROPERTYHOLDER;
pHolder->bImportant = bImportant;
pHolder->eProperty = eProperty;
pHolder->pValue = pValue;
@@ -272,7 +271,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
FDE_CSSCUSTOMPROPERTY* pProperty =
- FDE_NewWith(pArgs->pStaticStore) FDE_CSSCUSTOMPROPERTY;
+ FXTARGET_NewWith(pArgs->pStaticStore) FDE_CSSCUSTOMPROPERTY;
pProperty->pwsName = CopyToLocal(pArgs, pszName, iNameLen);
pProperty->pwsValue = CopyToLocal(pArgs, pszValue, iValueLen);
pProperty->pNext = NULL;
@@ -309,7 +308,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
if (!FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
return NULL;
}
- return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ return FXTARGET_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
@@ -323,7 +322,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
}
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
- ? FDE_NewWith(pArgs->pStaticStore)
+ ? FXTARGET_NewWith(pArgs->pStaticStore)
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue)
: NULL;
}
@@ -340,7 +339,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(
}
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
- ? FDE_NewWith(pArgs->pStaticStore)
+ ? FXTARGET_NewWith(pArgs->pStaticStore)
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue)
: NULL;
}
@@ -384,9 +383,10 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(
argumentArr.Add(pFunctionValue);
continue;
}
- argumentArr.Add(FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String,
- CopyToLocal(pArgs, pszValue, iValueLen)));
+ argumentArr.Add(FXTARGET_NewWith(pArgs->pStaticStore)
+ CFDE_CSSPrimitiveValue(
+ FDE_CSSPRIMITIVETYPE_String,
+ CopyToLocal(pArgs, pszValue, iValueLen)));
} break;
case FDE_CSSPRIMITIVETYPE_Number: {
FX_FLOAT fValue;
@@ -396,17 +396,19 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(
}
} break;
default:
- argumentArr.Add(FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String,
- CopyToLocal(pArgs, pszValue, iValueLen)));
+ argumentArr.Add(FXTARGET_NewWith(pArgs->pStaticStore)
+ CFDE_CSSPrimitiveValue(
+ FDE_CSSPRIMITIVETYPE_String,
+ CopyToLocal(pArgs, pszValue, iValueLen)));
break;
}
}
- IFDE_CSSValueList* pArgumentList = FDE_NewWith(pArgs->pStaticStore)
+ IFDE_CSSValueList* pArgumentList = FXTARGET_NewWith(pArgs->pStaticStore)
CFDE_CSSValueList(pArgs->pStaticStore, argumentArr);
- CFDE_CSSFunction* pFunction = FDE_NewWith(pArgs->pStaticStore)
+ CFDE_CSSFunction* pFunction = FXTARGET_NewWith(pArgs->pStaticStore)
CFDE_CSSFunction(pszFuncName, pArgumentList);
- return FDE_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(pFunction);
+ return FXTARGET_NewWith(pArgs->pStaticStore)
+ CFDE_CSSPrimitiveValue(pFunction);
}
FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(
const FDE_CSSPROPERTYARGS* pArgs,
@@ -420,7 +422,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(
while (parser.NextValue(eType, pszValue, iValueLen)) {
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
break;
case FDE_CSSPRIMITIVETYPE_Number:
@@ -454,7 +456,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(
list.Add(pFunction);
continue;
}
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
} break;
case FDE_CSSPRIMITIVETYPE_RGB:
@@ -467,7 +469,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseContentProperty(
return FALSE;
}
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName,
- FDE_NewWith(pStaticStore)
+ FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, list),
bImportant);
return TRUE;
@@ -489,7 +491,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType)) {
if (list.GetSize() == 1) {
list.Add(NewNumberValue(pStaticStore, eType, fValue));
- listFull.Add(FDE_NewWith(pStaticStore)
+ listFull.Add(FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, list));
list.RemoveAll();
} else {
@@ -500,14 +502,14 @@ FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(
case FDE_CSSPRIMITIVETYPE_String: {
if (list.GetSize() == 0) {
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
FDE_CSSPRIMITIVETYPE_String, pszValue));
} else {
- listFull.Add(FDE_NewWith(pStaticStore)
+ listFull.Add(FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, list));
list.RemoveAll();
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
FDE_CSSPRIMITIVETYPE_String, pszValue));
}
} break;
@@ -516,14 +518,14 @@ FX_BOOL CFDE_CSSDeclaration::ParseCounterProperty(
}
}
if (list.GetSize() == 1) {
- listFull.Add(FDE_NewWith(pStaticStore)
+ listFull.Add(FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, list));
}
if (listFull.GetSize() == 0) {
return FALSE;
}
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName,
- FDE_NewWith(pStaticStore)
+ FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, listFull),
bImportant);
return TRUE;
@@ -554,7 +556,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(
if (dwType & FDE_CSSVALUETYPE_MaybeColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor));
+ list.Add(FXTARGET_NewWith(pStaticStore)
+ CFDE_CSSPrimitiveValue(dwColor));
continue;
}
}
@@ -568,7 +571,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(
}
if (dwType & FDE_CSSVALUETYPE_MaybeString) {
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
FDE_CSSPRIMITIVETYPE_String, pszValue));
}
break;
@@ -576,7 +579,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(
if (dwType & FDE_CSSVALUETYPE_MaybeColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- list.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor));
+ list.Add(FXTARGET_NewWith(pStaticStore)
+ CFDE_CSSPrimitiveValue(dwColor));
}
}
break;
@@ -615,7 +619,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseValueListProperty(
FDE_CSSPROPERTY_PaddingBottom);
default: {
CFDE_CSSValueList* pList =
- FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, list);
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, list);
AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, pList,
bImportant);
return TRUE;
@@ -684,7 +688,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(
if (pColor == NULL) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColor = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pColor =
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
}
break;
@@ -693,7 +698,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(
FDE_GetCSSColorByName(pszValue, iValueLen);
if (pColorItem != NULL) {
if (pColor == NULL) {
- pColor = FDE_NewWith(pStaticStore)
+ pColor = FXTARGET_NewWith(pStaticStore)
CFDE_CSSPrimitiveValue(pColorItem->dwValue);
}
continue;
@@ -706,8 +711,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(
switch (pValue->eName) {
case FDE_CSSPROPERTYVALUE_Transparent:
if (pColor == NULL) {
- pColor =
- FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = FXTARGET_NewWith(pStaticStore)
+ CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
break;
case FDE_CSSPROPERTYVALUE_Thin:
@@ -740,7 +745,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBorderPropoerty(
}
}
if (pColor == NULL) {
- pColor = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
if (pStyle == NULL) {
pStyle = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
@@ -775,7 +780,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseListStyleProperty(
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
if (pImage == NULL) {
- pImage = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ pImage = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen));
}
break;
@@ -856,7 +861,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
if (pImage == NULL) {
- pImage = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ pImage = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen));
}
break;
@@ -883,7 +888,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
break;
case FDE_CSSPROPERTYVALUE_Transparent:
if (pColor == NULL) {
- pColor = FDE_NewWith(pStaticStore)
+ pColor = FXTARGET_NewWith(pStaticStore)
CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
break;
@@ -929,7 +934,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
FDE_GetCSSColorByName(pszValue, iValueLen);
if (pColorItem != NULL)
if (pColor == NULL) {
- pColor = FDE_NewWith(pStaticStore)
+ pColor = FXTARGET_NewWith(pStaticStore)
CFDE_CSSPrimitiveValue(pColorItem->dwValue);
}
} break;
@@ -937,7 +942,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
if (pColor == NULL) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColor = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pColor =
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
}
break;
@@ -946,7 +952,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
}
}
if (pColor == NULL) {
- pColor = FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
if (pImage == NULL) {
pImage = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
@@ -967,7 +973,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseBackgroundProperty(
position.Add(pPosX);
position.Add(pPosY);
CFDE_CSSValueList* pPosList =
- FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, position);
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, position);
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundColor, pColor,
bImportant);
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundImage, pImage,
@@ -1046,7 +1052,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
}
if (pFontSize != NULL) {
- familyList.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ familyList.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
}
parser.m_Separator = ',';
@@ -1110,8 +1116,8 @@ FX_BOOL CFDE_CSSDeclaration::ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_LineHeight, pLineHeight,
bImportant);
if (familyList.GetSize() > 0) {
- CFDE_CSSValueList* pList =
- FDE_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, familyList);
+ CFDE_CSSValueList* pList = FXTARGET_NewWith(pStaticStore)
+ CFDE_CSSValueList(pStaticStore, familyList);
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontFamily, pList,
bImportant);
}
@@ -1169,7 +1175,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor) &&
pColumnRuleColor == NULL) {
- pColumnRuleColor = FDE_NewWith(pStaticStore)
+ pColumnRuleColor = FXTARGET_NewWith(pStaticStore)
CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
continue;
}
@@ -1185,7 +1191,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(
FX_ARGB dwColor;
if (pColumnRuleColor == NULL &&
FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColumnRuleColor = FDE_NewWith(pStaticStore)
+ pColumnRuleColor = FXTARGET_NewWith(pStaticStore)
CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
}
} break;
@@ -1205,7 +1211,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseColumnRuleProperty(
}
if (pColumnRuleColor == NULL) {
pColumnRuleColor =
- FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleStyle,
pColumnRuleStyle, bImportant);
@@ -1237,18 +1243,19 @@ FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
pEmphasisColor =
- FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
continue;
}
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- arrEmphasisStyle.Add(FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String, pszValue));
+ arrEmphasisStyle.Add(
+ FXTARGET_NewWith(pStaticStore)
+ CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue));
} break;
case FDE_CSSPRIMITIVETYPE_RGB: {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
pEmphasisColor =
- FDE_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
} break;
default:
@@ -1257,7 +1264,7 @@ FX_BOOL CFDE_CSSDeclaration::ParseTextEmphasisProperty(
}
if (arrEmphasisStyle.GetSize() != 0) {
AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_TextEmphasisStyle,
- FDE_NewWith(pStaticStore)
+ FXTARGET_NewWith(pStaticStore)
CFDE_CSSValueList(pStaticStore, arrEmphasisStyle),
bImportant);
}
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index f51d7418d9..5f51eb89b6 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -205,7 +205,7 @@ FX_BOOL CFDE_CSSRuleCollection::AddRuleTo(FDE_CSSRULEDATA*& pList,
FDE_CSSRULEDATA* CFDE_CSSRuleCollection::NewRuleData(
IFDE_CSSSelector* pSel,
IFDE_CSSDeclaration* pDecl) {
- return FDE_NewWith(m_pStaticStore)
+ return FXTARGET_NewWith(m_pStaticStore)
FDE_CSSRULEDATA(pSel, pDecl, ++m_iSelectors);
}
@@ -258,8 +258,8 @@ IFDE_CSSComputedStyle* CFDE_CSSStyleSelector::CreateComputedStyle(
sizeof(CFDE_CSSComputedStyle));
FXSYS_assert(m_pFixedStyleStore != NULL);
}
- CFDE_CSSComputedStyle* pStyle =
- FDE_NewWith(m_pFixedStyleStore) CFDE_CSSComputedStyle(m_pFixedStyleStore);
+ CFDE_CSSComputedStyle* pStyle = FXTARGET_NewWith(m_pFixedStyleStore)
+ CFDE_CSSComputedStyle(m_pFixedStyleStore);
if (pParentStyle) {
pStyle->m_InheritedData =
((CFDE_CSSComputedStyle*)pParentStyle)->m_InheritedData;
@@ -442,12 +442,12 @@ void CFDE_CSSStyleSelector::ComputeStyle(
FX_HashCode_String_GetW(L"align", 5, TRUE);
if (dwAttriHash == s_dwStyleHash) {
if (pDecl == NULL) {
- pDecl = FDE_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration;
+ pDecl = FXTARGET_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration;
}
AppendInlineStyle(pDecl, wsValue.GetPtr(), wsValue.GetLength());
} else if (dwAttriHash == s_dwAlignHash) {
if (pDecl == NULL) {
- pDecl = FDE_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration;
+ pDecl = FXTARGET_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration;
}
FDE_CSSPROPERTYARGS args;
args.pStringCache = NULL;
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index d1ae0f2979..aad5531de1 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -9,7 +9,6 @@
#include <vector>
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fgas/include/fx_sys.h"
#define FDE_CSSUNIVERSALHASH ('*')
@@ -386,7 +385,7 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
if (m_NonInheritedData.m_pCounterStyle != NULL) {
delete m_NonInheritedData.m_pCounterStyle;
}
- FDE_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this);
+ FXTARGET_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this);
}
return dwRefCount;
}
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index c41571a121..b9ecd500a6 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -6,7 +6,6 @@
#include "xfa/src/fdp/src/css/fde_cssstylesheet.h"
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fdp/src/css/fde_cssdatatable.h"
#include "xfa/src/fdp/src/css/fde_csssyntax.h"
#include "xfa/src/fgas/include/fx_cpg.h"
@@ -216,7 +215,8 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if ((dwMediaList & m_dwMediaList) > 0 && pMediaRule == NULL) {
- pMediaRule = FDE_NewWith(m_pAllocator) CFDE_CSSMediaRule(dwMediaList);
+ pMediaRule =
+ FXTARGET_NewWith(m_pAllocator) CFDE_CSSMediaRule(dwMediaList);
m_RuleArray.Add(pMediaRule);
}
break;
@@ -272,7 +272,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if (pStyleRule == NULL && m_Selectors.GetSize() > 0) {
- pStyleRule = FDE_NewWith(m_pAllocator) CFDE_CSSStyleRule;
+ pStyleRule = FXTARGET_NewWith(m_pAllocator) CFDE_CSSStyleRule;
pStyleRule->SetSelector(m_pAllocator, m_Selectors);
ruleArray.Add(pStyleRule);
} else {
@@ -318,7 +318,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if (pFontFaceRule == NULL) {
- pFontFaceRule = FDE_NewWith(m_pAllocator) CFDE_CSSFontFaceRule;
+ pFontFaceRule = FXTARGET_NewWith(m_pAllocator) CFDE_CSSFontFaceRule;
ruleArray.Add(pFontFaceRule);
}
break;
@@ -433,7 +433,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
FX_WCHAR wch = *psz;
if (wch == '.' || wch == '#') {
if (psz == pStart || psz[-1] == ' ') {
- CFDE_CSSSelector* p = FDE_NewWith(pStaticStore)
+ CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element, L"*", 1, TRUE);
if (p == NULL) {
return NULL;
@@ -451,7 +451,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
}
FDE_CSSSELECTORTYPE eType =
wch == '.' ? FDE_CSSSELECTORTYPE_Class : FDE_CSSSELECTORTYPE_ID;
- CFDE_CSSSelector* p = FDE_NewWith(pStaticStore)
+ CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
CFDE_CSSSelector(eType, psz, iNameLen, FALSE);
if (p == NULL) {
return NULL;
@@ -465,7 +465,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
if (iNameLen == 0) {
return NULL;
}
- CFDE_CSSSelector* p = FDE_NewWith(pStaticStore)
+ CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element, psz, iNameLen, TRUE);
if (p == NULL) {
return NULL;
@@ -483,7 +483,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
if (iNameLen == 0) {
return NULL;
}
- CFDE_CSSSelector* p = FDE_NewWith(pStaticStore)
+ CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Persudo, psz, iNameLen, TRUE);
if (p == NULL) {
return NULL;
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 5192735fda..8ce97e28ae 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -67,7 +67,7 @@ CXFA_TextParser::~CXFA_TextParser() {
CXFA_TextParseContext* pParseContext;
m_mapXMLNodeToParseContext.GetNextAssoc(ps, pXMLNode, pParseContext);
if (pParseContext)
- FDE_DeleteWith(CXFA_TextParseContext, m_pAllocator, pParseContext);
+ FXTARGET_DeleteWith(CXFA_TextParseContext, m_pAllocator, pParseContext);
}
m_mapXMLNodeToParseContext.RemoveAll();
}
@@ -78,7 +78,7 @@ void CXFA_TextParser::Reset() {
CXFA_TextParseContext* pParseContext;
m_mapXMLNodeToParseContext.GetNextAssoc(ps, pXMLNode, pParseContext);
if (pParseContext)
- FDE_DeleteWith(CXFA_TextParseContext, m_pAllocator, pParseContext);
+ FXTARGET_DeleteWith(CXFA_TextParseContext, m_pAllocator, pParseContext);
}
m_mapXMLNodeToParseContext.RemoveAll();
if (m_pAllocator) {
@@ -255,7 +255,7 @@ void CXFA_TextParser::ParseRichText(IFDE_XMLNode* pXMLNode,
if ((tagProvider.GetTagName() != FX_WSTRC(L"body")) ||
(tagProvider.GetTagName() != FX_WSTRC(L"html"))) {
CXFA_TextParseContext* pTextContext =
- FDE_NewWith(m_pAllocator) CXFA_TextParseContext;
+ FXTARGET_NewWith(m_pAllocator) CXFA_TextParseContext;
FDE_CSSDISPLAY eDisplay = FDE_CSSDISPLAY_Inline;
if (!tagProvider.m_bContent) {
pNewStyle = CreateStyle(pParentStyle);
@@ -686,7 +686,7 @@ void CXFA_TextLayout::Unload() {
int32_t iCount = m_pieceLines.GetSize();
for (int32_t i = 0; i < iCount; i++) {
CXFA_PieceLine* pLine = m_pieceLines.GetAt(i);
- FDE_DeleteWith(CXFA_PieceLine, m_pAllocator, pLine);
+ FXTARGET_DeleteWith(CXFA_PieceLine, m_pAllocator, pLine);
}
m_pieceLines.RemoveAll();
if (m_pBreak) {
@@ -1424,7 +1424,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
FXSYS_assert(pElement);
pElement->GetString(FX_WSTRC(L"href").GetPtr(), wsLinkContent);
if (!wsLinkContent.IsEmpty()) {
- pLinkData = FDE_NewWith(m_pAllocator) CXFA_LinkUserData(
+ pLinkData = FXTARGET_NewWith(m_pAllocator) CXFA_LinkUserData(
m_pAllocator,
wsLinkContent.GetBuffer(wsLinkContent.GetLength()));
wsLinkContent.ReleaseBuffer(wsLinkContent.GetLength());
@@ -1480,7 +1480,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
if (pLinkData) {
pLinkData->AddRef();
}
- CXFA_TextUserData* pUserData = FDE_NewWith(m_pAllocator)
+ CXFA_TextUserData* pUserData = FXTARGET_NewWith(m_pAllocator)
CXFA_TextUserData(m_pAllocator,
bContentNode ? pParentStyle : pStyle,
pLinkData);
@@ -1704,7 +1704,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus,
}
IFDE_CSSComputedStyle* pStyle = NULL;
if (bSavePieces) {
- CXFA_PieceLine* pPieceLine = FDE_NewWith(m_pAllocator) CXFA_PieceLine;
+ CXFA_PieceLine* pPieceLine = FXTARGET_NewWith(m_pAllocator) CXFA_PieceLine;
m_pieceLines.Add(pPieceLine);
if (m_pTabstopContext) {
m_pTabstopContext->Reset();
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.h b/xfa/src/fxfa/src/app/xfa_textlayout.h
index 03939ec7a3..9b4bb7c979 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.h
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.h
@@ -9,7 +9,6 @@
#include "xfa/src/fdp/include/fde_brs.h"
#include "xfa/src/fdp/include/fde_css.h"
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fdp/include/fde_rdv.h"
#include "xfa/src/fgas/include/fx_rbk.h"
#include "xfa/src/fxfa/src/app/xfa_ffdoc.h"
@@ -184,7 +183,7 @@ class CXFA_LinkUserData : public IFX_Unknown, public CFX_Target {
virtual FX_DWORD Release() {
FX_DWORD dwRefCount = --m_dwRefCount;
if (dwRefCount <= 0) {
- FDE_DeleteWith(CXFA_LinkUserData, m_pAllocator, this);
+ FXTARGET_DeleteWith(CXFA_LinkUserData, m_pAllocator, this);
}
return dwRefCount;
}
@@ -230,7 +229,7 @@ class CXFA_TextUserData : public IFX_Unknown, public CFX_Target {
virtual FX_DWORD Release() {
FX_DWORD dwRefCount = --m_dwRefCount;
if (dwRefCount == 0) {
- FDE_DeleteWith(CXFA_TextUserData, m_pAllocator, this);
+ FXTARGET_DeleteWith(CXFA_TextUserData, m_pAllocator, this);
}
return dwRefCount;
}