From ca3ac5e9ffc936066267fbb1c329e5297d8e23e6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 17:38:11 -0700 Subject: Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs. Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002. --- xfa/src/fxbarcode/BC_BarCode.cpp | 28 ++++++++++++------------- xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp | 8 +++---- xfa/src/fxbarcode/oned/BC_OneDimWriter.h | 14 ++++++------- xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp | 4 ++-- xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h | 4 ++-- xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp | 16 +++++++------- xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h | 16 +++++++------- xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp | 8 +++---- xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h | 8 +++---- 15 files changed, 77 insertions(+), 77 deletions(-) (limited to 'xfa/src/fxbarcode') diff --git a/xfa/src/fxbarcode/BC_BarCode.cpp b/xfa/src/fxbarcode/BC_BarCode.cpp index d87a0ce045..745ddb9238 100644 --- a/xfa/src/fxbarcode/BC_BarCode.cpp +++ b/xfa/src/fxbarcode/BC_BarCode.cpp @@ -139,14 +139,14 @@ CBC_OneCode::CBC_OneCode() CBC_OneCode::~CBC_OneCode() { } -FX_BOOL CBC_OneCode::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OneCode::CheckContentValidity(const CFX_WideStringC& contents) { if (m_pBCWriter) { return ((CBC_OneDimWriter*)m_pBCWriter)->CheckContentValidity(contents); } return FALSE; } -CFX_WideString CBC_OneCode::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OneCode::FilterContents(const CFX_WideStringC& contents) { CFX_WideString tmp; if (m_pBCWriter == NULL) { @@ -223,7 +223,7 @@ CBC_Code39::~CBC_Code39() m_pBCWriter = NULL; } } -FX_BOOL CBC_Code39::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -326,7 +326,7 @@ FX_BOOL CBC_Codabar::SetWideNarrowRatio(int32_t ratio) } return FALSE; } -FX_BOOL CBC_Codabar::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -396,7 +396,7 @@ FX_BOOL CBC_Code128::SetTextLocation(BC_TEXT_LOC location) } return FALSE; } -FX_BOOL CBC_Code128::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -461,7 +461,7 @@ CBC_EAN8::~CBC_EAN8() m_pBCWriter = NULL; } } -CFX_WideString CBC_EAN8::Preprocess(FX_WSTR contents) +CFX_WideString CBC_EAN8::Preprocess(const CFX_WideStringC& contents) { CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents); int32_t length = encodeContents.GetLength(); @@ -478,7 +478,7 @@ CFX_WideString CBC_EAN8::Preprocess(FX_WSTR contents) } return encodeContents; } -FX_BOOL CBC_EAN8::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -539,7 +539,7 @@ CBC_EAN13::~CBC_EAN13() m_pBCWriter = NULL; } } -CFX_WideString CBC_EAN13::Preprocess(FX_WSTR contents) +CFX_WideString CBC_EAN13::Preprocess(const CFX_WideStringC& contents) { CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents); int32_t length = encodeContents.GetLength(); @@ -557,7 +557,7 @@ CFX_WideString CBC_EAN13::Preprocess(FX_WSTR contents) } return encodeContents; } -FX_BOOL CBC_EAN13::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -619,7 +619,7 @@ CBC_UPCA::~CBC_UPCA() m_pBCWriter = NULL; } } -CFX_WideString CBC_UPCA::Preprocess(FX_WSTR contents) +CFX_WideString CBC_UPCA::Preprocess(const CFX_WideStringC& contents) { CFX_WideString encodeContents = ((CBC_OnedEAN8Writer*)m_pBCWriter)->FilterContents(contents); int32_t length = encodeContents.GetLength(); @@ -637,7 +637,7 @@ CFX_WideString CBC_UPCA::Preprocess(FX_WSTR contents) } return encodeContents; } -FX_BOOL CBC_UPCA::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { if(contents.IsEmpty()) { e = BCExceptionNoContents; @@ -720,7 +720,7 @@ FX_BOOL CBC_QRCode::SetErrorCorrectionLevel (int32_t level) } return ((CBC_TwoDimWriter*)m_pBCWriter)->SetErrorCorrectionLevel(level); } -FX_BOOL CBC_QRCode::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_QRCode::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { int32_t outWidth = 0; int32_t outHeight = 0; @@ -781,7 +781,7 @@ void CBC_PDF417I::SetTruncated(FX_BOOL truncated) { ((CBC_PDF417Writer*)m_pBCWriter)->SetTruncated(truncated); } -FX_BOOL CBC_PDF417I::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_PDF417I::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { BCFORMAT format = BCFORMAT_PDF_417; int32_t outWidth = 0; @@ -835,7 +835,7 @@ CBC_DataMatrix::~CBC_DataMatrix() m_pBCWriter = NULL; } } -FX_BOOL CBC_DataMatrix::Encode(FX_WSTR contents, FX_BOOL isDevice, int32_t &e) +FX_BOOL CBC_DataMatrix::Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t &e) { int32_t outWidth = 0; int32_t outHeight = 0; diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp index a1554a8047..e2a0da6c95 100644 --- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp @@ -214,7 +214,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_ByteS geBitmap.Attach(pOutBitmap); geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY); } -void CBC_OneDimWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) +void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) { if (device == NULL && pOutBitmap == NULL) { e = BCExceptionIllegalArgument; @@ -278,7 +278,7 @@ void CBC_OneDimWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX } FX_Free(pCharPos); } -void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR contents, int32_t &e) +void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, const CFX_WideStringC& contents, int32_t &e) { if (m_output == NULL) { BC_EXCEPTION_CHECK_ReturnVoid(e); @@ -311,7 +311,7 @@ void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR con } pOutBitmap = pStretchBitmap; } -void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, FX_WSTR contents, int32_t &e) +void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, const CFX_WideStringC& contents, int32_t &e) { if (m_output == NULL) { BC_EXCEPTION_CHECK_ReturnVoid(e); @@ -342,7 +342,7 @@ void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, const CFX_Ma BC_EXCEPTION_CHECK_ReturnVoid(e); } } -void CBC_OneDimWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { if (codeLength < 1) { BC_EXCEPTION_CHECK_ReturnVoid(e); diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.h b/xfa/src/fxbarcode/oned/BC_OneDimWriter.h index aeb19e0081..b8019fe290 100644 --- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.h +++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.h @@ -22,18 +22,18 @@ public: { return NULL; }; - virtual void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); - virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR contents, int32_t &e); - virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, FX_WSTR contents, int32_t &e); - virtual FX_BOOL CheckContentValidity(FX_WSTR contents) + virtual void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, const CFX_WideStringC& contents, int32_t &e); + virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix* matrix, const CFX_WideStringC& contents, int32_t &e); + virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) { return TRUE; }; - virtual CFX_WideString FilterContents(FX_WSTR contents) + virtual CFX_WideString FilterContents(const CFX_WideStringC& contents) { return CFX_WideString(); } - virtual CFX_WideString RenderTextContents(FX_WSTR contents) + virtual CFX_WideString RenderTextContents(const CFX_WideStringC& contents) { return CFX_WideString(); } @@ -61,7 +61,7 @@ protected: int32_t m_multiple; FX_FLOAT m_outputHScale; void CalcTextInfo(const CFX_ByteString &text, FXTEXT_CHARPOS *charPos, CFX_Font *cFont, FX_FLOAT geWidth, int32_t fontSize, FX_FLOAT &charsLen); - virtual void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); + virtual void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); virtual void ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT locY, int32_t barWidth); virtual void ShowDeviceChars(CFX_RenderDevice *device, const CFX_Matrix* matrix, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT locY, int32_t barWidth); int32_t AppendPattern(uint8_t* target, int32_t pos, const int32_t* pattern, int32_t patternLength, int32_t startColor, int32_t &e); diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp index 0049a54f7c..584f7bf1d8 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.cpp @@ -103,7 +103,7 @@ FX_BOOL CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, FX_BOOL isContent) return FALSE; } } -FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(const CFX_WideStringC& contents) { FX_WCHAR ch; int32_t index = 0; @@ -117,7 +117,7 @@ FX_BOOL CBC_OnedCodaBarWriter::CheckContentValidity(FX_WSTR contents) } return TRUE; } -CFX_WideString CBC_OnedCodaBarWriter::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedCodaBarWriter::FilterContents(const CFX_WideStringC& contents) { CFX_WideString filtercontents; FX_WCHAR ch; @@ -210,13 +210,13 @@ uint8_t* CBC_OnedCodaBarWriter::Encode(const CFX_ByteString &contents, int32_t & outLength = position; return result; } -CFX_WideString CBC_OnedCodaBarWriter::encodedContents(FX_WSTR contents) +CFX_WideString CBC_OnedCodaBarWriter::encodedContents(const CFX_WideStringC& contents) { CFX_WideString strStart(m_chStart); CFX_WideString strEnd(m_chEnd); return strStart + contents + strEnd; } -void CBC_OnedCodaBarWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OnedCodaBarWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { CBC_OneDimWriter::RenderResult(encodedContents(contents), code, codeLength, isDevice, e); } diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h index c5c54b849f..29912ccb8a 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h +++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h @@ -17,9 +17,9 @@ public: uint8_t* Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e); uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e); uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e); - CFX_WideString encodedContents(FX_WSTR contents); - FX_BOOL CheckContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); + CFX_WideString encodedContents(const CFX_WideStringC& contents); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); FX_BOOL SetStartChar(FX_CHAR start); FX_BOOL SetEndChar(FX_CHAR end); void SetDataLength(int32_t length); @@ -27,7 +27,7 @@ public: FX_BOOL SetWideNarrowRatio(int32_t ratio); FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent); private: - void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); const static FX_CHAR START_END_CHARS[]; const static FX_CHAR CONTENT_CHARS[]; FX_CHAR m_chStart; diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp index 5f7b32caa4..a0447167be 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.cpp @@ -47,7 +47,7 @@ BC_TYPE CBC_OnedCode128Writer::GetType() { return m_codeFormat; } -FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(const CFX_WideStringC& contents) { FX_BOOL ret = TRUE; int32_t position = 0; @@ -69,7 +69,7 @@ FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(FX_WSTR contents) } return ret; } -CFX_WideString CBC_OnedCode128Writer::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedCode128Writer::FilterContents(const CFX_WideStringC& contents) { CFX_WideString filterChineseChar; FX_WCHAR ch; diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h index f27e2e9f09..8a89f266b2 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h +++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h @@ -19,8 +19,8 @@ public: uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e); uint8_t * Encode(const CFX_ByteString &contents, int32_t &outLength , int32_t &e); - FX_BOOL CheckContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); FX_BOOL SetTextLocation(BC_TEXT_LOC location); BC_TYPE GetType(); private: diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp index 8d06ecdfc2..0d02d1ee86 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.cpp @@ -41,7 +41,7 @@ CBC_OnedCode39Writer::CBC_OnedCode39Writer(FX_BOOL extendedMode) CBC_OnedCode39Writer::~CBC_OnedCode39Writer() { } -FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(const CFX_WideStringC& contents) { if (m_extendedMode) { return CheckExtendedContentValidity(contents); @@ -57,7 +57,7 @@ FX_BOOL CBC_OnedCode39Writer::CheckContentValidity(FX_WSTR contents) } return TRUE; } -FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(const CFX_WideStringC& contents) { for(int32_t i = 0; i < contents.GetLength(); i++) { FX_WCHAR ch = contents.GetAt(i); @@ -67,7 +67,7 @@ FX_BOOL CBC_OnedCode39Writer::CheckExtendedContentValidity(FX_WSTR contents) } return TRUE; } -CFX_WideString CBC_OnedCode39Writer::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedCode39Writer::FilterContents(const CFX_WideStringC& contents) { if (m_extendedMode) { return FilterExtendedContents(contents); @@ -92,7 +92,7 @@ CFX_WideString CBC_OnedCode39Writer::FilterContents(FX_WSTR contents) } return filtercontents; } -CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(FX_WSTR contents) +CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(const CFX_WideStringC& contents) { CFX_WideString filtercontents; for(int32_t i = 0; i < contents.GetLength(); i++) { @@ -149,7 +149,7 @@ CFX_WideString CBC_OnedCode39Writer::FilterExtendedContents(FX_WSTR contents) } return filtercontents; } -CFX_WideString CBC_OnedCode39Writer::RenderTextContents(FX_WSTR contents) +CFX_WideString CBC_OnedCode39Writer::RenderTextContents(const CFX_WideStringC& contents) { if (m_extendedMode) { return RenderExtendedTextContents(contents); @@ -173,7 +173,7 @@ CFX_WideString CBC_OnedCode39Writer::RenderTextContents(FX_WSTR contents) } return renderContents; } -CFX_WideString CBC_OnedCode39Writer::RenderExtendedTextContents(FX_WSTR contents) +CFX_WideString CBC_OnedCode39Writer::RenderExtendedTextContents(const CFX_WideStringC& contents) { CFX_WideString renderContents; for(int32_t i = 0; i < contents.GetLength(); i++) { @@ -329,7 +329,7 @@ uint8_t *CBC_OnedCode39Writer::Encode(const CFX_ByteString &contents, int32_t &o } return result; } -CFX_WideString CBC_OnedCode39Writer::encodedContents(FX_WSTR contents, int32_t &e) +CFX_WideString CBC_OnedCode39Writer::encodedContents(const CFX_WideStringC& contents, int32_t &e) { CFX_WideString encodedContents = contents; if (m_bCalcChecksum && m_bPrintChecksum) { @@ -343,7 +343,7 @@ CFX_WideString CBC_OnedCode39Writer::encodedContents(FX_WSTR contents, int32_t & } return encodedContents; } -void CBC_OnedCode39Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OnedCode39Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { CFX_WideString encodedCon = encodedContents(contents, e); BC_EXCEPTION_CHECK_ReturnVoid(e); diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h index 641d041809..679d4f6ae7 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h @@ -18,14 +18,14 @@ public: uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e); uint8_t *Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e); uint8_t *Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e); - void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); - CFX_WideString encodedContents(FX_WSTR contents, int32_t &e); - FX_BOOL CheckContentValidity(FX_WSTR contents); - FX_BOOL CheckExtendedContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); - CFX_WideString FilterExtendedContents(FX_WSTR contents); - CFX_WideString RenderTextContents(FX_WSTR contents); - CFX_WideString RenderExtendedTextContents(FX_WSTR contents); + void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + CFX_WideString encodedContents(const CFX_WideStringC& contents, int32_t &e); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + FX_BOOL CheckExtendedContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); + CFX_WideString FilterExtendedContents(const CFX_WideStringC& contents); + CFX_WideString RenderTextContents(const CFX_WideStringC& contents); + CFX_WideString RenderExtendedTextContents(const CFX_WideStringC& contents); FX_BOOL SetTextLocation(BC_TEXT_LOC loction); FX_BOOL SetWideNarrowRatio(int32_t ratio); private: diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp index 4b258a5a9f..0ecb3d06a7 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -40,7 +40,7 @@ CBC_OnedEAN13Writer::CBC_OnedEAN13Writer() CBC_OnedEAN13Writer::~CBC_OnedEAN13Writer() { } -FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(const CFX_WideStringC& contents) { for (int32_t i = 0; i < contents.GetLength(); i++) { if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') { @@ -51,7 +51,7 @@ FX_BOOL CBC_OnedEAN13Writer::CheckContentValidity(FX_WSTR contents) } return TRUE; } -CFX_WideString CBC_OnedEAN13Writer::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedEAN13Writer::FilterContents(const CFX_WideStringC& contents) { CFX_WideString filtercontents; FX_WCHAR ch; @@ -148,7 +148,7 @@ uint8_t *CBC_OnedEAN13Writer::Encode(const CFX_ByteString &contents, int32_t &ou } return result; } -void CBC_OnedEAN13Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) +void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) { if (device == NULL && pOutBitmap == NULL) { e = BCExceptionIllegalArgument; @@ -288,7 +288,7 @@ void CBC_OnedEAN13Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, } FX_Free(pCharPos); } -void CBC_OnedEAN13Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OnedEAN13Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e); } diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h index df9d635a4e..357db75ead 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.h @@ -21,11 +21,11 @@ public: uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e); uint8_t* Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e); - void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); - FX_BOOL CheckContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); + void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); int32_t CalcChecksum(const CFX_ByteString &contents); protected: - void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); + void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); }; #endif diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp index fdf791c686..4c9e13d131 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp @@ -52,7 +52,7 @@ FX_BOOL CBC_OnedEAN8Writer::SetTextLocation(BC_TEXT_LOC location) } return FALSE; } -FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(const CFX_WideStringC& contents) { for (int32_t i = 0; i < contents.GetLength(); i++) { if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') { @@ -63,7 +63,7 @@ FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(FX_WSTR contents) } return TRUE; } -CFX_WideString CBC_OnedEAN8Writer::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedEAN8Writer::FilterContents(const CFX_WideStringC& contents) { CFX_WideString filtercontents; FX_WCHAR ch; @@ -156,7 +156,7 @@ uint8_t *CBC_OnedEAN8Writer::Encode(const CFX_ByteString &contents, int32_t &out } return result; } -void CBC_OnedEAN8Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) +void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) { if (device == NULL && pOutBitmap == NULL) { e = BCExceptionIllegalArgument; @@ -255,7 +255,7 @@ void CBC_OnedEAN8Writer::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, C } FX_Free(pCharPos); } -void CBC_OnedEAN8Writer::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OnedEAN8Writer::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e); } diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h index f2e5cc2cbe..9f7149fc4f 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.h @@ -19,14 +19,14 @@ public: uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight , int32_t &e); uint8_t * Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints , int32_t &e); uint8_t * Encode(const CFX_ByteString &contents, int32_t &outLength, int32_t &e); - void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); - FX_BOOL CheckContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); + void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); void SetDataLength(int32_t length); FX_BOOL SetTextLocation(BC_TEXT_LOC location); int32_t CalcChecksum(const CFX_ByteString &contents); protected: - void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); + void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); }; #endif diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp index 56324a8e1a..547d87872f 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp @@ -42,7 +42,7 @@ CBC_OnedUPCAWriter::~CBC_OnedUPCAWriter() } m_subWriter = NULL; } -FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(FX_WSTR contents) +FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(const CFX_WideStringC& contents) { int32_t i = 0; for (i = 0; i < contents.GetLength(); i++) { @@ -54,7 +54,7 @@ FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(FX_WSTR contents) } return TRUE; } -CFX_WideString CBC_OnedUPCAWriter::FilterContents(FX_WSTR contents) +CFX_WideString CBC_OnedUPCAWriter::FilterContents(const CFX_WideStringC& contents) { CFX_WideString filtercontents; FX_WCHAR ch; @@ -105,7 +105,7 @@ uint8_t *CBC_OnedUPCAWriter::Encode(const CFX_ByteString &contents, BCFORMAT for BC_EXCEPTION_CHECK_ReturnValue(e, NULL); return ret; } -void CBC_OnedUPCAWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) +void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e) { if (device == NULL && pOutBitmap == NULL) { e = BCExceptionIllegalArgument; @@ -278,7 +278,7 @@ void CBC_OnedUPCAWriter::ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, C } FX_Free(pCharPos); } -void CBC_OnedUPCAWriter::RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) +void CBC_OnedUPCAWriter::RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e) { CBC_OneDimWriter::RenderResult(contents, code, codeLength, isDevice, e); } diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h index ff59f9b660..7ba3b961fb 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h +++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h @@ -19,13 +19,13 @@ public: virtual void Init(); uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t &e); uint8_t* Encode(const CFX_ByteString &contents, BCFORMAT format, int32_t &outWidth, int32_t &outHeight, int32_t hints, int32_t &e); - void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); - FX_BOOL CheckContentValidity(FX_WSTR contents); - CFX_WideString FilterContents(FX_WSTR contents); + void RenderResult(const CFX_WideStringC& contents, uint8_t* code, int32_t codeLength, FX_BOOL isDevice, int32_t &e); + FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); + CFX_WideString FilterContents(const CFX_WideStringC& contents); int32_t CalcChecksum(const CFX_ByteString &contents); protected: - void ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); + void ShowChars(const CFX_WideStringC& contents, CFX_DIBitmap *pOutBitmap, CFX_RenderDevice* device, const CFX_Matrix* matrix, int32_t barWidth, int32_t multiple, int32_t &e); }; #endif -- cgit v1.2.3