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

Unified Diff: xfa/fwl/core/ifwl_barcode.cpp

Issue 2527683002: Remove DataProvider from CFWL_WidgetProperties (Closed)
Patch Set: Rebase to master Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_checkbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_barcode.cpp
diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp
index d5ab17f66b3bd2b3598de94ab3a9787b06c987f0..b4cd13a6c14e43521c425f1263df8d0515bbfc40 100644
--- a/xfa/fwl/core/ifwl_barcode.cpp
+++ b/xfa/fwl/core/ifwl_barcode.cpp
@@ -66,10 +66,6 @@ void IFWL_Barcode::GenerateBarcodeImageCache() {
m_dwStatus = 0;
CreateBarcodeEngine();
- IFWL_Barcode::DataProvider* pData =
- static_cast<IFWL_Barcode::DataProvider*>(m_pProperties->m_pDataProvider);
- if (!pData)
- return;
if (!m_pBarcodeEngine)
return;
@@ -98,33 +94,35 @@ void IFWL_Barcode::GenerateBarcodeImageCache() {
m_pBarcodeEngine->SetHeight(int32_t(GetRTClient().height));
m_pBarcodeEngine->SetWidth(int32_t(GetRTClient().width));
- uint32_t dwAttributeMask = pData->GetBarcodeAttributeMask();
+ uint32_t dwAttributeMask = m_pDataProvider->GetBarcodeAttributeMask();
if (dwAttributeMask & FWL_BCDATTRIBUTE_CHARENCODING)
- m_pBarcodeEngine->SetCharEncoding(pData->GetCharEncoding());
+ m_pBarcodeEngine->SetCharEncoding(m_pDataProvider->GetCharEncoding());
if (dwAttributeMask & FWL_BCDATTRIBUTE_MODULEHEIGHT)
- m_pBarcodeEngine->SetModuleHeight(pData->GetModuleHeight());
+ m_pBarcodeEngine->SetModuleHeight(m_pDataProvider->GetModuleHeight());
if (dwAttributeMask & FWL_BCDATTRIBUTE_MODULEWIDTH)
- m_pBarcodeEngine->SetModuleWidth(pData->GetModuleWidth());
+ m_pBarcodeEngine->SetModuleWidth(m_pDataProvider->GetModuleWidth());
if (dwAttributeMask & FWL_BCDATTRIBUTE_DATALENGTH)
- m_pBarcodeEngine->SetDataLength(pData->GetDataLength());
+ m_pBarcodeEngine->SetDataLength(m_pDataProvider->GetDataLength());
if (dwAttributeMask & FWL_BCDATTRIBUTE_CALCHECKSUM)
- m_pBarcodeEngine->SetCalChecksum(pData->GetCalChecksum());
+ m_pBarcodeEngine->SetCalChecksum(m_pDataProvider->GetCalChecksum());
if (dwAttributeMask & FWL_BCDATTRIBUTE_PRINTCHECKSUM)
- m_pBarcodeEngine->SetPrintChecksum(pData->GetPrintChecksum());
+ m_pBarcodeEngine->SetPrintChecksum(m_pDataProvider->GetPrintChecksum());
if (dwAttributeMask & FWL_BCDATTRIBUTE_TEXTLOCATION)
- m_pBarcodeEngine->SetTextLocation(pData->GetTextLocation());
+ m_pBarcodeEngine->SetTextLocation(m_pDataProvider->GetTextLocation());
if (dwAttributeMask & FWL_BCDATTRIBUTE_WIDENARROWRATIO)
- m_pBarcodeEngine->SetWideNarrowRatio(pData->GetWideNarrowRatio());
+ m_pBarcodeEngine->SetWideNarrowRatio(m_pDataProvider->GetWideNarrowRatio());
if (dwAttributeMask & FWL_BCDATTRIBUTE_STARTCHAR)
- m_pBarcodeEngine->SetStartChar(pData->GetStartChar());
+ m_pBarcodeEngine->SetStartChar(m_pDataProvider->GetStartChar());
if (dwAttributeMask & FWL_BCDATTRIBUTE_ENDCHAR)
- m_pBarcodeEngine->SetEndChar(pData->GetEndChar());
+ m_pBarcodeEngine->SetEndChar(m_pDataProvider->GetEndChar());
if (dwAttributeMask & FWL_BCDATTRIBUTE_VERSION)
- m_pBarcodeEngine->SetVersion(pData->GetVersion());
- if (dwAttributeMask & FWL_BCDATTRIBUTE_ECLEVEL)
- m_pBarcodeEngine->SetErrorCorrectionLevel(pData->GetErrorCorrectionLevel());
+ m_pBarcodeEngine->SetVersion(m_pDataProvider->GetVersion());
+ if (dwAttributeMask & FWL_BCDATTRIBUTE_ECLEVEL) {
+ m_pBarcodeEngine->SetErrorCorrectionLevel(
+ m_pDataProvider->GetErrorCorrectionLevel());
+ }
if (dwAttributeMask & FWL_BCDATTRIBUTE_TRUNCATED)
- m_pBarcodeEngine->SetTruncated(pData->GetTruncated());
+ m_pBarcodeEngine->SetTruncated(m_pDataProvider->GetTruncated());
int32_t errorCode = 0;
m_dwStatus = m_pBarcodeEngine->Encode(wsText.AsStringC(), true, errorCode)
« no previous file with comments | « xfa/fwl/core/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698