summaryrefslogtreecommitdiff
path: root/core/src/fxge/win32
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/win32')
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp4
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp9
3 files changed, 6 insertions, 13 deletions
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 845eb14576..5a3c16c2af 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -64,7 +64,6 @@ class CDwFontFileLoader final : public IDWriteFontFileLoader {
static IDWriteFontFileLoader* GetLoader() {
if (instance_ == NULL) {
instance_ = new CDwFontFileLoader();
- return instance_;
}
return instance_;
}
@@ -191,9 +190,6 @@ FX_BOOL CDWriteExt::DwCreateRenderingTarget(CFX_DIBitmap* pBitmap,
}
*(CDwGdiTextRenderer**)renderTarget =
new CDwGdiTextRenderer(pBitmap, pBitmapRenderTarget, pRenderingParams);
- if (*(CDwGdiTextRenderer**)renderTarget == NULL) {
- goto failed;
- }
SafeRelease(&pGdiInterop);
SafeRelease(&pBitmapRenderTarget);
SafeRelease(&pRenderingParams);
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index ce65a26301..cae6c67823 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -5,20 +5,26 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fxge/fx_ge.h"
+
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
#include <windows.h>
#include <algorithm>
+
namespace Gdiplus {
using std::min;
using std::max;
} // namespace Gdiplus
+
#include <gdiplus.h>
#include "../../../include/fxge/fx_ge_win32.h"
#include "win32_int.h"
+
using namespace Gdiplus;
using namespace Gdiplus::DllExports;
+
#define GdiFillType2Gdip(fill_type) \
(fill_type == ALTERNATE ? FillModeAlternate : FillModeWinding)
+
static CombineMode GdiCombineMode2Gdip(int mode) {
switch (mode) {
case RGN_AND:
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index de5b4c54be..18fe1eb6fa 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -170,12 +170,6 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
int result_width = result_rect.Width();
int result_height = result_rect.Height();
CFX_DIBitmap* pTempBitmap = new CFX_DIBitmap;
- if (!pTempBitmap) {
- if (pSrcBitmap != src_bitmap) {
- delete pSrcBitmap;
- }
- return NULL;
- }
if (!pTempBitmap->Create(result_width, result_height, pSrc->GetFormat())) {
delete pTempBitmap;
if (pSrcBitmap != src_bitmap) {
@@ -324,9 +318,6 @@ FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput) {
m_Height = ::GetDeviceCaps(m_hDC, VERTRES);
m_nBitsPerPixel = ::GetDeviceCaps(m_hDC, BITSPIXEL);
m_pPSOutput = new CPSOutput(hDC);
- if (!m_pPSOutput) {
- return FALSE;
- }
((CPSOutput*)m_pPSOutput)->Init();
m_PSRenderer.Init(m_pPSOutput, pslevel, m_Width, m_Height, bCmykOutput);
m_bCmykOutput = bCmykOutput;