summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp6
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp8
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp2
3 files changed, 2 insertions, 14 deletions
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index c94236d346..0ba1751b9f 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -48,9 +48,6 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(
FX_WORD wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
- if (pStyleSheet == NULL) {
- return NULL;
- }
if (!pStyleSheet->LoadFromStream(szUrl, pStream, wCodePage)) {
pStyleSheet->Release();
pStyleSheet = NULL;
@@ -64,9 +61,6 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(
FX_WORD wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
- if (pStyleSheet == NULL) {
- return NULL;
- }
if (!pStyleSheet->LoadFromBuffer(szUrl, pBuffer, iBufSize, wCodePage)) {
pStyleSheet->Release();
pStyleSheet = NULL;
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 81741a4cbb..4b716b4941 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -31,17 +31,11 @@ IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap,
return NULL;
}
CFX_FxgeDevice* pDevice = new CFX_FxgeDevice;
- if (pDevice == NULL) {
- return NULL;
- }
pDevice->Attach(pBitmap, 0, bRgbByteOrder);
return new CFDE_FxgeDevice(pDevice, TRUE);
}
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_RenderDevice* pDevice) {
- if (pDevice == NULL) {
- return NULL;
- }
- return new CFDE_FxgeDevice(pDevice, FALSE);
+ return pDevice ? new CFDE_FxgeDevice(pDevice, FALSE) : nullptr;
}
CFDE_FxgeDevice::CFDE_FxgeDevice(CFX_RenderDevice* pDevice,
FX_BOOL bOwnerDevice)
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index db1e8fc23e..056254a149 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -925,7 +925,7 @@ FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream* pXMLStream,
} else {
m_pXMLParser = new CFDE_XMLSAXParser(pHandler, m_pSyntaxParser);
}
- return m_pXMLParser != NULL;
+ return TRUE;
}
FX_BOOL CFDE_XMLDoc::LoadXML(IFDE_XMLParser* pXMLParser) {
if (pXMLParser == NULL) {