summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OnedUPCAWriter.h')
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
index 8257dfa4b6..b38a235076 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_string.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
@@ -21,8 +23,6 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
CBC_OnedUPCAWriter();
~CBC_OnedUPCAWriter() override;
- virtual void Init();
-
// CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
@@ -46,6 +46,8 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& e) override;
FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+
+ void Init();
int32_t CalcChecksum(const CFX_ByteString& contents);
protected:
@@ -58,7 +60,7 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& e) override;
private:
- CBC_OnedEAN13Writer* m_subWriter;
+ std::unique_ptr<CBC_OnedEAN13Writer> m_subWriter;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_