summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp2
-rw-r--r--fpdfsdk/fpdf_dataavail.cpp4
-rw-r--r--fpdfsdk/fpdf_sysfontinfo.cpp4
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp6
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp2
-rw-r--r--xfa/fde/css/fde_cssdeclaration.h2
6 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index d93e309d2f..f729f717d9 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -766,5 +766,5 @@ FX_BOOL CPDFSDK_FormFillEnvironment::KillFocusAnnot(uint32_t nFlag) {
}
FX_BOOL CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) {
- return GetPDFDocument()->GetUserPermissions() & nFlag;
+ return !!(GetPDFDocument()->GetUserPermissions() & nFlag);
}
diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp
index 45d3b2aa5d..481dd3b60f 100644
--- a/fpdfsdk/fpdf_dataavail.cpp
+++ b/fpdfsdk/fpdf_dataavail.cpp
@@ -50,7 +50,7 @@ class CFPDF_FileAvailWrap : public CPDF_DataAvail::FileAvail {
// CPDF_DataAvail::FileAvail:
FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size) override {
- return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size);
+ return !!m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size);
}
private:
@@ -117,7 +117,7 @@ DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail,
pAvail->m_FileAvail.Set(file_avail);
pAvail->m_FileRead.Set(file);
pAvail->m_pDataAvail = pdfium::MakeUnique<CPDF_DataAvail>(
- &pAvail->m_FileAvail, &pAvail->m_FileRead, TRUE);
+ &pAvail->m_FileAvail, &pAvail->m_FileRead, true);
return pAvail;
}
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 5f80ca0860..bfd45e8d2b 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -129,8 +129,8 @@ static void* DefaultMapFont(struct _FPDF_SYSFONTINFO* pThis,
const char* family,
int* bExact) {
auto* pDefault = static_cast<FPDF_SYSFONTINFO_DEFAULT*>(pThis);
- return pDefault->m_pFontInfo->MapFont(weight, bItalic, charset, pitch_family,
- family, *bExact);
+ return pDefault->m_pFontInfo->MapFont(weight, !!bItalic, charset,
+ pitch_family, family, *bExact);
}
void* DefaultGetFont(struct _FPDF_SYSFONTINFO* pThis, const char* family) {
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 32df561d7e..60ad6090a6 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -1339,7 +1339,7 @@ FX_BOOL CFDE_TxtEdtEngine::MoveUp(CFX_PointF& ptCaret) {
ptCaret.x = m_rtCaret.left + m_rtCaret.width / 2 - m_Param.fLineSpace;
ptCaret.y = m_fCaretPosReserve;
FX_BOOL bLineReserve =
- m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve;
+ !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
if (ptCaret.x < rtContent.left) {
if (bLineReserve) {
if (m_nCaretPage == CountPages() - 1) {
@@ -1383,7 +1383,7 @@ FX_BOOL CFDE_TxtEdtEngine::MoveDown(CFX_PointF& ptCaret) {
ptCaret.y = m_fCaretPosReserve;
if (ptCaret.x >= rtContent.right()) {
FX_BOOL bLineReserve =
- m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve;
+ !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
if (bLineReserve) {
if (m_nCaretPage == 0) {
return FALSE;
@@ -1566,7 +1566,7 @@ void CFDE_TxtEdtEngine::GetCaretRect(CFX_RectF& rtCaret,
FX_BOOL bBefore) {
IFDE_TxtEdtPage* pPage = m_PagePtrArray[m_nCaretPage];
m_Param.pEventSink->On_PageLoad(this, m_nCaretPage, 0);
- FX_BOOL bCombText = m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText;
+ FX_BOOL bCombText = !!(m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText);
int32_t nIndexInpage = nCaret - pPage->GetCharStart();
if (bBefore && bCombText && nIndexInpage > 0) {
nIndexInpage--;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index 24eab86e0b..9f0d29f63d 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -295,7 +295,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
nPageEnd += (nTemp - 1);
FX_BOOL bVertial = pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_DocVertical;
FX_BOOL bLineReserve =
- pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve;
+ !!(pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_LineReserve);
FX_FLOAT fLineStart =
bVertial
? (bLineReserve ? (pParams->fPlateWidth - pParams->fLineSpace) : 0.0f)
diff --git a/xfa/fde/css/fde_cssdeclaration.h b/xfa/fde/css/fde_cssdeclaration.h
index d33e7107c8..3598429e3a 100644
--- a/xfa/fde/css/fde_cssdeclaration.h
+++ b/xfa/fde/css/fde_cssdeclaration.h
@@ -14,7 +14,7 @@
class FDE_CSSPropertyHolder : public CFX_Target {
public:
int16_t eProperty;
- int16_t bImportant;
+ FX_BOOL bImportant;
IFDE_CSSValue* pValue;
FDE_CSSPropertyHolder* pNext;
};