summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2016-01-11 19:00:27 -0800
committerJun Fang <jun_fang@foxitsoftware.com>2016-01-11 19:00:27 -0800
commit65ac873de9164c01af2579a773344c4bca7254d7 (patch)
treefab5a783859ae9290625866d80af81bb2768e23f
parentf2b300af96e05bb372664752a64f6ab506820a12 (diff)
downloadpdfium-65ac873de9164c01af2579a773344c4bca7254d7.tar.xz
Clean compiling warnings on Linux
BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1570893003 .
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp4
-rw-r--r--xfa/src/fxbarcode/BC_BarCode.cpp24
-rw-r--r--xfa/src/fxbarcode/BC_TwoDimWriter.h22
-rw-r--r--xfa/src/fxbarcode/BC_Writer.h11
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h5
5 files changed, 17 insertions, 49 deletions
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index 8a832b413a..b2fa5c6537 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -597,10 +597,6 @@ void CFDE_CSSStyleSelector::ApplyProperty(
FDE_CSSPROPERTY eProperty,
IFDE_CSSValue* pValue,
CFDE_CSSComputedStyle* pComputedStyle) {
- if (pComputedStyle->m_InheritedData.m_pFontFamily &&
- *(FX_DWORD*)pComputedStyle->m_InheritedData.m_pFontFamily == 0xcdcdcdcd) {
- pComputedStyle = pComputedStyle; // FIXME: likely a real bug.
- }
if (pValue->GetType() == FDE_CSSVALUETYPE_Primitive) {
IFDE_CSSPrimitiveValue* pPrimitive = (IFDE_CSSPrimitiveValue*)pValue;
FDE_CSSPRIMITIVETYPE eType = pPrimitive->GetPrimitiveType();
diff --git a/xfa/src/fxbarcode/BC_BarCode.cpp b/xfa/src/fxbarcode/BC_BarCode.cpp
index 82af104bf3..bb5787b587 100644
--- a/xfa/src/fxbarcode/BC_BarCode.cpp
+++ b/xfa/src/fxbarcode/BC_BarCode.cpp
@@ -212,8 +212,8 @@ FX_BOOL CBC_Code39::Encode(const CFX_WideStringC& contents,
((CBC_OnedCode39Writer*)m_pBCWriter)->RenderTextContents(contents);
m_renderContents = renderContents;
CFX_ByteString byteString = filtercontents.UTF8Encode();
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedCode39Writer*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(renderContents, data, outWidth, isDevice, e);
@@ -315,8 +315,8 @@ FX_BOOL CBC_Codabar::Encode(const CFX_WideStringC& contents,
((CBC_OneDimWriter*)m_pBCWriter)->FilterContents(contents);
CFX_ByteString byteString = filtercontents.UTF8Encode();
m_renderContents = filtercontents;
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(filtercontents, data, outWidth, isDevice, e);
@@ -396,8 +396,8 @@ FX_BOOL CBC_Code128::Encode(const CFX_WideStringC& contents,
((CBC_OnedCode128Writer*)m_pBCWriter)->FilterContents(content);
m_renderContents = encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedCode128Writer*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(encodeContents, data, outWidth, isDevice, e);
@@ -479,8 +479,8 @@ FX_BOOL CBC_EAN8::Encode(const CFX_WideStringC& contents,
CFX_WideString encodeContents = Preprocess(contents);
CFX_ByteString byteString = encodeContents.UTF8Encode();
m_renderContents = encodeContents;
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedEAN8Writer*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(encodeContents, data, outWidth, isDevice, e);
@@ -563,8 +563,8 @@ FX_BOOL CBC_EAN13::Encode(const CFX_WideStringC& contents,
CFX_WideString encodeContents = Preprocess(contents);
CFX_ByteString byteString = encodeContents.UTF8Encode();
m_renderContents = encodeContents;
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedEAN13Writer*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(encodeContents, data, outWidth, isDevice, e);
@@ -649,8 +649,8 @@ FX_BOOL CBC_UPCA::Encode(const CFX_WideStringC& contents,
CFX_ByteString byteString = encodeContents.UTF8Encode();
m_renderContents = encodeContents;
((CBC_OnedUPCAWriter*)m_pBCWriter)->Init();
- uint8_t* data =
- m_pBCWriter->Encode(byteString, format, outWidth, outHeight, e);
+ uint8_t* data = static_cast<CBC_OnedUPCAWriter*>(m_pBCWriter)
+ ->Encode(byteString, format, outWidth, outHeight, e);
BC_EXCEPTION_CHECK_ReturnValue(e, FALSE);
((CBC_OneDimWriter*)m_pBCWriter)
->RenderResult(encodeContents, data, outWidth, isDevice, e);
diff --git a/xfa/src/fxbarcode/BC_TwoDimWriter.h b/xfa/src/fxbarcode/BC_TwoDimWriter.h
index 6a9866bd51..dfbd98099a 100644
--- a/xfa/src/fxbarcode/BC_TwoDimWriter.h
+++ b/xfa/src/fxbarcode/BC_TwoDimWriter.h
@@ -15,28 +15,6 @@ class CBC_TwoDimWriter : public CBC_Writer {
public:
CBC_TwoDimWriter();
virtual ~CBC_TwoDimWriter();
- virtual uint8_t* Encode(const CFX_WideString& contents,
- int32_t ecLevel,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t& e) {
- return nullptr;
- };
- virtual uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t hints,
- int32_t& e) {
- return nullptr;
- };
- virtual uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t& e) {
- return nullptr;
- };
virtual void RenderResult(uint8_t* code,
int32_t codeWidth,
int32_t codeHeight,
diff --git a/xfa/src/fxbarcode/BC_Writer.h b/xfa/src/fxbarcode/BC_Writer.h
index b895b81ae4..00cb975124 100644
--- a/xfa/src/fxbarcode/BC_Writer.h
+++ b/xfa/src/fxbarcode/BC_Writer.h
@@ -15,17 +15,6 @@ class CBC_Writer {
public:
CBC_Writer();
virtual ~CBC_Writer();
- virtual uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t& e) = 0;
- virtual uint8_t* Encode(const CFX_ByteString& contents,
- BCFORMAT format,
- int32_t& outWidth,
- int32_t& outHeight,
- int32_t hints,
- int32_t& e) = 0;
virtual FX_BOOL SetCharEncoding(int32_t encoding);
virtual FX_BOOL SetModuleHeight(int32_t moduleHeight);
virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
index 886164cb3c..cf89972861 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -28,6 +28,11 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& outHeight,
int32_t hints,
int32_t& e);
+ uint8_t* Encode(const CFX_ByteString& contents,
+ int32_t& outLength,
+ int32_t& e) {
+ return nullptr;
+ }
void RenderResult(const CFX_WideStringC& contents,
uint8_t* code,
int32_t codeLength,