Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Side by Side Diff: xfa/fxbarcode/oned/BC_OnedCode128Writer.h

Issue 2067903002: Make code compile with clang_use_chrome_plugin (part III) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCode128Reader.h ('k') | xfa/fxbarcode/oned/BC_OnedCode39Reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_ 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
8 #define XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_ 8 #define XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h" 11 #include "core/fxcrt/include/fx_system.h"
12 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" 12 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
13 13
14 class CBC_OnedCode128Writer : public CBC_OneDimWriter { 14 class CBC_OnedCode128Writer : public CBC_OneDimWriter {
15 public: 15 public:
16 CBC_OnedCode128Writer(); 16 CBC_OnedCode128Writer();
17 explicit CBC_OnedCode128Writer(BC_TYPE type); 17 explicit CBC_OnedCode128Writer(BC_TYPE type);
18 virtual ~CBC_OnedCode128Writer(); 18 ~CBC_OnedCode128Writer() override;
19 19
20 // CBC_OneDimWriter
20 uint8_t* Encode(const CFX_ByteString& contents, 21 uint8_t* Encode(const CFX_ByteString& contents,
21 BCFORMAT format, 22 BCFORMAT format,
22 int32_t& outWidth, 23 int32_t& outWidth,
23 int32_t& outHeight, 24 int32_t& outHeight,
24 int32_t hints, 25 int32_t hints,
25 int32_t& e); 26 int32_t& e) override;
26 uint8_t* Encode(const CFX_ByteString& contents, 27 uint8_t* Encode(const CFX_ByteString& contents,
27 BCFORMAT format, 28 BCFORMAT format,
28 int32_t& outWidth, 29 int32_t& outWidth,
29 int32_t& outHeight, 30 int32_t& outHeight,
30 int32_t& e); 31 int32_t& e) override;
31 uint8_t* Encode(const CFX_ByteString& contents, 32 uint8_t* Encode(const CFX_ByteString& contents,
32 int32_t& outLength, 33 int32_t& outLength,
33 int32_t& e); 34 int32_t& e) override;
34 35
35 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); 36 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
36 CFX_WideString FilterContents(const CFX_WideStringC& contents); 37 CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
38
37 FX_BOOL SetTextLocation(BC_TEXT_LOC location); 39 FX_BOOL SetTextLocation(BC_TEXT_LOC location);
40
38 BC_TYPE GetType(); 41 BC_TYPE GetType();
39 42
40 private: 43 private:
41 static const int32_t CODE_CODE_B = 100; 44 static const int32_t CODE_CODE_B = 100;
42 static const int32_t CODE_CODE_C = 99; 45 static const int32_t CODE_CODE_C = 99;
43 static const int32_t CODE_START_B = 104; 46 static const int32_t CODE_START_B = 104;
44 static const int32_t CODE_START_C = 105; 47 static const int32_t CODE_START_C = 105;
45 static const int32_t CODE_STOP = 106; 48 static const int32_t CODE_STOP = 106;
46 49
47 FX_BOOL IsDigits(const CFX_ByteString& contents, 50 FX_BOOL IsDigits(const CFX_ByteString& contents,
48 int32_t start, 51 int32_t start,
49 int32_t length); 52 int32_t length);
50 int32_t Encode128B(const CFX_ByteString& contents, 53 int32_t Encode128B(const CFX_ByteString& contents,
51 CFX_ArrayTemplate<const int32_t*>* patterns); 54 CFX_ArrayTemplate<const int32_t*>* patterns);
52 int32_t Encode128C(const CFX_ByteString& contents, 55 int32_t Encode128C(const CFX_ByteString& contents,
53 CFX_ArrayTemplate<const int32_t*>* patterns); 56 CFX_ArrayTemplate<const int32_t*>* patterns);
54 57
55 BC_TYPE m_codeFormat; 58 BC_TYPE m_codeFormat;
56 }; 59 };
57 60
58 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_ 61 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
OLDNEW
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCode128Reader.h ('k') | xfa/fxbarcode/oned/BC_OnedCode39Reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698