diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-13 10:14:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-13 10:14:26 -0700 |
commit | eb9cf677ca1bfd9431e43804b5524a1cf9bd9a8f (patch) | |
tree | aa728330ce8dc8251487e35d18b3bcdd2a120c1d /xfa/fwl/basewidget/fwl_barcodeimp.cpp | |
parent | a364fad07e5baf4a72ea734e64fb55664cab075e (diff) | |
download | pdfium-eb9cf677ca1bfd9431e43804b5524a1cf9bd9a8f.tar.xz |
Remove IFX_Barcode.
This CL replaces IFX_Barcode with the concrete class.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1890443002
Diffstat (limited to 'xfa/fwl/basewidget/fwl_barcodeimp.cpp')
-rw-r--r-- | xfa/fwl/basewidget/fwl_barcodeimp.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp index 0ab2e1ed74..771d7b9833 100644 --- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp +++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp @@ -7,6 +7,7 @@ #include "xfa/fwl/basewidget/fwl_barcodeimp.h" #include "xfa/fwl/basewidget/fwl_editimp.h" +#include "xfa/fwl/basewidget/fxmath_barcodeimp.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/fwl_targetimp.h" @@ -174,11 +175,18 @@ void CFWL_BarcodeImp::GenerateBarcodeImageCache() { ? XFA_BCS_EncodeSuccess : 0; } + void CFWL_BarcodeImp::CreateBarcodeEngine() { - if ((m_pBarcodeEngine == NULL) && (m_type != BC_UNKNOWN)) { - m_pBarcodeEngine = FX_Barcode_Create(m_type); + if (m_pBarcodeEngine || m_type == BC_UNKNOWN) + return; + + m_pBarcodeEngine = new CFX_Barcode; + if (!m_pBarcodeEngine->Create(m_type)) { + m_pBarcodeEngine->Release(); + m_pBarcodeEngine = nullptr; } } + void CFWL_BarcodeImp::ReleaseBarcodeEngine() { if (m_pBarcodeEngine) { m_pBarcodeEngine->Release(); |