| Index: xfa/fxbarcode/oned/BC_OneDimWriter.cpp
|
| diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
|
| index ae1b23795786d2026a15f6119dccf5c402015789..7b1cc50d729a37f6e1503d665746b019b156abc3 100644
|
| --- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
|
| +++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
|
| @@ -201,6 +201,7 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
|
| (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix,
|
| m_fontColor, FXTEXT_CLEARTYPE);
|
| }
|
| +
|
| void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
|
| const CFX_ByteString str,
|
| FX_FLOAT geWidth,
|
| @@ -211,7 +212,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
|
| int32_t iFontSize = (int32_t)fabs(m_fFontSize);
|
| int32_t iTextHeight = iFontSize + 1;
|
| CFX_FxgeDevice ge;
|
| - ge.Create((int)geWidth, iTextHeight, m_colorSpace);
|
| + ge.Create((int)geWidth, iTextHeight, m_colorSpace, nullptr);
|
| FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
|
| ge.FillRect(&geRect, m_backgroundColor);
|
| CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
|
| @@ -219,9 +220,10 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
|
| CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
|
| (CFX_Matrix*)&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
|
| CFX_FxgeDevice geBitmap;
|
| - geBitmap.Attach(pOutBitmap);
|
| + geBitmap.Attach(pOutBitmap, false, nullptr, false);
|
| geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY);
|
| }
|
| +
|
| void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
|
| CFX_DIBitmap* pOutBitmap,
|
| CFX_RenderDevice* device,
|
| @@ -229,11 +231,11 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
|
| int32_t barWidth,
|
| int32_t multiple,
|
| int32_t& e) {
|
| - if (device == NULL && pOutBitmap == NULL) {
|
| + if (!device && !pOutBitmap) {
|
| e = BCExceptionIllegalArgument;
|
| return;
|
| }
|
| - if (m_pFont == NULL) {
|
| + if (!m_pFont) {
|
| e = BCExceptionNullPointer;
|
| return;
|
| }
|
|
|