summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:43:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:43:19 -0700
commitd19e912dd469e4bdad9f3020e1f6eb98f10f3470 (patch)
tree239cb568a80445f14a1ab9b63dcaaddcce67e1cc /xfa/fxfa
parent12f3e4a58f05850b93af35619cb04f0231d86acc (diff)
downloadpdfium-d19e912dd469e4bdad9f3020e1f6eb98f10f3470.tar.xz
Remove FX_BOOL from xfa.
Review-Url: https://codereview.chromium.org/2467203003
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_eventparam.cpp24
-rw-r--r--xfa/fxfa/app/xfa_checksum.cpp26
-rw-r--r--xfa/fxfa/app/xfa_ffapp.cpp8
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp20
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.h6
-rw-r--r--xfa/fxfa/app/xfa_ffcheckbutton.cpp32
-rw-r--r--xfa/fxfa/app/xfa_ffcheckbutton.h12
-rw-r--r--xfa/fxfa/app/xfa_ffchoicelist.cpp122
-rw-r--r--xfa/fxfa/app/xfa_ffchoicelist.h66
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp41
-rw-r--r--xfa/fxfa/app/xfa_ffdochandler.cpp14
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp100
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp186
-rw-r--r--xfa/fxfa/app/xfa_fffield.h60
-rw-r--r--xfa/fxfa/app/xfa_ffimage.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffimage.h4
-rw-r--r--xfa/fxfa/app/xfa_ffimageedit.cpp28
-rw-r--r--xfa/fxfa/app/xfa_ffimageedit.h8
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp18
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.h12
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp50
-rw-r--r--xfa/fxfa/app/xfa_ffpath.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp8
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.h4
-rw-r--r--xfa/fxfa/app/xfa_ffsignature.cpp96
-rw-r--r--xfa/fxfa/app/xfa_ffsignature.h36
-rw-r--r--xfa/fxfa/app/xfa_fftext.cpp42
-rw-r--r--xfa/fxfa/app/xfa_fftext.h10
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.cpp192
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.h106
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp368
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp184
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.h12
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp172
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.cpp12
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.h10
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp267
-rw-r--r--xfa/fxfa/app/xfa_textlayout.h108
-rw-r--r--xfa/fxfa/cxfa_eventparam.h12
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.cpp2
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.h4
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp346
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.h130
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.cpp16
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.cpp48
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.h2
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp12
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.h8
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp2
-rw-r--r--xfa/fxfa/fxfa.h64
-rw-r--r--xfa/fxfa/fxfa_basic.h2
-rw-r--r--xfa/fxfa/fxfa_widget.h42
-rw-r--r--xfa/fxfa/parser/cscript_datawindow.cpp8
-rw-r--r--xfa/fxfa/parser/cscript_datawindow.h10
-rw-r--r--xfa/fxfa/parser/cscript_eventpseudomodel.cpp40
-rw-r--r--xfa/fxfa/parser/cscript_eventpseudomodel.h50
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.cpp75
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.h40
-rw-r--r--xfa/fxfa/parser/cscript_layoutpseudomodel.cpp28
-rw-r--r--xfa/fxfa/parser/cscript_layoutpseudomodel.h8
-rw-r--r--xfa/fxfa/parser/cscript_signaturepseudomodel.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_arraynodelist.cpp13
-rw-r--r--xfa/fxfa/parser/cxfa_attachnodelist.cpp7
-rw-r--r--xfa/fxfa/parser/cxfa_binditems.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_binditems.h2
-rw-r--r--xfa/fxfa/parser/cxfa_box.cpp26
-rw-r--r--xfa/fxfa/parser/cxfa_box.h10
-rw-r--r--xfa/fxfa/parser/cxfa_calculate.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_containerlayoutitem.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_contentlayoutitem.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_data.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_data.h8
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.cpp82
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.h18
-rw-r--r--xfa/fxfa/parser/cxfa_dataimporter.cpp14
-rw-r--r--xfa/fxfa/parser/cxfa_dataimporter.h2
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp18
-rw-r--r--xfa/fxfa/parser/cxfa_document.h14
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_exdata.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_exdata.h2
-rw-r--r--xfa/fxfa/parser/cxfa_fill.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_fill.h2
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_font.h4
-rw-r--r--xfa/fxfa/parser/cxfa_image.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_image.h16
-rw-r--r--xfa/fxfa/parser/cxfa_layoutitem.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_layoutitem.h10
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp347
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.h109
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.cpp20
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.h10
-rw-r--r--xfa/fxfa/parser/cxfa_line.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_line.h2
-rw-r--r--xfa/fxfa/parser/cxfa_margin.cpp9
-rw-r--r--xfa/fxfa/parser/cxfa_margin.h8
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.cpp40
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.h4
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp738
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.cpp72
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.h30
-rw-r--r--xfa/fxfa/parser/cxfa_nodelist.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_object.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_occur.cpp24
-rw-r--r--xfa/fxfa/parser/cxfa_occur.h2
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp46
-rw-r--r--xfa/fxfa/parser/cxfa_script.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp120
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.h41
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp116
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.h6
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.cpp20
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.h4
-rw-r--r--xfa/fxfa/parser/cxfa_submit.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_submit.h2
-rw-r--r--xfa/fxfa/parser/cxfa_tooltip.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_tooltip.h2
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp22
-rw-r--r--xfa/fxfa/parser/cxfa_validate.h8
-rw-r--r--xfa/fxfa/parser/cxfa_value.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_value.h2
-rw-r--r--xfa/fxfa/parser/cxfa_widetextread.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_widetextread.h8
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp400
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h139
-rw-r--r--xfa/fxfa/parser/cxfa_xml_parser.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp222
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.h2
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp504
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.h84
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp28
-rw-r--r--xfa/fxfa/parser/xfa_locale.h20
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp263
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.h96
-rw-r--r--xfa/fxfa/parser/xfa_object.h368
-rw-r--r--xfa/fxfa/parser/xfa_resolvenode_rs.h2
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp24
-rw-r--r--xfa/fxfa/parser/xfa_utils.h38
-rw-r--r--xfa/fxfa/xfa_checksum.h8
-rw-r--r--xfa/fxfa/xfa_ffapp.h2
-rw-r--r--xfa/fxfa/xfa_ffdoc.h10
-rw-r--r--xfa/fxfa/xfa_ffdochandler.h10
-rw-r--r--xfa/fxfa/xfa_ffdocview.h28
-rw-r--r--xfa/fxfa/xfa_ffpageview.h14
-rw-r--r--xfa/fxfa/xfa_ffwidget.h114
-rw-r--r--xfa/fxfa/xfa_ffwidgethandler.h78
-rw-r--r--xfa/fxfa/xfa_rendercontext.h6
150 files changed, 3974 insertions, 4073 deletions
diff --git a/xfa/fxfa/app/cxfa_eventparam.cpp b/xfa/fxfa/app/cxfa_eventparam.cpp
index 551f7f87d7..bcce7219bc 100644
--- a/xfa/fxfa/app/cxfa_eventparam.cpp
+++ b/xfa/fxfa/app/cxfa_eventparam.cpp
@@ -11,15 +11,15 @@
CXFA_EventParam::CXFA_EventParam()
: m_pTarget(nullptr),
m_eType(XFA_EVENT_Unknown),
- m_bCancelAction(FALSE),
+ m_bCancelAction(false),
m_iCommitKey(0),
- m_bKeyDown(FALSE),
- m_bModifier(FALSE),
- m_bReenter(FALSE),
+ m_bKeyDown(false),
+ m_bModifier(false),
+ m_bReenter(false),
m_iSelEnd(0),
m_iSelStart(0),
- m_bShift(FALSE),
- m_bIsFormReady(FALSE),
+ m_bShift(false),
+ m_bIsFormReady(false),
m_iValidateActivities(XFA_VALIDATE_preSubmit) {}
CXFA_EventParam::~CXFA_EventParam() {}
@@ -28,21 +28,21 @@ CXFA_EventParam::CXFA_EventParam(const CXFA_EventParam& other) = default;
void CXFA_EventParam::Reset() {
m_wsChange.clear();
- m_bCancelAction = FALSE;
+ m_bCancelAction = false;
m_iCommitKey = 0;
m_wsFullText.clear();
- m_bKeyDown = FALSE;
- m_bModifier = FALSE;
+ m_bKeyDown = false;
+ m_bModifier = false;
m_wsNewContentType.clear();
m_wsNewText.clear();
m_wsPrevContentType.clear();
m_wsPrevText.clear();
- m_bReenter = FALSE;
+ m_bReenter = false;
m_iSelEnd = 0;
m_iSelStart = 0;
- m_bShift = FALSE;
+ m_bShift = false;
m_wsSoapFaultCode.clear();
m_wsSoapFaultString.clear();
- m_bIsFormReady = FALSE;
+ m_bIsFormReady = false;
m_iValidateActivities = XFA_VALIDATE_preSubmit;
}
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 351ae73a03..01035f8ea4 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -100,7 +100,7 @@ CXFA_SAXContext* CXFA_SAXReaderHandler::OnTagEnter(
const CFX_ByteStringC& bsTagName,
CFX_SAXItem::Type eType,
uint32_t dwStartPos) {
- UpdateChecksum(TRUE);
+ UpdateChecksum(true);
if (eType != CFX_SAXItem::Type::Tag &&
eType != CFX_SAXItem::Type::Instruction) {
return nullptr;
@@ -130,7 +130,7 @@ void CXFA_SAXReaderHandler::OnTagBreak(CXFA_SAXContext* pTag) {
return;
pTag->m_TextBuf << ">";
- UpdateChecksum(FALSE);
+ UpdateChecksum(false);
}
void CXFA_SAXReaderHandler::OnTagData(CXFA_SAXContext* pTag,
@@ -160,7 +160,7 @@ void CXFA_SAXReaderHandler::OnTagClose(CXFA_SAXContext* pTag,
else if (pTag->m_eNode == CFX_SAXItem::Type::Tag)
textBuf << "></" << pTag->m_bsTagName.AsStringC() << ">";
- UpdateChecksum(FALSE);
+ UpdateChecksum(false);
}
void CXFA_SAXReaderHandler::OnTagEnd(CXFA_SAXContext* pTag,
@@ -170,7 +170,7 @@ void CXFA_SAXReaderHandler::OnTagEnd(CXFA_SAXContext* pTag,
return;
pTag->m_TextBuf << "</" << bsTagName << ">";
- UpdateChecksum(FALSE);
+ UpdateChecksum(false);
}
void CXFA_SAXReaderHandler::OnTargetData(CXFA_SAXContext* pTag,
@@ -182,21 +182,21 @@ void CXFA_SAXReaderHandler::OnTargetData(CXFA_SAXContext* pTag,
if (eType == CFX_SAXItem::Type::Comment) {
m_SAXContext.m_TextBuf << "<!--" << bsData << "-->";
- UpdateChecksum(FALSE);
+ UpdateChecksum(false);
} else {
pTag->m_TextBuf << " " << bsData;
}
}
-void CXFA_SAXReaderHandler::UpdateChecksum(FX_BOOL bCheckSpace) {
+void CXFA_SAXReaderHandler::UpdateChecksum(bool bCheckSpace) {
int32_t iLength = m_SAXContext.m_TextBuf.GetLength();
if (iLength < 1) {
return;
}
uint8_t* pBuffer = m_SAXContext.m_TextBuf.GetBuffer();
- FX_BOOL bUpdata = TRUE;
+ bool bUpdata = true;
if (bCheckSpace) {
- bUpdata = FALSE;
+ bUpdata = false;
for (int32_t i = 0; i < iLength; i++) {
bUpdata = (pBuffer[i] > 0x20);
if (bUpdata) {
@@ -225,11 +225,11 @@ void CXFA_ChecksumContext::StartChecksum() {
m_pSAXReader = new CFX_SAXReader;
}
-FX_BOOL CXFA_ChecksumContext::UpdateChecksum(IFX_SeekableReadStream* pSrcFile,
- FX_FILESIZE offset,
- size_t size) {
+bool CXFA_ChecksumContext::UpdateChecksum(IFX_SeekableReadStream* pSrcFile,
+ FX_FILESIZE offset,
+ size_t size) {
if (!m_pSAXReader || !pSrcFile)
- return FALSE;
+ return false;
if (size < 1)
size = pSrcFile->GetSize();
@@ -240,7 +240,7 @@ FX_BOOL CXFA_ChecksumContext::UpdateChecksum(IFX_SeekableReadStream* pSrcFile,
CFX_SaxParseMode_NotSkipSpace | CFX_SaxParseMode_NotConvert_amp |
CFX_SaxParseMode_NotConvert_lt | CFX_SaxParseMode_NotConvert_gt |
CFX_SaxParseMode_NotConvert_sharp) < 0) {
- return FALSE;
+ return false;
}
return m_pSAXReader->ContinueParse(nullptr) > 99;
}
diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp
index db97c6371a..c5dcad848c 100644
--- a/xfa/fxfa/app/xfa_ffapp.cpp
+++ b/xfa/fxfa/app/xfa_ffapp.cpp
@@ -89,9 +89,9 @@ CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
IFX_SeekableReadStream* pStream,
- FX_BOOL bTakeOverFile) {
+ bool bTakeOverFile) {
std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pDocEnvironment));
- FX_BOOL bSuccess = pDoc->OpenDoc(pStream, bTakeOverFile);
+ bool bSuccess = pDoc->OpenDoc(pStream, bTakeOverFile);
return bSuccess ? pDoc.release() : nullptr;
}
@@ -101,7 +101,7 @@ CXFA_FFDoc* CXFA_FFApp::CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
return nullptr;
std::unique_ptr<CXFA_FFDoc> pDoc(new CXFA_FFDoc(this, pDocEnvironment));
- FX_BOOL bSuccess = pDoc->OpenDoc(pPDFDoc);
+ bool bSuccess = pDoc->OpenDoc(pPDFDoc);
return bSuccess ? pDoc.release() : nullptr;
}
@@ -149,5 +149,5 @@ IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const {
}
void CXFA_FFApp::ClearEventTargets() {
- m_pFWLApp->GetNoteDriver()->ClearEventTargets(FALSE);
+ m_pFWLApp->GetNoteDriver()->ClearEventTargets(false);
}
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index 181b3be80c..a971e959ca 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -122,7 +122,7 @@ CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView,
CXFA_FFBarcode::~CXFA_FFBarcode() {}
-FX_BOOL CXFA_FFBarcode::LoadWidget() {
+bool CXFA_FFBarcode::LoadWidget() {
CFWL_Barcode* pFWLBarcode = new CFWL_Barcode(GetFWLApp());
pFWLBarcode->Initialize();
@@ -179,7 +179,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
CXFA_WidgetAcc* pAcc = GetDataAcc();
int32_t intVal;
FX_CHAR charVal;
- FX_BOOL boolVal;
+ bool boolVal;
FX_FLOAT floatVal;
if (pAcc->GetBarcodeAttribute_CharEncoding(intVal)) {
pBarCodeWidget->SetCharEncoding((BC_CHAR_ENCODING)intVal);
@@ -221,28 +221,24 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean8 ||
pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean13 ||
pBarcodeTypeInfo->eName == XFA_BARCODETYPE_upcA) {
- pBarCodeWidget->SetPrintChecksum(TRUE);
+ pBarCodeWidget->SetPrintChecksum(true);
}
}
-FX_BOOL CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
- return FALSE;
+ return false;
}
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
return CXFA_FFTextEdit::OnLButtonDown(dwFlags, fx, fy);
}
-FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
- return FALSE;
+ return false;
}
return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy);
}
diff --git a/xfa/fxfa/app/xfa_ffbarcode.h b/xfa/fxfa/app/xfa_ffbarcode.h
index 5d0484a4bd..d2b5df3517 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.h
+++ b/xfa/fxfa/app/xfa_ffbarcode.h
@@ -17,13 +17,13 @@ class CXFA_FFBarcode : public CXFA_FFTextEdit {
~CXFA_FFBarcode() override;
// CXFA_FFTextEdit
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
void UpdateWidgetProperty() override;
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
};
enum XFA_BARCODETYPEENUM {
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index 9365ccf0a4..391d76ca49 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -26,7 +26,7 @@ CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_FFPageView* pPageView,
CXFA_FFCheckButton::~CXFA_FFCheckButton() {}
-FX_BOOL CXFA_FFCheckButton::LoadWidget() {
+bool CXFA_FFCheckButton::LoadWidget() {
CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp());
pCheckBox->Initialize();
m_pNormalWidget = pCheckBox;
@@ -88,7 +88,7 @@ void CXFA_FFCheckButton::UpdateWidgetProperty() {
pCheckBox->ModifyStylesEx(
dwStyleEx, FWL_STYLEEXT_CKB_SignShapeMask | FWL_STYLEEXT_CKB_3State);
}
-FX_BOOL CXFA_FFCheckButton::PerformLayout() {
+bool CXFA_FFCheckButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
FX_FLOAT fCheckSize = m_pDataAcc->GetCheckButtonSize();
CXFA_Margin mgWidget = m_pDataAcc->GetMargin();
@@ -180,7 +180,7 @@ FX_BOOL CXFA_FFCheckButton::PerformLayout() {
if (m_pNormalWidget) {
m_pNormalWidget->Update();
}
- return TRUE;
+ return true;
}
void CXFA_FFCheckButton::CapLeftRightPlacement(CXFA_Margin mgCap) {
XFA_RectWidthoutMargin(m_rtCaption, mgCap);
@@ -241,13 +241,13 @@ void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS,
GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(),
pGS, &mt);
}
-FX_BOOL CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
if (!m_pNormalWidget || !IsButtonDown())
- return FALSE;
+ return false;
- SetButtonDown(FALSE);
+ SetButtonDown(false);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
ms.m_dwFlags = dwFlags;
@@ -256,7 +256,7 @@ FX_BOOL CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() {
@@ -268,32 +268,32 @@ XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() {
return XFA_CHECKSTATE_Off;
}
-FX_BOOL CXFA_FFCheckButton::CommitData() {
+bool CXFA_FFCheckButton::CommitData() {
XFA_CHECKSTATE eCheckState = FWLState2XFAState();
m_pDataAcc->SetCheckState(eCheckState, true);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFCheckButton::IsDataChanged() {
+bool CXFA_FFCheckButton::IsDataChanged() {
XFA_CHECKSTATE eCheckState = FWLState2XFAState();
return m_pDataAcc->GetCheckState() != eCheckState;
}
void CXFA_FFCheckButton::SetFWLCheckState(XFA_CHECKSTATE eCheckState) {
if (eCheckState == XFA_CHECKSTATE_Neutral) {
- m_pNormalWidget->SetStates(FWL_STATE_CKB_Neutral, TRUE);
+ m_pNormalWidget->SetStates(FWL_STATE_CKB_Neutral, true);
} else {
m_pNormalWidget->SetStates(FWL_STATE_CKB_Checked,
eCheckState == XFA_CHECKSTATE_On);
}
}
-FX_BOOL CXFA_FFCheckButton::UpdateFWLData() {
+bool CXFA_FFCheckButton::UpdateFWLData() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
XFA_CHECKSTATE eState = m_pDataAcc->GetCheckState();
SetFWLCheckState(eState);
m_pNormalWidget->Update();
- return TRUE;
+ return true;
}
void CXFA_FFCheckButton::OnProcessMessage(CFWL_Message* pMessage) {
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.h b/xfa/fxfa/app/xfa_ffcheckbutton.h
index 0c2cb755ac..dcd68935af 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.h
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.h
@@ -20,11 +20,11 @@ class CXFA_FFCheckButton : public CXFA_FFField {
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL LoadWidget() override;
- FX_BOOL PerformLayout() override;
- FX_BOOL UpdateFWLData() override;
+ bool LoadWidget() override;
+ bool PerformLayout() override;
+ bool UpdateFWLData() override;
void UpdateWidgetProperty() override;
- FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CFX_Graphics* pGraphics,
@@ -33,8 +33,8 @@ class CXFA_FFCheckButton : public CXFA_FFField {
void SetFWLCheckState(XFA_CHECKSTATE eCheckState);
protected:
- FX_BOOL CommitData() override;
- FX_BOOL IsDataChanged() override;
+ bool CommitData() override;
+ bool IsDataChanged() override;
void CapLeftRightPlacement(CXFA_Margin mgCap);
void AddUIMargin(int32_t iCapPlacement);
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index 1575889815..7a20730410 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.cpp
+++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp
@@ -31,7 +31,7 @@ CXFA_FFListBox::~CXFA_FFListBox() {
}
}
-FX_BOOL CXFA_FFListBox::LoadWidget() {
+bool CXFA_FFListBox::LoadWidget() {
CFWL_ListBox* pListBox = new CFWL_ListBox(GetFWLApp());
pListBox->Initialize();
pListBox->ModifyStyles(FWL_WGTSTYLE_VScroll | FWL_WGTSTYLE_NoBackground,
@@ -48,7 +48,7 @@ FX_BOOL CXFA_FFListBox::LoadWidget() {
m_pNormalWidget->LockUpdate();
CFX_WideStringArray wsLabelArray;
- m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
+ m_pDataAcc->GetChoiceListItems(wsLabelArray, false);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
pListBox->AddString(wsLabelArray[i].AsStringC());
@@ -64,44 +64,44 @@ FX_BOOL CXFA_FFListBox::LoadWidget() {
int32_t iSelCount = iSelArray.GetSize();
for (int32_t j = 0; j < iSelCount; j++) {
IFWL_ListItem* item = pListBox->GetItem(iSelArray[j]);
- pListBox->SetSelItem(item, TRUE);
+ pListBox->SetSelItem(item, true);
}
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
}
-FX_BOOL CXFA_FFListBox::OnKillFocus(CXFA_FFWidget* pNewFocus) {
+bool CXFA_FFListBox::OnKillFocus(CXFA_FFWidget* pNewFocus) {
if (!ProcessCommittedData())
UpdateFWLData();
CXFA_FFField::OnKillFocus(pNewFocus);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFListBox::CommitData() {
+bool CXFA_FFListBox::CommitData() {
CFWL_ListBox* pListBox = static_cast<CFWL_ListBox*>(m_pNormalWidget);
int32_t iSels = pListBox->CountSelItems();
CFX_Int32Array iSelArray;
for (int32_t i = 0; i < iSels; ++i)
iSelArray.Add(pListBox->GetSelIndex(i));
- m_pDataAcc->SetSelectedItems(iSelArray, true, FALSE, TRUE);
- return TRUE;
+ m_pDataAcc->SetSelectedItems(iSelArray, true, false, true);
+ return true;
}
-FX_BOOL CXFA_FFListBox::IsDataChanged() {
+bool CXFA_FFListBox::IsDataChanged() {
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
int32_t iOldSels = iSelArray.GetSize();
CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget;
int32_t iSels = pListBox->CountSelItems();
if (iOldSels != iSels)
- return TRUE;
+ return true;
for (int32_t i = 0; i < iSels; ++i) {
IFWL_ListItem* hlistItem = pListBox->GetItem(iSelArray[i]);
if (!(pListBox->GetItemStates(hlistItem) & FWL_ITEMSTATE_LTB_Selected))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
uint32_t CXFA_FFListBox::GetAlignment() {
@@ -128,9 +128,9 @@ uint32_t CXFA_FFListBox::GetAlignment() {
}
return dwExtendedStyle;
}
-FX_BOOL CXFA_FFListBox::UpdateFWLData() {
+bool CXFA_FFListBox::UpdateFWLData() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_ListBox* pListBox = ((CFWL_ListBox*)m_pNormalWidget);
CFX_ArrayTemplate<IFWL_ListItem*> selItemArray;
@@ -141,12 +141,12 @@ FX_BOOL CXFA_FFListBox::UpdateFWLData() {
IFWL_ListItem* lpItemSel = pListBox->GetSelItem(iSelArray[j]);
selItemArray.Add(lpItemSel);
}
- pListBox->SetSelItem(pListBox->GetSelItem(-1), FALSE);
+ pListBox->SetSelItem(pListBox->GetSelItem(-1), false);
for (int32_t i = 0; i < iSelCount; i++) {
- ((CFWL_ListBox*)m_pNormalWidget)->SetSelItem(selItemArray[i], TRUE);
+ ((CFWL_ListBox*)m_pNormalWidget)->SetSelItem(selItemArray[i], true);
}
m_pNormalWidget->Update();
- return TRUE;
+ return true;
}
void CXFA_FFListBox::OnSelectChanged(IFWL_Widget* pWidget,
const CFX_Int32Array& arrSels) {
@@ -161,7 +161,7 @@ void CXFA_FFListBox::OnSelectChanged(IFWL_Widget* pWidget,
}
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
}
-void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected) {
+void CXFA_FFListBox::SetItemState(int32_t nIndex, bool bSelected) {
IFWL_ListItem* item = ((CFWL_ListBox*)m_pNormalWidget)->GetSelItem(nIndex);
((CFWL_ListBox*)m_pNormalWidget)->SetSelItem(item, bSelected);
m_pNormalWidget->Update();
@@ -213,26 +213,26 @@ CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView,
CXFA_FFComboBox::~CXFA_FFComboBox() {}
-FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus) {
+bool CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus) {
if (bDrawFocus)
- return FALSE;
+ return false;
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
}
-FX_BOOL CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFX_RectF rtWidget;
((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget);
if (rtWidget.Contains(fx, fy)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_FFComboBox::LoadWidget() {
+bool CXFA_FFComboBox::LoadWidget() {
CFWL_ComboBox* pComboBox = new CFWL_ComboBox(GetFWLApp());
pComboBox->Initialize();
m_pNormalWidget = (CFWL_Widget*)pComboBox;
@@ -247,7 +247,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() {
m_pNormalWidget->LockUpdate();
CFX_WideStringArray wsLabelArray;
- m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
+ m_pDataAcc->GetChoiceListItems(wsLabelArray, false);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
pComboBox->AddString(wsLabelArray[i].AsStringC());
@@ -291,30 +291,28 @@ void CXFA_FFComboBox::UpdateWidgetProperty() {
}
pComboBox->EditModifyStylesEx(dwEditStyles, 0xFFFFFFFF);
}
-FX_BOOL CXFA_FFComboBox::OnRButtonUp(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFComboBox::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy))
- return FALSE;
+ return false;
GetDoc()->GetDocEnvironment()->PopupMenu(this, CFX_PointF(fx, fy));
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget) {
- FX_BOOL flag = ProcessCommittedData();
+bool CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget) {
+ bool flag = ProcessCommittedData();
if (!flag) {
UpdateFWLData();
}
CXFA_FFField::OnKillFocus(pNewWidget);
- return TRUE;
+ return true;
}
void CXFA_FFComboBox::OpenDropDownList() {
- ((CFWL_ComboBox*)m_pNormalWidget)->OpenDropDownList(TRUE);
+ ((CFWL_ComboBox*)m_pNormalWidget)->OpenDropDownList(true);
}
-FX_BOOL CXFA_FFComboBox::CommitData() {
+bool CXFA_FFComboBox::CommitData() {
return m_pDataAcc->SetValue(m_wsNewValue, XFA_VALUEPICTURE_Raw);
}
-FX_BOOL CXFA_FFComboBox::IsDataChanged() {
+bool CXFA_FFComboBox::IsDataChanged() {
CFWL_ComboBox* pFWLcombobox = ((CFWL_ComboBox*)m_pNormalWidget);
CFX_WideString wsText;
pFWLcombobox->GetEditText(wsText);
@@ -323,16 +321,16 @@ FX_BOOL CXFA_FFComboBox::IsDataChanged() {
CFX_WideString wsSel;
pFWLcombobox->GetTextByIndex(iCursel, wsSel);
if (wsSel == wsText) {
- m_pDataAcc->GetChoiceListItem(wsText, iCursel, TRUE);
+ m_pDataAcc->GetChoiceListItem(wsText, iCursel, true);
}
}
CFX_WideString wsOldValue;
m_pDataAcc->GetValue(wsOldValue, XFA_VALUEPICTURE_Raw);
if (wsOldValue != wsText) {
m_wsNewValue = wsText;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_FFComboBox::FWLEventSelChange(CXFA_EventParam* pParam) {
pParam->m_eType = XFA_EVENT_Change;
@@ -379,9 +377,9 @@ uint32_t CXFA_FFComboBox::GetAlignment() {
}
return dwExtendedStyle;
}
-FX_BOOL CXFA_FFComboBox::UpdateFWLData() {
+bool CXFA_FFComboBox::UpdateFWLData() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
@@ -395,62 +393,62 @@ FX_BOOL CXFA_FFComboBox::UpdateFWLData() {
((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText);
}
m_pNormalWidget->Update();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFComboBox::CanUndo() {
+bool CXFA_FFComboBox::CanUndo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditCanUndo();
}
-FX_BOOL CXFA_FFComboBox::CanRedo() {
+bool CXFA_FFComboBox::CanRedo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditCanRedo();
}
-FX_BOOL CXFA_FFComboBox::Undo() {
+bool CXFA_FFComboBox::Undo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditUndo();
}
-FX_BOOL CXFA_FFComboBox::Redo() {
+bool CXFA_FFComboBox::Redo() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditRedo();
}
-FX_BOOL CXFA_FFComboBox::CanCopy() {
+bool CXFA_FFComboBox::CanCopy() {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditCanCopy();
}
-FX_BOOL CXFA_FFComboBox::CanCut() {
+bool CXFA_FFComboBox::CanCut() {
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditCanCut();
}
-FX_BOOL CXFA_FFComboBox::CanPaste() {
+bool CXFA_FFComboBox::CanPaste() {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
(m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open);
}
-FX_BOOL CXFA_FFComboBox::CanSelectAll() {
+bool CXFA_FFComboBox::CanSelectAll() {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditCanSelectAll();
}
-FX_BOOL CXFA_FFComboBox::Copy(CFX_WideString& wsCopy) {
+bool CXFA_FFComboBox::Copy(CFX_WideString& wsCopy) {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditCopy(wsCopy);
}
-FX_BOOL CXFA_FFComboBox::Cut(CFX_WideString& wsCut) {
+bool CXFA_FFComboBox::Cut(CFX_WideString& wsCut) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditCut(wsCut);
}
-FX_BOOL CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) {
+bool CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
((CFWL_ComboBox*)m_pNormalWidget)->EditPaste(wsPaste);
}
-FX_BOOL CXFA_FFComboBox::SelectAll() {
+bool CXFA_FFComboBox::SelectAll() {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditSelectAll();
}
-FX_BOOL CXFA_FFComboBox::Delete() {
+bool CXFA_FFComboBox::Delete() {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditDelete();
}
-FX_BOOL CXFA_FFComboBox::DeSelect() {
+bool CXFA_FFComboBox::DeSelect() {
return ((CFWL_ComboBox*)m_pNormalWidget)->EditDeSelect();
}
-void CXFA_FFComboBox::SetItemState(int32_t nIndex, FX_BOOL bSelected) {
+void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) {
if (bSelected) {
((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(nIndex);
} else {
@@ -483,7 +481,7 @@ void CXFA_FFComboBox::OnTextChanged(IFWL_Widget* pWidget,
}
void CXFA_FFComboBox::OnSelectChanged(IFWL_Widget* pWidget,
const CFX_Int32Array& arrSels,
- FX_BOOL bLButtonUp) {
+ bool bLButtonUp) {
CXFA_EventParam eParam;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
FWLEventSelChange(&eParam);
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.h b/xfa/fxfa/app/xfa_ffchoicelist.h
index 712959d56c..9ce6cccd11 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.h
+++ b/xfa/fxfa/app/xfa_ffchoicelist.h
@@ -16,22 +16,22 @@ class CXFA_FFListBox : public CXFA_FFField {
~CXFA_FFListBox() override;
// CXFA_FFField
- FX_BOOL LoadWidget() override;
- FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override;
+ bool LoadWidget() override;
+ bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = nullptr) override;
void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels);
- void SetItemState(int32_t nIndex, FX_BOOL bSelected);
+ void SetItemState(int32_t nIndex, bool bSelected);
void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1);
void DeleteItem(int32_t nIndex);
protected:
- FX_BOOL CommitData() override;
- FX_BOOL UpdateFWLData() override;
- FX_BOOL IsDataChanged() override;
+ bool CommitData() override;
+ bool UpdateFWLData() override;
+ bool IsDataChanged() override;
uint32_t GetAlignment();
@@ -44,28 +44,28 @@ class CXFA_FFComboBox : public CXFA_FFField {
~CXFA_FFComboBox() override;
// CXFA_FFField
- FX_BOOL GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus = FALSE) override;
- FX_BOOL LoadWidget() override;
+ bool GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus = false) override;
+ bool LoadWidget() override;
void UpdateWidgetProperty() override;
- FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override;
- FX_BOOL CanUndo() override;
- FX_BOOL CanRedo() override;
- FX_BOOL Undo() override;
- FX_BOOL Redo() override;
-
- FX_BOOL CanCopy() override;
- FX_BOOL CanCut() override;
- FX_BOOL CanPaste() override;
- FX_BOOL CanSelectAll() override;
- FX_BOOL Copy(CFX_WideString& wsCopy) override;
- FX_BOOL Cut(CFX_WideString& wsCut) override;
- FX_BOOL Paste(const CFX_WideString& wsPaste) override;
- FX_BOOL SelectAll() override;
- FX_BOOL Delete() override;
- FX_BOOL DeSelect() override;
+ bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
+ bool CanUndo() override;
+ bool CanRedo() override;
+ bool Undo() override;
+ bool Redo() override;
+
+ bool CanCopy() override;
+ bool CanCut() override;
+ bool CanPaste() override;
+ bool CanSelectAll() override;
+ bool Copy(CFX_WideString& wsCopy) override;
+ bool Cut(CFX_WideString& wsCut) override;
+ bool Paste(const CFX_WideString& wsPaste) override;
+ bool SelectAll() override;
+ bool Delete() override;
+ bool DeSelect() override;
// IFWL_WidgetDelegate
void OnProcessMessage(CFWL_Message* pMessage) override;
@@ -78,19 +78,19 @@ class CXFA_FFComboBox : public CXFA_FFField {
void OnTextChanged(IFWL_Widget* pWidget, const CFX_WideString& wsChanged);
void OnSelectChanged(IFWL_Widget* pWidget,
const CFX_Int32Array& arrSels,
- FX_BOOL bLButtonUp);
+ bool bLButtonUp);
void OnPreOpen(IFWL_Widget* pWidget);
void OnPostOpen(IFWL_Widget* pWidget);
- void SetItemState(int32_t nIndex, FX_BOOL bSelected);
+ void SetItemState(int32_t nIndex, bool bSelected);
void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1);
void DeleteItem(int32_t nIndex);
protected:
// CXFA_FFField
- FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL CommitData() override;
- FX_BOOL UpdateFWLData() override;
- FX_BOOL IsDataChanged() override;
+ bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
+ bool CommitData() override;
+ bool UpdateFWLData() override;
+ bool IsDataChanged() override;
uint32_t GetAlignment();
void FWLEventSelChange(CXFA_EventParam* pParam);
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index cfb5e9fc47..5439b1fe47 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -155,7 +155,7 @@ CXFA_FFDoc::CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocEnvironment* pDocEnvironment)
m_pNotify(nullptr),
m_pPDFDoc(nullptr),
m_dwDocType(XFA_DOCTYPE_Static),
- m_bOwnStream(TRUE) {}
+ m_bOwnStream(true) {}
CXFA_FFDoc::~CXFA_FFDoc() {
CloseDoc();
@@ -172,9 +172,9 @@ int32_t CXFA_FFDoc::StartLoad() {
return iStatus;
}
-FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
- uint8_t*& pByteBuffer,
- int32_t& iBufferSize) {
+bool XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
+ uint8_t*& pByteBuffer,
+ int32_t& iBufferSize) {
CFDE_XMLElement* pDocumentElement = nullptr;
for (CFDE_XMLNode* pXMLNode =
pPDFElement->GetNodeItem(CFDE_XMLNode::FirstChild);
@@ -190,7 +190,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
}
}
if (!pDocumentElement) {
- return FALSE;
+ return false;
}
CFDE_XMLElement* pChunkElement = nullptr;
for (CFDE_XMLNode* pXMLNode =
@@ -207,7 +207,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
}
}
if (!pChunkElement) {
- return FALSE;
+ return false;
}
CFX_WideString wsPDFContent;
pChunkElement->GetTextData(wsPDFContent);
@@ -216,7 +216,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
pByteBuffer = FX_Alloc(uint8_t, iBufferSize + 1);
pByteBuffer[iBufferSize] = '0'; // FIXME: I bet this is wrong.
Base64DecodeW(wsPDFContent.c_str(), wsPDFContent.GetLength(), pByteBuffer);
- return TRUE;
+ return true;
}
void XFA_XPDPacket_MergeRootNode(CXFA_Node* pOriginRoot, CXFA_Node* pNewRoot) {
CXFA_Node* pChildNode = pNewRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -290,27 +290,26 @@ CXFA_FFDocView* CXFA_FFDoc::GetDocView() {
return it != m_TypeToDocViewMap.end() ? it->second.get() : nullptr;
}
-FX_BOOL CXFA_FFDoc::OpenDoc(IFX_SeekableReadStream* pStream,
- FX_BOOL bTakeOverFile) {
+bool CXFA_FFDoc::OpenDoc(IFX_SeekableReadStream* pStream, bool bTakeOverFile) {
m_bOwnStream = bTakeOverFile;
m_pStream = pStream;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
+bool CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
if (!pPDFDoc)
- return FALSE;
+ return false;
CPDF_Dictionary* pRoot = pPDFDoc->GetRoot();
if (!pRoot)
- return FALSE;
+ return false;
CPDF_Dictionary* pAcroForm = pRoot->GetDictFor("AcroForm");
if (!pAcroForm)
- return FALSE;
+ return false;
CPDF_Object* pElementXFA = pAcroForm->GetDirectObjectFor("XFA");
if (!pElementXFA)
- return FALSE;
+ return false;
std::vector<CPDF_Stream*> xfaStreams;
if (pElementXFA->IsArray()) {
@@ -323,7 +322,7 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
xfaStreams.push_back((CPDF_Stream*)pElementXFA);
}
if (xfaStreams.empty())
- return FALSE;
+ return false;
IFX_SeekableReadStream* pFileRead = new CXFA_FileRead(xfaStreams);
m_pPDFDoc = pPDFDoc;
@@ -332,11 +331,11 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
m_pStream = nullptr;
}
m_pStream = pFileRead;
- m_bOwnStream = TRUE;
- return TRUE;
+ m_bOwnStream = true;
+ return true;
}
-FX_BOOL CXFA_FFDoc::CloseDoc() {
+bool CXFA_FFDoc::CloseDoc() {
for (const auto& pair : m_TypeToDocViewMap)
pair.second->RunDocClose();
@@ -360,7 +359,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc() {
m_HashToDibDpiMap.clear();
m_pApp->ClearEventTargets();
- return TRUE;
+ return true;
}
void CXFA_FFDoc::SetDocType(uint32_t dwType) {
m_dwDocType = dwType;
@@ -445,7 +444,7 @@ bool CXFA_FFDoc::SavePackage(XFA_HashCode code,
pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : nullptr);
}
-FX_BOOL CXFA_FFDoc::ImportData(IFX_SeekableReadStream* pStream, FX_BOOL bXDP) {
+bool CXFA_FFDoc::ImportData(IFX_SeekableReadStream* pStream, bool bXDP) {
std::unique_ptr<CXFA_DataImporter> importer(
new CXFA_DataImporter(m_pDocumentParser->GetDocument()));
return importer->ImportData(pStream);
diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp
index fae72cb3a1..db73531ccc 100644
--- a/xfa/fxfa/app/xfa_ffdochandler.cpp
+++ b/xfa/fxfa/app/xfa_ffdochandler.cpp
@@ -41,18 +41,18 @@ XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(CXFA_FFDoc* hDoc) {
return pSubForm->GetEnum(XFA_ATTRIBUTE_RestoreState);
}
-FX_BOOL CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const CFX_WideStringC& wsScript,
- CFXJSE_Value* pRetValue,
- CFXJSE_Value* pThisValue) {
+bool CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
+ XFA_SCRIPTTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ CFXJSE_Value* pRetValue,
+ CFXJSE_Value* pThisValue) {
CXFA_Document* pXFADoc = hDoc->GetXFADoc();
if (!pXFADoc)
- return FALSE;
+ return false;
CXFA_ScriptContext* pScriptContext = pXFADoc->GetScriptContext();
if (!pScriptContext)
- return FALSE;
+ return false;
return pScriptContext->RunScript(
(XFA_SCRIPTLANGTYPE)eScriptType, wsScript, pRetValue,
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index f82cc5eafb..477bd54457 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -52,9 +52,9 @@ const XFA_ATTRIBUTEENUM gs_EventActivity[] = {
};
CXFA_FFDocView::CXFA_FFDocView(CXFA_FFDoc* pDoc)
- : m_bLayoutEvent(FALSE),
+ : m_bLayoutEvent(false),
m_pListFocusWidget(nullptr),
- m_bInLayoutStatus(FALSE),
+ m_bInLayoutStatus(false),
m_pDoc(pDoc),
m_pXFADocLayout(nullptr),
m_pFocusAcc(nullptr),
@@ -69,9 +69,9 @@ CXFA_FFDocView::~CXFA_FFDocView() {
void CXFA_FFDocView::InitLayout(CXFA_Node* pNode) {
RunBindItems();
- ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Initialize, false, true,
nullptr);
- ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pNode, XFA_EVENT_IndexChange, false, true,
nullptr);
}
int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) {
@@ -91,7 +91,7 @@ int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) {
InitLayout(pRootItem);
InitCalculate(pRootItem);
InitValidate(pRootItem);
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, TRUE, TRUE, nullptr);
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, true, true, nullptr);
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
return iStatus;
}
@@ -124,16 +124,16 @@ void CXFA_FFDocView::StopLayout() {
InitLayout(pPageSetNode);
InitCalculate(pPageSetNode);
InitValidate(pPageSetNode);
- ExecEventActivityByDeepFirst(pPageSetNode, XFA_EVENT_Ready, TRUE, TRUE,
+ ExecEventActivityByDeepFirst(pPageSetNode, XFA_EVENT_Ready, true, true,
nullptr);
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true,
nullptr);
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocReady, false, true,
nullptr);
RunCalculateWidgets();
RunValidate();
if (RunLayout()) {
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true,
nullptr);
}
m_CalculateAccs.RemoveAll();
@@ -181,7 +181,7 @@ void CXFA_FFDocView::UpdateDocView() {
CXFA_Node* pNode = m_NewAddedNodes[i];
InitCalculate(pNode);
InitValidate(pNode);
- ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, TRUE, TRUE, nullptr);
+ ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, true, true, nullptr);
}
m_NewAddedNodes.RemoveAll();
RunSubformIndexChange();
@@ -191,7 +191,7 @@ void CXFA_FFDocView::UpdateDocView() {
if (RunLayout() && m_bLayoutEvent) {
RunEventLayoutReady();
}
- m_bLayoutEvent = FALSE;
+ m_bLayoutEvent = false;
m_CalculateAccs.RemoveAll();
RunInvalidate();
UnlockUpdate();
@@ -212,11 +212,11 @@ CXFA_FFPageView* CXFA_FFDocView::GetPageView(int32_t nIndex) {
CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const {
return m_pDoc->GetXFADoc()->GetDocLayout();
}
-FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
+bool CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
CXFA_Node* pNode = pWidgetAcc->GetNode();
XFA_Element eType = pNode->GetElementType();
if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) {
- return FALSE;
+ return false;
}
pWidgetAcc->ResetData();
pWidgetAcc->UpdateUIDisplay();
@@ -224,11 +224,11 @@ FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
AddValidateWidget(pWidgetAcc);
validate.GetNode()->SetFlag(XFA_NodeFlag_NeedsInitApp, false);
}
- return TRUE;
+ return true;
}
void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) {
- m_bLayoutEvent = TRUE;
- FX_BOOL bChanged = FALSE;
+ m_bLayoutEvent = true;
+ bool bChanged = false;
CXFA_Node* pFormNode = nullptr;
if (pWidgetAcc) {
bChanged = ResetSingleWidgetAccData(pWidgetAcc);
@@ -279,7 +279,7 @@ int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam,
wsValidateStr = pValidateNode->GetContent();
}
}
- FX_BOOL bValidate = FALSE;
+ bool bValidate = false;
switch (pParam->m_iValidateActivities) {
case XFA_VALIDATE_preSubmit:
bValidate = wsValidateStr.Find(L"preSubmit") != -1;
@@ -308,7 +308,7 @@ int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam,
pNode = pRootItem->GetChild(0, XFA_Element::Subform);
}
ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady,
- TRUE, nullptr);
+ true, nullptr);
return XFA_EVENTERROR_Success;
}
CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() {
@@ -335,10 +335,10 @@ void CXFA_FFDocView::KillFocus() {
m_pFocusWidget = nullptr;
m_pOldFocusWidget = nullptr;
}
-FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
+bool CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
CXFA_FFWidget* pNewFocus = hWidget;
if (m_pOldFocusWidget == pNewFocus) {
- return FALSE;
+ return false;
}
CXFA_FFWidget* pOldFocus = m_pOldFocusWidget;
m_pOldFocusWidget = pNewFocus;
@@ -357,7 +357,7 @@ FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
}
}
if (m_pFocusWidget == m_pOldFocusWidget) {
- return FALSE;
+ return false;
}
pNewFocus = m_pOldFocusWidget;
if (m_pListFocusWidget && pNewFocus == m_pListFocusWidget) {
@@ -365,7 +365,7 @@ FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
m_pFocusWidget = nullptr;
m_pListFocusWidget = nullptr;
m_pOldFocusWidget = nullptr;
- return FALSE;
+ return false;
}
if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
if (!pNewFocus->IsLoaded()) {
@@ -376,7 +376,7 @@ FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
m_pFocusAcc = pNewFocus ? pNewFocus->GetDataAcc() : nullptr;
m_pFocusWidget = pNewFocus;
m_pOldFocusWidget = m_pFocusWidget;
- return TRUE;
+ return true;
}
CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() {
return m_pFocusAcc;
@@ -437,8 +437,8 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
}
int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
XFA_EVENTTYPE eEventType,
- FX_BOOL bIsFormReady,
- FX_BOOL bRecursive,
+ bool bIsFormReady,
+ bool bRecursive,
CXFA_Node* pExclude) {
int32_t iRet = XFA_EVENTERROR_NotExist;
if (pFormNode == pExclude) {
@@ -535,7 +535,7 @@ void CXFA_FFDocView::LockUpdate() {
void CXFA_FFDocView::UnlockUpdate() {
m_iLock--;
}
-FX_BOOL CXFA_FFDocView::IsUpdateLocked() {
+bool CXFA_FFDocView::IsUpdateLocked() {
return m_iLock > 0;
}
void CXFA_FFDocView::ClearInvalidateList() {
@@ -564,23 +564,23 @@ void CXFA_FFDocView::RunInvalidate() {
m_mapPageInvalidate.clear();
}
-FX_BOOL CXFA_FFDocView::RunLayout() {
+bool CXFA_FFDocView::RunLayout() {
LockUpdate();
- m_bInLayoutStatus = TRUE;
+ m_bInLayoutStatus = true;
if (!m_pXFADocLayout->IncrementLayout() &&
m_pXFADocLayout->StartLayout() < 100) {
m_pXFADocLayout->DoLayout();
UnlockUpdate();
- m_bInLayoutStatus = FALSE;
+ m_bInLayoutStatus = false;
m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr,
XFA_PAGEVIEWEVENT_StopLayout);
- return TRUE;
+ return true;
}
- m_bInLayoutStatus = FALSE;
+ m_bInLayoutStatus = false;
m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr,
XFA_PAGEVIEWEVENT_StopLayout);
UnlockUpdate();
- return FALSE;
+ return false;
}
void CXFA_FFDocView::RunSubformIndexChange() {
int32_t iSubforms = m_IndexChangedSubforms.GetSize();
@@ -612,7 +612,7 @@ void CXFA_FFDocView::RunDocClose() {
if (!pRootItem) {
return;
}
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_DocClose, false, true,
nullptr);
}
void CXFA_FFDocView::DestroyDocView() {
@@ -623,7 +623,7 @@ void CXFA_FFDocView::DestroyDocView() {
m_BindItems.RemoveAll();
m_CalculateAccs.RemoveAll();
}
-FX_BOOL CXFA_FFDocView::IsStaticNotify() {
+bool CXFA_FFDocView::IsStaticNotify() {
return m_pDoc->GetDocType() == XFA_DOCTYPE_Static;
}
void CXFA_FFDocView::AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
@@ -690,22 +690,22 @@ void CXFA_FFDocView::AddValidateWidget(CXFA_WidgetAcc* pWidget) {
if (m_ValidateAccs.Find(pWidget) < 0)
m_ValidateAccs.Add(pWidget);
}
-FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) {
- ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate, FALSE, TRUE,
+bool CXFA_FFDocView::InitCalculate(CXFA_Node* pNode) {
+ ExecEventActivityByDeepFirst(pNode, XFA_EVENT_InitCalculate, false, true,
nullptr);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode) {
+bool CXFA_FFDocView::InitValidate(CXFA_Node* pNode) {
if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) {
- return FALSE;
+ return false;
}
- ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, FALSE, TRUE, nullptr);
+ ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate, false, true, nullptr);
m_ValidateAccs.RemoveAll();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFDocView::RunValidate() {
+bool CXFA_FFDocView::RunValidate() {
if (!m_pDoc->GetDocEnvironment()->IsValidationsEnabled(m_pDoc)) {
- return FALSE;
+ return false;
}
int32_t iCounts = m_ValidateAccs.GetSize();
for (int32_t i = 0; i < iCounts; i++) {
@@ -716,18 +716,18 @@ FX_BOOL CXFA_FFDocView::RunValidate() {
pAcc->ProcessValidate();
}
m_ValidateAccs.RemoveAll();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFDocView::RunEventLayoutReady() {
+bool CXFA_FFDocView::RunEventLayoutReady() {
CXFA_Node* pRootItem =
ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
if (!pRootItem) {
- return FALSE;
+ return false;
}
- ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, FALSE, TRUE,
+ ExecEventActivityByDeepFirst(pRootItem, XFA_EVENT_Ready, false, true,
nullptr);
RunLayout();
- return TRUE;
+ return true;
}
void CXFA_FFDocView::RunBindItems() {
for (int32_t i = 0; i < m_BindItems.GetSize(); i++) {
@@ -849,8 +849,8 @@ CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
return nullptr;
}
-FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
- return FALSE;
+bool CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
+ return false;
}
void CXFA_WidgetAccIterator::SkipTree() {
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index b14df7ee15..073e99786a 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -30,9 +30,9 @@ CXFA_FFField::~CXFA_FFField() {
CXFA_FFField::UnloadWidget();
}
-FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus) {
+bool CXFA_FFField::GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus) {
if (!bDrawFocus)
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
@@ -44,9 +44,9 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox,
CFX_Matrix mt;
GetRotateMatrix(mt);
mt.TransformRect(rtBox);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
@@ -64,7 +64,7 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
CXFA_Border borderUI = m_pDataAcc->GetUIBorder();
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
- DrawHighlight(pGS, &mtRotate, dwStatus, FALSE);
+ DrawHighlight(pGS, &mtRotate, dwStatus, false);
CFX_RectF rtWidget;
m_pNormalWidget->GetWidgetRect(rtWidget);
CFX_Matrix mt;
@@ -76,7 +76,7 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus,
- FX_BOOL bEllipse) {
+ bool bEllipse) {
if (m_rtUI.IsEmpty() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
return;
}
@@ -101,7 +101,7 @@ void CXFA_FFField::DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
pGS->SetStrokeColor(&cr);
FX_FLOAT DashPattern[2] = {1, 1};
pGS->SetLineDash(0.0f, DashPattern, 2);
- pGS->SetLineWidth(0, FALSE);
+ pGS->SetLineWidth(0, false);
CFX_Path path;
path.Create();
path.AddRectangle(m_rtUI.left, m_rtUI.top, m_rtUI.width, m_rtUI.height);
@@ -113,14 +113,14 @@ void CXFA_FFField::SetFWLThemeProvider() {
m_pNormalWidget->GetWidget()->SetThemeProvider(GetApp()->GetFWLTheme());
}
}
-FX_BOOL CXFA_FFField::IsLoaded() {
+bool CXFA_FFField::IsLoaded() {
return m_pNormalWidget && CXFA_FFWidget::IsLoaded();
}
-FX_BOOL CXFA_FFField::LoadWidget() {
+bool CXFA_FFField::LoadWidget() {
SetFWLThemeProvider();
m_pDataAcc->LoadCaption();
PerformLayout();
- return TRUE;
+ return true;
}
void CXFA_FFField::UnloadWidget() {
delete m_pNormalWidget;
@@ -144,7 +144,7 @@ void CXFA_FFField::SetEditScrollOffset() {
((CFWL_Edit*)m_pNormalWidget)->SetScrollOffset(fScrollOffset);
}
}
-FX_BOOL CXFA_FFField::PerformLayout() {
+bool CXFA_FFField::PerformLayout() {
CXFA_FFWidget::PerformLayout();
CapPlacement();
LayoutCaption();
@@ -153,7 +153,7 @@ FX_BOOL CXFA_FFField::PerformLayout() {
if (m_pNormalWidget) {
m_pNormalWidget->Update();
}
- return TRUE;
+ return true;
}
void CXFA_FFField::CapPlacement() {
CFX_RectF rtWidget;
@@ -343,26 +343,26 @@ void CXFA_FFField::SetFWLRect() {
}
m_pNormalWidget->SetWidgetRect(rtUi);
}
-FX_BOOL CXFA_FFField::OnMouseEnter() {
+bool CXFA_FFField::OnMouseEnter() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::Enter;
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnMouseExit() {
+bool CXFA_FFField::OnMouseExit() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::Leave;
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) {
if (!m_pNormalWidget) {
@@ -373,20 +373,18 @@ void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) {
fx -= rtWidget.left;
fy -= rtWidget.top;
}
-FX_BOOL CXFA_FFField::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFField::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open ||
!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- return FALSE;
+ return false;
}
if (!PtInActiveRect(fx, fy)) {
- return FALSE;
+ return false;
}
- SetButtonDown(TRUE);
+ SetButtonDown(true);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown;
ms.m_dwFlags = dwFlags;
@@ -395,16 +393,16 @@ FX_BOOL CXFA_FFField::OnLButtonDown(uint32_t dwFlags,
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
if (!IsButtonDown()) {
- return FALSE;
+ return false;
}
- SetButtonDown(FALSE);
+ SetButtonDown(false);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
ms.m_dwFlags = dwFlags;
@@ -413,13 +411,11 @@ FX_BOOL CXFA_FFField::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonDblClk;
@@ -429,11 +425,11 @@ FX_BOOL CXFA_FFField::OnLButtonDblClk(uint32_t dwFlags,
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::Move;
@@ -443,14 +439,14 @@ FX_BOOL CXFA_FFField::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFField::OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouseWheel ms;
ms.m_dwFlags = dwFlags;
@@ -461,22 +457,20 @@ FX_BOOL CXFA_FFField::OnMouseWheel(uint32_t dwFlags,
ms.m_fDeltaY = 0;
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnRButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFField::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open ||
!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- return FALSE;
+ return false;
}
if (!PtInActiveRect(fx, fy)) {
- return FALSE;
+ return false;
}
- SetButtonDown(TRUE);
+ SetButtonDown(true);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::RightButtonDown;
ms.m_dwFlags = dwFlags;
@@ -485,16 +479,16 @@ FX_BOOL CXFA_FFField::OnRButtonDown(uint32_t dwFlags,
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
if (!IsButtonDown()) {
- return FALSE;
+ return false;
}
- SetButtonDown(FALSE);
+ SetButtonDown(false);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::RightButtonUp;
ms.m_dwFlags = dwFlags;
@@ -503,13 +497,11 @@ FX_BOOL CXFA_FFField::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::RightButtonDblClk;
@@ -519,13 +511,13 @@ FX_BOOL CXFA_FFField::OnRButtonDblClk(uint32_t dwFlags,
FWLToClient(ms.m_fx, ms.m_fy);
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) {
+bool CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) {
CXFA_FFWidget::OnSetFocus(pOldWidget);
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFWL_MsgSetFocus ms;
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
@@ -533,9 +525,9 @@ FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) {
TranslateFWLMessage(&ms);
m_dwStatus |= XFA_WidgetStatus_Focused;
AddInvalidateRect();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) {
+bool CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) {
if (!m_pNormalWidget) {
return CXFA_FFWidget::OnKillFocus(pNewWidget);
}
@@ -546,11 +538,11 @@ FX_BOOL CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) {
m_dwStatus &= ~XFA_WidgetStatus_Focused;
AddInvalidateRect();
CXFA_FFWidget::OnKillFocus(pNewWidget);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
+bool CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- return FALSE;
+ return false;
}
CFWL_MsgKey ms;
ms.m_dwCmd = FWL_KeyCommand::KeyDown;
@@ -559,11 +551,11 @@ FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
+bool CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
if (!m_pNormalWidget || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- return FALSE;
+ return false;
}
CFWL_MsgKey ms;
ms.m_dwCmd = FWL_KeyCommand::KeyUp;
@@ -572,20 +564,20 @@ FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) {
+bool CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) {
if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
- return FALSE;
+ return false;
}
if (dwChar == FWL_VKEY_Tab) {
- return TRUE;
+ return true;
}
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
CFWL_MsgKey ms;
ms.m_dwCmd = FWL_KeyCommand::Char;
@@ -594,7 +586,7 @@ FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) {
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
if (m_pNormalWidget) {
@@ -611,19 +603,19 @@ FWL_WidgetHit CXFA_FFField::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
return FWL_WidgetHit::Titlebar;
return FWL_WidgetHit::Border;
}
-FX_BOOL CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
- return TRUE;
+bool CXFA_FFField::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
+ return true;
}
-FX_BOOL CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFX_RectF rtWidget;
m_pNormalWidget->GetWidgetRect(rtWidget);
if (rtWidget.Contains(fx, fy)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_FFField::LayoutCaption() {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
@@ -660,22 +652,22 @@ void CXFA_FFField::RenderCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
pCapTextLayout->DrawString(pRenderDevice, mt, rtClip);
}
}
-FX_BOOL CXFA_FFField::ProcessCommittedData() {
+bool CXFA_FFField::ProcessCommittedData() {
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
if (!IsDataChanged()) {
- return FALSE;
+ return false;
}
if (CalculateOverride() != 1) {
- return FALSE;
+ return false;
}
if (!CommitData()) {
- return FALSE;
+ return false;
}
m_pDocView->SetChangeMark();
m_pDocView->AddValidateWidget(m_pDataAcc);
- return TRUE;
+ return true;
}
int32_t CXFA_FFField::CalculateOverride() {
CXFA_WidgetAcc* pAcc = m_pDataAcc->GetExclGroup();
@@ -773,11 +765,11 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
}
return 1;
}
-FX_BOOL CXFA_FFField::CommitData() {
- return FALSE;
+bool CXFA_FFField::CommitData() {
+ return false;
}
-FX_BOOL CXFA_FFField::IsDataChanged() {
- return FALSE;
+bool CXFA_FFField::IsDataChanged() {
+ return false;
}
void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) {
GetApp()->GetWidgetMgrDelegate()->OnProcessMessageToForm(pMessage);
diff --git a/xfa/fxfa/app/xfa_fffield.h b/xfa/fxfa/app/xfa_fffield.h
index 8481018189..17d33da754 100644
--- a/xfa/fxfa/app/xfa_fffield.h
+++ b/xfa/fxfa/app/xfa_fffield.h
@@ -21,37 +21,37 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
~CXFA_FFField() override;
// CXFA_FFWidget
- FX_BOOL GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus = FALSE) override;
+ bool GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus = false) override;
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL IsLoaded() override;
- FX_BOOL LoadWidget() override;
+ bool IsLoaded() override;
+ bool LoadWidget() override;
void UnloadWidget() override;
- FX_BOOL PerformLayout() override;
- FX_BOOL OnMouseEnter() override;
- FX_BOOL OnMouseExit() override;
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy) override;
- FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool PerformLayout() override;
+ bool OnMouseEnter() override;
+ bool OnMouseExit() override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) override;
+ bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnSetFocus(CXFA_FFWidget* pOldWidget) override;
- FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override;
- FX_BOOL OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) override;
- FX_BOOL OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) override;
- FX_BOOL OnChar(uint32_t dwChar, uint32_t dwFlags) override;
+ bool OnSetFocus(CXFA_FFWidget* pOldWidget) override;
+ bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
+ bool OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) override;
+ bool OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) override;
+ bool OnChar(uint32_t dwChar, uint32_t dwFlags) override;
FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) override;
// IFWL_WidgetDelegate
void OnProcessMessage(CFWL_Message* pMessage) override;
@@ -63,7 +63,7 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
uint32_t UpdateUIProperty();
protected:
- FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
+ bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
virtual void SetFWLRect();
void SetFWLThemeProvider();
@@ -74,13 +74,13 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
int32_t CalculateOverride();
int32_t CalculateWidgetAcc(CXFA_WidgetAcc* pAcc);
- FX_BOOL ProcessCommittedData();
- virtual FX_BOOL CommitData();
- virtual FX_BOOL IsDataChanged();
+ bool ProcessCommittedData();
+ virtual bool CommitData();
+ virtual bool IsDataChanged();
void DrawHighlight(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus,
- FX_BOOL bEllipse = FALSE);
+ bool bEllipse = false);
void DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix);
void TranslateFWLMessage(CFWL_Message* pMessage);
void CapPlacement();
diff --git a/xfa/fxfa/app/xfa_ffimage.cpp b/xfa/fxfa/app/xfa_ffimage.cpp
index bcd1d4a9ce..c387cc2690 100644
--- a/xfa/fxfa/app/xfa_ffimage.cpp
+++ b/xfa/fxfa/app/xfa_ffimage.cpp
@@ -17,12 +17,12 @@ CXFA_FFImage::CXFA_FFImage(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
CXFA_FFImage::~CXFA_FFImage() {
CXFA_FFImage::UnloadWidget();
}
-FX_BOOL CXFA_FFImage::IsLoaded() {
+bool CXFA_FFImage::IsLoaded() {
return !!GetDataAcc()->GetImageImage();
}
-FX_BOOL CXFA_FFImage::LoadWidget() {
+bool CXFA_FFImage::LoadWidget() {
if (GetDataAcc()->GetImageImage()) {
- return TRUE;
+ return true;
}
GetDataAcc()->LoadImageImage();
return CXFA_FFDraw::LoadWidget();
diff --git a/xfa/fxfa/app/xfa_ffimage.h b/xfa/fxfa/app/xfa_ffimage.h
index d0afc5b431..cc5320eb36 100644
--- a/xfa/fxfa/app/xfa_ffimage.h
+++ b/xfa/fxfa/app/xfa_ffimage.h
@@ -18,8 +18,8 @@ class CXFA_FFImage : public CXFA_FFDraw {
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL IsLoaded() override;
- FX_BOOL LoadWidget() override;
+ bool IsLoaded() override;
+ bool LoadWidget() override;
void UnloadWidget() override;
};
diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
index 4b77ccf73d..216cf5b9bf 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.cpp
+++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
@@ -22,7 +22,7 @@ CXFA_FFImageEdit::CXFA_FFImageEdit(CXFA_FFPageView* pPageView,
CXFA_FFImageEdit::~CXFA_FFImageEdit() {
CXFA_FFImageEdit::UnloadWidget();
}
-FX_BOOL CXFA_FFImageEdit::LoadWidget() {
+bool CXFA_FFImageEdit::LoadWidget() {
CFWL_PictureBox* pPictureBox = new CFWL_PictureBox(GetFWLApp());
pPictureBox->Initialize();
m_pNormalWidget = pPictureBox;
@@ -37,10 +37,10 @@ FX_BOOL CXFA_FFImageEdit::LoadWidget() {
CXFA_FFField::LoadWidget();
if (m_pDataAcc->GetImageEditImage()) {
- return TRUE;
+ return true;
}
UpdateFWLData();
- return TRUE;
+ return true;
}
void CXFA_FFImageEdit::UnloadWidget() {
m_pDataAcc->SetImageEditImage(nullptr);
@@ -84,16 +84,16 @@ void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS,
}
}
-FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open)
- return FALSE;
+ return false;
if (!PtInActiveRect(fx, fy))
- return FALSE;
+ return false;
- SetButtonDown(TRUE);
+ SetButtonDown(true);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown;
ms.m_dwFlags = dwFlags;
@@ -102,7 +102,7 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags,
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
FWLToClient(ms.m_fx, ms.m_fy);
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
void CXFA_FFImageEdit::SetFWLRect() {
@@ -116,13 +116,13 @@ void CXFA_FFImageEdit::SetFWLRect() {
rtUIMargin.height);
m_pNormalWidget->SetWidgetRect(rtImage);
}
-FX_BOOL CXFA_FFImageEdit::CommitData() {
- return TRUE;
+bool CXFA_FFImageEdit::CommitData() {
+ return true;
}
-FX_BOOL CXFA_FFImageEdit::UpdateFWLData() {
+bool CXFA_FFImageEdit::UpdateFWLData() {
m_pDataAcc->SetImageEditImage(nullptr);
m_pDataAcc->LoadImageEditImage();
- return TRUE;
+ return true;
}
void CXFA_FFImageEdit::OnProcessMessage(CFWL_Message* pMessage) {
diff --git a/xfa/fxfa/app/xfa_ffimageedit.h b/xfa/fxfa/app/xfa_ffimageedit.h
index c8f31e2fc4..b6f6ae1ffe 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.h
+++ b/xfa/fxfa/app/xfa_ffimageedit.h
@@ -18,9 +18,9 @@ class CXFA_FFImageEdit : public CXFA_FFField {
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void UnloadWidget() override;
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CFX_Graphics* pGraphics,
@@ -28,8 +28,8 @@ class CXFA_FFImageEdit : public CXFA_FFField {
protected:
void SetFWLRect() override;
- FX_BOOL UpdateFWLData() override;
- FX_BOOL CommitData() override;
+ bool UpdateFWLData() override;
+ bool CommitData() override;
IFWL_WidgetDelegate* m_pOldDelegate;
};
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index 2f3eac6e16..4e14ab0203 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -180,15 +180,15 @@ void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node* pItem,
pAcc->StartWidgetLayout(fCalcWidth, fCalcHeight);
}
-FX_BOOL CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem,
- int32_t iBlockIndex,
- FX_FLOAT& fCalcHeightPos) {
+bool CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem,
+ int32_t iBlockIndex,
+ FX_FLOAT& fCalcHeightPos) {
CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData());
return pAcc && pAcc->FindSplitPos(iBlockIndex, fCalcHeightPos);
}
-FX_BOOL CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) {
- FX_BOOL bRet = FALSE;
+bool CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) {
+ bool bRet = false;
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView) {
return bRet;
@@ -211,8 +211,8 @@ FX_BOOL CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) {
}
int32_t CXFA_FFNotify::ExecEventByDeepFirst(CXFA_Node* pFormNode,
XFA_EVENTTYPE eEventType,
- FX_BOOL bIsFormReady,
- FX_BOOL bRecursive,
+ bool bIsFormReady,
+ bool bRecursive,
CXFA_WidgetAcc* pExclude) {
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView) {
@@ -380,7 +380,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
}
XFA_Element eType = pParentNode->GetElementType();
- FX_BOOL bIsContainerNode = pParentNode->IsContainerNode();
+ bool bIsContainerNode = pParentNode->IsContainerNode();
CXFA_WidgetAcc* pWidgetAcc =
static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData());
if (!pWidgetAcc)
@@ -440,7 +440,7 @@ void CXFA_FFNotify::OnChildAdded(CXFA_Node* pSender) {
if (!pDocView) {
return;
}
- FX_BOOL bLayoutReady =
+ bool bLayoutReady =
!(pDocView->m_bInLayoutStatus) &&
(pDocView->GetLayoutStatus() == XFA_DOCVIEW_LAYOUTSTATUS_End);
if (bLayoutReady)
diff --git a/xfa/fxfa/app/xfa_ffnotify.h b/xfa/fxfa/app/xfa_ffnotify.h
index bc764e1533..d9530a895e 100644
--- a/xfa/fxfa/app/xfa_ffnotify.h
+++ b/xfa/fxfa/app/xfa_ffnotify.h
@@ -46,14 +46,14 @@ class CXFA_FFNotify {
void StartFieldDrawLayout(CXFA_Node* pItem,
FX_FLOAT& fCalcWidth,
FX_FLOAT& fCalcHeight);
- FX_BOOL FindSplitPos(CXFA_Node* pItem,
- int32_t iBlockIndex,
- FX_FLOAT& fCalcHeightPos);
- FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);
+ bool FindSplitPos(CXFA_Node* pItem,
+ int32_t iBlockIndex,
+ FX_FLOAT& fCalcHeightPos);
+ bool RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);
int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode,
XFA_EVENTTYPE eEventType,
- FX_BOOL bIsFormReady = FALSE,
- FX_BOOL bRecursive = TRUE,
+ bool bIsFormReady = false,
+ bool bRecursive = true,
CXFA_WidgetAcc* pExclude = nullptr);
void AddCalcValidate(CXFA_Node* pNode);
CXFA_FFDoc* GetHDOC();
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index 899a311d6c..5ef108693a 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -26,8 +26,8 @@ void GetPageMatrix(CFX_Matrix& pageMatrix,
int32_t iRotate,
uint32_t dwCoordinatesType) {
ASSERT(iRotate >= 0 && iRotate <= 3);
- FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0;
- FX_BOOL bFlipY = (dwCoordinatesType & 0x02) != 0;
+ bool bFlipX = (dwCoordinatesType & 0x01) != 0;
+ bool bFlipY = (dwCoordinatesType & 0x02) != 0;
CFX_Matrix m;
m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0);
if (iRotate == 0 || iRotate == 2) {
@@ -71,8 +71,8 @@ void GetPageMatrix(CFX_Matrix& pageMatrix,
bool PageWidgetFilter(CXFA_FFWidget* pWidget,
uint32_t dwFilter,
- FX_BOOL bTraversal,
- FX_BOOL bIgnorerelevant) {
+ bool bTraversal,
+ bool bIgnorerelevant) {
CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
if (!!(dwFilter & XFA_WidgetStatus_Focused) &&
@@ -194,13 +194,13 @@ CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetCurrentWidget() {
CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent();
return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : nullptr;
}
-FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(CXFA_FFWidget* hWidget) {
+bool CXFA_FFPageWidgetIterator::SetCurrentWidget(CXFA_FFWidget* hWidget) {
return hWidget && m_sIterator.SetCurrent(hWidget);
}
CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetWidget(
CXFA_LayoutItem* pLayoutItem) {
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
- if (!PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {
+ if (!PageWidgetFilter(pWidget, m_dwFilter, false, m_bIgnorerelevant)) {
return nullptr;
}
if (!pWidget->IsLoaded() &&
@@ -231,7 +231,7 @@ void CXFA_FFTabOrderPageWidgetIterator::Reset() {
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() {
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (int32_t i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
- if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -243,7 +243,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() {
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() {
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (int32_t i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
- if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -254,7 +254,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() {
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() {
for (int32_t i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
- if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -265,7 +265,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() {
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious() {
for (int32_t i = m_iCurWidget - 1; i >= 0; i--) {
- if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
@@ -280,14 +280,14 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget() {
}
return nullptr;
}
-FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(
+bool CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(
CXFA_FFWidget* hWidget) {
int32_t iWidgetIndex = m_TabOrderWidgetArray.Find(hWidget);
if (iWidgetIndex >= 0) {
m_iCurWidget = iWidgetIndex;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
CXFA_FFWidget* pWidget) {
@@ -324,7 +324,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() {
CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc();
if (pWidgetAcc->GetUIType() == XFA_Element::ExclGroup) {
int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1;
- while (TRUE) {
+ while (true) {
CXFA_FFWidget* pRadio =
SpaceOrderWidgetArray[(iWidgetIndex) % nWidgetCount];
if (pRadio->GetDataAcc()->GetExclGroup() != pWidgetAcc) {
@@ -362,14 +362,14 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
- FX_BOOL& bCurrentItem,
- FX_BOOL& bContentArea,
- FX_BOOL bMarsterPage) {
+ bool& bCurrentItem,
+ bool& bContentArea,
+ bool bMarsterPage) {
CFX_ArrayTemplate<CXFA_TabParam*> tabParams;
CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
while (pSearchItem) {
if (!pSearchItem->IsContentLayoutItem()) {
- bContentArea = TRUE;
+ bContentArea = true;
pSearchItem = sIterator->MoveToNext();
continue;
}
@@ -383,7 +383,7 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
continue;
}
if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) {
- bCurrentItem = TRUE;
+ bCurrentItem = true;
break;
}
CXFA_TabParam* pParam = new CXFA_TabParam;
@@ -396,7 +396,7 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
}
if (bCurrentItem) {
pSearchItem = sIterator->GetCurrent();
- bCurrentItem = FALSE;
+ bCurrentItem = false;
} else {
pSearchItem = sIterator->MoveToNext();
}
@@ -421,17 +421,17 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
CXFA_LayoutItemIterator sIterator;
sIterator.Init(m_pPageView);
CXFA_TabParam* pParam = new CXFA_TabParam;
- FX_BOOL bCurrentItem = FALSE;
- FX_BOOL bContentArea = FALSE;
+ bool bCurrentItem = false;
+ bool bContentArea = false;
OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea);
if (pParam->m_Children.GetSize() > 0) {
WidgetArray.Append(pParam->m_Children);
}
sIterator.Reset();
- bCurrentItem = FALSE;
- bContentArea = FALSE;
+ bCurrentItem = false;
+ bContentArea = false;
pParam->m_Children.RemoveAll();
- OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea, TRUE);
+ OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea, true);
if (pParam->m_Children.GetSize() > 0) {
WidgetArray.Append(pParam->m_Children);
}
diff --git a/xfa/fxfa/app/xfa_ffpath.cpp b/xfa/fxfa/app/xfa_ffpath.cpp
index 7ef13b63ff..c5c91a459c 100644
--- a/xfa/fxfa/app/xfa_ffpath.cpp
+++ b/xfa/fxfa/app/xfa_ffpath.cpp
@@ -63,7 +63,7 @@ void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS,
FX_ARGB lineColor = 0xFF000000;
int32_t iStrokeType = 0;
FX_FLOAT fLineWidth = 1.0f;
- FX_BOOL bSlope = lineObj.GetSlop();
+ bool bSlope = lineObj.GetSlop();
int32_t iCap = 0;
CXFA_Edge edge = lineObj.GetEdge();
if (edge) {
@@ -95,7 +95,7 @@ void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS,
}
CFX_Color color(lineColor);
pGS->SaveGraphState();
- pGS->SetLineWidth(fLineWidth, TRUE);
+ pGS->SetLineWidth(fLineWidth, true);
XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap);
pGS->SetStrokeColor(&color);
pGS->SetLineCap(XFA_LineCapToFXGE(iCap));
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index 2439eae78f..12fabb5a1e 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -50,7 +50,7 @@ void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS,
GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(),
pGS, &mt);
}
-FX_BOOL CXFA_FFPushButton::LoadWidget() {
+bool CXFA_FFPushButton::LoadWidget() {
ASSERT(!m_pNormalWidget);
CFWL_PushButton* pPushButton = new CFWL_PushButton(GetFWLApp());
pPushButton->Initialize();
@@ -99,7 +99,7 @@ void CXFA_FFPushButton::UnloadWidget() {
CXFA_FFField::UnloadWidget();
}
-FX_BOOL CXFA_FFPushButton::PerformLayout() {
+bool CXFA_FFPushButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
CFX_RectF rtWidget;
GetRectWithoutRotate(rtWidget);
@@ -117,7 +117,7 @@ FX_BOOL CXFA_FFPushButton::PerformLayout() {
if (m_pNormalWidget) {
m_pNormalWidget->Update();
}
- return TRUE;
+ return true;
}
FX_FLOAT CXFA_FFPushButton::GetLineWidth() {
CXFA_Border border = m_pDataAcc->GetBorder();
@@ -138,7 +138,7 @@ void CXFA_FFPushButton::LoadHighlightCaption() {
if (caption && caption.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) {
{
CFX_WideString wsRollover;
- FX_BOOL bRichText;
+ bool bRichText;
if (m_pDataAcc->GetButtonRollover(wsRollover, bRichText)) {
if (!m_pRollProvider) {
m_pRollProvider =
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.h b/xfa/fxfa/app/xfa_ffpushbutton.h
index e7c9bd7746..d5fe0b279f 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.h
+++ b/xfa/fxfa/app/xfa_ffpushbutton.h
@@ -25,9 +25,9 @@ class CXFA_FFPushButton : public CXFA_FFField {
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void UnloadWidget() override;
- FX_BOOL PerformLayout() override;
+ bool PerformLayout() override;
void UpdateWidgetProperty() override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
diff --git a/xfa/fxfa/app/xfa_ffsignature.cpp b/xfa/fxfa/app/xfa_ffsignature.cpp
index 3402d43fcb..7b8da0cea7 100644
--- a/xfa/fxfa/app/xfa_ffsignature.cpp
+++ b/xfa/fxfa/app/xfa_ffsignature.cpp
@@ -15,7 +15,7 @@ CXFA_FFSignature::CXFA_FFSignature(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pPageView, pDataAcc) {}
CXFA_FFSignature::~CXFA_FFSignature() {}
-FX_BOOL CXFA_FFSignature::LoadWidget() {
+bool CXFA_FFSignature::LoadWidget() {
return CXFA_FFField::LoadWidget();
}
void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS,
@@ -33,64 +33,58 @@ void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS,
CXFA_Border borderUI = m_pDataAcc->GetUIBorder();
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
- DrawHighlight(pGS, &mtRotate, dwStatus, FALSE);
+ DrawHighlight(pGS, &mtRotate, dwStatus, false);
}
-FX_BOOL CXFA_FFSignature::OnMouseEnter() {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnMouseExit() {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnLButtonUp(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnLButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnMouseMove(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFSignature::OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
+bool CXFA_FFSignature::OnMouseEnter() {
+ return false;
+}
+bool CXFA_FFSignature::OnMouseExit() {
+ return false;
+}
+bool CXFA_FFSignature::OnLButtonDown(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
+}
+bool CXFA_FFSignature::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
+}
+bool CXFA_FFSignature::OnLButtonDblClk(uint32_t dwFlags,
FX_FLOAT fx,
FX_FLOAT fy) {
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnRButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFSignature::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnRButtonUp(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFSignature::OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnRButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFSignature::OnRButtonDown(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
+}
+bool CXFA_FFSignature::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
+}
+bool CXFA_FFSignature::OnRButtonDblClk(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFSignature::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFSignature::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
+ return false;
}
-FX_BOOL CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFSignature::OnChar(uint32_t dwChar, uint32_t dwFlags) {
+ return false;
}
FWL_WidgetHit CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
if (m_pNormalWidget) {
@@ -107,6 +101,6 @@ FWL_WidgetHit CXFA_FFSignature::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
return FWL_WidgetHit::Titlebar;
return FWL_WidgetHit::Client;
}
-FX_BOOL CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFSignature::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
diff --git a/xfa/fxfa/app/xfa_ffsignature.h b/xfa/fxfa/app/xfa_ffsignature.h
index 3cfe9ab2c6..28053b758e 100644
--- a/xfa/fxfa/app/xfa_ffsignature.h
+++ b/xfa/fxfa/app/xfa_ffsignature.h
@@ -18,26 +18,26 @@ class CXFA_FFSignature final : public CXFA_FFField {
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL LoadWidget() override;
- FX_BOOL OnMouseEnter() override;
- FX_BOOL OnMouseExit() override;
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy) override;
- FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool LoadWidget() override;
+ bool OnMouseEnter() override;
+ bool OnMouseExit() override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) override;
+ bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) override;
- FX_BOOL OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) override;
- FX_BOOL OnChar(uint32_t dwChar, uint32_t dwFlags) override;
+ bool OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) override;
+ bool OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) override;
+ bool OnChar(uint32_t dwChar, uint32_t dwFlags) override;
FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) override;
};
#endif // XFA_FXFA_APP_XFA_FFSIGNATURE_H_
diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp
index b8ad6716d0..c7e4f04d3c 100644
--- a/xfa/fxfa/app/xfa_fftext.cpp
+++ b/xfa/fxfa/app/xfa_fftext.cpp
@@ -62,23 +62,23 @@ void CXFA_FFText::RenderWidget(CFX_Graphics* pGS,
}
}
}
-FX_BOOL CXFA_FFText::IsLoaded() {
+bool CXFA_FFText::IsLoaded() {
CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout();
return pTextLayout && !pTextLayout->m_bHasBlock;
}
-FX_BOOL CXFA_FFText::PerformLayout() {
+bool CXFA_FFText::PerformLayout() {
CXFA_FFDraw::PerformLayout();
CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout();
if (!pTextLayout) {
- return FALSE;
+ return false;
}
if (!pTextLayout->m_bHasBlock) {
- return TRUE;
+ return true;
}
pTextLayout->m_Blocks.RemoveAll();
CXFA_LayoutItem* pItem = this;
if (!pItem->GetPrev() && !pItem->GetNext()) {
- return TRUE;
+ return true;
}
pItem = pItem->GetFirst();
while (pItem) {
@@ -98,46 +98,46 @@ FX_BOOL CXFA_FFText::PerformLayout() {
pTextLayout->ItemBlocks(rtText, pItem->GetIndex());
pItem = pItem->GetNext();
}
- pTextLayout->m_bHasBlock = FALSE;
- return TRUE;
+ pTextLayout->m_bHasBlock = false;
+ return true;
}
-FX_BOOL CXFA_FFText::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFText::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
CFX_RectF rtBox;
GetRectWithoutRotate(rtBox);
if (!rtBox.Contains(fx, fy)) {
- return FALSE;
+ return false;
}
const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (!wsURLContent) {
- return FALSE;
+ return false;
}
- SetButtonDown(TRUE);
- return TRUE;
+ SetButtonDown(true);
+ return true;
}
-FX_BOOL CXFA_FFText::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFText::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
CFX_RectF rtBox;
GetRectWithoutRotate(rtBox);
if (!rtBox.Contains(fx, fy)) {
- return FALSE;
+ return false;
}
const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (!wsURLContent) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFText::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFText::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!IsButtonDown()) {
- return FALSE;
+ return false;
}
- SetButtonDown(FALSE);
+ SetButtonDown(false);
const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(fx, fy);
if (!wsURLContent) {
- return FALSE;
+ return false;
}
CXFA_FFDoc* pDoc = GetDoc();
pDoc->GetDocEnvironment()->GotoURL(pDoc, wsURLContent);
- return TRUE;
+ return true;
}
FWL_WidgetHit CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
CFX_RectF rtBox;
diff --git a/xfa/fxfa/app/xfa_fftext.h b/xfa/fxfa/app/xfa_fftext.h
index 38e7676ac1..71f36e2769 100644
--- a/xfa/fxfa/app/xfa_fftext.h
+++ b/xfa/fxfa/app/xfa_fftext.h
@@ -15,15 +15,15 @@ class CXFA_FFText : public CXFA_FFDraw {
~CXFA_FFText() override;
// CXFA_FFWidget
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy) override;
void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus) override;
- FX_BOOL IsLoaded() override;
- FX_BOOL PerformLayout() override;
+ bool IsLoaded() override;
+ bool PerformLayout() override;
private:
const FX_WCHAR* GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy);
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index ffbcac1e17..2b47ae2495 100644
--- a/xfa/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/fxfa/app/xfa_fftextedit.cpp
@@ -36,7 +36,7 @@ CXFA_FFTextEdit::~CXFA_FFTextEdit() {
}
}
-FX_BOOL CXFA_FFTextEdit::LoadWidget() {
+bool CXFA_FFTextEdit::LoadWidget() {
CFWL_Edit* pFWLEdit = new CFWL_Edit(GetFWLApp());
pFWLEdit->Initialize();
m_pNormalWidget = pFWLEdit;
@@ -100,18 +100,18 @@ void CXFA_FFTextEdit::UpdateWidgetProperty() {
m_pNormalWidget->ModifyStyles(dwStyle, 0xFFFFFFFF);
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
}
-FX_BOOL CXFA_FFTextEdit::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFTextEdit::OnLButtonDown(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
if (!PtInActiveRect(fx, fy)) {
- return FALSE;
+ return false;
}
if (!IsFocused()) {
m_dwStatus |= XFA_WidgetStatus_Focused;
UpdateFWLData();
AddInvalidateRect();
}
- SetButtonDown(TRUE);
+ SetButtonDown(true);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonDown;
ms.m_dwFlags = dwFlags;
@@ -120,23 +120,23 @@ FX_BOOL CXFA_FFTextEdit::OnLButtonDown(uint32_t dwFlags,
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
FWLToClient(ms.m_fx, ms.m_fy);
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
if (!PtInActiveRect(fx, fy)) {
- return FALSE;
+ return false;
}
if (!IsFocused()) {
m_dwStatus |= XFA_WidgetStatus_Focused;
UpdateFWLData();
AddInvalidateRect();
}
- SetButtonDown(TRUE);
+ SetButtonDown(true);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::RightButtonDown;
ms.m_dwFlags = dwFlags;
@@ -144,18 +144,16 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags,
ms.m_fy = fy;
FWLToClient(ms.m_fx, ms.m_fy);
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy))
- return FALSE;
+ return false;
GetDoc()->GetDocEnvironment()->PopupMenu(this, CFX_PointF(fx, fy));
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) {
+bool CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) {
m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged;
if (!IsFocused()) {
m_dwStatus |= XFA_WidgetStatus_Focused;
@@ -167,9 +165,9 @@ FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) {
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) {
+bool CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) {
CFWL_MsgKillFocus ms;
ms.m_pDstTarget = m_pNormalWidget->GetWidget();
ms.m_pSrcTarget = nullptr;
@@ -181,17 +179,17 @@ FX_BOOL CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) {
AddInvalidateRect();
CXFA_FFWidget::OnKillFocus(pNewWidget);
m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::CommitData() {
+bool CXFA_FFTextEdit::CommitData() {
CFX_WideString wsText;
((CFWL_Edit*)m_pNormalWidget)->GetText(wsText);
if (m_pDataAcc->SetValue(wsText, XFA_VALUEPICTURE_Edit)) {
m_pDataAcc->UpdateUIDisplay(this);
- return TRUE;
+ return true;
}
ValidateNumberField(wsText);
- return FALSE;
+ return false;
}
void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
CXFA_WidgetAcc* pAcc = GetDataAcc();
@@ -210,7 +208,7 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
}
}
}
-FX_BOOL CXFA_FFTextEdit::IsDataChanged() {
+bool CXFA_FFTextEdit::IsDataChanged() {
return (m_dwStatus & XFA_WidgetStatus_TextEditValueChanged) != 0;
}
uint32_t CXFA_FFTextEdit::GetAlignment() {
@@ -250,15 +248,15 @@ uint32_t CXFA_FFTextEdit::GetAlignment() {
}
return dwExtendedStyle;
}
-FX_BOOL CXFA_FFTextEdit::UpdateFWLData() {
+bool CXFA_FFTextEdit::UpdateFWLData() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
XFA_VALUEPICTURE eType = XFA_VALUEPICTURE_Display;
if (IsFocused()) {
eType = XFA_VALUEPICTURE_Edit;
}
- FX_BOOL bUpdate = FALSE;
+ bool bUpdate = false;
if (m_pDataAcc->GetUIType() == XFA_Element::TextEdit &&
m_pDataAcc->GetNumberOfCells() < 0) {
XFA_Element elementType = XFA_Element::Unknown;
@@ -268,7 +266,7 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData() {
}
if (((CFWL_Edit*)m_pNormalWidget)->GetLimit() != iMaxChars) {
((CFWL_Edit*)m_pNormalWidget)->SetLimit(iMaxChars);
- bUpdate = TRUE;
+ bUpdate = true;
}
}
if (m_pDataAcc->GetUIType() == XFA_Element::Barcode) {
@@ -276,7 +274,7 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData() {
if (eType == XFA_VALUEPICTURE_Edit)
m_pDataAcc->GetBarcodeAttribute_DataLength(nDataLen);
static_cast<CFWL_Edit*>(m_pNormalWidget)->SetLimit(nDataLen);
- bUpdate = TRUE;
+ bUpdate = true;
}
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, eType);
@@ -284,76 +282,74 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData() {
((CFWL_Edit*)m_pNormalWidget)->GetText(wsOldText);
if (wsText != wsOldText || (eType == XFA_VALUEPICTURE_Edit && bUpdate)) {
((CFWL_Edit*)m_pNormalWidget)->SetText(wsText);
- bUpdate = TRUE;
+ bUpdate = true;
}
if (bUpdate) {
m_pNormalWidget->Update();
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFTextEdit::CanUndo() {
+bool CXFA_FFTextEdit::CanUndo() {
return ((CFWL_Edit*)m_pNormalWidget)->CanUndo();
}
-FX_BOOL CXFA_FFTextEdit::CanRedo() {
+bool CXFA_FFTextEdit::CanRedo() {
return ((CFWL_Edit*)m_pNormalWidget)->CanRedo();
}
-FX_BOOL CXFA_FFTextEdit::Undo() {
+bool CXFA_FFTextEdit::Undo() {
return ((CFWL_Edit*)m_pNormalWidget)->Undo();
}
-FX_BOOL CXFA_FFTextEdit::Redo() {
+bool CXFA_FFTextEdit::Redo() {
return ((CFWL_Edit*)m_pNormalWidget)->Redo();
}
-FX_BOOL CXFA_FFTextEdit::CanCopy() {
+bool CXFA_FFTextEdit::CanCopy() {
int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
return nCount > 0;
}
-FX_BOOL CXFA_FFTextEdit::CanCut() {
+bool CXFA_FFTextEdit::CanCut() {
if (m_pNormalWidget->GetStylesEx() & FWL_STYLEEXT_EDT_ReadOnly) {
- return FALSE;
+ return false;
}
int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->CountSelRanges();
return nCount > 0;
}
-FX_BOOL CXFA_FFTextEdit::CanPaste() {
+bool CXFA_FFTextEdit::CanPaste() {
return m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open;
}
-FX_BOOL CXFA_FFTextEdit::CanSelectAll() {
+bool CXFA_FFTextEdit::CanSelectAll() {
return ((CFWL_Edit*)m_pNormalWidget)->GetTextLength() > 0;
}
-FX_BOOL CXFA_FFTextEdit::Copy(CFX_WideString& wsCopy) {
+bool CXFA_FFTextEdit::Copy(CFX_WideString& wsCopy) {
return ((CFWL_Edit*)m_pNormalWidget)->Copy(wsCopy);
}
-FX_BOOL CXFA_FFTextEdit::Cut(CFX_WideString& wsCut) {
+bool CXFA_FFTextEdit::Cut(CFX_WideString& wsCut) {
return ((CFWL_Edit*)m_pNormalWidget)->Cut(wsCut);
}
-FX_BOOL CXFA_FFTextEdit::Paste(const CFX_WideString& wsPaste) {
+bool CXFA_FFTextEdit::Paste(const CFX_WideString& wsPaste) {
return ((CFWL_Edit*)m_pNormalWidget)->Paste(wsPaste);
}
-FX_BOOL CXFA_FFTextEdit::SelectAll() {
+bool CXFA_FFTextEdit::SelectAll() {
int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength();
return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount) >= 0;
}
-FX_BOOL CXFA_FFTextEdit::Delete() {
+bool CXFA_FFTextEdit::Delete() {
return ((CFWL_Edit*)m_pNormalWidget)->Delete();
}
-FX_BOOL CXFA_FFTextEdit::DeSelect() {
+bool CXFA_FFTextEdit::DeSelect() {
return ((CFWL_Edit*)m_pNormalWidget)->ClearSelections() ==
FWL_Error::Succeeded;
}
-FX_BOOL CXFA_FFTextEdit::GetSuggestWords(
- CFX_PointF pointf,
- std::vector<CFX_ByteString>& sSuggest) {
+bool CXFA_FFTextEdit::GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest) {
if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) {
- return FALSE;
+ return false;
}
FWLToClient(pointf.x, pointf.y);
return ((CFWL_Edit*)m_pNormalWidget)->GetSuggestWords(pointf, sSuggest);
}
-FX_BOOL CXFA_FFTextEdit::ReplaceSpellCheckWord(
- CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace) {
+bool CXFA_FFTextEdit::ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace) {
if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) {
- return FALSE;
+ return false;
}
FWLToClient(pointf.x, pointf.y);
return ((CFWL_Edit*)m_pNormalWidget)
@@ -392,10 +388,10 @@ void CXFA_FFTextEdit::OnTextFull(IFWL_Widget* pWidget) {
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam);
}
-FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) {
+bool CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) {
if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit)
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) {
@@ -423,7 +419,7 @@ void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) {
}
case CFWL_EventType::GetSuggestedWords: {
CFWL_EvtEdtGetSuggestWords* event = (CFWL_EvtEdtGetSuggestWords*)pEvent;
- event->bSuggestWords = FALSE;
+ event->bSuggestWords = false;
break;
}
default:
@@ -441,7 +437,7 @@ CXFA_FFNumericEdit::CXFA_FFNumericEdit(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFTextEdit(pPageView, pDataAcc) {}
CXFA_FFNumericEdit::~CXFA_FFNumericEdit() {}
-FX_BOOL CXFA_FFNumericEdit::LoadWidget() {
+bool CXFA_FFNumericEdit::LoadWidget() {
CFWL_Edit* pWidget = new CFWL_Edit(GetFWLApp());
pWidget->Initialize();
m_pNormalWidget = pWidget;
@@ -498,12 +494,12 @@ void CXFA_FFNumericEdit::OnProcessEvent(CFWL_Event* pEvent) {
CXFA_FFTextEdit::OnProcessEvent(pEvent);
}
-FX_BOOL CXFA_FFNumericEdit::OnValidate(IFWL_Widget* pWidget,
- CFX_WideString& wsText) {
+bool CXFA_FFNumericEdit::OnValidate(IFWL_Widget* pWidget,
+ CFX_WideString& wsText) {
CFX_WideString wsPattern;
m_pDataAcc->GetPictureContent(wsPattern, XFA_VALUEPICTURE_Edit);
if (!wsPattern.IsEmpty()) {
- return TRUE;
+ return true;
}
int32_t iLeads = 0;
m_pDataAcc->GetLeadDigits(iLeads);
@@ -521,7 +517,7 @@ CXFA_FFPasswordEdit::CXFA_FFPasswordEdit(CXFA_FFPageView* pPageView,
CXFA_FFPasswordEdit::~CXFA_FFPasswordEdit() {}
-FX_BOOL CXFA_FFPasswordEdit::LoadWidget() {
+bool CXFA_FFPasswordEdit::LoadWidget() {
CFWL_Edit* pWidget = new CFWL_Edit(GetFWLApp());
pWidget->Initialize();
m_pNormalWidget = pWidget;
@@ -572,26 +568,26 @@ CXFA_FFDateTimeEdit::CXFA_FFDateTimeEdit(CXFA_FFPageView* pPageView,
CXFA_FFDateTimeEdit::~CXFA_FFDateTimeEdit() {}
-FX_BOOL CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus) {
+bool CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus) {
if (bDrawFocus)
- return FALSE;
+ return false;
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
}
-FX_BOOL CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
CFX_RectF rtWidget;
((CFWL_DateTimePicker*)m_pNormalWidget)->GetBBox(rtWidget);
if (rtWidget.Contains(fx, fy)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() {
+bool CXFA_FFDateTimeEdit::LoadWidget() {
CFWL_DateTimePicker* pWidget = new CFWL_DateTimePicker(GetFWLApp());
pWidget->Initialize();
m_pNormalWidget = pWidget;
@@ -687,18 +683,18 @@ uint32_t CXFA_FFDateTimeEdit::GetAlignment() {
}
return dwExtendedStyle;
}
-FX_BOOL CXFA_FFDateTimeEdit::CommitData() {
+bool CXFA_FFDateTimeEdit::CommitData() {
CFX_WideString wsText;
((CFWL_DateTimePicker*)m_pNormalWidget)->GetEditText(wsText);
if (m_pDataAcc->SetValue(wsText, XFA_VALUEPICTURE_Edit)) {
m_pDataAcc->UpdateUIDisplay(this);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() {
+bool CXFA_FFDateTimeEdit::UpdateFWLData() {
if (!m_pNormalWidget) {
- return FALSE;
+ return false;
}
XFA_VALUEPICTURE eType = XFA_VALUEPICTURE_Display;
if (IsFocused()) {
@@ -718,11 +714,11 @@ FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() {
}
}
m_pNormalWidget->Update();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFDateTimeEdit::IsDataChanged() {
+bool CXFA_FFDateTimeEdit::IsDataChanged() {
if (m_dwStatus & XFA_WidgetStatus_TextEditValueChanged) {
- return TRUE;
+ return true;
}
CFX_WideString wsText;
((CFWL_DateTimePicker*)m_pNormalWidget)->GetEditText(wsText);
@@ -730,49 +726,49 @@ FX_BOOL CXFA_FFDateTimeEdit::IsDataChanged() {
m_pDataAcc->GetValue(wsOldValue, XFA_VALUEPICTURE_Edit);
return wsOldValue != wsText;
}
-FX_BOOL CXFA_FFDateTimeEdit::CanUndo() {
+bool CXFA_FFDateTimeEdit::CanUndo() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->CanUndo();
}
-FX_BOOL CXFA_FFDateTimeEdit::CanRedo() {
+bool CXFA_FFDateTimeEdit::CanRedo() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->CanRedo();
}
-FX_BOOL CXFA_FFDateTimeEdit::Undo() {
+bool CXFA_FFDateTimeEdit::Undo() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Undo();
}
-FX_BOOL CXFA_FFDateTimeEdit::Redo() {
+bool CXFA_FFDateTimeEdit::Redo() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Redo();
}
-FX_BOOL CXFA_FFDateTimeEdit::CanCopy() {
+bool CXFA_FFDateTimeEdit::CanCopy() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->CanCopy();
}
-FX_BOOL CXFA_FFDateTimeEdit::CanCut() {
+bool CXFA_FFDateTimeEdit::CanCut() {
if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open) {
- return FALSE;
+ return false;
}
return ((CFWL_DateTimePicker*)m_pNormalWidget)->CanCut();
}
-FX_BOOL CXFA_FFDateTimeEdit::CanPaste() {
+bool CXFA_FFDateTimeEdit::CanPaste() {
return m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open;
}
-FX_BOOL CXFA_FFDateTimeEdit::CanSelectAll() {
+bool CXFA_FFDateTimeEdit::CanSelectAll() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->CanSelectAll();
}
-FX_BOOL CXFA_FFDateTimeEdit::Copy(CFX_WideString& wsCopy) {
+bool CXFA_FFDateTimeEdit::Copy(CFX_WideString& wsCopy) {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Copy(wsCopy);
}
-FX_BOOL CXFA_FFDateTimeEdit::Cut(CFX_WideString& wsCut) {
+bool CXFA_FFDateTimeEdit::Cut(CFX_WideString& wsCut) {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Cut(wsCut);
}
-FX_BOOL CXFA_FFDateTimeEdit::Paste(const CFX_WideString& wsPaste) {
+bool CXFA_FFDateTimeEdit::Paste(const CFX_WideString& wsPaste) {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Paste(wsPaste);
}
-FX_BOOL CXFA_FFDateTimeEdit::SelectAll() {
+bool CXFA_FFDateTimeEdit::SelectAll() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->SelectAll();
}
-FX_BOOL CXFA_FFDateTimeEdit::Delete() {
+bool CXFA_FFDateTimeEdit::Delete() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->Delete();
}
-FX_BOOL CXFA_FFDateTimeEdit::DeSelect() {
+bool CXFA_FFDateTimeEdit::DeSelect() {
return ((CFWL_DateTimePicker*)m_pNormalWidget)->DeSelect();
}
void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget* pWidget,
diff --git a/xfa/fxfa/app/xfa_fftextedit.h b/xfa/fxfa/app/xfa_fftextedit.h
index 048008d700..917d6cf17e 100644
--- a/xfa/fxfa/app/xfa_fftextedit.h
+++ b/xfa/fxfa/app/xfa_fftextedit.h
@@ -17,31 +17,31 @@ class CXFA_FFTextEdit : public CXFA_FFField {
~CXFA_FFTextEdit() override;
// CXFA_FFField
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void UpdateWidgetProperty() override;
- FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL OnSetFocus(CXFA_FFWidget* pOldWidget) override;
- FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override;
- FX_BOOL CanUndo() override;
- FX_BOOL CanRedo() override;
- FX_BOOL Undo() override;
- FX_BOOL Redo() override;
- FX_BOOL CanCopy() override;
- FX_BOOL CanCut() override;
- FX_BOOL CanPaste() override;
- FX_BOOL CanSelectAll() override;
- FX_BOOL Copy(CFX_WideString& wsCopy) override;
- FX_BOOL Cut(CFX_WideString& wsCut) override;
- FX_BOOL Paste(const CFX_WideString& wsPaste) override;
- FX_BOOL SelectAll() override;
- FX_BOOL Delete() override;
- FX_BOOL DeSelect() override;
- FX_BOOL GetSuggestWords(CFX_PointF pointf,
- std::vector<CFX_ByteString>& sSuggest) override;
- FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace) override;
+ bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override;
+ bool OnSetFocus(CXFA_FFWidget* pOldWidget) override;
+ bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
+ bool CanUndo() override;
+ bool CanRedo() override;
+ bool Undo() override;
+ bool Redo() override;
+ bool CanCopy() override;
+ bool CanCut() override;
+ bool CanPaste() override;
+ bool CanSelectAll() override;
+ bool Copy(CFX_WideString& wsCopy) override;
+ bool Cut(CFX_WideString& wsCut) override;
+ bool Paste(const CFX_WideString& wsPaste) override;
+ bool SelectAll() override;
+ bool Delete() override;
+ bool DeSelect() override;
+ bool GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest) override;
+ bool ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace) override;
void OnProcessMessage(CFWL_Message* pMessage) override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnDrawWidget(CFX_Graphics* pGraphics,
@@ -51,12 +51,12 @@ class CXFA_FFTextEdit : public CXFA_FFField {
const CFX_WideString& wsChanged,
const CFX_WideString& wsPrevText);
void OnTextFull(IFWL_Widget* pWidget);
- FX_BOOL CheckWord(const CFX_ByteStringC& sWord);
+ bool CheckWord(const CFX_ByteStringC& sWord);
protected:
- FX_BOOL CommitData() override;
- FX_BOOL UpdateFWLData() override;
- FX_BOOL IsDataChanged() override;
+ bool CommitData() override;
+ bool UpdateFWLData() override;
+ bool IsDataChanged() override;
uint32_t GetAlignment();
void ValidateNumberField(const CFX_WideString& wsText);
@@ -70,12 +70,12 @@ class CXFA_FFNumericEdit : public CXFA_FFTextEdit {
~CXFA_FFNumericEdit() override;
// CXFA_FFTextEdit
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void UpdateWidgetProperty() override;
void OnProcessEvent(CFWL_Event* pEvent) override;
public:
- FX_BOOL OnValidate(IFWL_Widget* pWidget, CFX_WideString& wsText);
+ bool OnValidate(IFWL_Widget* pWidget, CFX_WideString& wsText);
};
class CXFA_FFPasswordEdit : public CXFA_FFTextEdit {
@@ -84,7 +84,7 @@ class CXFA_FFPasswordEdit : public CXFA_FFTextEdit {
~CXFA_FFPasswordEdit() override;
// CXFA_FFTextEdit
- FX_BOOL LoadWidget() override;
+ bool LoadWidget() override;
void UpdateWidgetProperty() override;
protected:
@@ -102,26 +102,26 @@ class CXFA_FFDateTimeEdit : public CXFA_FFTextEdit {
~CXFA_FFDateTimeEdit() override;
// CXFA_FFTextEdit
- FX_BOOL GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus = FALSE) override;
- FX_BOOL LoadWidget() override;
+ bool GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus = false) override;
+ bool LoadWidget() override;
void UpdateWidgetProperty() override;
- FX_BOOL CanUndo() override;
- FX_BOOL CanRedo() override;
- FX_BOOL Undo() override;
- FX_BOOL Redo() override;
- FX_BOOL CanCopy() override;
- FX_BOOL CanCut() override;
- FX_BOOL CanPaste() override;
- FX_BOOL CanSelectAll() override;
- FX_BOOL Copy(CFX_WideString& wsCopy) override;
- FX_BOOL Cut(CFX_WideString& wsCut) override;
- FX_BOOL Paste(const CFX_WideString& wsPaste) override;
- FX_BOOL SelectAll() override;
- FX_BOOL Delete() override;
- FX_BOOL DeSelect() override;
+ bool CanUndo() override;
+ bool CanRedo() override;
+ bool Undo() override;
+ bool Redo() override;
+ bool CanCopy() override;
+ bool CanCut() override;
+ bool CanPaste() override;
+ bool CanSelectAll() override;
+ bool Copy(CFX_WideString& wsCopy) override;
+ bool Cut(CFX_WideString& wsCut) override;
+ bool Paste(const CFX_WideString& wsPaste) override;
+ bool SelectAll() override;
+ bool Delete() override;
+ bool DeSelect() override;
void OnProcessEvent(CFWL_Event* pEvent) override;
void OnSelectChanged(IFWL_Widget* pWidget,
@@ -130,10 +130,10 @@ class CXFA_FFDateTimeEdit : public CXFA_FFTextEdit {
int32_t iDay);
protected:
- FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
- FX_BOOL CommitData() override;
- FX_BOOL UpdateFWLData() override;
- FX_BOOL IsDataChanged() override;
+ bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override;
+ bool CommitData() override;
+ bool UpdateFWLData() override;
+ bool IsDataChanged() override;
uint32_t GetAlignment();
};
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index a21fbcab62..89b3053b57 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -91,21 +91,21 @@ void CXFA_FFWidget::ModifyStatus(uint32_t dwAdded, uint32_t dwRemoved) {
m_dwStatus = (m_dwStatus & ~dwRemoved) | dwAdded;
}
-FX_BOOL CXFA_FFWidget::GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus) {
+bool CXFA_FFWidget::GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus) {
if (bDrawFocus)
- return FALSE;
+ return false;
if (m_pPageView)
m_pPageView->GetPageViewRect(rtBox);
- return TRUE;
+ return true;
}
CXFA_WidgetAcc* CXFA_FFWidget::GetDataAcc() {
return m_pDataAcc;
}
-FX_BOOL CXFA_FFWidget::GetToolTip(CFX_WideString& wsToolTip) {
+bool CXFA_FFWidget::GetToolTip(CFX_WideString& wsToolTip) {
if (CXFA_Assist assist = m_pDataAcc->GetAssist()) {
if (CXFA_ToolTip toolTip = assist.GetToolTip()) {
return toolTip.GetTip(wsToolTip);
@@ -131,20 +131,20 @@ void CXFA_FFWidget::RenderWidget(CFX_Graphics* pGS,
DrawBorder(pGS, border, rtBorder, pMatrix);
}
}
-FX_BOOL CXFA_FFWidget::IsLoaded() {
+bool CXFA_FFWidget::IsLoaded() {
return !!m_pPageView;
}
-FX_BOOL CXFA_FFWidget::LoadWidget() {
+bool CXFA_FFWidget::LoadWidget() {
PerformLayout();
- return TRUE;
+ return true;
}
void CXFA_FFWidget::UnloadWidget() {}
-FX_BOOL CXFA_FFWidget::PerformLayout() {
+bool CXFA_FFWidget::PerformLayout() {
ReCacheWidgetRect();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFWidget::UpdateFWLData() {
- return FALSE;
+bool CXFA_FFWidget::UpdateFWLData() {
+ return false;
}
void CXFA_FFWidget::UpdateWidgetProperty() {}
void CXFA_FFWidget::DrawBorder(CFX_Graphics* pGS,
@@ -176,62 +176,58 @@ void CXFA_FFWidget::AddInvalidateRect(const CFX_RectF* pRect) {
}
m_pDocView->AddInvalidateRect(m_pPageView, rtWidget);
}
-FX_BOOL CXFA_FFWidget::GetCaptionText(CFX_WideString& wsCap) {
+bool CXFA_FFWidget::GetCaptionText(CFX_WideString& wsCap) {
CXFA_TextLayout* pCapTextlayout = m_pDataAcc->GetCaptionTextLayout();
if (!pCapTextlayout) {
- return FALSE;
+ return false;
}
pCapTextlayout->GetText(wsCap);
- return TRUE;
+ return true;
}
bool CXFA_FFWidget::IsFocused() {
return !!(m_dwStatus & XFA_WidgetStatus_Focused);
}
-FX_BOOL CXFA_FFWidget::OnMouseEnter() {
- return FALSE;
+bool CXFA_FFWidget::OnMouseEnter() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnMouseExit() {
- return FALSE;
+bool CXFA_FFWidget::OnMouseExit() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnLButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnLButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFWidget::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
- return FALSE;
-}
-FX_BOOL CXFA_FFWidget::OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
+bool CXFA_FFWidget::OnLButtonDblClk(uint32_t dwFlags,
FX_FLOAT fx,
FX_FLOAT fy) {
- return FALSE;
+ return false;
+}
+bool CXFA_FFWidget::OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
+}
+bool CXFA_FFWidget::OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnRButtonDown(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnRButtonDblClk(uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnRButtonDblClk(uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnSetFocus(CXFA_FFWidget* pOldWidget) {
+bool CXFA_FFWidget::OnSetFocus(CXFA_FFWidget* pOldWidget) {
CXFA_FFWidget* pParent = GetParent();
if (pParent && !pParent->IsAncestorOf(pOldWidget)) {
pParent->OnSetFocus(pOldWidget);
@@ -241,9 +237,9 @@ FX_BOOL CXFA_FFWidget::OnSetFocus(CXFA_FFWidget* pOldWidget) {
eParam.m_eType = XFA_EVENT_Enter;
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Enter, &eParam);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFWidget::OnKillFocus(CXFA_FFWidget* pNewWidget) {
+bool CXFA_FFWidget::OnKillFocus(CXFA_FFWidget* pNewWidget) {
m_dwStatus &= ~XFA_WidgetStatus_Focused;
EventKillFocus();
if (pNewWidget) {
@@ -252,78 +248,78 @@ FX_BOOL CXFA_FFWidget::OnKillFocus(CXFA_FFWidget* pNewWidget) {
pParent->OnKillFocus(pNewWidget);
}
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_FFWidget::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFWidget::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFWidget::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::OnChar(uint32_t dwChar, uint32_t dwFlags) {
- return FALSE;
+bool CXFA_FFWidget::OnChar(uint32_t dwChar, uint32_t dwFlags) {
+ return false;
}
FWL_WidgetHit CXFA_FFWidget::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
return FWL_WidgetHit::Unknown;
}
-FX_BOOL CXFA_FFWidget::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
- return FALSE;
+bool CXFA_FFWidget::OnSetCursor(FX_FLOAT fx, FX_FLOAT fy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanUndo() {
- return FALSE;
+bool CXFA_FFWidget::CanUndo() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanRedo() {
- return FALSE;
+bool CXFA_FFWidget::CanRedo() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::Undo() {
- return FALSE;
+bool CXFA_FFWidget::Undo() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::Redo() {
- return FALSE;
+bool CXFA_FFWidget::Redo() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanCopy() {
- return FALSE;
+bool CXFA_FFWidget::CanCopy() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanCut() {
- return FALSE;
+bool CXFA_FFWidget::CanCut() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanPaste() {
- return FALSE;
+bool CXFA_FFWidget::CanPaste() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanSelectAll() {
- return FALSE;
+bool CXFA_FFWidget::CanSelectAll() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::CanDelete() {
+bool CXFA_FFWidget::CanDelete() {
return CanCut();
}
-FX_BOOL CXFA_FFWidget::CanDeSelect() {
+bool CXFA_FFWidget::CanDeSelect() {
return CanCopy();
}
-FX_BOOL CXFA_FFWidget::Copy(CFX_WideString& wsCopy) {
- return FALSE;
+bool CXFA_FFWidget::Copy(CFX_WideString& wsCopy) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::Cut(CFX_WideString& wsCut) {
- return FALSE;
+bool CXFA_FFWidget::Cut(CFX_WideString& wsCut) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::Paste(const CFX_WideString& wsPaste) {
- return FALSE;
+bool CXFA_FFWidget::Paste(const CFX_WideString& wsPaste) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::SelectAll() {
- return FALSE;
+bool CXFA_FFWidget::SelectAll() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::Delete() {
- return FALSE;
+bool CXFA_FFWidget::Delete() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::DeSelect() {
- return FALSE;
+bool CXFA_FFWidget::DeSelect() {
+ return false;
}
-FX_BOOL CXFA_FFWidget::GetSuggestWords(CFX_PointF pointf,
- std::vector<CFX_ByteString>& sSuggest) {
- return FALSE;
+bool CXFA_FFWidget::GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest) {
+ return false;
}
-FX_BOOL CXFA_FFWidget::ReplaceSpellCheckWord(CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace) {
- return FALSE;
+bool CXFA_FFWidget::ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace) {
+ return false;
}
void CXFA_FFWidget::Rotate2Normal(FX_FLOAT& fx, FX_FLOAT& fy) {
CFX_Matrix mt;
@@ -402,7 +398,7 @@ void CXFA_FFWidget::GetRotateMatrix(CFX_Matrix& mt) {
XFA_ATTRIBUTEENUM at = XFA_ATTRIBUTEENUM_TopLeft;
XFA_GetMatrix(mt, iRotate, at, rcWidget);
}
-FX_BOOL CXFA_FFWidget::IsLayoutRectEmpty() {
+bool CXFA_FFWidget::IsLayoutRectEmpty() {
CFX_RectF rtLayout;
GetRectWithoutRotate(rtLayout);
return rtLayout.width < 0.1f && rtLayout.height < 0.1f;
@@ -419,27 +415,27 @@ CXFA_FFWidget* CXFA_FFWidget::GetParent() {
}
return nullptr;
}
-FX_BOOL CXFA_FFWidget::IsAncestorOf(CXFA_FFWidget* pWidget) {
+bool CXFA_FFWidget::IsAncestorOf(CXFA_FFWidget* pWidget) {
if (!pWidget) {
- return FALSE;
+ return false;
}
CXFA_Node* pNode = m_pDataAcc->GetNode();
CXFA_Node* pChildNode = pWidget->GetDataAcc()->GetNode();
while (pChildNode) {
if (pChildNode == pNode) {
- return TRUE;
+ return true;
}
pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_Parent);
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_FFWidget::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
+bool CXFA_FFWidget::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
CFX_RectF rtWidget;
GetWidgetRect(rtWidget);
if (rtWidget.Contains(fx, fy)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CXFA_FFDocView* CXFA_FFWidget::GetDocView() {
return m_pDocView;
@@ -491,10 +487,10 @@ void CXFA_FFWidget::EventKillFocus() {
eParam.m_pTarget = m_pDataAcc;
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Exit, &eParam);
}
-FX_BOOL CXFA_FFWidget::IsButtonDown() {
+bool CXFA_FFWidget::IsButtonDown() {
return (m_dwStatus & XFA_WidgetStatus_ButtonDown) != 0;
}
-void CXFA_FFWidget::SetButtonDown(FX_BOOL bSet) {
+void CXFA_FFWidget::SetButtonDown(bool bSet) {
bSet ? m_dwStatus |= XFA_WidgetStatus_ButtonDown
: m_dwStatus &= ~XFA_WidgetStatus_ButtonDown;
}
@@ -560,17 +556,17 @@ class CXFA_ImageRenderer {
CXFA_ImageRenderer();
~CXFA_ImageRenderer();
- FX_BOOL Start(CFX_RenderDevice* pDevice,
- CFX_DIBSource* pDIBSource,
- FX_ARGB bitmap_argb,
- int bitmap_alpha,
- const CFX_Matrix* pImage2Device,
- uint32_t flags,
- int blendType = FXDIB_BLEND_NORMAL);
- FX_BOOL Continue(IFX_Pause* pPause);
+ bool Start(CFX_RenderDevice* pDevice,
+ CFX_DIBSource* pDIBSource,
+ FX_ARGB bitmap_argb,
+ int bitmap_alpha,
+ const CFX_Matrix* pImage2Device,
+ uint32_t flags,
+ int blendType = FXDIB_BLEND_NORMAL);
+ bool Continue(IFX_Pause* pPause);
protected:
- FX_BOOL StartDIBSource();
+ bool StartDIBSource();
void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
int left,
int top,
@@ -590,8 +586,8 @@ class CXFA_ImageRenderer {
std::unique_ptr<CFX_ImageTransformer> m_pTransformer;
void* m_DeviceHandle;
int32_t m_BlendType;
- FX_BOOL m_Result;
- FX_BOOL m_bPrint;
+ bool m_Result;
+ bool m_bPrint;
};
CXFA_ImageRenderer::CXFA_ImageRenderer()
@@ -603,21 +599,21 @@ CXFA_ImageRenderer::CXFA_ImageRenderer()
m_Flags(0),
m_DeviceHandle(nullptr),
m_BlendType(FXDIB_BLEND_NORMAL),
- m_Result(TRUE),
- m_bPrint(FALSE) {}
+ m_Result(true),
+ m_bPrint(false) {}
CXFA_ImageRenderer::~CXFA_ImageRenderer() {
if (m_DeviceHandle)
m_pDevice->CancelDIBits(m_DeviceHandle);
}
-FX_BOOL CXFA_ImageRenderer::Start(CFX_RenderDevice* pDevice,
- CFX_DIBSource* pDIBSource,
- FX_ARGB bitmap_argb,
- int bitmap_alpha,
- const CFX_Matrix* pImage2Device,
- uint32_t flags,
- int blendType) {
+bool CXFA_ImageRenderer::Start(CFX_RenderDevice* pDevice,
+ CFX_DIBSource* pDIBSource,
+ FX_ARGB bitmap_argb,
+ int bitmap_alpha,
+ const CFX_Matrix* pImage2Device,
+ uint32_t flags,
+ int blendType) {
m_pDevice = pDevice;
m_pDIBSource = pDIBSource;
m_FillArgb = bitmap_argb;
@@ -628,15 +624,15 @@ FX_BOOL CXFA_ImageRenderer::Start(CFX_RenderDevice* pDevice,
return StartDIBSource();
}
-FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
+bool CXFA_ImageRenderer::StartDIBSource() {
if (m_pDevice->StartDIBitsWithBlend(m_pDIBSource, m_BitmapAlpha, m_FillArgb,
&m_ImageMatrix, m_Flags, m_DeviceHandle,
m_BlendType)) {
if (m_DeviceHandle) {
m_Status = 3;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CFX_FloatRect image_rect_f = m_ImageMatrix.GetUnitRect();
FX_RECT image_rect = image_rect_f.GetOuterRect();
@@ -645,8 +641,8 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
if ((FXSYS_fabs(m_ImageMatrix.b) >= 0.5f || m_ImageMatrix.a == 0) ||
(FXSYS_fabs(m_ImageMatrix.c) >= 0.5f || m_ImageMatrix.d == 0)) {
if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) {
- m_Result = FALSE;
- return FALSE;
+ m_Result = false;
+ return false;
}
CFX_DIBSource* pDib = m_pDIBSource;
if (m_pDIBSource->HasAlpha() &&
@@ -654,8 +650,8 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
!(m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) {
m_pCloneConvert.reset(m_pDIBSource->CloneConvert(FXDIB_Rgb));
if (!m_pCloneConvert) {
- m_Result = FALSE;
- return FALSE;
+ m_Result = false;
+ return false;
}
pDib = m_pCloneConvert.get();
}
@@ -665,7 +661,7 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
m_pTransformer.reset(
new CFX_ImageTransformer(pDib, &m_ImageMatrix, m_Flags, &clip_box));
m_pTransformer->Start();
- return TRUE;
+ return true;
}
if (m_ImageMatrix.a < 0) {
dest_width = -dest_width;
@@ -680,7 +676,7 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
if (m_pDevice->StretchDIBitsWithFlagsAndBlend(
m_pDIBSource, dest_left, dest_top, dest_width, dest_height, m_Flags,
m_BlendType)) {
- return FALSE;
+ return false;
}
}
if (m_pDIBSource->IsAlphaMask()) {
@@ -690,12 +686,12 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
if (m_pDevice->StretchBitMaskWithFlags(m_pDIBSource, dest_left, dest_top,
dest_width, dest_height, m_FillArgb,
m_Flags)) {
- return FALSE;
+ return false;
}
}
if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) {
- m_Result = FALSE;
- return TRUE;
+ m_Result = false;
+ return true;
}
FX_RECT clip_box = m_pDevice->GetClipBox();
FX_RECT dest_rect = clip_box;
@@ -707,19 +703,19 @@ FX_BOOL CXFA_ImageRenderer::StartDIBSource() {
m_pDIBSource->StretchTo(dest_width, dest_height, m_Flags, &dest_clip));
if (pStretched) {
CompositeDIBitmap(pStretched.get(), dest_rect.left, dest_rect.top,
- m_FillArgb, m_BitmapAlpha, m_BlendType, FALSE);
+ m_FillArgb, m_BitmapAlpha, m_BlendType, false);
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
+bool CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
if (m_Status == 2) {
if (m_pTransformer->Continue(pPause))
- return TRUE;
+ return true;
std::unique_ptr<CFX_DIBitmap> pBitmap(m_pTransformer->DetachBitmap());
if (!pBitmap)
- return FALSE;
+ return false;
if (pBitmap->IsAlphaMask()) {
if (m_BitmapAlpha != 255)
@@ -734,12 +730,12 @@ FX_BOOL CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
pBitmap.get(), m_pTransformer->result().left,
m_pTransformer->result().top, m_BlendType);
}
- return FALSE;
+ return false;
}
if (m_Status == 3)
return m_pDevice->ContinueDIBits(m_DeviceHandle, pPause);
- return FALSE;
+ return false;
}
void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
@@ -773,8 +769,8 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
}
}
}
- FX_BOOL bBackAlphaRequired = blend_mode && bIsolated;
- FX_BOOL bGetBackGround =
+ bool bBackAlphaRequired = blend_mode && bIsolated;
+ bool bGetBackGround =
((m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT)) ||
(!(m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT) &&
(m_pDevice->GetRenderCaps() & FXRC_GET_BITS) && !bBackAlphaRequired);
@@ -789,9 +785,9 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
top + pDIBitmap->GetHeight());
rect.Intersect(m_pDevice->GetClipBox());
CFX_DIBitmap* pClone = nullptr;
- FX_BOOL bClone = FALSE;
+ bool bClone = false;
if (m_pDevice->GetBackDrop() && m_pDevice->GetBitmap()) {
- bClone = TRUE;
+ bClone = true;
pClone = m_pDevice->GetBackDrop()->Clone(&rect);
CFX_DIBitmap* pForeBitmap = m_pDevice->GetBitmap();
pClone->CompositeBitmap(0, 0, pClone->GetWidth(), pClone->GetHeight(),
@@ -828,8 +824,8 @@ void CXFA_ImageRenderer::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
return;
}
CXFA_ImageRenderer imageRender;
- FX_BOOL bRet = imageRender.Start(m_pDevice, pCloneConvert, m_FillArgb,
- m_BitmapAlpha, &m_ImageMatrix, m_Flags);
+ bool bRet = imageRender.Start(m_pDevice, pCloneConvert, m_FillArgb,
+ m_BitmapAlpha, &m_ImageMatrix, m_Flags);
while (bRet) {
bRet = imageRender.Continue(nullptr);
}
@@ -902,8 +898,8 @@ void XFA_DrawImage(CFX_Graphics* pGS,
mtImage.Concat(rtFit.width, 0, 0, rtFit.height, rtFit.left, rtFit.top);
mtImage.Concat(*pMatrix);
CXFA_ImageRenderer imageRender;
- FX_BOOL bRet = imageRender.Start(pRenderDevice, pDIBitmap, 0, 255, &mtImage,
- FXDIB_INTERPOL);
+ bool bRet = imageRender.Start(pRenderDevice, pDIBitmap, 0, 255, &mtImage,
+ FXDIB_INTERPOL);
while (bRet) {
bRet = imageRender.Continue(nullptr);
}
@@ -1046,7 +1042,7 @@ FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType) {
}
CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
CXFA_Image* pImage,
- FX_BOOL& bNameImage,
+ bool& bNameImage,
int32_t& iImageXDpi,
int32_t& iImageYDpi) {
CFX_WideString wsHref;
@@ -1085,7 +1081,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
CFX_DIBitmap* pBitmap =
pDoc->GetPDFNamedImage(wsURL.AsStringC(), iImageXDpi, iImageYDpi);
if (pBitmap) {
- bNameImage = TRUE;
+ bNameImage = true;
return pBitmap;
}
}
@@ -1095,7 +1091,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
FX_Free(pImageBuffer);
return nullptr;
}
- bNameImage = FALSE;
+ bNameImage = false;
CFX_DIBitmap* pBitmap =
XFA_LoadImageFromBuffer(pImageFileRead, type, iImageXDpi, iImageYDpi);
FX_Free(pImageBuffer);
@@ -1175,7 +1171,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_SeekableReadStream* pImageFileRead,
delete pProgressiveDecoder;
return pBitmap;
}
-void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, FX_BOOL bUI) {
+void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, bool bUI) {
if (!mg) {
return;
}
@@ -1191,7 +1187,7 @@ CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) {
return static_cast<CXFA_FFWidget*>(pLayoutItem);
return nullptr;
}
-FX_BOOL XFA_IsCreateWidget(XFA_Element eType) {
+bool XFA_IsCreateWidget(XFA_Element eType) {
return eType == XFA_Element::Field || eType == XFA_Element::Draw ||
eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup;
}
@@ -1211,8 +1207,8 @@ static void XFA_BOX_GetPath_Arc(CXFA_Box box,
rtDraw.width = a + a;
rtDraw.height = b + b;
FX_FLOAT startAngle = 0, sweepAngle = 360;
- FX_BOOL bStart = box.GetStartAngle(startAngle);
- FX_BOOL bEnd = box.GetSweepAngle(sweepAngle);
+ bool bStart = box.GetStartAngle(startAngle);
+ bool bEnd = box.GetSweepAngle(sweepAngle);
if (!bStart && !bEnd) {
fillPath.AddEllipse(rtDraw);
return;
@@ -1227,18 +1223,18 @@ static void XFA_BOX_GetPath(CXFA_Box box,
CFX_RectF rtWidget,
CFX_Path& path,
int32_t nIndex,
- FX_BOOL bStart,
- FX_BOOL bCorner) {
+ bool bStart,
+ bool bCorner) {
ASSERT(nIndex >= 0 && nIndex < 8);
int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex;
CXFA_Corner corner1(strokes[n].GetNode());
CXFA_Corner corner2(strokes[(n + 2) % 8].GetNode());
FX_FLOAT fRadius1 = bCorner ? corner1.GetRadius() : 0.0f;
FX_FLOAT fRadius2 = bCorner ? corner2.GetRadius() : 0.0f;
- FX_BOOL bInverted = corner1.IsInverted();
+ bool bInverted = corner1.IsInverted();
FX_FLOAT offsetY = 0.0f;
FX_FLOAT offsetX = 0.0f;
- FX_BOOL bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
+ bool bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
FX_FLOAT halfAfter = 0.0f;
FX_FLOAT halfBefore = 0.0f;
CXFA_Stroke stroke = strokes[nIndex];
@@ -1411,12 +1407,12 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
XFA_BOX_GetPath_Arc(box, rtWidget, fillPath, dwFlags);
return;
}
- FX_BOOL bSameStyles = TRUE;
+ bool bSameStyles = true;
CXFA_Stroke stroke1 = strokes[0];
for (int32_t i = 1; i < 8; i++) {
CXFA_Stroke stroke2 = strokes[i];
if (!stroke1.SameStyles(stroke2)) {
- bSameStyles = FALSE;
+ bSameStyles = false;
break;
}
stroke1 = stroke2;
@@ -1427,7 +1423,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
CXFA_Stroke stroke2 = strokes[i];
if (!stroke1.SameStyles(stroke2, XFA_STROKE_SAMESTYLE_NoPresence |
XFA_STROKE_SAMESTYLE_Corner)) {
- bSameStyles = FALSE;
+ bSameStyles = false;
break;
}
stroke1 = stroke2;
@@ -1435,10 +1431,10 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
if (bSameStyles) {
stroke1 = strokes[0];
if (stroke1.IsInverted()) {
- bSameStyles = FALSE;
+ bSameStyles = false;
}
if (stroke1.GetJoinType() != XFA_ATTRIBUTEENUM_Square) {
- bSameStyles = FALSE;
+ bSameStyles = false;
}
}
}
@@ -1460,8 +1456,8 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
CXFA_Corner corner2(strokes[(i + 2) % 8].GetNode());
FX_FLOAT fRadius1 = corner1.GetRadius();
FX_FLOAT fRadius2 = corner2.GetRadius();
- FX_BOOL bInverted = corner1.IsInverted();
- FX_BOOL bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
+ bool bInverted = corner1.IsInverted();
+ bool bRound = corner1.GetJoinType() == XFA_ATTRIBUTEENUM_Round;
if (bRound) {
sy = FX_PI / 2;
}
@@ -1560,7 +1556,7 @@ static void XFA_BOX_Fill_Radial(CXFA_Box box,
FXSYS_sqrt(rtFill.Width() * rtFill.Width() +
rtFill.Height() * rtFill.Height()) /
2,
- TRUE, TRUE, crStart, crEnd);
+ true, true, crStart, crEnd);
CFX_Color cr(&shading);
pGS->SetFillColor(&cr);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
@@ -1631,7 +1627,7 @@ static void XFA_BOX_Fill_Linear(CXFA_Box box,
default:
break;
}
- CFX_Shading shading(ptStart, ptEnd, FALSE, FALSE, crStart, crEnd);
+ CFX_Shading shading(ptStart, ptEnd, false, false, crStart, crEnd);
CFX_Color cr(&shading);
pGS->SetFillColor(&cr);
pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix);
@@ -1699,7 +1695,7 @@ static void XFA_BOX_StrokePath(CXFA_Stroke stroke,
if (stroke.IsCorner() && fThickness > 2 * stroke.GetRadius()) {
fThickness = 2 * stroke.GetRadius();
}
- pGS->SetLineWidth(fThickness, TRUE);
+ pGS->SetLineWidth(fThickness, true);
pGS->SetLineCap(CFX_GraphStateData::LineCapButt);
XFA_StrokeTypeSetLineDash(pGS, stroke.GetStrokeType(),
XFA_ATTRIBUTEENUM_Butt);
@@ -1717,7 +1713,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
if (!edge || !edge.IsVisible()) {
return;
}
- FX_BOOL bVisible = FALSE;
+ bool bVisible = false;
FX_FLOAT fThickness = 0;
int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
@@ -1880,7 +1876,7 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box,
CFX_Graphics* pGS,
CFX_RectF rtWidget,
CFX_Matrix* pMatrix) {
- FX_BOOL bVisible = FALSE;
+ bool bVisible = false;
FX_FLOAT fThickness = 0;
int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
if (i3DType) {
@@ -1903,25 +1899,25 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box,
}
return;
}
- FX_BOOL bClose = FALSE;
- FX_BOOL bSameStyles = TRUE;
+ bool bClose = false;
+ bool bSameStyles = true;
CXFA_Stroke stroke1 = strokes[0];
for (int32_t i = 1; i < 8; i++) {
CXFA_Stroke stroke2 = strokes[i];
if (!stroke1.SameStyles(stroke2)) {
- bSameStyles = FALSE;
+ bSameStyles = false;
break;
}
stroke1 = stroke2;
}
if (bSameStyles) {
stroke1 = strokes[0];
- bClose = TRUE;
+ bClose = true;
for (int32_t i = 2; i < 8; i += 2) {
CXFA_Stroke stroke2 = strokes[i];
if (!stroke1.SameStyles(stroke2, XFA_STROKE_SAMESTYLE_NoPresence |
XFA_STROKE_SAMESTYLE_Corner)) {
- bSameStyles = FALSE;
+ bSameStyles = false;
break;
}
stroke1 = stroke2;
@@ -1929,25 +1925,25 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box,
if (bSameStyles) {
stroke1 = strokes[0];
if (stroke1.IsInverted()) {
- bSameStyles = FALSE;
+ bSameStyles = false;
}
if (stroke1.GetJoinType() != XFA_ATTRIBUTEENUM_Square) {
- bSameStyles = FALSE;
+ bSameStyles = false;
}
}
}
- FX_BOOL bStart = TRUE;
+ bool bStart = true;
CFX_Path path;
path.Create();
for (int32_t i = 0; i < 8; i++) {
CXFA_Stroke stroke = strokes[i];
if ((i % 1) == 0 && stroke.GetRadius() < 0) {
- FX_BOOL bEmpty = path.IsEmpty();
+ bool bEmpty = path.IsEmpty();
if (!bEmpty) {
XFA_BOX_StrokePath(stroke, &path, pGS, pMatrix);
path.Clear();
}
- bStart = TRUE;
+ bStart = true;
continue;
}
XFA_BOX_GetPath(box, strokes, rtWidget, path, i, bStart, !bSameStyles);
@@ -1958,7 +1954,7 @@ static void XFA_BOX_Stroke_Rect(CXFA_Box box,
path.Clear();
}
}
- FX_BOOL bEmpty = path.IsEmpty();
+ bool bEmpty = path.IsEmpty();
if (!bEmpty) {
if (bClose) {
path.Close();
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index a5cfafc5f7..64d76a6d2a 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -72,7 +72,7 @@ class CXFA_ImageLayoutData : public CXFA_WidgetLayoutData {
public:
CXFA_ImageLayoutData()
: m_pDIBitmap(nullptr),
- m_bNamedImage(FALSE),
+ m_bNamedImage(false),
m_iImageXDpi(0),
m_iImageYDpi(0) {}
@@ -81,17 +81,17 @@ class CXFA_ImageLayoutData : public CXFA_WidgetLayoutData {
delete m_pDIBitmap;
}
- FX_BOOL LoadImageData(CXFA_WidgetAcc* pAcc) {
+ bool LoadImageData(CXFA_WidgetAcc* pAcc) {
if (m_pDIBitmap)
- return TRUE;
+ return true;
CXFA_Value value = pAcc->GetFormValue();
if (!value)
- return FALSE;
+ return false;
CXFA_Image imageObj = value.GetImage();
if (!imageObj)
- return FALSE;
+ return false;
CXFA_FFDoc* pFFDoc = pAcc->GetDoc();
pAcc->SetImageImage(XFA_LoadImageData(pFFDoc, &imageObj, m_bNamedImage,
@@ -100,7 +100,7 @@ class CXFA_ImageLayoutData : public CXFA_WidgetLayoutData {
}
CFX_DIBitmap* m_pDIBitmap;
- FX_BOOL m_bNamedImage;
+ bool m_bNamedImage;
int32_t m_iImageXDpi;
int32_t m_iImageYDpi;
};
@@ -110,16 +110,16 @@ class CXFA_FieldLayoutData : public CXFA_WidgetLayoutData {
CXFA_FieldLayoutData() {}
~CXFA_FieldLayoutData() override {}
- FX_BOOL LoadCaption(CXFA_WidgetAcc* pAcc) {
+ bool LoadCaption(CXFA_WidgetAcc* pAcc) {
if (m_pCapTextLayout)
- return TRUE;
+ return true;
CXFA_Caption caption = pAcc->GetCaption();
if (!caption || caption.GetPresence() == XFA_ATTRIBUTEENUM_Hidden)
- return FALSE;
+ return false;
m_pCapTextProvider.reset(
new CXFA_TextProvider(pAcc, XFA_TEXTPROVIDERTYPE_Caption));
m_pCapTextLayout.reset(new CXFA_TextLayout(m_pCapTextProvider.get()));
- return TRUE;
+ return true;
}
std::unique_ptr<CXFA_TextLayout> m_pCapTextLayout;
@@ -136,7 +136,7 @@ class CXFA_ImageEditData : public CXFA_FieldLayoutData {
public:
CXFA_ImageEditData()
: m_pDIBitmap(nullptr),
- m_bNamedImage(FALSE),
+ m_bNamedImage(false),
m_iImageXDpi(0),
m_iImageYDpi(0) {}
@@ -145,13 +145,13 @@ class CXFA_ImageEditData : public CXFA_FieldLayoutData {
delete m_pDIBitmap;
}
- FX_BOOL LoadImageData(CXFA_WidgetAcc* pAcc) {
+ bool LoadImageData(CXFA_WidgetAcc* pAcc) {
if (m_pDIBitmap)
- return TRUE;
+ return true;
CXFA_Value value = pAcc->GetFormValue();
if (!value)
- return FALSE;
+ return false;
CXFA_Image imageObj = value.GetImage();
CXFA_FFDoc* pFFDoc = pAcc->GetDoc();
@@ -161,7 +161,7 @@ class CXFA_ImageEditData : public CXFA_FieldLayoutData {
}
CFX_DIBitmap* m_pDIBitmap;
- FX_BOOL m_bNamedImage;
+ bool m_bNamedImage;
int32_t m_iImageXDpi;
int32_t m_iImageYDpi;
};
@@ -173,7 +173,7 @@ CXFA_WidgetAcc::CXFA_WidgetAcc(CXFA_FFDocView* pDocView, CXFA_Node* pNode)
CXFA_WidgetAcc::~CXFA_WidgetAcc() {}
-FX_BOOL CXFA_WidgetAcc::GetName(CFX_WideString& wsName, int32_t iNameType) {
+bool CXFA_WidgetAcc::GetName(CFX_WideString& wsName, int32_t iNameType) {
if (iNameType == 0) {
m_pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
return !wsName.IsEmpty();
@@ -185,17 +185,17 @@ FX_BOOL CXFA_WidgetAcc::GetName(CFX_WideString& wsName, int32_t iNameType) {
wsName.Delete(0, wsPre.GetLength());
}
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_WidgetAcc::GetDatasets() {
return m_pNode->GetBindData();
}
-FX_BOOL CXFA_WidgetAcc::ProcessValueChanged() {
+bool CXFA_WidgetAcc::ProcessValueChanged() {
m_pDocView->AddValidateWidget(this);
m_pDocView->AddCalculateWidgetAcc(this);
m_pDocView->RunCalculateWidgets();
m_pDocView->RunValidate();
- return TRUE;
+ return true;
}
void CXFA_WidgetAcc::ResetData() {
CFX_WideString wsValue;
@@ -262,7 +262,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideString& wsContentType,
}
CFX_WideString wsFormatValue(wsData);
GetFormatDataValue(wsData, wsFormatValue);
- m_pNode->SetContent(wsData, wsFormatValue, TRUE);
+ m_pNode->SetContent(wsData, wsFormatValue, true);
CXFA_Node* pBind = GetDatasets();
if (!pBind) {
image.SetTransferEncoding(XFA_ATTRIBUTEENUM_Base64);
@@ -369,7 +369,7 @@ int32_t CXFA_WidgetAcc::ProcessCalculate() {
void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
int32_t iRet,
CFXJSE_Value* pRetValue,
- FX_BOOL bVersionFlag) {
+ bool bVersionFlag) {
if (iRet == XFA_EVENTERROR_Success && pRetValue) {
if (pRetValue->IsBoolean() && !pRetValue->ToBoolean()) {
IXFA_AppProvider* pAppProvider = GetAppProvider();
@@ -385,7 +385,7 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
if (GetNode()->IsUserInteractive())
return;
if (wsScriptMsg.IsEmpty())
- GetValidateMessage(pAppProvider, wsScriptMsg, FALSE, bVersionFlag);
+ GetValidateMessage(pAppProvider, wsScriptMsg, false, bVersionFlag);
if (bVersionFlag) {
pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning,
@@ -398,7 +398,7 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
}
} else {
if (wsScriptMsg.IsEmpty()) {
- GetValidateMessage(pAppProvider, wsScriptMsg, TRUE, bVersionFlag);
+ GetValidateMessage(pAppProvider, wsScriptMsg, true, bVersionFlag);
}
pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK);
}
@@ -406,7 +406,7 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
}
}
int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
- FX_BOOL bVersionFlag) {
+ bool bVersionFlag) {
CFX_WideString wsRawValue = GetRawValue();
if (!wsRawValue.IsEmpty()) {
CFX_WideString wsPicture;
@@ -431,7 +431,7 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
int32_t eFormatTest = validate.GetFormatTest();
if (eFormatTest == XFA_ATTRIBUTEENUM_Error) {
if (wsFormatMsg.IsEmpty()) {
- GetValidateMessage(pAppProvider, wsFormatMsg, TRUE, bVersionFlag);
+ GetValidateMessage(pAppProvider, wsFormatMsg, true, bVersionFlag);
}
pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK);
return XFA_EVENTERROR_Success;
@@ -439,7 +439,7 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
if (GetNode()->IsUserInteractive())
return XFA_EVENTERROR_NotExist;
if (wsFormatMsg.IsEmpty())
- GetValidateMessage(pAppProvider, wsFormatMsg, FALSE, bVersionFlag);
+ GetValidateMessage(pAppProvider, wsFormatMsg, false, bVersionFlag);
if (bVersionFlag) {
pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning,
@@ -457,7 +457,7 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate,
}
int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
int32_t iFlags,
- FX_BOOL bVersionFlag) {
+ bool bVersionFlag) {
CFX_WideString wsValue;
GetValue(wsValue, XFA_VALUEPICTURE_Raw);
if (!wsValue.IsEmpty()) {
@@ -507,7 +507,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
}
case XFA_ATTRIBUTEENUM_Warning: {
if (GetNode()->IsUserInteractive())
- return TRUE;
+ return true;
if (wsNullMsg.IsEmpty()) {
GetValidateCaptionName(wsCaptionName, bVersionFlag);
@@ -529,7 +529,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
return XFA_EVENTERROR_Success;
}
void CXFA_WidgetAcc::GetValidateCaptionName(CFX_WideString& wsCaptionName,
- FX_BOOL bVersionFlag) {
+ bool bVersionFlag) {
if (!bVersionFlag) {
CXFA_Caption caption = GetCaption();
if (caption) {
@@ -548,8 +548,8 @@ void CXFA_WidgetAcc::GetValidateCaptionName(CFX_WideString& wsCaptionName,
}
void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider,
CFX_WideString& wsMessage,
- FX_BOOL bError,
- FX_BOOL bVersionFlag) {
+ bool bError,
+ bool bVersionFlag) {
CFX_WideString wsCaptionName;
GetValidateCaptionName(wsCaptionName, bVersionFlag);
CFX_WideString wsError;
@@ -576,9 +576,8 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
if (!validate) {
return XFA_EVENTERROR_NotExist;
}
- FX_BOOL bInitDoc = validate.GetNode()->NeedsInitApp();
- FX_BOOL bStatus =
- m_pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End;
+ bool bInitDoc = validate.GetNode()->NeedsInitApp();
+ bool bStatus = m_pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End;
int32_t iFormat = 0;
CFXJSE_Value* pRetValue = nullptr;
int32_t iRet = XFA_EVENTERROR_NotExist;
@@ -593,9 +592,9 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
: &pRetValue);
}
XFA_VERSION version = GetDoc()->GetXFADoc()->GetCurVersionMode();
- FX_BOOL bVersionFlag = FALSE;
+ bool bVersionFlag = false;
if (version < XFA_VERSION_208) {
- bVersionFlag = TRUE;
+ bVersionFlag = true;
}
if (bInitDoc) {
validate.GetNode()->ClearFlag(XFA_NodeFlag_NeedsInitApp);
@@ -647,9 +646,9 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
std::unique_ptr<CFXJSE_Value> pTmpRetValue(
new CFXJSE_Value(pContext->GetRuntime()));
++m_nRecursionDepth;
- FX_BOOL bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
- wsExpression.AsStringC(),
- pTmpRetValue.get(), m_pNode);
+ bool bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
+ wsExpression.AsStringC(), pTmpRetValue.get(),
+ m_pNode);
--m_nRecursionDepth;
int32_t iRet = XFA_EVENTERROR_Error;
if (bRet) {
@@ -772,7 +771,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) {
}
}
}
-FX_BOOL CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF& size) {
CFX_SizeF szCap;
CalcCaptionSize(szCap);
CFX_RectF rtUIMargin;
@@ -799,7 +798,7 @@ FX_BOOL CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF& size) {
}
return CalculateWidgetAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
CXFA_Margin mgWidget = GetMargin();
if (mgWidget) {
FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
@@ -837,7 +836,7 @@ FX_BOOL CXFA_WidgetAcc::CalculateWidgetAutoSize(CFX_SizeF& size) {
size.y = std::min(size.y, fMax);
}
}
- return TRUE;
+ return true;
}
void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) {
FX_FLOAT fFontSize = GetFontSize();
@@ -871,12 +870,12 @@ void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) {
layoutData->m_pTextOut->CalcLogicSize(wsText.c_str(), wsText.GetLength(),
size);
}
-FX_BOOL CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
if (size.x > 0) {
CFX_SizeF szOrz = size;
CFX_SizeF szCap;
CalcCaptionSize(szCap);
- FX_BOOL bCapExit = szCap.x > 0.01 && szCap.y > 0.01;
+ bool bCapExit = szCap.x > 0.01 && szCap.y > 0.01;
int32_t iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
if (bCapExit) {
iCapPlacement = GetCaption().GetPlacementType();
@@ -923,16 +922,16 @@ FX_BOOL CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
CalculateTextContentSize(size);
return CalculateFieldAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::CalculateCheckButtonAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateCheckButtonAutoSize(CFX_SizeF& size) {
FX_FLOAT fCheckSize = GetCheckButtonSize();
size.x = size.y = fCheckSize;
return CalculateFieldAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::CalculatePushButtonAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculatePushButtonAutoSize(CFX_SizeF& size) {
CalcCaptionSize(size);
return CalculateWidgetAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) {
if (!GetImageImage()) {
LoadImageImage();
}
@@ -963,7 +962,7 @@ FX_BOOL CXFA_WidgetAcc::CalculateImageAutoSize(CFX_SizeF& size) {
}
return CalculateWidgetAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF& size) {
if (!GetImageEditImage()) {
LoadImageEditImage();
}
@@ -994,12 +993,12 @@ FX_BOOL CXFA_WidgetAcc::CalculateImageEditAutoSize(CFX_SizeF& size) {
}
return CalculateFieldAutoSize(size);
}
-FX_BOOL CXFA_WidgetAcc::LoadImageImage() {
+bool CXFA_WidgetAcc::LoadImageImage() {
InitLayoutData();
return static_cast<CXFA_ImageLayoutData*>(m_pLayoutData.get())
->LoadImageData(this);
}
-FX_BOOL CXFA_WidgetAcc::LoadImageEditImage() {
+bool CXFA_WidgetAcc::LoadImageEditImage() {
InitLayoutData();
return static_cast<CXFA_ImageEditData*>(m_pLayoutData.get())
->LoadImageData(this);
@@ -1016,7 +1015,7 @@ void CXFA_WidgetAcc::GetImageEditDpi(int32_t& iImageXDpi, int32_t& iImageYDpi) {
iImageXDpi = pData->m_iImageXDpi;
iImageYDpi = pData->m_iImageYDpi;
}
-FX_BOOL CXFA_WidgetAcc::CalculateTextAutoSize(CFX_SizeF& size) {
+bool CXFA_WidgetAcc::CalculateTextAutoSize(CFX_SizeF& size) {
LoadText();
CXFA_TextLayout* pTextLayout =
static_cast<CXFA_TextLayoutData*>(m_pLayoutData.get())->GetTextLayout();
@@ -1156,17 +1155,16 @@ void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_Element eUIType,
m_pLayoutData->m_fWidgetHeight = sz.y;
fCalcHeight = sz.y;
}
-FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
- FX_FLOAT& fCalcHeight) {
+bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) {
XFA_Element eUIType = GetUIType();
if (eUIType == XFA_Element::Subform) {
- return FALSE;
+ return false;
}
if (eUIType != XFA_Element::Text && eUIType != XFA_Element::TextEdit &&
eUIType != XFA_Element::NumericEdit &&
eUIType != XFA_Element::PasswordEdit) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
FX_FLOAT fTopInset = 0;
FX_FLOAT fBottomInset = 0;
@@ -1198,10 +1196,10 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
fCalcHeight = fCalcHeight + fTopInset;
}
if (fabs(fHeight - fCalcHeight) < XFA_FLOAT_PERCISION) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
XFA_ATTRIBUTEENUM iCapPlacement = XFA_ATTRIBUTEENUM_Unknown;
FX_FLOAT fCapReserve = 0;
@@ -1214,12 +1212,12 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
if (iCapPlacement == XFA_ATTRIBUTEENUM_Top &&
fCalcHeight < fCapReserve + fTopInset) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
if (iCapPlacement == XFA_ATTRIBUTEENUM_Bottom &&
m_pLayoutData->m_fWidgetHeight - fCapReserve - fBottomInset) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
if (iCapPlacement != XFA_ATTRIBUTEENUM_Top) {
fCapReserve = 0;
@@ -1251,7 +1249,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
fHeight -= pFieldArray->GetAt(i + 2);
}
if (iLinesCount == 0) {
- return FALSE;
+ return false;
}
FX_FLOAT fLineHeight = GetLineHeight();
FX_FLOAT fFontSize = GetFontSize();
@@ -1293,33 +1291,33 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
pFieldArray->Add(fStartOffset);
}
XFA_VERSION version = GetDoc()->GetXFADoc()->GetCurVersionMode();
- FX_BOOL bCanSplitNoContent = FALSE;
+ bool bCanSplitNoContent = false;
XFA_ATTRIBUTEENUM eLayoutMode;
GetNode()
->GetNodeItem(XFA_NODEITEM_Parent)
- ->TryEnum(XFA_ATTRIBUTE_Layout, eLayoutMode, TRUE);
+ ->TryEnum(XFA_ATTRIBUTE_Layout, eLayoutMode, true);
if ((eLayoutMode == XFA_ATTRIBUTEENUM_Position ||
eLayoutMode == XFA_ATTRIBUTEENUM_Tb ||
eLayoutMode == XFA_ATTRIBUTEENUM_Row ||
eLayoutMode == XFA_ATTRIBUTEENUM_Table) &&
version > XFA_VERSION_208) {
- bCanSplitNoContent = TRUE;
+ bCanSplitNoContent = true;
}
if ((eLayoutMode == XFA_ATTRIBUTEENUM_Tb ||
eLayoutMode == XFA_ATTRIBUTEENUM_Row ||
eLayoutMode == XFA_ATTRIBUTEENUM_Table) &&
version <= XFA_VERSION_208) {
if (fStartOffset < fCalcHeight) {
- bCanSplitNoContent = TRUE;
+ bCanSplitNoContent = true;
} else {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
}
if (bCanSplitNoContent) {
if ((fCalcHeight - fTopInset - fSpaceAbove < fLineHeight)) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
if (fStartOffset + XFA_FLOAT_PERCISION >= fCalcHeight) {
if (iFieldSplitCount / 3 == (iBlockIndex + 1)) {
@@ -1329,7 +1327,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
pFieldArray->Add(0);
pFieldArray->Add(fCalcHeight);
}
- return FALSE;
+ return false;
}
if (fCalcHeight - fStartOffset < fLineHeight) {
fCalcHeight = fStartOffset;
@@ -1340,7 +1338,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
pFieldArray->Add(0);
pFieldArray->Add(fCalcHeight);
}
- return TRUE;
+ return true;
}
FX_FLOAT fTextNum =
fCalcHeight + XFA_FLOAT_PERCISION - fCapReserve - fStartOffset;
@@ -1355,13 +1353,13 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
pFieldArray->Add((FX_FLOAT)iLinesCount);
pFieldArray->Add(fCalcHeight);
}
- return FALSE;
+ return false;
}
if (fHeight - fStartOffset - fTextHeight < fFontSize) {
iLineNum -= 1;
if (iLineNum == 0) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
} else {
iLineNum = (int32_t)(fTextNum / fLineHeight);
@@ -1378,14 +1376,14 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex,
pFieldArray->Add(fSplitHeight);
}
if (fabs(fSplitHeight - fCalcHeight) < XFA_FLOAT_PERCISION) {
- return FALSE;
+ return false;
}
fCalcHeight = fSplitHeight;
- return TRUE;
+ return true;
}
}
fCalcHeight = 0;
- return TRUE;
+ return true;
}
void CXFA_WidgetAcc::InitLayoutData() {
if (m_pLayoutData) {
@@ -1434,7 +1432,7 @@ void CXFA_WidgetAcc::StartTextLayout(FX_FLOAT& fCalcWidth,
}
if (fCalcWidth < 0 && fCalcHeight < 0) {
FX_FLOAT fMaxWidth = -1;
- FX_BOOL bRet = GetWidth(fMaxWidth);
+ bool bRet = GetWidth(fMaxWidth);
if (bRet) {
FX_FLOAT fWidth = GetWidthWithoutMargin(fMaxWidth);
pTextLayout->StartLayout(fWidth);
@@ -1456,7 +1454,7 @@ void CXFA_WidgetAcc::StartTextLayout(FX_FLOAT& fCalcWidth,
pTextLayout->DoLayout(0, fTextHeight, -1, fTextHeight);
fCalcHeight = m_pLayoutData->m_fWidgetHeight;
}
-FX_BOOL CXFA_WidgetAcc::LoadCaption() {
+bool CXFA_WidgetAcc::LoadCaption() {
InitLayoutData();
return static_cast<CXFA_FieldLayoutData*>(m_pLayoutData.get())
->LoadCaption(this);
@@ -1553,15 +1551,15 @@ FX_ARGB CXFA_WidgetAcc::GetTextColor() {
}
return 0xFF000000;
}
-CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
- bRichText = FALSE;
+CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
+ bRichText = false;
if (m_pTextNode) {
if (m_pTextNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
- FALSE);
+ false);
if (wsContentType == FX_WSTRC(L"text/html")) {
- bRichText = TRUE;
+ bRichText = true;
}
}
return m_pTextNode;
@@ -1575,9 +1573,9 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
- pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
+ pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == FX_WSTRC(L"text/html")) {
- bRichText = TRUE;
+ bRichText = true;
}
}
return pChildNode;
@@ -1592,7 +1590,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
if (pXMLChild->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLChild);
if (XFA_RecognizeRichText(pElement)) {
- bRichText = TRUE;
+ bRichText = true;
}
}
}
@@ -1610,9 +1608,9 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
- pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
+ pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == FX_WSTRC(L"text/html")) {
- bRichText = TRUE;
+ bRichText = true;
}
}
return pChildNode;
@@ -1655,20 +1653,20 @@ CXFA_Font CXFA_TextProvider::GetFontNode() {
}
return m_pWidgetAcc->GetFont();
}
-FX_BOOL CXFA_TextProvider::IsCheckButtonAndAutoWidth() {
+bool CXFA_TextProvider::IsCheckButtonAndAutoWidth() {
XFA_Element eType = m_pWidgetAcc->GetUIType();
if (eType == XFA_Element::CheckButton) {
FX_FLOAT fWidth = 0;
return !m_pWidgetAcc->GetWidth(fWidth);
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_TextProvider::GetEmbbedObj(FX_BOOL bURI,
- FX_BOOL bRaw,
- const CFX_WideString& wsAttr,
- CFX_WideString& wsValue) {
+bool CXFA_TextProvider::GetEmbbedObj(bool bURI,
+ bool bRaw,
+ const CFX_WideString& wsAttr,
+ CFX_WideString& wsValue) {
if (m_eType != XFA_TEXTPROVIDERTYPE_Text) {
- return FALSE;
+ return false;
}
if (bURI) {
CXFA_Node* pWidgetNode = m_pWidgetAcc->GetNode();
@@ -1689,8 +1687,8 @@ FX_BOOL CXFA_TextProvider::GetEmbbedObj(FX_BOOL bURI,
}
if (pEmbAcc) {
pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.h b/xfa/fxfa/app/xfa_ffwidgetacc.h
index 9261d41ee7..092254b2d8 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.h
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.h
@@ -27,15 +27,15 @@ class CXFA_TextProvider {
}
~CXFA_TextProvider() {}
- CXFA_Node* GetTextNode(FX_BOOL& bRichText);
+ CXFA_Node* GetTextNode(bool& bRichText);
CXFA_Para GetParaNode();
CXFA_Font GetFontNode();
- FX_BOOL IsCheckButtonAndAutoWidth();
+ bool IsCheckButtonAndAutoWidth();
CXFA_FFDoc* GetDocNode() { return m_pWidgetAcc->GetDoc(); }
- FX_BOOL GetEmbbedObj(FX_BOOL bURI,
- FX_BOOL bRaw,
- const CFX_WideString& wsAttr,
- CFX_WideString& wsValue);
+ bool GetEmbbedObj(bool bURI,
+ bool bRaw,
+ const CFX_WideString& wsAttr,
+ CFX_WideString& wsValue);
protected:
CXFA_WidgetAcc* m_pWidgetAcc;
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 854b1ac384..551d8f6595 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -22,29 +22,29 @@ CXFA_FFWidgetHandler::CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView)
CXFA_FFWidgetHandler::~CXFA_FFWidgetHandler() {}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseEnter(CXFA_FFWidget* hWidget) {
+bool CXFA_FFWidgetHandler::OnMouseEnter(CXFA_FFWidget* hWidget) {
m_pDocView->LockUpdate();
- FX_BOOL bRet = hWidget->OnMouseEnter();
+ bool bRet = hWidget->OnMouseEnter();
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseExit(CXFA_FFWidget* hWidget) {
+bool CXFA_FFWidgetHandler::OnMouseExit(CXFA_FFWidget* hWidget) {
m_pDocView->LockUpdate();
- FX_BOOL bRet = hWidget->OnMouseExit();
+ bool bRet = hWidget->OnMouseExit();
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnLButtonDown(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
m_pDocView->LockUpdate();
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnLButtonDown(dwFlags, fx, fy);
+ bool bRet = hWidget->OnLButtonDown(dwFlags, fx, fy);
if (bRet && m_pDocView->SetFocus(hWidget)) {
m_pDocView->GetDoc()->GetDocEnvironment()->SetFocusWidget(
m_pDocView->GetDoc(), hWidget);
@@ -54,56 +54,56 @@ FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(CXFA_FFWidget* hWidget,
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnLButtonUp(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
m_pDocView->LockUpdate();
hWidget->Rotate2Normal(fx, fy);
- m_pDocView->m_bLayoutEvent = TRUE;
- FX_BOOL bRet = hWidget->OnLButtonUp(dwFlags, fx, fy);
+ m_pDocView->m_bLayoutEvent = true;
+ bool bRet = hWidget->OnLButtonUp(dwFlags, fx, fy);
m_pDocView->UnlockUpdate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnLButtonDblClk(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnLButtonDblClk(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnLButtonDblClk(dwFlags, fx, fy);
+ bool bRet = hWidget->OnLButtonDblClk(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseMove(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnMouseMove(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnMouseMove(dwFlags, fx, fy);
+ bool bRet = hWidget->OnMouseMove(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnMouseWheel(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnMouseWheel(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnMouseWheel(dwFlags, zDelta, fx, fy);
+ bool bRet = hWidget->OnMouseWheel(dwFlags, zDelta, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnRButtonDown(dwFlags, fx, fy);
+ bool bRet = hWidget->OnRButtonDown(dwFlags, fx, fy);
if (bRet && m_pDocView->SetFocus(hWidget)) {
m_pDocView->GetDoc()->GetDocEnvironment()->SetFocusWidget(
m_pDocView->GetDoc(), hWidget);
@@ -112,47 +112,47 @@ FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget,
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnRButtonUp(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnRButtonUp(dwFlags, fx, fy);
+ bool bRet = hWidget->OnRButtonUp(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnRButtonDblClk(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnRButtonDblClk(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
- FX_BOOL bRet = hWidget->OnRButtonDblClk(dwFlags, fx, fy);
+ bool bRet = hWidget->OnRButtonDblClk(dwFlags, fx, fy);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnKeyDown(CXFA_FFWidget* hWidget,
- uint32_t dwKeyCode,
- uint32_t dwFlags) {
- FX_BOOL bRet = hWidget->OnKeyDown(dwKeyCode, dwFlags);
+bool CXFA_FFWidgetHandler::OnKeyDown(CXFA_FFWidget* hWidget,
+ uint32_t dwKeyCode,
+ uint32_t dwFlags) {
+ bool bRet = hWidget->OnKeyDown(dwKeyCode, dwFlags);
m_pDocView->RunInvalidate();
m_pDocView->UpdateDocView();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnKeyUp(CXFA_FFWidget* hWidget,
- uint32_t dwKeyCode,
- uint32_t dwFlags) {
- FX_BOOL bRet = hWidget->OnKeyUp(dwKeyCode, dwFlags);
+bool CXFA_FFWidgetHandler::OnKeyUp(CXFA_FFWidget* hWidget,
+ uint32_t dwKeyCode,
+ uint32_t dwFlags) {
+ bool bRet = hWidget->OnKeyUp(dwKeyCode, dwFlags);
m_pDocView->RunInvalidate();
return bRet;
}
-FX_BOOL CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget,
- uint32_t dwChar,
- uint32_t dwFlags) {
- FX_BOOL bRet = hWidget->OnChar(dwChar, dwFlags);
+bool CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget,
+ uint32_t dwChar,
+ uint32_t dwFlags) {
+ bool bRet = hWidget->OnChar(dwChar, dwFlags);
m_pDocView->RunInvalidate();
return bRet;
}
@@ -167,9 +167,9 @@ FWL_WidgetHit CXFA_FFWidgetHandler::OnHitTest(CXFA_FFWidget* hWidget,
return hWidget->OnHitTest(fx, fy);
}
-FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(CXFA_FFWidget* hWidget,
- FX_FLOAT fx,
- FX_FLOAT fy) {
+bool CXFA_FFWidgetHandler::OnSetCursor(CXFA_FFWidget* hWidget,
+ FX_FLOAT fx,
+ FX_FLOAT fy) {
hWidget->Rotate2Normal(fx, fy);
return hWidget->OnSetCursor(fx, fy);
}
@@ -177,34 +177,34 @@ FX_BOOL CXFA_FFWidgetHandler::OnSetCursor(CXFA_FFWidget* hWidget,
void CXFA_FFWidgetHandler::RenderWidget(CXFA_FFWidget* hWidget,
CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
- FX_BOOL bHighlight) {
+ bool bHighlight) {
hWidget->RenderWidget(pGS, pMatrix,
bHighlight ? XFA_WidgetStatus_Highlight : 0);
}
-FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
- XFA_EVENTTYPE eEventType) {
+bool CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
+ XFA_EVENTTYPE eEventType) {
if (!pWidgetAcc || eEventType == XFA_EVENT_Unknown)
- return FALSE;
+ return false;
if (pWidgetAcc->GetElementType() == XFA_Element::Draw)
- return FALSE;
+ return false;
switch (eEventType) {
case XFA_EVENT_Calculate: {
CXFA_Calculate calc = pWidgetAcc->GetCalculate();
if (!calc)
- return FALSE;
+ return false;
if (calc.GetScript())
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
case XFA_EVENT_Validate: {
CXFA_Validate val = pWidgetAcc->GetValidate();
if (!val)
- return FALSE;
+ return false;
if (val.GetScript())
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
default:
break;
@@ -324,22 +324,22 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField);
CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption);
CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue);
- pText->SetContent(L"Button", L"Button", FALSE);
+ pText->SetContent(L"Button", L"Button", false);
CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption);
- pPara->SetEnum(XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTEENUM_Middle, FALSE);
- pPara->SetEnum(XFA_ATTRIBUTE_HAlign, XFA_ATTRIBUTEENUM_Center, FALSE);
+ pPara->SetEnum(XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTEENUM_Middle, false);
+ pPara->SetEnum(XFA_ATTRIBUTE_HAlign, XFA_ATTRIBUTEENUM_Center, false);
CreateFontNode(pCaption);
CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField);
- pBorder->SetEnum(XFA_ATTRIBUTE_Hand, XFA_ATTRIBUTEENUM_Right, FALSE);
+ pBorder->SetEnum(XFA_ATTRIBUTE_Hand, XFA_ATTRIBUTEENUM_Right, false);
CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder);
- pEdge->SetEnum(XFA_ATTRIBUTE_Stroke, XFA_ATTRIBUTEENUM_Raised, FALSE);
+ pEdge->SetEnum(XFA_ATTRIBUTE_Stroke, XFA_ATTRIBUTEENUM_Raised, false);
CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder);
CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill);
- pColor->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", FALSE);
+ pColor->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", false);
CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField);
pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None);
@@ -419,7 +419,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePasswordEdit(CXFA_Node* pParent,
CXFA_Node* pBefore) const {
CXFA_Node* pField = CreateField(XFA_Element::PasswordEdit, pParent, pBefore);
CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField);
- pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None, FALSE);
+ pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None, false);
return pField;
}
@@ -481,7 +481,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_Element eElement,
CXFA_Node* pParent,
CXFA_Node* pBefore) const {
CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : nullptr;
- CXFA_Node* pNewFormItem = pTemplateParent->CloneTemplateToForm(FALSE);
+ CXFA_Node* pNewFormItem = pTemplateParent->CloneTemplateToForm(false);
if (pParent)
pParent->InsertChild(pNewFormItem, pBefore);
return pNewFormItem;
@@ -494,7 +494,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_Element eElement,
CXFA_Node* pNewNode =
CreateTemplateNode(eElement, pTemplateParent,
pBefore ? pBefore->GetTemplateNode() : nullptr)
- ->Clone(FALSE);
+ ->Clone(false);
if (pParent)
pParent->InsertChild(pNewNode, pBefore);
return pNewNode;
@@ -513,7 +513,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_Element eElement,
CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent);
- pFont->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", FALSE);
+ pFont->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", false);
return pFont;
}
@@ -523,16 +523,16 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent,
CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent);
if (dwFlags & 0x01)
pMargin->SetMeasure(XFA_ATTRIBUTE_LeftInset,
- CXFA_Measurement(fInsets[0], XFA_UNIT_Pt), FALSE);
+ CXFA_Measurement(fInsets[0], XFA_UNIT_Pt), false);
if (dwFlags & 0x02)
pMargin->SetMeasure(XFA_ATTRIBUTE_TopInset,
- CXFA_Measurement(fInsets[1], XFA_UNIT_Pt), FALSE);
+ CXFA_Measurement(fInsets[1], XFA_UNIT_Pt), false);
if (dwFlags & 0x04)
pMargin->SetMeasure(XFA_ATTRIBUTE_RightInset,
- CXFA_Measurement(fInsets[2], XFA_UNIT_Pt), FALSE);
+ CXFA_Measurement(fInsets[2], XFA_UNIT_Pt), false);
if (dwFlags & 0x08)
pMargin->SetMeasure(XFA_ATTRIBUTE_BottomInset,
- CXFA_Measurement(fInsets[3], XFA_UNIT_Pt), FALSE);
+ CXFA_Measurement(fInsets[3], XFA_UNIT_Pt), false);
return pMargin;
}
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 6e54c41408..589dcd42f2 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -2017,7 +2017,7 @@ CFGAS_GEFont* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
CFGAS_GEFont* pFont = nullptr;
if (pMgr) {
pFont =
- pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont, TRUE);
+ pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont, true);
if (pFont)
return pFont;
}
@@ -2027,7 +2027,7 @@ CFGAS_GEFont* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
if (!pFont && pMgr) {
pPDFFont = nullptr;
pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont,
- FALSE);
+ false);
if (pFont)
return pFont;
}
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 693dfaebf4..d827ad101f 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -27,11 +27,11 @@ FWL_Error CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
return FWL_Error::Succeeded;
}
-FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
+bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
+ FX_FLOAT fMinHeight,
+ FX_FLOAT fMaxHeight,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup) {
CXFA_FFWidget* pFFWidget =
static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
CFX_Matrix mt;
@@ -40,5 +40,5 @@ FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
mt.TransformRect(rtRotateAnchor);
pFFWidget->GetDoc()->GetDocEnvironment()->GetPopupPos(
pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/app/xfa_fwladapter.h b/xfa/fxfa/app/xfa_fwladapter.h
index 0fbf0d9ee7..cb10399ae7 100644
--- a/xfa/fxfa/app/xfa_fwladapter.h
+++ b/xfa/fxfa/app/xfa_fwladapter.h
@@ -19,11 +19,11 @@ class CXFA_FWLAdapterWidgetMgr {
~CXFA_FWLAdapterWidgetMgr();
FWL_Error RepaintWidget(IFWL_Widget* pWidget, const CFX_RectF* pRect);
- FX_BOOL GetPopupPos(IFWL_Widget* pWidget,
- FX_FLOAT fMinHeight,
- FX_FLOAT fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup);
+ bool GetPopupPos(IFWL_Widget* pWidget,
+ FX_FLOAT fMinHeight,
+ FX_FLOAT fMaxHeight,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup);
};
#endif // XFA_FXFA_APP_XFA_FWLADAPTER_H_
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 8a4aadb753..291cc5133a 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -23,7 +23,7 @@
#include "xfa/fxfa/xfa_fontmgr.h"
CXFA_CSSTagProvider::CXFA_CSSTagProvider()
- : m_bTagAvailable(FALSE), m_bContent(FALSE) {}
+ : m_bTagAvailable(false), m_bContent(false) {}
CXFA_CSSTagProvider::~CXFA_CSSTagProvider() {}
@@ -112,7 +112,7 @@ void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) {
}
CXFA_LoaderContext::CXFA_LoaderContext()
- : m_bSaveLineHeight(FALSE),
+ : m_bSaveLineHeight(false),
m_fWidth(0),
m_fHeight(0),
m_fLastPos(0),
@@ -341,8 +341,8 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
tagProvider.SetAttribute(L"style", wsValue);
}
} else if (pXMLNode->GetType() == FDE_XMLNODE_Text) {
- tagProvider.m_bTagAvailable = TRUE;
- tagProvider.m_bContent = TRUE;
+ tagProvider.m_bTagAvailable = true;
+ tagProvider.m_bContent = true;
}
}
@@ -365,13 +365,13 @@ int32_t CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle* pStyle) const {
return 0;
}
-FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const {
+bool CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const {
CFX_WideString wsValue;
if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-spacerun"), wsValue)) {
wsValue.MakeLower();
return wsValue == FX_WSTRC(L"yes");
}
- return FALSE;
+ return false;
}
CFGAS_GEFont* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle) const {
@@ -520,7 +520,7 @@ FX_FLOAT CXFA_TextParser::GetBaseline(CXFA_TextProvider* pTextProvider,
}
FX_FLOAT CXFA_TextParser::GetLineHeight(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle,
- FX_BOOL bFirst,
+ bool bFirst,
FX_FLOAT fVerScale) const {
FX_FLOAT fLineHeight = 0;
if (pStyle) {
@@ -541,20 +541,20 @@ FX_FLOAT CXFA_TextParser::GetLineHeight(CXFA_TextProvider* pTextProvider,
fLineHeight *= fVerScale;
return fLineHeight;
}
-FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
- CFDE_XMLNode* pXMLNode,
- CFX_WideString& wsValue) {
+bool CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
+ CFDE_XMLNode* pXMLNode,
+ CFX_WideString& wsValue) {
wsValue.clear();
if (!pXMLNode) {
- return FALSE;
+ return false;
}
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
CFX_WideString wsAttr;
pElement->GetString(L"xfa:embed", wsAttr);
if (wsAttr.IsEmpty()) {
- return FALSE;
+ return false;
}
if (wsAttr.GetAt(0) == L'#') {
wsAttr.Delete(0);
@@ -566,9 +566,9 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
} else {
ws.MakeLower();
}
- FX_BOOL bURI = (ws == FX_WSTRC(L"uri"));
+ bool bURI = (ws == FX_WSTRC(L"uri"));
if (!bURI && ws != FX_WSTRC(L"som")) {
- return FALSE;
+ return false;
}
ws.clear();
pElement->GetString(L"xfa:embedMode", ws);
@@ -577,9 +577,9 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
} else {
ws.MakeLower();
}
- FX_BOOL bRaw = (ws == FX_WSTRC(L"raw"));
+ bool bRaw = (ws == FX_WSTRC(L"raw"));
if (!bRaw && ws != FX_WSTRC(L"formatted")) {
- return FALSE;
+ return false;
}
bRet = pTextProvider->GetEmbbedObj(bURI, bRaw, wsAttr, wsValue);
}
@@ -599,16 +599,15 @@ enum XFA_TABSTOPSSTATUS {
XFA_TABSTOPSSTATUS_Leader,
XFA_TABSTOPSSTATUS_Location,
};
-FX_BOOL CXFA_TextParser::GetTabstops(
- IFDE_CSSComputedStyle* pStyle,
- CXFA_TextTabstopsContext* pTabstopContext) {
+bool CXFA_TextParser::GetTabstops(IFDE_CSSComputedStyle* pStyle,
+ CXFA_TextTabstopsContext* pTabstopContext) {
if (!pStyle || !pTabstopContext) {
- return FALSE;
+ return false;
}
CFX_WideString wsValue;
if (!pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-stops"), wsValue) &&
!pStyle->GetCustomStyle(FX_WSTRC(L"tab-stops"), wsValue)) {
- return FALSE;
+ return false;
}
int32_t iLength = wsValue.GetLength();
const FX_WCHAR* pTabStops = wsValue.c_str();
@@ -686,17 +685,17 @@ FX_BOOL CXFA_TextParser::GetTabstops(
FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
pTabstopContext->Append(dwHashCode, fPos);
}
- return TRUE;
+ return true;
}
CXFA_TextLayout::CXFA_TextLayout(CXFA_TextProvider* pTextProvider)
- : m_bHasBlock(FALSE),
+ : m_bHasBlock(false),
m_pTextProvider(pTextProvider),
m_pTextDataNode(nullptr),
- m_bRichText(FALSE),
+ m_bRichText(false),
m_iLines(0),
m_fMaxWidth(0),
- m_bBlockContinue(TRUE) {
+ m_bBlockContinue(true) {
ASSERT(m_pTextProvider);
}
@@ -763,7 +762,7 @@ CFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
}
return pXMLContainer;
}
-CFX_RTFBreak* CXFA_TextLayout::CreateBreak(FX_BOOL bDefault) {
+CFX_RTFBreak* CXFA_TextLayout::CreateBreak(bool bDefault) {
uint32_t dwStyle = FX_RTFLAYOUTSTYLE_ExpandTab;
if (!bDefault) {
dwStyle |= FX_RTFLAYOUTSTYLE_Pagination;
@@ -929,10 +928,10 @@ FX_FLOAT CXFA_TextLayout::GetLayoutHeight() {
if (iCount == 0 && m_pLoader->m_fWidth > 0) {
CFX_SizeF szMax(m_pLoader->m_fWidth, m_pLoader->m_fHeight);
CFX_SizeF szDef;
- m_pLoader->m_bSaveLineHeight = TRUE;
+ m_pLoader->m_bSaveLineHeight = true;
m_pLoader->m_fLastPos = 0;
CalcSize(szMax, szMax, szDef);
- m_pLoader->m_bSaveLineHeight = FALSE;
+ m_pLoader->m_bSaveLineHeight = false;
return szDef.y;
}
FX_FLOAT fHeight = m_pLoader->m_fHeight;
@@ -959,20 +958,20 @@ FX_FLOAT CXFA_TextLayout::StartLayout(FX_FLOAT fWidth) {
if (fWidth < 0) {
CFX_SizeF szMax;
CFX_SizeF szDef;
- m_pLoader->m_bSaveLineHeight = TRUE;
+ m_pLoader->m_bSaveLineHeight = true;
m_pLoader->m_fLastPos = 0;
CalcSize(szMax, szMax, szDef);
- m_pLoader->m_bSaveLineHeight = FALSE;
+ m_pLoader->m_bSaveLineHeight = false;
fWidth = szDef.x;
}
return fWidth;
}
-FX_BOOL CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
- FX_FLOAT& fCalcHeight,
- FX_FLOAT fContentAreaHeight,
- FX_FLOAT fTextHeight) {
+bool CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
+ FX_FLOAT& fCalcHeight,
+ FX_FLOAT fContentAreaHeight,
+ FX_FLOAT fTextHeight) {
if (!m_pLoader) {
- return FALSE;
+ return false;
}
int32_t iBlockCount = m_Blocks.GetSize();
FX_FLOAT fHeight = fTextHeight;
@@ -981,9 +980,9 @@ FX_BOOL CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
}
m_pLoader->m_fHeight = fHeight;
if (fContentAreaHeight < 0) {
- return FALSE;
+ return false;
}
- m_bHasBlock = TRUE;
+ m_bHasBlock = true;
if (iBlockCount == 0 && fHeight > 0) {
fHeight = fTextHeight - GetLayoutHeight();
if (fHeight > 0) {
@@ -1017,7 +1016,7 @@ FX_BOOL CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
FX_FLOAT fLineHeight = m_pLoader->m_lineHeights.ElementAt(i);
if ((i == iLineIndex) && (fLineHeight - fContentAreaHeight > 0.001)) {
fCalcHeight = 0;
- return TRUE;
+ return true;
}
if (fLinePos + fLineHeight - fContentAreaHeight > 0.001) {
if (iBlockCount >= (iBlockIndex + 1) * 2) {
@@ -1038,65 +1037,65 @@ FX_BOOL CXFA_TextLayout::DoLayout(int32_t iBlockIndex,
m_pLoader->m_BlocksHeight.Add(fCalcHeight);
}
}
- return TRUE;
+ return true;
}
fCalcHeight = fLinePos;
- return TRUE;
+ return true;
}
fLinePos += fLineHeight;
}
- return FALSE;
+ return false;
}
int32_t CXFA_TextLayout::CountBlocks() const {
int32_t iCount = m_Blocks.GetSize() / 2;
return iCount > 0 ? iCount : 1;
}
-FX_BOOL CXFA_TextLayout::CalcSize(const CFX_SizeF& minSize,
- const CFX_SizeF& maxSize,
- CFX_SizeF& defaultSize) {
+bool CXFA_TextLayout::CalcSize(const CFX_SizeF& minSize,
+ const CFX_SizeF& maxSize,
+ CFX_SizeF& defaultSize) {
defaultSize.x = maxSize.x;
if (defaultSize.x < 1)
defaultSize.x = 0xFFFF;
- m_pBreak.reset(CreateBreak(FALSE));
+ m_pBreak.reset(CreateBreak(false));
FX_FLOAT fLinePos = 0;
m_iLines = 0;
m_fMaxWidth = 0;
- Loader(defaultSize, fLinePos, FALSE);
+ Loader(defaultSize, fLinePos, false);
if (fLinePos < 0.1f)
fLinePos = m_textParser.GetFontSize(m_pTextProvider, nullptr);
m_pTabstopContext.reset();
defaultSize = CFX_SizeF(m_fMaxWidth, fLinePos);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_TextLayout::Layout(const CFX_SizeF& size, FX_FLOAT* fHeight) {
+bool CXFA_TextLayout::Layout(const CFX_SizeF& size, FX_FLOAT* fHeight) {
if (size.x < 1)
- return FALSE;
+ return false;
Unload();
- m_pBreak.reset(CreateBreak(TRUE));
+ m_pBreak.reset(CreateBreak(true));
if (m_pLoader) {
m_pLoader->m_iTotalLines = -1;
m_pLoader->m_iChar = 0;
}
m_iLines = 0;
FX_FLOAT fLinePos = 0;
- Loader(size, fLinePos, TRUE);
+ Loader(size, fLinePos, true);
UpdateAlign(size.y, fLinePos);
m_pTabstopContext.reset();
if (fHeight)
*fHeight = fLinePos;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
+bool CXFA_TextLayout::Layout(int32_t iBlock) {
if (!m_pLoader || iBlock < 0 || iBlock >= CountBlocks())
- return FALSE;
+ return false;
if (m_pLoader->m_fWidth < 1)
- return FALSE;
+ return false;
m_pLoader->m_iTotalLines = -1;
m_iLines = 0;
@@ -1107,10 +1106,10 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
int32_t iBlocksHeightCount = m_pLoader->m_BlocksHeight.GetSize();
iBlocksHeightCount /= 2;
if (iBlock < iBlocksHeightCount)
- return TRUE;
+ return true;
if (iBlock == iBlocksHeightCount) {
Unload();
- m_pBreak.reset(CreateBreak(TRUE));
+ m_pBreak.reset(CreateBreak(true));
fLinePos = m_pLoader->m_fStartLineOffset;
for (int32_t i = 0; i < iBlocksHeightCount; i++) {
fLinePos -= m_pLoader->m_BlocksHeight.ElementAt(i * 2 + 1);
@@ -1118,7 +1117,7 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
m_pLoader->m_iChar = 0;
if (iCount > 1)
m_pLoader->m_iTotalLines = m_Blocks.ElementAt(iBlock * 2 + 1);
- Loader(szText, fLinePos, TRUE);
+ Loader(szText, fLinePos, true);
if (iCount == 0 && m_pLoader->m_fStartLineOffset < 0.1f)
UpdateAlign(szText.y, fLinePos);
} else if (m_pTextDataNode) {
@@ -1129,16 +1128,16 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
if (m_bRichText) {
CFDE_XMLNode* pContainerNode = GetXMLContainerNode();
if (!pContainerNode) {
- return TRUE;
+ return true;
}
CFDE_XMLNode* pXMLNode = m_pLoader->m_pXMLNode;
if (!pXMLNode)
- return TRUE;
+ return true;
CFDE_XMLNode* pSaveXMLNode = m_pLoader->m_pXMLNode;
for (; pXMLNode;
pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (!LoadRichText(pXMLNode, szText, fLinePos, m_pLoader->m_pParentStyle,
- TRUE)) {
+ true)) {
break;
}
}
@@ -1147,7 +1146,7 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
if (pXMLNode == pContainerNode)
break;
if (!LoadRichText(pXMLNode, szText, fLinePos, m_pLoader->m_pParentStyle,
- TRUE, nullptr, FALSE)) {
+ true, nullptr, false)) {
break;
}
pSaveXMLNode = pXMLNode;
@@ -1157,7 +1156,7 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
for (; pXMLNode;
pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (!LoadRichText(pXMLNode, szText, fLinePos,
- m_pLoader->m_pParentStyle, TRUE)) {
+ m_pLoader->m_pParentStyle, true)) {
break;
}
}
@@ -1165,15 +1164,15 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
} else {
pNode = m_pLoader->m_pNode;
if (!pNode)
- return TRUE;
- LoadText(pNode, szText, fLinePos, TRUE);
+ return true;
+ LoadText(pNode, szText, fLinePos, true);
}
}
if (iBlock == iCount) {
m_pTabstopContext.reset();
m_pLoader.reset();
}
- return TRUE;
+ return true;
}
void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
if (!m_pLoader) {
@@ -1183,7 +1182,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
if (iCountHeight == 0) {
return;
}
- FX_BOOL bEndItem = TRUE;
+ bool bEndItem = true;
int32_t iBlockCount = m_Blocks.GetSize();
FX_FLOAT fLinePos = m_pLoader->m_fStartLineOffset;
int32_t iLineIndex = 0;
@@ -1206,7 +1205,7 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
if (fLinePos + fLineHeight - rtText.height > 0.001) {
m_Blocks.Add(iLineIndex);
m_Blocks.Add(i - iLineIndex);
- bEndItem = FALSE;
+ bEndItem = false;
break;
}
fLinePos += fLineHeight;
@@ -1216,15 +1215,15 @@ void CXFA_TextLayout::ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex) {
m_Blocks.Add(i - iLineIndex);
}
}
-FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
- const CFX_Matrix& tmDoc2Device,
- const CFX_RectF& rtClip,
- int32_t iBlock) {
+bool CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
+ const CFX_Matrix& tmDoc2Device,
+ const CFX_RectF& rtClip,
+ int32_t iBlock) {
if (!pFxDevice)
- return FALSE;
+ return false;
std::unique_ptr<CFDE_RenderDevice> pDevice(
- new CFDE_RenderDevice(pFxDevice, FALSE));
+ new CFDE_RenderDevice(pFxDevice, false));
pDevice->SaveState();
pDevice->SetClipRect(rtClip);
@@ -1303,15 +1302,15 @@ void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) {
}
}
}
-FX_BOOL CXFA_TextLayout::Loader(const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces) {
+bool CXFA_TextLayout::Loader(const CFX_SizeF& szText,
+ FX_FLOAT& fLinePos,
+ bool bSavePieces) {
if (!m_pAllocator) {
m_pAllocator = IFX_MemoryAllocator::Create(FX_ALLOCTYPE_Static, 256, 0);
}
GetTextDataNode();
if (!m_pTextDataNode)
- return TRUE;
+ return true;
if (m_bRichText) {
CFDE_XMLNode* pXMLContainer = GetXMLContainerNode();
@@ -1327,12 +1326,12 @@ FX_BOOL CXFA_TextLayout::Loader(const CFX_SizeF& szText,
} else {
LoadText(m_pTextDataNode, szText, fLinePos, bSavePieces);
}
- return TRUE;
+ return true;
}
void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces) {
+ bool bSavePieces) {
InitBreak(szText.x);
CXFA_Para para = m_pTextProvider->GetParaNode();
FX_FLOAT fSpaceAbove = 0;
@@ -1353,57 +1352,57 @@ void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
}
CFX_WideString wsText = pNode->GetContent();
wsText.TrimRight(L" ");
- FX_BOOL bRet = AppendChar(wsText, fLinePos, fSpaceAbove, bSavePieces);
+ bool bRet = AppendChar(wsText, fLinePos, fSpaceAbove, bSavePieces);
if (bRet && m_pLoader) {
m_pLoader->m_pNode = pNode;
} else {
EndBreak(FX_RTFBREAK_ParagraphBreak, fLinePos, bSavePieces);
}
}
-FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
- const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
- IFDE_CSSComputedStyle* pParentStyle,
- FX_BOOL bSavePieces,
- CXFA_LinkUserData* pLinkData,
- FX_BOOL bEndBreak,
- FX_BOOL bIsOl,
- int32_t iLiCount) {
+bool CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
+ const CFX_SizeF& szText,
+ FX_FLOAT& fLinePos,
+ IFDE_CSSComputedStyle* pParentStyle,
+ bool bSavePieces,
+ CXFA_LinkUserData* pLinkData,
+ bool bEndBreak,
+ bool bIsOl,
+ int32_t iLiCount) {
if (!pXMLNode) {
- return FALSE;
+ return false;
}
CXFA_TextParseContext* pContext =
m_textParser.GetParseContextFromMap(pXMLNode);
FDE_CSSDISPLAY eDisplay = FDE_CSSDISPLAY_None;
- FX_BOOL bContentNode = FALSE;
+ bool bContentNode = false;
FX_FLOAT fSpaceBelow = 0;
IFDE_CSSComputedStyle* pStyle = nullptr;
CFX_WideString wsName;
if (bEndBreak) {
- FX_BOOL bCurOl = FALSE;
- FX_BOOL bCurLi = FALSE;
+ bool bCurOl = false;
+ bool bCurLi = false;
CFDE_XMLElement* pElement = nullptr;
if (pContext) {
if (m_bBlockContinue ||
(m_pLoader && pXMLNode == m_pLoader->m_pXMLNode)) {
- m_bBlockContinue = TRUE;
+ m_bBlockContinue = true;
}
if (pXMLNode->GetType() == FDE_XMLNODE_Text) {
- bContentNode = TRUE;
+ bContentNode = true;
} else if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pElement->GetLocalTagName(wsName);
}
if (wsName == FX_WSTRC(L"ol")) {
- bIsOl = TRUE;
- bCurOl = TRUE;
+ bIsOl = true;
+ bCurOl = true;
}
- if (m_bBlockContinue || bContentNode == FALSE) {
+ if (m_bBlockContinue || bContentNode == false) {
eDisplay = pContext->GetDisplay();
if (eDisplay != FDE_CSSDISPLAY_Block &&
eDisplay != FDE_CSSDISPLAY_Inline &&
eDisplay != FDE_CSSDISPLAY_ListItem) {
- return TRUE;
+ return true;
}
pStyle = m_textParser.ComputeStyle(pXMLNode, pParentStyle);
InitBreak(bContentNode ? pParentStyle : pStyle, eDisplay, szText.x,
@@ -1434,7 +1433,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
}
int32_t iTabCount =
m_textParser.CountTabs(bContentNode ? pParentStyle : pStyle);
- FX_BOOL bSpaceRun =
+ bool bSpaceRun =
m_textParser.IsSpaceRun(bContentNode ? pParentStyle : pStyle);
CFX_WideString wsText;
if (bContentNode && iTabCount == 0) {
@@ -1442,7 +1441,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
} else if (wsName == FX_WSTRC(L"br")) {
wsText = L'\n';
} else if (wsName == FX_WSTRC(L"li")) {
- bCurLi = TRUE;
+ bCurLi = true;
if (bIsOl) {
wsText.Format(L"%d. ", iLiCount);
} else {
@@ -1499,14 +1498,14 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
}
if (pStyle)
pStyle->Release();
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
}
}
}
- FX_BOOL ret = TRUE;
+ bool ret = true;
for (CFDE_XMLNode* pChildNode =
pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
pChildNode;
@@ -1516,9 +1515,9 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
}
ret = LoadRichText(pChildNode, szText, fLinePos,
pContext ? pStyle : pParentStyle, bSavePieces,
- pLinkData, TRUE, bIsOl, iLiCount);
- if (ret == FALSE) {
- return FALSE;
+ pLinkData, true, bIsOl, iLiCount);
+ if (ret == false) {
+ return false;
}
}
if (m_pLoader) {
@@ -1561,18 +1560,18 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling);
m_pLoader->m_pParentStyle = pParentStyle;
}
- return FALSE;
+ return false;
}
}
}
if (pStyle)
pStyle->Release();
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
- FX_FLOAT& fLinePos,
- FX_FLOAT fSpaceAbove,
- FX_BOOL bSavePieces) {
+bool CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
+ FX_FLOAT& fLinePos,
+ FX_FLOAT fSpaceAbove,
+ bool bSavePieces) {
uint32_t dwStatus = 0;
int32_t iChar = 0;
if (m_pLoader) {
@@ -1589,7 +1588,7 @@ FX_BOOL CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
if (IsEnd(bSavePieces)) {
if (m_pLoader)
m_pLoader->m_iChar = i;
- return TRUE;
+ return true;
}
if (dwStatus == FX_RTFBREAK_ParagraphBreak && m_bRichText) {
fLinePos += fSpaceAbove;
@@ -1599,16 +1598,16 @@ FX_BOOL CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
if (m_pLoader) {
m_pLoader->m_iChar = 0;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_TextLayout::IsEnd(FX_BOOL bSavePieces) {
+bool CXFA_TextLayout::IsEnd(bool bSavePieces) {
if (!bSavePieces) {
- return FALSE;
+ return false;
}
if (m_pLoader && m_pLoader->m_iTotalLines > 0) {
return m_iLines >= m_pLoader->m_iTotalLines;
}
- return FALSE;
+ return false;
}
void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) {
int32_t iLen = wsText.GetLength();
@@ -1634,10 +1633,10 @@ void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) {
}
void CXFA_TextLayout::EndBreak(uint32_t dwStatus,
FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces) {
+ bool bSavePieces) {
dwStatus = m_pBreak->EndBreak(dwStatus);
if (dwStatus > FX_RTFBREAK_PieceBreak) {
- AppendTextLine(dwStatus, fLinePos, bSavePieces, TRUE);
+ AppendTextLine(dwStatus, fLinePos, bSavePieces, true);
}
}
void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle,
@@ -1660,7 +1659,7 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle,
}
if (iCount > 0) {
iTabstopsIndex++;
- m_pTabstopContext->m_bTabstops = TRUE;
+ m_pTabstopContext->m_bTabstops = true;
FX_FLOAT fRight = 0;
if (iPieces > 1) {
XFA_TextPiece* p = pPieceLine->m_textPieces.GetAt(iPieces - 2);
@@ -1690,7 +1689,7 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle,
}
m_pTabstopContext->m_fLeft =
std::min(fLeft, m_pTabstopContext->m_fTabWidth);
- m_pTabstopContext->m_bTabstops = FALSE;
+ m_pTabstopContext->m_bTabstops = false;
m_pTabstopContext->m_fTabWidth = 0;
}
pPiece->rtPiece.left -= m_pTabstopContext->m_fLeft;
@@ -1698,8 +1697,8 @@ void CXFA_TextLayout::DoTabstops(IFDE_CSSComputedStyle* pStyle,
}
void CXFA_TextLayout::AppendTextLine(uint32_t dwStatus,
FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces,
- FX_BOOL bEndBreak) {
+ bool bSavePieces,
+ bool bEndBreak) {
int32_t iPieces = m_pBreak->CountBreakPieces();
if (iPieces < 1) {
return;
@@ -1865,8 +1864,8 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
FXTEXT_CHARPOS* pCharPos,
const CFX_Matrix& tmDoc2Device) {
XFA_TextPiece* pPiece = pPieceLine->m_textPieces.GetAt(iPiece);
- FX_BOOL bNoUnderline = pPiece->iUnderline < 1 || pPiece->iUnderline > 2;
- FX_BOOL bNoLineThrough = pPiece->iLineThrough < 1 || pPiece->iLineThrough > 2;
+ bool bNoUnderline = pPiece->iUnderline < 1 || pPiece->iUnderline > 2;
+ bool bNoLineThrough = pPiece->iLineThrough < 1 || pPiece->iLineThrough > 2;
if (bNoUnderline && bNoLineThrough) {
return;
}
@@ -1970,7 +1969,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
int32_t CXFA_TextLayout::GetDisplayPos(const XFA_TextPiece* pPiece,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode) {
+ bool bCharCode) {
if (!pPiece) {
return 0;
}
@@ -1980,10 +1979,10 @@ int32_t CXFA_TextLayout::GetDisplayPos(const XFA_TextPiece* pPiece,
}
return m_pBreak->GetDisplayPos(&tr, pCharPos, bCharCode);
}
-FX_BOOL CXFA_TextLayout::ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr) {
+bool CXFA_TextLayout::ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr) {
int32_t iLength = pPiece->iChars;
if (iLength < 1) {
- return FALSE;
+ return false;
}
tr.pStr = pPiece->pszText;
tr.pFont = pPiece->pFont;
@@ -1997,7 +1996,7 @@ FX_BOOL CXFA_TextLayout::ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr) {
tr.iVerticalScale = pPiece->iVerScale;
tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab;
tr.iHorizontalScale = pPiece->iHorScale;
- return TRUE;
+ return true;
}
CXFA_LinkUserData::CXFA_LinkUserData(IFX_MemoryAllocator* pAllocator,
@@ -2069,7 +2068,7 @@ CXFA_PieceLine::~CXFA_PieceLine() {}
CXFA_TextTabstopsContext::CXFA_TextTabstopsContext()
: m_iTabCount(0),
m_iTabIndex(-1),
- m_bTabstops(FALSE),
+ m_bTabstops(false),
m_fTabWidth(0),
m_fLeft(0) {}
@@ -2098,7 +2097,7 @@ void CXFA_TextTabstopsContext::RemoveAll() {
void CXFA_TextTabstopsContext::Reset() {
m_iTabIndex = -1;
- m_bTabstops = FALSE;
+ m_bTabstops = false;
m_fTabWidth = 0;
m_fLeft = 0;
}
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 36bf87d6d9..b299f52904 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -44,8 +44,8 @@ class CXFA_CSSTagProvider {
m_Attributes.insert({wsAttr, wsValue});
}
- FX_BOOL m_bTagAvailable;
- FX_BOOL m_bContent;
+ bool m_bTagAvailable;
+ bool m_bContent;
protected:
CFX_WideString m_wsTagName;
@@ -83,14 +83,14 @@ class CXFA_TextParser {
IFDE_CSSComputedStyle* CreateRootStyle(CXFA_TextProvider* pTextProvider);
IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle);
- FX_BOOL IsParsed() const { return !!m_pAllocator; }
+ bool IsParsed() const { return !!m_pAllocator; }
int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const;
FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const;
int32_t CountTabs(IFDE_CSSComputedStyle* pStyle) const;
- FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const;
- FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle,
- CXFA_TextTabstopsContext* pTabstopContext);
+ bool IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const;
+ bool GetTabstops(IFDE_CSSComputedStyle* pStyle,
+ CXFA_TextTabstopsContext* pTabstopContext);
CFGAS_GEFont* GetFont(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle) const;
FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider,
@@ -113,11 +113,11 @@ class CXFA_TextParser {
IFDE_CSSComputedStyle* pStyle) const;
FX_FLOAT GetLineHeight(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle,
- FX_BOOL bFirst,
+ bool bFirst,
FX_FLOAT fVerScale) const;
- FX_BOOL GetEmbbedObj(CXFA_TextProvider* pTextProvider,
- CFDE_XMLNode* pXMLNode,
- CFX_WideString& wsValue);
+ bool GetEmbbedObj(CXFA_TextProvider* pTextProvider,
+ CFDE_XMLNode* pXMLNode,
+ CFX_WideString& wsValue);
CXFA_TextParseContext* GetParseContextFromMap(CFDE_XMLNode* pXMLNode);
protected:
@@ -142,7 +142,7 @@ class CXFA_LoaderContext {
CXFA_LoaderContext();
~CXFA_LoaderContext();
- FX_BOOL m_bSaveLineHeight;
+ bool m_bSaveLineHeight;
FX_FLOAT m_fWidth;
FX_FLOAT m_fHeight;
FX_FLOAT m_fLastPos;
@@ -245,7 +245,7 @@ class CXFA_TextTabstopsContext {
CFX_ArrayTemplate<XFA_TABSTOPS> m_tabstops;
int32_t m_iTabCount;
int32_t m_iTabIndex;
- FX_BOOL m_bTabstops;
+ bool m_bTabstops;
FX_FLOAT m_fTabWidth;
FX_FLOAT m_fLeft;
};
@@ -258,63 +258,63 @@ class CXFA_TextLayout {
int32_t GetText(CFX_WideString& wsText);
FX_FLOAT GetLayoutHeight();
FX_FLOAT StartLayout(FX_FLOAT fWidth = -1);
- FX_BOOL DoLayout(int32_t iBlockIndex,
- FX_FLOAT& fCalcHeight,
- FX_FLOAT fContentAreaHeight = -1,
- FX_FLOAT fTextHeight = -1);
-
- FX_BOOL CalcSize(const CFX_SizeF& minSize,
- const CFX_SizeF& maxSize,
- CFX_SizeF& defaultSize);
- FX_BOOL Layout(const CFX_SizeF& size, FX_FLOAT* fHeight = nullptr);
+ bool DoLayout(int32_t iBlockIndex,
+ FX_FLOAT& fCalcHeight,
+ FX_FLOAT fContentAreaHeight = -1,
+ FX_FLOAT fTextHeight = -1);
+
+ bool CalcSize(const CFX_SizeF& minSize,
+ const CFX_SizeF& maxSize,
+ CFX_SizeF& defaultSize);
+ bool Layout(const CFX_SizeF& size, FX_FLOAT* fHeight = nullptr);
void ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex);
- FX_BOOL DrawString(CFX_RenderDevice* pFxDevice,
- const CFX_Matrix& tmDoc2Device,
- const CFX_RectF& rtClip,
- int32_t iBlock = 0);
- FX_BOOL IsLoaded() const { return m_pieceLines.GetSize() > 0; }
+ bool DrawString(CFX_RenderDevice* pFxDevice,
+ const CFX_Matrix& tmDoc2Device,
+ const CFX_RectF& rtClip,
+ int32_t iBlock = 0);
+ bool IsLoaded() const { return m_pieceLines.GetSize() > 0; }
void Unload();
const CXFA_PieceLineArray* GetPieceLines();
- FX_BOOL m_bHasBlock;
+ bool m_bHasBlock;
CFX_Int32Array m_Blocks;
private:
void GetTextDataNode();
CFDE_XMLNode* GetXMLContainerNode();
- CFX_RTFBreak* CreateBreak(FX_BOOL bDefault);
+ CFX_RTFBreak* CreateBreak(bool bDefault);
void InitBreak(FX_FLOAT fLineWidth);
void InitBreak(IFDE_CSSComputedStyle* pStyle,
FDE_CSSDISPLAY eDisplay,
FX_FLOAT fLineWidth,
CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle = nullptr);
- FX_BOOL Loader(const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces = TRUE);
+ bool Loader(const CFX_SizeF& szText,
+ FX_FLOAT& fLinePos,
+ bool bSavePieces = true);
void LoadText(CXFA_Node* pNode,
const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces);
- FX_BOOL LoadRichText(CFDE_XMLNode* pXMLNode,
- const CFX_SizeF& szText,
- FX_FLOAT& fLinePos,
- IFDE_CSSComputedStyle* pParentStyle,
- FX_BOOL bSavePieces,
- CXFA_LinkUserData* pLinkData = nullptr,
- FX_BOOL bEndBreak = TRUE,
- FX_BOOL bIsOl = FALSE,
- int32_t iLiCount = 0);
- FX_BOOL AppendChar(const CFX_WideString& wsText,
- FX_FLOAT& fLinePos,
- FX_FLOAT fSpaceAbove,
- FX_BOOL bSavePieces);
+ bool bSavePieces);
+ bool LoadRichText(CFDE_XMLNode* pXMLNode,
+ const CFX_SizeF& szText,
+ FX_FLOAT& fLinePos,
+ IFDE_CSSComputedStyle* pParentStyle,
+ bool bSavePieces,
+ CXFA_LinkUserData* pLinkData = nullptr,
+ bool bEndBreak = true,
+ bool bIsOl = false,
+ int32_t iLiCount = 0);
+ bool AppendChar(const CFX_WideString& wsText,
+ FX_FLOAT& fLinePos,
+ FX_FLOAT fSpaceAbove,
+ bool bSavePieces);
void AppendTextLine(uint32_t dwStatus,
FX_FLOAT& fLinePos,
- FX_BOOL bSavePieces,
- FX_BOOL bEndBreak = FALSE);
- void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bDefault);
- FX_BOOL IsEnd(FX_BOOL bSavePieces);
+ bool bSavePieces,
+ bool bEndBreak = false);
+ void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, bool bDefault);
+ bool IsEnd(bool bSavePieces);
void ProcessText(CFX_WideString& wsText);
void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom);
void RenderString(CFDE_RenderDevice* pDevice,
@@ -331,15 +331,15 @@ class CXFA_TextLayout {
const CFX_Matrix& tmDoc2Device);
int32_t GetDisplayPos(const XFA_TextPiece* pPiece,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode = FALSE);
- FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr);
+ bool bCharCode = false);
+ bool ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr);
void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine);
- FX_BOOL Layout(int32_t iBlock);
+ bool Layout(int32_t iBlock);
int32_t CountBlocks() const;
CXFA_TextProvider* m_pTextProvider;
CXFA_Node* m_pTextDataNode;
- FX_BOOL m_bRichText;
+ bool m_bRichText;
std::unique_ptr<IFX_MemoryAllocator> m_pAllocator;
std::unique_ptr<CFX_RTFBreak> m_pBreak;
std::unique_ptr<CXFA_LoaderContext> m_pLoader;
@@ -348,7 +348,7 @@ class CXFA_TextLayout {
CXFA_TextParser m_textParser;
CXFA_PieceLineArray m_pieceLines;
std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext;
- FX_BOOL m_bBlockContinue;
+ bool m_bBlockContinue;
};
#endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_
diff --git a/xfa/fxfa/cxfa_eventparam.h b/xfa/fxfa/cxfa_eventparam.h
index cc548f6e4d..3ba7a8b7f2 100644
--- a/xfa/fxfa/cxfa_eventparam.h
+++ b/xfa/fxfa/cxfa_eventparam.h
@@ -56,14 +56,14 @@ class CXFA_EventParam {
CXFA_WidgetAcc* m_pTarget;
XFA_EVENTTYPE m_eType;
CFX_WideString m_wsResult;
- FX_BOOL m_bCancelAction;
+ bool m_bCancelAction;
int32_t m_iCommitKey;
- FX_BOOL m_bKeyDown;
- FX_BOOL m_bModifier;
- FX_BOOL m_bReenter;
+ bool m_bKeyDown;
+ bool m_bModifier;
+ bool m_bReenter;
int32_t m_iSelEnd;
int32_t m_iSelStart;
- FX_BOOL m_bShift;
+ bool m_bShift;
CFX_WideString m_wsChange;
CFX_WideString m_wsFullText;
CFX_WideString m_wsNewContentType;
@@ -72,7 +72,7 @@ class CXFA_EventParam {
CFX_WideString m_wsPrevText;
CFX_WideString m_wsSoapFaultCode;
CFX_WideString m_wsSoapFaultString;
- FX_BOOL m_bIsFormReady;
+ bool m_bIsFormReady;
int32_t m_iValidateActivities;
};
diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp
index 829bf7d74e..4271ae04e2 100644
--- a/xfa/fxfa/fm2js/xfa_expression.cpp
+++ b/xfa/fxfa/fm2js/xfa_expression.cpp
@@ -30,7 +30,7 @@ void CXFA_FMExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {}
CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition(
uint32_t line,
- FX_BOOL isGlobal,
+ bool isGlobal,
const CFX_WideStringC& wsName,
std::unique_ptr<CFX_WideStringCArray> pArguments,
CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressions)
diff --git a/xfa/fxfa/fm2js/xfa_expression.h b/xfa/fxfa/fm2js/xfa_expression.h
index 88cebdf036..69337350bf 100644
--- a/xfa/fxfa/fm2js/xfa_expression.h
+++ b/xfa/fxfa/fm2js/xfa_expression.h
@@ -42,7 +42,7 @@ class CXFA_FMFunctionDefinition : public CXFA_FMExpression {
// Takes ownership of |pExpressions|.
CXFA_FMFunctionDefinition(
uint32_t line,
- FX_BOOL isGlobal,
+ bool isGlobal,
const CFX_WideStringC& wsName,
std::unique_ptr<CFX_WideStringCArray> pArguments,
CFX_ArrayTemplate<CXFA_FMExpression*>* pExpressions);
@@ -55,7 +55,7 @@ class CXFA_FMFunctionDefinition : public CXFA_FMExpression {
CFX_WideStringC m_wsName;
std::unique_ptr<CFX_WideStringCArray> m_pArguments;
CFX_ArrayTemplate<CXFA_FMExpression*>* m_pExpressions;
- FX_BOOL m_isGlobal;
+ bool m_isGlobal;
};
class CXFA_FMVarExpression : public CXFA_FMExpression {
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 8a7849f873..947ef7941e 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -377,8 +377,8 @@ void AlternateDateTimeSymbols(CFX_WideString& wsPattern,
const CFX_WideString& wsAltSymbols,
const uint8_t* pAltTable) {
int32_t nLength = wsPattern.GetLength();
- FX_BOOL bInConstRange = FALSE;
- FX_BOOL bEscape = FALSE;
+ bool bInConstRange = false;
+ bool bEscape = false;
int32_t i = 0;
while (i < nLength) {
FX_WCHAR wc = wsPattern[i];
@@ -399,7 +399,7 @@ void AlternateDateTimeSymbols(CFX_WideString& wsPattern,
wsPattern.SetAt(i, wsAltSymbols[nAlt]);
}
i++;
- bEscape = FALSE;
+ bEscape = false;
}
}
@@ -442,7 +442,7 @@ bool PatternStringType(const CFX_ByteStringC& szPattern,
const FX_WCHAR* pData = wsPattern.c_str();
int32_t iLength = wsPattern.GetLength();
int32_t iIndex = 0;
- FX_BOOL bSingleQuotation = FALSE;
+ bool bSingleQuotation = false;
FX_WCHAR patternChar;
while (iIndex < iLength) {
patternChar = pData[iIndex];
@@ -1233,7 +1233,7 @@ void CXFA_FM2JSContext::LocalDateFmt(CFXJSE_Value* pThis,
}
CFX_ByteString formatStr;
- GetLocalDateFormat(pThis, iStyle, szLocal.AsStringC(), formatStr, FALSE);
+ GetLocalDateFormat(pThis, iStyle, szLocal.AsStringC(), formatStr, false);
args.GetReturnValue()->SetString(formatStr.AsStringC());
}
@@ -1271,7 +1271,7 @@ void CXFA_FM2JSContext::LocalTimeFmt(CFXJSE_Value* pThis,
}
CFX_ByteString formatStr;
- GetLocalTimeFormat(pThis, iStyle, szLocal.AsStringC(), formatStr, FALSE);
+ GetLocalTimeFormat(pThis, iStyle, szLocal.AsStringC(), formatStr, false);
args.GetReturnValue()->SetString(formatStr.AsStringC());
}
@@ -1461,7 +1461,7 @@ void CXFA_FM2JSContext::Num2GMTime(CFXJSE_Value* pThis,
CFX_ByteString szGMTTimeString;
Num2AllTime(pThis, iTime, formatString.AsStringC(), localString.AsStringC(),
- TRUE, szGMTTimeString);
+ true, szGMTTimeString);
args.GetReturnValue()->SetString(szGMTTimeString.AsStringC());
}
@@ -1509,7 +1509,7 @@ void CXFA_FM2JSContext::Num2Time(CFXJSE_Value* pThis,
CFX_ByteString szLocalTimeString;
Num2AllTime(pThis, (int32_t)fTime, formatString.AsStringC(),
- localString.AsStringC(), FALSE, szLocalTimeString);
+ localString.AsStringC(), false, szLocalTimeString);
args.GetReturnValue()->SetString(szLocalTimeString.AsStringC());
}
@@ -1661,31 +1661,31 @@ void CXFA_FM2JSContext::TimeFmt(CFXJSE_Value* pThis,
}
// static
-FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iStyle,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay) {
+bool CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iStyle,
+ int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay) {
iYear = 0;
iMonth = 1;
iDay = 1;
if (iLength < 4)
- return FALSE;
+ return false;
FX_CHAR strYear[5];
strYear[4] = '\0';
for (int32_t i = 0; i < 4; ++i) {
if (pData[i] > '9' || pData[i] < '0')
- return FALSE;
+ return false;
strYear[i] = pData[i];
}
iYear = FXSYS_atoi(strYear);
iStyle = 0;
if (iLength == 4)
- return TRUE;
+ return true;
iStyle = pData[4] == '-' ? 1 : 0;
@@ -1694,60 +1694,60 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
int32_t iPosOff = iStyle == 0 ? 4 : 5;
if ((pData[iPosOff] > '9' || pData[iPosOff] < '0') ||
(pData[iPosOff + 1] > '9' || pData[iPosOff + 1] < '0'))
- return FALSE;
+ return false;
strTemp[0] = pData[iPosOff];
strTemp[1] = pData[iPosOff + 1];
iMonth = FXSYS_atoi(strTemp);
if (iMonth > 12 || iMonth < 1)
- return FALSE;
+ return false;
if (iStyle == 0) {
iPosOff += 2;
if (iLength == 6)
- return TRUE;
+ return true;
} else {
iPosOff += 3;
if (iLength == 7)
- return TRUE;
+ return true;
}
if ((pData[iPosOff] > '9' || pData[iPosOff] < '0') ||
(pData[iPosOff + 1] > '9' || pData[iPosOff + 1] < '0'))
- return FALSE;
+ return false;
strTemp[0] = pData[iPosOff];
strTemp[1] = pData[iPosOff + 1];
iDay = FXSYS_atoi(strTemp);
if (iPosOff + 2 < iLength)
- return FALSE;
+ return false;
if ((!(iYear % 4) && (iYear % 100)) || !(iYear % 400)) {
if (iMonth == 2 && iDay > 29)
- return FALSE;
+ return false;
} else {
if (iMonth == 2 && iDay > 28)
- return FALSE;
+ return false;
}
if (iMonth != 2) {
if (iMonth < 8) {
if (iDay > (iMonth % 2 == 0 ? 30 : 31))
- return FALSE;
+ return false;
} else if (iDay > (iMonth % 2 == 0 ? 31 : 30)) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iHour,
- int32_t& iMinute,
- int32_t& iSecond,
- int32_t& iMilliSecond,
- int32_t& iZoneHour,
- int32_t& iZoneMinute) {
+bool CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iHour,
+ int32_t& iMinute,
+ int32_t& iSecond,
+ int32_t& iMilliSecond,
+ int32_t& iZoneHour,
+ int32_t& iZoneMinute) {
iHour = 0;
iMinute = 0;
iSecond = 0;
@@ -1755,7 +1755,7 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
iZoneHour = 0;
iZoneMinute = 0;
if (!pData)
- return FALSE;
+ return false;
FX_CHAR strTemp[3];
strTemp[2] = '\0';
@@ -1778,15 +1778,15 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
break;
if (pData[iIndex] > '9' || pData[iIndex] < '0')
- return FALSE;
+ return false;
strTemp[0] = pData[iIndex];
if (pData[iIndex + 1] > '9' || pData[iIndex + 1] < '0')
- return FALSE;
+ return false;
strTemp[1] = pData[iIndex + 1];
if (FXSYS_atoi(strTemp) > 60)
- return FALSE;
+ return false;
if (pData[2] == ':') {
if (iPos == 0) {
@@ -1818,26 +1818,26 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
FX_CHAR strSec[4];
strSec[3] = '\0';
if (pData[iIndex] > '9' || pData[iIndex] < '0')
- return FALSE;
+ return false;
strSec[0] = pData[iIndex];
if (pData[iIndex + 1] > '9' || pData[iIndex + 1] < '0')
- return FALSE;
+ return false;
strSec[1] = pData[iIndex + 1];
if (pData[iIndex + 2] > '9' || pData[iIndex + 2] < '0')
- return FALSE;
+ return false;
strSec[2] = pData[iIndex + 2];
iMilliSecond = FXSYS_atoi(strSec);
if (iMilliSecond > 100) {
iMilliSecond = 0;
- return FALSE;
+ return false;
}
iIndex += 3;
}
if (pData[iIndex] == 'z' || pData[iIndex] == 'Z')
- return TRUE;
+ return true;
int32_t iSign = 1;
if (pData[iIndex] == '+') {
@@ -1849,17 +1849,17 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
iPos = 0;
while (iIndex < iLength) {
if (iIndex >= iLength)
- return FALSE;
+ return false;
if (pData[iIndex] > '9' || pData[iIndex] < '0')
- return FALSE;
+ return false;
strTemp[0] = pData[iIndex];
if (pData[iIndex + 1] > '9' || pData[iIndex + 1] < '0')
- return FALSE;
+ return false;
strTemp[1] = pData[iIndex + 1];
if (FXSYS_atoi(strTemp) > 60)
- return FALSE;
+ return false;
if (pData[2] == ':') {
if (iPos == 0) {
@@ -1880,24 +1880,24 @@ FX_BOOL CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
}
}
if (iIndex < iLength)
- return FALSE;
+ return false;
iZoneHour *= iSign;
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay,
- int32_t& iHour,
- int32_t& iMinute,
- int32_t& iSecond,
- int32_t& iMillionSecond,
- int32_t& iZoneHour,
- int32_t& iZoneMinute) {
+bool CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay,
+ int32_t& iHour,
+ int32_t& iMinute,
+ int32_t& iSecond,
+ int32_t& iMillionSecond,
+ int32_t& iZoneHour,
+ int32_t& iZoneMinute) {
iYear = 0;
iMonth = 0;
iDay = 0;
@@ -1905,45 +1905,45 @@ FX_BOOL CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData,
iMinute = 0;
iSecond = 0;
if (!pData)
- return FALSE;
+ return false;
int32_t iIndex = 0;
while (pData[iIndex] != 'T' && pData[iIndex] != 't') {
if (iIndex >= iLength)
- return FALSE;
+ return false;
++iIndex;
}
if (iIndex != 8 && iIndex != 10)
- return FALSE;
+ return false;
int32_t iStyle = -1;
if (!IsIsoDateFormat(pData, iIndex, iStyle, iYear, iMonth, iDay))
- return FALSE;
+ return false;
if (pData[iIndex] != 'T' && pData[iIndex] != 't')
- return TRUE;
+ return true;
++iIndex;
if (((iLength - iIndex > 13) && (iLength - iIndex < 6)) &&
(iLength - iIndex != 15)) {
- return TRUE;
+ return true;
}
if (!IsIsoTimeFormat(pData + iIndex, iLength - iIndex, iHour, iMinute,
iSecond, iMillionSecond, iZoneHour, iZoneMinute)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::Local2IsoDate(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szDate,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strIsoDate) {
+bool CXFA_FM2JSContext::Local2IsoDate(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szDate,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strIsoDate) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr();
IFX_Locale* pLocale = nullptr;
@@ -1957,7 +1957,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(CFXJSE_Value* pThis,
pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale)
- return FALSE;
+ return false;
CFX_WideString wsFormat;
if (szFormat.IsEmpty())
@@ -1969,18 +1969,18 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(CFXJSE_Value* pThis,
wsFormat, pLocale, pMgr);
CFX_Unitime dt = widgetValue.GetDate();
strIsoDate.Format("%4d-%02d-%02d", dt.GetYear(), dt.GetMonth(), dt.GetDay());
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::Local2IsoTime(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szTime,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strIsoTime) {
+bool CXFA_FM2JSContext::Local2IsoTime(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szTime,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strIsoTime) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr();
IFX_Locale* pLocale = nullptr;
@@ -1994,7 +1994,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(CFXJSE_Value* pThis,
pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale)
- return FALSE;
+ return false;
CFX_WideString wsFormat;
if (szFormat.IsEmpty())
@@ -2008,18 +2008,18 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(CFXJSE_Value* pThis,
CFX_Unitime utime = widgetValue.GetTime();
strIsoTime.Format("%02d:%02d:%02d.%03d", utime.GetHour(), utime.GetMinute(),
utime.GetSecond(), utime.GetMillisecond());
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::IsoDate2Local(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szDate,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strLocalDate) {
+bool CXFA_FM2JSContext::IsoDate2Local(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szDate,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strLocalDate) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr();
IFX_Locale* pLocale = nullptr;
@@ -2032,7 +2032,7 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(CFXJSE_Value* pThis,
pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale)
- return FALSE;
+ return false;
CFX_WideString wsFormat;
if (szFormat.IsEmpty())
@@ -2046,18 +2046,18 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(CFXJSE_Value* pThis,
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
XFA_VALUEPICTURE_Display);
strLocalDate = FX_UTF8Encode(wsRet.c_str(), wsRet.GetLength());
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::IsoTime2Local(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szTime,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strLocalTime) {
+bool CXFA_FM2JSContext::IsoTime2Local(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szTime,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strLocalTime) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr();
IFX_Locale* pLocale = nullptr;
@@ -2070,7 +2070,7 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(CFXJSE_Value* pThis,
pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale)
- return FALSE;
+ return false;
CFX_WideString wsFormat;
if (szFormat.IsEmpty())
@@ -2085,18 +2085,18 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(CFXJSE_Value* pThis,
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
XFA_VALUEPICTURE_Display);
strLocalTime = FX_UTF8Encode(wsRet.c_str(), wsRet.GetLength());
- return TRUE;
+ return true;
}
// static
-FX_BOOL CXFA_FM2JSContext::GetGMTTime(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szTime,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strGMTTime) {
+bool CXFA_FM2JSContext::GetGMTTime(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szTime,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strGMTTime) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr();
IFX_Locale* pLocale = nullptr;
@@ -2109,7 +2109,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(CFXJSE_Value* pThis,
pLocale = pMgr->GetLocaleByName(CFX_WideString::FromUTF8(szLocale));
}
if (!pLocale)
- return FALSE;
+ return false;
CFX_WideString wsFormat;
if (szFormat.IsEmpty())
@@ -2124,7 +2124,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(CFXJSE_Value* pThis,
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
XFA_VALUEPICTURE_Display);
strGMTTime = FX_UTF8Encode(wsRet.c_str(), wsRet.GetLength());
- return TRUE;
+ return true;
}
// static
@@ -2189,7 +2189,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat,
- FX_BOOL bStandard) {
+ bool bStandard) {
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
case 1:
@@ -2240,7 +2240,7 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat,
- FX_BOOL bStandard) {
+ bool bStandard) {
FX_LOCALEDATETIMESUBCATEGORY strStyle;
switch (iStyle) {
case 1:
@@ -2291,7 +2291,7 @@ void CXFA_FM2JSContext::GetStandardDateFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat) {
- GetLocalDateFormat(pThis, iStyle, szLocalStr, strFormat, TRUE);
+ GetLocalDateFormat(pThis, iStyle, szLocalStr, strFormat, true);
}
// static
@@ -2299,7 +2299,7 @@ void CXFA_FM2JSContext::GetStandardTimeFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat) {
- GetLocalTimeFormat(pThis, iStyle, szLocalStr, strFormat, TRUE);
+ GetLocalTimeFormat(pThis, iStyle, szLocalStr, strFormat, true);
}
// static
@@ -2307,7 +2307,7 @@ void CXFA_FM2JSContext::Num2AllTime(CFXJSE_Value* pThis,
int32_t iTime,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
- FX_BOOL bGM,
+ bool bGM,
CFX_ByteString& strTime) {
int32_t iHour = 0;
int32_t iMin = 0;
@@ -2326,7 +2326,7 @@ void CXFA_FM2JSContext::Num2AllTime(CFXJSE_Value* pThis,
iSec += iZoneSec;
}
- FX_BOOL iRet = FALSE;
+ bool iRet = false;
CFX_ByteString strIsoTime;
strIsoTime.Format("%02d:%02d:%02d", iHour, iMin, iSec);
if (bGM) {
@@ -2796,8 +2796,8 @@ void CXFA_FM2JSContext::Choose(CFXJSE_Value* pThis,
return;
}
- FX_BOOL bFound = FALSE;
- FX_BOOL bStopCounterFlags = FALSE;
+ bool bFound = false;
+ bool bStopCounterFlags = false;
int32_t iArgIndex = 1;
int32_t iValueIndex = 0;
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
@@ -2808,7 +2808,7 @@ void CXFA_FM2JSContext::Choose(CFXJSE_Value* pThis,
argIndexValue->GetObjectProperty("length", lengthValue.get());
int32_t iLength = lengthValue->ToInteger();
if (iLength > 3)
- bStopCounterFlags = TRUE;
+ bStopCounterFlags = true;
iValueIndex += (iLength - 2);
if (iValueIndex >= iIndex) {
@@ -2828,7 +2828,7 @@ void CXFA_FM2JSContext::Choose(CFXJSE_Value* pThis,
CFX_ByteString bsChoosed;
ValueToUTF8String(newPropertyValue.get(), bsChoosed);
args.GetReturnValue()->SetString(bsChoosed.AsStringC());
- bFound = TRUE;
+ bFound = true;
}
} else {
iValueIndex++;
@@ -2836,7 +2836,7 @@ void CXFA_FM2JSContext::Choose(CFXJSE_Value* pThis,
CFX_ByteString bsChoosed;
ValueToUTF8String(argIndexValue.get(), bsChoosed);
args.GetReturnValue()->SetString(bsChoosed.AsStringC());
- bFound = TRUE;
+ bFound = true;
}
}
iArgIndex++;
@@ -2889,14 +2889,14 @@ void CXFA_FM2JSContext::Oneof(CFXJSE_Value* pThis,
return;
}
- FX_BOOL bFlags = FALSE;
+ bool bFlags = false;
std::unique_ptr<CFXJSE_Value> argOne = GetSimpleValue(pThis, args, 0);
CFXJSE_Value** parametersValue = nullptr;
int32_t iCount = 0;
unfoldArgs(pThis, args, parametersValue, iCount, 1);
for (int32_t i = 0; i < iCount; i++) {
if (simpleValueCompare(pThis, argOne.get(), parametersValue[i])) {
- bFlags = TRUE;
+ bFlags = true;
break;
}
}
@@ -3360,13 +3360,13 @@ void CXFA_FM2JSContext::Concat(CFXJSE_Value* pThis,
}
CFX_ByteString resultString;
- FX_BOOL bAllNull = TRUE;
+ bool bAllNull = true;
for (int32_t i = 0; i < argc; i++) {
std::unique_ptr<CFXJSE_Value> value = GetSimpleValue(pThis, args, i);
if (ValueIsNull(pThis, value.get()))
continue;
- bAllNull = FALSE;
+ bAllNull = false;
CFX_ByteString valueStr;
ValueToUTF8String(value.get(), valueStr);
@@ -3933,8 +3933,8 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
}
// static
-FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
- uint32_t& iCode) {
+bool CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
+ uint32_t& iCode) {
uint32_t uHash = FX_HashCode_GetW(pData, false);
int32_t iStart = 0;
int32_t iEnd = FX_ArraySize(reservesForDecode) - 1;
@@ -3943,7 +3943,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
XFA_FMHtmlHashedReserveCode htmlhashedreservecode = reservesForDecode[iMid];
if (uHash == htmlhashedreservecode.m_uHash) {
iCode = htmlhashedreservecode.m_uCode;
- return TRUE;
+ return true;
}
if (uHash < htmlhashedreservecode.m_uHash)
@@ -3951,12 +3951,12 @@ FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
else
iStart = iMid + 1;
} while (iStart <= iEnd);
- return FALSE;
+ return false;
}
// static
-FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode,
- CFX_WideString& wsHTMLReserve) {
+bool CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode,
+ CFX_WideString& wsHTMLReserve) {
int32_t iStart = 0;
int32_t iEnd = FX_ArraySize(reservesForEncode) - 1;
do {
@@ -3964,7 +3964,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode,
XFA_FMHtmlReserveCode htmlreservecode = reservesForEncode[iMid];
if (iCode == htmlreservecode.m_uCode) {
wsHTMLReserve = htmlreservecode.m_htmlReserve;
- return TRUE;
+ return true;
}
if (iCode < htmlreservecode.m_uCode)
@@ -3972,7 +3972,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode,
else
iStart = iMid + 1;
} while (iStart <= iEnd);
- return FALSE;
+ return false;
}
// static
@@ -5190,12 +5190,12 @@ void CXFA_FM2JSContext::notequality_operator(CFXJSE_Value* pThis,
}
// static
-FX_BOOL CXFA_FM2JSContext::fm_ref_equal(CFXJSE_Value* pThis,
- CFXJSE_Arguments& args) {
+bool CXFA_FM2JSContext::fm_ref_equal(CFXJSE_Value* pThis,
+ CFXJSE_Arguments& args) {
std::unique_ptr<CFXJSE_Value> argFirst = args.GetValue(0);
std::unique_ptr<CFXJSE_Value> argSecond = args.GetValue(1);
if (!argFirst->IsArray() || !argSecond->IsArray())
- return FALSE;
+ return false;
v8::Isolate* pIsolate = ToJSContext(pThis, nullptr)->GetScriptRuntime();
std::unique_ptr<CFXJSE_Value> firstFlagValue(new CFXJSE_Value(pIsolate));
@@ -5203,14 +5203,14 @@ FX_BOOL CXFA_FM2JSContext::fm_ref_equal(CFXJSE_Value* pThis,
argFirst->GetObjectPropertyByIdx(0, firstFlagValue.get());
argSecond->GetObjectPropertyByIdx(0, secondFlagValue.get());
if (firstFlagValue->ToInteger() != 3 || secondFlagValue->ToInteger() != 3)
- return FALSE;
+ return false;
std::unique_ptr<CFXJSE_Value> firstJSObject(new CFXJSE_Value(pIsolate));
std::unique_ptr<CFXJSE_Value> secondJSObject(new CFXJSE_Value(pIsolate));
argFirst->GetObjectPropertyByIdx(2, firstJSObject.get());
argSecond->GetObjectPropertyByIdx(2, secondJSObject.get());
if (firstJSObject->IsNull() || secondJSObject->IsNull())
- return FALSE;
+ return false;
return (firstJSObject->ToHostObject(nullptr) ==
secondJSObject->ToHostObject(nullptr));
@@ -5505,14 +5505,14 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
iSizes[i] = 0;
std::unique_ptr<CFXJSE_Value> hJSObjValue(new CFXJSE_Value(pIsolate));
- FX_BOOL bAttribute = FALSE;
+ bool bAttribute = false;
int32_t iCounter = 0;
for (int32_t i = 2; i < iLength; i++) {
argAccessor->GetObjectPropertyByIdx(i, hJSObjValue.get());
XFA_RESOLVENODE_RS resoveNodeRS;
if (ResolveObjects(pThis, hJSObjValue.get(), szSomExp.AsStringC(),
- resoveNodeRS, TRUE, szName.IsEmpty()) > 0) {
+ resoveNodeRS, true, szName.IsEmpty()) > 0) {
ParseResolveResult(pThis, resoveNodeRS, hJSObjValue.get(),
hResolveValues[i - 2], iSizes[i - 2], bAttribute);
iCounter += iSizes[i - 2];
@@ -5570,12 +5570,12 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
if (argAccessor->IsObject() ||
(argAccessor->IsNull() && bsAccessorName.IsEmpty())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
- resoveNodeRS, TRUE, szName.IsEmpty());
+ resoveNodeRS, true, szName.IsEmpty());
} else if (!argAccessor->IsObject() && !bsAccessorName.IsEmpty() &&
GetObjectForName(pThis, argAccessor.get(),
bsAccessorName.AsStringC())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
- resoveNodeRS, TRUE, szName.IsEmpty());
+ resoveNodeRS, true, szName.IsEmpty());
}
if (iRet < 1) {
CFX_WideString wsPropertyName =
@@ -5589,7 +5589,7 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
CFXJSE_Value** hResolveValues;
int32_t iSize = 0;
- FX_BOOL bAttribute = FALSE;
+ bool bAttribute = false;
ParseResolveResult(pThis, resoveNodeRS, argAccessor.get(), hResolveValues,
iSize, bAttribute);
CFXJSE_Value** rgValues = FX_Alloc(CFXJSE_Value*, iSize + 2);
@@ -5649,12 +5649,12 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
CFXJSE_Value*** hResolveValues = FX_Alloc(CFXJSE_Value**, iLength - 2);
int32_t* iSizes = FX_Alloc(int32_t, iLength - 2);
std::unique_ptr<CFXJSE_Value> hJSObjValue(new CFXJSE_Value(pIsolate));
- FX_BOOL bAttribute = FALSE;
+ bool bAttribute = false;
for (int32_t i = 2; i < iLength; i++) {
argAccessor->GetObjectPropertyByIdx(i, hJSObjValue.get());
XFA_RESOLVENODE_RS resoveNodeRS;
if (ResolveObjects(pThis, hJSObjValue.get(), szSomExp.AsStringC(),
- resoveNodeRS, FALSE) > 0) {
+ resoveNodeRS, false) > 0) {
ParseResolveResult(pThis, resoveNodeRS, hJSObjValue.get(),
hResolveValues[i - 2], iSizes[i - 2], bAttribute);
iCounter += iSizes[i - 2];
@@ -5708,12 +5708,12 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
if (argAccessor->IsObject() ||
(argAccessor->IsNull() && bsAccessorName.IsEmpty())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
- resoveNodeRS, FALSE);
+ resoveNodeRS, false);
} else if (!argAccessor->IsObject() && !bsAccessorName.IsEmpty() &&
GetObjectForName(pThis, argAccessor.get(),
bsAccessorName.AsStringC())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
- resoveNodeRS, FALSE);
+ resoveNodeRS, false);
}
if (iRet < 1) {
CFX_WideString wsPropertyName =
@@ -5727,7 +5727,7 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
CFXJSE_Value** hResolveValues;
int32_t iSize = 0;
- FX_BOOL bAttribute = FALSE;
+ bool bAttribute = false;
ParseResolveResult(pThis, resoveNodeRS, argAccessor.get(), hResolveValues,
iSize, bAttribute);
CFXJSE_Value** rgValues = FX_Alloc(CFXJSE_Value*, iSize + 2);
@@ -5792,7 +5792,7 @@ void CXFA_FM2JSContext::is_fm_object(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
if (args.GetLength() != 1) {
- args.GetReturnValue()->SetBoolean(FALSE);
+ args.GetReturnValue()->SetBoolean(false);
return;
}
@@ -5805,7 +5805,7 @@ void CXFA_FM2JSContext::is_fm_array(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
if (args.GetLength() != 1) {
- args.GetReturnValue()->SetBoolean(FALSE);
+ args.GetReturnValue()->SetBoolean(false);
return;
}
@@ -6017,18 +6017,18 @@ std::unique_ptr<CFXJSE_Value> CXFA_FM2JSContext::GetSimpleValue(
}
// static
-FX_BOOL CXFA_FM2JSContext::ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* arg) {
+bool CXFA_FM2JSContext::ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* arg) {
if (!arg || arg->IsNull())
- return TRUE;
+ return true;
if (!arg->IsArray() && !arg->IsObject())
- return FALSE;
+ return false;
v8::Isolate* pIsolate = ToJSContext(pThis, nullptr)->GetScriptRuntime();
if (arg->IsArray()) {
int32_t iLength = hvalue_get_array_length(pThis, arg);
if (iLength < 3)
- return TRUE;
+ return true;
std::unique_ptr<CFXJSE_Value> propertyValue(new CFXJSE_Value(pIsolate));
std::unique_ptr<CFXJSE_Value> jsObjectValue(new CFXJSE_Value(pIsolate));
@@ -6064,11 +6064,11 @@ int32_t CXFA_FM2JSContext::hvalue_get_array_length(CFXJSE_Value* pThis,
}
// static
-FX_BOOL CXFA_FM2JSContext::simpleValueCompare(CFXJSE_Value* pThis,
- CFXJSE_Value* firstValue,
- CFXJSE_Value* secondValue) {
+bool CXFA_FM2JSContext::simpleValueCompare(CFXJSE_Value* pThis,
+ CFXJSE_Value* firstValue,
+ CFXJSE_Value* secondValue) {
if (!firstValue)
- return FALSE;
+ return false;
if (firstValue->IsString()) {
CFX_ByteString firstString, secondString;
@@ -6157,18 +6157,18 @@ void CXFA_FM2JSContext::GetObjectDefaultValue(CFXJSE_Value* pValue,
pDefaultValue->SetNull();
return;
}
- pNode->Script_Som_DefaultValue(pDefaultValue, FALSE, (XFA_ATTRIBUTE)-1);
+ pNode->Script_Som_DefaultValue(pDefaultValue, false, (XFA_ATTRIBUTE)-1);
}
// static
-FX_BOOL CXFA_FM2JSContext::SetObjectDefaultValue(CFXJSE_Value* pValue,
- CFXJSE_Value* hNewValue) {
+bool CXFA_FM2JSContext::SetObjectDefaultValue(CFXJSE_Value* pValue,
+ CFXJSE_Value* hNewValue) {
CXFA_Node* pNode = ToNode(CXFA_ScriptContext::ToObject(pValue, nullptr));
if (!pNode)
- return FALSE;
+ return false;
- pNode->Script_Som_DefaultValue(hNewValue, TRUE, (XFA_ATTRIBUTE)-1);
- return TRUE;
+ pNode->Script_Som_DefaultValue(hNewValue, true, (XFA_ATTRIBUTE)-1);
+ return true;
}
// static
@@ -6203,13 +6203,13 @@ void CXFA_FM2JSContext::GenerateSomExpression(const CFX_ByteStringC& szName,
}
// static
-FX_BOOL CXFA_FM2JSContext::GetObjectForName(
+bool CXFA_FM2JSContext::GetObjectForName(
CFXJSE_Value* pThis,
CFXJSE_Value* accessorValue,
const CFX_ByteStringC& szAccessorName) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
- return FALSE;
+ return false;
CXFA_ScriptContext* pScriptContext = pDoc->GetScriptContext();
XFA_RESOLVENODE_RS resoveNodeRS;
@@ -6222,9 +6222,9 @@ FX_BOOL CXFA_FM2JSContext::GetObjectForName(
if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
accessorValue->Assign(
pScriptContext->GetJSValueFromMap(resoveNodeRS.nodes.GetAt(0)));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// static
@@ -6232,8 +6232,8 @@ int32_t CXFA_FM2JSContext::ResolveObjects(CFXJSE_Value* pThis,
CFXJSE_Value* pRefValue,
const CFX_ByteStringC& bsSomExp,
XFA_RESOLVENODE_RS& resoveNodeRS,
- FX_BOOL bdotAccessor,
- FX_BOOL bHasNoResolveName) {
+ bool bdotAccessor,
+ bool bHasNoResolveName) {
CXFA_Document* pDoc = ToJSContext(pThis, nullptr)->GetDocument();
if (!pDoc)
return -1;
@@ -6252,7 +6252,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(CFXJSE_Value* pThis,
if (bHasNoResolveName) {
CFX_WideString wsName;
if (CXFA_Node* pXFANode = pNode->AsNode())
- pXFANode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE);
+ pXFANode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, false);
if (wsName.IsEmpty())
wsName = FX_WSTRC(L"#") + pNode->GetClassName();
@@ -6280,14 +6280,14 @@ void CXFA_FM2JSContext::ParseResolveResult(
CFXJSE_Value* pParentValue,
CFXJSE_Value**& resultValues,
int32_t& iSize,
- FX_BOOL& bAttribute) {
+ bool& bAttribute) {
iSize = 0;
resultValues = nullptr;
CXFA_FM2JSContext* pContext = ToJSContext(pThis, nullptr);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
- bAttribute = FALSE;
+ bAttribute = false;
iSize = resoveNodeRS.nodes.GetSize();
resultValues = FX_Alloc(CFXJSE_Value*, iSize);
for (int32_t i = 0; i < iSize; i++) {
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
index 2a81c48382..0f56c6964c 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
@@ -88,67 +88,67 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
- static FX_BOOL IsIsoDateFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iStyle,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay);
- static FX_BOOL IsIsoTimeFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iHour,
- int32_t& iMinute,
- int32_t& iSecond,
- int32_t& iMilliSecond,
- int32_t& iZoneHour,
- int32_t& iZoneMinute);
- static FX_BOOL IsIsoDateTimeFormat(const FX_CHAR* pData,
- int32_t iLength,
- int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay,
- int32_t& iHour,
- int32_t& iMinute,
- int32_t& iSecond,
- int32_t& iMillionSecond,
- int32_t& iZoneHour,
- int32_t& iZoneMinute);
- static FX_BOOL Local2IsoDate(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szDate,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strIsoDate);
- static FX_BOOL Local2IsoTime(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szTime,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strIsoTime);
- static FX_BOOL IsoDate2Local(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szDate,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strLocalDate);
- static FX_BOOL IsoTime2Local(CFXJSE_Value* pThis,
- const CFX_ByteStringC& szTime,
- const CFX_ByteStringC& szFormat,
- const CFX_ByteStringC& szLocale,
- CFX_ByteString& strLocalTime);
- static FX_BOOL GetGMTTime(CFXJSE_Value* pThis,
+ static bool IsIsoDateFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iStyle,
+ int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay);
+ static bool IsIsoTimeFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iHour,
+ int32_t& iMinute,
+ int32_t& iSecond,
+ int32_t& iMilliSecond,
+ int32_t& iZoneHour,
+ int32_t& iZoneMinute);
+ static bool IsIsoDateTimeFormat(const FX_CHAR* pData,
+ int32_t iLength,
+ int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay,
+ int32_t& iHour,
+ int32_t& iMinute,
+ int32_t& iSecond,
+ int32_t& iMillionSecond,
+ int32_t& iZoneHour,
+ int32_t& iZoneMinute);
+ static bool Local2IsoDate(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szDate,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strIsoDate);
+ static bool Local2IsoTime(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szTime,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strIsoTime);
+ static bool IsoDate2Local(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szDate,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strLocalDate);
+ static bool IsoTime2Local(CFXJSE_Value* pThis,
const CFX_ByteStringC& szTime,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
- CFX_ByteString& strGMTTime);
+ CFX_ByteString& strLocalTime);
+ static bool GetGMTTime(CFXJSE_Value* pThis,
+ const CFX_ByteStringC& szTime,
+ const CFX_ByteStringC& szFormat,
+ const CFX_ByteStringC& szLocale,
+ CFX_ByteString& strGMTTime);
static int32_t DateString2Num(const CFX_ByteStringC& szDateString);
static void GetLocalDateFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat,
- FX_BOOL bStandard);
+ bool bStandard);
static void GetLocalTimeFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
CFX_ByteString& strFormat,
- FX_BOOL bStandard);
+ bool bStandard);
static void GetStandardDateFormat(CFXJSE_Value* pThis,
int32_t iStyle,
const CFX_ByteStringC& szLocalStr,
@@ -162,7 +162,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
int32_t iTime,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
- FX_BOOL bGM,
+ bool bGM,
CFX_ByteString& strTime);
static void GetLocalTimeZone(int32_t& iHour, int32_t& iMin, int32_t& iSec);
@@ -251,8 +251,8 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
CFX_ByteTextBuf& szResultBuf);
static void EncodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultBuf);
- static FX_BOOL HTMLSTR2Code(const CFX_WideStringC& pData, uint32_t& iCode);
- static FX_BOOL HTMLCode2STR(uint32_t iCode, CFX_WideString& wsHTMLReserve);
+ static bool HTMLSTR2Code(const CFX_WideStringC& pData, uint32_t& iCode);
+ static bool HTMLCode2STR(uint32_t iCode, CFX_WideString& wsHTMLReserve);
static void Format(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
@@ -331,7 +331,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
static void notequality_operator(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
- static FX_BOOL fm_ref_equal(CFXJSE_Value* pThis, CFXJSE_Arguments& args);
+ static bool fm_ref_equal(CFXJSE_Value* pThis, CFXJSE_Arguments& args);
static void less_operator(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
@@ -395,9 +395,9 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
static int32_t hvalue_get_array_length(CFXJSE_Value* pThis,
CFXJSE_Value* arg);
- static FX_BOOL simpleValueCompare(CFXJSE_Value* pThis,
- CFXJSE_Value* firstValue,
- CFXJSE_Value* secondValue);
+ static bool simpleValueCompare(CFXJSE_Value* pThis,
+ CFXJSE_Value* firstValue,
+ CFXJSE_Value* secondValue);
static void unfoldArgs(CFXJSE_Value* pThis,
CFXJSE_Arguments& args,
CFXJSE_Value**& resultValues,
@@ -405,33 +405,33 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
int32_t iStart = 0);
static void GetObjectDefaultValue(CFXJSE_Value* pObjectValue,
CFXJSE_Value* pDefaultValue);
- static FX_BOOL SetObjectDefaultValue(CFXJSE_Value* pObjectValue,
- CFXJSE_Value* pNewValue);
+ static bool SetObjectDefaultValue(CFXJSE_Value* pObjectValue,
+ CFXJSE_Value* pNewValue);
static void GenerateSomExpression(const CFX_ByteStringC& szName,
int32_t iIndexFlags,
int32_t iIndexValue,
bool bIsStar,
CFX_ByteString& szSomExp);
- static FX_BOOL GetObjectForName(CFXJSE_Value* pThis,
- CFXJSE_Value* accessorValue,
- const CFX_ByteStringC& szAccessorName);
+ static bool GetObjectForName(CFXJSE_Value* pThis,
+ CFXJSE_Value* accessorValue,
+ const CFX_ByteStringC& szAccessorName);
static int32_t ResolveObjects(CFXJSE_Value* pThis,
CFXJSE_Value* pParentValue,
const CFX_ByteStringC& bsSomExp,
XFA_RESOLVENODE_RS& resoveNodeRS,
- FX_BOOL bdotAccessor = TRUE,
- FX_BOOL bHasNoResolveName = FALSE);
+ bool bdotAccessor = true,
+ bool bHasNoResolveName = false);
static void ParseResolveResult(CFXJSE_Value* pThis,
const XFA_RESOLVENODE_RS& resoveNodeRS,
CFXJSE_Value* pParentValue,
CFXJSE_Value**& resultValues,
int32_t& iSize,
- FX_BOOL& bAttribute);
+ bool& bAttribute);
static std::unique_ptr<CFXJSE_Value> GetSimpleValue(CFXJSE_Value* pThis,
CFXJSE_Arguments& args,
uint32_t index);
- static FX_BOOL ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
+ static bool ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static int32_t ValueToInteger(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static FX_FLOAT ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
static FX_DOUBLE ValueToDouble(CFXJSE_Value* pThis, CFXJSE_Value* pValue);
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp
index 3223df64dc..530ca85325 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.cpp
+++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp
@@ -573,7 +573,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
}
}
if (m_pErrorInfo->message.IsEmpty()) {
- e = new CXFA_FMCallExpression(line, e, pArray.release(), FALSE);
+ e = new CXFA_FMCallExpression(line, e, pArray.release(), false);
NextToken();
if (m_pToken->m_type != TOKlbracket) {
continue;
@@ -629,7 +629,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
CXFA_FMSimpleExpression* pIdentifier =
new CXFA_FMIdentifierExpression(tempLine, tempStr);
pExpCall = new CXFA_FMCallExpression(line, pIdentifier,
- pArray.release(), TRUE);
+ pArray.release(), true);
e = new CXFA_FMMethodCallExpression(line, pExpAccessor, pExpCall);
NextToken();
if (m_pToken->m_type != TOKlbracket) {
@@ -661,7 +661,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
s.release());
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
- tempLine, ACCESSOR_NO_INDEX, nullptr, FALSE);
+ tempLine, ACCESSOR_NO_INDEX, nullptr, false);
e = new CXFA_FMDotAccessorExpression(line, e, TOKdot, tempStr, s);
continue;
}
@@ -688,7 +688,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
tempStr, s.release());
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
- tempLine, ACCESSOR_NO_INDEX, nullptr, FALSE);
+ tempLine, ACCESSOR_NO_INDEX, nullptr, false);
e = new CXFA_FMDotDotAccessorExpression(line, e, TOKdotdot, tempStr,
s);
continue;
@@ -716,7 +716,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
tempStr, s.release());
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
- tempLine, ACCESSOR_NO_INDEX, nullptr, FALSE);
+ tempLine, ACCESSOR_NO_INDEX, nullptr, false);
e = new CXFA_FMDotAccessorExpression(line, e, TOKdotscream, tempStr,
s);
continue;
@@ -730,7 +730,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression(
break;
case TOKdotstar: {
CXFA_FMSimpleExpression* s =
- new CXFA_FMIndexExpression(line, ACCESSOR_NO_INDEX, nullptr, FALSE);
+ new CXFA_FMIndexExpression(line, ACCESSOR_NO_INDEX, nullptr, false);
e = new CXFA_FMDotAccessorExpression(line, e, TOKdotstar,
FX_WSTRC(L"*"), s);
} break;
@@ -750,7 +750,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseIndexExpression() {
XFA_FM_AccessorIndex accessorIndex = ACCESSOR_NO_RELATIVEINDEX;
if (m_pToken->m_type == TOKmul) {
pExp.reset(
- new CXFA_FMIndexExpression(line, accessorIndex, s.release(), TRUE));
+ new CXFA_FMIndexExpression(line, accessorIndex, s.release(), true));
NextToken();
if (m_pToken->m_type != TOKrbracket) {
CFX_WideString ws_TempString(m_pToken->m_wstring);
@@ -774,7 +774,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParseIndexExpression() {
XFA_FM_KeywordToString(TOKrparen), ws_TempString.c_str());
} else {
pExp.reset(
- new CXFA_FMIndexExpression(line, accessorIndex, s.release(), FALSE));
+ new CXFA_FMIndexExpression(line, accessorIndex, s.release(), false));
}
return pExp.release();
}
diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp
index 2e8b6fed59..6e844bcdf0 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.cpp
+++ b/xfa/fxfa/fm2js/xfa_lexer.cpp
@@ -20,36 +20,32 @@ struct XFA_FMDChar {
return p;
}
static uint16_t get(const FX_WCHAR* p) { return *p; }
- static FX_BOOL isWhiteSpace(const FX_WCHAR* p) {
+ static bool isWhiteSpace(const FX_WCHAR* p) {
return (*p) == 0x09 || (*p) == 0x0b || (*p) == 0x0c || (*p) == 0x20;
}
- static FX_BOOL isLineTerminator(const FX_WCHAR* p) {
+ static bool isLineTerminator(const FX_WCHAR* p) {
return *p == 0x0A || *p == 0x0D;
}
- static FX_BOOL isBinary(const FX_WCHAR* p) {
- return (*p) >= '0' && (*p) <= '1';
- }
- static FX_BOOL isOctal(const FX_WCHAR* p) {
- return (*p) >= '0' && (*p) <= '7';
- }
- static FX_BOOL isDigital(const FX_WCHAR* p) {
+ static bool isBinary(const FX_WCHAR* p) { return (*p) >= '0' && (*p) <= '1'; }
+ static bool isOctal(const FX_WCHAR* p) { return (*p) >= '0' && (*p) <= '7'; }
+ static bool isDigital(const FX_WCHAR* p) {
return (*p) >= '0' && (*p) <= '9';
}
- static FX_BOOL isHex(const FX_WCHAR* p) {
+ static bool isHex(const FX_WCHAR* p) {
return isDigital(p) || ((*p) >= 'a' && (*p) <= 'f') ||
((*p) >= 'A' && (*p) <= 'F');
}
- static FX_BOOL isAlpha(const FX_WCHAR* p) {
+ static bool isAlpha(const FX_WCHAR* p) {
return ((*p) <= 'z' && (*p) >= 'a') || ((*p) <= 'Z' && (*p) >= 'A');
}
- static FX_BOOL isAvalid(const FX_WCHAR* p, FX_BOOL flag = 0);
- static FX_BOOL string2number(const FX_WCHAR* s,
- FX_DOUBLE* pValue,
- const FX_WCHAR*& pEnd);
- static FX_BOOL isUnicodeAlpha(uint16_t ch);
+ static bool isAvalid(const FX_WCHAR* p, bool flag = 0);
+ static bool string2number(const FX_WCHAR* s,
+ FX_DOUBLE* pValue,
+ const FX_WCHAR*& pEnd);
+ static bool isUnicodeAlpha(uint16_t ch);
};
-inline FX_BOOL XFA_FMDChar::isAvalid(const FX_WCHAR* p, FX_BOOL flag) {
+inline bool XFA_FMDChar::isAvalid(const FX_WCHAR* p, bool flag) {
if (*p == 0) {
return 1;
}
@@ -65,24 +61,24 @@ inline FX_BOOL XFA_FMDChar::isAvalid(const FX_WCHAR* p, FX_BOOL flag) {
return 0;
}
-inline FX_BOOL XFA_FMDChar::string2number(const FX_WCHAR* s,
- FX_DOUBLE* pValue,
- const FX_WCHAR*& pEnd) {
+inline bool XFA_FMDChar::string2number(const FX_WCHAR* s,
+ FX_DOUBLE* pValue,
+ const FX_WCHAR*& pEnd) {
if (s) {
*pValue = wcstod((wchar_t*)s, (wchar_t**)&pEnd);
}
return 0;
}
-inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(uint16_t ch) {
+inline bool XFA_FMDChar::isUnicodeAlpha(uint16_t ch) {
if (ch == 0 || ch == 0x0A || ch == 0x0D || ch == 0x09 || ch == 0x0B ||
ch == 0x0C || ch == 0x20 || ch == '.' || ch == ';' || ch == '"' ||
ch == '=' || ch == '<' || ch == '>' || ch == ',' || ch == '(' ||
ch == ')' || ch == ']' || ch == '[' || ch == '&' || ch == '|' ||
ch == '+' || ch == '-' || ch == '*' || ch == '/') {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
const XFA_FMKeyword keyWords[] = {
@@ -542,9 +538,9 @@ void CXFA_FMLexer::Error(const FX_WCHAR* msg, ...) {
va_end(ap);
}
-FX_BOOL CXFA_FMLexer::HasError() const {
+bool CXFA_FMLexer::HasError() const {
if (m_pErrorInfo->message.IsEmpty()) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/fm2js/xfa_lexer.h b/xfa/fxfa/fm2js/xfa_lexer.h
index 220a4d7630..9395c06814 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.h
+++ b/xfa/fxfa/fm2js/xfa_lexer.h
@@ -122,7 +122,7 @@ class CXFA_FMLexer {
const FX_WCHAR* SavePos() { return m_ptr; }
void RestorePos(const FX_WCHAR* pPos) { m_ptr = pPos; }
void Error(const FX_WCHAR* msg, ...);
- FX_BOOL HasError() const;
+ bool HasError() const;
protected:
CXFA_FMToken* Scan();
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
index fdae9fc772..be02e51ec4 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
@@ -342,7 +342,7 @@ void CXFA_FMEqualityExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[NOTEQUALITY];
break;
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
javascript << FX_WSTRC(L"(");
@@ -378,7 +378,7 @@ void CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[GREATEREQUAL];
break;
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
javascript << FX_WSTRC(L"(");
@@ -404,7 +404,7 @@ void CXFA_FMAdditiveExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[MINUS];
break;
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
javascript << FX_WSTRC(L"(");
@@ -431,7 +431,7 @@ void CXFA_FMMultiplicativeExpression::ToJavaScript(
javascript << gs_lpStrExpFuncName[DIVIDE];
break;
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
javascript << FX_WSTRC(L"(");
@@ -478,7 +478,7 @@ CXFA_FMCallExpression::CXFA_FMCallExpression(
uint32_t line,
CXFA_FMSimpleExpression* pExp,
CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* pArguments,
- FX_BOOL bIsSomMethod)
+ bool bIsSomMethod)
: CXFA_FMUnaryExpression(line, TOKcall, pExp),
m_bIsSomMethod(bIsSomMethod),
m_pArguments(pArguments) {}
@@ -666,7 +666,7 @@ CXFA_FMIndexExpression::CXFA_FMIndexExpression(
uint32_t line,
XFA_FM_AccessorIndex accessorIndex,
CXFA_FMSimpleExpression* pIndexExp,
- FX_BOOL bIsStarIndex)
+ bool bIsStarIndex)
: CXFA_FMUnaryExpression(line, TOKlbracket, pIndexExp),
m_accessorIndex(accessorIndex),
m_bIsStarIndex(bIsStarIndex) {}
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.h b/xfa/fxfa/fm2js/xfa_simpleexpression.h
index f0f2f390d5..6c1e6257bd 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.h
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.h
@@ -231,7 +231,7 @@ class CXFA_FMCallExpression : public CXFA_FMUnaryExpression {
CXFA_FMCallExpression(uint32_t line,
CXFA_FMSimpleExpression* pExp,
CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* pArguments,
- FX_BOOL bIsSomMethod);
+ bool bIsSomMethod);
~CXFA_FMCallExpression() override;
bool IsBuildInFunc(CFX_WideTextBuf* funcName);
@@ -239,7 +239,7 @@ class CXFA_FMCallExpression : public CXFA_FMUnaryExpression {
void ToJavaScript(CFX_WideTextBuf& javascript) override;
private:
- FX_BOOL m_bIsSomMethod;
+ bool m_bIsSomMethod;
CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* m_pArguments;
};
@@ -262,13 +262,13 @@ class CXFA_FMIndexExpression : public CXFA_FMUnaryExpression {
CXFA_FMIndexExpression(uint32_t line,
XFA_FM_AccessorIndex accessorIndex,
CXFA_FMSimpleExpression* pIndexExp,
- FX_BOOL bIsStarIndex);
+ bool bIsStarIndex);
~CXFA_FMIndexExpression() override {}
void ToJavaScript(CFX_WideTextBuf& javascript) override;
private:
XFA_FM_AccessorIndex m_accessorIndex;
- FX_BOOL m_bIsStarIndex;
+ bool m_bIsStarIndex;
};
class CXFA_FMDotDotAccessorExpression : public CXFA_FMBinExpression {
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp
index 3c0a69c100..534fc18a6f 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression_unittest.cpp
@@ -19,7 +19,7 @@ TEST(FMCallExpression, more_than_32_arguments) {
for (size_t i = 0; i < 50; i++)
args->Add(new CXFA_FMSimpleExpression(0, TOKnan));
- CXFA_FMCallExpression callExp(0, exp.release(), args.release(), TRUE);
+ CXFA_FMCallExpression callExp(0, exp.release(), args.release(), true);
CFX_WideTextBuf js;
callExp.ToJavaScript(js);
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index 8abee52c36..d3ae838315 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -223,7 +223,7 @@ class IXFA_AppProvider {
virtual CFX_WideString Response(const CFX_WideString& wsQuestion,
const CFX_WideString& wsTitle = L"",
const CFX_WideString& wsDefaultAnswer = L"",
- FX_BOOL bMask = TRUE) = 0;
+ bool bMask = true) = 0;
/**
* Download something from somewhere.
@@ -245,14 +245,14 @@ class IXFA_AppProvider {
* @param[in] wsHeader any additional HTTP headers to be included in the
* post.
* @param[out] wsResponse decoded response from server.
- * @return TRUE Server permitted the post request, FALSE otherwise.
+ * @return true Server permitted the post request, false otherwise.
*/
- virtual FX_BOOL PostRequestURL(const CFX_WideString& wsURL,
- const CFX_WideString& wsData,
- const CFX_WideString& wsContentType,
- const CFX_WideString& wsEncode,
- const CFX_WideString& wsHeader,
- CFX_WideString& wsResponse) = 0;
+ virtual bool PostRequestURL(const CFX_WideString& wsURL,
+ const CFX_WideString& wsData,
+ const CFX_WideString& wsContentType,
+ const CFX_WideString& wsEncode,
+ const CFX_WideString& wsHeader,
+ CFX_WideString& wsResponse) = 0;
/**
* PUT data to the given url.
@@ -260,11 +260,11 @@ class IXFA_AppProvider {
* @param[in] wsData the data being uploaded.
* @param[in] wsEncode the encode of data including UTF-8, UTF-16,
* ISO8859-1, any recognized [IANA]character encoding
- * @return TRUE Server permitted the post request, FALSE otherwise.
+ * @return true Server permitted the post request, false otherwise.
*/
- virtual FX_BOOL PutRequestURL(const CFX_WideString& wsURL,
- const CFX_WideString& wsData,
- const CFX_WideString& wsEncode) = 0;
+ virtual bool PutRequestURL(const CFX_WideString& wsURL,
+ const CFX_WideString& wsData,
+ const CFX_WideString& wsEncode) = 0;
virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0;
virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
@@ -279,14 +279,14 @@ class IXFA_DocEnvironment {
const CFX_RectF& rt,
uint32_t dwFlags) = 0;
virtual void DisplayCaret(CXFA_FFWidget* hWidget,
- FX_BOOL bVisible,
+ bool bVisible,
const CFX_RectF* pRtAnchor) = 0;
- virtual FX_BOOL GetPopupPos(CXFA_FFWidget* hWidget,
- FX_FLOAT fMinPopup,
- FX_FLOAT fMaxPopup,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) = 0;
- virtual FX_BOOL PopupMenu(CXFA_FFWidget* hWidget, CFX_PointF ptPopup) = 0;
+ virtual bool GetPopupPos(CXFA_FFWidget* hWidget,
+ FX_FLOAT fMinPopup,
+ FX_FLOAT fMaxPopup,
+ const CFX_RectF& rtAnchor,
+ CFX_RectF& rtPopup) = 0;
+ virtual bool PopupMenu(CXFA_FFWidget* hWidget, CFX_PointF ptPopup) = 0;
virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags) = 0;
virtual void WidgetPostAdd(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetData) = 0;
@@ -296,16 +296,16 @@ class IXFA_DocEnvironment {
virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0;
virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0;
virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0;
- virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0;
- virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0;
+ virtual bool IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0;
+ virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, bool bEnabled) = 0;
virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0;
virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0;
virtual void ExportData(CXFA_FFDoc* hDoc,
const CFX_WideString& wsFilePath,
- FX_BOOL bXDP) = 0;
+ bool bXDP) = 0;
virtual void GotoURL(CXFA_FFDoc* hDoc, const CFX_WideString& bsURL) = 0;
- virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0;
- virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0;
+ virtual bool IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0;
+ virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, bool bEnabled) = 0;
virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0;
virtual void Print(CXFA_FFDoc* hDoc,
int32_t nStartPage,
@@ -313,13 +313,13 @@ class IXFA_DocEnvironment {
uint32_t dwOptions) = 0;
virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0;
- virtual FX_BOOL SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0;
- virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc,
- const CFX_ByteStringC& szPropName,
- CFXJSE_Value* pValue) = 0;
- virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc,
- const CFX_ByteStringC& szPropName,
- CFXJSE_Value* pValue) = 0;
+ virtual bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0;
+ virtual bool GetGlobalProperty(CXFA_FFDoc* hDoc,
+ const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue) = 0;
+ virtual bool SetGlobalProperty(CXFA_FFDoc* hDoc,
+ const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue) = 0;
virtual IFX_SeekableReadStream* OpenLinkedFile(
CXFA_FFDoc* hDoc,
const CFX_WideString& wsLink) = 0;
@@ -335,7 +335,7 @@ class IXFA_WidgetIterator {
virtual CXFA_FFWidget* MoveToNext() = 0;
virtual CXFA_FFWidget* MoveToPrevious() = 0;
virtual CXFA_FFWidget* GetCurrentWidget() = 0;
- virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0;
+ virtual bool SetCurrentWidget(CXFA_FFWidget* hWidget) = 0;
};
#endif // XFA_FXFA_FXFA_H_
diff --git a/xfa/fxfa/fxfa_basic.h b/xfa/fxfa/fxfa_basic.h
index 77b64fa6b9..d16f50fd90 100644
--- a/xfa/fxfa/fxfa_basic.h
+++ b/xfa/fxfa/fxfa_basic.h
@@ -1009,7 +1009,7 @@ struct XFA_METHODINFO {
};
typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK)(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
enum XFA_SCRIPT_TYPE {
XFA_SCRIPT_Basic,
diff --git a/xfa/fxfa/fxfa_widget.h b/xfa/fxfa/fxfa_widget.h
index eaf7d3e3bd..6e68e841e9 100644
--- a/xfa/fxfa/fxfa_widget.h
+++ b/xfa/fxfa/fxfa_widget.h
@@ -33,8 +33,8 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
CXFA_WidgetAcc(CXFA_FFDocView* pDocView, CXFA_Node* pNode);
~CXFA_WidgetAcc();
- FX_BOOL GetName(CFX_WideString& wsName, int32_t iNameType = 0);
- FX_BOOL ProcessValueChanged();
+ bool GetName(CFX_WideString& wsName, int32_t iNameType = 0);
+ bool ProcessValueChanged();
void ResetData();
void SetImageEdit(const CFX_WideString& wsContentType,
@@ -57,11 +57,11 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
CXFA_FFWidget* GetNextWidget(CXFA_FFWidget* pWidget);
void StartWidgetLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight);
- FX_BOOL FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight);
- FX_BOOL LoadCaption();
+ bool FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight);
+ bool LoadCaption();
void LoadText();
- FX_BOOL LoadImageImage();
- FX_BOOL LoadImageEditImage();
+ bool LoadImageImage();
+ bool LoadImageEditImage();
void GetImageDpi(int32_t& iImageXDpi, int32_t& iImageYDpi);
void GetImageEditDpi(int32_t& iImageXDpi, int32_t& iImageYDpi);
CXFA_TextLayout* GetCaptionTextLayout();
@@ -83,27 +83,25 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
void ProcessScriptTestValidate(CXFA_Validate validate,
int32_t iRet,
CFXJSE_Value* pRetValue,
- FX_BOOL bVersionFlag);
- int32_t ProcessFormatTestValidate(CXFA_Validate validate,
- FX_BOOL bVersionFlag);
+ bool bVersionFlag);
+ int32_t ProcessFormatTestValidate(CXFA_Validate validate, bool bVersionFlag);
int32_t ProcessNullTestValidate(CXFA_Validate validate,
int32_t iFlags,
- FX_BOOL bVersionFlag);
- void GetValidateCaptionName(CFX_WideString& wsCaptionName,
- FX_BOOL bVersionFlag);
+ bool bVersionFlag);
+ void GetValidateCaptionName(CFX_WideString& wsCaptionName, bool bVersionFlag);
void GetValidateMessage(IXFA_AppProvider* pAppProvider,
CFX_WideString& wsMessage,
- FX_BOOL bError,
- FX_BOOL bVersionFlag);
+ bool bError,
+ bool bVersionFlag);
void CalcCaptionSize(CFX_SizeF& szCap);
- FX_BOOL CalculateFieldAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateWidgetAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateTextEditAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateCheckButtonAutoSize(CFX_SizeF& size);
- FX_BOOL CalculatePushButtonAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateImageEditAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateImageAutoSize(CFX_SizeF& size);
- FX_BOOL CalculateTextAutoSize(CFX_SizeF& size);
+ bool CalculateFieldAutoSize(CFX_SizeF& size);
+ bool CalculateWidgetAutoSize(CFX_SizeF& size);
+ bool CalculateTextEditAutoSize(CFX_SizeF& size);
+ bool CalculateCheckButtonAutoSize(CFX_SizeF& size);
+ bool CalculatePushButtonAutoSize(CFX_SizeF& size);
+ bool CalculateImageEditAutoSize(CFX_SizeF& size);
+ bool CalculateImageAutoSize(CFX_SizeF& size);
+ bool CalculateTextAutoSize(CFX_SizeF& size);
FX_FLOAT CalculateWidgetAutoHeight(FX_FLOAT fHeightCalc);
FX_FLOAT CalculateWidgetAutoWidth(FX_FLOAT fWidthCalc);
FX_FLOAT GetWidthWithoutMargin(FX_FLOAT fWidthCalc);
diff --git a/xfa/fxfa/parser/cscript_datawindow.cpp b/xfa/fxfa/parser/cscript_datawindow.cpp
index 50ed398ec0..c0354a112c 100644
--- a/xfa/fxfa/parser/cscript_datawindow.cpp
+++ b/xfa/fxfa/parser/cscript_datawindow.cpp
@@ -29,17 +29,17 @@ void CScript_DataWindow::GotoRecord(CFXJSE_Arguments* pArguments) {}
void CScript_DataWindow::IsRecordGroup(CFXJSE_Arguments* pArguments) {}
void CScript_DataWindow::RecordsBefore(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CScript_DataWindow::CurrentRecordNumber(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CScript_DataWindow::RecordsAfter(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CScript_DataWindow::IsDefined(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
diff --git a/xfa/fxfa/parser/cscript_datawindow.h b/xfa/fxfa/parser/cscript_datawindow.h
index b2b35e9c59..e41b7fe17d 100644
--- a/xfa/fxfa/parser/cscript_datawindow.h
+++ b/xfa/fxfa/parser/cscript_datawindow.h
@@ -20,17 +20,15 @@ class CScript_DataWindow : public CXFA_Object {
void GotoRecord(CFXJSE_Arguments* pArguments);
void IsRecordGroup(CFXJSE_Arguments* pArguments);
void RecordsBefore(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void CurrentRecordNumber(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void RecordsAfter(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void IsDefined(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
+ void IsDefined(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
};
#endif // XFA_FXFA_PARSER_CSCRIPT_DATAWINDOW_H_
diff --git a/xfa/fxfa/parser/cscript_eventpseudomodel.cpp b/xfa/fxfa/parser/cscript_eventpseudomodel.cpp
index dd6142c47c..8a7d80b5d3 100644
--- a/xfa/fxfa/parser/cscript_eventpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_eventpseudomodel.cpp
@@ -20,7 +20,7 @@ namespace {
void StringProperty(CFXJSE_Value* pValue,
CFX_WideString& wsValue,
- FX_BOOL bSetting) {
+ bool bSetting) {
if (bSetting) {
wsValue = pValue->ToWideString();
return;
@@ -28,7 +28,7 @@ void StringProperty(CFXJSE_Value* pValue,
pValue->SetString(FX_UTF8Encode(wsValue).AsStringC());
}
-void InterProperty(CFXJSE_Value* pValue, int32_t& iValue, FX_BOOL bSetting) {
+void InterProperty(CFXJSE_Value* pValue, int32_t& iValue, bool bSetting) {
if (bSetting) {
iValue = pValue->ToInteger();
return;
@@ -36,7 +36,7 @@ void InterProperty(CFXJSE_Value* pValue, int32_t& iValue, FX_BOOL bSetting) {
pValue->SetInteger(iValue);
}
-void BooleanProperty(CFXJSE_Value* pValue, FX_BOOL& bValue, FX_BOOL bSetting) {
+void BooleanProperty(CFXJSE_Value* pValue, bool& bValue, bool bSetting) {
if (bSetting) {
bValue = pValue->ToBoolean();
return;
@@ -56,7 +56,7 @@ CScript_EventPseudoModel::~CScript_EventPseudoModel() {}
void CScript_EventPseudoModel::Property(CFXJSE_Value* pValue,
XFA_Event dwFlag,
- FX_BOOL bSetting) {
+ bool bSetting) {
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext)
return;
@@ -121,82 +121,82 @@ void CScript_EventPseudoModel::Property(CFXJSE_Value* pValue,
}
}
void CScript_EventPseudoModel::Change(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Change, bSetting);
}
void CScript_EventPseudoModel::CommitKey(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::CommitKey, bSetting);
}
void CScript_EventPseudoModel::FullText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::FullText, bSetting);
}
void CScript_EventPseudoModel::KeyDown(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Keydown, bSetting);
}
void CScript_EventPseudoModel::Modifier(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Modifier, bSetting);
}
void CScript_EventPseudoModel::NewContentType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::NewContentType, bSetting);
}
void CScript_EventPseudoModel::NewText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::NewText, bSetting);
}
void CScript_EventPseudoModel::PrevContentType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::PreviousContentType, bSetting);
}
void CScript_EventPseudoModel::PrevText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::PreviousText, bSetting);
}
void CScript_EventPseudoModel::Reenter(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Reenter, bSetting);
}
void CScript_EventPseudoModel::SelEnd(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::SelectionEnd, bSetting);
}
void CScript_EventPseudoModel::SelStart(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::SelectionStart, bSetting);
}
void CScript_EventPseudoModel::Shift(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Shift, bSetting);
}
void CScript_EventPseudoModel::SoapFaultCode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::SoapFaultCode, bSetting);
}
void CScript_EventPseudoModel::SoapFaultString(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::SoapFaultString, bSetting);
}
void CScript_EventPseudoModel::Target(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Property(pValue, XFA_Event::Target, bSetting);
}
diff --git a/xfa/fxfa/parser/cscript_eventpseudomodel.h b/xfa/fxfa/parser/cscript_eventpseudomodel.h
index c747ad2d19..6415287c8e 100644
--- a/xfa/fxfa/parser/cscript_eventpseudomodel.h
+++ b/xfa/fxfa/parser/cscript_eventpseudomodel.h
@@ -35,52 +35,36 @@ class CScript_EventPseudoModel : public CXFA_Object {
explicit CScript_EventPseudoModel(CXFA_Document* pDocument);
~CScript_EventPseudoModel() override;
- void Change(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void CommitKey(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void FullText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void KeyDown(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Modifier(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
+ void Change(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void CommitKey(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void FullText(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void KeyDown(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Modifier(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void NewContentType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void NewText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
+ void NewText(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void PrevContentType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void PrevText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Reenter(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void SelEnd(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
- void SelStart(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Shift(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void PrevText(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Reenter(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void SelEnd(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void SelStart(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Shift(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void SoapFaultCode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void SoapFaultString(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void Target(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void Target(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void Emit(CFXJSE_Arguments* pArguments);
void Reset(CFXJSE_Arguments* pArguments);
protected:
- void Property(CFXJSE_Value* pValue, XFA_Event dwFlag, FX_BOOL bSetting);
+ void Property(CFXJSE_Value* pValue, XFA_Event dwFlag, bool bSetting);
};
#endif // XFA_FXFA_PARSER_CSCRIPT_EVENTPSEUDOMODEL_H_
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
index 89230c34e9..6140ad37d8 100644
--- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
@@ -41,7 +41,7 @@ void CScript_HostPseudoModel::LoadString(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::AppType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify)
@@ -54,7 +54,7 @@ void CScript_HostPseudoModel::AppType(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::CalculationsEnabled(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -70,7 +70,7 @@ void CScript_HostPseudoModel::CalculationsEnabled(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::CurrentPage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -85,7 +85,7 @@ void CScript_HostPseudoModel::CurrentPage(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::Language(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -101,7 +101,7 @@ void CScript_HostPseudoModel::Language(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::NumPages(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -116,7 +116,7 @@ void CScript_HostPseudoModel::NumPages(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::Platform(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -131,7 +131,7 @@ void CScript_HostPseudoModel::Platform(CFXJSE_Value* pValue,
pValue->SetString(FX_UTF8Encode(wsPlatform).AsStringC());
}
void CScript_HostPseudoModel::Title(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
return;
@@ -151,7 +151,7 @@ void CScript_HostPseudoModel::Title(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::ValidationsEnabled(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -163,12 +163,12 @@ void CScript_HostPseudoModel::ValidationsEnabled(CFXJSE_Value* pValue,
pValue->ToBoolean());
return;
}
- FX_BOOL bEnabled = pNotify->GetDocEnvironment()->IsValidationsEnabled(hDoc);
+ bool bEnabled = pNotify->GetDocEnvironment()->IsValidationsEnabled(hDoc);
pValue->SetBoolean(bEnabled);
}
void CScript_HostPseudoModel::Variation(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!m_pDocument->GetScriptContext()->IsRunAtClient())
return;
@@ -184,7 +184,7 @@ void CScript_HostPseudoModel::Variation(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::Version(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -198,7 +198,7 @@ void CScript_HostPseudoModel::Version(CFXJSE_Value* pValue,
}
void CScript_HostPseudoModel::Name(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -297,7 +297,7 @@ void CScript_HostPseudoModel::Response(CFXJSE_Arguments* pArguments) {
CFX_WideString wsQuestion;
CFX_WideString wsTitle;
CFX_WideString wsDefaultAnswer;
- FX_BOOL bMark = FALSE;
+ bool bMark = false;
if (iLength >= 1) {
CFX_ByteString bsQuestion = pArguments->GetUTF8String(0);
wsQuestion = CFX_WideString::FromUTF8(bsQuestion.AsStringC());
@@ -311,7 +311,7 @@ void CScript_HostPseudoModel::Response(CFXJSE_Arguments* pArguments) {
wsDefaultAnswer = CFX_WideString::FromUTF8(bsDefaultAnswer.AsStringC());
}
if (iLength >= 4) {
- bMark = pArguments->GetInt32(3) == 0 ? FALSE : TRUE;
+ bMark = pArguments->GetInt32(3) == 0 ? false : true;
}
CFX_WideString wsAnswer = pNotify->GetAppProvider()->Response(
wsQuestion, wsTitle, wsDefaultAnswer, bMark);
@@ -513,29 +513,28 @@ void CScript_HostPseudoModel::MessageBox(CFXJSE_Arguments* pArguments) {
if (pValue)
pValue->SetInteger(iValue);
}
-FX_BOOL CScript_HostPseudoModel::ValidateArgsForMsg(
- CFXJSE_Arguments* pArguments,
- int32_t iArgIndex,
- CFX_WideString& wsValue) {
+bool CScript_HostPseudoModel::ValidateArgsForMsg(CFXJSE_Arguments* pArguments,
+ int32_t iArgIndex,
+ CFX_WideString& wsValue) {
if (!pArguments || iArgIndex < 0) {
- return FALSE;
+ return false;
}
- FX_BOOL bIsJsType = FALSE;
+ bool bIsJsType = false;
if (m_pDocument->GetScriptContext()->GetType() ==
XFA_SCRIPTLANGTYPE_Javascript) {
- bIsJsType = TRUE;
+ bIsJsType = true;
}
std::unique_ptr<CFXJSE_Value> pValueArg(pArguments->GetValue(iArgIndex));
if (!pValueArg->IsString() && bIsJsType) {
ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
- return FALSE;
+ return false;
}
if (pValueArg->IsNull()) {
wsValue = FX_WSTRC(L"");
} else {
wsValue = pValueArg->ToWideString();
}
- return TRUE;
+ return true;
}
void CScript_HostPseudoModel::DocumentCountInBatch(
CFXJSE_Arguments* pArguments) {
@@ -557,9 +556,9 @@ void CScript_HostPseudoModel::Print(CFXJSE_Arguments* pArguments) {
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
uint32_t dwOptions = 0;
- FX_BOOL bShowDialog = TRUE;
+ bool bShowDialog = true;
if (iLength >= 1) {
- bShowDialog = pArguments->GetInt32(0) == 0 ? FALSE : TRUE;
+ bShowDialog = pArguments->GetInt32(0) == 0 ? false : true;
}
if (bShowDialog) {
dwOptions |= XFA_PRINTOPT_ShowDialog;
@@ -572,38 +571,38 @@ void CScript_HostPseudoModel::Print(CFXJSE_Arguments* pArguments) {
if (iLength >= 3) {
nEndPage = pArguments->GetInt32(2);
}
- FX_BOOL bCanCancel = TRUE;
+ bool bCanCancel = true;
if (iLength >= 4) {
- bCanCancel = pArguments->GetInt32(3) == 0 ? FALSE : TRUE;
+ bCanCancel = pArguments->GetInt32(3) == 0 ? false : true;
}
if (bCanCancel) {
dwOptions |= XFA_PRINTOPT_CanCancel;
}
- FX_BOOL bShrinkPage = TRUE;
+ bool bShrinkPage = true;
if (iLength >= 5) {
- bShrinkPage = pArguments->GetInt32(4) == 0 ? FALSE : TRUE;
+ bShrinkPage = pArguments->GetInt32(4) == 0 ? false : true;
}
if (bShrinkPage) {
dwOptions |= XFA_PRINTOPT_ShrinkPage;
}
- FX_BOOL bAsImage = TRUE;
+ bool bAsImage = true;
if (iLength >= 6) {
- bAsImage = pArguments->GetInt32(5) == 0 ? FALSE : TRUE;
+ bAsImage = pArguments->GetInt32(5) == 0 ? false : true;
}
if (bAsImage) {
dwOptions |= XFA_PRINTOPT_AsImage;
}
- FX_BOOL bReverseOrder = TRUE;
+ bool bReverseOrder = true;
if (iLength >= 7) {
- bAsImage = pArguments->GetInt32(5) == 0 ? FALSE : TRUE;
+ bAsImage = pArguments->GetInt32(5) == 0 ? false : true;
}
- bReverseOrder = pArguments->GetInt32(6) == 0 ? FALSE : TRUE;
+ bReverseOrder = pArguments->GetInt32(6) == 0 ? false : true;
if (bReverseOrder) {
dwOptions |= XFA_PRINTOPT_ReverseOrder;
}
- FX_BOOL bPrintAnnot = TRUE;
+ bool bPrintAnnot = true;
if (iLength >= 8) {
- bPrintAnnot = pArguments->GetInt32(7) == 0 ? FALSE : TRUE;
+ bPrintAnnot = pArguments->GetInt32(7) == 0 ? false : true;
}
if (bPrintAnnot) {
dwOptions |= XFA_PRINTOPT_PrintAnnot;
@@ -632,13 +631,13 @@ void CScript_HostPseudoModel::ExportData(CFXJSE_Arguments* pArguments) {
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
CFX_WideString wsFilePath;
- FX_BOOL bXDP = TRUE;
+ bool bXDP = true;
if (iLength >= 1) {
CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);
wsFilePath = CFX_WideString::FromUTF8(bsFilePath.AsStringC());
}
if (iLength >= 2) {
- bXDP = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
+ bXDP = pArguments->GetInt32(1) == 0 ? false : true;
}
pNotify->GetDocEnvironment()->ExportData(hDoc, wsFilePath, bXDP);
}
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.h b/xfa/fxfa/parser/cscript_hostpseudomodel.h
index c2183ac9d7..76c910b801 100644
--- a/xfa/fxfa/parser/cscript_hostpseudomodel.h
+++ b/xfa/fxfa/parser/cscript_hostpseudomodel.h
@@ -16,35 +16,23 @@ class CScript_HostPseudoModel : public CXFA_Object {
explicit CScript_HostPseudoModel(CXFA_Document* pDocument);
~CScript_HostPseudoModel() override;
- void AppType(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
+ void AppType(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void CalculationsEnabled(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void CurrentPage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void Language(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void NumPages(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Platform(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Title(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void Language(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void NumPages(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Platform(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Title(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void ValidationsEnabled(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
- void Variation(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Version(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
- XFA_ATTRIBUTE eAttribute);
- void Name(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void Variation(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Version(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
+ void Name(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void GotoURL(CFXJSE_Arguments* pArguments);
void OpenList(CFXJSE_Arguments* pArguments);
void Response(CFXJSE_Arguments* pArguments);
@@ -66,9 +54,9 @@ class CScript_HostPseudoModel : public CXFA_Object {
void LoadString(CFXJSE_Value* pValue,
CXFA_FFNotify* pNotify,
uint32_t dwFlag);
- FX_BOOL ValidateArgsForMsg(CFXJSE_Arguments* pArguments,
- int32_t iArgIndex,
- CFX_WideString& wsValue);
+ bool ValidateArgsForMsg(CFXJSE_Arguments* pArguments,
+ int32_t iArgIndex,
+ CFX_WideString& wsValue);
};
#endif // XFA_FXFA_PARSER_CSCRIPT_HOSTPSEUDOMODEL_H_
diff --git a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
index b6ee3672e6..a9c63666b3 100644
--- a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
@@ -32,7 +32,7 @@ CScript_LayoutPseudoModel::CScript_LayoutPseudoModel(CXFA_Document* pDocument)
CScript_LayoutPseudoModel::~CScript_LayoutPseudoModel() {}
void CScript_LayoutPseudoModel::Ready(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -105,7 +105,7 @@ void CScript_LayoutPseudoModel::HWXY(CFXJSE_Arguments* pArguments,
pValue->SetFloat(0);
return;
}
- pLayoutItem->GetRect(rtRect, TRUE);
+ pLayoutItem->GetRect(rtRect, true);
switch (layoutModel) {
case XFA_LAYOUTMODEL_H:
measure.Set(rtRect.height, XFA_UNIT_Pt);
@@ -144,7 +144,7 @@ void CScript_LayoutPseudoModel::Y(CFXJSE_Arguments* pArguments) {
}
void CScript_LayoutPseudoModel::NumberedPageCount(CFXJSE_Arguments* pArguments,
- FX_BOOL bNumbered) {
+ bool bNumbered) {
CXFA_LayoutProcessor* pDocLayout = m_pDocument->GetDocLayout();
if (!pDocLayout) {
return;
@@ -171,7 +171,7 @@ void CScript_LayoutPseudoModel::NumberedPageCount(CFXJSE_Arguments* pArguments,
}
void CScript_LayoutPseudoModel::PageCount(CFXJSE_Arguments* pArguments) {
- NumberedPageCount(pArguments, TRUE);
+ NumberedPageCount(pArguments, true);
}
void CScript_LayoutPseudoModel::PageSpan(CFXJSE_Arguments* pArguments) {
@@ -205,13 +205,13 @@ void CScript_LayoutPseudoModel::PageSpan(CFXJSE_Arguments* pArguments) {
}
void CScript_LayoutPseudoModel::Page(CFXJSE_Arguments* pArguments) {
- PageImp(pArguments, FALSE);
+ PageImp(pArguments, false);
}
void CScript_LayoutPseudoModel::GetObjArray(CXFA_LayoutProcessor* pDocLayout,
int32_t iPageNo,
const CFX_WideString& wsType,
- FX_BOOL bOnPageArea,
+ bool bOnPageArea,
CXFA_NodeArray& retArray) {
CXFA_ContainerLayoutItem* pLayoutPage = pDocLayout->GetPage(iPageNo);
if (!pLayoutPage) {
@@ -348,7 +348,7 @@ void CScript_LayoutPseudoModel::PageContent(CFXJSE_Arguments* pArguments) {
}
int32_t iIndex = 0;
CFX_WideString wsType;
- FX_BOOL bOnPageArea = FALSE;
+ bool bOnPageArea = false;
if (iLength >= 1) {
iIndex = pArguments->GetInt32(0);
}
@@ -357,7 +357,7 @@ void CScript_LayoutPseudoModel::PageContent(CFXJSE_Arguments* pArguments) {
wsType = CFX_WideString::FromUTF8(bsType.AsStringC());
}
if (iLength >= 3) {
- bOnPageArea = pArguments->GetInt32(2) == 0 ? FALSE : TRUE;
+ bOnPageArea = pArguments->GetInt32(2) == 0 ? false : true;
}
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -376,7 +376,7 @@ void CScript_LayoutPseudoModel::PageContent(CFXJSE_Arguments* pArguments) {
}
void CScript_LayoutPseudoModel::AbsPageCount(CFXJSE_Arguments* pArguments) {
- NumberedPageCount(pArguments, FALSE);
+ NumberedPageCount(pArguments, false);
}
void CScript_LayoutPseudoModel::AbsPageCountInBatch(
@@ -402,7 +402,7 @@ void CScript_LayoutPseudoModel::Relayout(CFXJSE_Arguments* pArguments) {
if (pContentRootNode) {
pLayoutProcessor->AddChangedContainer(pContentRootNode);
}
- pLayoutProcessor->SetForceReLayout(TRUE);
+ pLayoutProcessor->SetForceReLayout(true);
}
void CScript_LayoutPseudoModel::AbsPageSpan(CFXJSE_Arguments* pArguments) {
@@ -432,22 +432,22 @@ void CScript_LayoutPseudoModel::SheetInBatch(CFXJSE_Arguments* pArguments) {
}
void CScript_LayoutPseudoModel::Sheet(CFXJSE_Arguments* pArguments) {
- PageImp(pArguments, TRUE);
+ PageImp(pArguments, true);
}
void CScript_LayoutPseudoModel::RelayoutPageArea(CFXJSE_Arguments* pArguments) {
}
void CScript_LayoutPseudoModel::SheetCount(CFXJSE_Arguments* pArguments) {
- NumberedPageCount(pArguments, FALSE);
+ NumberedPageCount(pArguments, false);
}
void CScript_LayoutPseudoModel::AbsPage(CFXJSE_Arguments* pArguments) {
- PageImp(pArguments, TRUE);
+ PageImp(pArguments, true);
}
void CScript_LayoutPseudoModel::PageImp(CFXJSE_Arguments* pArguments,
- FX_BOOL bAbsPage) {
+ bool bAbsPage) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
const FX_WCHAR* methodName;
diff --git a/xfa/fxfa/parser/cscript_layoutpseudomodel.h b/xfa/fxfa/parser/cscript_layoutpseudomodel.h
index d7661bcda9..ad64417bf3 100644
--- a/xfa/fxfa/parser/cscript_layoutpseudomodel.h
+++ b/xfa/fxfa/parser/cscript_layoutpseudomodel.h
@@ -24,14 +24,14 @@ class CScript_LayoutPseudoModel : public CXFA_Object {
explicit CScript_LayoutPseudoModel(CXFA_Document* pDocument);
~CScript_LayoutPseudoModel() override;
- void Ready(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute);
+ void Ready(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute);
void HWXY(CFXJSE_Arguments* pArguments, XFA_LAYOUTMODEL_HWXY layoutModel);
void H(CFXJSE_Arguments* pArguments);
void W(CFXJSE_Arguments* pArguments);
void X(CFXJSE_Arguments* pArguments);
void Y(CFXJSE_Arguments* pArguments);
- void NumberedPageCount(CFXJSE_Arguments* pArguments, FX_BOOL bNumbered);
+ void NumberedPageCount(CFXJSE_Arguments* pArguments, bool bNumbered);
void PageCount(CFXJSE_Arguments* pArguments);
void PageSpan(CFXJSE_Arguments* pArguments);
void Page(CFXJSE_Arguments* pArguments);
@@ -52,9 +52,9 @@ class CScript_LayoutPseudoModel : public CXFA_Object {
void GetObjArray(CXFA_LayoutProcessor* pDocLayout,
int32_t iPageNo,
const CFX_WideString& wsType,
- FX_BOOL bOnPageArea,
+ bool bOnPageArea,
CXFA_NodeArray& retArray);
- void PageImp(CFXJSE_Arguments* pArguments, FX_BOOL bAbsPage);
+ void PageImp(CFXJSE_Arguments* pArguments, bool bAbsPage);
};
#endif // XFA_FXFA_PARSER_CSCRIPT_LAYOUTPSEUDOMODEL_H_
diff --git a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
index 5a484ab12c..391f3be381 100644
--- a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
@@ -44,7 +44,7 @@ void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) {
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
- pValue->SetBoolean(FALSE);
+ pValue->SetBoolean(false);
}
void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) {
@@ -64,5 +64,5 @@ void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) {
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
- pValue->SetBoolean(FALSE);
+ pValue->SetBoolean(false);
}
diff --git a/xfa/fxfa/parser/cxfa_arraynodelist.cpp b/xfa/fxfa/parser/cxfa_arraynodelist.cpp
index 06aab400f1..8c9040a121 100644
--- a/xfa/fxfa/parser/cxfa_arraynodelist.cpp
+++ b/xfa/fxfa/parser/cxfa_arraynodelist.cpp
@@ -21,13 +21,12 @@ int32_t CXFA_ArrayNodeList::GetLength() {
return m_array.GetSize();
}
-FX_BOOL CXFA_ArrayNodeList::Append(CXFA_Node* pNode) {
+bool CXFA_ArrayNodeList::Append(CXFA_Node* pNode) {
m_array.Add(pNode);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_ArrayNodeList::Insert(CXFA_Node* pNewNode,
- CXFA_Node* pBeforeNode) {
+bool CXFA_ArrayNodeList::Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) {
if (!pBeforeNode) {
m_array.Add(pNewNode);
} else {
@@ -39,10 +38,10 @@ FX_BOOL CXFA_ArrayNodeList::Insert(CXFA_Node* pNewNode,
}
}
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_ArrayNodeList::Remove(CXFA_Node* pNode) {
+bool CXFA_ArrayNodeList::Remove(CXFA_Node* pNode) {
int32_t iSize = m_array.GetSize();
for (int32_t i = 0; i < iSize; ++i) {
if (m_array[i] == pNode) {
@@ -50,7 +49,7 @@ FX_BOOL CXFA_ArrayNodeList::Remove(CXFA_Node* pNode) {
break;
}
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_ArrayNodeList::Item(int32_t iIndex) {
diff --git a/xfa/fxfa/parser/cxfa_attachnodelist.cpp b/xfa/fxfa/parser/cxfa_attachnodelist.cpp
index fb8d026698..c23b900af6 100644
--- a/xfa/fxfa/parser/cxfa_attachnodelist.cpp
+++ b/xfa/fxfa/parser/cxfa_attachnodelist.cpp
@@ -18,7 +18,7 @@ int32_t CXFA_AttachNodeList::GetLength() {
m_pAttachNode->GetElementType() == XFA_Element::Subform);
}
-FX_BOOL CXFA_AttachNodeList::Append(CXFA_Node* pNode) {
+bool CXFA_AttachNodeList::Append(CXFA_Node* pNode) {
CXFA_Node* pParent = pNode->GetNodeItem(XFA_NODEITEM_Parent);
if (pParent) {
pParent->RemoveChild(pNode);
@@ -26,8 +26,7 @@ FX_BOOL CXFA_AttachNodeList::Append(CXFA_Node* pNode) {
return m_pAttachNode->InsertChild(pNode);
}
-FX_BOOL CXFA_AttachNodeList::Insert(CXFA_Node* pNewNode,
- CXFA_Node* pBeforeNode) {
+bool CXFA_AttachNodeList::Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) {
CXFA_Node* pParent = pNewNode->GetNodeItem(XFA_NODEITEM_Parent);
if (pParent) {
pParent->RemoveChild(pNewNode);
@@ -35,7 +34,7 @@ FX_BOOL CXFA_AttachNodeList::Insert(CXFA_Node* pNewNode,
return m_pAttachNode->InsertChild(pNewNode, pBeforeNode);
}
-FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) {
+bool CXFA_AttachNodeList::Remove(CXFA_Node* pNode) {
return m_pAttachNode->RemoveChild(pNode);
}
diff --git a/xfa/fxfa/parser/cxfa_binditems.cpp b/xfa/fxfa/parser/cxfa_binditems.cpp
index fa691fe38b..fdb4f0c376 100644
--- a/xfa/fxfa/parser/cxfa_binditems.cpp
+++ b/xfa/fxfa/parser/cxfa_binditems.cpp
@@ -22,6 +22,6 @@ void CXFA_BindItems::GetRef(CFX_WideStringC& wsRef) {
m_pNode->TryCData(XFA_ATTRIBUTE_Ref, wsRef);
}
-FX_BOOL CXFA_BindItems::SetConnection(const CFX_WideString& wsConnection) {
+bool CXFA_BindItems::SetConnection(const CFX_WideString& wsConnection) {
return m_pNode->SetCData(XFA_ATTRIBUTE_Connection, wsConnection);
}
diff --git a/xfa/fxfa/parser/cxfa_binditems.h b/xfa/fxfa/parser/cxfa_binditems.h
index cb47cf02f1..191941a3fb 100644
--- a/xfa/fxfa/parser/cxfa_binditems.h
+++ b/xfa/fxfa/parser/cxfa_binditems.h
@@ -19,7 +19,7 @@ class CXFA_BindItems : public CXFA_Data {
void GetLabelRef(CFX_WideStringC& wsLabelRef);
void GetValueRef(CFX_WideStringC& wsValueRef);
void GetRef(CFX_WideStringC& wsRef);
- FX_BOOL SetConnection(const CFX_WideString& wsConnection);
+ bool SetConnection(const CFX_WideString& wsConnection);
};
#endif // XFA_FXFA_PARSER_CXFA_BINDITEMS_H_
diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp
index 3204ab01db..9d9b4b47ad 100644
--- a/xfa/fxfa/parser/cxfa_box.cpp
+++ b/xfa/fxfa/parser/cxfa_box.cpp
@@ -14,7 +14,7 @@ namespace {
void GetStrokesInternal(CXFA_Node* pNode,
CXFA_StrokeArray& strokes,
- FX_BOOL bNull) {
+ bool bNull) {
strokes.RemoveAll();
if (!pNode)
return;
@@ -106,42 +106,42 @@ CXFA_Edge CXFA_Box::GetEdge(int32_t nIndex) const {
}
void CXFA_Box::GetStrokes(CXFA_StrokeArray& strokes) const {
- GetStrokesInternal(m_pNode, strokes, FALSE);
+ GetStrokesInternal(m_pNode, strokes, false);
}
-FX_BOOL CXFA_Box::IsCircular() const {
+bool CXFA_Box::IsCircular() const {
if (!m_pNode)
- return FALSE;
+ return false;
return m_pNode->GetBoolean(XFA_ATTRIBUTE_Circular);
}
-FX_BOOL CXFA_Box::GetStartAngle(FX_FLOAT& fStartAngle) const {
+bool CXFA_Box::GetStartAngle(FX_FLOAT& fStartAngle) const {
fStartAngle = 0;
if (!m_pNode)
- return FALSE;
+ return false;
CXFA_Measurement ms;
- FX_BOOL bRet = m_pNode->TryMeasure(XFA_ATTRIBUTE_StartAngle, ms, FALSE);
+ bool bRet = m_pNode->TryMeasure(XFA_ATTRIBUTE_StartAngle, ms, false);
if (bRet)
fStartAngle = ms.GetValue();
return bRet;
}
-FX_BOOL CXFA_Box::GetSweepAngle(FX_FLOAT& fSweepAngle) const {
+bool CXFA_Box::GetSweepAngle(FX_FLOAT& fSweepAngle) const {
fSweepAngle = 360;
if (!m_pNode)
- return FALSE;
+ return false;
CXFA_Measurement ms;
- FX_BOOL bRet = m_pNode->TryMeasure(XFA_ATTRIBUTE_SweepAngle, ms, FALSE);
+ bool bRet = m_pNode->TryMeasure(XFA_ATTRIBUTE_SweepAngle, ms, false);
if (bRet)
fSweepAngle = ms.GetValue();
return bRet;
}
-CXFA_Fill CXFA_Box::GetFill(FX_BOOL bModified) const {
+CXFA_Fill CXFA_Box::GetFill(bool bModified) const {
if (!m_pNode)
return CXFA_Fill(nullptr);
@@ -154,12 +154,12 @@ CXFA_Margin CXFA_Box::GetMargin() const {
: nullptr);
}
-int32_t CXFA_Box::Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const {
+int32_t CXFA_Box::Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const {
if (IsArc())
return 0;
CXFA_StrokeArray strokes;
- GetStrokesInternal(m_pNode, strokes, TRUE);
+ GetStrokesInternal(m_pNode, strokes, true);
CXFA_Stroke stroke(nullptr);
int32_t iType = Style3D(strokes, stroke);
if (iType) {
diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h
index 5cf141271d..014155ceb7 100644
--- a/xfa/fxfa/parser/cxfa_box.h
+++ b/xfa/fxfa/parser/cxfa_box.h
@@ -29,24 +29,24 @@ class CXFA_Box : public CXFA_Data {
int32_t CountEdges() const;
CXFA_Edge GetEdge(int32_t nIndex = 0) const;
void GetStrokes(CXFA_StrokeArray& strokes) const;
- FX_BOOL IsCircular() const;
- FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const;
+ bool IsCircular() const;
+ bool GetStartAngle(FX_FLOAT& fStartAngle) const;
FX_FLOAT GetStartAngle() const {
FX_FLOAT fStartAngle;
GetStartAngle(fStartAngle);
return fStartAngle;
}
- FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const;
+ bool GetSweepAngle(FX_FLOAT& fSweepAngle) const;
FX_FLOAT GetSweepAngle() const {
FX_FLOAT fSweepAngle;
GetSweepAngle(fSweepAngle);
return fSweepAngle;
}
- CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const;
+ CXFA_Fill GetFill(bool bModified = false) const;
CXFA_Margin GetMargin() const;
- int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const;
+ int32_t Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const;
};
#endif // XFA_FXFA_PARSER_CXFA_BOX_H_
diff --git a/xfa/fxfa/parser/cxfa_calculate.cpp b/xfa/fxfa/parser/cxfa_calculate.cpp
index 17379cb6c7..d7b1f71caa 100644
--- a/xfa/fxfa/parser/cxfa_calculate.cpp
+++ b/xfa/fxfa/parser/cxfa_calculate.cpp
@@ -13,7 +13,7 @@ CXFA_Calculate::CXFA_Calculate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
int32_t CXFA_Calculate::GetOverride() {
XFA_ATTRIBUTEENUM eAtt = XFA_ATTRIBUTEENUM_Error;
- m_pNode->TryEnum(XFA_ATTRIBUTE_Override, eAtt, FALSE);
+ m_pNode->TryEnum(XFA_ATTRIBUTE_Override, eAtt, false);
return eAtt;
}
diff --git a/xfa/fxfa/parser/cxfa_containerlayoutitem.cpp b/xfa/fxfa/parser/cxfa_containerlayoutitem.cpp
index 646f8a45e5..dd759b699a 100644
--- a/xfa/fxfa/parser/cxfa_containerlayoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_containerlayoutitem.cpp
@@ -11,7 +11,7 @@
#include "xfa/fxfa/parser/cxfa_measurement.h"
CXFA_ContainerLayoutItem::CXFA_ContainerLayoutItem(CXFA_Node* pNode)
- : CXFA_LayoutItem(pNode, FALSE), m_pOldSubform(nullptr) {}
+ : CXFA_LayoutItem(pNode, false), m_pOldSubform(nullptr) {}
CXFA_LayoutProcessor* CXFA_ContainerLayoutItem::GetLayout() const {
return m_pFormNode->GetDocument()->GetLayoutProcessor();
diff --git a/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp b/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp
index 7e9311fec9..a10a678279 100644
--- a/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_contentlayoutitem.cpp
@@ -7,7 +7,7 @@
#include "xfa/fxfa/parser/cxfa_contentlayoutitem.h"
CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode)
- : CXFA_LayoutItem(pNode, TRUE),
+ : CXFA_LayoutItem(pNode, true),
m_pPrev(nullptr),
m_pNext(nullptr),
m_dwStatus(0) {}
diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp
index 5f059a7dfe..19f85088b8 100644
--- a/xfa/fxfa/parser/cxfa_data.cpp
+++ b/xfa/fxfa/parser/cxfa_data.cpp
@@ -65,18 +65,18 @@ XFA_Element CXFA_Data::GetElementType() const {
return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown;
}
-FX_BOOL CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
- FX_FLOAT& fValue,
- FX_BOOL bUseDefault) const {
+bool CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
+ FX_FLOAT& fValue,
+ bool bUseDefault) const {
CXFA_Measurement ms;
if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) {
fValue = ms.ToUnit(XFA_UNIT_Pt);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) {
+bool CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) {
CXFA_Measurement ms(fValue, XFA_UNIT_Pt);
return m_pNode->SetMeasure(eAttr, ms);
}
diff --git a/xfa/fxfa/parser/cxfa_data.h b/xfa/fxfa/parser/cxfa_data.h
index 829c84cc9f..890486d5fa 100644
--- a/xfa/fxfa/parser/cxfa_data.h
+++ b/xfa/fxfa/parser/cxfa_data.h
@@ -24,10 +24,10 @@ class CXFA_Data {
XFA_Element GetElementType() const;
protected:
- FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr,
- FX_FLOAT& fValue,
- FX_BOOL bUseDefault = FALSE) const;
- FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue);
+ bool TryMeasure(XFA_ATTRIBUTE eAttr,
+ FX_FLOAT& fValue,
+ bool bUseDefault = false) const;
+ bool SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue);
CXFA_Node* m_pNode;
};
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp
index de2d08bbc2..ad9693f98f 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -76,11 +76,11 @@ CFX_WideString ExportEncodeContent(const CFX_WideStringC& str) {
void SaveAttribute(CXFA_Node* pNode,
XFA_ATTRIBUTE eName,
const CFX_WideStringC& wsName,
- FX_BOOL bProto,
+ bool bProto,
CFX_WideString& wsOutput) {
CFX_WideString wsValue;
if ((!bProto && !pNode->HasAttribute((XFA_ATTRIBUTE)eName, bProto)) ||
- !pNode->GetAttribute((XFA_ATTRIBUTE)eName, wsValue, FALSE)) {
+ !pNode->GetAttribute((XFA_ATTRIBUTE)eName, wsValue, false)) {
return;
}
wsValue = ExportEncodeAttribute(wsValue);
@@ -91,8 +91,8 @@ void SaveAttribute(CXFA_Node* pNode,
wsOutput += FX_WSTRC(L"\"");
}
-FX_BOOL AttributeSaveInDataModel(CXFA_Node* pNode, XFA_ATTRIBUTE eAttribute) {
- FX_BOOL bSaveInDataModel = FALSE;
+bool AttributeSaveInDataModel(CXFA_Node* pNode, XFA_ATTRIBUTE eAttribute) {
+ bool bSaveInDataModel = false;
if (pNode->GetElementType() != XFA_Element::Image)
return bSaveInDataModel;
@@ -103,32 +103,32 @@ FX_BOOL AttributeSaveInDataModel(CXFA_Node* pNode, XFA_ATTRIBUTE eAttribute) {
CXFA_Node* pFieldNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent);
if (pFieldNode && pFieldNode->GetBindData() &&
eAttribute == XFA_ATTRIBUTE_Href) {
- bSaveInDataModel = TRUE;
+ bSaveInDataModel = true;
}
return bSaveInDataModel;
}
-FX_BOOL ContentNodeNeedtoExport(CXFA_Node* pContentNode) {
+bool ContentNodeNeedtoExport(CXFA_Node* pContentNode) {
CFX_WideString wsContent;
- if (!pContentNode->TryContent(wsContent, FALSE, FALSE))
- return FALSE;
+ if (!pContentNode->TryContent(wsContent, false, false))
+ return false;
ASSERT(pContentNode->IsContentNode());
CXFA_Node* pParentNode = pContentNode->GetNodeItem(XFA_NODEITEM_Parent);
if (!pParentNode || pParentNode->GetElementType() != XFA_Element::Value)
- return TRUE;
+ return true;
CXFA_Node* pGrandParentNode = pParentNode->GetNodeItem(XFA_NODEITEM_Parent);
if (!pGrandParentNode || !pGrandParentNode->IsContainerNode())
- return TRUE;
+ return true;
if (pGrandParentNode->GetBindData())
- return FALSE;
+ return false;
CXFA_WidgetData* pWidgetData = pGrandParentNode->GetWidgetData();
XFA_Element eUIType = pWidgetData->GetUIType();
if (eUIType == XFA_Element::PasswordEdit)
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
void RecognizeXFAVersionNumber(CXFA_Node* pTemplateRoot,
@@ -151,7 +151,7 @@ void RecognizeXFAVersionNumber(CXFA_Node* pTemplateRoot,
void RegenerateFormFile_Changed(CXFA_Node* pNode,
CFX_WideTextBuf& buf,
- FX_BOOL bSaveXML) {
+ bool bSaveXML) {
CFX_WideString wsAttrs;
int32_t iAttrs = 0;
const uint8_t* pAttrs =
@@ -185,7 +185,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
break;
CFX_WideString wsContentType;
- pNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
+ pNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (pRawValueNode->GetElementType() == XFA_Element::SharpxHTML &&
wsContentType == FX_WSTRC(L"text/html")) {
CFDE_XMLNode* pExDataXML = pNode->GetXMLMappingNode();
@@ -197,7 +197,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
if (!pRichTextXML)
break;
- IFX_MemoryStream* pMemStream = FX_CreateMemoryStream(TRUE);
+ IFX_MemoryStream* pMemStream = FX_CreateMemoryStream(true);
IFX_Stream* pTempStream = IFX_Stream::CreateStream(
(IFX_SeekableWriteStream*)pMemStream, FX_STREAMACCESS_Text |
FX_STREAMACCESS_Write |
@@ -211,7 +211,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
} else if (pRawValueNode->GetElementType() == XFA_Element::Sharpxml &&
wsContentType == FX_WSTRC(L"text/xml")) {
CFX_WideString wsRawValue;
- pRawValueNode->GetAttribute(XFA_ATTRIBUTE_Value, wsRawValue, FALSE);
+ pRawValueNode->GetAttribute(XFA_ATTRIBUTE_Value, wsRawValue, false);
if (wsRawValue.IsEmpty())
break;
@@ -269,7 +269,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
if (!pTemplateNode ||
pTemplateNode->CountChildren(XFA_Element::Unknown) !=
pNode->CountChildren(XFA_Element::Unknown)) {
- bSaveXML = TRUE;
+ bSaveXML = true;
}
}
CFX_WideTextBuf newBuf;
@@ -283,7 +283,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
if (!bSaveXML && !wsChildren.IsEmpty() &&
pNode->GetElementType() == XFA_Element::Items) {
wsChildren.clear();
- bSaveXML = TRUE;
+ bSaveXML = true;
CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
RegenerateFormFile_Changed(pChild, newBuf, bSaveXML);
@@ -299,7 +299,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
pNode->HasAttribute(XFA_ATTRIBUTE_Name)) {
CFX_WideStringC wsElement = pNode->GetClassName();
CFX_WideString wsName;
- SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE, wsName);
+ SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), true, wsName);
buf << FX_WSTRC(L"<");
buf << wsElement;
buf << wsName;
@@ -318,7 +318,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
void RegenerateFormFile_Container(CXFA_Node* pNode,
IFX_Stream* pStream,
- FX_BOOL bSaveXML = FALSE) {
+ bool bSaveXML = false) {
XFA_Element eType = pNode->GetElementType();
if (eType == XFA_Element::Field || eType == XFA_Element::Draw ||
!pNode->IsContainerNode()) {
@@ -334,7 +334,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
pStream->WriteString(L"<", 1);
pStream->WriteString(wsElement.c_str(), wsElement.GetLength());
CFX_WideString wsOutput;
- SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE, wsOutput);
+ SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), true, wsOutput);
CFX_WideString wsAttrs;
int32_t iAttrs = 0;
const uint8_t* pAttrs =
@@ -346,7 +346,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
continue;
CFX_WideString wsAttr;
- SaveAttribute(pNode, pAttr->eName, pAttr->pName, FALSE, wsAttr);
+ SaveAttribute(pNode, pAttr->eName, pAttr->pName, false, wsAttr);
wsOutput += wsAttr;
}
@@ -373,7 +373,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
IFX_Stream* pStream,
const FX_CHAR* pChecksum,
- FX_BOOL bSaveXML) {
+ bool bSaveXML) {
if (pNode->IsModelNode()) {
static const FX_WCHAR s_pwsTagName[] = L"<form";
static const FX_WCHAR s_pwsClose[] = L"</form\n>";
@@ -444,34 +444,34 @@ CXFA_DataExporter::CXFA_DataExporter(CXFA_Document* pDocument)
ASSERT(m_pDocument);
}
-FX_BOOL CXFA_DataExporter::Export(IFX_SeekableWriteStream* pWrite) {
+bool CXFA_DataExporter::Export(IFX_SeekableWriteStream* pWrite) {
return Export(pWrite, m_pDocument->GetRoot(), 0, nullptr);
}
-FX_BOOL CXFA_DataExporter::Export(IFX_SeekableWriteStream* pWrite,
- CXFA_Node* pNode,
- uint32_t dwFlag,
- const FX_CHAR* pChecksum) {
+bool CXFA_DataExporter::Export(IFX_SeekableWriteStream* pWrite,
+ CXFA_Node* pNode,
+ uint32_t dwFlag,
+ const FX_CHAR* pChecksum) {
if (!pWrite) {
ASSERT(false);
- return FALSE;
+ return false;
}
IFX_Stream* pStream = IFX_Stream::CreateStream(
pWrite,
FX_STREAMACCESS_Text | FX_STREAMACCESS_Write | FX_STREAMACCESS_Append);
if (!pStream)
- return FALSE;
+ return false;
pStream->SetCodePage(FX_CODEPAGE_UTF8);
- FX_BOOL bRet = Export(pStream, pNode, dwFlag, pChecksum);
+ bool bRet = Export(pStream, pNode, dwFlag, pChecksum);
pStream->Release();
return bRet;
}
-FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
- CXFA_Node* pNode,
- uint32_t dwFlag,
- const FX_CHAR* pChecksum) {
+bool CXFA_DataExporter::Export(IFX_Stream* pStream,
+ CXFA_Node* pNode,
+ uint32_t dwFlag,
+ const FX_CHAR* pChecksum) {
CFDE_XMLDoc* pXMLDoc = m_pDocument->GetXMLDoc();
if (pNode->IsModelNode()) {
switch (pNode->GetPacketID()) {
@@ -491,7 +491,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
CFDE_XMLElement* pElement =
static_cast<CFDE_XMLElement*>(pNode->GetXMLMappingNode());
if (!pElement || pElement->GetType() != FDE_XMLNODE_Element)
- return FALSE;
+ return false;
CXFA_Node* pDataNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
ASSERT(pDataNode);
@@ -508,13 +508,13 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
CFDE_XMLElement* pElement =
static_cast<CFDE_XMLElement*>(pNode->GetXMLMappingNode());
if (!pElement || pElement->GetType() != FDE_XMLNODE_Element)
- return FALSE;
+ return false;
pXMLDoc->SaveXMLNode(pStream, pElement);
break;
}
}
- return TRUE;
+ return true;
}
CXFA_Node* pDataNode = pNode->GetNodeItem(XFA_NODEITEM_Parent);
@@ -530,12 +530,12 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
CFDE_XMLElement* pElement =
static_cast<CFDE_XMLElement*>(pExportNode->GetXMLMappingNode());
if (!pElement || pElement->GetType() != FDE_XMLNODE_Element)
- return FALSE;
+ return false;
XFA_DataExporter_DealWithDataGroupNode(pExportNode);
pElement->SetString(L"xmlns:xfa", L"http://www.xfa.org/schema/xfa-data/1.0/");
pXMLDoc->SaveXMLNode(pStream, pElement);
pElement->RemoveAttribute(L"xmlns:xfa");
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.h b/xfa/fxfa/parser/cxfa_dataexporter.h
index c1123d1fe9..41f32a2fad 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.h
+++ b/xfa/fxfa/parser/cxfa_dataexporter.h
@@ -18,17 +18,17 @@ class CXFA_DataExporter {
public:
explicit CXFA_DataExporter(CXFA_Document* pDocument);
- FX_BOOL Export(IFX_SeekableWriteStream* pWrite);
- FX_BOOL Export(IFX_SeekableWriteStream* pWrite,
- CXFA_Node* pNode,
- uint32_t dwFlag,
- const FX_CHAR* pChecksum);
+ bool Export(IFX_SeekableWriteStream* pWrite);
+ bool Export(IFX_SeekableWriteStream* pWrite,
+ CXFA_Node* pNode,
+ uint32_t dwFlag,
+ const FX_CHAR* pChecksum);
protected:
- FX_BOOL Export(IFX_Stream* pStream,
- CXFA_Node* pNode,
- uint32_t dwFlag,
- const FX_CHAR* pChecksum);
+ bool Export(IFX_Stream* pStream,
+ CXFA_Node* pNode,
+ uint32_t dwFlag,
+ const FX_CHAR* pChecksum);
CXFA_Document* const m_pDocument;
};
diff --git a/xfa/fxfa/parser/cxfa_dataimporter.cpp b/xfa/fxfa/parser/cxfa_dataimporter.cpp
index 62c6536393..c0c798dfe6 100644
--- a/xfa/fxfa/parser/cxfa_dataimporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataimporter.cpp
@@ -21,24 +21,24 @@ CXFA_DataImporter::CXFA_DataImporter(CXFA_Document* pDocument)
ASSERT(m_pDocument);
}
-FX_BOOL CXFA_DataImporter::ImportData(IFX_SeekableReadStream* pDataDocument) {
+bool CXFA_DataImporter::ImportData(IFX_SeekableReadStream* pDataDocument) {
std::unique_ptr<CXFA_SimpleParser> pDataDocumentParser(
new CXFA_SimpleParser(m_pDocument, false));
if (pDataDocumentParser->StartParse(pDataDocument, XFA_XDPPACKET_Datasets) !=
XFA_PARSESTATUS_Ready) {
- return FALSE;
+ return false;
}
if (pDataDocumentParser->DoParse(nullptr) < XFA_PARSESTATUS_Done)
- return FALSE;
+ return false;
CXFA_Node* pImportDataRoot = pDataDocumentParser->GetRootNode();
if (!pImportDataRoot)
- return FALSE;
+ return false;
CXFA_Node* pDataModel =
ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Datasets));
if (!pDataModel)
- return FALSE;
+ return false;
CXFA_Node* pDataNode = ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Data));
if (pDataNode)
@@ -57,6 +57,6 @@ FX_BOOL CXFA_DataImporter::ImportData(IFX_SeekableReadStream* pDataDocument) {
pParentXMLNode->RemoveChildNode(pXMLNode);
pDataModel->InsertChild(pImportDataRoot);
}
- m_pDocument->DoDataRemerge(FALSE);
- return TRUE;
+ m_pDocument->DoDataRemerge(false);
+ return true;
}
diff --git a/xfa/fxfa/parser/cxfa_dataimporter.h b/xfa/fxfa/parser/cxfa_dataimporter.h
index d01f24cb05..86e41a8130 100644
--- a/xfa/fxfa/parser/cxfa_dataimporter.h
+++ b/xfa/fxfa/parser/cxfa_dataimporter.h
@@ -16,7 +16,7 @@ class CXFA_DataImporter {
public:
explicit CXFA_DataImporter(CXFA_Document* pDocument);
- FX_BOOL ImportData(IFX_SeekableReadStream* pDataDocument);
+ bool ImportData(IFX_SeekableReadStream* pDataDocument);
protected:
CXFA_Document* const m_pDocument;
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index a644c6a92e..cc5f74ae23 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -50,7 +50,7 @@ void MergeNodeRecurse(CXFA_Document* pDocument,
}
return;
}
- CXFA_Node* pNewNode = pProtoNode->Clone(TRUE);
+ CXFA_Node* pNewNode = pProtoNode->Clone(true);
pNewNode->SetTemplateNode(pProtoNode);
pDestNodeParent->InsertChild(pNewNode, nullptr);
}
@@ -234,7 +234,7 @@ void CXFA_Document::AddPurgeNode(CXFA_Node* pNode) {
m_PurgeNodes.insert(pNode);
}
-FX_BOOL CXFA_Document::RemovePurgeNode(CXFA_Node* pNode) {
+bool CXFA_Document::RemovePurgeNode(CXFA_Node* pNode) {
return !!m_PurgeNodes.erase(pNode);
}
@@ -245,29 +245,29 @@ void CXFA_Document::PurgeNodes() {
m_PurgeNodes.clear();
}
-void CXFA_Document::SetFlag(uint32_t dwFlag, FX_BOOL bOn) {
+void CXFA_Document::SetFlag(uint32_t dwFlag, bool bOn) {
if (bOn)
m_dwDocFlags |= dwFlag;
else
m_dwDocFlags &= ~dwFlag;
}
-FX_BOOL CXFA_Document::IsInteractive() {
+bool CXFA_Document::IsInteractive() {
if (m_dwDocFlags & XFA_DOCFLAG_HasInteractive)
return !!(m_dwDocFlags & XFA_DOCFLAG_Interactive);
CXFA_Node* pConfig = ToNode(GetXFAObject(XFA_HASHCODE_Config));
if (!pConfig)
- return FALSE;
+ return false;
CFX_WideString wsInteractive;
CXFA_Node* pPresent = pConfig->GetFirstChildByClass(XFA_Element::Present);
if (!pPresent)
- return FALSE;
+ return false;
CXFA_Node* pPDF = pPresent->GetFirstChildByClass(XFA_Element::Pdf);
if (!pPDF)
- return FALSE;
+ return false;
CXFA_Node* pFormFiller = pPDF->GetChild(0, XFA_Element::Interactive);
if (pFormFiller) {
@@ -275,10 +275,10 @@ FX_BOOL CXFA_Document::IsInteractive() {
if (pFormFiller->TryContent(wsInteractive) &&
wsInteractive == FX_WSTRC(L"1")) {
m_dwDocFlags |= XFA_DOCFLAG_Interactive;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
CXFA_LocaleMgr* CXFA_Document::GetLocalMgr() {
diff --git a/xfa/fxfa/parser/cxfa_document.h b/xfa/fxfa/parser/cxfa_document.h
index 919be5da2d..4fd2d79504 100644
--- a/xfa/fxfa/parser/cxfa_document.h
+++ b/xfa/fxfa/parser/cxfa_document.h
@@ -75,13 +75,13 @@ class CXFA_Document {
void SetRoot(CXFA_Node* pNewRoot);
void AddPurgeNode(CXFA_Node* pNode);
- FX_BOOL RemovePurgeNode(CXFA_Node* pNode);
+ bool RemovePurgeNode(CXFA_Node* pNode);
void PurgeNodes();
bool HasFlag(uint32_t dwFlag) { return (m_dwDocFlags & dwFlag) == dwFlag; }
- void SetFlag(uint32_t dwFlag, FX_BOOL bOn);
+ void SetFlag(uint32_t dwFlag, bool bOn);
- FX_BOOL IsInteractive();
+ bool IsInteractive();
XFA_VERSION GetCurVersionMode() { return m_eCurVersionMode; }
XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS);
@@ -90,13 +90,13 @@ class CXFA_Document {
void DoProtoMerge();
void DoDataMerge();
- void DoDataRemerge(FX_BOOL bDoDataMerge);
+ void DoDataRemerge(bool bDoDataMerge);
CXFA_Node* DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
CXFA_Node* pFormNode,
CXFA_Node* pDataScope,
- FX_BOOL bOneInstance,
- FX_BOOL bDataMerge,
- FX_BOOL bUpLevel);
+ bool bOneInstance,
+ bool bDataMerge,
+ bool bUpLevel);
void DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot);
void ClearLayoutData();
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index ea38b3eec9..fe3cb933aa 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -10,7 +10,7 @@
#include "xfa/fxfa/parser/cxfa_document.h"
CXFA_DocumentParser::CXFA_DocumentParser(CXFA_FFNotify* pNotify)
- : m_nodeParser(nullptr, TRUE), m_pNotify(pNotify) {}
+ : m_nodeParser(nullptr, true), m_pNotify(pNotify) {}
CXFA_DocumentParser::~CXFA_DocumentParser() {
}
diff --git a/xfa/fxfa/parser/cxfa_exdata.cpp b/xfa/fxfa/parser/cxfa_exdata.cpp
index 358cc3d611..bf1e930330 100644
--- a/xfa/fxfa/parser/cxfa_exdata.cpp
+++ b/xfa/fxfa/parser/cxfa_exdata.cpp
@@ -10,6 +10,6 @@
CXFA_ExData::CXFA_ExData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-FX_BOOL CXFA_ExData::SetContentType(const CFX_WideString& wsContentType) {
+bool CXFA_ExData::SetContentType(const CFX_WideString& wsContentType) {
return m_pNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
}
diff --git a/xfa/fxfa/parser/cxfa_exdata.h b/xfa/fxfa/parser/cxfa_exdata.h
index c5eddbf14c..c92bacd3f2 100644
--- a/xfa/fxfa/parser/cxfa_exdata.h
+++ b/xfa/fxfa/parser/cxfa_exdata.h
@@ -16,7 +16,7 @@ class CXFA_ExData : public CXFA_Data {
public:
explicit CXFA_ExData(CXFA_Node* pNode);
- FX_BOOL SetContentType(const CFX_WideString& wsContentType);
+ bool SetContentType(const CFX_WideString& wsContentType);
};
#endif // XFA_FXFA_PARSER_CXFA_EXDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index 0c4a6f547d..63949c193d 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -25,10 +25,10 @@ void CXFA_Fill::SetColor(FX_ARGB color) {
pNode->SetCData(XFA_ATTRIBUTE_Value, wsColor);
}
-FX_ARGB CXFA_Fill::GetColor(FX_BOOL bText) {
+FX_ARGB CXFA_Fill::GetColor(bool bText) {
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color)) {
CFX_WideStringC wsColor;
- if (pNode->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE))
+ if (pNode->TryCData(XFA_ATTRIBUTE_Value, wsColor, false))
return CXFA_Data::ToColor(wsColor);
}
if (bText)
@@ -52,7 +52,7 @@ int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Pattern);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
CFX_WideStringC wsColor;
- pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE);
+ pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
foreColor = CXFA_Data::ToColor(wsColor);
} else {
foreColor = 0xFF000000;
@@ -66,7 +66,7 @@ int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
pNode->TryInteger(XFA_ATTRIBUTE_Rate, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
CFX_WideStringC wsColor;
- pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE);
+ pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
stippleColor = CXFA_Data::ToColor(wsColor);
} else {
stippleColor = 0xFF000000;
@@ -80,7 +80,7 @@ int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) {
pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
CFX_WideStringC wsColor;
- pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE);
+ pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
endColor = CXFA_Data::ToColor(wsColor);
} else {
endColor = 0xFF000000;
@@ -94,7 +94,7 @@ int32_t CXFA_Fill::GetRadial(FX_ARGB& endColor) {
pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
CFX_WideStringC wsColor;
- pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE);
+ pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
endColor = CXFA_Data::ToColor(wsColor);
} else {
endColor = 0xFF000000;
diff --git a/xfa/fxfa/parser/cxfa_fill.h b/xfa/fxfa/parser/cxfa_fill.h
index 2a5f673aa0..4b13565765 100644
--- a/xfa/fxfa/parser/cxfa_fill.h
+++ b/xfa/fxfa/parser/cxfa_fill.h
@@ -19,7 +19,7 @@ class CXFA_Fill : public CXFA_Data {
~CXFA_Fill();
int32_t GetPresence();
- FX_ARGB GetColor(FX_BOOL bText = FALSE);
+ FX_ARGB GetColor(bool bText = false);
XFA_Element GetFillType();
int32_t GetPattern(FX_ARGB& foreColor);
int32_t GetStipple(FX_ARGB& stippleColor);
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index 2dcb405141..cedfda6294 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -70,13 +70,13 @@ void CXFA_Font::GetTypeface(CFX_WideStringC& wsTypeFace) {
m_pNode->TryCData(XFA_ATTRIBUTE_Typeface, wsTypeFace);
}
-FX_BOOL CXFA_Font::IsBold() {
+bool CXFA_Font::IsBold() {
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Normal;
m_pNode->TryEnum(XFA_ATTRIBUTE_Weight, eAttr);
return eAttr == XFA_ATTRIBUTEENUM_Bold;
}
-FX_BOOL CXFA_Font::IsItalic() {
+bool CXFA_Font::IsItalic() {
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Normal;
m_pNode->TryEnum(XFA_ATTRIBUTE_Posture, eAttr);
return eAttr == XFA_ATTRIBUTEENUM_Italic;
@@ -89,5 +89,5 @@ void CXFA_Font::SetColor(FX_ARGB color) {
FX_ARGB CXFA_Font::GetColor() {
CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill));
- return fill ? fill.GetColor(TRUE) : 0xFF000000;
+ return fill ? fill.GetColor(true) : 0xFF000000;
}
diff --git a/xfa/fxfa/parser/cxfa_font.h b/xfa/fxfa/parser/cxfa_font.h
index 0151dfbe5f..0342f68b27 100644
--- a/xfa/fxfa/parser/cxfa_font.h
+++ b/xfa/fxfa/parser/cxfa_font.h
@@ -26,8 +26,8 @@ class CXFA_Font : public CXFA_Data {
FX_FLOAT GetFontSize();
void GetTypeface(CFX_WideStringC& wsTypeFace);
- FX_BOOL IsBold();
- FX_BOOL IsItalic();
+ bool IsBold();
+ bool IsItalic();
FX_ARGB GetColor();
void SetColor(FX_ARGB color);
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp
index bcc7466dce..8061018470 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -8,18 +8,18 @@
#include "xfa/fxfa/parser/xfa_object.h"
-CXFA_Image::CXFA_Image(CXFA_Node* pNode, FX_BOOL bDefValue)
+CXFA_Image::CXFA_Image(CXFA_Node* pNode, bool bDefValue)
: CXFA_Data(pNode), m_bDefValue(bDefValue) {}
int32_t CXFA_Image::GetAspect() {
return m_pNode->GetEnum(XFA_ATTRIBUTE_Aspect);
}
-FX_BOOL CXFA_Image::GetContentType(CFX_WideString& wsContentType) {
+bool CXFA_Image::GetContentType(CFX_WideString& wsContentType) {
return m_pNode->TryCData(XFA_ATTRIBUTE_ContentType, wsContentType);
}
-FX_BOOL CXFA_Image::GetHref(CFX_WideString& wsHref) {
+bool CXFA_Image::GetHref(CFX_WideString& wsHref) {
if (m_bDefValue)
return m_pNode->TryCData(XFA_ATTRIBUTE_Href, wsHref);
return m_pNode->GetAttribute(FX_WSTRC(L"href"), wsHref);
@@ -31,24 +31,24 @@ int32_t CXFA_Image::GetTransferEncoding() {
return XFA_ATTRIBUTEENUM_Base64;
}
-FX_BOOL CXFA_Image::GetContent(CFX_WideString& wsText) {
+bool CXFA_Image::GetContent(CFX_WideString& wsText) {
return m_pNode->TryContent(wsText);
}
-FX_BOOL CXFA_Image::SetContentType(const CFX_WideString& wsContentType) {
+bool CXFA_Image::SetContentType(const CFX_WideString& wsContentType) {
return m_pNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
}
-FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref) {
+bool CXFA_Image::SetHref(const CFX_WideString& wsHref) {
if (m_bDefValue)
return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref);
return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref.AsStringC());
}
-FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) {
+bool CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) {
if (m_bDefValue) {
return m_pNode->SetEnum(XFA_ATTRIBUTE_TransferEncoding,
(XFA_ATTRIBUTEENUM)iTransferEncoding);
}
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/parser/cxfa_image.h b/xfa/fxfa/parser/cxfa_image.h
index 4b088c8f90..bf69897693 100644
--- a/xfa/fxfa/parser/cxfa_image.h
+++ b/xfa/fxfa/parser/cxfa_image.h
@@ -15,19 +15,19 @@ class CXFA_Node;
class CXFA_Image : public CXFA_Data {
public:
- CXFA_Image(CXFA_Node* pNode, FX_BOOL bDefValue);
+ CXFA_Image(CXFA_Node* pNode, bool bDefValue);
int32_t GetAspect();
- FX_BOOL GetContentType(CFX_WideString& wsContentType);
- FX_BOOL GetHref(CFX_WideString& wsHref);
+ bool GetContentType(CFX_WideString& wsContentType);
+ bool GetHref(CFX_WideString& wsHref);
int32_t GetTransferEncoding();
- FX_BOOL GetContent(CFX_WideString& wsText);
- FX_BOOL SetContentType(const CFX_WideString& wsContentType);
- FX_BOOL SetHref(const CFX_WideString& wsHref);
- FX_BOOL SetTransferEncoding(int32_t iTransferEncoding);
+ bool GetContent(CFX_WideString& wsText);
+ bool SetContentType(const CFX_WideString& wsContentType);
+ bool SetHref(const CFX_WideString& wsHref);
+ bool SetTransferEncoding(int32_t iTransferEncoding);
protected:
- FX_BOOL m_bDefValue;
+ bool m_bDefValue;
};
#endif // XFA_FXFA_PARSER_CXFA_IMAGE_H_
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.cpp b/xfa/fxfa/parser/cxfa_layoutitem.cpp
index ebe33b650f..264fe4e1b6 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutitem.cpp
@@ -32,7 +32,7 @@ void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) {
delete pLayoutItem;
}
-CXFA_LayoutItem::CXFA_LayoutItem(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem)
+CXFA_LayoutItem::CXFA_LayoutItem(CXFA_Node* pNode, bool bIsContentLayoutItem)
: m_pFormNode(pNode),
m_pParent(nullptr),
m_pNextSibling(nullptr),
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.h b/xfa/fxfa/parser/cxfa_layoutitem.h
index bacb2b8682..5991cd6f3e 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.h
+++ b/xfa/fxfa/parser/cxfa_layoutitem.h
@@ -19,14 +19,14 @@ class CXFA_LayoutItem {
public:
virtual ~CXFA_LayoutItem();
- FX_BOOL IsContainerLayoutItem() const { return !m_bIsContentLayoutItem; }
- FX_BOOL IsContentLayoutItem() const { return m_bIsContentLayoutItem; }
+ bool IsContainerLayoutItem() const { return !m_bIsContentLayoutItem; }
+ bool IsContentLayoutItem() const { return m_bIsContentLayoutItem; }
CXFA_ContainerLayoutItem* AsContainerLayoutItem();
CXFA_ContentLayoutItem* AsContentLayoutItem();
CXFA_ContainerLayoutItem* GetPage() const;
CXFA_Node* GetFormNode() const;
- void GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative = FALSE) const;
+ void GetRect(CFX_RectF& rtLayout, bool bRelative = false) const;
int32_t GetIndex() const;
int32_t GetCount() const;
CXFA_LayoutItem* GetParent() const;
@@ -48,9 +48,9 @@ class CXFA_LayoutItem {
CXFA_LayoutItem* m_pFirstChild;
protected:
- CXFA_LayoutItem(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem);
+ CXFA_LayoutItem(CXFA_Node* pNode, bool bIsContentLayoutItem);
- FX_BOOL m_bIsContentLayoutItem;
+ bool m_bIsContentLayoutItem;
};
#endif // XFA_FXFA_PARSER_CXFA_LAYOUTITEM_H_
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index 48a9c78ffe..1be6d27129 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -85,9 +85,9 @@ void SyncContainer(CXFA_FFNotify* pNotify,
CXFA_LayoutProcessor* pDocLayout,
CXFA_LayoutItem* pContainerItem,
uint32_t dwRelevant,
- FX_BOOL bVisible,
+ bool bVisible,
int32_t nPageIndex) {
- FX_BOOL bVisibleItem = FALSE;
+ bool bVisibleItem = false;
uint32_t dwStatus = 0;
uint32_t dwRelevantContainer = 0;
if (bVisible) {
@@ -95,7 +95,7 @@ void SyncContainer(CXFA_FFNotify* pNotify,
pContainerItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Presence);
if (eAttributeValue == XFA_ATTRIBUTEENUM_Visible ||
eAttributeValue == XFA_ATTRIBUTEENUM_Unknown) {
- bVisibleItem = TRUE;
+ bVisibleItem = true;
}
dwRelevantContainer = GetRelevant(pContainerItem->m_pFormNode, dwRelevant);
dwStatus =
@@ -131,7 +131,7 @@ void RemoveLayoutItem(CXFA_ContainerLayoutItem* pLayoutItem) {
}
CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot,
- FX_BOOL bNewExprStyle,
+ bool bNewExprStyle,
CFX_WideStringC& wsTargetExpr) {
CXFA_Document* pDocument = pPageSetRoot->GetDocument();
if (wsTargetExpr.IsEmpty())
@@ -141,7 +141,7 @@ CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot,
wsTargetAll.TrimLeft();
wsTargetAll.TrimRight();
int32_t iSpliteIndex = 0;
- FX_BOOL bTargetAllFind = TRUE;
+ bool bTargetAllFind = true;
while (iSpliteIndex != -1) {
CFX_WideString wsExpr;
int32_t iSpliteNextIndex = 0;
@@ -154,7 +154,7 @@ CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot,
if (wsExpr.IsEmpty())
return nullptr;
- bTargetAllFind = FALSE;
+ bTargetAllFind = false;
if (wsExpr.GetAt(0) == '#') {
CXFA_Node* pNode = pDocument->GetNodeByID(
ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Template)),
@@ -186,7 +186,7 @@ void SetLayoutGeneratedNodeFlag(CXFA_Node* pNode) {
pNode->ClearFlag(XFA_NodeFlag_UnusedNode);
}
-FX_BOOL CheckContentAreaNotUsed(
+bool CheckContentAreaNotUsed(
CXFA_ContainerLayoutItem* pPageAreaLayoutItem,
CXFA_Node* pContentArea,
CXFA_ContainerLayoutItem*& pContentAreaLayoutItem) {
@@ -198,12 +198,12 @@ FX_BOOL CheckContentAreaNotUsed(
if (pLayoutItem->m_pFormNode == pContentArea) {
if (!pLayoutItem->m_pFirstChild) {
pContentAreaLayoutItem = pLayoutItem;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void SyncRemoveLayoutItem(CXFA_LayoutItem* pParentLayoutItem,
@@ -248,7 +248,7 @@ CXFA_LayoutPageMgr::CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor)
m_nAvailPages(0),
m_nCurPageCount(0),
m_ePageSetMode(XFA_ATTRIBUTEENUM_OrderedOccurrence),
- m_bCreateOverFlowPage(FALSE) {}
+ m_bCreateOverFlowPage(false) {}
CXFA_LayoutPageMgr::~CXFA_LayoutPageMgr() {
ClearData();
@@ -260,11 +260,11 @@ CXFA_LayoutPageMgr::~CXFA_LayoutPageMgr() {
}
}
-FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
+bool CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
PrepareLayout();
CXFA_Node* pTemplateNode = pFormNode->GetTemplateNode();
if (!pTemplateNode)
- return FALSE;
+ return false;
m_pTemplatePageSetRoot = pTemplateNode->GetProperty(0, XFA_Element::PageSet);
ASSERT(m_pTemplatePageSetRoot);
@@ -294,11 +294,11 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
if (pPageArea->GetElementType() == XFA_Element::PageArea) {
iCount++;
if (pPageArea->GetFirstChildByClass(XFA_Element::ContentArea))
- return TRUE;
+ return true;
}
}
if (iCount > 0)
- return FALSE;
+ return false;
CXFA_Document* pDocument = pTemplateNode->GetDocument();
pPageArea = m_pTemplatePageSetRoot->GetChild(0, XFA_Element::PageArea);
@@ -306,7 +306,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
pPageArea = pDocument->CreateNode(m_pTemplatePageSetRoot->GetPacketID(),
XFA_Element::PageArea);
if (!pPageArea)
- return FALSE;
+ return false;
m_pTemplatePageSetRoot->InsertChild(pPageArea, nullptr);
pPageArea->SetFlag(XFA_NodeFlag_Initialized, true);
@@ -316,7 +316,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
pContentArea = pDocument->CreateNode(pPageArea->GetPacketID(),
XFA_Element::ContentArea);
if (!pContentArea)
- return FALSE;
+ return false;
pPageArea->InsertChild(pContentArea, nullptr);
pContentArea->SetFlag(XFA_NodeFlag_Initialized, true);
@@ -334,7 +334,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
pMedium =
pDocument->CreateNode(pPageArea->GetPacketID(), XFA_Element::Medium);
if (!pContentArea)
- return FALSE;
+ return false;
pPageArea->InsertChild(pMedium, nullptr);
pMedium->SetFlag(XFA_NodeFlag_Initialized, true);
@@ -343,11 +343,11 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
pMedium->SetMeasure(XFA_ATTRIBUTE_Long,
CXFA_Measurement(11.0f, XFA_UNIT_In));
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) {
- FX_BOOL bProBreakBefore = FALSE;
+bool CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) {
+ bool bProBreakBefore = false;
CXFA_Node* pBreakBeforeNode = nullptr;
while (pRootSubform) {
for (CXFA_Node* pBreakNode =
@@ -359,7 +359,7 @@ FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) {
(eType == XFA_Element::Break &&
pBreakNode->GetEnum(XFA_ATTRIBUTE_Before) !=
XFA_ATTRIBUTEENUM_Auto)) {
- bProBreakBefore = TRUE;
+ bProBreakBefore = true;
pBreakBeforeNode = pBreakNode;
break;
}
@@ -367,7 +367,7 @@ FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) {
if (bProBreakBefore)
break;
- bProBreakBefore = TRUE;
+ bProBreakBefore = true;
pRootSubform = pRootSubform->GetFirstChildByClass(XFA_Element::Subform);
while (pRootSubform &&
!XFA_ItemLayoutProcessor_IsTakingSpace(pRootSubform)) {
@@ -377,21 +377,21 @@ FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) {
}
CXFA_Node *pLeader, *pTrailer;
if (pBreakBeforeNode &&
- ExecuteBreakBeforeOrAfter(pBreakBeforeNode, TRUE, pLeader, pTrailer)) {
+ ExecuteBreakBeforeOrAfter(pBreakBeforeNode, true, pLeader, pTrailer)) {
m_pCurrentContainerRecord = m_rgProposedContainerRecord.GetHeadPosition();
- return TRUE;
+ return true;
}
- return AppendNewPage(TRUE);
+ return AppendNewPage(true);
}
-FX_BOOL CXFA_LayoutPageMgr::AppendNewPage(FX_BOOL bFirstTemPage) {
+bool CXFA_LayoutPageMgr::AppendNewPage(bool bFirstTemPage) {
if (m_pCurrentContainerRecord !=
m_rgProposedContainerRecord.GetTailPosition()) {
- return TRUE;
+ return true;
}
CXFA_Node* pPageNode = GetNextAvailPageArea(nullptr);
if (!pPageNode)
- return FALSE;
+ return false;
if (bFirstTemPage && !m_pCurrentContainerRecord)
m_pCurrentContainerRecord = m_rgProposedContainerRecord.GetHeadPosition();
return !bFirstTemPage || m_pCurrentContainerRecord;
@@ -439,7 +439,7 @@ void CXFA_LayoutPageMgr::SubmitContentItem(
XFA_ItemLayoutProcessorResult eStatus) {
if (pContentLayoutItem) {
GetCurrentContainerRecord()->pCurContentArea->AddChild(pContentLayoutItem);
- m_bCreateOverFlowPage = FALSE;
+ m_bCreateOverFlowPage = false;
}
if (eStatus != XFA_ItemLayoutProcessorResult_Done) {
@@ -470,11 +470,11 @@ FX_FLOAT CXFA_LayoutPageMgr::GetAvailHeight() {
return XFA_LAYOUT_FLOAT_MAX;
}
-FX_BOOL XFA_LayoutPageMgr_RunBreakTestScript(CXFA_Node* pTestScript) {
+bool XFA_LayoutPageMgr_RunBreakTestScript(CXFA_Node* pTestScript) {
CFX_WideString wsExpression;
pTestScript->TryContent(wsExpression);
if (wsExpression.IsEmpty())
- return TRUE;
+ return true;
return pTestScript->GetDocument()->GetNotify()->RunScript(
pTestScript, pTestScript->GetNodeItem(XFA_NODEITEM_Parent,
XFA_ObjectType::ContainerNode));
@@ -482,7 +482,7 @@ FX_BOOL XFA_LayoutPageMgr_RunBreakTestScript(CXFA_Node* pTestScript) {
CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(
CXFA_Node* pPageNode,
- FX_BOOL bCreateNew) {
+ bool bCreateNew) {
CXFA_ContainerRecord* pNewRecord = new CXFA_ContainerRecord();
if (m_pCurrentContainerRecord) {
if (!IsPageSetRootOrderedOccurrence() || !pPageNode) {
@@ -622,12 +622,12 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
if (!FindPageAreaFromPageSet_SimplexDuplex(
pPageSetLayoutItem->m_pFormNode, nullptr, nullptr, nullptr,
- TRUE, TRUE, nPageAreaCount == 1 ? XFA_ATTRIBUTEENUM_Only
+ true, true, nPageAreaCount == 1 ? XFA_ATTRIBUTEENUM_Only
: XFA_ATTRIBUTEENUM_Last) &&
(nPageAreaCount == 1 &&
!FindPageAreaFromPageSet_SimplexDuplex(
pPageSetLayoutItem->m_pFormNode, nullptr, nullptr, nullptr,
- TRUE, TRUE, XFA_ATTRIBUTEENUM_Last))) {
+ true, true, XFA_ATTRIBUTEENUM_Last))) {
break;
}
CXFA_Node* pNode = m_pCurPageArea;
@@ -647,7 +647,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
break;
}
}
- FX_BOOL bUsable = TRUE;
+ bool bUsable = true;
CFX_ArrayTemplate<FX_FLOAT> rgUsedHeights;
for (CXFA_LayoutItem* pChildLayoutItem =
pLastPageAreaLayoutItem->m_pFirstChild;
@@ -685,7 +685,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
pContentAreaNode->GetMeasure(XFA_ATTRIBUTE_H)
.ToUnit(XFA_UNIT_Pt) +
XFA_LAYOUT_FLOAT_PERCISION) {
- bUsable = FALSE;
+ bUsable = false;
break;
}
}
@@ -739,11 +739,11 @@ int32_t CXFA_LayoutPageMgr::GetPageIndex(
return m_PageArray.Find(const_cast<CXFA_ContainerLayoutItem*>(pPage));
}
-FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType,
- XFA_ATTRIBUTEENUM eTargetType,
- CXFA_Node* pTarget,
- FX_BOOL bStartNew) {
- FX_BOOL bRet = FALSE;
+bool CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType,
+ XFA_ATTRIBUTEENUM eTargetType,
+ CXFA_Node* pTarget,
+ bool bStartNew) {
+ bool bRet = false;
switch (eTargetType) {
case XFA_ATTRIBUTEENUM_ContentArea:
if (pTarget && pTarget->GetElementType() != XFA_Element::ContentArea)
@@ -766,7 +766,7 @@ FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType,
if (!pTarget || !m_pCurrentContainerRecord ||
pTarget != GetCurrentContainerRecord()->pCurPageArea->m_pFormNode ||
bStartNew) {
- CXFA_Node* pPageArea = GetNextAvailPageArea(pTarget, nullptr, TRUE);
+ CXFA_Node* pPageArea = GetNextAvailPageArea(pTarget, nullptr, true);
bRet = !!pPageArea;
}
break;
@@ -785,9 +785,9 @@ FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType,
return bRet;
}
-FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter(
+bool CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter(
CXFA_Node* pCurNode,
- FX_BOOL bBefore,
+ bool bBefore,
CXFA_Node*& pBreakLeaderTemplate,
CXFA_Node*& pBreakTrailerTemplate) {
XFA_Element eType = pCurNode->GetElementType();
@@ -798,23 +798,23 @@ FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter(
CXFA_Node* pFormNode = pCurNode->GetNodeItem(
XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode);
CXFA_Node* pContainer = pFormNode->GetTemplateNode();
- FX_BOOL bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0;
+ bool bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0;
CXFA_Node* pScript = pCurNode->GetFirstChildByClass(XFA_Element::Script);
if (pScript && !XFA_LayoutPageMgr_RunBreakTestScript(pScript))
- return FALSE;
+ return false;
CFX_WideStringC wsTarget = pCurNode->GetCData(XFA_ATTRIBUTE_Target);
CXFA_Node* pTarget =
- ResolveBreakTarget(m_pTemplatePageSetRoot, TRUE, wsTarget);
+ ResolveBreakTarget(m_pTemplatePageSetRoot, true, wsTarget);
wsBreakTrailer = pCurNode->GetCData(XFA_ATTRIBUTE_Trailer);
wsBreakLeader = pCurNode->GetCData(XFA_ATTRIBUTE_Leader);
pBreakLeaderTemplate =
- ResolveBreakTarget(pContainer, TRUE, wsBreakLeader);
+ ResolveBreakTarget(pContainer, true, wsBreakLeader);
pBreakTrailerTemplate =
- ResolveBreakTarget(pContainer, TRUE, wsBreakTrailer);
+ ResolveBreakTarget(pContainer, true, wsBreakTrailer);
if (RunBreak(eType, pCurNode->GetEnum(XFA_ATTRIBUTE_TargetType), pTarget,
bStartNew)) {
- return TRUE;
+ return true;
}
if (m_rgProposedContainerRecord.GetCount() > 0 &&
m_pCurrentContainerRecord ==
@@ -833,36 +833,36 @@ FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter(
pParentNode->GetElementType() != XFA_Element::Form) {
break;
}
- return TRUE;
+ return true;
}
break;
}
case XFA_Element::Break: {
- FX_BOOL bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0;
+ bool bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0;
CFX_WideStringC wsTarget = pCurNode->GetCData(
bBefore ? XFA_ATTRIBUTE_BeforeTarget : XFA_ATTRIBUTE_AfterTarget);
CXFA_Node* pTarget =
- ResolveBreakTarget(m_pTemplatePageSetRoot, TRUE, wsTarget);
+ ResolveBreakTarget(m_pTemplatePageSetRoot, true, wsTarget);
if (RunBreak(bBefore ? XFA_Element::BreakBefore : XFA_Element::BreakAfter,
pCurNode->GetEnum(bBefore ? XFA_ATTRIBUTE_Before
: XFA_ATTRIBUTE_After),
pTarget, bStartNew)) {
- return TRUE;
+ return true;
}
break;
}
default:
break;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_LayoutPageMgr::ProcessBreakBeforeOrAfter(
+bool CXFA_LayoutPageMgr::ProcessBreakBeforeOrAfter(
CXFA_Node* pBreakNode,
- FX_BOOL bBefore,
+ bool bBefore,
CXFA_Node*& pBreakLeaderNode,
CXFA_Node*& pBreakTrailerNode,
- FX_BOOL& bCreatePage) {
+ bool& bCreatePage) {
CXFA_Node* pLeaderTemplate = nullptr;
CXFA_Node* pTrailerTemplate = nullptr;
CXFA_Node* pFormNode = pBreakNode->GetNodeItem(XFA_NODEITEM_Parent,
@@ -879,7 +879,7 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessBreakBeforeOrAfter(
pDataScope = XFA_DataMerge_FindDataScope(pFormNode);
pBreakLeaderNode = pDocument->DataMerge_CopyContainer(
- pLeaderTemplate, pFormNode, pDataScope, TRUE, TRUE, TRUE);
+ pLeaderTemplate, pFormNode, pDataScope, true, true, true);
pDocument->DataMerge_UpdateBindingRelations(pBreakLeaderNode);
SetLayoutGeneratedNodeFlag(pBreakLeaderNode);
}
@@ -888,18 +888,18 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessBreakBeforeOrAfter(
pDataScope = XFA_DataMerge_FindDataScope(pFormNode);
pBreakTrailerNode = pDocument->DataMerge_CopyContainer(
- pTrailerTemplate, pFormNode, pDataScope, TRUE, TRUE, TRUE);
+ pTrailerTemplate, pFormNode, pDataScope, true, true, true);
pDocument->DataMerge_UpdateBindingRelations(pBreakTrailerNode);
SetLayoutGeneratedNodeFlag(pBreakTrailerNode);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_LayoutPageMgr::ProcessBookendLeaderOrTrailer(
+bool CXFA_LayoutPageMgr::ProcessBookendLeaderOrTrailer(
CXFA_Node* pBookendNode,
- FX_BOOL bLeader,
+ bool bLeader,
CXFA_Node*& pBookendAppendNode) {
CXFA_Node* pLeaderTemplate = nullptr;
CXFA_Node* pFormNode = pBookendNode->GetNodeItem(
@@ -912,19 +912,19 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessBookendLeaderOrTrailer(
pDataScope = XFA_DataMerge_FindDataScope(pFormNode);
pBookendAppendNode = pDocument->DataMerge_CopyContainer(
- pLeaderTemplate, pFormNode, pDataScope, TRUE, TRUE, TRUE);
+ pLeaderTemplate, pFormNode, pDataScope, true, true, true);
pDocument->DataMerge_UpdateBindingRelations(pBookendAppendNode);
SetLayoutGeneratedNodeFlag(pBookendAppendNode);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
CXFA_Node*& pLeaderTemplate,
CXFA_Node*& pTrailerTemplate,
- FX_BOOL bCreatePage) {
+ bool bCreatePage) {
CXFA_Node* pContainer =
pOverflowNode
->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode)
@@ -941,17 +941,17 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
if (!wsOverflowTarget.IsEmpty() && bCreatePage &&
!m_bCreateOverFlowPage) {
CXFA_Node* pTarget =
- ResolveBreakTarget(m_pTemplatePageSetRoot, TRUE, wsOverflowTarget);
+ ResolveBreakTarget(m_pTemplatePageSetRoot, true, wsOverflowTarget);
if (pTarget) {
- m_bCreateOverFlowPage = TRUE;
+ m_bCreateOverFlowPage = true;
switch (pTarget->GetElementType()) {
case XFA_Element::PageArea:
RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_PageArea,
- pTarget, TRUE);
+ pTarget, true);
break;
case XFA_Element::ContentArea:
RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_ContentArea,
- pTarget, TRUE);
+ pTarget, true);
break;
default:
break;
@@ -960,9 +960,9 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
}
if (!bCreatePage) {
pLeaderTemplate =
- ResolveBreakTarget(pContainer, TRUE, wsOverflowLeader);
+ ResolveBreakTarget(pContainer, true, wsOverflowLeader);
pTrailerTemplate =
- ResolveBreakTarget(pContainer, TRUE, wsOverflowTrailer);
+ ResolveBreakTarget(pContainer, true, wsOverflowTrailer);
}
return pOverflowNode;
}
@@ -980,17 +980,17 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
pOverflowNode->TryCData(XFA_ATTRIBUTE_Target, wsOverflowTarget);
if (!wsOverflowTarget.IsEmpty() && bCreatePage && !m_bCreateOverFlowPage) {
CXFA_Node* pTarget =
- ResolveBreakTarget(m_pTemplatePageSetRoot, TRUE, wsOverflowTarget);
+ ResolveBreakTarget(m_pTemplatePageSetRoot, true, wsOverflowTarget);
if (pTarget) {
- m_bCreateOverFlowPage = TRUE;
+ m_bCreateOverFlowPage = true;
switch (pTarget->GetElementType()) {
case XFA_Element::PageArea:
RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_PageArea, pTarget,
- TRUE);
+ true);
break;
case XFA_Element::ContentArea:
RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_ContentArea,
- pTarget, TRUE);
+ pTarget, true);
break;
default:
break;
@@ -998,26 +998,26 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode,
}
}
if (!bCreatePage) {
- pLeaderTemplate = ResolveBreakTarget(pContainer, TRUE, wsOverflowLeader);
- pTrailerTemplate = ResolveBreakTarget(pContainer, TRUE, wsOverflowTrailer);
+ pLeaderTemplate = ResolveBreakTarget(pContainer, true, wsOverflowLeader);
+ pTrailerTemplate = ResolveBreakTarget(pContainer, true, wsOverflowTrailer);
}
return pOverflowNode;
}
-FX_BOOL CXFA_LayoutPageMgr::ProcessOverflow(CXFA_Node* pFormNode,
- CXFA_Node*& pLeaderNode,
- CXFA_Node*& pTrailerNode,
- FX_BOOL bDataMerge,
- FX_BOOL bCreatePage) {
+bool CXFA_LayoutPageMgr::ProcessOverflow(CXFA_Node* pFormNode,
+ CXFA_Node*& pLeaderNode,
+ CXFA_Node*& pTrailerNode,
+ bool bDataMerge,
+ bool bCreatePage) {
if (!pFormNode)
- return FALSE;
+ return false;
CXFA_Node* pLeaderTemplate = nullptr;
CXFA_Node* pTrailerTemplate = nullptr;
- FX_BOOL bIsOverflowNode = FALSE;
+ bool bIsOverflowNode = false;
if (pFormNode->GetElementType() == XFA_Element::Overflow ||
pFormNode->GetElementType() == XFA_Element::Break) {
- bIsOverflowNode = TRUE;
+ bIsOverflowNode = true;
}
for (CXFA_Node* pCurNode =
bIsOverflowNode ? pFormNode
@@ -1035,7 +1035,7 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessOverflow(CXFA_Node* pFormNode,
pDataScope = XFA_DataMerge_FindDataScope(pFormNode);
pLeaderNode = pDocument->DataMerge_CopyContainer(
- pLeaderTemplate, pFormNode, pDataScope, TRUE, TRUE, TRUE);
+ pLeaderTemplate, pFormNode, pDataScope, true, true, true);
pDocument->DataMerge_UpdateBindingRelations(pLeaderNode);
SetLayoutGeneratedNodeFlag(pLeaderNode);
}
@@ -1044,22 +1044,22 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessOverflow(CXFA_Node* pFormNode,
pDataScope = XFA_DataMerge_FindDataScope(pFormNode);
pTrailerNode = pDocument->DataMerge_CopyContainer(
- pTrailerTemplate, pFormNode, pDataScope, TRUE, TRUE, TRUE);
+ pTrailerTemplate, pFormNode, pDataScope, true, true, true);
pDocument->DataMerge_UpdateBindingRelations(pTrailerNode);
SetLayoutGeneratedNodeFlag(pTrailerNode);
}
- return TRUE;
+ return true;
}
if (bIsOverflowNode) {
break;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer(
+bool CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer(
CXFA_Node* pBookendNode,
- FX_BOOL bLeader,
+ bool bLeader,
CXFA_Node*& pBookendAppendTemplate) {
CFX_WideStringC wsBookendLeader;
CXFA_Node* pContainer =
@@ -1072,30 +1072,29 @@ FX_BOOL CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer(
wsBookendLeader);
if (!wsBookendLeader.IsEmpty()) {
pBookendAppendTemplate =
- ResolveBreakTarget(pContainer, FALSE, wsBookendLeader);
- return TRUE;
+ ResolveBreakTarget(pContainer, false, wsBookendLeader);
+ return true;
}
- return FALSE;
+ return false;
} else if (pBookendNode->GetElementType() == XFA_Element::Bookend) {
pBookendNode->TryCData(
bLeader ? XFA_ATTRIBUTE_Leader : XFA_ATTRIBUTE_Trailer,
wsBookendLeader);
pBookendAppendTemplate =
- ResolveBreakTarget(pContainer, TRUE, wsBookendLeader);
- return TRUE;
+ ResolveBreakTarget(pContainer, true, wsBookendLeader);
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet(
- CXFA_Node* pPageSet,
- CXFA_Node* pStartChild,
- CXFA_Node* pTargetPageArea,
- CXFA_Node* pTargetContentArea,
- FX_BOOL bNewPage,
- FX_BOOL bQuery) {
+bool CXFA_LayoutPageMgr::FindPageAreaFromPageSet(CXFA_Node* pPageSet,
+ CXFA_Node* pStartChild,
+ CXFA_Node* pTargetPageArea,
+ CXFA_Node* pTargetContentArea,
+ bool bNewPage,
+ bool bQuery) {
if (!pPageSet && !pStartChild)
- return FALSE;
+ return false;
if (IsPageSetRootOrderedOccurrence()) {
return FindPageAreaFromPageSet_Ordered(pPageSet, pStartChild,
@@ -1110,25 +1109,25 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet(
bQuery, ePreferredPosition);
}
-FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(
+bool CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(
CXFA_Node* pPageSet,
CXFA_Node* pStartChild,
CXFA_Node* pTargetPageArea,
CXFA_Node* pTargetContentArea,
- FX_BOOL bNewPage,
- FX_BOOL bQuery) {
+ bool bNewPage,
+ bool bQuery) {
int32_t iPageSetCount = 0;
if (!pStartChild && !bQuery) {
m_pPageSetMap.Lookup(pPageSet, iPageSetCount);
int32_t iMax = -1;
CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_Element::Occur);
if (pOccurNode)
- pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
+ pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, false);
if (iMax >= 0 && iMax <= iPageSetCount)
- return FALSE;
+ return false;
}
- FX_BOOL bRes = FALSE;
+ bool bRes = false;
CXFA_Node* pCurrentNode =
pStartChild ? pStartChild->GetNodeItem(XFA_NODEITEM_NextSibling)
: pPageSet->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -1138,7 +1137,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(
if ((pTargetPageArea == pCurrentNode || !pTargetPageArea)) {
if (!pCurrentNode->GetFirstChildByClass(XFA_Element::ContentArea)) {
if (pTargetPageArea == pCurrentNode) {
- CreateMinPageRecord(pCurrentNode, TRUE);
+ CreateMinPageRecord(pCurrentNode, true);
pTargetPageArea = nullptr;
}
continue;
@@ -1155,20 +1154,20 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(
}
m_pCurPageArea = pCurrentNode;
m_nCurPageCount = 1;
- bRes = TRUE;
+ bRes = true;
break;
}
if (!bQuery)
- CreateMinPageRecord(pCurrentNode, FALSE);
+ CreateMinPageRecord(pCurrentNode, false);
} else if (pCurrentNode->GetElementType() == XFA_Element::PageSet) {
if (FindPageAreaFromPageSet_Ordered(pCurrentNode, nullptr,
pTargetPageArea, pTargetContentArea,
bNewPage, bQuery)) {
- bRes = TRUE;
+ bRes = true;
break;
}
if (!bQuery)
- CreateMinPageSetRecord(pCurrentNode, TRUE);
+ CreateMinPageSetRecord(pCurrentNode, true);
}
}
if (!pStartChild && bRes && !bQuery)
@@ -1176,13 +1175,13 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered(
return bRes;
}
-FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
+bool CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
CXFA_Node* pPageSet,
CXFA_Node* pStartChild,
CXFA_Node* pTargetPageArea,
CXFA_Node* pTargetContentArea,
- FX_BOOL bNewPage,
- FX_BOOL bQuery,
+ bool bNewPage,
+ bool bQuery,
XFA_ATTRIBUTEENUM ePreferredPosition) {
const XFA_ATTRIBUTEENUM eFallbackPosition = XFA_ATTRIBUTEENUM_Any;
CXFA_Node* pPreferredPageArea = nullptr;
@@ -1196,7 +1195,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
for (; pCurrentNode;
pCurrentNode = pCurrentNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pCurrentNode->GetElementType() == XFA_Element::PageArea) {
- if (!MatchPageAreaOddOrEven(pCurrentNode, FALSE))
+ if (!MatchPageAreaOddOrEven(pCurrentNode, false))
continue;
XFA_ATTRIBUTEENUM eCurPagePosition =
@@ -1215,7 +1214,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
AddContentAreaLayoutItem(pNewRecord, pCurrentNode->GetFirstChildByClass(
XFA_Element::ContentArea));
pPreferredPageArea = pCurrentNode;
- return FALSE;
+ return false;
}
if (ePreferredPosition == XFA_ATTRIBUTEENUM_Only) {
if (eCurPagePosition != ePreferredPosition)
@@ -1226,7 +1225,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
pPreferredPageArea = pCurrentNode;
break;
}
- return FALSE;
+ return false;
}
if ((pTargetPageArea == pCurrentNode || !pTargetPageArea)) {
if (!pCurrentNode->GetFirstChildByClass(XFA_Element::ContentArea)) {
@@ -1247,7 +1246,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
pFallbackPageArea = pCurrentNode;
}
} else if (pTargetPageArea &&
- !MatchPageAreaOddOrEven(pTargetPageArea, FALSE)) {
+ !MatchPageAreaOddOrEven(pTargetPageArea, false)) {
CXFA_ContainerRecord* pNewRecord = CreateContainerRecord();
AddPageAreaLayoutItem(pNewRecord, pCurrentNode);
AddContentAreaLayoutItem(pNewRecord, pCurrentNode->GetFirstChildByClass(
@@ -1269,7 +1268,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
pCurPageArea = pFallbackPageArea;
if (!pCurPageArea)
- return FALSE;
+ return false;
if (!bQuery) {
CXFA_ContainerRecord* pNewRecord = CreateContainerRecord();
@@ -1281,13 +1280,13 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex(
AddContentAreaLayoutItem(pNewRecord, pTargetContentArea);
}
m_pCurPageArea = pCurPageArea;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LayoutPageMgr::MatchPageAreaOddOrEven(CXFA_Node* pPageArea,
- FX_BOOL bLastMatch) {
+bool CXFA_LayoutPageMgr::MatchPageAreaOddOrEven(CXFA_Node* pPageArea,
+ bool bLastMatch) {
if (m_ePageSetMode != XFA_ATTRIBUTEENUM_DuplexPaginated)
- return TRUE;
+ return true;
XFA_ATTRIBUTEENUM eOddOrEven = XFA_ATTRIBUTEENUM_Any;
pPageArea->TryEnum(XFA_ATTRIBUTE_OddOrEven, eOddOrEven);
@@ -1300,14 +1299,14 @@ FX_BOOL CXFA_LayoutPageMgr::MatchPageAreaOddOrEven(CXFA_Node* pPageArea,
return eOddOrEven == XFA_ATTRIBUTEENUM_Odd ? iPageCount % 2 == 0
: iPageCount % 2 == 1;
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
CXFA_Node* pTargetPageArea,
CXFA_Node* pTargetContentArea,
- FX_BOOL bNewPage,
- FX_BOOL bQuery) {
+ bool bNewPage,
+ bool bQuery) {
if (!m_pCurPageArea) {
FindPageAreaFromPageSet(m_pTemplatePageSetRoot, nullptr, pTargetPageArea,
pTargetContentArea, bNewPage, bQuery);
@@ -1324,7 +1323,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
CXFA_Node* pOccurNode =
m_pCurPageArea->GetFirstChildByClass(XFA_Element::Occur);
if (pOccurNode)
- pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
+ pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, false);
if ((iMax < 0 || m_nCurPageCount < iMax)) {
if (!bQuery) {
CXFA_ContainerRecord* pNewRecord =
@@ -1343,7 +1342,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
}
if (!bQuery && IsPageSetRootOrderedOccurrence())
- CreateMinPageRecord(m_pCurPageArea, FALSE, TRUE);
+ CreateMinPageRecord(m_pCurPageArea, false, true);
if (FindPageAreaFromPageSet(m_pCurPageArea->GetNodeItem(XFA_NODEITEM_Parent),
m_pCurPageArea, pTargetPageArea,
pTargetContentArea, bNewPage, bQuery)) {
@@ -1351,7 +1350,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
}
CXFA_Node* pPageSet = m_pCurPageArea->GetNodeItem(XFA_NODEITEM_Parent);
- while (TRUE) {
+ while (true) {
if (FindPageAreaFromPageSet(pPageSet, nullptr, pTargetPageArea,
pTargetContentArea, bNewPage, bQuery)) {
return m_pCurPageArea;
@@ -1370,36 +1369,36 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
return nullptr;
}
-FX_BOOL CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) {
+bool CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) {
CXFA_Node* pCurContentNode =
GetCurrentContainerRecord()->pCurContentArea->m_pFormNode;
if (!pContentArea) {
pContentArea =
pCurContentNode->GetNextSameClassSibling(XFA_Element::ContentArea);
if (!pContentArea)
- return FALSE;
+ return false;
} else {
if (pContentArea->GetNodeItem(XFA_NODEITEM_Parent) != m_pCurPageArea)
- return FALSE;
+ return false;
CXFA_ContainerLayoutItem* pContentAreaLayout = nullptr;
if (!CheckContentAreaNotUsed(GetCurrentContainerRecord()->pCurPageArea,
pContentArea, pContentAreaLayout)) {
- return FALSE;
+ return false;
}
if (pContentAreaLayout) {
if (pContentAreaLayout->m_pFormNode != pCurContentNode) {
CXFA_ContainerRecord* pNewRecord = CreateContainerRecord();
pNewRecord->pCurContentArea = pContentAreaLayout;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
}
CXFA_ContainerRecord* pNewRecord = CreateContainerRecord();
AddContentAreaLayoutItem(pNewRecord, pContentArea);
- return TRUE;
+ return true;
}
void CXFA_LayoutPageMgr::InitPageSetMap() {
@@ -1419,14 +1418,14 @@ void CXFA_LayoutPageMgr::InitPageSetMap() {
}
int32_t CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea,
- FX_BOOL bTargetPageArea,
- FX_BOOL bCreateLast) {
+ bool bTargetPageArea,
+ bool bCreateLast) {
if (!pPageArea)
return 0;
CXFA_Node* pOccurNode = pPageArea->GetFirstChildByClass(XFA_Element::Occur);
int32_t iMin = 0;
- if ((pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) ||
+ if ((pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, false)) ||
bTargetPageArea) {
CXFA_Node* pContentArea =
pPageArea->GetFirstChildByClass(XFA_Element::ContentArea);
@@ -1447,7 +1446,7 @@ int32_t CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea,
}
void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet,
- FX_BOOL bCreateAll) {
+ bool bCreateAll) {
if (!pPageSet)
return;
@@ -1459,7 +1458,7 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet,
CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_Element::Occur);
int32_t iMin = 0;
- if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) {
+ if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, false)) {
if (iCurSetCount < iMin) {
for (int32_t i = 0; i < iMin - iCurSetCount; i++) {
for (CXFA_Node* pCurrentPageNode =
@@ -1467,10 +1466,10 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet,
pCurrentPageNode; pCurrentPageNode = pCurrentPageNode->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
if (pCurrentPageNode->GetElementType() == XFA_Element::PageArea) {
- CreateMinPageRecord(pCurrentPageNode, FALSE);
+ CreateMinPageRecord(pCurrentPageNode, false);
} else if (pCurrentPageNode->GetElementType() ==
XFA_Element::PageSet) {
- CreateMinPageSetRecord(pCurrentPageNode, TRUE);
+ CreateMinPageSetRecord(pCurrentPageNode, true);
}
}
}
@@ -1488,17 +1487,17 @@ void CXFA_LayoutPageMgr::CreateNextMinRecord(CXFA_Node* pRecordNode) {
pCurrentNode;
pCurrentNode = pCurrentNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pCurrentNode->GetElementType() == XFA_Element::PageArea)
- CreateMinPageRecord(pCurrentNode, FALSE);
+ CreateMinPageRecord(pCurrentNode, false);
else if (pCurrentNode->GetElementType() == XFA_Element::PageSet)
- CreateMinPageSetRecord(pCurrentNode, TRUE);
+ CreateMinPageSetRecord(pCurrentNode, true);
}
}
void CXFA_LayoutPageMgr::ProcessLastPageSet() {
- CreateMinPageRecord(m_pCurPageArea, FALSE, TRUE);
+ CreateMinPageRecord(m_pCurPageArea, false, true);
CreateNextMinRecord(m_pCurPageArea);
CXFA_Node* pPageSet = m_pCurPageArea->GetNodeItem(XFA_NODEITEM_Parent);
- while (TRUE) {
+ while (true) {
CreateMinPageSetRecord(pPageSet);
if (pPageSet == m_pTemplatePageSetRoot)
break;
@@ -1508,11 +1507,11 @@ void CXFA_LayoutPageMgr::ProcessLastPageSet() {
}
}
-FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
+bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
CXFA_Node* pCurContentNode =
GetCurrentContainerRecord()->pCurContentArea->m_pFormNode;
if (!pCurContentNode)
- return FALSE;
+ return false;
pCurContentNode =
pCurContentNode->GetNextSameClassSibling(XFA_Element::ContentArea);
@@ -1525,13 +1524,13 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
CXFA_Node* pPageNode = GetCurrentContainerRecord()->pCurPageArea->m_pFormNode;
CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass(XFA_Element::Occur);
int32_t iMax = 0;
- if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE)) {
+ if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, false)) {
if (m_nCurPageCount == iMax) {
CXFA_Node* pSrcPage = m_pCurPageArea;
int32_t nSrcPageCount = m_nCurPageCount;
FX_POSITION psSrcRecord = m_rgProposedContainerRecord.GetTailPosition();
CXFA_Node* pNextPage =
- GetNextAvailPageArea(nullptr, nullptr, FALSE, TRUE);
+ GetNextAvailPageArea(nullptr, nullptr, false, true);
m_pCurPageArea = pSrcPage;
m_nCurPageCount = nSrcPageCount;
CXFA_ContainerRecord* pPrevRecord = static_cast<CXFA_ContainerRecord*>(
@@ -1552,10 +1551,10 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
FX_FLOAT fNextContentHeight =
pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
if (fNextContentHeight > fChildHeight)
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
}
@@ -1564,10 +1563,10 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) {
FX_FLOAT fNextContentHeight =
pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
if (fNextContentHeight < XFA_LAYOUT_FLOAT_PERCISION)
- return TRUE;
+ return true;
if (fNextContentHeight > fChildHeight)
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void CXFA_LayoutPageMgr::ClearData() {
@@ -1590,7 +1589,7 @@ void CXFA_LayoutPageMgr::ClearRecordList() {
m_pCurrentContainerRecord = nullptr;
m_pCurPageArea = nullptr;
m_nCurPageCount = 0;
- m_bCreateOverFlowPage = FALSE;
+ m_bCreateOverFlowPage = false;
m_pPageSetMap.RemoveAll();
}
@@ -1711,7 +1710,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
if (pRootPageSetContainerItem->m_pFormNode->GetPacketID() ==
XFA_XDPPACKET_Template) {
pPendingPageSet =
- pRootPageSetContainerItem->m_pFormNode->CloneTemplateToForm(FALSE);
+ pRootPageSetContainerItem->m_pFormNode->CloneTemplateToForm(false);
} else {
pPendingPageSet = pRootPageSetContainerItem->m_pFormNode;
}
@@ -1733,14 +1732,14 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
case XFA_Element::PageSet: {
CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
pContainerItem->m_pFormNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pParentNode, pContainerItem->m_pFormNode, TRUE,
+ pDocument, pParentNode, pContainerItem->m_pFormNode, true,
nullptr);
break;
}
case XFA_Element::PageArea: {
CXFA_ContainerLayoutItem* pFormLayout = pContainerItem;
CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
- FX_BOOL bIsExistForm = TRUE;
+ bool bIsExistForm = true;
for (int32_t iLevel = 0; iLevel < 3; iLevel++) {
pFormLayout = static_cast<CXFA_ContainerLayoutItem*>(
pFormLayout->m_pFirstChild);
@@ -1753,7 +1752,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
}
}
if (!pFormLayout) {
- bIsExistForm = FALSE;
+ bIsExistForm = false;
break;
}
}
@@ -1784,8 +1783,8 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
}
pContainerItem->m_pFormNode = pDocument->DataMerge_CopyContainer(
pContainerItem->m_pFormNode, pParentNode,
- ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)), TRUE, TRUE,
- TRUE);
+ ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)), true, true,
+ true);
break;
}
case XFA_Element::ContentArea: {
@@ -1919,7 +1918,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData() {
pChildLayoutItem = iterator.MoveToNext();
continue;
}
- FX_BOOL bVisible =
+ bool bVisible =
(pContentItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Presence) ==
XFA_ATTRIBUTEENUM_Visible);
uint32_t dwRelevantChild =
@@ -1982,7 +1981,7 @@ void CXFA_LayoutPageMgr::PrepareLayout() {
CXFA_Node* pNextPageSet =
pPageSetFormNode->GetNextSameClassSibling(XFA_Element::PageSet);
pPageSetFormNode->GetNodeItem(XFA_NODEITEM_Parent)
- ->RemoveChild(pPageSetFormNode, FALSE);
+ ->RemoveChild(pPageSetFormNode, false);
pRootLayoutItem->m_pFormNode->GetDocument()->m_pPendingPageSet.Add(
pPageSetFormNode);
pPageSetFormNode = pNextPageSet;
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.h b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
index 0184602de7..dcd798ea1a 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.h
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
@@ -17,10 +17,10 @@ class CXFA_LayoutPageMgr {
CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor);
~CXFA_LayoutPageMgr();
- FX_BOOL InitLayoutPage(CXFA_Node* pFormNode);
- FX_BOOL PrepareFirstPage(CXFA_Node* pRootSubform);
+ bool InitLayoutPage(CXFA_Node* pFormNode);
+ bool PrepareFirstPage(CXFA_Node* pRootSubform);
FX_FLOAT GetAvailHeight();
- FX_BOOL GetNextAvailContentHeight(FX_FLOAT fChildHeight);
+ bool GetNextAvailContentHeight(FX_FLOAT fChildHeight);
void SubmitContentItem(CXFA_ContentLayoutItem* pContentLayoutItem,
XFA_ItemLayoutProcessorResult eStatus);
void FinishPaginatedPageSets();
@@ -31,25 +31,25 @@ class CXFA_LayoutPageMgr {
inline CXFA_ContainerLayoutItem* GetRootLayoutItem() const {
return m_pPageSetLayoutItemRoot;
}
- FX_BOOL ProcessBreakBeforeOrAfter(CXFA_Node* pBreakNode,
- FX_BOOL bBefore,
- CXFA_Node*& pBreakLeaderNode,
- CXFA_Node*& pBreakTrailerNode,
- FX_BOOL& bCreatePage);
- FX_BOOL ProcessOverflow(CXFA_Node* pFormNode,
- CXFA_Node*& pLeaderNode,
- CXFA_Node*& pTrailerNode,
- FX_BOOL bDataMerge = FALSE,
- FX_BOOL bCreatePage = TRUE);
+ bool ProcessBreakBeforeOrAfter(CXFA_Node* pBreakNode,
+ bool bBefore,
+ CXFA_Node*& pBreakLeaderNode,
+ CXFA_Node*& pBreakTrailerNode,
+ bool& bCreatePage);
+ bool ProcessOverflow(CXFA_Node* pFormNode,
+ CXFA_Node*& pLeaderNode,
+ CXFA_Node*& pTrailerNode,
+ bool bDataMerge = false,
+ bool bCreatePage = true);
CXFA_Node* QueryOverflow(CXFA_Node* pFormNode,
CXFA_LayoutContext* pLayoutContext = nullptr);
- FX_BOOL ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
- FX_BOOL bLeader,
- CXFA_Node*& pBookendAppendNode);
+ bool ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
+ bool bLeader,
+ CXFA_Node*& pBookendAppendNode);
CXFA_LayoutItem* FindOrCreateLayoutItem(CXFA_Node* pFormNode);
protected:
- FX_BOOL AppendNewPage(FX_BOOL bFirstTemPage = FALSE);
+ bool AppendNewPage(bool bFirstTemPage = false);
void ReorderPendingLayoutRecordToTail(CXFA_ContainerRecord* pNewRecord,
CXFA_ContainerRecord* pPrevRecord);
void RemoveLayoutRecord(CXFA_ContainerRecord* pNewRecord,
@@ -62,62 +62,61 @@ class CXFA_LayoutPageMgr {
return result;
}
CXFA_ContainerRecord* CreateContainerRecord(CXFA_Node* pPageNode = nullptr,
- FX_BOOL bCreateNew = FALSE);
+ bool bCreateNew = false);
void AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
CXFA_Node* pNewPageArea);
void AddContentAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
CXFA_Node* pContentArea);
- FX_BOOL RunBreak(XFA_Element eBreakType,
- XFA_ATTRIBUTEENUM eTargetType,
- CXFA_Node* pTarget,
- FX_BOOL bStartNew);
+ bool RunBreak(XFA_Element eBreakType,
+ XFA_ATTRIBUTEENUM eTargetType,
+ CXFA_Node* pTarget,
+ bool bStartNew);
CXFA_Node* BreakOverflow(CXFA_Node* pOverflowNode,
CXFA_Node*& pLeaderTemplate,
CXFA_Node*& pTrailerTemplate,
- FX_BOOL bCreatePage = TRUE);
- FX_BOOL ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
- FX_BOOL bLeader,
- CXFA_Node*& pBookendAppendTemplate);
- FX_BOOL ExecuteBreakBeforeOrAfter(CXFA_Node* pCurNode,
- FX_BOOL bBefore,
- CXFA_Node*& pBreakLeaderTemplate,
- CXFA_Node*& pBreakTrailerTemplate);
+ bool bCreatePage = true);
+ bool ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
+ bool bLeader,
+ CXFA_Node*& pBookendAppendTemplate);
+ bool ExecuteBreakBeforeOrAfter(CXFA_Node* pCurNode,
+ bool bBefore,
+ CXFA_Node*& pBreakLeaderTemplate,
+ CXFA_Node*& pBreakTrailerTemplate);
int32_t CreateMinPageRecord(CXFA_Node* pPageArea,
- FX_BOOL bTargetPageArea,
- FX_BOOL bCreateLast = FALSE);
- void CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCreateAll = FALSE);
+ bool bTargetPageArea,
+ bool bCreateLast = false);
+ void CreateMinPageSetRecord(CXFA_Node* pPageSet, bool bCreateAll = false);
void CreateNextMinRecord(CXFA_Node* pRecordNode);
- FX_BOOL FindPageAreaFromPageSet(CXFA_Node* pPageSet,
- CXFA_Node* pStartChild,
- CXFA_Node* pTargetPageArea = nullptr,
- CXFA_Node* pTargetContentArea = nullptr,
- FX_BOOL bNewPage = FALSE,
- FX_BOOL bQuery = FALSE);
- FX_BOOL FindPageAreaFromPageSet_Ordered(
- CXFA_Node* pPageSet,
- CXFA_Node* pStartChild,
- CXFA_Node* pTargetPageArea = nullptr,
- CXFA_Node* pTargetContentArea = nullptr,
- FX_BOOL bNewPage = FALSE,
- FX_BOOL bQuery = FALSE);
- FX_BOOL FindPageAreaFromPageSet_SimplexDuplex(
+ bool FindPageAreaFromPageSet(CXFA_Node* pPageSet,
+ CXFA_Node* pStartChild,
+ CXFA_Node* pTargetPageArea = nullptr,
+ CXFA_Node* pTargetContentArea = nullptr,
+ bool bNewPage = false,
+ bool bQuery = false);
+ bool FindPageAreaFromPageSet_Ordered(CXFA_Node* pPageSet,
+ CXFA_Node* pStartChild,
+ CXFA_Node* pTargetPageArea = nullptr,
+ CXFA_Node* pTargetContentArea = nullptr,
+ bool bNewPage = false,
+ bool bQuery = false);
+ bool FindPageAreaFromPageSet_SimplexDuplex(
CXFA_Node* pPageSet,
CXFA_Node* pStartChild,
CXFA_Node* pTargetPageArea = nullptr,
CXFA_Node* pTargetContentArea = nullptr,
- FX_BOOL bNewPage = FALSE,
- FX_BOOL bQuery = FALSE,
+ bool bNewPage = false,
+ bool bQuery = false,
XFA_ATTRIBUTEENUM ePreferredPosition = XFA_ATTRIBUTEENUM_First);
- FX_BOOL MatchPageAreaOddOrEven(CXFA_Node* pPageArea, FX_BOOL bLastMatch);
+ bool MatchPageAreaOddOrEven(CXFA_Node* pPageArea, bool bLastMatch);
CXFA_Node* GetNextAvailPageArea(CXFA_Node* pTargetPageArea,
CXFA_Node* pTargetContentArea = nullptr,
- FX_BOOL bNewPage = FALSE,
- FX_BOOL bQuery = FALSE);
- FX_BOOL GetNextContentArea(CXFA_Node* pTargetContentArea);
+ bool bNewPage = false,
+ bool bQuery = false);
+ bool GetNextContentArea(CXFA_Node* pTargetContentArea);
void InitPageSetMap();
void ProcessLastPageSet();
- inline FX_BOOL IsPageSetRootOrderedOccurrence() {
+ inline bool IsPageSetRootOrderedOccurrence() {
return m_ePageSetMode == XFA_ATTRIBUTEENUM_OrderedOccurrence;
}
void ClearData();
@@ -136,7 +135,7 @@ class CXFA_LayoutPageMgr {
int32_t m_nAvailPages;
int32_t m_nCurPageCount;
XFA_ATTRIBUTEENUM m_ePageSetMode;
- FX_BOOL m_bCreateOverFlowPage;
+ bool m_bCreateOverFlowPage;
CFX_MapPtrTemplate<CXFA_Node*, int32_t> m_pPageSetMap;
CFX_ArrayTemplate<CXFA_ContainerLayoutItem*> m_PageArray;
};
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
index 1f3bc880eb..ad1c2a936a 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
@@ -33,7 +33,7 @@ CXFA_LayoutProcessor::CXFA_LayoutProcessor(CXFA_Document* pDocument)
m_pRootItemLayoutProcessor(nullptr),
m_pLayoutPageMgr(nullptr),
m_nProgressCounter(0),
- m_bNeeLayout(TRUE) {}
+ m_bNeeLayout(true) {}
CXFA_LayoutProcessor::~CXFA_LayoutProcessor() {
ClearLayoutData();
@@ -43,7 +43,7 @@ CXFA_Document* CXFA_LayoutProcessor::GetDocument() const {
return m_pDocument;
}
-int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart) {
+int32_t CXFA_LayoutProcessor::StartLayout(bool bForceRestart) {
if (!bForceRestart && !IsNeedLayout())
return 100;
@@ -82,7 +82,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
do {
FX_FLOAT fAvailHeight = m_pLayoutPageMgr->GetAvailHeight();
eStatus =
- m_pRootItemLayoutProcessor->DoLayout(TRUE, fAvailHeight, fAvailHeight);
+ m_pRootItemLayoutProcessor->DoLayout(true, fAvailHeight, fAvailHeight);
if (eStatus != XFA_ItemLayoutProcessorResult_Done)
m_nProgressCounter++;
@@ -98,7 +98,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
if (eStatus == XFA_ItemLayoutProcessorResult_Done) {
m_pLayoutPageMgr->FinishPaginatedPageSets();
m_pLayoutPageMgr->SyncLayoutData();
- m_bNeeLayout = FALSE;
+ m_bNeeLayout = false;
m_rgChangedContainers.RemoveAll();
}
return 100 * (eStatus == XFA_ItemLayoutProcessorResult_Done
@@ -107,9 +107,9 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
m_nProgressCounter;
}
-FX_BOOL CXFA_LayoutProcessor::IncrementLayout() {
+bool CXFA_LayoutProcessor::IncrementLayout() {
if (m_bNeeLayout) {
- StartLayout(TRUE);
+ StartLayout(true);
return DoLayout(nullptr) == 100;
}
@@ -118,14 +118,14 @@ FX_BOOL CXFA_LayoutProcessor::IncrementLayout() {
CXFA_Node* pParentNode =
pNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode);
if (!pParentNode)
- return FALSE;
+ return false;
if (!CXFA_ItemLayoutProcessor::IncrementRelayoutNode(this, pNode,
pParentNode)) {
- return FALSE;
+ return false;
}
}
m_rgChangedContainers.RemoveAll();
- return TRUE;
+ return true;
}
int32_t CXFA_LayoutProcessor::CountPages() const {
@@ -158,6 +158,6 @@ void CXFA_LayoutProcessor::ClearLayoutData() {
m_nProgressCounter = 0;
}
-FX_BOOL CXFA_LayoutProcessor::IsNeedLayout() {
+bool CXFA_LayoutProcessor::IsNeedLayout() {
return m_bNeeLayout || m_rgChangedContainers.GetSize() > 0;
}
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h
index 365c5f2965..d735b385bd 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -24,15 +24,15 @@ class CXFA_LayoutProcessor {
~CXFA_LayoutProcessor();
CXFA_Document* GetDocument() const;
- int32_t StartLayout(FX_BOOL bForceRestart = FALSE);
+ int32_t StartLayout(bool bForceRestart = false);
int32_t DoLayout(IFX_Pause* pPause = nullptr);
- FX_BOOL IncrementLayout();
+ bool IncrementLayout();
int32_t CountPages() const;
CXFA_ContainerLayoutItem* GetPage(int32_t index) const;
CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem);
void AddChangedContainer(CXFA_Node* pContainer);
- void SetForceReLayout(FX_BOOL bForceRestart) { m_bNeeLayout = bForceRestart; }
+ void SetForceReLayout(bool bForceRestart) { m_bNeeLayout = bForceRestart; }
CXFA_ContainerLayoutItem* GetRootLayoutItem() const;
CXFA_ItemLayoutProcessor* GetRootRootItemLayoutProcessor() {
return m_pRootItemLayoutProcessor;
@@ -42,14 +42,14 @@ class CXFA_LayoutProcessor {
private:
void ClearLayoutData();
- FX_BOOL IsNeedLayout();
+ bool IsNeedLayout();
CXFA_Document* m_pDocument;
CXFA_ItemLayoutProcessor* m_pRootItemLayoutProcessor;
CXFA_LayoutPageMgr* m_pLayoutPageMgr;
CXFA_NodeArray m_rgChangedContainers;
uint32_t m_nProgressCounter;
- FX_BOOL m_bNeeLayout;
+ bool m_bNeeLayout;
};
#endif // XFA_FXFA_PARSER_CXFA_LAYOUTPROCESSOR_H_
diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp
index b35aa4146d..f0d9a0bbfd 100644
--- a/xfa/fxfa/parser/cxfa_line.cpp
+++ b/xfa/fxfa/parser/cxfa_line.cpp
@@ -12,7 +12,7 @@ int32_t CXFA_Line::GetHand() {
return m_pNode->GetEnum(XFA_ATTRIBUTE_Hand);
}
-FX_BOOL CXFA_Line::GetSlop() {
+bool CXFA_Line::GetSlop() {
XFA_ATTRIBUTEENUM eSlop = m_pNode->GetEnum(XFA_ATTRIBUTE_Slope);
return eSlop == XFA_ATTRIBUTEENUM_Slash;
}
diff --git a/xfa/fxfa/parser/cxfa_line.h b/xfa/fxfa/parser/cxfa_line.h
index 1d91a5970b..bf180295da 100644
--- a/xfa/fxfa/parser/cxfa_line.h
+++ b/xfa/fxfa/parser/cxfa_line.h
@@ -18,7 +18,7 @@ class CXFA_Line : public CXFA_Data {
explicit CXFA_Line(CXFA_Node* pNode) : CXFA_Data(pNode) {}
int32_t GetHand();
- FX_BOOL GetSlop();
+ bool GetSlop();
CXFA_Edge GetEdge();
};
diff --git a/xfa/fxfa/parser/cxfa_margin.cpp b/xfa/fxfa/parser/cxfa_margin.cpp
index c3ced3df93..38f9626a88 100644
--- a/xfa/fxfa/parser/cxfa_margin.cpp
+++ b/xfa/fxfa/parser/cxfa_margin.cpp
@@ -10,23 +10,22 @@
CXFA_Margin::CXFA_Margin(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-FX_BOOL CXFA_Margin::GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_LeftInset, fInset);
}
-FX_BOOL CXFA_Margin::GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_TopInset, fInset);
}
-FX_BOOL CXFA_Margin::GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_RightInset, fInset);
}
-FX_BOOL CXFA_Margin::GetBottomInset(FX_FLOAT& fInset,
- FX_FLOAT fDefInset) const {
+bool CXFA_Margin::GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset) const {
fInset = fDefInset;
return TryMeasure(XFA_ATTRIBUTE_BottomInset, fInset);
}
diff --git a/xfa/fxfa/parser/cxfa_margin.h b/xfa/fxfa/parser/cxfa_margin.h
index 780f9b2b68..d1c1955194 100644
--- a/xfa/fxfa/parser/cxfa_margin.h
+++ b/xfa/fxfa/parser/cxfa_margin.h
@@ -16,10 +16,10 @@ class CXFA_Margin : public CXFA_Data {
public:
explicit CXFA_Margin(CXFA_Node* pNode);
- FX_BOOL GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- FX_BOOL GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- FX_BOOL GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
- FX_BOOL GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
+ bool GetLeftInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
+ bool GetTopInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
+ bool GetRightInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
+ bool GetBottomInset(FX_FLOAT& fInset, FX_FLOAT fDefInset = 0) const;
};
#endif // XFA_FXFA_PARSER_CXFA_MARGIN_H_
diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp
index cd34f8af25..b1843a8b49 100644
--- a/xfa/fxfa/parser/cxfa_measurement.cpp
+++ b/xfa/fxfa/parser/cxfa_measurement.cpp
@@ -34,43 +34,43 @@ void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure) {
Set(fValue, eUnit);
}
-FX_BOOL CXFA_Measurement::ToString(CFX_WideString& wsMeasure) const {
+bool CXFA_Measurement::ToString(CFX_WideString& wsMeasure) const {
switch (GetUnit()) {
case XFA_UNIT_Mm:
wsMeasure.Format(L"%.8gmm", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Pt:
wsMeasure.Format(L"%.8gpt", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_In:
wsMeasure.Format(L"%.8gin", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Cm:
wsMeasure.Format(L"%.8gcm", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Mp:
wsMeasure.Format(L"%.8gmp", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Pc:
wsMeasure.Format(L"%.8gpc", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Em:
wsMeasure.Format(L"%.8gem", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Percent:
wsMeasure.Format(L"%.8g%%", GetValue());
- return TRUE;
+ return true;
default:
wsMeasure.Format(L"%.8g", GetValue());
- return FALSE;
+ return false;
}
}
-FX_BOOL CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
+bool CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
fValue = GetValue();
XFA_UNIT eFrom = GetUnit();
if (eFrom == eUnit)
- return TRUE;
+ return true;
switch (eFrom) {
case XFA_UNIT_Pt:
@@ -92,29 +92,29 @@ FX_BOOL CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
break;
default:
fValue = 0;
- return FALSE;
+ return false;
}
switch (eUnit) {
case XFA_UNIT_Pt:
- return TRUE;
+ return true;
case XFA_UNIT_Mm:
fValue /= 72 / 2.54f / 10;
- return TRUE;
+ return true;
case XFA_UNIT_In:
fValue /= 72;
- return TRUE;
+ return true;
case XFA_UNIT_Cm:
fValue /= 72 / 2.54f;
- return TRUE;
+ return true;
case XFA_UNIT_Mp:
fValue /= 0.001f;
- return TRUE;
+ return true;
case XFA_UNIT_Pc:
fValue /= 12.0f;
- return TRUE;
+ return true;
default:
fValue = 0;
- return FALSE;
+ return false;
}
}
diff --git a/xfa/fxfa/parser/cxfa_measurement.h b/xfa/fxfa/parser/cxfa_measurement.h
index cf43f7625a..40f71a7fab 100644
--- a/xfa/fxfa/parser/cxfa_measurement.h
+++ b/xfa/fxfa/parser/cxfa_measurement.h
@@ -27,8 +27,8 @@ class CXFA_Measurement {
XFA_UNIT GetUnit() const { return m_eUnit; }
FX_FLOAT GetValue() const { return m_fValue; }
- FX_BOOL ToString(CFX_WideString& wsMeasure) const;
- FX_BOOL ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const;
+ bool ToString(CFX_WideString& wsMeasure) const;
+ bool ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const;
FX_FLOAT ToUnit(XFA_UNIT eUnit) const {
FX_FLOAT f;
return ToUnit(eUnit, f) ? f : 0;
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 402ab0e37e..1d0f4333f5 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -127,7 +127,7 @@ CXFA_NodeSetPair* NodeSetPairForNode(CXFA_Node* pNode,
void ReorderDataNodes(const CXFA_NodeSet& sSet1,
const CXFA_NodeSet& sSet2,
- FX_BOOL bInsertBefore) {
+ bool bInsertBefore) {
CXFA_NodeSetPairMapMap rgMap;
for (CXFA_Node* pNode : sSet1) {
CXFA_NodeSetPair* pNodeSetPair = NodeSetPairForNode(pNode, &rgMap);
@@ -218,7 +218,7 @@ void InsertItem(CXFA_Node* pInstMgrNode,
CXFA_Node* pNewInstance,
int32_t iPos,
int32_t iCount = -1,
- FX_BOOL bMoveDataBindingNodes = TRUE) {
+ bool bMoveDataBindingNodes = true) {
if (iCount < 0)
iCount = GetCount(pInstMgrNode);
if (iPos < 0)
@@ -256,7 +256,7 @@ void InsertItem(CXFA_Node* pInstMgrNode,
sAfter.insert(pDataNode);
}
- ReorderDataNodes(sNew, sAfter, FALSE);
+ ReorderDataNodes(sNew, sAfter, false);
}
} else {
CXFA_Node* pBeforeInstance = GetItem(pInstMgrNode, iPos);
@@ -287,14 +287,14 @@ void InsertItem(CXFA_Node* pInstMgrNode,
sBefore.insert(pDataNode);
}
- ReorderDataNodes(sNew, sBefore, TRUE);
+ ReorderDataNodes(sNew, sBefore, true);
}
}
}
void RemoveItem(CXFA_Node* pInstMgrNode,
CXFA_Node* pRemoveInstance,
- FX_BOOL bRemoveDataBinding = TRUE) {
+ bool bRemoveDataBinding = true) {
pInstMgrNode->GetNodeItem(XFA_NODEITEM_Parent)->RemoveChild(pRemoveInstance);
if (!bRemoveDataBinding)
return;
@@ -317,7 +317,7 @@ void RemoveItem(CXFA_Node* pInstMgrNode,
}
}
-CXFA_Node* CreateInstance(CXFA_Node* pInstMgrNode, FX_BOOL bDataMerge) {
+CXFA_Node* CreateInstance(CXFA_Node* pInstMgrNode, bool bDataMerge) {
CXFA_Document* pDocument = pInstMgrNode->GetDocument();
CXFA_Node* pTemplateNode = pInstMgrNode->GetTemplateNode();
CXFA_Node* pFormParent = pInstMgrNode->GetNodeItem(XFA_NODEITEM_Parent);
@@ -334,7 +334,7 @@ CXFA_Node* CreateInstance(CXFA_Node* pInstMgrNode, FX_BOOL bDataMerge) {
ASSERT(pDataScope);
}
CXFA_Node* pInstance = pDocument->DataMerge_CopyContainer(
- pTemplateNode, pFormParent, pDataScope, TRUE, bDataMerge, TRUE);
+ pTemplateNode, pFormParent, pDataScope, true, bDataMerge, true);
if (pInstance) {
pDocument->DataMerge_UpdateBindingRelations(pInstance);
pFormParent->RemoveChild(pInstance);
@@ -511,7 +511,7 @@ CXFA_Node::~CXFA_Node() {
m_pXMLNode->Release();
}
-CXFA_Node* CXFA_Node::Clone(FX_BOOL bRecursive) {
+CXFA_Node* CXFA_Node::Clone(bool bRecursive) {
CXFA_Node* pClone = m_pDocument->CreateNode(m_ePacket, m_elementType);
if (!pClone)
return nullptr;
@@ -522,7 +522,7 @@ CXFA_Node* CXFA_Node::Clone(FX_BOOL bRecursive) {
CFDE_XMLNode* pCloneXML = nullptr;
if (IsAttributeInXML()) {
CFX_WideString wsName;
- GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE);
+ GetAttribute(XFA_ATTRIBUTE_Name, wsName, false);
CFDE_XMLElement* pCloneXMLElement = new CFDE_XMLElement(wsName);
CFX_WideStringC wsValue = GetCData(XFA_ATTRIBUTE_Value);
if (!wsValue.IsEmpty()) {
@@ -532,7 +532,7 @@ CXFA_Node* CXFA_Node::Clone(FX_BOOL bRecursive) {
pCloneXMLElement = nullptr;
pClone->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_Unknown);
} else {
- pCloneXML = m_pXMLNode->Clone(FALSE);
+ pCloneXML = m_pXMLNode->Clone(false);
}
pClone->SetXMLMappingNode(pCloneXML);
pClone->SetFlag(XFA_NodeFlag_OwnXMLNode, false);
@@ -693,7 +693,7 @@ CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_Element eType,
return pNode;
}
-CXFA_Node* CXFA_Node::CloneTemplateToForm(FX_BOOL bRecursive) {
+CXFA_Node* CXFA_Node::CloneTemplateToForm(bool bRecursive) {
ASSERT(m_ePacket == XFA_XDPPACKET_Template);
CXFA_Node* pClone =
m_pDocument->CreateNode(XFA_XDPPACKET_Form, m_elementType);
@@ -796,7 +796,7 @@ int32_t CXFA_Node::RemoveBindItem(CXFA_Node* pFormNode) {
return pOldFormItem ? 1 : 0;
}
-FX_BOOL CXFA_Node::HasBindItem() {
+bool CXFA_Node::HasBindItem() {
return GetPacketID() == XFA_XDPPACKET_Datasets &&
GetObject(XFA_ATTRIBUTE_BindingNode);
}
@@ -869,34 +869,34 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() {
: nullptr;
}
-FX_BOOL CXFA_Node::GetLocaleName(CFX_WideString& wsLocaleName) {
+bool CXFA_Node::GetLocaleName(CFX_WideString& wsLocaleName) {
CXFA_Node* pForm = GetDocument()->GetXFAObject(XFA_HASHCODE_Form)->AsNode();
CXFA_Node* pTopSubform = pForm->GetFirstChildByClass(XFA_Element::Subform);
ASSERT(pTopSubform);
CXFA_Node* pLocaleNode = this;
- FX_BOOL bLocale = FALSE;
+ bool bLocale = false;
do {
- bLocale = pLocaleNode->TryCData(XFA_ATTRIBUTE_Locale, wsLocaleName, FALSE);
+ bLocale = pLocaleNode->TryCData(XFA_ATTRIBUTE_Locale, wsLocaleName, false);
if (!bLocale) {
pLocaleNode = pLocaleNode->GetNodeItem(XFA_NODEITEM_Parent);
}
} while (pLocaleNode && pLocaleNode != pTopSubform && !bLocale);
if (bLocale)
- return TRUE;
+ return true;
CXFA_Node* pConfig = ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Config));
wsLocaleName = GetDocument()->GetLocalMgr()->GetConfigLocaleName(pConfig);
if (!wsLocaleName.IsEmpty())
- return TRUE;
+ return true;
if (pTopSubform &&
- pTopSubform->TryCData(XFA_ATTRIBUTE_Locale, wsLocaleName, FALSE)) {
- return TRUE;
+ pTopSubform->TryCData(XFA_ATTRIBUTE_Locale, wsLocaleName, false)) {
+ return true;
}
IFX_Locale* pLocale = GetDocument()->GetLocalMgr()->GetDefLocale();
if (pLocale) {
wsLocaleName = pLocale->GetName();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
@@ -904,7 +904,7 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
XFA_ATTRIBUTEENUM eLayoutType = GetEnum(XFA_ATTRIBUTE_Layout);
if (pKeep) {
XFA_ATTRIBUTEENUM eIntact;
- if (pKeep->TryEnum(XFA_ATTRIBUTE_Intact, eIntact, FALSE)) {
+ if (pKeep->TryEnum(XFA_ATTRIBUTE_Intact, eIntact, false)) {
if (eIntact == XFA_ATTRIBUTEENUM_None &&
eLayoutType == XFA_ATTRIBUTEENUM_Row &&
m_pDocument->GetCurVersionMode() < XFA_VERSION_208) {
@@ -914,14 +914,14 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
pPreviewRow->GetEnum(XFA_ATTRIBUTE_Layout) ==
XFA_ATTRIBUTEENUM_Row) {
XFA_ATTRIBUTEENUM eValue;
- if (pKeep->TryEnum(XFA_ATTRIBUTE_Previous, eValue, FALSE) &&
+ if (pKeep->TryEnum(XFA_ATTRIBUTE_Previous, eValue, false) &&
(eValue == XFA_ATTRIBUTEENUM_ContentArea ||
eValue == XFA_ATTRIBUTEENUM_PageArea)) {
return XFA_ATTRIBUTEENUM_ContentArea;
}
CXFA_Node* pNode =
pPreviewRow->GetFirstChildByClass(XFA_Element::Keep);
- if (pNode && pNode->TryEnum(XFA_ATTRIBUTE_Next, eValue, FALSE) &&
+ if (pNode && pNode->TryEnum(XFA_ATTRIBUTE_Next, eValue, false) &&
(eValue == XFA_ATTRIBUTEENUM_ContentArea ||
eValue == XFA_ATTRIBUTEENUM_PageArea)) {
return XFA_ATTRIBUTEENUM_ContentArea;
@@ -962,7 +962,7 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
XFA_VERSION version = m_pDocument->GetCurVersionMode();
if (eParLayout == XFA_ATTRIBUTEENUM_Tb && version < XFA_VERSION_208) {
CXFA_Measurement measureH;
- if (TryMeasure(XFA_ATTRIBUTE_H, measureH, FALSE))
+ if (TryMeasure(XFA_ATTRIBUTE_H, measureH, false))
return XFA_ATTRIBUTEENUM_ContentArea;
}
return XFA_ATTRIBUTEENUM_None;
@@ -1023,7 +1023,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
std::unique_ptr<CFXJSE_Value> pValue(
new CFXJSE_Value(pScriptContext->GetRuntime()));
(resoveNodeRS.nodes[0]->*(lpAttributeInfo->lpfnCallback))(
- pValue.get(), FALSE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ pValue.get(), false, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
pArguments->GetReturnValue()->Assign(pValue.get());
} else {
pArguments->GetReturnValue()->SetNull();
@@ -1084,7 +1084,7 @@ void CXFA_Node::Script_Som_ResolveNodeList(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1098,7 +1098,7 @@ void CXFA_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_Nodes(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext)
@@ -1117,7 +1117,7 @@ void CXFA_Node::Script_TreeClass_Nodes(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1130,7 +1130,7 @@ void CXFA_Node::Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_Parent(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1146,7 +1146,7 @@ void CXFA_Node::Script_TreeClass_Parent(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_Index(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1155,7 +1155,7 @@ void CXFA_Node::Script_TreeClass_Index(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1164,7 +1164,7 @@ void CXFA_Node::Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1273,7 +1273,7 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
bParent = !!pArguments->GetInt32(1);
if (iLength >= 3)
iIndex = pArguments->GetInt32(2);
- FX_BOOL bHas = FALSE;
+ bool bHas = false;
const XFA_ATTRIBUTEINFO* pAttributeInfo =
XFA_GetAttributeByName(wsExpression.AsStringC());
CFX_WideString wsValue;
@@ -1325,7 +1325,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
XFA_RecognizeRichText(static_cast<CFDE_XMLElement*>(pXMLNode)))) {
bIgnoreRoot = false;
}
- CXFA_Node* pFakeRoot = Clone(FALSE);
+ CXFA_Node* pFakeRoot = Clone(false);
CFX_WideStringC wsContentType = GetCData(XFA_ATTRIBUTE_ContentType);
if (!wsContentType.IsEmpty()) {
pFakeRoot->SetCData(XFA_ATTRIBUTE_ContentType,
@@ -1334,7 +1334,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
CFDE_XMLNode* pFakeXMLRoot = pFakeRoot->GetXMLMappingNode();
if (!pFakeXMLRoot) {
CFDE_XMLNode* pThisXMLRoot = GetXMLMappingNode();
- pFakeXMLRoot = pThisXMLRoot ? pThisXMLRoot->Clone(FALSE) : nullptr;
+ pFakeXMLRoot = pThisXMLRoot ? pThisXMLRoot->Clone(false) : nullptr;
}
if (!pFakeXMLRoot)
pFakeXMLRoot = new CFDE_XMLElement(CFX_WideString(GetClassName()));
@@ -1386,7 +1386,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
pFakeXMLRoot = nullptr;
}
}
- MoveBufferMapData(pFakeRoot, this, XFA_CalcData, TRUE);
+ MoveBufferMapData(pFakeRoot, this, XFA_CalcData, true);
} else {
CXFA_Node* pChild = pFakeRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
@@ -1441,7 +1441,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
XFA_DataExporter_DealWithDataGroupNode(this);
}
std::unique_ptr<IFX_MemoryStream, ReleaseDeleter<IFX_MemoryStream>>
- pMemoryStream(FX_CreateMemoryStream(TRUE));
+ pMemoryStream(FX_CreateMemoryStream(true));
std::unique_ptr<IFX_Stream, ReleaseDeleter<IFX_Stream>> pStream(
IFX_Stream::CreateStream(
static_cast<IFX_SeekableWriteStream*>(pMemoryStream.get()),
@@ -1454,7 +1454,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
pStream->SetCodePage(FX_CODEPAGE_UTF8);
pStream->WriteData(bsXMLHeader.raw_str(), bsXMLHeader.GetLength());
if (GetPacketID() == XFA_XDPPACKET_Form)
- XFA_DataExporter_RegenerateFormFile(this, pStream.get(), nullptr, TRUE);
+ XFA_DataExporter_RegenerateFormFile(this, pStream.get(), nullptr, true);
else
pElement->SaveXMLNode(pStream.get());
// TODO(weili): Check whether we need to save pretty print XML, pdfium:501.
@@ -1498,7 +1498,7 @@ void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_NodeClass_Ns(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1510,7 +1510,7 @@ void CXFA_Node::Script_NodeClass_Ns(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_NodeClass_Model(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1521,7 +1521,7 @@ void CXFA_Node::Script_NodeClass_Model(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1530,13 +1530,13 @@ void CXFA_Node::Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_NodeClass_IsNull(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
if (GetElementType() == XFA_Element::Subform) {
- pValue->SetBoolean(FALSE);
+ pValue->SetBoolean(false);
return;
}
CFX_WideString strValue;
@@ -1545,7 +1545,7 @@ void CXFA_Node::Script_NodeClass_IsNull(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1592,15 +1592,15 @@ void CXFA_Node::Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_ModelClass_Context(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_ModelClass_AliasNode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Attribute_Integer(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
SetInteger(eAttribute, pValue->ToInteger(), true);
@@ -1610,7 +1610,7 @@ void CXFA_Node::Script_Attribute_Integer(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
pValue->SetInteger(GetInteger(eAttribute));
@@ -1620,7 +1620,7 @@ void CXFA_Node::Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Attribute_BOOL(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
SetBoolean(eAttribute, pValue->ToBoolean(), true);
@@ -1630,7 +1630,7 @@ void CXFA_Node::Script_Attribute_BOOL(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
pValue->SetString(GetBoolean(eAttribute) ? "1" : "0");
@@ -1641,7 +1641,7 @@ void CXFA_Node::Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
void CXFA_Node::Script_Attribute_SendAttributeChangeMessage(
XFA_ATTRIBUTE eAttribute,
- FX_BOOL bScriptModify) {
+ bool bScriptModify) {
CXFA_LayoutProcessor* pLayoutPro = m_pDocument->GetLayoutProcessor();
if (!pLayoutPro)
return;
@@ -1793,7 +1793,7 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage(
}
void CXFA_Node::Script_Attribute_String(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_WideString wsValue = pValue->ToWideString();
@@ -1838,7 +1838,7 @@ void CXFA_Node::Script_Attribute_String(CFXJSE_Value* pValue,
RemoveChild(pHeadChild);
pHeadChild = pSibling;
}
- CXFA_Node* pProtoForm = pProtoNode->CloneTemplateToForm(TRUE);
+ CXFA_Node* pProtoForm = pProtoNode->CloneTemplateToForm(true);
pHeadChild = pProtoForm->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pHeadChild) {
CXFA_Node* pSibling =
@@ -1860,7 +1860,7 @@ void CXFA_Node::Script_Attribute_String(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Attribute_StringRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CFX_WideString wsValue;
@@ -1875,7 +1875,7 @@ void CXFA_Node::Script_Attribute_StringRead(CFXJSE_Value* pValue,
void CXFA_Node::Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if ((argc == 0) || (argc == 1)) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execute");
}
@@ -1890,29 +1890,29 @@ void CXFA_Node::Script_Delta_Restore(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_Delta_CurrentValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Delta_SavedValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Delta_Target(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Som_Message(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_SOM_MESSAGETYPE iMessageType) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- FX_BOOL bNew = FALSE;
+ bool bNew = false;
CXFA_Validate validate = pWidgetData->GetValidate();
if (!validate) {
- validate = pWidgetData->GetValidate(TRUE);
- bNew = TRUE;
+ validate = pWidgetData->GetValidate(true);
+ bNew = true;
}
if (bSetting) {
switch (iMessageType) {
@@ -1955,13 +1955,13 @@ void CXFA_Node::Script_Som_Message(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_ValidationMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Script_Som_Message(pValue, bSetting, XFA_SOM_ValidationMessage);
}
void CXFA_Node::Script_Field_Length(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -1971,12 +1971,12 @@ void CXFA_Node::Script_Field_Length(CFXJSE_Value* pValue,
pValue->SetInteger(0);
return;
}
- pValue->SetInteger(pWidgetData->CountChoiceListItems(TRUE));
+ pValue->SetInteger(pWidgetData->CountChoiceListItems(true));
}
}
void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
XFA_Element eType = GetElementType();
if (eType == XFA_Element::Field) {
@@ -2023,9 +2023,9 @@ void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
if (pContainerWidgetData) {
pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue);
}
- SetScriptContent(wsNewValue, wsFormatValue, true, TRUE);
+ SetScriptContent(wsNewValue, wsFormatValue, true, true);
} else {
- CFX_WideString content = GetScriptContent(TRUE);
+ CFX_WideString content = GetScriptContent(true);
if (content.IsEmpty() && eType != XFA_Element::Text &&
eType != XFA_Element::SubmitUrl) {
pValue->SetNull();
@@ -2042,13 +2042,13 @@ void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
- CFX_WideString content = GetScriptContent(TRUE);
+ CFX_WideString content = GetScriptContent(true);
if (content.IsEmpty()) {
pValue->SetNull();
} else {
@@ -2058,7 +2058,7 @@ void CXFA_Node::Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Boolean_Value(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString newValue;
@@ -2072,21 +2072,21 @@ void CXFA_Node::Script_Boolean_Value(CFXJSE_Value* pValue,
if (pContainerWidgetData) {
pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue);
}
- SetScriptContent(wsNewValue, wsFormatValue, true, TRUE);
+ SetScriptContent(wsNewValue, wsFormatValue, true, true);
} else {
- CFX_WideString wsValue = GetScriptContent(TRUE);
+ CFX_WideString wsValue = GetScriptContent(true);
pValue->SetBoolean(wsValue == FX_WSTRC(L"1"));
}
}
void CXFA_Node::Script_Som_BorderColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- CXFA_Border border = pWidgetData->GetBorder(TRUE);
+ CXFA_Border border = pWidgetData->GetBorder(true);
int32_t iSize = border.CountEdges();
if (bSetting) {
int32_t r = 0;
@@ -2110,13 +2110,13 @@ void CXFA_Node::Script_Som_BorderColor(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_BorderWidth(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- CXFA_Border border = pWidgetData->GetBorder(TRUE);
+ CXFA_Border border = pWidgetData->GetBorder(true);
int32_t iSize = border.CountEdges();
CFX_WideString wsThickness;
if (bSetting) {
@@ -2135,14 +2135,14 @@ void CXFA_Node::Script_Som_BorderWidth(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_FillColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- CXFA_Border border = pWidgetData->GetBorder(TRUE);
- CXFA_Fill borderfill = border.GetFill(TRUE);
+ CXFA_Border border = pWidgetData->GetBorder(true);
+ CXFA_Fill borderfill = border.GetFill(true);
CXFA_Node* pNode = borderfill.GetNode();
if (!pNode) {
return;
@@ -2168,7 +2168,7 @@ void CXFA_Node::Script_Som_FillColor(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_DataNode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CXFA_Node* pDataNode = GetBindData();
@@ -2184,7 +2184,7 @@ void CXFA_Node::Script_Som_DataNode(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
if (pValue && pValue->IsString()) {
@@ -2194,11 +2194,11 @@ void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue,
if (uiType == XFA_Element::Text) {
CFX_WideString wsNewValue = pValue->ToWideString();
CFX_WideString wsFormatValue(wsNewValue);
- SetScriptContent(wsNewValue, wsFormatValue, true, TRUE);
+ SetScriptContent(wsNewValue, wsFormatValue, true, true);
}
}
} else {
- CFX_WideString content = GetScriptContent(TRUE);
+ CFX_WideString content = GetScriptContent(true);
if (content.IsEmpty()) {
pValue->SetNull();
} else {
@@ -2209,7 +2209,7 @@ void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2218,10 +2218,10 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
if (bSetting) {
if (pValue && pValue->IsNull()) {
pWidgetData->m_bPreNull = pWidgetData->m_bIsNull;
- pWidgetData->m_bIsNull = TRUE;
+ pWidgetData->m_bIsNull = true;
} else {
pWidgetData->m_bPreNull = pWidgetData->m_bIsNull;
- pWidgetData->m_bIsNull = FALSE;
+ pWidgetData->m_bIsNull = false;
}
CFX_WideString wsNewText;
if (!(pValue && (pValue->IsNull() || pValue->IsUndefined())))
@@ -2241,9 +2241,9 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
if (pContainerWidgetData) {
pContainerWidgetData->GetFormatDataValue(wsNewText, wsFormatText);
}
- SetScriptContent(wsNewText, wsFormatText, true, TRUE);
+ SetScriptContent(wsNewText, wsFormatText, true, true);
} else {
- CFX_WideString content = GetScriptContent(TRUE);
+ CFX_WideString content = GetScriptContent(true);
if (content.IsEmpty()) {
pValue->SetNull();
} else {
@@ -2262,7 +2262,7 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
} else if (pNode && pNode->GetElementType() == XFA_Element::Integer) {
pValue->SetInteger(FXSYS_wtoi(content.c_str()));
} else if (pNode && pNode->GetElementType() == XFA_Element::Boolean) {
- pValue->SetBoolean(FXSYS_wtoi(content.c_str()) == 0 ? FALSE : TRUE);
+ pValue->SetBoolean(FXSYS_wtoi(content.c_str()) == 0 ? false : true);
} else if (pNode && pNode->GetElementType() == XFA_Element::Float) {
CFX_Decimal decimal(content.AsStringC());
pValue->SetFloat((FX_FLOAT)(double)decimal);
@@ -2275,7 +2275,7 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Field_EditValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2291,13 +2291,13 @@ void CXFA_Node::Script_Field_EditValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_FontColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- CXFA_Font font = pWidgetData->GetFont(TRUE);
+ CXFA_Font font = pWidgetData->GetFont(true);
CXFA_Node* pNode = font.GetNode();
if (!pNode) {
return;
@@ -2323,13 +2323,13 @@ void CXFA_Node::Script_Som_FontColor(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Field_FormatMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Script_Som_Message(pValue, bSetting, XFA_SOM_FormatMessage);
}
void CXFA_Node::Script_Field_FormattedValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2345,13 +2345,13 @@ void CXFA_Node::Script_Field_FormattedValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_Mandatory(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
return;
}
- CXFA_Validate validate = pWidgetData->GetValidate(TRUE);
+ CXFA_Validate validate = pWidgetData->GetValidate(true);
if (bSetting) {
validate.SetNullTest(pValue->ToWideString());
} else {
@@ -2366,13 +2366,13 @@ void CXFA_Node::Script_Som_Mandatory(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Som_MandatoryMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
Script_Som_Message(pValue, bSetting, XFA_SOM_MandatoryMessage);
}
void CXFA_Node::Script_Field_ParentSubform(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -2382,7 +2382,7 @@ void CXFA_Node::Script_Field_ParentSubform(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Field_SelectedIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2394,7 +2394,7 @@ void CXFA_Node::Script_Field_SelectedIndex(CFXJSE_Value* pValue,
pWidgetData->ClearAllSelections();
return;
}
- pWidgetData->SetItemState(iIndex, TRUE, true, TRUE, TRUE);
+ pWidgetData->SetItemState(iIndex, true, true, true, true);
} else {
pValue->SetInteger(pWidgetData->GetSelectedItem());
}
@@ -2405,7 +2405,7 @@ void CXFA_Node::Script_Field_ClearItems(CFXJSE_Arguments* pArguments) {
if (!pWidgetData) {
return;
}
- pWidgetData->DeleteItem(-1, TRUE);
+ pWidgetData->DeleteItem(-1, true);
}
void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) {
@@ -2417,7 +2417,7 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) {
XFA_Element::Field);
if (eventString == "validate") {
pArguments->GetReturnValue()->SetBoolean(
- (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE);
+ (iRet == XFA_EVENTERROR_Error) ? false : true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
@@ -2431,7 +2431,7 @@ void CXFA_Node::Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments) {
if (!pNotify) {
return;
}
- pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize, FALSE, FALSE);
+ pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize, false, false);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
@@ -2448,7 +2448,7 @@ void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments) {
return;
}
int32_t iIndex = pArguments->GetInt32(0);
- FX_BOOL bValue = pWidgetData->DeleteItem(iIndex, TRUE, TRUE);
+ bool bValue = pWidgetData->DeleteItem(iIndex, true, true);
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
pValue->SetBoolean(bValue);
@@ -2471,7 +2471,7 @@ void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsValue;
- FX_BOOL bHasItem = pWidgetData->GetChoiceListItem(wsValue, iIndex, TRUE);
+ bool bHasItem = pWidgetData->GetChoiceListItem(wsValue, iIndex, true);
if (bHasItem) {
pArguments->GetReturnValue()->SetString(
FX_UTF8Encode(wsValue.c_str(), wsValue.GetLength()).AsStringC());
@@ -2510,7 +2510,7 @@ void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments) {
return;
}
int32_t iIndex = pArguments->GetInt32(0);
- FX_BOOL bValue = pWidgetData->GetItemState(iIndex);
+ bool bValue = pWidgetData->GetItemState(iIndex);
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
pValue->SetBoolean(bValue);
@@ -2523,7 +2523,7 @@ void CXFA_Node::Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments) {
if (!pNotify) {
return;
}
- pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate, FALSE, FALSE);
+ pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate, false, false);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
@@ -2548,7 +2548,7 @@ void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments) {
return;
}
CFX_WideString wsValue;
- FX_BOOL bHasItem = pWidgetData->GetChoiceListItem(wsValue, iIndex, FALSE);
+ bool bHasItem = pWidgetData->GetChoiceListItem(wsValue, iIndex, false);
if (bHasItem) {
pArguments->GetReturnValue()->SetString(
FX_UTF8Encode(wsValue.c_str(), wsValue.GetLength()).AsStringC());
@@ -2569,10 +2569,10 @@ void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments) {
int32_t iIndex = pArguments->GetInt32(0);
if (pArguments->GetInt32(1) != 0) {
- pWidgetData->SetItemState(iIndex, TRUE, true, TRUE, TRUE);
+ pWidgetData->SetItemState(iIndex, true, true, true, true);
} else {
if (pWidgetData->GetItemState(iIndex))
- pWidgetData->SetItemState(iIndex, FALSE, true, TRUE, TRUE);
+ pWidgetData->SetItemState(iIndex, false, true, true, true);
}
}
@@ -2596,7 +2596,7 @@ void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments) {
CFX_ByteString bsValue = pArguments->GetUTF8String(1);
wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
}
- pWidgetData->InsertItem(wsLabel, wsValue, -1, TRUE);
+ pWidgetData->InsertItem(wsLabel, wsValue, -1, true);
}
void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) {
@@ -2604,12 +2604,12 @@ void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
int32_t iRet =
- pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate, FALSE, FALSE);
+ pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate, false, false);
pArguments->GetReturnValue()->SetBoolean(
- (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE);
+ (iRet == XFA_EVENTERROR_Error) ? false : true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
@@ -2617,7 +2617,7 @@ void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
} else {
@@ -2626,7 +2626,7 @@ void CXFA_Node::Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -2634,9 +2634,9 @@ void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
}
if (bSetting) {
pWidgetData->SetSelectedMemberByValue(pValue->ToWideString().AsStringC(),
- true, TRUE, TRUE);
+ true, true, true);
} else {
- CFX_WideString wsValue = GetScriptContent(TRUE);
+ CFX_WideString wsValue = GetScriptContent(true);
XFA_VERSION curVersion = GetDocument()->GetCurVersionMode();
if (wsValue.IsEmpty() && curVersion >= XFA_VERSION_300) {
pValue->SetNull();
@@ -2647,7 +2647,7 @@ void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_ExclGroup_Transient(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) {
@@ -2723,11 +2723,11 @@ void CXFA_Node::Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
pArguments->GetReturnValue()->SetBoolean(
- (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE);
+ (iRet == XFA_EVENTERROR_Error) ? false : true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
@@ -2735,7 +2735,7 @@ void CXFA_Node::Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_Som_InstanceIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
int32_t iTo = pValue->ToInteger();
@@ -2771,7 +2771,7 @@ void CXFA_Node::Script_Som_InstanceIndex(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Subform_InstanceManager(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CFX_WideStringC wsName = GetCData(XFA_ATTRIBUTE_Name);
@@ -2799,10 +2799,10 @@ void CXFA_Node::Script_Subform_InstanceManager(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Subform_Locale(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- SetCData(XFA_ATTRIBUTE_Locale, pValue->ToWideString(), true, TRUE);
+ SetCData(XFA_ATTRIBUTE_Locale, pValue->ToWideString(), true, true);
} else {
CFX_WideString wsLocaleName;
GetLocaleName(wsLocaleName);
@@ -2855,11 +2855,11 @@ void CXFA_Node::Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
pArguments->GetReturnValue()->SetBoolean(
- (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE);
+ (iRet == XFA_EVENTERROR_Error) ? false : true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
@@ -2891,7 +2891,7 @@ int32_t CXFA_Node::Subform_and_SubformSet_InstanceIndex() {
void CXFA_Node::Script_Template_FormNodes(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 1) {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"formNodes");
}
@@ -2900,7 +2900,7 @@ void CXFA_Node::Script_Template_FormNodes(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Template_Remerge(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
- m_pDocument->DoDataRemerge(TRUE);
+ m_pDocument->DoDataRemerge(true);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
}
@@ -2911,9 +2911,9 @@ void CXFA_Node::Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
@@ -2966,7 +2966,7 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Template_Recalculate(CFXJSE_Arguments* pArguments) {
if (pArguments->GetLength() == 1) {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate");
}
@@ -2977,9 +2977,9 @@ void CXFA_Node::Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
@@ -2991,9 +2991,9 @@ void CXFA_Node::Script_Template_ExecValidate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
@@ -3005,9 +3005,9 @@ void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
- pArguments->GetReturnValue()->SetBoolean(TRUE);
+ pArguments->GetReturnValue()->SetBoolean(true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"evaluate");
@@ -3015,7 +3015,7 @@ void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_InstanceManager_Max(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -3026,7 +3026,7 @@ void CXFA_Node::Script_InstanceManager_Max(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_InstanceManager_Min(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -3037,7 +3037,7 @@ void CXFA_Node::Script_InstanceManager_Min(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_InstanceManager_Count(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
int32_t iDesired = pValue->ToInteger();
@@ -3129,9 +3129,9 @@ void CXFA_Node::Script_InstanceManager_AddInstance(
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addInstance");
return;
}
- FX_BOOL fFlags = TRUE;
+ bool fFlags = true;
if (argc == 1) {
- fFlags = pArguments->GetInt32(0) == 0 ? FALSE : TRUE;
+ fFlags = pArguments->GetInt32(0) == 0 ? false : true;
}
int32_t iCount = GetCount(this);
CXFA_Occur nodeOccur(GetOccurNode());
@@ -3141,7 +3141,7 @@ void CXFA_Node::Script_InstanceManager_AddInstance(
return;
}
CXFA_Node* pNewInstance = CreateInstance(this, fFlags);
- InsertItem(this, pNewInstance, iCount, iCount, FALSE);
+ InsertItem(this, pNewInstance, iCount, iCount, false);
pArguments->GetReturnValue()->Assign(
m_pDocument->GetScriptContext()->GetJSValueFromMap(pNewInstance));
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
@@ -3165,9 +3165,9 @@ void CXFA_Node::Script_InstanceManager_InsertInstance(
return;
}
int32_t iIndex = pArguments->GetInt32(0);
- FX_BOOL bBind = FALSE;
+ bool bBind = false;
if (argc == 2) {
- bBind = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
+ bBind = pArguments->GetInt32(1) == 0 ? false : true;
}
CXFA_Occur nodeOccur(GetOccurNode());
int32_t iCount = GetCount(this);
@@ -3181,7 +3181,7 @@ void CXFA_Node::Script_InstanceManager_InsertInstance(
return;
}
CXFA_Node* pNewInstance = CreateInstance(this, bBind);
- InsertItem(this, pNewInstance, iIndex, iCount, TRUE);
+ InsertItem(this, pNewInstance, iIndex, iCount, true);
pArguments->GetReturnValue()->Assign(
m_pDocument->GetScriptContext()->GetJSValueFromMap(pNewInstance));
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
@@ -3230,7 +3230,7 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
continue;
}
if (pRemoveInstance->GetElementType() == XFA_Element::InstanceManager) {
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
if (pRemoveInstance->GetNameHash() == dInstanceNameHash) {
@@ -3240,8 +3240,8 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
}
} else if (iDesired > iCount) {
while (iCount < iDesired) {
- CXFA_Node* pNewInstance = CreateInstance(this, TRUE);
- InsertItem(this, pNewInstance, iCount, iCount, FALSE);
+ CXFA_Node* pNewInstance = CreateInstance(this, true);
+ InsertItem(this, pNewInstance, iCount, iCount, false);
iCount++;
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
@@ -3268,8 +3268,8 @@ int32_t CXFA_Node::InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom) {
return 0;
}
CXFA_Node* pMoveInstance = GetItem(this, iFrom);
- RemoveItem(this, pMoveInstance, FALSE);
- InsertItem(this, pMoveInstance, iTo, iCount - 1, TRUE);
+ RemoveItem(this, pMoveInstance, false);
+ InsertItem(this, pMoveInstance, iTo, iCount - 1, true);
CXFA_LayoutProcessor* pLayoutPro = m_pDocument->GetLayoutProcessor();
if (pLayoutPro) {
pLayoutPro->AddChangedContainer(
@@ -3279,7 +3279,7 @@ int32_t CXFA_Node::InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom) {
}
void CXFA_Node::Script_Occur_Max(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_Occur occur(this);
if (bSetting) {
@@ -3291,7 +3291,7 @@ void CXFA_Node::Script_Occur_Max(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Occur_Min(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_Occur occur(this);
if (bSetting) {
@@ -3332,7 +3332,7 @@ void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Form_Remerge(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
- m_pDocument->DoDataRemerge(TRUE);
+ m_pDocument->DoDataRemerge(true);
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
}
@@ -3368,7 +3368,7 @@ void CXFA_Node::Script_Form_Recalculate(CFXJSE_Arguments* pArguments) {
if (bScriptFlags) {
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate);
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
- pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Ready, TRUE);
+ pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Ready, true);
} else {
}
} else {
@@ -3394,11 +3394,11 @@ void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
- pArguments->GetReturnValue()->SetBoolean(FALSE);
+ pArguments->GetReturnValue()->SetBoolean(false);
} else {
int32_t iRet = pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Validate);
pArguments->GetReturnValue()->SetBoolean(
- (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE);
+ (iRet == XFA_EVENTERROR_Error) ? false : true);
}
} else {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
@@ -3406,13 +3406,13 @@ void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_Form_Checksum(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
SetAttribute(XFA_ATTRIBUTE_Checksum, pValue->ToWideString().AsStringC());
} else {
CFX_WideString wsChecksum;
- GetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum, FALSE);
+ GetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum, false);
pValue->SetString(
FX_UTF8Encode(wsChecksum.c_str(), wsChecksum.GetLength()).AsStringC());
}
@@ -3473,7 +3473,7 @@ void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_Packet_Content(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
@@ -3630,11 +3630,11 @@ void CXFA_Node::Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments) {
}
void CXFA_Node::Script_Source_Db(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Xfa_This(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CXFA_Object* pThis = m_pDocument->GetScriptContext()->GetThisObject();
@@ -3644,19 +3644,19 @@ void CXFA_Node::Script_Xfa_This(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Handler_Version(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_SubmitFormat_Mode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Extras_Type(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_Script_Stateless(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
@@ -3666,20 +3666,20 @@ void CXFA_Node::Script_Script_Stateless(CFXJSE_Value* pValue,
}
void CXFA_Node::Script_Encrypt_Format(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {}
-FX_BOOL CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit) {
+bool CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, bool bCanInherit) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
return HasMapModuleKey(pKey, bCanInherit);
}
-FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
- const CFX_WideStringC& wsValue,
- bool bNotify) {
+bool CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
+ const CFX_WideStringC& wsValue,
+ bool bNotify) {
const XFA_ATTRIBUTEINFO* pAttr = XFA_GetAttributeByID(eAttr);
if (!pAttr)
- return FALSE;
+ return false;
XFA_ATTRIBUTETYPE eType = pAttr->eType;
if (eType == XFA_ATTRIBUTETYPE_NOTSURE) {
@@ -3709,15 +3709,15 @@ FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
default:
break;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault) {
+bool CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault) {
const XFA_ATTRIBUTEINFO* pAttr = XFA_GetAttributeByID(eAttr);
if (!pAttr) {
- return FALSE;
+ return false;
}
XFA_ATTRIBUTETYPE eType = pAttr->eType;
if (eType == XFA_ATTRIBUTETYPE_NOTSURE) {
@@ -3729,64 +3729,64 @@ FX_BOOL CXFA_Node::GetAttribute(XFA_ATTRIBUTE eAttr,
case XFA_ATTRIBUTETYPE_Enum: {
XFA_ATTRIBUTEENUM eValue;
if (!TryEnum(pAttr->eName, eValue, bUseDefault)) {
- return FALSE;
+ return false;
}
wsValue = GetAttributeEnumByID(eValue)->pName;
- return TRUE;
+ return true;
} break;
case XFA_ATTRIBUTETYPE_Cdata: {
CFX_WideStringC wsValueC;
if (!TryCData(pAttr->eName, wsValueC, bUseDefault)) {
- return FALSE;
+ return false;
}
wsValue = wsValueC;
- return TRUE;
+ return true;
} break;
case XFA_ATTRIBUTETYPE_Boolean: {
- FX_BOOL bValue;
+ bool bValue;
if (!TryBoolean(pAttr->eName, bValue, bUseDefault)) {
- return FALSE;
+ return false;
}
wsValue = bValue ? FX_WSTRC(L"1") : FX_WSTRC(L"0");
- return TRUE;
+ return true;
} break;
case XFA_ATTRIBUTETYPE_Integer: {
int32_t iValue;
if (!TryInteger(pAttr->eName, iValue, bUseDefault)) {
- return FALSE;
+ return false;
}
wsValue.Format(L"%d", iValue);
- return TRUE;
+ return true;
} break;
case XFA_ATTRIBUTETYPE_Measure: {
CXFA_Measurement mValue;
if (!TryMeasure(pAttr->eName, mValue, bUseDefault)) {
- return FALSE;
+ return false;
}
mValue.ToString(wsValue);
- return TRUE;
+ return true;
} break;
default:
break;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Node::SetAttribute(const CFX_WideStringC& wsAttr,
- const CFX_WideStringC& wsValue,
- bool bNotify) {
+bool CXFA_Node::SetAttribute(const CFX_WideStringC& wsAttr,
+ const CFX_WideStringC& wsValue,
+ bool bNotify) {
const XFA_ATTRIBUTEINFO* pAttributeInfo = XFA_GetAttributeByName(wsValue);
if (pAttributeInfo) {
return SetAttribute(pAttributeInfo->eName, wsValue, bNotify);
}
void* pKey = GetMapKey_Custom(wsAttr);
SetMapModuleString(pKey, wsValue);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::GetAttribute(const CFX_WideStringC& wsAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault) {
+bool CXFA_Node::GetAttribute(const CFX_WideStringC& wsAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault) {
const XFA_ATTRIBUTEINFO* pAttributeInfo = XFA_GetAttributeByName(wsAttr);
if (pAttributeInfo) {
return GetAttribute(pAttributeInfo->eName, wsValue, bUseDefault);
@@ -3796,83 +3796,83 @@ FX_BOOL CXFA_Node::GetAttribute(const CFX_WideStringC& wsAttr,
if (GetMapModuleString(pKey, wsValueC)) {
wsValue = wsValueC;
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::RemoveAttribute(const CFX_WideStringC& wsAttr) {
+bool CXFA_Node::RemoveAttribute(const CFX_WideStringC& wsAttr) {
void* pKey = GetMapKey_Custom(wsAttr);
RemoveMapModuleKey(pKey);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr,
- FX_BOOL& bValue,
- FX_BOOL bUseDefault) {
+bool CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr,
+ bool& bValue,
+ bool bUseDefault) {
void* pValue = nullptr;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue))
- return FALSE;
+ return false;
bValue = !!pValue;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr,
- int32_t& iValue,
- FX_BOOL bUseDefault) {
+bool CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr,
+ int32_t& iValue,
+ bool bUseDefault) {
void* pValue = nullptr;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, bUseDefault, pValue))
- return FALSE;
+ return false;
iValue = (int32_t)(uintptr_t)pValue;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTEENUM& eValue,
- FX_BOOL bUseDefault) {
+bool CXFA_Node::TryEnum(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTEENUM& eValue,
+ bool bUseDefault) {
void* pValue = nullptr;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, bUseDefault, pValue))
- return FALSE;
+ return false;
eValue = (XFA_ATTRIBUTEENUM)(uintptr_t)pValue;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::SetMeasure(XFA_ATTRIBUTE eAttr,
- CXFA_Measurement mValue,
- bool bNotify) {
+bool CXFA_Node::SetMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement mValue,
+ bool bNotify) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
OnChanging(eAttr, bNotify);
SetMapModuleBuffer(pKey, &mValue, sizeof(CXFA_Measurement));
- OnChanged(eAttr, bNotify, FALSE);
- return TRUE;
+ OnChanged(eAttr, bNotify, false);
+ return true;
}
-FX_BOOL CXFA_Node::TryMeasure(XFA_ATTRIBUTE eAttr,
- CXFA_Measurement& mValue,
- FX_BOOL bUseDefault) const {
+bool CXFA_Node::TryMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement& mValue,
+ bool bUseDefault) const {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
void* pValue;
int32_t iBytes;
if (GetMapModuleBuffer(pKey, pValue, iBytes) && iBytes == sizeof(mValue)) {
FXSYS_memcpy(&mValue, pValue, sizeof(mValue));
- return TRUE;
+ return true;
}
if (bUseDefault &&
XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Measure, m_ePacket)) {
FXSYS_memcpy(&mValue, pValue, sizeof(mValue));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CXFA_Measurement CXFA_Node::GetMeasure(XFA_ATTRIBUTE eAttr) const {
CXFA_Measurement mValue;
- return TryMeasure(eAttr, mValue, TRUE) ? mValue : CXFA_Measurement();
+ return TryMeasure(eAttr, mValue, true) ? mValue : CXFA_Measurement();
}
-FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
- const CFX_WideString& wsValue,
- bool bNotify,
- FX_BOOL bScriptModify) {
+bool CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
+ const CFX_WideString& wsValue,
+ bool bNotify,
+ bool bScriptModify) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
OnChanging(eAttr, bNotify);
if (eAttr == XFA_ATTRIBUTE_Value) {
@@ -3887,13 +3887,13 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
if (!IsNeedSavingXMLNode() || eAttr == XFA_ATTRIBUTE_QualifiedName ||
eAttr == XFA_ATTRIBUTE_BindingNode) {
- return TRUE;
+ return true;
}
if (eAttr == XFA_ATTRIBUTE_Name &&
(m_elementType == XFA_Element::DataValue ||
m_elementType == XFA_Element::DataGroup)) {
- return TRUE;
+ return true;
}
if (eAttr == XFA_ATTRIBUTE_Value) {
@@ -3905,7 +3905,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
->SetString(CFX_WideString(GetCData(XFA_ATTRIBUTE_QualifiedName)),
wsValue);
} else {
- FX_BOOL bDeleteChildren = TRUE;
+ bool bDeleteChildren = true;
if (GetPacketID() == XFA_XDPPACKET_Datasets) {
for (CXFA_Node* pChildDataNode =
GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -3913,7 +3913,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
XFA_NODEITEM_NextSibling)) {
CXFA_NodeArray formNodes;
if (pChildDataNode->GetBindItems(formNodes) > 0) {
- bDeleteChildren = FALSE;
+ bDeleteChildren = false;
break;
}
}
@@ -3930,7 +3930,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
default:
ASSERT(0);
}
- return TRUE;
+ return true;
}
const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttr);
@@ -3942,13 +3942,13 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr,
}
static_cast<CFDE_XMLElement*>(m_pXMLNode)->SetString(wsAttrName, wsValue);
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsXMLValue,
- bool bNotify,
- FX_BOOL bScriptModify) {
+bool CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify,
+ bool bScriptModify) {
void* pKey = GetMapKey_Element(GetElementType(), XFA_ATTRIBUTE_Value);
OnChanging(XFA_ATTRIBUTE_Value, bNotify);
CFX_WideString* pClone = new CFX_WideString(wsValue);
@@ -3963,7 +3963,7 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
->SetString(CFX_WideString(GetCData(XFA_ATTRIBUTE_QualifiedName)),
wsXMLValue);
} else {
- FX_BOOL bDeleteChildren = TRUE;
+ bool bDeleteChildren = true;
if (GetPacketID() == XFA_XDPPACKET_Datasets) {
for (CXFA_Node* pChildDataNode =
GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -3971,7 +3971,7 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
XFA_NODEITEM_NextSibling)) {
CXFA_NodeArray formNodes;
if (pChildDataNode->GetBindItems(formNodes) > 0) {
- bDeleteChildren = FALSE;
+ bDeleteChildren = false;
break;
}
}
@@ -3989,88 +3989,88 @@ FX_BOOL CXFA_Node::SetAttributeValue(const CFX_WideString& wsValue,
ASSERT(0);
}
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault,
- FX_BOOL bProto) {
+bool CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault,
+ bool bProto) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
if (eAttr == XFA_ATTRIBUTE_Value) {
CFX_WideString* pStr = (CFX_WideString*)GetUserData(pKey, bProto);
if (pStr) {
wsValue = *pStr;
- return TRUE;
+ return true;
}
} else {
CFX_WideStringC wsValueC;
if (GetMapModuleString(pKey, wsValueC)) {
wsValue = wsValueC;
- return TRUE;
+ return true;
}
}
if (!bUseDefault) {
- return FALSE;
+ return false;
}
void* pValue = nullptr;
if (XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
wsValue = (const FX_WCHAR*)pValue;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
- CFX_WideStringC& wsValue,
- FX_BOOL bUseDefault,
- FX_BOOL bProto) {
+bool CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideStringC& wsValue,
+ bool bUseDefault,
+ bool bProto) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
if (eAttr == XFA_ATTRIBUTE_Value) {
CFX_WideString* pStr = (CFX_WideString*)GetUserData(pKey, bProto);
if (pStr) {
wsValue = pStr->AsStringC();
- return TRUE;
+ return true;
}
} else {
if (GetMapModuleString(pKey, wsValue)) {
- return TRUE;
+ return true;
}
}
if (!bUseDefault) {
- return FALSE;
+ return false;
}
void* pValue = nullptr;
if (XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
wsValue = (CFX_WideStringC)(const FX_WCHAR*)pValue;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr,
- void* pData,
- XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) {
+bool CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
return SetUserData(pKey, pData, pCallbackInfo);
}
-FX_BOOL CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, void*& pData) {
+bool CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, void*& pData) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
pData = GetUserData(pKey);
return !!pData;
}
-FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTETYPE eType,
- void* pValue,
- bool bNotify) {
+bool CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTETYPE eType,
+ void* pValue,
+ bool bNotify) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
OnChanging(eAttr, bNotify);
SetMapModuleValue(pKey, pValue);
- OnChanged(eAttr, bNotify, FALSE);
+ OnChanged(eAttr, bNotify, false);
if (IsNeedSavingXMLNode()) {
ASSERT(m_pXMLNode->GetType() == FDE_XMLNODE_Element);
const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttr);
@@ -4096,45 +4096,45 @@ FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
}
}
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::GetValue(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTETYPE eType,
- FX_BOOL bUseDefault,
- void*& pValue) {
+bool CXFA_Node::GetValue(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTETYPE eType,
+ bool bUseDefault,
+ void*& pValue) {
void* pKey = GetMapKey_Element(GetElementType(), eAttr);
if (GetMapModuleValue(pKey, pValue)) {
- return TRUE;
+ return true;
}
if (!bUseDefault) {
- return FALSE;
+ return false;
}
return XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr, eType,
m_ePacket);
}
-FX_BOOL CXFA_Node::SetUserData(void* pKey,
- void* pData,
- XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) {
+bool CXFA_Node::SetUserData(void* pKey,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) {
SetMapModuleBuffer(pKey, &pData, sizeof(void*),
pCallbackInfo ? pCallbackInfo : &gs_XFADefaultFreeData);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso) {
+bool CXFA_Node::TryUserData(void* pKey, void*& pData, bool bProtoAlso) {
int32_t iBytes = 0;
if (!GetMapModuleBuffer(pKey, pData, iBytes, bProtoAlso)) {
- return FALSE;
+ return false;
}
return iBytes == sizeof(void*) && FXSYS_memcpy(&pData, pData, iBytes);
}
-FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
- const CFX_WideString& wsXMLValue,
- bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
+bool CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify,
+ bool bScriptModify,
+ bool bSyncData) {
CXFA_Node* pNode = nullptr;
CXFA_Node* pBindNode = nullptr;
switch (GetObjectType()) {
@@ -4145,7 +4145,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
ASSERT(pChildValue);
pChildValue->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml");
pChildValue->SetScriptContent(wsContent, wsContent, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
CXFA_Node* pBind = GetBindData();
if (bSyncData && pBind) {
CFX_WideStringArray wsSaveTextArray;
@@ -4200,7 +4200,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
pValueNode; pValueNode = pValueNode->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
pValueNode->SetAttributeValue(wsSaveTextArray[i],
- wsSaveTextArray[i], FALSE);
+ wsSaveTextArray[i], false);
i++;
}
}
@@ -4209,7 +4209,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
if (nodeArray[i] != this) {
nodeArray[i]->SetScriptContent(wsContent, wsContent, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
}
}
}
@@ -4221,18 +4221,18 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
ASSERT(pChildValue);
pChildValue->SetScriptContent(wsContent, wsContent, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
}
pBindNode = GetBindData();
if (pBindNode && bSyncData) {
pBindNode->SetScriptContent(wsContent, wsXMLValue, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
CXFA_NodeArray nodeArray;
pBindNode->GetBindItems(nodeArray);
for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
if (nodeArray[i] != this) {
nodeArray[i]->SetScriptContent(wsContent, wsContent, bNotify, true,
- FALSE);
+ false);
}
}
}
@@ -4242,7 +4242,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
case XFA_ObjectType::ContentNode: {
CFX_WideString wsContentType;
if (GetElementType() == XFA_Element::ExData) {
- GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
+ GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == FX_WSTRC(L"text/html")) {
wsContentType = FX_WSTRC(L"");
SetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType.AsStringC());
@@ -4275,7 +4275,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
pBindNode = pParent->GetBindData();
if (pBindNode) {
pBindNode->SetScriptContent(wsContent, wsXMLValue, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
}
}
}
@@ -4295,24 +4295,24 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
pBindNode->GetBindItems(nodeArray);
for (int32_t i = 0; i < nodeArray.GetSize(); i++) {
nodeArray[i]->SetScriptContent(wsContent, wsContent, bNotify,
- bScriptModify, FALSE);
+ bScriptModify, false);
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_Node::SetContent(const CFX_WideString& wsContent,
- const CFX_WideString& wsXMLValue,
- bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
+bool CXFA_Node::SetContent(const CFX_WideString& wsContent,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify,
+ bool bScriptModify,
+ bool bSyncData) {
return SetScriptContent(wsContent, wsXMLValue, bNotify, bScriptModify,
bSyncData);
}
-CFX_WideString CXFA_Node::GetScriptContent(FX_BOOL bScriptModify) {
+CFX_WideString CXFA_Node::GetScriptContent(bool bScriptModify) {
CFX_WideString wsContent;
return TryContent(wsContent, bScriptModify) ? wsContent : CFX_WideString();
}
@@ -4321,9 +4321,9 @@ CFX_WideString CXFA_Node::GetContent() {
return GetScriptContent();
}
-FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent,
- FX_BOOL bScriptModify,
- FX_BOOL bProto) {
+bool CXFA_Node::TryContent(CFX_WideString& wsContent,
+ bool bScriptModify,
+ bool bProto) {
CXFA_Node* pNode = nullptr;
switch (GetObjectType()) {
case XFA_ObjectType::ContainerNode:
@@ -4332,7 +4332,7 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent,
} else {
CXFA_Node* pValue = GetChild(0, XFA_Element::Value);
if (!pValue) {
- return FALSE;
+ return false;
}
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildValue && XFA_FieldIsMultiListBox(this)) {
@@ -4341,7 +4341,7 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent,
}
return pChildValue
? pChildValue->TryContent(wsContent, bScriptModify, bProto)
- : FALSE;
+ : false;
}
break;
case XFA_ObjectType::ContentNode: {
@@ -4350,7 +4350,7 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent,
XFA_Element element = XFA_Element::Sharptext;
if (GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
- GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
+ GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
if (wsContentType == FX_WSTRC(L"text/html")) {
element = XFA_Element::SharpxHTML;
} else if (wsContentType == FX_WSTRC(L"text/xml")) {
@@ -4379,9 +4379,9 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent,
m_pDocument->GetScriptContext()->AddNodesOfRunScript(this);
}
}
- return TryCData(XFA_ATTRIBUTE_Value, wsContent, FALSE, bProto);
+ return TryCData(XFA_ATTRIBUTE_Value, wsContent, false, bProto);
}
- return FALSE;
+ return false;
}
CXFA_Node* CXFA_Node::GetModelNode() {
@@ -4409,22 +4409,22 @@ CXFA_Node* CXFA_Node::GetModelNode() {
}
}
-FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) {
+bool CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) {
wsNamespace.clear();
if (IsModelNode() || GetElementType() == XFA_Element::Packet) {
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (!pXMLNode || pXMLNode->GetType() != FDE_XMLNODE_Element) {
- return FALSE;
+ return false;
}
static_cast<CFDE_XMLElement*>(pXMLNode)->GetNamespaceURI(wsNamespace);
- return TRUE;
+ return true;
} else if (GetPacketID() == XFA_XDPPACKET_Datasets) {
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (!pXMLNode) {
- return FALSE;
+ return false;
}
if (pXMLNode->GetType() != FDE_XMLNODE_Element) {
- return TRUE;
+ return true;
}
if (GetElementType() == XFA_Element::DataValue &&
GetEnum(XFA_ATTRIBUTE_Contains) == XFA_ATTRIBUTEENUM_MetaData) {
@@ -4433,7 +4433,7 @@ FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) {
GetCData(XFA_ATTRIBUTE_QualifiedName), wsNamespace);
}
static_cast<CFDE_XMLElement*>(pXMLNode)->GetNamespaceURI(wsNamespace);
- return TRUE;
+ return true;
} else {
CXFA_Node* pModelNode = GetModelNode();
return pModelNode->TryNamespace(wsNamespace);
@@ -4442,7 +4442,7 @@ FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) {
CXFA_Node* CXFA_Node::GetProperty(int32_t index,
XFA_Element eProperty,
- FX_BOOL bCreateProperty) {
+ bool bCreateProperty) {
XFA_Element eType = GetElementType();
uint32_t dwPacket = GetPacketID();
const XFA_PROPERTY* pProperty =
@@ -4485,7 +4485,7 @@ CXFA_Node* CXFA_Node::GetProperty(int32_t index,
return pNewNode;
}
-int32_t CXFA_Node::CountChildren(XFA_Element eType, FX_BOOL bOnlyChild) {
+int32_t CXFA_Node::CountChildren(XFA_Element eType, bool bOnlyChild) {
CXFA_Node* pNode = m_pChild;
int32_t iCount = 0;
for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -4505,7 +4505,7 @@ int32_t CXFA_Node::CountChildren(XFA_Element eType, FX_BOOL bOnlyChild) {
CXFA_Node* CXFA_Node::GetChild(int32_t index,
XFA_Element eType,
- FX_BOOL bOnlyChild) {
+ bool bOnlyChild) {
ASSERT(index > -1);
CXFA_Node* pNode = m_pChild;
int32_t iCount = 0;
@@ -4530,7 +4530,7 @@ CXFA_Node* CXFA_Node::GetChild(int32_t index,
int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
ASSERT(!pNode->m_pNext);
pNode->m_pParent = this;
- FX_BOOL ret = m_pDocument->RemovePurgeNode(pNode);
+ bool ret = m_pDocument->RemovePurgeNode(pNode);
ASSERT(ret);
(void)ret; // Avoid unused variable warning.
@@ -4574,13 +4574,13 @@ int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
return index;
}
-FX_BOOL CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
+bool CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
if (!pNode || pNode->m_pParent ||
(pBeforeNode && pBeforeNode->m_pParent != this)) {
ASSERT(false);
- return FALSE;
+ return false;
}
- FX_BOOL ret = m_pDocument->RemovePurgeNode(pNode);
+ bool ret = m_pDocument->RemovePurgeNode(pNode);
ASSERT(ret);
(void)ret; // Avoid unused variable warning.
@@ -4618,7 +4618,7 @@ FX_BOOL CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
m_pXMLNode->InsertChildNode(pNode->m_pXMLNode, nIndex);
pNode->ClearFlag(XFA_NodeFlag_OwnXMLNode);
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_Node::Deprecated_GetPrevSibling() {
@@ -4634,10 +4634,10 @@ CXFA_Node* CXFA_Node::Deprecated_GetPrevSibling() {
return nullptr;
}
-FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
+bool CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
if (!pNode || pNode->m_pParent != this) {
- ASSERT(FALSE);
- return FALSE;
+ ASSERT(false);
+ return false;
}
if (m_pChild == pNode) {
m_pChild = pNode->m_pNext;
@@ -4671,7 +4671,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
pXMLElement->RemoveAttribute(wsAttributeName.c_str());
}
CFX_WideString wsName;
- pNode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE);
+ pNode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, false);
CFDE_XMLElement* pNewXMLElement = new CFDE_XMLElement(wsName);
CFX_WideStringC wsValue = GetCData(XFA_ATTRIBUTE_Value);
if (!wsValue.IsEmpty()) {
@@ -4684,7 +4684,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
}
pNode->SetFlag(XFA_NodeFlag_OwnXMLNode, false);
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_Node::GetFirstChildByName(const CFX_WideStringC& wsName) const {
@@ -4814,7 +4814,7 @@ void CXFA_Node::ClearFlag(uint32_t dwFlag) {
m_uNodeFlags &= ~dwFlag;
}
-FX_BOOL CXFA_Node::IsAttributeInXML() {
+bool CXFA_Node::IsAttributeInXML() {
return GetEnum(XFA_ATTRIBUTE_Contains) == XFA_ATTRIBUTEENUM_MetaData;
}
@@ -4838,7 +4838,7 @@ void CXFA_Node::OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify) {
void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr,
bool bNotify,
- FX_BOOL bScriptModify) {
+ bool bScriptModify) {
if (bNotify && IsInitialized()) {
Script_Attribute_SendAttributeChangeMessage(eAttr, bScriptModify);
}
@@ -4859,11 +4859,11 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName,
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType);
} else if (validFlags == 2) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
} else if (validFlags == 3) {
if (eType == XFA_Element::Subform) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
} else if (validFlags == 4) {
if (eType == XFA_Element::ExclGroup || eType == XFA_Element::Field) {
@@ -4871,15 +4871,15 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName,
if (pParentNode &&
pParentNode->GetElementType() == XFA_Element::ExclGroup) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
} else if (validFlags == 5) {
if (eType == XFA_Element::Field) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
} else if (validFlags == 6) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -4887,7 +4887,7 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName,
CXFA_Node* pUINode = pWidgetData->GetUIChild();
if (pUINode->m_elementType == XFA_Element::Signature) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
}
} else if (validFlags == 7) {
@@ -4897,7 +4897,7 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName,
if ((pUINode->m_elementType == XFA_Element::ChoiceList) &&
(!pWidgetData->IsListBox())) {
iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType,
- FALSE, FALSE);
+ false, false);
}
}
}
@@ -4927,7 +4927,7 @@ CFDE_XMLNode* CXFA_Node::CreateXMLMappingNode() {
return m_pXMLNode;
}
-FX_BOOL CXFA_Node::IsNeedSavingXMLNode() {
+bool CXFA_Node::IsNeedSavingXMLNode() {
return m_pXMLNode && (GetPacketID() == XFA_XDPPACKET_Datasets ||
GetElementType() == XFA_Element::Xfa);
}
@@ -4947,18 +4947,18 @@ void CXFA_Node::SetMapModuleValue(void* pKey, void* pValue) {
pModule->m_ValueMap.SetAt(pKey, pValue);
}
-FX_BOOL CXFA_Node::GetMapModuleValue(void* pKey, void*& pValue) {
+bool CXFA_Node::GetMapModuleValue(void* pKey, void*& pValue) {
CXFA_Node* pNode = this;
while (pNode) {
XFA_MAPMODULEDATA* pModule = pNode->GetMapModuleData();
if (pModule && pModule->m_ValueMap.Lookup(pKey, pValue)) {
- return TRUE;
+ return true;
}
pNode = pNode->GetPacketID() != XFA_XDPPACKET_Datasets
? pNode->GetTemplateNode()
: nullptr;
}
- return FALSE;
+ return false;
}
void CXFA_Node::SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue) {
@@ -4966,14 +4966,14 @@ void CXFA_Node::SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue) {
wsValue.GetLength() * sizeof(FX_WCHAR));
}
-FX_BOOL CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC& wsValue) {
+bool CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC& wsValue) {
void* pValue;
int32_t iBytes;
if (!GetMapModuleBuffer(pKey, pValue, iBytes)) {
- return FALSE;
+ return false;
}
wsValue = CFX_WideStringC((const FX_WCHAR*)pValue, iBytes / sizeof(FX_WCHAR));
- return TRUE;
+ return true;
}
void CXFA_Node::SetMapModuleBuffer(
@@ -5003,10 +5003,10 @@ void CXFA_Node::SetMapModuleBuffer(
FXSYS_memcpy(pBuffer->GetData(), pValue, iBytes);
}
-FX_BOOL CXFA_Node::GetMapModuleBuffer(void* pKey,
- void*& pValue,
- int32_t& iBytes,
- FX_BOOL bProtoAlso) const {
+bool CXFA_Node::GetMapModuleBuffer(void* pKey,
+ void*& pValue,
+ int32_t& iBytes,
+ bool bProtoAlso) const {
XFA_MAPDATABLOCK* pBuffer = nullptr;
const CXFA_Node* pNode = this;
while (pNode) {
@@ -5019,14 +5019,14 @@ FX_BOOL CXFA_Node::GetMapModuleBuffer(void* pKey,
: nullptr;
}
if (!pBuffer) {
- return FALSE;
+ return false;
}
pValue = pBuffer->GetData();
iBytes = pBuffer->iBytes;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_Node::HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso) {
+bool CXFA_Node::HasMapModuleKey(void* pKey, bool bProtoAlso) {
CXFA_Node* pNode = this;
while (pNode) {
void* pVal;
@@ -5034,13 +5034,13 @@ FX_BOOL CXFA_Node::HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso) {
if (pModule &&
(pModule->m_ValueMap.Lookup(pKey, pVal) ||
pModule->m_BufferMap.Lookup(pKey, (XFA_MAPDATABLOCK*&)pVal))) {
- return TRUE;
+ return true;
}
pNode = (bProtoAlso && pNode->GetPacketID() != XFA_XDPPACKET_Datasets)
? pNode->GetTemplateNode()
: nullptr;
}
- return FALSE;
+ return false;
}
void CXFA_Node::RemoveMapModuleKey(void* pKey) {
@@ -5077,7 +5077,7 @@ void CXFA_Node::RemoveMapModuleKey(void* pKey) {
}
}
-void CXFA_Node::MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr) {
+void CXFA_Node::MergeAllData(void* pDstModule, bool bUseSrcAttr) {
XFA_MAPMODULEDATA* pDstModuleData =
static_cast<CXFA_Node*>(pDstModule)->CreateMapModuleData();
XFA_MAPMODULEDATA* pSrcModuleData = GetMapModuleData();
@@ -5138,19 +5138,19 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) {
if (!pDstModule) {
return;
}
- FX_BOOL bNeedMove = TRUE;
+ bool bNeedMove = true;
if (!pKey) {
- bNeedMove = FALSE;
+ bNeedMove = false;
}
if (pDstModule->GetElementType() != GetElementType()) {
- bNeedMove = FALSE;
+ bNeedMove = false;
}
XFA_MAPMODULEDATA* pSrcModuleData = nullptr;
XFA_MAPMODULEDATA* pDstModuleData = nullptr;
if (bNeedMove) {
pSrcModuleData = GetMapModuleData();
if (!pSrcModuleData) {
- bNeedMove = FALSE;
+ bNeedMove = false;
}
pDstModuleData = pDstModule->CreateMapModuleData();
}
@@ -5164,20 +5164,20 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) {
}
}
if (pDstModule->IsNodeV()) {
- CFX_WideString wsValue = pDstModule->GetScriptContent(FALSE);
+ CFX_WideString wsValue = pDstModule->GetScriptContent(false);
CFX_WideString wsFormatValue(wsValue);
CXFA_WidgetData* pWidgetData = pDstModule->GetContainerWidgetData();
if (pWidgetData) {
pWidgetData->GetFormatDataValue(wsValue, wsFormatValue);
}
- pDstModule->SetScriptContent(wsValue, wsFormatValue, true, TRUE);
+ pDstModule->SetScriptContent(wsValue, wsFormatValue, true, true);
}
}
void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule,
CXFA_Node* pDstModule,
void* pKey,
- FX_BOOL bRecursive) {
+ bool bRecursive) {
if (!pSrcModule || !pDstModule || !pKey) {
return;
}
@@ -5187,7 +5187,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule,
for (; pSrcChild && pDstChild;
pSrcChild = pSrcChild->GetNodeItem(XFA_NODEITEM_NextSibling),
pDstChild = pDstChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
- MoveBufferMapData(pSrcChild, pDstChild, pKey, TRUE);
+ MoveBufferMapData(pSrcChild, pDstChild, pKey, true);
}
}
pSrcModule->MoveBufferMapData(pDstModule, pKey);
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index 27b8b038aa..18a9594da1 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -26,7 +26,7 @@ CXFA_NodeHelper::~CXFA_NodeHelper() {}
CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetOneChild(CXFA_Node* parent,
const FX_WCHAR* pwsName,
- FX_BOOL bIsClassName) {
+ bool bIsClassName) {
if (!parent) {
return nullptr;
}
@@ -42,7 +42,7 @@ CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetOneChild(CXFA_Node* parent,
int32_t CXFA_NodeHelper::CountSiblings(CXFA_Node* pNode,
XFA_LOGIC_TYPE eLogicType,
CXFA_NodeArray* pSiblings,
- FX_BOOL bIsClassName) {
+ bool bIsClassName) {
if (!pNode)
return 0;
CXFA_Node* parent = ResolveNodes_GetParent(pNode, XFA_LOGIC_NoTransparent);
@@ -68,7 +68,7 @@ int32_t CXFA_NodeHelper::CountSiblings(CXFA_Node* pNode,
int32_t CXFA_NodeHelper::NodeAcc_TraverseAnySiblings(CXFA_Node* parent,
uint32_t dNameHash,
CXFA_NodeArray* pSiblings,
- FX_BOOL bIsClassName) {
+ bool bIsClassName) {
if (!parent || !pSiblings) {
return 0;
}
@@ -129,8 +129,8 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseSiblings(CXFA_Node* parent,
uint32_t dNameHash,
CXFA_NodeArray* pSiblings,
XFA_LOGIC_TYPE eLogicType,
- FX_BOOL bIsClassName,
- FX_BOOL bIsFindProperty) {
+ bool bIsClassName,
+ bool bIsFindProperty) {
if (!parent || !pSiblings) {
return 0;
}
@@ -160,7 +160,7 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseSiblings(CXFA_Node* parent,
if (child->IsUnnamed() &&
child->GetElementType() == XFA_Element::PageSet) {
nCount += NodeAcc_TraverseSiblings(child, dNameHash, pSiblings,
- eLogicType, bIsClassName, FALSE);
+ eLogicType, bIsClassName, false);
}
}
if (nCount > 0) {
@@ -196,7 +196,7 @@ int32_t CXFA_NodeHelper::NodeAcc_TraverseSiblings(CXFA_Node* parent,
if (NodeIsTransparent(child) &&
child->GetElementType() != XFA_Element::PageSet) {
nCount += NodeAcc_TraverseSiblings(child, dNameHash, pSiblings,
- eLogicType, bIsClassName, FALSE);
+ eLogicType, bIsClassName, false);
}
}
return nCount;
@@ -212,7 +212,7 @@ CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetParent(CXFA_Node* pNode,
}
CXFA_Node* parent;
CXFA_Node* node = pNode;
- while (TRUE) {
+ while (true) {
parent = ResolveNodes_GetParent(node);
if (!parent) {
break;
@@ -229,8 +229,8 @@ CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetParent(CXFA_Node* pNode,
int32_t CXFA_NodeHelper::GetIndex(CXFA_Node* pNode,
XFA_LOGIC_TYPE eLogicType,
- FX_BOOL bIsProperty,
- FX_BOOL bIsClassIndex) {
+ bool bIsProperty,
+ bool bIsClassIndex) {
CXFA_Node* parent = ResolveNodes_GetParent(pNode, XFA_LOGIC_NoTransparent);
if (!parent) {
return 0;
@@ -259,16 +259,16 @@ int32_t CXFA_NodeHelper::GetIndex(CXFA_Node* pNode,
void CXFA_NodeHelper::GetNameExpression(CXFA_Node* refNode,
CFX_WideString& wsName,
- FX_BOOL bIsAllPath,
+ bool bIsAllPath,
XFA_LOGIC_TYPE eLogicType) {
wsName.clear();
if (bIsAllPath) {
- GetNameExpression(refNode, wsName, FALSE, eLogicType);
+ GetNameExpression(refNode, wsName, false, eLogicType);
CFX_WideString wsParent;
CXFA_Node* parent =
ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent);
while (parent) {
- GetNameExpression(parent, wsParent, FALSE, eLogicType);
+ GetNameExpression(parent, wsParent, false, eLogicType);
wsParent += L".";
wsParent += wsName;
wsName = wsParent;
@@ -278,40 +278,40 @@ void CXFA_NodeHelper::GetNameExpression(CXFA_Node* refNode,
}
CFX_WideString ws;
- FX_BOOL bIsProperty = NodeIsProperty(refNode);
+ bool bIsProperty = NodeIsProperty(refNode);
if (refNode->IsUnnamed() ||
(bIsProperty && refNode->GetElementType() != XFA_Element::PageSet)) {
ws = refNode->GetClassName();
wsName.Format(L"#%s[%d]", ws.c_str(),
- GetIndex(refNode, eLogicType, bIsProperty, TRUE));
+ GetIndex(refNode, eLogicType, bIsProperty, true));
return;
}
ws = refNode->GetCData(XFA_ATTRIBUTE_Name);
ws.Replace(L".", L"\\.");
wsName.Format(L"%s[%d]", ws.c_str(),
- GetIndex(refNode, eLogicType, bIsProperty, FALSE));
+ GetIndex(refNode, eLogicType, bIsProperty, false));
}
-FX_BOOL CXFA_NodeHelper::NodeIsTransparent(CXFA_Node* refNode) {
+bool CXFA_NodeHelper::NodeIsTransparent(CXFA_Node* refNode) {
if (!refNode) {
- return FALSE;
+ return false;
}
XFA_Element refNodeType = refNode->GetElementType();
if ((refNode->IsUnnamed() && refNode->IsContainerNode()) ||
refNodeType == XFA_Element::SubformSet ||
refNodeType == XFA_Element::Area || refNodeType == XFA_Element::Proto) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
+bool CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
int32_t iLen = wsCondition.GetLength();
CFX_WideString wsIndex(L"0");
- FX_BOOL bAll = FALSE;
+ bool bAll = false;
if (iLen == 0) {
m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
- return FALSE;
+ return false;
}
if (wsCondition.GetAt(0) == '[') {
int32_t i = 1;
@@ -323,7 +323,7 @@ FX_BOOL CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
if (ch == '+' || ch == '-') {
break;
} else if (ch == '*') {
- bAll = TRUE;
+ bAll = true;
break;
} else {
break;
@@ -338,28 +338,28 @@ FX_BOOL CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
}
int32_t iIndex = wsIndex.GetInteger();
m_iCreateCount = iIndex;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_NodeHelper::ResolveNodes_CreateNode(
+bool CXFA_NodeHelper::ResolveNodes_CreateNode(
CFX_WideString wsName,
CFX_WideString wsCondition,
- FX_BOOL bLastNode,
+ bool bLastNode,
CXFA_ScriptContext* pScriptContext) {
if (!m_pCreateParent) {
- return FALSE;
+ return false;
}
- FX_BOOL bIsClassName = FALSE;
- FX_BOOL bResult = FALSE;
+ bool bIsClassName = false;
+ bool bResult = false;
if (wsName.GetAt(0) == '!') {
wsName = wsName.Right(wsName.GetLength() - 1);
m_pCreateParent = ToNode(
pScriptContext->GetDocument()->GetXFAObject(XFA_HASHCODE_Datasets));
}
if (wsName.GetAt(0) == '#') {
- bIsClassName = TRUE;
+ bIsClassName = true;
wsName = wsName.Right(wsName.GetLength() - 1);
}
if (m_iCreateCount == 0) {
@@ -368,7 +368,7 @@ FX_BOOL CXFA_NodeHelper::ResolveNodes_CreateNode(
if (bIsClassName) {
XFA_Element eType = XFA_GetElementTypeForName(wsName.AsStringC());
if (eType == XFA_Element::Unknown)
- return FALSE;
+ return false;
for (int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex++) {
CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eType);
@@ -377,7 +377,7 @@ FX_BOOL CXFA_NodeHelper::ResolveNodes_CreateNode(
if (iIndex == m_iCreateCount - 1) {
m_pCreateParent = pNewNode;
}
- bResult = TRUE;
+ bResult = true;
}
}
} else {
@@ -394,7 +394,7 @@ FX_BOOL CXFA_NodeHelper::ResolveNodes_CreateNode(
if (iIndex == m_iCreateCount - 1) {
m_pCreateParent = pNewNode;
}
- bResult = TRUE;
+ bResult = true;
}
}
}
@@ -419,7 +419,7 @@ void CXFA_NodeHelper::SetCreateNodeType(CXFA_Node* refNode) {
}
}
-FX_BOOL CXFA_NodeHelper::NodeIsProperty(CXFA_Node* refNode) {
+bool CXFA_NodeHelper::NodeIsProperty(CXFA_Node* refNode) {
CXFA_Node* parent = ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent);
return parent && refNode &&
XFA_GetPropertyOfElement(parent->GetElementType(),
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.h b/xfa/fxfa/parser/cxfa_nodehelper.h
index a913d5de04..5097feabac 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.h
+++ b/xfa/fxfa/parser/cxfa_nodehelper.h
@@ -24,7 +24,7 @@ class CXFA_NodeHelper {
CXFA_Node* ResolveNodes_GetOneChild(CXFA_Node* parent,
const FX_WCHAR* pwsName,
- FX_BOOL bIsClassName = FALSE);
+ bool bIsClassName = false);
CXFA_Node* ResolveNodes_GetParent(
CXFA_Node* pNode,
XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
@@ -33,32 +33,32 @@ class CXFA_NodeHelper {
uint32_t dNameHash,
CXFA_NodeArray* pSiblings,
XFA_LOGIC_TYPE eLogicType,
- FX_BOOL bIsClassName = FALSE,
- FX_BOOL bIsFindProperty = TRUE);
+ bool bIsClassName = false,
+ bool bIsFindProperty = true);
int32_t NodeAcc_TraverseAnySiblings(CXFA_Node* parent,
uint32_t dNameHash,
CXFA_NodeArray* pSiblings,
- FX_BOOL bIsClassName = FALSE);
+ bool bIsClassName = false);
int32_t CountSiblings(CXFA_Node* pNode,
XFA_LOGIC_TYPE eLogicType,
CXFA_NodeArray* pSiblings,
- FX_BOOL bIsClassName = FALSE);
+ bool bIsClassName = false);
int32_t GetIndex(CXFA_Node* pNode,
XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent,
- FX_BOOL bIsProperty = FALSE,
- FX_BOOL bIsClassIndex = FALSE);
+ bool bIsProperty = false,
+ bool bIsClassIndex = false);
void GetNameExpression(CXFA_Node* refNode,
CFX_WideString& wsName,
- FX_BOOL bIsAllPath,
+ bool bIsAllPath,
XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
- FX_BOOL NodeIsTransparent(CXFA_Node* refNode);
- FX_BOOL ResolveNodes_CreateNode(CFX_WideString wsName,
- CFX_WideString wsCondition,
- FX_BOOL bLastNode,
- CXFA_ScriptContext* pScriptContext);
- FX_BOOL CreateNode_ForCondition(CFX_WideString& wsCondition);
+ bool NodeIsTransparent(CXFA_Node* refNode);
+ bool ResolveNodes_CreateNode(CFX_WideString wsName,
+ CFX_WideString wsCondition,
+ bool bLastNode,
+ CXFA_ScriptContext* pScriptContext);
+ bool CreateNode_ForCondition(CFX_WideString& wsCondition);
void SetCreateNodeType(CXFA_Node* refNode);
- FX_BOOL NodeIsProperty(CXFA_Node* refNode);
+ bool NodeIsProperty(CXFA_Node* refNode);
public:
XFA_Element m_eLastCreateType;
diff --git a/xfa/fxfa/parser/cxfa_nodelist.cpp b/xfa/fxfa/parser/cxfa_nodelist.cpp
index df6cd408e4..9eb04c994f 100644
--- a/xfa/fxfa/parser/cxfa_nodelist.cpp
+++ b/xfa/fxfa/parser/cxfa_nodelist.cpp
@@ -108,7 +108,7 @@ void CXFA_NodeList::Script_TreelistClass_NamedItem(
}
void CXFA_NodeList::Script_ListClass_Length(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
pValue->SetInteger(GetLength());
diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp
index 10e1b822e2..a31060241a 100644
--- a/xfa/fxfa/parser/cxfa_object.cpp
+++ b/xfa/fxfa/parser/cxfa_object.cpp
@@ -36,7 +36,7 @@ XFA_Element CXFA_Object::GetElementType() const {
}
void CXFA_Object::Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowException(XFA_IDS_INVAlID_PROP_SET);
diff --git a/xfa/fxfa/parser/cxfa_occur.cpp b/xfa/fxfa/parser/cxfa_occur.cpp
index 6d105abec6..a8994223f9 100644
--- a/xfa/fxfa/parser/cxfa_occur.cpp
+++ b/xfa/fxfa/parser/cxfa_occur.cpp
@@ -13,7 +13,7 @@ CXFA_Occur::CXFA_Occur(CXFA_Node* pNode) : CXFA_Data(pNode) {}
int32_t CXFA_Occur::GetMax() {
int32_t iMax = 1;
if (m_pNode) {
- if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, TRUE))
+ if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, true))
iMax = GetMin();
}
return iMax;
@@ -22,46 +22,46 @@ int32_t CXFA_Occur::GetMax() {
int32_t CXFA_Occur::GetMin() {
int32_t iMin = 1;
if (m_pNode) {
- if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, TRUE) || iMin < 0)
+ if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, true) || iMin < 0)
iMin = 1;
}
return iMin;
}
-FX_BOOL CXFA_Occur::GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit) {
+bool CXFA_Occur::GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit) {
if (!m_pNode)
- return FALSE;
- if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE) || iMin < 0)
+ return false;
+ if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, false) || iMin < 0)
iMin = 1;
- if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE)) {
+ if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, false)) {
if (iMin == 0)
iMax = 1;
else
iMax = iMin;
}
- if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Initial, iInit, FALSE) ||
+ if (!m_pNode->TryInteger(XFA_ATTRIBUTE_Initial, iInit, false) ||
iInit < iMin) {
iInit = iMin;
}
- return TRUE;
+ return true;
}
void CXFA_Occur::SetMax(int32_t iMax) {
iMax = (iMax != -1 && iMax < 1) ? 1 : iMax;
- m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
+ m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, false);
int32_t iMin = GetMin();
if (iMax != -1 && iMax < iMin) {
iMin = iMax;
- m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, FALSE);
+ m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, false);
}
}
void CXFA_Occur::SetMin(int32_t iMin) {
iMin = (iMin < 0) ? 1 : iMin;
- m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, FALSE);
+ m_pNode->SetInteger(XFA_ATTRIBUTE_Min, iMin, false);
int32_t iMax = GetMax();
if (iMax > 0 && iMax < iMin) {
iMax = iMin;
- m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, FALSE);
+ m_pNode->SetInteger(XFA_ATTRIBUTE_Max, iMax, false);
}
}
diff --git a/xfa/fxfa/parser/cxfa_occur.h b/xfa/fxfa/parser/cxfa_occur.h
index 58b44b9135..69db071a11 100644
--- a/xfa/fxfa/parser/cxfa_occur.h
+++ b/xfa/fxfa/parser/cxfa_occur.h
@@ -18,7 +18,7 @@ class CXFA_Occur : public CXFA_Data {
int32_t GetMax();
int32_t GetMin();
- FX_BOOL GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit);
+ bool GetOccurInfo(int32_t& iMin, int32_t& iMax, int32_t& iInit);
void SetMax(int32_t iMax);
void SetMin(int32_t iMin);
};
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index 823e884821..271e14be6c 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -81,9 +81,9 @@ int32_t CXFA_ResolveProcessor::ResolveAnyChild(CXFA_ResolveNodesData& rnd) {
CFX_WideString wsCondition = rnd.m_wsCondition;
CXFA_Node* findNode = nullptr;
CXFA_NodeArray siblings;
- FX_BOOL bClassName = FALSE;
+ bool bClassName = false;
if (wsName.GetAt(0) == '#') {
- bClassName = TRUE;
+ bClassName = true;
wsName = wsName.Right(wsName.GetLength() - 1);
}
findNode = m_pNodeHelper->ResolveNodes_GetOneChild(
@@ -266,7 +266,7 @@ int32_t CXFA_ResolveProcessor::ResolveNormal(CXFA_ResolveNodesData& rnd) {
}
}
if (dwStyles & XFA_RESOLVENODE_Children) {
- FX_BOOL bSetFlag = FALSE;
+ bool bSetFlag = false;
if (pPageSetNode && (dwStyles & XFA_RESOLVENODE_Properties)) {
children.Add(pPageSetNode);
}
@@ -283,7 +283,7 @@ int32_t CXFA_ResolveProcessor::ResolveNormal(CXFA_ResolveNodesData& rnd) {
child->GetElementType() != XFA_Element::PageSet) {
if (!bSetFlag) {
SetStylesForChild(dwStyles, rndFind);
- bSetFlag = TRUE;
+ bSetFlag = true;
}
rndFind.m_CurNode = child;
CFX_WideString wsSaveCondition = rndFind.m_wsCondition;
@@ -350,7 +350,7 @@ int32_t CXFA_ResolveProcessor::ResolveNormal(CXFA_ResolveNodesData& rnd) {
CXFA_Node* pInstanceManager =
curNode->AsNode()->GetInstanceMgrOfSubform();
if (pInstanceManager) {
- pProp = pInstanceManager->GetProperty(0, XFA_Element::Occur, TRUE);
+ pProp = pInstanceManager->GetProperty(0, XFA_Element::Occur, true);
}
} else {
XFA_Element eType = XFA_GetElementTypeForName(wsName.AsStringC());
@@ -417,15 +417,15 @@ int32_t CXFA_ResolveProcessor::ResolveNormal(CXFA_ResolveNodesData& rnd) {
const XFA_PROPERTY* pPropert = XFA_GetPropertyOfElement(
parentNode->GetElementType(), child->GetElementType(),
XFA_XDPPACKET_UNKNOWN);
- FX_BOOL bInnerSearch = FALSE;
+ bool bInnerSearch = false;
if (pPropert) {
if ((child->GetElementType() == XFA_Element::Variables ||
child->GetElementType() == XFA_Element::PageSet)) {
- bInnerSearch = TRUE;
+ bInnerSearch = true;
}
} else {
if (m_pNodeHelper->NodeIsTransparent(child)) {
- bInnerSearch = TRUE;
+ bInnerSearch = true;
}
}
if (bInnerSearch) {
@@ -524,7 +524,7 @@ int32_t CXFA_ResolveProcessor::GetFilter(const CFX_WideStringC& wsExpression,
int32_t nType = -1;
const FX_WCHAR* pSrc = wsExpression.c_str();
FX_WCHAR wPrev = 0, wCur;
- FX_BOOL bIsCondition = FALSE;
+ bool bIsCondition = false;
while (nStart < iLength) {
wCur = pSrc[nStart++];
if (wCur == '.') {
@@ -544,34 +544,34 @@ int32_t CXFA_ResolveProcessor::GetFilter(const CFX_WideStringC& wsExpression,
}
}
if (wCur == '[' || wCur == '(') {
- bIsCondition = TRUE;
+ bIsCondition = true;
} else if (wCur == '.' && nStart < iLength &&
(pSrc[nStart] == '[' || pSrc[nStart] == '(')) {
- bIsCondition = TRUE;
+ bIsCondition = true;
}
if (bIsCondition) {
pConditionBuf[nConditionCount++] = wCur;
} else {
pNameBuf[nNameCount++] = wCur;
}
- FX_BOOL bRecursive = TRUE;
+ bool bRecursive = true;
switch (nType) {
case 0:
if (wCur == ']') {
nType = ResolvePopStack(stack);
- bRecursive = FALSE;
+ bRecursive = false;
}
break;
case 1:
if (wCur == ')') {
nType = ResolvePopStack(stack);
- bRecursive = FALSE;
+ bRecursive = false;
}
break;
case 2:
if (wCur == '"') {
nType = ResolvePopStack(stack);
- bRecursive = FALSE;
+ bRecursive = false;
}
break;
}
@@ -612,8 +612,8 @@ void CXFA_ResolveProcessor::ConditionArray(int32_t iCurIndex,
CXFA_ResolveNodesData& rnd) {
CXFA_NodeArray& findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
int32_t iLen = wsCondition.GetLength();
- FX_BOOL bRelative = FALSE;
- FX_BOOL bAll = FALSE;
+ bool bRelative = false;
+ bool bAll = false;
int32_t i = 1;
for (; i < iLen; ++i) {
FX_WCHAR ch = wsCondition[i];
@@ -621,10 +621,10 @@ void CXFA_ResolveProcessor::ConditionArray(int32_t iCurIndex,
continue;
}
if (ch == '+' || ch == '-') {
- bRelative = TRUE;
+ bRelative = true;
break;
} else if (ch == '*') {
- bAll = TRUE;
+ bAll = true;
break;
} else {
break;
@@ -694,7 +694,7 @@ void CXFA_ResolveProcessor::DoPredicateFilter(int32_t iCurIndex,
wsExpression = wsCondition.Mid(2, wsCondition.GetLength() - 3);
for (int32_t i = iFoundCount - 1; i >= 0; i--) {
CXFA_Object* node = findNodes[i];
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
std::unique_ptr<CFXJSE_Value> pRetValue(
new CFXJSE_Value(rnd.m_pSC->GetRuntime()));
bRet = pContext->RunScript(eLangType, wsExpression.AsStringC(),
@@ -712,14 +712,14 @@ void CXFA_ResolveProcessor::FilterCondition(CXFA_ResolveNodesData& rnd,
int32_t iSize = array.GetSize();
if (iSize) {
CXFA_Node* curNode = array[iSize - 1];
- FX_BOOL bIsProperty = m_pNodeHelper->NodeIsProperty(curNode);
+ bool bIsProperty = m_pNodeHelper->NodeIsProperty(curNode);
if (curNode->IsUnnamed() ||
(bIsProperty && curNode->GetElementType() != XFA_Element::PageSet)) {
iCurrIndex = m_pNodeHelper->GetIndex(curNode, XFA_LOGIC_Transparent,
- bIsProperty, TRUE);
+ bIsProperty, true);
} else {
iCurrIndex = m_pNodeHelper->GetIndex(curNode, XFA_LOGIC_Transparent,
- bIsProperty, FALSE);
+ bIsProperty, false);
}
}
int32_t iFoundCount = findNodes.GetSize();
diff --git a/xfa/fxfa/parser/cxfa_script.cpp b/xfa/fxfa/parser/cxfa_script.cpp
index b99d8a3945..42911e0f12 100644
--- a/xfa/fxfa/parser/cxfa_script.cpp
+++ b/xfa/fxfa/parser/cxfa_script.cpp
@@ -12,7 +12,7 @@ CXFA_Script::CXFA_Script(CXFA_Node* pNode) : CXFA_Data(pNode) {}
XFA_SCRIPTTYPE CXFA_Script::GetContentType() {
CFX_WideStringC cData;
- if (m_pNode->TryCData(XFA_ATTRIBUTE_ContentType, cData, FALSE)) {
+ if (m_pNode->TryCData(XFA_ATTRIBUTE_ContentType, cData, false)) {
if (cData == FX_WSTRC(L"application/x-javascript"))
return XFA_SCRIPTTYPE_Javascript;
if (cData == FX_WSTRC(L"application/x-formcalc"))
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index af2f99a55c..80395149a3 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -142,10 +142,10 @@ void CXFA_ScriptContext::Initialize(v8::Isolate* pIsolate) {
DefineJsClass();
m_ResolveProcessor.reset(new CXFA_ResolveProcessor);
}
-FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
- const CFX_WideStringC& wsScript,
- CFXJSE_Value* hRetValue,
- CXFA_Object* pThisObject) {
+bool CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ CFXJSE_Value* hRetValue,
+ CXFA_Object* pThisObject) {
CFX_ByteString btScript;
XFA_SCRIPTLANGTYPE eSaveType = m_eScriptType;
m_eScriptType = eScriptType;
@@ -160,7 +160,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
CXFA_FM2JSContext::Translate(wsScript, wsJavaScript, wsErrorInfo);
if (iFlags) {
hRetValue->SetUndefined();
- return FALSE;
+ return false;
}
btScript =
FX_UTF8Encode(wsJavaScript.GetBuffer(), wsJavaScript.GetLength());
@@ -170,8 +170,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
CXFA_Object* pOriginalObject = m_pThisObject;
m_pThisObject = pThisObject;
CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : nullptr;
- FX_BOOL bRet =
- m_JsContext->ExecuteScript(btScript.c_str(), hRetValue, pValue);
+ bool bRet = m_JsContext->ExecuteScript(btScript.c_str(), hRetValue, pValue);
m_pThisObject = pOriginalObject;
m_eScriptType = eSaveType;
return bRet;
@@ -191,7 +190,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject,
if (lpOrginalNode->IsVariablesThis())
pRefNode = ToNode(lpCurNode);
if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
- dwFlag, TRUE)) {
+ dwFlag, true)) {
return;
}
if (lpOrginalNode->IsVariablesThis()) {
@@ -207,11 +206,11 @@ void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject,
pNotify->GetDocEnvironment()->SetGlobalProperty(pNotify->GetHDOC(),
szPropName, pValue);
}
-FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode,
- const CFX_WideStringC& propname,
- CFXJSE_Value* pValue,
- uint32_t dwFlag,
- FX_BOOL bSetting) {
+bool CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode,
+ const CFX_WideStringC& propname,
+ CFXJSE_Value* pValue,
+ uint32_t dwFlag,
+ bool bSetting) {
if (!refNode)
return false;
XFA_RESOLVENODE_RS resolveRs;
@@ -261,19 +260,19 @@ void CXFA_ScriptContext::GlobalPropertyGetter(CFXJSE_Value* pObject,
pRefNode = ToNode(lpCurNode);
}
if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
- dwFlag, FALSE)) {
+ dwFlag, false)) {
return;
}
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
- dwFlag, FALSE)) {
+ dwFlag, false)) {
return;
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, true);
if (pScriptObject &&
lpScriptContext->QueryVariableValue(pScriptObject->AsNode(), szPropName,
- pValue, TRUE)) {
+ pValue, true)) {
return;
}
CXFA_FFNotify* pNotify = pDoc->GetNotify();
@@ -303,8 +302,8 @@ void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
}
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
- FX_BOOL bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, FALSE);
+ bool bRet = lpScriptContext->QueryNodeByFlag(
+ ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, false);
if (bRet) {
return;
}
@@ -313,16 +312,16 @@ void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
!lpScriptContext->IsStrictScopeInJavaScript())) {
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, FALSE);
+ ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, false);
}
if (bRet) {
return;
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, true);
if (pScriptObject) {
bRet = lpScriptContext->QueryVariableValue(ToNode(pScriptObject),
- szPropName, pReturnValue, TRUE);
+ szPropName, pReturnValue, true);
}
if (!bRet) {
pReturnValue->SetUndefined();
@@ -343,7 +342,7 @@ void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
pObject->GetElementType(), wsPropName.AsStringC());
if (lpAttributeInfo) {
(pObject->*(lpAttributeInfo->lpfnCallback))(
- pReturnValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ pReturnValue, true, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
} else {
if (pObject->IsNode()) {
if (wsPropName.GetAt(0) == '#') {
@@ -364,23 +363,23 @@ void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
wsDefaultName.AsStringC());
if (lpAttrInfo) {
(pPropOrChild->*(lpAttrInfo->lpfnCallback))(
- pReturnValue, TRUE, (XFA_ATTRIBUTE)lpAttrInfo->eAttribute);
+ pReturnValue, true, (XFA_ATTRIBUTE)lpAttrInfo->eAttribute);
return;
}
}
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, true);
if (pScriptObject) {
lpScriptContext->QueryVariableValue(ToNode(pScriptObject), szPropName,
- pReturnValue, FALSE);
+ pReturnValue, false);
}
}
}
int32_t CXFA_ScriptContext::NormalPropTypeGetter(
CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
- FX_BOOL bQueryIn) {
+ bool bQueryIn) {
CXFA_Object* pObject = ToObject(pOriginalValue, nullptr);
if (!pObject)
return FXJSE_ClassPropType_None;
@@ -402,7 +401,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
- FX_BOOL bQueryIn) {
+ bool bQueryIn) {
CXFA_Object* pObject = ToObject(pOriginalValue, nullptr);
if (!pObject)
return FXJSE_ClassPropType_None;
@@ -435,7 +434,7 @@ void CXFA_ScriptContext::NormalMethodCall(CFXJSE_Value* pThis,
(pObject->*(lpMethodInfo->lpfnCallback))(&args);
}
-FX_BOOL CXFA_ScriptContext::IsStrictScopeInJavaScript() {
+bool CXFA_ScriptContext::IsStrictScopeInJavaScript() {
return m_pDocument->HasFlag(XFA_DOCFLAG_StrictScoping);
}
XFA_SCRIPTLANGTYPE CXFA_ScriptContext::GetType() {
@@ -462,7 +461,7 @@ CFXJSE_Context* CXFA_ScriptContext::CreateVariablesContext(
return pVariablesContext;
}
CXFA_Object* CXFA_ScriptContext::GetVariablesThis(CXFA_Object* pObject,
- FX_BOOL bScriptNode) {
+ bool bScriptNode) {
if (!pObject->IsVariablesThis())
return pObject;
@@ -470,27 +469,27 @@ CXFA_Object* CXFA_ScriptContext::GetVariablesThis(CXFA_Object* pObject,
return bScriptNode ? pProxy->GetScriptNode() : pProxy->GetThisNode();
}
-FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
+bool CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
if (!pScriptNode)
- return FALSE;
+ return false;
if (pScriptNode->GetElementType() != XFA_Element::Script)
- return TRUE;
+ return true;
CXFA_Node* pParent = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
if (!pParent || pParent->GetElementType() != XFA_Element::Variables)
- return FALSE;
+ return false;
if (m_mapVariableToContext.GetValueAt(pScriptNode))
- return TRUE;
+ return true;
CXFA_Node* pTextNode = pScriptNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (!pTextNode)
- return FALSE;
+ return false;
CFX_WideStringC wsScript;
if (!pTextNode->TryCData(XFA_ATTRIBUTE_Value, wsScript))
- return FALSE;
+ return false;
CFX_ByteString btScript =
FX_UTF8Encode(wsScript.c_str(), wsScript.GetLength());
@@ -500,37 +499,36 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
CreateVariablesContext(pScriptNode, pThisObject);
CXFA_Object* pOriginalObject = m_pThisObject;
m_pThisObject = pThisObject;
- FX_BOOL bRet =
+ bool bRet =
pVariablesContext->ExecuteScript(btScript.c_str(), hRetValue.get());
m_pThisObject = pOriginalObject;
return bRet;
}
-FX_BOOL CXFA_ScriptContext::QueryVariableValue(
- CXFA_Node* pScriptNode,
- const CFX_ByteStringC& szPropName,
- CFXJSE_Value* pValue,
- FX_BOOL bGetter) {
+bool CXFA_ScriptContext::QueryVariableValue(CXFA_Node* pScriptNode,
+ const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue,
+ bool bGetter) {
if (!pScriptNode || pScriptNode->GetElementType() != XFA_Element::Script)
- return FALSE;
+ return false;
CXFA_Node* variablesNode = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
if (!variablesNode ||
variablesNode->GetElementType() != XFA_Element::Variables)
- return FALSE;
+ return false;
void* lpVariables = m_mapVariableToContext.GetValueAt(pScriptNode);
if (!lpVariables)
- return FALSE;
+ return false;
- FX_BOOL bRes = FALSE;
+ bool bRes = false;
CFXJSE_Context* pVariableContext = static_cast<CFXJSE_Context*>(lpVariables);
std::unique_ptr<CFXJSE_Value> pObject = pVariableContext->GetGlobalObject();
std::unique_ptr<CFXJSE_Value> hVariableValue(new CFXJSE_Value(m_pIsolate));
if (!bGetter) {
pObject->SetObjectOwnProperty(szPropName, pValue);
- bRes = TRUE;
- } else if (pObject->HasObjectOwnProperty(szPropName, FALSE)) {
+ bRes = true;
+ } else if (pObject->HasObjectOwnProperty(szPropName, false)) {
pObject->GetObjectProperty(szPropName, hVariableValue.get());
if (hVariableValue->IsFunction())
pValue->SetFunctionBind(hVariableValue.get(), pObject.get());
@@ -538,7 +536,7 @@ FX_BOOL CXFA_ScriptContext::QueryVariableValue(
pValue->Assign(hVariableValue.get());
else
hVariableValue.get()->Assign(pValue);
- bRes = TRUE;
+ bRes = true;
}
return bRes;
}
@@ -575,7 +573,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
(dwStyles & (XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings))) {
m_upObjectArray.Add(refNode->AsNode());
}
- FX_BOOL bNextCreate = FALSE;
+ bool bNextCreate = false;
if (dwStyles & XFA_RESOLVENODE_CreateNode) {
m_ResolveProcessor->GetNodeHelper()->SetCreateNodeType(bindNode);
}
@@ -589,7 +587,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
CXFA_ObjArray findNodes;
findNodes.Add(refNode ? refNode : m_pDocument->GetRoot());
int32_t nNodes = 0;
- while (TRUE) {
+ while (true) {
nNodes = findNodes.GetSize();
int32_t i = 0;
rndFind.m_dwStyles = dwStyles;
@@ -621,7 +619,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
}
}
if (bNextCreate) {
- FX_BOOL bCreate =
+ bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
nStart == wsExpression.GetLength(), this);
@@ -633,14 +631,14 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
}
CXFA_ObjArray retNodes;
while (i < nNodes) {
- FX_BOOL bDataBind = FALSE;
+ bool bDataBind = false;
if (((dwStyles & XFA_RESOLVENODE_Bind) ||
(dwStyles & XFA_RESOLVENODE_CreateNode)) &&
nNodes > 1) {
CXFA_ResolveNodesData rndBind;
m_ResolveProcessor->GetFilter(wsExpression, nStart, rndBind);
m_ResolveProcessor->SetIndexDataBind(rndBind.m_wsCondition, i, nNodes);
- bDataBind = TRUE;
+ bDataBind = true;
}
rndFind.m_CurNode = findNodes[i++];
rndFind.m_nLevel = nLevel;
@@ -653,7 +651,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) {
std::unique_ptr<CFXJSE_Value> pValue(new CFXJSE_Value(m_pIsolate));
(rndFind.m_Nodes[0]->*(rndFind.m_pScriptAttribute->lpfnCallback))(
- pValue.get(), FALSE,
+ pValue.get(), false,
(XFA_ATTRIBUTE)rndFind.m_pScriptAttribute->eAttribute);
rndFind.m_Nodes.SetAt(0, ToObject(pValue.get(), nullptr));
}
@@ -671,13 +669,13 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
nNodes = retNodes.GetSize();
if (nNodes < 1) {
if (dwStyles & XFA_RESOLVENODE_CreateNode) {
- bNextCreate = TRUE;
+ bNextCreate = true;
if (!m_ResolveProcessor->GetNodeHelper()->m_pCreateParent) {
m_ResolveProcessor->GetNodeHelper()->m_pCreateParent =
ToNode(rndFind.m_CurNode);
m_ResolveProcessor->GetNodeHelper()->m_iCreateCount = 1;
}
- FX_BOOL bCreate =
+ bool bCreate =
m_ResolveProcessor->GetNodeHelper()->ResolveNodes_CreateNode(
rndFind.m_wsName, rndFind.m_wsCondition,
nStart == wsExpression.GetLength(), this);
@@ -742,17 +740,17 @@ CFXJSE_Value* CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject) {
int32_t CXFA_ScriptContext::GetIndexByName(CXFA_Node* refNode) {
CXFA_NodeHelper* lpNodeHelper = m_ResolveProcessor->GetNodeHelper();
return lpNodeHelper->GetIndex(refNode, XFA_LOGIC_Transparent,
- lpNodeHelper->NodeIsProperty(refNode), FALSE);
+ lpNodeHelper->NodeIsProperty(refNode), false);
}
int32_t CXFA_ScriptContext::GetIndexByClassName(CXFA_Node* refNode) {
CXFA_NodeHelper* lpNodeHelper = m_ResolveProcessor->GetNodeHelper();
return lpNodeHelper->GetIndex(refNode, XFA_LOGIC_Transparent,
- lpNodeHelper->NodeIsProperty(refNode), TRUE);
+ lpNodeHelper->NodeIsProperty(refNode), true);
}
void CXFA_ScriptContext::GetSomExpression(CXFA_Node* refNode,
CFX_WideString& wsExpression) {
CXFA_NodeHelper* lpNodeHelper = m_ResolveProcessor->GetNodeHelper();
- lpNodeHelper->GetNameExpression(refNode, wsExpression, TRUE,
+ lpNodeHelper->GetNameExpression(refNode, wsExpression, true,
XFA_LOGIC_Transparent);
}
void CXFA_ScriptContext::SetNodesOfRunScript(CXFA_NodeArray* pArray) {
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.h b/xfa/fxfa/parser/cxfa_scriptcontext.h
index 656c51a8c8..664e3315bf 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.h
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.h
@@ -29,10 +29,10 @@ class CXFA_ScriptContext {
void Initialize(v8::Isolate* pIsolate);
void SetEventParam(CXFA_EventParam param) { m_eventParam = param; }
CXFA_EventParam* GetEventParam() { return &m_eventParam; }
- FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType,
- const CFX_WideStringC& wsScript,
- CFXJSE_Value* pRetValue,
- CXFA_Object* pThisObject = nullptr);
+ bool RunScript(XFA_SCRIPTLANGTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ CFXJSE_Value* pRetValue,
+ CXFA_Object* pThisObject = nullptr);
int32_t ResolveObjects(CXFA_Object* refNode,
const CFX_WideStringC& wsExpression,
@@ -54,18 +54,18 @@ class CXFA_ScriptContext {
CFXJSE_Class* GetJseNormalClass();
void SetRunAtType(XFA_ATTRIBUTEENUM eRunAt) { m_eRunAtType = eRunAt; }
- FX_BOOL IsRunAtClient() { return m_eRunAtType != XFA_ATTRIBUTEENUM_Server; }
- FX_BOOL QueryNodeByFlag(CXFA_Node* refNode,
- const CFX_WideStringC& propname,
+ bool IsRunAtClient() { return m_eRunAtType != XFA_ATTRIBUTEENUM_Server; }
+ bool QueryNodeByFlag(CXFA_Node* refNode,
+ const CFX_WideStringC& propname,
+ CFXJSE_Value* pValue,
+ uint32_t dwFlag,
+ bool bSetting);
+ bool QueryVariableValue(CXFA_Node* pScriptNode,
+ const CFX_ByteStringC& szPropName,
CFXJSE_Value* pValue,
- uint32_t dwFlag,
- FX_BOOL bSetting);
- FX_BOOL QueryVariableValue(CXFA_Node* pScriptNode,
- const CFX_ByteStringC& szPropName,
- CFXJSE_Value* pValue,
- FX_BOOL bGetter);
- FX_BOOL QueryBuiltinValue(const CFX_ByteStringC& szPropName,
- CFXJSE_Value* pValue);
+ bool bGetter);
+ bool QueryBuiltinValue(const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue);
static void GlobalPropertyGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
CFXJSE_Value* pValue);
@@ -83,14 +83,13 @@ class CXFA_ScriptContext {
CFXJSE_Arguments& args);
static int32_t NormalPropTypeGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FX_BOOL bQueryIn);
+ bool bQueryIn);
static int32_t GlobalPropTypeGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FX_BOOL bQueryIn);
- FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode);
- CXFA_Object* GetVariablesThis(CXFA_Object* pObject,
- FX_BOOL bScriptNode = FALSE);
- FX_BOOL IsStrictScopeInJavaScript();
+ bool bQueryIn);
+ bool RunVariablesScript(CXFA_Node* pScriptNode);
+ CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode = false);
+ bool IsStrictScopeInJavaScript();
XFA_SCRIPTLANGTYPE GetType();
CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; }
CXFA_Document* GetDocument() const { return m_pDocument; }
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 997094351e..4599b1c4fc 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -19,7 +19,7 @@
namespace {
CFDE_XMLNode* GetDocumentNode(CFDE_XMLDoc* pXMLDoc,
- FX_BOOL bVerifyWellFormness = FALSE) {
+ bool bVerifyWellFormness = false) {
if (!pXMLDoc)
return nullptr;
@@ -54,22 +54,22 @@ void GetElementTagNamespaceURI(CFDE_XMLElement* pElement,
}
}
-FX_BOOL MatchNodeName(CFDE_XMLNode* pNode,
- const CFX_WideStringC& wsLocalTagName,
- const CFX_WideStringC& wsNamespaceURIPrefix,
- uint32_t eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) {
+bool MatchNodeName(CFDE_XMLNode* pNode,
+ const CFX_WideStringC& wsLocalTagName,
+ const CFX_WideStringC& wsNamespaceURIPrefix,
+ uint32_t eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) {
if (!pNode || pNode->GetType() != FDE_XMLNODE_Element)
- return FALSE;
+ return false;
CFDE_XMLElement* pElement = reinterpret_cast<CFDE_XMLElement*>(pNode);
CFX_WideString wsNodeStr;
pElement->GetLocalTagName(wsNodeStr);
if (wsNodeStr != wsLocalTagName)
- return FALSE;
+ return false;
GetElementTagNamespaceURI(pElement, wsNodeStr);
if (eMatchFlags & XFA_XDPPACKET_FLAGS_NOMATCH)
- return TRUE;
+ return true;
if (eMatchFlags & XFA_XDPPACKET_FLAGS_PREFIXMATCH) {
return wsNodeStr.Left(wsNamespaceURIPrefix.GetLength()) ==
wsNamespaceURIPrefix;
@@ -77,22 +77,22 @@ FX_BOOL MatchNodeName(CFDE_XMLNode* pNode,
return wsNodeStr == wsNamespaceURIPrefix;
}
-FX_BOOL GetAttributeLocalName(const CFX_WideStringC& wsAttributeName,
- CFX_WideString& wsLocalAttrName) {
+bool GetAttributeLocalName(const CFX_WideStringC& wsAttributeName,
+ CFX_WideString& wsLocalAttrName) {
CFX_WideString wsAttrName(wsAttributeName);
FX_STRSIZE iFind = wsAttrName.Find(L':', 0);
if (iFind < 0) {
wsLocalAttrName = wsAttrName;
- return FALSE;
+ return false;
}
wsLocalAttrName = wsAttrName.Right(wsAttrName.GetLength() - iFind - 1);
- return TRUE;
+ return true;
}
-FX_BOOL ResolveAttribute(CFDE_XMLElement* pElement,
- const CFX_WideStringC& wsAttributeName,
- CFX_WideString& wsLocalAttrName,
- CFX_WideString& wsNamespaceURI) {
+bool ResolveAttribute(CFDE_XMLElement* pElement,
+ const CFX_WideStringC& wsAttributeName,
+ CFX_WideString& wsLocalAttrName,
+ CFX_WideString& wsNamespaceURI) {
CFX_WideString wsAttrName(wsAttributeName);
CFX_WideString wsNSPrefix;
if (GetAttributeLocalName(wsAttributeName, wsLocalAttrName)) {
@@ -101,23 +101,23 @@ FX_BOOL ResolveAttribute(CFDE_XMLElement* pElement,
}
if (wsLocalAttrName == FX_WSTRC(L"xmlns") ||
wsNSPrefix == FX_WSTRC(L"xmlns") || wsNSPrefix == FX_WSTRC(L"xml")) {
- return FALSE;
+ return false;
}
if (!XFA_FDEExtension_ResolveNamespaceQualifier(
pElement, wsNSPrefix.AsStringC(), wsNamespaceURI)) {
wsNamespaceURI.clear();
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL FindAttributeWithNS(CFDE_XMLElement* pElement,
- const CFX_WideStringC& wsLocalAttributeName,
- const CFX_WideStringC& wsNamespaceURIPrefix,
- CFX_WideString& wsValue,
- FX_BOOL bMatchNSAsPrefix = FALSE) {
+bool FindAttributeWithNS(CFDE_XMLElement* pElement,
+ const CFX_WideStringC& wsLocalAttributeName,
+ const CFX_WideStringC& wsNamespaceURIPrefix,
+ CFX_WideString& wsValue,
+ bool bMatchNSAsPrefix = false) {
if (!pElement)
- return FALSE;
+ return false;
CFX_WideString wsAttrName;
CFX_WideString wsAttrValue;
@@ -151,9 +151,9 @@ FX_BOOL FindAttributeWithNS(CFDE_XMLElement* pElement,
continue;
}
wsValue = wsAttrValue;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CFDE_XMLNode* GetDataSetsFromXDP(CFDE_XMLNode* pXMLDocumentNode) {
@@ -184,7 +184,7 @@ CFDE_XMLNode* GetDataSetsFromXDP(CFDE_XMLNode* pXMLDocumentNode) {
return nullptr;
}
-FX_BOOL IsStringAllWhitespace(CFX_WideString wsText) {
+bool IsStringAllWhitespace(CFX_WideString wsText) {
wsText.TrimRight(L"\x20\x9\xD\xA");
return wsText.IsEmpty();
}
@@ -222,7 +222,7 @@ void ConvertXMLToPlainText(CFDE_XMLElement* pRootXMLNode,
break;
}
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
}
@@ -250,14 +250,14 @@ const XFA_PACKETINFO* GetPacketByName(const CFX_WideStringC& wsName) {
} // namespace
-FX_BOOL XFA_RecognizeRichText(CFDE_XMLElement* pRichTextXMLNode) {
+bool XFA_RecognizeRichText(CFDE_XMLElement* pRichTextXMLNode) {
if (pRichTextXMLNode) {
CFX_WideString wsNamespaceURI;
GetElementTagNamespaceURI(pRichTextXMLNode, wsNamespaceURI);
if (wsNamespaceURI == FX_WSTRC(L"http://www.w3.org/1999/xhtml"))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
CXFA_SimpleParser::CXFA_SimpleParser(CXFA_Document* pFactory,
@@ -381,13 +381,13 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode,
}
m_pRootNode = pXFANode;
} else {
- m_pRootNode = DataLoader(pXFANode, pXMLNode, TRUE);
+ m_pRootNode = DataLoader(pXFANode, pXMLNode, true);
}
} else if (pXFANode->IsContentNode()) {
ParseContentNode(pXFANode, pXMLNode, ePacketID);
m_pRootNode = pXFANode;
} else {
- m_pRootNode = NormalLoader(pXFANode, pXMLNode, ePacketID, TRUE);
+ m_pRootNode = NormalLoader(pXFANode, pXMLNode, ePacketID, true);
}
}
@@ -399,19 +399,19 @@ CFDE_XMLDoc* CXFA_SimpleParser::GetXMLDoc() const {
return m_pXMLDoc.get();
}
-FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(
+bool XFA_FDEExtension_ResolveNamespaceQualifier(
CFDE_XMLElement* pNode,
const CFX_WideStringC& wsQualifier,
CFX_WideString& wsNamespaceURI) {
if (!pNode)
- return FALSE;
+ return false;
CFDE_XMLNode* pFakeRoot = pNode->GetNodeItem(CFDE_XMLNode::Root);
CFX_WideString wsNSAttribute;
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
if (wsQualifier.IsEmpty()) {
wsNSAttribute = FX_WSTRC(L"xmlns");
- bRet = TRUE;
+ bRet = true;
} else {
wsNSAttribute = FX_WSTRC(L"xmlns:") + wsQualifier;
}
@@ -422,7 +422,7 @@ FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(
if (pNode->HasAttribute(wsNSAttribute.c_str())) {
pNode->GetString(wsNSAttribute.c_str(), wsNamespaceURI);
- return TRUE;
+ return true;
}
}
wsNamespaceURI.clear();
@@ -606,7 +606,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Config(
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_Config)->pName);
- if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, TRUE))
+ if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
pNode->SetXMLMappingNode(pXMLDocumentNode);
@@ -639,7 +639,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
pNode->GetDocument()->RecognizeXFAVersionNumber(wsNamespaceURI);
}
- if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, TRUE))
+ if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
} else if (ePacketID == XFA_XDPPACKET_Form) {
@@ -679,11 +679,11 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
pTemplateRoot
? pTemplateRoot->GetFirstChildByClass(XFA_Element::Subform)
: nullptr;
- FX_BOOL bUseAttribute = TRUE;
+ bool bUseAttribute = true;
if (pTemplateChosen &&
pTemplateChosen->GetEnum(XFA_ATTRIBUTE_RestoreState) !=
XFA_ATTRIBUTEENUM_Auto) {
- bUseAttribute = FALSE;
+ bUseAttribute = false;
}
if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, bUseAttribute))
return nullptr;
@@ -707,7 +707,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_Datasets)->pName);
- if (!DataLoader(pNode, pDatasetsXMLNode, FALSE))
+ if (!DataLoader(pNode, pDatasetsXMLNode, false))
return nullptr;
pNode->SetXMLMappingNode(pDatasetsXMLNode);
@@ -748,7 +748,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
CFX_WideString wsLocalName;
static_cast<CFDE_XMLElement*>(pDataXMLNode)->GetLocalTagName(wsLocalName);
pNode->SetCData(XFA_ATTRIBUTE_Name, wsLocalName);
- if (!DataLoader(pNode, pDataXMLNode, TRUE))
+ if (!DataLoader(pNode, pDataXMLNode, true))
return nullptr;
pNode->SetXMLMappingNode(pDataXMLNode);
@@ -775,7 +775,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_LocaleSet)->pName);
- if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, TRUE))
+ if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
} else if (ePacketID == XFA_XDPPACKET_ConnectionSet) {
@@ -790,7 +790,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_ConnectionSet)->pName);
- if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, TRUE))
+ if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
} else if (ePacketID == XFA_XDPPACKET_SourceSet) {
@@ -805,7 +805,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
pNode->SetCData(XFA_ATTRIBUTE_Name,
XFA_GetPacketByIndex(XFA_PACKET_SourceSet)->pName);
- if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, TRUE))
+ if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
}
@@ -859,7 +859,7 @@ CXFA_Node* CXFA_SimpleParser::UserPacketLoader(CXFA_Node* pXFANode,
CXFA_Node* CXFA_SimpleParser::DataLoader(CXFA_Node* pXFANode,
CFDE_XMLNode* pXMLDoc,
- FX_BOOL bDoTransform) {
+ bool bDoTransform) {
ParseDataGroup(pXFANode, pXMLDoc, XFA_XDPPACKET_Datasets);
return pXFANode;
}
@@ -867,8 +867,8 @@ CXFA_Node* CXFA_SimpleParser::DataLoader(CXFA_Node* pXFANode,
CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
CFDE_XMLNode* pXMLDoc,
XFA_XDPPACKET ePacketID,
- FX_BOOL bUseAttribute) {
- FX_BOOL bOneOfPropertyFound = FALSE;
+ bool bUseAttribute) {
+ bool bOneOfPropertyFound = false;
for (CFDE_XMLNode* pXMLChild = pXMLDoc->GetNodeItem(CFDE_XMLNode::FirstChild);
pXMLChild;
pXMLChild = pXMLChild->GetNodeItem(CFDE_XMLNode::NextSibling)) {
@@ -889,7 +889,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
if (bOneOfPropertyFound)
break;
- bOneOfPropertyFound = TRUE;
+ bOneOfPropertyFound = true;
}
CXFA_Node* pXFAChild = m_pFactory->CreateNode(ePacketID, eType);
if (!pXFAChild)
@@ -897,7 +897,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
if (ePacketID == XFA_XDPPACKET_Config)
pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, wsTagName.AsStringC());
- FX_BOOL IsNeedValue = TRUE;
+ bool IsNeedValue = true;
for (int32_t i = 0, count = pXMLElement->CountAttributes(); i < count;
i++) {
CFX_WideString wsAttrQualifiedName;
@@ -907,7 +907,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
GetAttributeLocalName(wsAttrQualifiedName.AsStringC(), wsAttrName);
if (wsAttrName == FX_WSTRC(L"nil") &&
wsAttrValue == FX_WSTRC(L"true")) {
- IsNeedValue = FALSE;
+ IsNeedValue = false;
}
const XFA_ATTRIBUTEINFO* lpAttrInfo =
XFA_GetAttributeByName(wsAttrName.AsStringC());
@@ -1181,7 +1181,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
XFA_XDPPACKET ePacketID) {
CFX_WideTextBuf wsValueTextBuf;
CFX_WideTextBuf wsCurValueTextBuf;
- FX_BOOL bMarkAsCompound = FALSE;
+ bool bMarkAsCompound = false;
CFDE_XMLNode* pXMLCurValueNode = nullptr;
for (CFDE_XMLNode* pXMLChild =
pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
@@ -1213,7 +1213,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
wsCurValueTextBuf << wsText;
} else {
- bMarkAsCompound = TRUE;
+ bMarkAsCompound = true;
if (pXMLCurValueNode) {
CFX_WideString wsCurValue = wsCurValueTextBuf.MakeString();
if (!wsCurValue.IsEmpty()) {
@@ -1288,7 +1288,7 @@ void CXFA_SimpleParser::ParseInstruction(CXFA_Node* pXFANode,
wsData.clear();
if (pXMLInstruction->GetData(1, wsData) &&
wsData == FX_WSTRC(L"v2.7-scripting:1")) {
- pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_Scripting, TRUE);
+ pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_Scripting, true);
}
}
} else if (wsTargetName == FX_WSTRC(L"acrobat")) {
@@ -1297,7 +1297,7 @@ void CXFA_SimpleParser::ParseInstruction(CXFA_Node* pXFANode,
wsData == FX_WSTRC(L"JavaScript")) {
if (pXMLInstruction->GetData(1, wsData) &&
wsData == FX_WSTRC(L"strictScoping")) {
- pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_StrictScoping, TRUE);
+ pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_StrictScoping, true);
}
}
}
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h
index 2b1e192e92..db6765f400 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.h
+++ b/xfa/fxfa/parser/cxfa_simple_parser.h
@@ -57,10 +57,10 @@ class CXFA_SimpleParser {
CXFA_Node* NormalLoader(CXFA_Node* pXFANode,
CFDE_XMLNode* pXMLDoc,
XFA_XDPPACKET ePacketID,
- FX_BOOL bUseAttribute);
+ bool bUseAttribute);
CXFA_Node* DataLoader(CXFA_Node* pXFANode,
CFDE_XMLNode* pXMLDoc,
- FX_BOOL bDoTransform);
+ bool bDoTransform);
CXFA_Node* UserPacketLoader(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLDoc);
void ParseContentNode(CXFA_Node* pXFANode,
CFDE_XMLNode* pXMLNode,
@@ -82,7 +82,7 @@ class CXFA_SimpleParser {
CXFA_Document* m_pFactory;
CXFA_Node* m_pRootNode;
XFA_XDPPACKET m_ePacketID;
- FX_BOOL m_bDocumentParser;
+ bool m_bDocumentParser;
};
#endif // XFA_FXFA_PARSER_CXFA_SIMPLE_PARSER_H_
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp
index 77549f00ed..602f2f9f1f 100644
--- a/xfa/fxfa/parser/cxfa_stroke.cpp
+++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -76,8 +76,8 @@ int32_t CXFA_Stroke::GetJoinType() const {
: XFA_ATTRIBUTEENUM_Square;
}
-FX_BOOL CXFA_Stroke::IsInverted() const {
- return m_pNode ? m_pNode->GetBoolean(XFA_ATTRIBUTE_Inverted) : FALSE;
+bool CXFA_Stroke::IsInverted() const {
+ return m_pNode ? m_pNode->GetBoolean(XFA_ATTRIBUTE_Inverted) : false;
}
FX_FLOAT CXFA_Stroke::GetRadius() const {
@@ -85,22 +85,22 @@ FX_FLOAT CXFA_Stroke::GetRadius() const {
: 0;
}
-FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, uint32_t dwFlags) const {
+bool CXFA_Stroke::SameStyles(CXFA_Stroke stroke, uint32_t dwFlags) const {
if (m_pNode == stroke.GetNode())
- return TRUE;
+ return true;
if (FXSYS_fabs(GetThickness() - stroke.GetThickness()) >= 0.01f)
- return FALSE;
+ return false;
if ((dwFlags & XFA_STROKE_SAMESTYLE_NoPresence) == 0 &&
IsVisible() != stroke.IsVisible()) {
- return FALSE;
+ return false;
}
if (GetStrokeType() != stroke.GetStrokeType())
- return FALSE;
+ return false;
if (GetColor() != stroke.GetColor())
- return FALSE;
+ return false;
if ((dwFlags & XFA_STROKE_SAMESTYLE_Corner) != 0 &&
FXSYS_fabs(GetRadius() - stroke.GetRadius()) >= 0.01f) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/parser/cxfa_stroke.h b/xfa/fxfa/parser/cxfa_stroke.h
index d42ece32c8..a3287d2855 100644
--- a/xfa/fxfa/parser/cxfa_stroke.h
+++ b/xfa/fxfa/parser/cxfa_stroke.h
@@ -35,9 +35,9 @@ class CXFA_Stroke : public CXFA_Data {
FX_ARGB GetColor() const;
void SetColor(FX_ARGB argb);
int32_t GetJoinType() const;
- FX_BOOL IsInverted() const;
+ bool IsInverted() const;
FX_FLOAT GetRadius() const;
- FX_BOOL SameStyles(CXFA_Stroke stroke, uint32_t dwFlags = 0) const;
+ bool SameStyles(CXFA_Stroke stroke, uint32_t dwFlags = 0) const;
};
typedef CFX_ArrayTemplate<CXFA_Stroke> CXFA_StrokeArray;
diff --git a/xfa/fxfa/parser/cxfa_submit.cpp b/xfa/fxfa/parser/cxfa_submit.cpp
index 2aa011b0e3..50bef1e811 100644
--- a/xfa/fxfa/parser/cxfa_submit.cpp
+++ b/xfa/fxfa/parser/cxfa_submit.cpp
@@ -10,7 +10,7 @@
CXFA_Submit::CXFA_Submit(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-FX_BOOL CXFA_Submit::IsSubmitEmbedPDF() {
+bool CXFA_Submit::IsSubmitEmbedPDF() {
return m_pNode->GetBoolean(XFA_ATTRIBUTE_EmbedPDF);
}
diff --git a/xfa/fxfa/parser/cxfa_submit.h b/xfa/fxfa/parser/cxfa_submit.h
index 29cd1cff80..f10435e1f5 100644
--- a/xfa/fxfa/parser/cxfa_submit.h
+++ b/xfa/fxfa/parser/cxfa_submit.h
@@ -17,7 +17,7 @@ class CXFA_Submit : public CXFA_Data {
public:
explicit CXFA_Submit(CXFA_Node* pNode);
- FX_BOOL IsSubmitEmbedPDF();
+ bool IsSubmitEmbedPDF();
int32_t GetSubmitFormat();
void GetSubmitTarget(CFX_WideStringC& wsTarget);
void GetSubmitXDPContent(CFX_WideStringC& wsContent);
diff --git a/xfa/fxfa/parser/cxfa_tooltip.cpp b/xfa/fxfa/parser/cxfa_tooltip.cpp
index 079b365e46..afe0e224af 100644
--- a/xfa/fxfa/parser/cxfa_tooltip.cpp
+++ b/xfa/fxfa/parser/cxfa_tooltip.cpp
@@ -10,6 +10,6 @@
CXFA_ToolTip::CXFA_ToolTip(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-FX_BOOL CXFA_ToolTip::GetTip(CFX_WideString& wsTip) {
+bool CXFA_ToolTip::GetTip(CFX_WideString& wsTip) {
return m_pNode->TryContent(wsTip);
}
diff --git a/xfa/fxfa/parser/cxfa_tooltip.h b/xfa/fxfa/parser/cxfa_tooltip.h
index 93ba2ba72c..433885d89c 100644
--- a/xfa/fxfa/parser/cxfa_tooltip.h
+++ b/xfa/fxfa/parser/cxfa_tooltip.h
@@ -16,7 +16,7 @@ class CXFA_ToolTip : public CXFA_Data {
public:
explicit CXFA_ToolTip(CXFA_Node* pNode);
- FX_BOOL GetTip(CFX_WideString& wsTip);
+ bool GetTip(CFX_WideString& wsTip);
};
#endif // XFA_FXFA_PARSER_CXFA_TOOLTIP_H_
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index 2309a07799..5706d96aaa 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -14,19 +14,19 @@ int32_t CXFA_Validate::GetFormatTest() {
return m_pNode->GetEnum(XFA_ATTRIBUTE_FormatTest);
}
-FX_BOOL CXFA_Validate::SetTestValue(int32_t iType,
- CFX_WideString& wsValue,
- XFA_ATTRIBUTEENUM eName) {
+bool CXFA_Validate::SetTestValue(int32_t iType,
+ CFX_WideString& wsValue,
+ XFA_ATTRIBUTEENUM eName) {
const XFA_ATTRIBUTEENUMINFO* pInfo =
XFA_GetAttributeEnumByName(wsValue.AsStringC());
if (pInfo)
eName = pInfo->eName;
- m_pNode->SetEnum((XFA_ATTRIBUTE)iType, eName, FALSE);
- return TRUE;
+ m_pNode->SetEnum((XFA_ATTRIBUTE)iType, eName, false);
+ return true;
}
-FX_BOOL CXFA_Validate::SetNullTest(CFX_WideString wsValue) {
+bool CXFA_Validate::SetNullTest(CFX_WideString wsValue) {
return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue,
XFA_ATTRIBUTEENUM_Disabled);
}
@@ -41,7 +41,7 @@ int32_t CXFA_Validate::GetScriptTest() {
void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage,
const CFX_WideString& wsMessageType) {
- CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, FALSE);
+ CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, false);
if (!pNode)
return;
@@ -78,7 +78,7 @@ void CXFA_Validate::GetNullMessageText(CFX_WideString& wsMessage) {
void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
const CFX_WideString& wsMessageType) {
- CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, TRUE);
+ CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, true);
if (!pNode)
return;
@@ -91,14 +91,14 @@ void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage,
CFX_WideStringC wsName;
pItemNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
if (wsName.IsEmpty() || wsName == wsMessageType) {
- pItemNode->SetContent(wsMessage, wsMessage, FALSE);
+ pItemNode->SetContent(wsMessage, wsMessage, false);
return;
}
}
CXFA_Node* pTextNode = pNode->CreateSamePacketNode(XFA_Element::Text);
pNode->InsertChild(pTextNode);
- pTextNode->SetCData(XFA_ATTRIBUTE_Name, wsMessageType, FALSE);
- pTextNode->SetContent(wsMessage, wsMessage, FALSE);
+ pTextNode->SetCData(XFA_ATTRIBUTE_Name, wsMessageType, false);
+ pTextNode->SetContent(wsMessage, wsMessage, false);
}
void CXFA_Validate::GetScriptMessageText(CFX_WideString& wsMessage) {
diff --git a/xfa/fxfa/parser/cxfa_validate.h b/xfa/fxfa/parser/cxfa_validate.h
index da9654a5a0..03bbaddf7b 100644
--- a/xfa/fxfa/parser/cxfa_validate.h
+++ b/xfa/fxfa/parser/cxfa_validate.h
@@ -20,7 +20,7 @@ class CXFA_Validate : public CXFA_Data {
int32_t GetFormatTest();
int32_t GetNullTest();
- FX_BOOL SetNullTest(CFX_WideString wsValue);
+ bool SetNullTest(CFX_WideString wsValue);
int32_t GetScriptTest();
void GetFormatMessageText(CFX_WideString& wsMessage);
void SetFormatMessageText(CFX_WideString wsMessage);
@@ -36,9 +36,9 @@ class CXFA_Validate : public CXFA_Data {
const CFX_WideString& wsMessageType);
void SetMessageText(CFX_WideString& wsMessage,
const CFX_WideString& wsMessageType);
- FX_BOOL SetTestValue(int32_t iType,
- CFX_WideString& wsValue,
- XFA_ATTRIBUTEENUM eName);
+ bool SetTestValue(int32_t iType,
+ CFX_WideString& wsValue,
+ XFA_ATTRIBUTEENUM eName);
};
#endif // XFA_FXFA_PARSER_CXFA_VALIDATE_H_
diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp
index 70b1aba5ab..4d467aee2c 100644
--- a/xfa/fxfa/parser/cxfa_value.cpp
+++ b/xfa/fxfa/parser/cxfa_value.cpp
@@ -16,12 +16,12 @@ XFA_Element CXFA_Value::GetChildValueClassID() {
return XFA_Element::Unknown;
}
-FX_BOOL CXFA_Value::GetChildValueContent(CFX_WideString& wsContent) {
+bool CXFA_Value::GetChildValueContent(CFX_WideString& wsContent) {
if (!m_pNode)
- return FALSE;
+ return false;
if (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild))
return pNode->TryContent(wsContent);
- return FALSE;
+ return false;
}
CXFA_Arc CXFA_Value::GetArc() {
@@ -52,5 +52,5 @@ CXFA_ExData CXFA_Value::GetExData() {
CXFA_Image CXFA_Value::GetImage() {
return CXFA_Image(
m_pNode ? (m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) : nullptr,
- TRUE);
+ true);
}
diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h
index c3a03950ec..225e1879da 100644
--- a/xfa/fxfa/parser/cxfa_value.h
+++ b/xfa/fxfa/parser/cxfa_value.h
@@ -23,7 +23,7 @@ class CXFA_Value : public CXFA_Data {
explicit CXFA_Value(CXFA_Node* pNode) : CXFA_Data(pNode) {}
XFA_Element GetChildValueClassID();
- FX_BOOL GetChildValueContent(CFX_WideString& wsContent);
+ bool GetChildValueContent(CFX_WideString& wsContent);
CXFA_Arc GetArc();
CXFA_Line GetLine();
CXFA_Rectangle GetRectangle();
diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp
index 7c6487db6a..35d4dc1270 100644
--- a/xfa/fxfa/parser/cxfa_widetextread.cpp
+++ b/xfa/fxfa/parser/cxfa_widetextread.cpp
@@ -50,7 +50,7 @@ int32_t CXFA_WideTextRead::GetPosition() {
return m_iPosition * sizeof(FX_WCHAR);
}
-FX_BOOL CXFA_WideTextRead::IsEOF() const {
+bool CXFA_WideTextRead::IsEOF() const {
return m_iPosition >= m_wsBuffer.GetLength();
}
@@ -60,7 +60,7 @@ int32_t CXFA_WideTextRead::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr,
int32_t iMaxLength,
- FX_BOOL& bEOS) {
+ bool& bEOS) {
iMaxLength = std::min(iMaxLength, m_wsBuffer.GetLength() - m_iPosition);
if (iMaxLength == 0)
return 0;
@@ -80,8 +80,8 @@ int32_t CXFA_WideTextRead::WriteString(const FX_WCHAR* pStr, int32_t iLength) {
return 0;
}
-FX_BOOL CXFA_WideTextRead::SetLength(int32_t iLength) {
- return FALSE;
+bool CXFA_WideTextRead::SetLength(int32_t iLength) {
+ return false;
}
int32_t CXFA_WideTextRead::GetBOM(uint8_t bom[4]) const {
diff --git a/xfa/fxfa/parser/cxfa_widetextread.h b/xfa/fxfa/parser/cxfa_widetextread.h
index 9ee2c4132e..e0f0eac358 100644
--- a/xfa/fxfa/parser/cxfa_widetextread.h
+++ b/xfa/fxfa/parser/cxfa_widetextread.h
@@ -20,15 +20,13 @@ class CXFA_WideTextRead : public IFX_Stream {
int32_t GetLength() const override;
int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) override;
int32_t GetPosition() override;
- FX_BOOL IsEOF() const override;
+ bool IsEOF() const override;
int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override;
- int32_t ReadString(FX_WCHAR* pStr,
- int32_t iMaxLength,
- FX_BOOL& bEOS) override;
+ int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, bool& bEOS) override;
int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) override;
int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override;
void Flush() override {}
- FX_BOOL SetLength(int32_t iLength) override;
+ bool SetLength(int32_t iLength) override;
int32_t GetBOM(uint8_t bom[4]) const override;
uint16_t GetCodePage() const override;
uint16_t SetCodePage(uint16_t wCodePage) override;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index f237ad0a00..c9523383dd 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -18,7 +18,7 @@
namespace {
FX_FLOAT GetEdgeThickness(const CXFA_StrokeArray& strokes,
- FX_BOOL b3DStyle,
+ bool b3DStyle,
int32_t nIndex) {
FX_FLOAT fThickness = 0;
@@ -31,20 +31,20 @@ FX_FLOAT GetEdgeThickness(const CXFA_StrokeArray& strokes,
return fThickness;
}
-FX_BOOL SplitDateTime(const CFX_WideString& wsDateTime,
- CFX_WideString& wsDate,
- CFX_WideString& wsTime) {
+bool SplitDateTime(const CFX_WideString& wsDateTime,
+ CFX_WideString& wsDate,
+ CFX_WideString& wsTime) {
wsDate = L"";
wsTime = L"";
if (wsDateTime.IsEmpty())
- return FALSE;
+ return false;
int nSplitIndex = -1;
nSplitIndex = wsDateTime.Find('T');
if (nSplitIndex < 0)
nSplitIndex = wsDateTime.Find(' ');
if (nSplitIndex < 0)
- return FALSE;
+ return false;
wsDate = wsDateTime.Left(nSplitIndex);
if (!wsDate.IsEmpty()) {
@@ -55,7 +55,7 @@ FX_BOOL SplitDateTime(const CFX_WideString& wsDateTime,
break;
}
if (i == iCount)
- return FALSE;
+ return false;
}
wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1);
if (!wsTime.IsEmpty()) {
@@ -66,9 +66,9 @@ FX_BOOL SplitDateTime(const CFX_WideString& wsDateTime,
break;
}
if (i == iCount)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
@@ -79,7 +79,7 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
eWidgetType = XFA_Element::Unknown;
XFA_Element eUIType = XFA_Element::Unknown;
- CXFA_Value defValue(pNode->GetProperty(0, XFA_Element::Value, TRUE));
+ CXFA_Value defValue(pNode->GetProperty(0, XFA_Element::Value, true));
XFA_Element eValueType = defValue.GetChildValueClassID();
switch (eValueType) {
case XFA_Element::Boolean:
@@ -115,7 +115,7 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
}
CXFA_Node* pUIChild = nullptr;
- CXFA_Node* pUI = pNode->GetProperty(0, XFA_Element::Ui, TRUE);
+ CXFA_Node* pUI = pNode->GetProperty(0, XFA_Element::Ui, true);
CXFA_Node* pChild = pUI->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
XFA_Element eChildType = pChild->GetElementType();
@@ -160,9 +160,9 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
if (!pUIChild) {
if (eUIType == XFA_Element::Unknown) {
eUIType = XFA_Element::TextEdit;
- defValue.GetNode()->GetProperty(0, XFA_Element::Text, TRUE);
+ defValue.GetNode()->GetProperty(0, XFA_Element::Text, true);
}
- return pUI->GetProperty(0, eUIType, TRUE);
+ return pUI->GetProperty(0, eUIType, true);
}
if (eUIType != XFA_Element::Unknown)
@@ -202,7 +202,7 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
eValueType = XFA_Element::Text;
break;
}
- defValue.GetNode()->GetProperty(0, eValueType, TRUE);
+ defValue.GetNode()->GetProperty(0, eValueType, true);
return pUIChild;
}
@@ -229,23 +229,23 @@ CFX_WideStringC GetAttributeDefaultValue_Cdata(XFA_Element eElement,
return nullptr;
}
-FX_BOOL GetAttributeDefaultValue_Boolean(XFA_Element eElement,
- XFA_ATTRIBUTE eAttribute,
- uint32_t dwPacket) {
+bool GetAttributeDefaultValue_Boolean(XFA_Element eElement,
+ XFA_ATTRIBUTE eAttribute,
+ uint32_t dwPacket) {
void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute,
XFA_ATTRIBUTETYPE_Boolean, dwPacket)) {
return !!pValue;
}
- return FALSE;
+ return false;
}
} // namespace
CXFA_WidgetData::CXFA_WidgetData(CXFA_Node* pNode)
: CXFA_Data(pNode),
- m_bIsNull(TRUE),
- m_bPreNull(TRUE),
+ m_bIsNull(true),
+ m_bPreNull(true),
m_pUiChildNode(nullptr),
m_eUIType(XFA_Element::Unknown) {}
@@ -265,7 +265,7 @@ CFX_WideString CXFA_WidgetData::GetRawValue() {
return m_pNode->GetContent();
}
-int32_t CXFA_WidgetData::GetAccess(FX_BOOL bTemplate) {
+int32_t CXFA_WidgetData::GetAccess(bool bTemplate) {
if (bTemplate) {
CXFA_Node* pNode = m_pNode->GetTemplateNode();
if (pNode)
@@ -286,7 +286,7 @@ int32_t CXFA_WidgetData::GetAccess(FX_BOOL bTemplate) {
int32_t CXFA_WidgetData::GetRotate() {
CXFA_Measurement ms;
- if (!m_pNode->TryMeasure(XFA_ATTRIBUTE_Rotate, ms, FALSE))
+ if (!m_pNode->TryMeasure(XFA_ATTRIBUTE_Rotate, ms, false))
return 0;
int32_t iRotate = FXSYS_round(ms.GetValue());
@@ -294,23 +294,23 @@ int32_t CXFA_WidgetData::GetRotate() {
return iRotate / 90 * 90;
}
-CXFA_Border CXFA_WidgetData::GetBorder(FX_BOOL bModified) {
+CXFA_Border CXFA_WidgetData::GetBorder(bool bModified) {
return CXFA_Border(m_pNode->GetProperty(0, XFA_Element::Border, bModified));
}
-CXFA_Caption CXFA_WidgetData::GetCaption(FX_BOOL bModified) {
+CXFA_Caption CXFA_WidgetData::GetCaption(bool bModified) {
return CXFA_Caption(m_pNode->GetProperty(0, XFA_Element::Caption, bModified));
}
-CXFA_Font CXFA_WidgetData::GetFont(FX_BOOL bModified) {
+CXFA_Font CXFA_WidgetData::GetFont(bool bModified) {
return CXFA_Font(m_pNode->GetProperty(0, XFA_Element::Font, bModified));
}
-CXFA_Margin CXFA_WidgetData::GetMargin(FX_BOOL bModified) {
+CXFA_Margin CXFA_WidgetData::GetMargin(bool bModified) {
return CXFA_Margin(m_pNode->GetProperty(0, XFA_Element::Margin, bModified));
}
-CXFA_Para CXFA_WidgetData::GetPara(FX_BOOL bModified) {
+CXFA_Para CXFA_WidgetData::GetPara(bool bModified) {
return CXFA_Para(m_pNode->GetProperty(0, XFA_Element::Para, bModified));
}
@@ -320,7 +320,7 @@ void CXFA_WidgetData::GetEventList(CXFA_NodeArray& events) {
int32_t CXFA_WidgetData::GetEventByActivity(int32_t iActivity,
CXFA_NodeArray& events,
- FX_BOOL bIsFormReady) {
+ bool bIsFormReady) {
CXFA_NodeArray allEvents;
GetEventList(allEvents);
int32_t iCount = allEvents.GetSize();
@@ -345,67 +345,67 @@ int32_t CXFA_WidgetData::GetEventByActivity(int32_t iActivity,
return events.GetSize();
}
-CXFA_Value CXFA_WidgetData::GetDefaultValue(FX_BOOL bModified) {
+CXFA_Value CXFA_WidgetData::GetDefaultValue(bool bModified) {
CXFA_Node* pTemNode = m_pNode->GetTemplateNode();
return CXFA_Value(
pTemNode ? pTemNode->GetProperty(0, XFA_Element::Value, bModified)
: nullptr);
}
-CXFA_Value CXFA_WidgetData::GetFormValue(FX_BOOL bModified) {
+CXFA_Value CXFA_WidgetData::GetFormValue(bool bModified) {
return CXFA_Value(m_pNode->GetProperty(0, XFA_Element::Value, bModified));
}
-CXFA_Calculate CXFA_WidgetData::GetCalculate(FX_BOOL bModified) {
+CXFA_Calculate CXFA_WidgetData::GetCalculate(bool bModified) {
return CXFA_Calculate(
m_pNode->GetProperty(0, XFA_Element::Calculate, bModified));
}
-CXFA_Validate CXFA_WidgetData::GetValidate(FX_BOOL bModified) {
+CXFA_Validate CXFA_WidgetData::GetValidate(bool bModified) {
return CXFA_Validate(
m_pNode->GetProperty(0, XFA_Element::Validate, bModified));
}
-CXFA_Bind CXFA_WidgetData::GetBind(FX_BOOL bModified) {
+CXFA_Bind CXFA_WidgetData::GetBind(bool bModified) {
return CXFA_Bind(m_pNode->GetProperty(0, XFA_Element::Bind, bModified));
}
-CXFA_Assist CXFA_WidgetData::GetAssist(FX_BOOL bModified) {
+CXFA_Assist CXFA_WidgetData::GetAssist(bool bModified) {
return CXFA_Assist(m_pNode->GetProperty(0, XFA_Element::Assist, bModified));
}
-FX_BOOL CXFA_WidgetData::GetWidth(FX_FLOAT& fWidth) {
+bool CXFA_WidgetData::GetWidth(FX_FLOAT& fWidth) {
return TryMeasure(XFA_ATTRIBUTE_W, fWidth);
}
-FX_BOOL CXFA_WidgetData::GetHeight(FX_FLOAT& fHeight) {
+bool CXFA_WidgetData::GetHeight(FX_FLOAT& fHeight) {
return TryMeasure(XFA_ATTRIBUTE_H, fHeight);
}
-FX_BOOL CXFA_WidgetData::GetMinWidth(FX_FLOAT& fMinWidth) {
+bool CXFA_WidgetData::GetMinWidth(FX_FLOAT& fMinWidth) {
return TryMeasure(XFA_ATTRIBUTE_MinW, fMinWidth);
}
-FX_BOOL CXFA_WidgetData::GetMinHeight(FX_FLOAT& fMinHeight) {
+bool CXFA_WidgetData::GetMinHeight(FX_FLOAT& fMinHeight) {
return TryMeasure(XFA_ATTRIBUTE_MinH, fMinHeight);
}
-FX_BOOL CXFA_WidgetData::GetMaxWidth(FX_FLOAT& fMaxWidth) {
+bool CXFA_WidgetData::GetMaxWidth(FX_FLOAT& fMaxWidth) {
return TryMeasure(XFA_ATTRIBUTE_MaxW, fMaxWidth);
}
-FX_BOOL CXFA_WidgetData::GetMaxHeight(FX_FLOAT& fMaxHeight) {
+bool CXFA_WidgetData::GetMaxHeight(FX_FLOAT& fMaxHeight) {
return TryMeasure(XFA_ATTRIBUTE_MaxH, fMaxHeight);
}
-CXFA_Border CXFA_WidgetData::GetUIBorder(FX_BOOL bModified) {
+CXFA_Border CXFA_WidgetData::GetUIBorder(bool bModified) {
CXFA_Node* pUIChild = GetUIChild();
return CXFA_Border(
pUIChild ? pUIChild->GetProperty(0, XFA_Element::Border, bModified)
: nullptr);
}
-CXFA_Margin CXFA_WidgetData::GetUIMargin(FX_BOOL bModified) {
+CXFA_Margin CXFA_WidgetData::GetUIMargin(bool bModified) {
CXFA_Node* pUIChild = GetUIChild();
return CXFA_Margin(
pUIChild ? pUIChild->GetProperty(0, XFA_Element::Margin, bModified)
@@ -423,12 +423,12 @@ void CXFA_WidgetData::GetUIMargin(CFX_RectF& rtUIMargin) {
return;
FX_FLOAT fLeftInset, fTopInset, fRightInset, fBottomInset;
- FX_BOOL bLeft = mgUI.GetLeftInset(fLeftInset);
- FX_BOOL bTop = mgUI.GetTopInset(fTopInset);
- FX_BOOL bRight = mgUI.GetRightInset(fRightInset);
- FX_BOOL bBottom = mgUI.GetBottomInset(fBottomInset);
+ bool bLeft = mgUI.GetLeftInset(fLeftInset);
+ bool bTop = mgUI.GetTopInset(fTopInset);
+ bool bRight = mgUI.GetRightInset(fRightInset);
+ bool bBottom = mgUI.GetBottomInset(fBottomInset);
if (border) {
- FX_BOOL bVisible = FALSE;
+ bool bVisible = false;
FX_FLOAT fThickness = 0;
border.Get3DStyle(bVisible, fThickness);
if (!bLeft || !bTop || !bRight || !bBottom) {
@@ -455,8 +455,8 @@ int32_t CXFA_WidgetData::GetButtonHighlight() {
XFA_Element::Button, XFA_ATTRIBUTE_Highlight, XFA_XDPPACKET_Form);
}
-FX_BOOL CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover,
- FX_BOOL& bRichText) {
+bool CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover,
+ bool& bRichText) {
if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pText) {
@@ -470,11 +470,10 @@ FX_BOOL CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover,
pText = pText->GetNodeItem(XFA_NODEITEM_NextSibling);
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetButtonDown(CFX_WideString& wsDown,
- FX_BOOL& bRichText) {
+bool CXFA_WidgetData::GetButtonDown(CFX_WideString& wsDown, bool& bRichText) {
if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) {
CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pText) {
@@ -488,7 +487,7 @@ FX_BOOL CXFA_WidgetData::GetButtonDown(CFX_WideString& wsDown,
pText = pText->GetNodeItem(XFA_NODEITEM_NextSibling);
}
}
- return FALSE;
+ return false;
}
int32_t CXFA_WidgetData::GetCheckButtonShape() {
@@ -507,10 +506,10 @@ int32_t CXFA_WidgetData::GetCheckButtonMark() {
XFA_ATTRIBUTE_Mark, XFA_XDPPACKET_Form);
}
-FX_BOOL CXFA_WidgetData::IsRadioButton() {
+bool CXFA_WidgetData::IsRadioButton() {
if (CXFA_Node* pParent = m_pNode->GetNodeItem(XFA_NODEITEM_Parent))
return pParent->GetElementType() == XFA_Element::ExclGroup;
- return FALSE;
+ return false;
}
FX_FLOAT CXFA_WidgetData::GetCheckButtonSize() {
@@ -522,7 +521,7 @@ FX_FLOAT CXFA_WidgetData::GetCheckButtonSize() {
.ToUnit(XFA_UNIT_Pt);
}
-FX_BOOL CXFA_WidgetData::IsAllowNeutral() {
+bool CXFA_WidgetData::IsAllowNeutral() {
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild)
return pUIChild->GetBoolean(XFA_ATTRIBUTE_AllowNeutral);
@@ -648,8 +647,8 @@ CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName,
void CXFA_WidgetData::SetSelectedMemberByValue(const CFX_WideStringC& wsValue,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
+ bool bScriptModify,
+ bool bSyncData) {
CFX_WideString wsExclGroup;
for (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pNode;
pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -675,7 +674,7 @@ void CXFA_WidgetData::SetSelectedMemberByValue(const CFX_WideStringC& wsValue,
wsExclGroup = wsValue;
}
pNode->SetContent(wsChildValue, wsChildValue, bNotify, bScriptModify,
- FALSE);
+ false);
}
if (m_pNode) {
m_pNode->SetContent(wsExclGroup, wsExclGroup, bNotify, bScriptModify,
@@ -719,7 +718,7 @@ int32_t CXFA_WidgetData::GetChoiceListCommitOn() {
XFA_Element::ChoiceList, XFA_ATTRIBUTE_CommitOn, XFA_XDPPACKET_Form);
}
-FX_BOOL CXFA_WidgetData::IsChoiceListAllowTextEntry() {
+bool CXFA_WidgetData::IsChoiceListAllowTextEntry() {
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild)
return pUIChild->GetBoolean(XFA_ATTRIBUTE_TextEntry);
@@ -735,13 +734,13 @@ int32_t CXFA_WidgetData::GetChoiceListOpen() {
XFA_ATTRIBUTE_Open, XFA_XDPPACKET_Form);
}
-FX_BOOL CXFA_WidgetData::IsListBox() {
+bool CXFA_WidgetData::IsListBox() {
int32_t iOpenMode = GetChoiceListOpen();
return (iOpenMode == XFA_ATTRIBUTEENUM_Always ||
iOpenMode == XFA_ATTRIBUTEENUM_MultiSelect);
}
-int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue) {
+int32_t CXFA_WidgetData::CountChoiceListItems(bool bSaveValue) {
CXFA_NodeArray pItems;
CXFA_Node* pItem = nullptr;
int32_t iCount = 0;
@@ -760,8 +759,8 @@ int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue) {
pItem = pItems[0];
if (iCount > 1) {
- FX_BOOL bItemOneHasSave = pItems[0]->GetBoolean(XFA_ATTRIBUTE_Save);
- FX_BOOL bItemTwoHasSave = pItems[1]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemOneHasSave = pItems[0]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemTwoHasSave = pItems[1]->GetBoolean(XFA_ATTRIBUTE_Save);
if (bItemOneHasSave != bItemTwoHasSave && bSaveValue == bItemTwoHasSave)
pItem = pItems[1];
}
@@ -769,9 +768,9 @@ int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue) {
return pItem->CountChildren(XFA_Element::Unknown);
}
-FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText,
- int32_t nIndex,
- FX_BOOL bSaveValue) {
+bool CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText,
+ int32_t nIndex,
+ bool bSaveValue) {
wsText.clear();
CXFA_NodeArray pItemsArray;
CXFA_Node* pItems = nullptr;
@@ -787,12 +786,12 @@ FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText,
break;
}
if (iCount == 0)
- return FALSE;
+ return false;
pItems = pItemsArray[0];
if (iCount > 1) {
- FX_BOOL bItemOneHasSave = pItemsArray[0]->GetBoolean(XFA_ATTRIBUTE_Save);
- FX_BOOL bItemTwoHasSave = pItemsArray[1]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemOneHasSave = pItemsArray[0]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemTwoHasSave = pItemsArray[1]->GetBoolean(XFA_ATTRIBUTE_Save);
if (bItemOneHasSave != bItemTwoHasSave && bSaveValue == bItemTwoHasSave)
pItems = pItemsArray[1];
}
@@ -800,14 +799,14 @@ FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText,
CXFA_Node* pItem = pItems->GetChild(nIndex, XFA_Element::Unknown);
if (pItem) {
pItem->TryContent(wsText);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void CXFA_WidgetData::GetChoiceListItems(CFX_WideStringArray& wsTextArray,
- FX_BOOL bSaveValue) {
+ bool bSaveValue) {
CXFA_NodeArray pItems;
CXFA_Node* pItem = nullptr;
int32_t iCount = 0;
@@ -826,8 +825,8 @@ void CXFA_WidgetData::GetChoiceListItems(CFX_WideStringArray& wsTextArray,
pItem = pItems[0];
if (iCount > 1) {
- FX_BOOL bItemOneHasSave = pItems[0]->GetBoolean(XFA_ATTRIBUTE_Save);
- FX_BOOL bItemTwoHasSave = pItems[1]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemOneHasSave = pItems[0]->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bItemTwoHasSave = pItems[1]->GetBoolean(XFA_ATTRIBUTE_Save);
if (bItemOneHasSave != bItemTwoHasSave && bSaveValue == bItemTwoHasSave)
pItem = pItems[1];
}
@@ -845,7 +844,7 @@ int32_t CXFA_WidgetData::CountSelectedItems() {
int32_t iSelected = 0;
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
int32_t iValues = wsValueArray.GetSize();
for (int32_t i = 0; i < iValues; i++) {
int32_t iSaves = wsSaveTextArray.GetSize();
@@ -863,7 +862,7 @@ int32_t CXFA_WidgetData::GetSelectedItem(int32_t nIndex) {
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
int32_t iSaves = wsSaveTextArray.GetSize();
for (int32_t j = 0; j < iSaves; j++) {
if (wsValueArray[nIndex] == wsSaveTextArray[j])
@@ -880,7 +879,7 @@ void CXFA_WidgetData::GetSelectedItems(CFX_Int32Array& iSelArray) {
return;
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
int32_t iSaves = wsSaveTextArray.GetSize();
for (int32_t i = 0; i < iValues; i++) {
for (int32_t j = 0; j < iSaves; j++) {
@@ -917,35 +916,35 @@ void CXFA_WidgetData::GetSelectedItemsValue(
}
}
-FX_BOOL CXFA_WidgetData::GetItemState(int32_t nIndex) {
+bool CXFA_WidgetData::GetItemState(int32_t nIndex) {
if (nIndex < 0)
- return FALSE;
+ return false;
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
if (wsSaveTextArray.GetSize() <= nIndex)
- return FALSE;
+ return false;
CFX_WideStringArray wsValueArray;
GetSelectedItemsValue(wsValueArray);
int32_t iValues = wsValueArray.GetSize();
for (int32_t j = 0; j < iValues; j++) {
if (wsValueArray[j] == wsSaveTextArray[nIndex])
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_WidgetData::SetItemState(int32_t nIndex,
- FX_BOOL bSelected,
+ bool bSelected,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
+ bool bScriptModify,
+ bool bSyncData) {
if (nIndex < 0)
return;
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
if (wsSaveTextArray.GetSize() <= nIndex)
return;
@@ -999,13 +998,13 @@ void CXFA_WidgetData::SetItemState(int32_t nIndex,
void CXFA_WidgetData::SetSelectedItems(CFX_Int32Array& iSelArray,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
+ bool bScriptModify,
+ bool bSyncData) {
CFX_WideString wsValue;
int32_t iSize = iSelArray.GetSize();
if (iSize >= 1) {
CFX_WideStringArray wsSaveTextArray;
- GetChoiceListItems(wsSaveTextArray, TRUE);
+ GetChoiceListItems(wsSaveTextArray, true);
CFX_WideString wsItemValue;
for (int32_t i = 0; i < iSize; i++) {
wsItemValue = (iSize == 1)
@@ -1035,7 +1034,7 @@ void CXFA_WidgetData::ClearAllSelections() {
void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
const CFX_WideString& wsValue,
int32_t nIndex,
- FX_BOOL bNotify) {
+ bool bNotify) {
CFX_WideString wsNewValue(wsValue);
if (wsNewValue.IsEmpty())
wsNewValue = wsLabel;
@@ -1057,12 +1056,12 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
InsertListTextItem(pItems, wsLabel, nIndex);
CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_Element::Items);
m_pNode->InsertChild(-1, pSaveItems);
- pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
+ pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, true);
InsertListTextItem(pSaveItems, wsNewValue, nIndex);
} else if (iCount > 1) {
for (int32_t i = 0; i < 2; i++) {
CXFA_Node* pNode = listitems[i];
- FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save);
if (bHasSave)
InsertListTextItem(pNode, wsNewValue, nIndex);
else
@@ -1070,11 +1069,11 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel,
}
} else {
CXFA_Node* pNode = listitems[0];
- pNode->SetBoolean(XFA_ATTRIBUTE_Save, FALSE);
+ pNode->SetBoolean(XFA_ATTRIBUTE_Save, false);
pNode->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Visible);
CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_Element::Items);
m_pNode->InsertChild(-1, pSaveItems);
- pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE);
+ pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, true);
pSaveItems->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Hidden);
listitems.RemoveAll();
CXFA_Node* pListNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -1112,7 +1111,7 @@ void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue,
wsLabel = wsValue;
} else {
CXFA_Node* pLabelItems = listitems[0];
- FX_BOOL bSave = pLabelItems->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bSave = pLabelItems->GetBoolean(XFA_ATTRIBUTE_Save);
CXFA_Node* pSaveItems = nullptr;
if (bSave) {
pSaveItems = pLabelItems;
@@ -1158,7 +1157,7 @@ void CXFA_WidgetData::GetItemValue(const CFX_WideStringC& wsLabel,
wsValue = wsLabel;
} else {
CXFA_Node* pLabelItems = listitems[0];
- FX_BOOL bSave = pLabelItems->GetBoolean(XFA_ATTRIBUTE_Save);
+ bool bSave = pLabelItems->GetBoolean(XFA_ATTRIBUTE_Save);
CXFA_Node* pSaveItems = nullptr;
if (bSave) {
pSaveItems = pLabelItems;
@@ -1186,11 +1185,11 @@ void CXFA_WidgetData::GetItemValue(const CFX_WideStringC& wsLabel,
}
}
-FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex,
- FX_BOOL bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData) {
- FX_BOOL bSetValue = FALSE;
+bool CXFA_WidgetData::DeleteItem(int32_t nIndex,
+ bool bNotify,
+ bool bScriptModify,
+ bool bSyncData) {
+ bool bSetValue = false;
CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pItems->GetElementType() != XFA_Element::Items)
@@ -1202,8 +1201,8 @@ FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex,
}
} else {
if (!bSetValue && pItems->GetBoolean(XFA_ATTRIBUTE_Save)) {
- SetItemState(nIndex, FALSE, true, bScriptModify, bSyncData);
- bSetValue = TRUE;
+ SetItemState(nIndex, false, true, bScriptModify, bSyncData);
+ bSetValue = true;
}
int32_t i = 0;
CXFA_Node* pNode = pItems->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -1219,7 +1218,7 @@ FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex,
}
if (bNotify)
m_pNode->GetDocument()->GetNotify()->OnWidgetListItemRemoved(this, nIndex);
- return TRUE;
+ return true;
}
int32_t CXFA_WidgetData::GetHorizontalScrollPolicy() {
@@ -1244,33 +1243,33 @@ CFX_WideString CXFA_WidgetData::GetBarcodeType() {
: CFX_WideString();
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsCharEncoding;
if (pUIChild->TryCData(XFA_ATTRIBUTE_CharEncoding, wsCharEncoding)) {
if (wsCharEncoding.CompareNoCase(L"UTF-16")) {
val = CHAR_ENCODING_UNICODE;
- return TRUE;
+ return true;
}
if (wsCharEncoding.CompareNoCase(L"UTF-8")) {
val = CHAR_ENCODING_UTF8;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(FX_BOOL& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_Checksum(bool& val) {
CXFA_Node* pUIChild = GetUIChild();
XFA_ATTRIBUTEENUM eChecksum;
if (pUIChild->TryEnum(XFA_ATTRIBUTE_Checksum, eChecksum)) {
switch (eChecksum) {
case XFA_ATTRIBUTEENUM_None:
val = false;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_Auto:
val = true;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_1mod10:
break;
case XFA_ATTRIBUTEENUM_1mod10_1mod11:
@@ -1281,121 +1280,121 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(FX_BOOL& val) {
break;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsDataLength;
if (pUIChild->TryCData(XFA_ATTRIBUTE_DataLength, wsDataLength)) {
val = FXSYS_wtoi(wsDataLength.c_str());
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_StartChar(FX_CHAR& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_StartChar(FX_CHAR& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideStringC wsStartEndChar;
if (pUIChild->TryCData(XFA_ATTRIBUTE_StartChar, wsStartEndChar)) {
if (wsStartEndChar.GetLength()) {
val = (FX_CHAR)wsStartEndChar.GetAt(0);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_EndChar(FX_CHAR& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_EndChar(FX_CHAR& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideStringC wsStartEndChar;
if (pUIChild->TryCData(XFA_ATTRIBUTE_EndChar, wsStartEndChar)) {
if (wsStartEndChar.GetLength()) {
val = (FX_CHAR)wsStartEndChar.GetAt(0);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ECLevel(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_ECLevel(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsECLevel;
if (pUIChild->TryCData(XFA_ATTRIBUTE_ErrorCorrectionLevel, wsECLevel)) {
val = FXSYS_wtoi(wsECLevel.c_str());
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleWidth(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_ModuleWidth(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
CXFA_Measurement mModuleWidthHeight;
if (pUIChild->TryMeasure(XFA_ATTRIBUTE_ModuleWidth, mModuleWidthHeight)) {
val = (int32_t)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_ModuleHeight(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_ModuleHeight(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
CXFA_Measurement mModuleWidthHeight;
if (pUIChild->TryMeasure(XFA_ATTRIBUTE_ModuleHeight, mModuleWidthHeight)) {
val = (int32_t)mModuleWidthHeight.ToUnit(XFA_UNIT_Pt);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_PrintChecksum(FX_BOOL& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_PrintChecksum(bool& val) {
CXFA_Node* pUIChild = GetUIChild();
- FX_BOOL bPrintCheckDigit;
+ bool bPrintCheckDigit;
if (pUIChild->TryBoolean(XFA_ATTRIBUTE_PrintCheckDigit, bPrintCheckDigit)) {
val = bPrintCheckDigit;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_TextLocation(int32_t& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_TextLocation(int32_t& val) {
CXFA_Node* pUIChild = GetUIChild();
XFA_ATTRIBUTEENUM eTextLocation;
if (pUIChild->TryEnum(XFA_ATTRIBUTE_TextLocation, eTextLocation)) {
switch (eTextLocation) {
case XFA_ATTRIBUTEENUM_None:
val = BC_TEXT_LOC_NONE;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_Above:
val = BC_TEXT_LOC_ABOVE;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_Below:
val = BC_TEXT_LOC_BELOW;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_AboveEmbedded:
val = BC_TEXT_LOC_ABOVEEMBED;
- return TRUE;
+ return true;
case XFA_ATTRIBUTEENUM_BelowEmbedded:
val = BC_TEXT_LOC_BELOWEMBED;
- return TRUE;
+ return true;
default:
break;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Truncate(FX_BOOL& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_Truncate(bool& val) {
CXFA_Node* pUIChild = GetUIChild();
- FX_BOOL bTruncate;
+ bool bTruncate;
if (pUIChild->TryBoolean(XFA_ATTRIBUTE_Truncate, bTruncate)) {
val = bTruncate;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideString wsWideNarrowRatio;
if (pUIChild->TryCData(XFA_ATTRIBUTE_WideNarrowRatio, wsWideNarrowRatio)) {
@@ -1411,9 +1410,9 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val) {
fRatio = (FX_FLOAT)fA / fB;
}
val = fRatio;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_WidgetData::GetPasswordChar(CFX_WideString& wsPassWord) {
@@ -1427,7 +1426,7 @@ void CXFA_WidgetData::GetPasswordChar(CFX_WideString& wsPassWord) {
}
}
-FX_BOOL CXFA_WidgetData::IsMultiLine() {
+bool CXFA_WidgetData::IsMultiLine() {
CXFA_Node* pUIChild = GetUIChild();
if (pUIChild)
return pUIChild->GetBoolean(XFA_ATTRIBUTE_MultiLine);
@@ -1463,40 +1462,40 @@ int32_t CXFA_WidgetData::GetMaxChars(XFA_Element& eType) {
return 0;
}
-FX_BOOL CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) {
+bool CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) {
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) {
if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal))
return pChild->TryInteger(XFA_ATTRIBUTE_FracDigits, iFracDigits);
}
iFracDigits = -1;
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetLeadDigits(int32_t& iLeadDigits) {
+bool CXFA_WidgetData::GetLeadDigits(int32_t& iLeadDigits) {
if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) {
if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal))
return pChild->TryInteger(XFA_ATTRIBUTE_LeadDigits, iLeadDigits);
}
iLeadDigits = -1;
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
- XFA_VALUEPICTURE eValueType) {
+bool CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
+ XFA_VALUEPICTURE eValueType) {
if (wsValue.IsEmpty()) {
SyncValue(wsValue, true);
- return TRUE;
+ return true;
}
m_bPreNull = m_bIsNull;
- m_bIsNull = FALSE;
+ m_bIsNull = false;
CFX_WideString wsNewText(wsValue);
CFX_WideString wsPicture;
GetPictureContent(wsPicture, eValueType);
- FX_BOOL bValidate = TRUE;
- FX_BOOL bSyncData = FALSE;
+ bool bValidate = true;
+ bool bSyncData = false;
CXFA_Node* pNode = GetUIChild();
if (!pNode)
- return TRUE;
+ return true;
XFA_Element eType = pNode->GetElementType();
if (!wsPicture.IsEmpty()) {
@@ -1516,7 +1515,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
GetFracDigits(iFracDigits);
wsNewText = NumericLimit(wsNewText, iLeadDigits, iFracDigits);
}
- bSyncData = TRUE;
+ bSyncData = true;
}
} else {
if (eType == XFA_Element::NumericEdit) {
@@ -1527,7 +1526,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
GetFracDigits(iFracDigits);
wsNewText = NumericLimit(wsNewText, iLeadDigits, iFracDigits);
}
- bSyncData = TRUE;
+ bSyncData = true;
}
}
if (eType != XFA_Element::NumericEdit || bSyncData)
@@ -1536,10 +1535,10 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue,
return bValidate;
}
-FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
- XFA_VALUEPICTURE ePicture) {
+bool CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
+ XFA_VALUEPICTURE ePicture) {
if (ePicture == XFA_VALUEPICTURE_Raw)
- return FALSE;
+ return false;
CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this);
switch (ePicture) {
@@ -1547,13 +1546,13 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
if (CXFA_Node* pFormat = m_pNode->GetChild(0, XFA_Element::Format)) {
if (CXFA_Node* pPicture = pFormat->GetChild(0, XFA_Element::Picture)) {
if (pPicture->TryContent(wsPicture))
- return TRUE;
+ return true;
}
}
CFX_WideString wsDataPicture, wsTimePicture;
IFX_Locale* pLocale = GetLocal();
if (!pLocale)
- return FALSE;
+ return false;
uint32_t dwType = widgetValue.GetType();
switch (dwType) {
@@ -1578,7 +1577,7 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
default:
break;
}
- return TRUE;
+ return true;
}
case XFA_VALUEPICTURE_Edit: {
@@ -1586,14 +1585,14 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
if (pUI) {
if (CXFA_Node* pPicture = pUI->GetChild(0, XFA_Element::Picture)) {
if (pPicture->TryContent(wsPicture))
- return TRUE;
+ return true;
}
}
{
CFX_WideString wsDataPicture, wsTimePicture;
IFX_Locale* pLocale = GetLocal();
if (!pLocale) {
- return FALSE;
+ return false;
}
uint32_t dwType = widgetValue.GetType();
switch (dwType) {
@@ -1616,19 +1615,19 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture,
break;
}
}
- return TRUE;
+ return true;
}
case XFA_VALUEPICTURE_DataBind: {
if (CXFA_Bind bind = GetBind()) {
bind.GetPicture(wsPicture);
- return TRUE;
+ return true;
}
break;
}
default:
break;
}
- return FALSE;
+ return false;
}
IFX_Locale* CXFA_WidgetData::GetLocal() {
@@ -1643,8 +1642,8 @@ IFX_Locale* CXFA_WidgetData::GetLocal() {
return m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName);
}
-FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
- XFA_VALUEPICTURE eValueType) {
+bool CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
+ XFA_VALUEPICTURE eValueType) {
wsValue = m_pNode->GetContent();
if (eValueType == XFA_VALUEPICTURE_Display)
@@ -1654,7 +1653,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
GetPictureContent(wsPicture, eValueType);
CXFA_Node* pNode = GetUIChild();
if (!pNode)
- return TRUE;
+ return true;
switch (GetUIChild()->GetElementType()) {
case XFA_Element::ChoiceList: {
@@ -1681,7 +1680,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
break;
}
if (wsPicture.IsEmpty())
- return TRUE;
+ return true;
if (IFX_Locale* pLocale = GetLocal()) {
CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this);
@@ -1692,7 +1691,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
if (SplitDateTime(wsValue, wsDate, wsTime)) {
CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocalMgr);
if (date.FormatPatterns(wsValue, wsPicture, pLocale, eValueType))
- return TRUE;
+ return true;
}
break;
}
@@ -1701,7 +1700,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
if (SplitDateTime(wsValue, wsDate, wsTime)) {
CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocalMgr);
if (time.FormatPatterns(wsValue, wsPicture, pLocale, eValueType))
- return TRUE;
+ return true;
}
break;
}
@@ -1710,20 +1709,19 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue,
}
widgetValue.FormatPatterns(wsValue, wsPicture, pLocale, eValueType);
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(
- const CFX_WideString& wsValue,
- CFX_WideString& wsNormalizeValue) {
+bool CXFA_WidgetData::GetNormalizeDataValue(const CFX_WideString& wsValue,
+ CFX_WideString& wsNormalizeValue) {
wsNormalizeValue = wsValue;
if (wsValue.IsEmpty())
- return TRUE;
+ return true;
CFX_WideString wsPicture;
GetPictureContent(wsPicture, XFA_VALUEPICTURE_DataBind);
if (wsPicture.IsEmpty())
- return TRUE;
+ return true;
ASSERT(GetNode());
CXFA_LocaleMgr* pLocalMgr = GetNode()->GetDocument()->GetLocalMgr();
@@ -1733,31 +1731,31 @@ FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(
widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsNormalizeValue,
wsPicture, pLocale, pLocalMgr);
wsNormalizeValue = widgetValue.GetValue();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
- CFX_WideString& wsFormattedValue) {
+bool CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
+ CFX_WideString& wsFormattedValue) {
wsFormattedValue = wsValue;
if (wsValue.IsEmpty())
- return TRUE;
+ return true;
CFX_WideString wsPicture;
GetPictureContent(wsPicture, XFA_VALUEPICTURE_DataBind);
if (wsPicture.IsEmpty())
- return TRUE;
+ return true;
if (IFX_Locale* pLocale = GetLocal()) {
ASSERT(GetNode());
CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_Element::Value);
if (!pNodeValue)
- return FALSE;
+ return false;
CXFA_Node* pValueChild = pNodeValue->GetNodeItem(XFA_NODEITEM_FirstChild);
if (!pValueChild)
- return FALSE;
+ return false;
int32_t iVTType = XFA_VT_NULL;
switch (pValueChild->GetElementType()) {
@@ -1798,7 +1796,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocalMgr);
if (date.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind)) {
- return TRUE;
+ return true;
}
}
break;
@@ -1809,7 +1807,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocalMgr);
if (time.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind)) {
- return TRUE;
+ return true;
}
}
break;
@@ -1820,7 +1818,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
widgetValue.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind);
}
- return FALSE;
+ return false;
}
void CXFA_WidgetData::NormalizeNumStr(const CFX_WideString& wsValue,
@@ -1850,9 +1848,9 @@ void CXFA_WidgetData::FormatNumStr(const CFX_WideString& wsValue,
CFX_WideString wsSrcNum = wsValue;
CFX_WideString wsGroupSymbol;
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Grouping, wsGroupSymbol);
- FX_BOOL bNeg = FALSE;
+ bool bNeg = false;
if (wsSrcNum[0] == '-') {
- bNeg = TRUE;
+ bNeg = true;
wsSrcNum.Delete(0, 1);
}
int32_t len = wsSrcNum.GetLength();
@@ -1901,7 +1899,7 @@ void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems,
int32_t nIndex) {
CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_Element::Text);
pItems->InsertChild(nIndex, pText);
- pText->SetContent(wsText, wsText, FALSE, FALSE, FALSE);
+ pText->SetContent(wsText, wsText, false, false, false);
}
CFX_WideString CXFA_WidgetData::NumericLimit(const CFX_WideString& wsValue,
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index ed217ada3d..5c030d6b52 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -44,40 +44,40 @@ class CXFA_WidgetData : public CXFA_Data {
CXFA_Node* GetUIChild();
XFA_Element GetUIType();
CFX_WideString GetRawValue();
- int32_t GetAccess(FX_BOOL bTemplate = FALSE);
+ int32_t GetAccess(bool bTemplate = false);
int32_t GetRotate();
- CXFA_Border GetBorder(FX_BOOL bModified = FALSE);
- CXFA_Caption GetCaption(FX_BOOL bModified = FALSE);
- CXFA_Font GetFont(FX_BOOL bModified = FALSE);
- CXFA_Margin GetMargin(FX_BOOL bModified = FALSE);
- CXFA_Para GetPara(FX_BOOL bModified = FALSE);
+ CXFA_Border GetBorder(bool bModified = false);
+ CXFA_Caption GetCaption(bool bModified = false);
+ CXFA_Font GetFont(bool bModified = false);
+ CXFA_Margin GetMargin(bool bModified = false);
+ CXFA_Para GetPara(bool bModified = false);
void GetEventList(CXFA_NodeArray& events);
int32_t GetEventByActivity(int32_t iActivity,
CXFA_NodeArray& events,
- FX_BOOL bIsFormReady = FALSE);
- CXFA_Value GetDefaultValue(FX_BOOL bModified = FALSE);
- CXFA_Value GetFormValue(FX_BOOL bModified = FALSE);
- CXFA_Calculate GetCalculate(FX_BOOL bModified = FALSE);
- CXFA_Validate GetValidate(FX_BOOL bModified = FALSE);
- CXFA_Bind GetBind(FX_BOOL bModified = FALSE);
- CXFA_Assist GetAssist(FX_BOOL bModified = FALSE);
- FX_BOOL GetWidth(FX_FLOAT& fWidth);
- FX_BOOL GetHeight(FX_FLOAT& fHeight);
- FX_BOOL GetMinWidth(FX_FLOAT& fMinWidth);
- FX_BOOL GetMinHeight(FX_FLOAT& fMinHeight);
- FX_BOOL GetMaxWidth(FX_FLOAT& fMaxWidth);
- FX_BOOL GetMaxHeight(FX_FLOAT& fMaxHeight);
- CXFA_Border GetUIBorder(FX_BOOL bModified = FALSE);
- CXFA_Margin GetUIMargin(FX_BOOL bModified = FALSE);
+ bool bIsFormReady = false);
+ CXFA_Value GetDefaultValue(bool bModified = false);
+ CXFA_Value GetFormValue(bool bModified = false);
+ CXFA_Calculate GetCalculate(bool bModified = false);
+ CXFA_Validate GetValidate(bool bModified = false);
+ CXFA_Bind GetBind(bool bModified = false);
+ CXFA_Assist GetAssist(bool bModified = false);
+ bool GetWidth(FX_FLOAT& fWidth);
+ bool GetHeight(FX_FLOAT& fHeight);
+ bool GetMinWidth(FX_FLOAT& fMinWidth);
+ bool GetMinHeight(FX_FLOAT& fMinHeight);
+ bool GetMaxWidth(FX_FLOAT& fMaxWidth);
+ bool GetMaxHeight(FX_FLOAT& fMaxHeight);
+ CXFA_Border GetUIBorder(bool bModified = false);
+ CXFA_Margin GetUIMargin(bool bModified = false);
void GetUIMargin(CFX_RectF& rtUIMargin);
int32_t GetButtonHighlight();
- FX_BOOL GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL& bRichText);
- FX_BOOL GetButtonDown(CFX_WideString& wsDown, FX_BOOL& bRichText);
+ bool GetButtonRollover(CFX_WideString& wsRollover, bool& bRichText);
+ bool GetButtonDown(CFX_WideString& wsDown, bool& bRichText);
int32_t GetCheckButtonShape();
int32_t GetCheckButtonMark();
FX_FLOAT GetCheckButtonSize();
- FX_BOOL IsAllowNeutral();
- FX_BOOL IsRadioButton();
+ bool IsAllowNeutral();
+ bool IsRadioButton();
XFA_CHECKSTATE GetCheckState();
void SetCheckState(XFA_CHECKSTATE eCheckState, bool bNotify);
CXFA_Node* GetExclGroupNode();
@@ -85,83 +85,82 @@ class CXFA_WidgetData : public CXFA_Data {
CXFA_Node* SetSelectedMember(const CFX_WideStringC& wsName, bool bNotify);
void SetSelectedMemberByValue(const CFX_WideStringC& wsValue,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData);
+ bool bScriptModify,
+ bool bSyncData);
CXFA_Node* GetExclGroupFirstMember();
CXFA_Node* GetExclGroupNextMember(CXFA_Node* pNode);
int32_t GetChoiceListCommitOn();
- FX_BOOL IsChoiceListAllowTextEntry();
+ bool IsChoiceListAllowTextEntry();
int32_t GetChoiceListOpen();
- FX_BOOL IsListBox();
- int32_t CountChoiceListItems(FX_BOOL bSaveValue = FALSE);
- FX_BOOL GetChoiceListItem(CFX_WideString& wsText,
- int32_t nIndex,
- FX_BOOL bSaveValue = FALSE);
+ bool IsListBox();
+ int32_t CountChoiceListItems(bool bSaveValue = false);
+ bool GetChoiceListItem(CFX_WideString& wsText,
+ int32_t nIndex,
+ bool bSaveValue = false);
void GetChoiceListItems(CFX_WideStringArray& wsTextArray,
- FX_BOOL bSaveValue = FALSE);
+ bool bSaveValue = false);
int32_t CountSelectedItems();
int32_t GetSelectedItem(int32_t nIndex = 0);
void GetSelectedItems(CFX_Int32Array& iSelArray);
void GetSelectedItemsValue(CFX_WideStringArray& wsSelTextArray);
- FX_BOOL GetItemState(int32_t nIndex);
+ bool GetItemState(int32_t nIndex);
void SetItemState(int32_t nIndex,
- FX_BOOL bSelected,
+ bool bSelected,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData);
+ bool bScriptModify,
+ bool bSyncData);
void SetSelectedItems(CFX_Int32Array& iSelArray,
bool bNotify,
- FX_BOOL bScriptModify,
- FX_BOOL bSyncData);
+ bool bScriptModify,
+ bool bSyncData);
void ClearAllSelections();
void InsertItem(const CFX_WideString& wsLabel,
const CFX_WideString& wsValue,
int32_t nIndex = -1,
- FX_BOOL bNotify = FALSE);
+ bool bNotify = false);
void GetItemLabel(const CFX_WideStringC& wsValue, CFX_WideString& wsLabel);
void GetItemValue(const CFX_WideStringC& wsLabel, CFX_WideString& wsValue);
- FX_BOOL DeleteItem(int32_t nIndex,
- FX_BOOL bNotify = FALSE,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bSyncData = TRUE);
+ bool DeleteItem(int32_t nIndex,
+ bool bNotify = false,
+ bool bScriptModify = false,
+ bool bSyncData = true);
int32_t GetHorizontalScrollPolicy();
int32_t GetNumberOfCells();
- FX_BOOL SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType);
- FX_BOOL GetPictureContent(CFX_WideString& wsPicture,
- XFA_VALUEPICTURE ePicture);
+ bool SetValue(const CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType);
+ bool GetPictureContent(CFX_WideString& wsPicture, XFA_VALUEPICTURE ePicture);
IFX_Locale* GetLocal();
- FX_BOOL GetValue(CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType);
- FX_BOOL GetNormalizeDataValue(const CFX_WideString& wsValue,
- CFX_WideString& wsNormalizeValue);
- FX_BOOL GetFormatDataValue(const CFX_WideString& wsValue,
- CFX_WideString& wsFormattedValue);
+ bool GetValue(CFX_WideString& wsValue, XFA_VALUEPICTURE eValueType);
+ bool GetNormalizeDataValue(const CFX_WideString& wsValue,
+ CFX_WideString& wsNormalizeValue);
+ bool GetFormatDataValue(const CFX_WideString& wsValue,
+ CFX_WideString& wsFormattedValue);
void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput);
CFX_WideString GetBarcodeType();
- FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val);
- FX_BOOL GetBarcodeAttribute_Checksum(FX_BOOL& val);
- FX_BOOL GetBarcodeAttribute_DataLength(int32_t& val);
- FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val);
- FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val);
- FX_BOOL GetBarcodeAttribute_ECLevel(int32_t& val);
- FX_BOOL GetBarcodeAttribute_ModuleWidth(int32_t& val);
- FX_BOOL GetBarcodeAttribute_ModuleHeight(int32_t& val);
- FX_BOOL GetBarcodeAttribute_PrintChecksum(FX_BOOL& val);
- FX_BOOL GetBarcodeAttribute_TextLocation(int32_t& val);
- FX_BOOL GetBarcodeAttribute_Truncate(FX_BOOL& val);
- FX_BOOL GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val);
+ bool GetBarcodeAttribute_CharEncoding(int32_t& val);
+ bool GetBarcodeAttribute_Checksum(bool& val);
+ bool GetBarcodeAttribute_DataLength(int32_t& val);
+ bool GetBarcodeAttribute_StartChar(FX_CHAR& val);
+ bool GetBarcodeAttribute_EndChar(FX_CHAR& val);
+ bool GetBarcodeAttribute_ECLevel(int32_t& val);
+ bool GetBarcodeAttribute_ModuleWidth(int32_t& val);
+ bool GetBarcodeAttribute_ModuleHeight(int32_t& val);
+ bool GetBarcodeAttribute_PrintChecksum(bool& val);
+ bool GetBarcodeAttribute_TextLocation(int32_t& val);
+ bool GetBarcodeAttribute_Truncate(bool& val);
+ bool GetBarcodeAttribute_WideNarrowRatio(FX_FLOAT& val);
void GetPasswordChar(CFX_WideString& wsPassWord);
- FX_BOOL IsMultiLine();
+ bool IsMultiLine();
int32_t GetVerticalScrollPolicy();
int32_t GetMaxChars(XFA_Element& eType);
- FX_BOOL GetFracDigits(int32_t& iFracDigits);
- FX_BOOL GetLeadDigits(int32_t& iLeadDigits);
+ bool GetFracDigits(int32_t& iFracDigits);
+ bool GetLeadDigits(int32_t& iLeadDigits);
CFX_WideString NumericLimit(const CFX_WideString& wsValue,
int32_t iLead,
int32_t iTread) const;
- FX_BOOL m_bIsNull;
- FX_BOOL m_bPreNull;
+ bool m_bIsNull;
+ bool m_bPreNull;
protected:
void SyncValue(const CFX_WideString& wsValue, bool bNotify);
diff --git a/xfa/fxfa/parser/cxfa_xml_parser.cpp b/xfa/fxfa/parser/cxfa_xml_parser.cpp
index 654a449a88..70e0d7cc9e 100644
--- a/xfa/fxfa/parser/cxfa_xml_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_xml_parser.cpp
@@ -23,7 +23,7 @@ CXFA_XMLParser::CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream)
}
CXFA_XMLParser::~CXFA_XMLParser() {
- m_NodeStack.RemoveAll(FALSE);
+ m_NodeStack.RemoveAll(false);
m_ws1.clear();
m_ws2.clear();
}
@@ -39,7 +39,7 @@ int32_t CXFA_XMLParser::DoParser(IFX_Pause* pPause) {
return 100;
int32_t iCount = 0;
- while (TRUE) {
+ while (true) {
m_syntaxParserResult = m_pParser->DoSyntaxParse();
switch (m_syntaxParserResult) {
case FDE_XmlSyntaxResult::InstructionOpen:
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index a0ff81405d..1fc9530e09 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -37,12 +37,12 @@ struct RecurseRecord {
CXFA_Node* pDataChild;
};
-FX_BOOL GetOccurInfo(CXFA_Node* pOccurNode,
- int32_t& iMin,
- int32_t& iMax,
- int32_t& iInit) {
+bool GetOccurInfo(CXFA_Node* pOccurNode,
+ int32_t& iMin,
+ int32_t& iMax,
+ int32_t& iInit) {
if (!pOccurNode)
- return FALSE;
+ return false;
CXFA_Occur occur(pOccurNode);
return occur.GetOccurInfo(iMin, iMax, iInit);
@@ -64,17 +64,16 @@ void FormValueNode_MatchNoneCreateChild(CXFA_Node* pFormNode) {
pWidgetData->GetUIType();
}
-FX_BOOL FormValueNode_SetChildContent(
- CXFA_Node* pValueNode,
- const CFX_WideString& wsContent,
- XFA_Element iType = XFA_Element::Unknown) {
+bool FormValueNode_SetChildContent(CXFA_Node* pValueNode,
+ const CFX_WideString& wsContent,
+ XFA_Element iType = XFA_Element::Unknown) {
if (!pValueNode)
- return FALSE;
+ return false;
ASSERT(pValueNode->GetPacketID() == XFA_XDPPACKET_Form);
CXFA_Node* pChildNode = FormValueNode_CreateChild(pValueNode, iType);
if (!pChildNode)
- return FALSE;
+ return false;
switch (pChildNode->GetObjectType()) {
case XFA_ObjectType::ContentNode: {
@@ -85,7 +84,7 @@ FX_BOOL FormValueNode_SetChildContent(
if (pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
- FALSE);
+ false);
if (wsContentType == FX_WSTRC(L"text/html"))
element = XFA_Element::SharpxHTML;
else if (wsContentType == FX_WSTRC(L"text/xml"))
@@ -104,15 +103,15 @@ FX_BOOL FormValueNode_SetChildContent(
break;
}
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
- return TRUE;
+ return true;
}
void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_Node* pDataNode,
- FX_BOOL bDataToForm) {
+ bool bDataToForm) {
pFormNode->SetObject(XFA_ATTRIBUTE_BindingNode, pDataNode);
pDataNode->AddBindItem(pFormNode);
XFA_Element eType = pFormNode->GetElementType();
@@ -322,7 +321,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
case XFA_Element::ExclGroup: {
pWidgetData->SetSelectedMemberByValue(wsNormalizeValue.AsStringC(), false,
- FALSE, FALSE);
+ false, false);
break;
}
case XFA_Element::DateTimeEdit:
@@ -368,7 +367,7 @@ void RegisterGlobalBinding(CXFA_Document* pDocument,
CXFA_Node* ScopeMatchGlobalBinding(CXFA_Node* pDataScope,
uint32_t dwNameHash,
XFA_Element eMatchDataNodeType,
- FX_BOOL bUpLevel) {
+ bool bUpLevel) {
for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = nullptr;
pCurDataScope && pCurDataScope->GetPacketID() == XFA_XDPPACKET_Datasets;
pLastDataScope = pCurDataScope,
@@ -391,7 +390,7 @@ CXFA_Node* ScopeMatchGlobalBinding(CXFA_Node* pDataScope,
pDataChild; pDataChild = pDataChild->GetNextSameClassSibling(
XFA_Element::DataGroup)) {
CXFA_Node* pDataNode = ScopeMatchGlobalBinding(pDataChild, dwNameHash,
- eMatchDataNodeType, FALSE);
+ eMatchDataNodeType, false);
if (pDataNode)
return pDataNode;
}
@@ -412,7 +411,7 @@ CXFA_Node* FindGlobalDataNode(CXFA_Document* pDocument,
CXFA_Node* pBounded = GetGlobalBinding(pDocument, dwNameHash);
if (!pBounded) {
pBounded =
- ScopeMatchGlobalBinding(pDataScope, dwNameHash, eMatchNodeType, TRUE);
+ ScopeMatchGlobalBinding(pDataScope, dwNameHash, eMatchNodeType, true);
if (pBounded)
RegisterGlobalBinding(pDocument, dwNameHash, pBounded);
}
@@ -451,8 +450,8 @@ CXFA_Node* FindDataRefDataNode(CXFA_Document* pDocument,
CXFA_Node* pDataScope,
XFA_Element eMatchNodeType,
CXFA_Node* pTemplateNode,
- FX_BOOL bForceBind,
- FX_BOOL bUpLevel) {
+ bool bForceBind,
+ bool bUpLevel) {
uint32_t dFlags = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_BindNew;
if (bUpLevel || wsRef != FX_WSTRC(L"name"))
dFlags |= (XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings);
@@ -474,18 +473,17 @@ CXFA_Node* FindDataRefDataNode(CXFA_Document* pDocument,
return nullptr;
}
-FX_BOOL NeedGenerateForm(CXFA_Node* pTemplateChild,
- FX_BOOL bUseInstanceManager) {
+bool NeedGenerateForm(CXFA_Node* pTemplateChild, bool bUseInstanceManager) {
XFA_Element eType = pTemplateChild->GetElementType();
if (eType == XFA_Element::Variables)
- return TRUE;
+ return true;
if (pTemplateChild->IsContainerNode())
- return FALSE;
+ return false;
if (eType == XFA_Element::Proto ||
(bUseInstanceManager && eType == XFA_Element::Occur)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
CXFA_Node* CloneOrMergeInstanceManager(CXFA_Document* pDocument,
@@ -541,17 +539,17 @@ CXFA_Node* FindMatchingDataNode(
CXFA_Document* pDocument,
CXFA_Node* pTemplateNode,
CXFA_Node* pDataScope,
- FX_BOOL& bAccessedDataDOM,
- FX_BOOL bForceBind,
+ bool& bAccessedDataDOM,
+ bool bForceBind,
CXFA_NodeIteratorTemplate<CXFA_Node,
CXFA_TraverseStrategy_XFAContainerNode>*
pIterator,
- FX_BOOL& bSelfMatch,
+ bool& bSelfMatch,
XFA_ATTRIBUTEENUM& eBindMatch,
- FX_BOOL bUpLevel) {
- FX_BOOL bOwnIterator = FALSE;
+ bool bUpLevel) {
+ bool bOwnIterator = false;
if (!pIterator) {
- bOwnIterator = TRUE;
+ bOwnIterator = true;
pIterator = new CXFA_NodeIteratorTemplate<
CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode>(pTemplateNode);
}
@@ -596,7 +594,7 @@ CXFA_Node* FindMatchingDataNode(
pCurTemplateNode = pIterator->MoveToNext();
continue;
case XFA_ATTRIBUTEENUM_Global:
- bAccessedDataDOM = TRUE;
+ bAccessedDataDOM = true;
if (!bForceBind) {
pCurTemplateNode = pIterator->MoveToNext();
continue;
@@ -615,7 +613,7 @@ CXFA_Node* FindMatchingDataNode(
break;
}
case XFA_ATTRIBUTEENUM_Once: {
- bAccessedDataDOM = TRUE;
+ bAccessedDataDOM = true;
CXFA_Node* pOnceBindNode = FindOnceDataNode(
pDocument, pCurTemplateNode->GetCData(XFA_ATTRIBUTE_Name),
pDataScope, eMatchNodeType);
@@ -627,7 +625,7 @@ CXFA_Node* FindMatchingDataNode(
break;
}
case XFA_ATTRIBUTEENUM_DataRef: {
- bAccessedDataDOM = TRUE;
+ bAccessedDataDOM = true;
CXFA_Node* pDataRefBindNode = FindDataRefDataNode(
pDocument, pTemplateNodeBind->GetCData(XFA_ATTRIBUTE_Ref),
pDataScope, eMatchNodeType, pTemplateNode, bForceBind, bUpLevel);
@@ -645,7 +643,7 @@ CXFA_Node* FindMatchingDataNode(
break;
}
if (pCurTemplateNode == pTemplateNode && pResult)
- bSelfMatch = TRUE;
+ bSelfMatch = true;
break;
}
if (bOwnIterator)
@@ -655,7 +653,7 @@ CXFA_Node* FindMatchingDataNode(
void SortRecurseRecord(CFX_ArrayTemplate<RecurseRecord>& rgRecords,
CXFA_Node* pDataScope,
- FX_BOOL bChoiceMode) {
+ bool bChoiceMode) {
int32_t iCount = rgRecords.GetSize();
CFX_ArrayTemplate<RecurseRecord> rgResultRecord;
for (CXFA_Node* pChildNode = pDataScope->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -692,12 +690,12 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
CXFA_Node* pTemplateNode,
CXFA_Node* pFormParentNode,
CXFA_Node* pDataScope,
- FX_BOOL bOneInstance,
- FX_BOOL bDataMerge) {
+ bool bOneInstance,
+ bool bDataMerge) {
XFA_Element eType = pTemplateNode->GetElementType();
CXFA_Node* pOccurNode = nullptr;
CXFA_Node* pFirstInstance = nullptr;
- FX_BOOL bUseInstanceManager =
+ bool bUseInstanceManager =
pFormParentNode->GetElementType() != XFA_Element::Area;
CXFA_Node* pInstMgrNode = nullptr;
CXFA_NodeArray subformArray;
@@ -712,7 +710,7 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
pTemplateNode->GetFirstChildByClass(XFA_Element::Occur)) {
pOccurNode = pInstMgrNode ? XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pInstMgrNode,
- pOccurTemplateNode, FALSE, nullptr)
+ pOccurTemplateNode, false, nullptr)
: pOccurTemplateNode;
} else if (pInstMgrNode) {
pOccurNode = pInstMgrNode->GetFirstChildByClass(XFA_Element::Occur);
@@ -723,7 +721,7 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
pInstMgrNode->SetFlag(XFA_NodeFlag_Initialized, true);
pSearchArray = &subformArray;
if (pFormParentNode->GetElementType() == XFA_Element::PageArea) {
- bOneInstance = TRUE;
+ bOneInstance = true;
if (subformArray.GetSize() < 1)
pSearchArray = nullptr;
} else if ((pTemplateNode->GetNameHash() == 0) &&
@@ -748,28 +746,28 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
if (bDataMerge) {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode>
sNodeIterator(pTemplateNode);
- FX_BOOL bAccessedDataDOM = FALSE;
+ bool bAccessedDataDOM = false;
if (eType == XFA_Element::SubformSet || eType == XFA_Element::Area) {
sNodeIterator.MoveToNext();
} else {
CFX_MapPtrTemplate<CXFA_Node*, CXFA_Node*> subformMapArray;
CXFA_NodeArray nodeArray;
for (; iMax < 0 || iCurRepeatIndex < iMax; iCurRepeatIndex++) {
- FX_BOOL bSelfMatch = FALSE;
+ bool bSelfMatch = false;
XFA_ATTRIBUTEENUM eBindMatch = XFA_ATTRIBUTEENUM_None;
CXFA_Node* pDataNode = FindMatchingDataNode(
- pDocument, pTemplateNode, pDataScope, bAccessedDataDOM, FALSE,
- &sNodeIterator, bSelfMatch, eBindMatch, TRUE);
+ pDocument, pTemplateNode, pDataScope, bAccessedDataDOM, false,
+ &sNodeIterator, bSelfMatch, eBindMatch, true);
if (!pDataNode || sNodeIterator.GetCurrent() != pTemplateNode)
break;
eParentBindMatch = eBindMatch;
CXFA_Node* pSubformNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
+ pDocument, pFormParentNode, pTemplateNode, false, pSearchArray);
if (!pFirstInstance)
pFirstInstance = pSubformNode;
- CreateDataBinding(pSubformNode, pDataNode, TRUE);
+ CreateDataBinding(pSubformNode, pDataNode, true);
ASSERT(pSubformNode);
subformMapArray.SetAt(pSubformNode, pDataNode);
nodeArray.Add(pSubformNode);
@@ -786,10 +784,10 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
XFA_NODEITEM_NextSibling)) {
if (NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubform,
- pTemplateChild, TRUE, nullptr);
+ pTemplateChild, true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
pDocument->DataMerge_CopyContainer(pTemplateChild, pSubform,
- pDataNode, FALSE, TRUE, FALSE);
+ pDataNode, false, true, false);
}
}
}
@@ -797,11 +795,11 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
}
for (; iMax < 0 || iCurRepeatIndex < iMax; iCurRepeatIndex++) {
- FX_BOOL bSelfMatch = FALSE;
+ bool bSelfMatch = false;
XFA_ATTRIBUTEENUM eBindMatch = XFA_ATTRIBUTEENUM_None;
if (!FindMatchingDataNode(pDocument, pTemplateNode, pDataScope,
- bAccessedDataDOM, FALSE, &sNodeIterator,
- bSelfMatch, eBindMatch, TRUE)) {
+ bAccessedDataDOM, false, &sNodeIterator,
+ bSelfMatch, eBindMatch, true)) {
break;
}
if (eBindMatch == XFA_ATTRIBUTEENUM_DataRef &&
@@ -812,7 +810,7 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
if (eRelation == XFA_ATTRIBUTEENUM_Choice ||
eRelation == XFA_ATTRIBUTEENUM_Unordered) {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
+ pDocument, pFormParentNode, pTemplateNode, false, pSearchArray);
ASSERT(pSubformSetNode);
if (!pFirstInstance)
pFirstInstance = pSubformSetNode;
@@ -825,14 +823,14 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
XFA_NODEITEM_NextSibling)) {
if (NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformSetNode,
- pTemplateChild, TRUE, nullptr);
+ pTemplateChild, true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
- bSelfMatch = FALSE;
+ bSelfMatch = false;
eBindMatch = XFA_ATTRIBUTEENUM_None;
if (eRelation != XFA_ATTRIBUTEENUM_Ordered) {
CXFA_Node* pDataMatch = FindMatchingDataNode(
pDocument, pTemplateChild, pDataScope, bAccessedDataDOM,
- FALSE, nullptr, bSelfMatch, eBindMatch, TRUE);
+ false, nullptr, bSelfMatch, eBindMatch, true);
if (pDataMatch) {
RecurseRecord sNewRecord = {pTemplateChild, pDataMatch};
if (bSelfMatch)
@@ -851,27 +849,27 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
switch (eRelation) {
case XFA_ATTRIBUTEENUM_Choice: {
ASSERT(rgItemMatchList.GetSize());
- SortRecurseRecord(rgItemMatchList, pDataScope, TRUE);
+ SortRecurseRecord(rgItemMatchList, pDataScope, true);
pDocument->DataMerge_CopyContainer(
rgItemMatchList[0].pTemplateChild, pSubformSetNode, pDataScope,
- FALSE, TRUE, TRUE);
+ false, true, true);
break;
}
case XFA_ATTRIBUTEENUM_Unordered: {
if (rgItemMatchList.GetSize()) {
- SortRecurseRecord(rgItemMatchList, pDataScope, FALSE);
+ SortRecurseRecord(rgItemMatchList, pDataScope, false);
for (int32_t i = 0, count = rgItemMatchList.GetSize(); i < count;
i++) {
pDocument->DataMerge_CopyContainer(
rgItemMatchList[i].pTemplateChild, pSubformSetNode,
- pDataScope, FALSE, TRUE, TRUE);
+ pDataScope, false, true, true);
}
}
for (int32_t i = 0, count = rgItemUnmatchList.GetSize(); i < count;
i++) {
pDocument->DataMerge_CopyContainer(rgItemUnmatchList[i],
pSubformSetNode, pDataScope,
- FALSE, TRUE, TRUE);
+ false, true, true);
}
break;
}
@@ -880,7 +878,7 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
}
} else {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
+ pDocument, pFormParentNode, pTemplateNode, false, pSearchArray);
ASSERT(pSubformSetNode);
if (!pFirstInstance)
pFirstInstance = pSubformSetNode;
@@ -891,16 +889,16 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
XFA_NODEITEM_NextSibling)) {
if (NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformSetNode,
- pTemplateChild, TRUE, nullptr);
+ pTemplateChild, true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
pDocument->DataMerge_CopyContainer(pTemplateChild, pSubformSetNode,
- pDataScope, FALSE, TRUE, TRUE);
+ pDataScope, false, true, true);
}
}
}
}
- if (iCurRepeatIndex == 0 && bAccessedDataDOM == FALSE) {
+ if (iCurRepeatIndex == 0 && bAccessedDataDOM == false) {
int32_t iLimit = iMax;
if (pInstMgrNode && pTemplateNode->GetNameHash() == 0) {
iLimit = subformArray.GetSize();
@@ -921,7 +919,7 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
break;
}
CXFA_Node* pSubformNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
+ pDocument, pFormParentNode, pTemplateNode, false, pSearchArray);
ASSERT(pSubformNode);
if (!pFirstInstance)
pFirstInstance = pSubformNode;
@@ -932,10 +930,10 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
XFA_NODEITEM_NextSibling)) {
if (NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformNode,
- pTemplateChild, TRUE, nullptr);
+ pTemplateChild, true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
pDocument->DataMerge_CopyContainer(pTemplateChild, pSubformNode,
- pDataScope, FALSE, TRUE, TRUE);
+ pDataScope, false, true, true);
}
}
}
@@ -945,26 +943,26 @@ CXFA_Node* CopyContainer_SubformSet(CXFA_Document* pDocument,
int32_t iMinimalLimit = iCurRepeatIndex == 0 ? iInit : iMin;
for (; iCurRepeatIndex < iMinimalLimit; iCurRepeatIndex++) {
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormParentNode, pTemplateNode, FALSE, pSearchArray);
+ pDocument, pFormParentNode, pTemplateNode, false, pSearchArray);
ASSERT(pSubformSetNode);
if (!pFirstInstance)
pFirstInstance = pSubformSetNode;
- FX_BOOL bFound = FALSE;
+ bool bFound = false;
for (CXFA_Node* pTemplateChild =
pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
if (NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformSetNode,
- pTemplateChild, TRUE, nullptr);
+ pTemplateChild, true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
if (bFound && eRelation == XFA_ATTRIBUTEENUM_Choice)
continue;
pDocument->DataMerge_CopyContainer(pTemplateChild, pSubformSetNode,
- pDataScope, FALSE, bDataMerge, TRUE);
- bFound = TRUE;
+ pDataScope, false, bDataMerge, true);
+ bFound = true;
}
}
}
@@ -975,35 +973,35 @@ CXFA_Node* CopyContainer_Field(CXFA_Document* pDocument,
CXFA_Node* pTemplateNode,
CXFA_Node* pFormNode,
CXFA_Node* pDataScope,
- FX_BOOL bDataMerge,
- FX_BOOL bUpLevel) {
+ bool bDataMerge,
+ bool bUpLevel) {
CXFA_Node* pFieldNode = XFA_NodeMerge_CloneOrMergeContainer(
- pDocument, pFormNode, pTemplateNode, FALSE, nullptr);
+ pDocument, pFormNode, pTemplateNode, false, nullptr);
ASSERT(pFieldNode);
for (CXFA_Node* pTemplateChildNode =
pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChildNode; pTemplateChildNode = pTemplateChildNode->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
- if (NeedGenerateForm(pTemplateChildNode, TRUE)) {
+ if (NeedGenerateForm(pTemplateChildNode, true)) {
XFA_NodeMerge_CloneOrMergeContainer(pDocument, pFieldNode,
- pTemplateChildNode, TRUE, nullptr);
+ pTemplateChildNode, true, nullptr);
} else if (pTemplateNode->GetElementType() == XFA_Element::ExclGroup &&
pTemplateChildNode->IsContainerNode()) {
if (pTemplateChildNode->GetElementType() == XFA_Element::Field) {
CopyContainer_Field(pDocument, pTemplateChildNode, pFieldNode, nullptr,
- FALSE, TRUE);
+ false, true);
}
}
}
if (bDataMerge) {
- FX_BOOL bAccessedDataDOM = FALSE;
- FX_BOOL bSelfMatch = FALSE;
+ bool bAccessedDataDOM = false;
+ bool bSelfMatch = false;
XFA_ATTRIBUTEENUM eBindMatch;
CXFA_Node* pDataNode = FindMatchingDataNode(
- pDocument, pTemplateNode, pDataScope, bAccessedDataDOM, TRUE, nullptr,
+ pDocument, pTemplateNode, pDataScope, bAccessedDataDOM, true, nullptr,
bSelfMatch, eBindMatch, bUpLevel);
if (pDataNode)
- CreateDataBinding(pFieldNode, pDataNode, TRUE);
+ CreateDataBinding(pFieldNode, pDataNode, true);
} else {
FormValueNode_MatchNoneCreateChild(pFieldNode);
}
@@ -1068,9 +1066,9 @@ CXFA_Node* MaybeCreateDataNode(CXFA_Document* pDocument,
void UpdateBindingRelations(CXFA_Document* pDocument,
CXFA_Node* pFormNode,
CXFA_Node* pDataScope,
- FX_BOOL bDataRef,
- FX_BOOL bParentDataRef) {
- FX_BOOL bMatchRef = TRUE;
+ bool bDataRef,
+ bool bParentDataRef) {
+ bool bMatchRef = true;
XFA_Element eType = pFormNode->GetElementType();
CXFA_Node* pDataNode = pFormNode->GetBindData();
if (eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup ||
@@ -1101,7 +1099,7 @@ void UpdateBindingRelations(CXFA_Document* pDocument,
pDocument, pDataScope, eDataNodeType,
CFX_WideString(pFormNode->GetCData(XFA_ATTRIBUTE_Name)));
if (pDataNode)
- CreateDataBinding(pFormNode, pDataNode, FALSE);
+ CreateDataBinding(pFormNode, pDataNode, false);
}
if (!pDataNode)
FormValueNode_MatchNoneCreateChild(pFormNode);
@@ -1133,12 +1131,12 @@ void UpdateBindingRelations(CXFA_Document* pDocument,
pDocument, pRecordNode, eDataNodeType,
CFX_WideString(pFormNode->GetCData(XFA_ATTRIBUTE_Name)));
if (pDataNode) {
- CreateDataBinding(pFormNode, pDataNode, FALSE);
+ CreateDataBinding(pFormNode, pDataNode, false);
RegisterGlobalBinding(pDocument, pFormNode->GetNameHash(),
pDataNode);
}
} else {
- CreateDataBinding(pFormNode, pDataNode, TRUE);
+ CreateDataBinding(pFormNode, pDataNode, true);
}
}
if (!pDataNode)
@@ -1147,7 +1145,7 @@ void UpdateBindingRelations(CXFA_Document* pDocument,
break;
case XFA_ATTRIBUTEENUM_DataRef: {
bMatchRef = bDataRef;
- bParentDataRef = TRUE;
+ bParentDataRef = true;
if (!pDataNode && bDataRef) {
CFX_WideStringC wsRef =
pTemplateNodeBind->GetCData(XFA_ATTRIBUTE_Ref);
@@ -1249,7 +1247,7 @@ CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument,
CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
CXFA_Node* pFormParent,
CXFA_Node* pTemplateNode,
- FX_BOOL bRecursive,
+ bool bRecursive,
CXFA_NodeArray* pSubformArray) {
CXFA_Node* pExistingNode = nullptr;
if (!pSubformArray) {
@@ -1275,7 +1273,7 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
- if (NeedGenerateForm(pTemplateChild, TRUE)) {
+ if (NeedGenerateForm(pTemplateChild, true)) {
XFA_NodeMerge_CloneOrMergeContainer(
pDocument, pExistingNode, pTemplateChild, bRecursive, nullptr);
}
@@ -1285,15 +1283,15 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
return pExistingNode;
}
- CXFA_Node* pNewNode = pTemplateNode->CloneTemplateToForm(FALSE);
+ CXFA_Node* pNewNode = pTemplateNode->CloneTemplateToForm(false);
pFormParent->InsertChild(pNewNode, nullptr);
if (bRecursive) {
for (CXFA_Node* pTemplateChild =
pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
- if (NeedGenerateForm(pTemplateChild, TRUE)) {
- CXFA_Node* pNewChild = pTemplateChild->CloneTemplateToForm(TRUE);
+ if (NeedGenerateForm(pTemplateChild, true)) {
+ CXFA_Node* pNewChild = pTemplateChild->CloneTemplateToForm(true);
pNewNode->InsertChild(pNewChild, nullptr);
}
}
@@ -1316,9 +1314,9 @@ CXFA_Node* XFA_DataMerge_FindDataScope(CXFA_Node* pParentFormNode) {
CXFA_Node* CXFA_Document::DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
CXFA_Node* pFormNode,
CXFA_Node* pDataScope,
- FX_BOOL bOneInstance,
- FX_BOOL bDataMerge,
- FX_BOOL bUpLevel) {
+ bool bOneInstance,
+ bool bDataMerge,
+ bool bUpLevel) {
switch (pTemplateNode->GetElementType()) {
case XFA_Element::SubformSet:
case XFA_Element::Subform:
@@ -1336,7 +1334,7 @@ CXFA_Node* CXFA_Document::DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
case XFA_Element::Variables:
break;
default:
- ASSERT(FALSE);
+ ASSERT(false);
break;
}
return nullptr;
@@ -1349,8 +1347,8 @@ void CXFA_Document::DataMerge_UpdateBindingRelations(
if (!pDataScope)
return;
- UpdateBindingRelations(this, pFormUpdateRoot, pDataScope, FALSE, FALSE);
- UpdateBindingRelations(this, pFormUpdateRoot, pDataScope, TRUE, FALSE);
+ UpdateBindingRelations(this, pFormUpdateRoot, pDataScope, false, false);
+ UpdateBindingRelations(this, pFormUpdateRoot, pDataScope, true, false);
}
CXFA_Node* CXFA_Document::GetNotBindNode(CXFA_ObjArray& arrayNodes) {
@@ -1427,9 +1425,9 @@ void CXFA_Document::DoDataMerge() {
return;
CXFA_Node* pFormRoot = m_pRootNode->GetFirstChildByClass(XFA_Element::Form);
- FX_BOOL bEmptyForm = FALSE;
+ bool bEmptyForm = false;
if (!pFormRoot) {
- bEmptyForm = TRUE;
+ bEmptyForm = true;
pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_Element::Form);
ASSERT(pFormRoot);
pFormRoot->SetCData(XFA_ATTRIBUTE_Name, L"form");
@@ -1444,7 +1442,7 @@ void CXFA_Document::DoDataMerge() {
}
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
- this, pFormRoot, pTemplateChosen, FALSE, nullptr);
+ this, pFormRoot, pTemplateChosen, false, nullptr);
ASSERT(pSubformSetNode);
if (!pDataTopLevel) {
CFX_WideStringC wsFormName = pSubformSetNode->GetCData(XFA_ATTRIBUTE_Name);
@@ -1461,17 +1459,17 @@ void CXFA_Document::DoDataMerge() {
}
ASSERT(pDataTopLevel);
- CreateDataBinding(pSubformSetNode, pDataTopLevel, TRUE);
+ CreateDataBinding(pSubformSetNode, pDataTopLevel, true);
for (CXFA_Node* pTemplateChild =
pTemplateChosen->GetNodeItem(XFA_NODEITEM_FirstChild);
pTemplateChild;
pTemplateChild = pTemplateChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
- if (NeedGenerateForm(pTemplateChild, TRUE)) {
+ if (NeedGenerateForm(pTemplateChild, true)) {
XFA_NodeMerge_CloneOrMergeContainer(this, pSubformSetNode, pTemplateChild,
- TRUE, nullptr);
+ true, nullptr);
} else if (pTemplateChild->IsContainerNode()) {
DataMerge_CopyContainer(pTemplateChild, pSubformSetNode, pDataTopLevel,
- FALSE, TRUE, TRUE);
+ false, true, true);
}
}
if (pDDRoot)
@@ -1513,7 +1511,7 @@ void CXFA_Document::DoDataMerge() {
}
}
-void CXFA_Document::DoDataRemerge(FX_BOOL bDoDataMerge) {
+void CXFA_Document::DoDataRemerge(bool bDoDataMerge) {
CXFA_Node* pFormRoot = ToNode(GetXFAObject(XFA_HASHCODE_Form));
if (pFormRoot) {
while (CXFA_Node* pNode = pFormRoot->GetNodeItem(XFA_NODEITEM_FirstChild))
@@ -1525,5 +1523,5 @@ void CXFA_Document::DoDataRemerge(FX_BOOL bDoDataMerge) {
DoDataMerge();
CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor();
- pLayoutProcessor->SetForceReLayout(TRUE);
+ pLayoutProcessor->SetForceReLayout(true);
}
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.h b/xfa/fxfa/parser/xfa_document_datamerger_imp.h
index f97a7b43b9..f9ea087731 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.h
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.h
@@ -12,7 +12,7 @@
CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
CXFA_Node* pFormParent,
CXFA_Node* pTemplateNode,
- FX_BOOL bRecursive,
+ bool bRecursive,
CXFA_NodeArray* pSubformArray);
CXFA_Node* XFA_DataMerge_FindDataScope(CXFA_Node* pParentFormNode);
CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument,
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index 1f2e1ea089..6926a99309 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -33,7 +33,7 @@ int32_t SeparateStringW(const FX_WCHAR* pStr,
const FX_WCHAR* pToken = pStr;
const FX_WCHAR* pEnd = pStr + iStrLen;
- while (TRUE) {
+ while (true) {
if (pStr >= pEnd || delimiter == *pStr) {
CFX_WideString sub(pToken, pStr - pToken);
pieces.Add(sub);
@@ -50,8 +50,8 @@ int32_t SeparateStringW(const FX_WCHAR* pStr,
CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode,
CXFA_LayoutPageMgr* pPageMgr)
- : m_bKeepBreakFinish(FALSE),
- m_bIsProcessKeep(FALSE),
+ : m_bKeepBreakFinish(false),
+ m_bIsProcessKeep(false),
m_pKeepHeadNode(nullptr),
m_pKeepTailNode(nullptr),
m_pFormNode(pNode),
@@ -62,13 +62,13 @@ CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode,
m_nCurChildNodeStage(XFA_ItemLayoutProcessorStages_None),
m_fUsedSize(0),
m_pPageMgr(pPageMgr),
- m_bBreakPending(TRUE),
+ m_bBreakPending(true),
m_fLastRowWidth(0),
m_fLastRowY(0),
m_fWidthLimite(0),
- m_bUseInheriated(FALSE),
+ m_bUseInheriated(false),
m_ePreProcessRs(XFA_ItemLayoutProcessorResult_Done),
- m_bHasAvailHeight(TRUE) {
+ m_bHasAvailHeight(true) {
ASSERT(m_pFormNode && (m_pFormNode->IsContainerNode() ||
m_pFormNode->GetElementType() == XFA_Element::Form));
m_pOldLayoutItem =
@@ -104,19 +104,19 @@ CXFA_ContentLayoutItem* CXFA_ItemLayoutProcessor::CreateContentLayoutItem(
}
return pLayoutItem;
}
-FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
+bool CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
CXFA_ContentLayoutItem* pLayoutItem,
FX_FLOAT fCurVerticalOffset,
FX_FLOAT& fProposedSplitPos,
- FX_BOOL& bAppChange,
- FX_BOOL bCalculateMargin) {
+ bool& bAppChange,
+ bool bCalculateMargin) {
CXFA_Node* pFormNode = pLayoutItem->m_pFormNode;
if (fProposedSplitPos > fCurVerticalOffset + XFA_LAYOUT_FLOAT_PERCISION &&
fProposedSplitPos <= fCurVerticalOffset + pLayoutItem->m_sSize.y -
XFA_LAYOUT_FLOAT_PERCISION) {
switch (pFormNode->GetIntact()) {
case XFA_ATTRIBUTEENUM_None: {
- FX_BOOL bAnyChanged = FALSE;
+ bool bAnyChanged = false;
CXFA_Document* pDocument = pFormNode->GetDocument();
CXFA_FFNotify* pNotify = pDocument->GetNotify();
FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0;
@@ -128,20 +128,20 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
fCurBottomMargin = pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset)
.ToUnit(XFA_UNIT_Pt);
}
- FX_BOOL bChanged = TRUE;
+ bool bChanged = true;
while (bChanged) {
- bChanged = FALSE;
+ bChanged = false;
{
FX_FLOAT fRelSplitPos = fProposedSplitPos - fCurVerticalOffset;
if (pNotify->FindSplitPos(pFormNode, pLayoutItem->GetIndex(),
fRelSplitPos)) {
- bAnyChanged = TRUE;
- bChanged = TRUE;
+ bAnyChanged = true;
+ bChanged = true;
fProposedSplitPos = fCurVerticalOffset + fRelSplitPos;
- bAppChange = TRUE;
+ bAppChange = true;
if (fProposedSplitPos <=
fCurVerticalOffset + XFA_LAYOUT_FLOAT_PERCISION) {
- return TRUE;
+ return true;
}
}
}
@@ -153,7 +153,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
(CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling) {
FX_FLOAT fChildOffset =
fCurVerticalOffset + fCurTopMargin + pChildItem->m_sPos.y;
- FX_BOOL bChange = FALSE;
+ bool bChange = false;
if (FindLayoutItemSplitPos(pChildItem, fChildOffset, fRelSplitPos,
bChange, bCalculateMargin)) {
if (fRelSplitPos - fChildOffset < XFA_LAYOUT_FLOAT_PERCISION &&
@@ -162,11 +162,11 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
} else {
fProposedSplitPos = fRelSplitPos + fCurBottomMargin;
}
- bAnyChanged = TRUE;
- bChanged = TRUE;
+ bAnyChanged = true;
+ bChanged = true;
if (fProposedSplitPos <=
fCurVerticalOffset + XFA_LAYOUT_FLOAT_PERCISION) {
- return TRUE;
+ return true;
}
if (bAnyChanged) {
break;
@@ -179,32 +179,31 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
case XFA_ATTRIBUTEENUM_ContentArea:
case XFA_ATTRIBUTEENUM_PageArea: {
fProposedSplitPos = fCurVerticalOffset;
- return TRUE;
+ return true;
}
default:
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
-static XFA_ATTRIBUTEENUM XFA_ItemLayoutProcessor_GetLayout(
- CXFA_Node* pFormNode,
- FX_BOOL& bRootForceTb) {
- bRootForceTb = FALSE;
+static XFA_ATTRIBUTEENUM XFA_ItemLayoutProcessor_GetLayout(CXFA_Node* pFormNode,
+ bool& bRootForceTb) {
+ bRootForceTb = false;
XFA_ATTRIBUTEENUM eLayoutMode;
- if (pFormNode->TryEnum(XFA_ATTRIBUTE_Layout, eLayoutMode, FALSE)) {
+ if (pFormNode->TryEnum(XFA_ATTRIBUTE_Layout, eLayoutMode, false)) {
return eLayoutMode;
}
CXFA_Node* pParentNode = pFormNode->GetNodeItem(XFA_NODEITEM_Parent);
if (pParentNode && pParentNode->GetElementType() == XFA_Element::Form) {
- bRootForceTb = TRUE;
+ bRootForceTb = true;
return XFA_ATTRIBUTEENUM_Tb;
}
return XFA_ATTRIBUTEENUM_Position;
}
-static FX_BOOL XFA_ExistContainerKeep(CXFA_Node* pCurNode, FX_BOOL bPreFind) {
+static bool XFA_ExistContainerKeep(CXFA_Node* pCurNode, bool bPreFind) {
if (!pCurNode || !XFA_ItemLayoutProcessor_IsTakingSpace(pCurNode)) {
- return FALSE;
+ return false;
}
XFA_NODEITEM eItemType = XFA_NODEITEM_PrevSibling;
if (!bPreFind) {
@@ -213,7 +212,7 @@ static FX_BOOL XFA_ExistContainerKeep(CXFA_Node* pCurNode, FX_BOOL bPreFind) {
CXFA_Node* pPreContainer =
pCurNode->GetNodeItem(eItemType, XFA_ObjectType::ContainerNode);
if (!pPreContainer) {
- return FALSE;
+ return false;
}
CXFA_Node* pKeep = pCurNode->GetFirstChildByClass(XFA_Element::Keep);
if (pKeep) {
@@ -222,40 +221,40 @@ static FX_BOOL XFA_ExistContainerKeep(CXFA_Node* pCurNode, FX_BOOL bPreFind) {
if (!bPreFind) {
eKeepType = XFA_ATTRIBUTE_Next;
}
- if (pKeep->TryEnum(eKeepType, ePrevious, FALSE)) {
+ if (pKeep->TryEnum(eKeepType, ePrevious, false)) {
if (ePrevious == XFA_ATTRIBUTEENUM_ContentArea ||
ePrevious == XFA_ATTRIBUTEENUM_PageArea) {
- return TRUE;
+ return true;
}
}
}
pKeep = pPreContainer->GetFirstChildByClass(XFA_Element::Keep);
if (!pKeep) {
- return FALSE;
+ return false;
}
XFA_ATTRIBUTEENUM eNext;
XFA_ATTRIBUTE eKeepType = XFA_ATTRIBUTE_Next;
if (!bPreFind) {
eKeepType = XFA_ATTRIBUTE_Previous;
}
- if (!pKeep->TryEnum(eKeepType, eNext, FALSE)) {
- return FALSE;
+ if (!pKeep->TryEnum(eKeepType, eNext, false)) {
+ return false;
}
if (eNext == XFA_ATTRIBUTEENUM_ContentArea ||
eNext == XFA_ATTRIBUTEENUM_PageArea) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
FX_FLOAT CXFA_ItemLayoutProcessor::FindSplitPos(FX_FLOAT fProposedSplitPos) {
ASSERT(m_pLayoutItem);
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
- FX_BOOL bCalculateMargin = TRUE;
+ bool bCalculateMargin = true;
if (eLayout == XFA_ATTRIBUTEENUM_Position) {
- bCalculateMargin = FALSE;
+ bCalculateMargin = false;
}
while (fProposedSplitPos > XFA_LAYOUT_FLOAT_PERCISION) {
- FX_BOOL bAppChange = FALSE;
+ bool bAppChange = false;
if (!FindLayoutItemSplitPos(m_pLayoutItem, 0, fProposedSplitPos, bAppChange,
bCalculateMargin)) {
break;
@@ -269,9 +268,9 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
FX_FLOAT fSplitPos) {
FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0;
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
- FX_BOOL bCalculateMargin = TRUE;
+ bool bCalculateMargin = true;
if (eLayout == XFA_ATTRIBUTEENUM_Position) {
- bCalculateMargin = FALSE;
+ bCalculateMargin = false;
}
CXFA_Node* pMarginNode =
pLayoutItem->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin);
@@ -325,7 +324,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
pChildItem->m_pNextSibling = nullptr;
if (fSplitPos <= fCurTopMargin + pChildItem->m_sPos.y + fCurBottomMargin +
XFA_LAYOUT_FLOAT_PERCISION) {
- if (!XFA_ExistContainerKeep(pChildItem->m_pFormNode, TRUE)) {
+ if (!XFA_ExistContainerKeep(pChildItem->m_pFormNode, true)) {
pChildItem->m_sPos.y -= fSplitPos - fCurBottomMargin;
pChildItem->m_sPos.y += lHeightForKeep;
pChildItem->m_sPos.y += fAddMarginHeight;
@@ -360,7 +359,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
fCurTopMargin + fCurBottomMargin + pChildItem->m_sPos.y +
pChildItem->m_sSize.y) {
pLayoutItem->AddChild(pChildItem);
- if (XFA_ExistContainerKeep(pChildItem->m_pFormNode, FALSE)) {
+ if (XFA_ExistContainerKeep(pChildItem->m_pFormNode, false)) {
keepLayoutItems.Add(pChildItem);
} else {
keepLayoutItems.RemoveAll();
@@ -393,7 +392,7 @@ CXFA_Node* CXFA_LayoutItem::GetFormNode() const {
return m_pFormNode;
}
-void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative) const {
+void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, bool bRelative) const {
ASSERT(m_bIsContentLayoutItem);
const CXFA_ContentLayoutItem* pThis =
static_cast<const CXFA_ContentLayoutItem*>(this);
@@ -596,12 +595,12 @@ CXFA_ContentLayoutItem* CXFA_ItemLayoutProcessor::ExtractLayoutItem() {
m_pOldLayoutItem = nullptr;
return pLayoutItem;
}
-static FX_BOOL XFA_ItemLayoutProcessor_FindBreakNode(
+static bool XFA_ItemLayoutProcessor_FindBreakNode(
CXFA_Node* pContainerNode,
CXFA_Node*& pCurActionNode,
XFA_ItemLayoutProcessorStages& nCurStage,
- FX_BOOL bBreakBefore) {
- FX_BOOL bFindRs = FALSE;
+ bool bBreakBefore) {
+ bool bFindRs = false;
for (CXFA_Node* pBreakNode = pContainerNode; pBreakNode;
pBreakNode = pBreakNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
XFA_ATTRIBUTE eAttributeType = XFA_ATTRIBUTE_Before;
@@ -613,14 +612,14 @@ static FX_BOOL XFA_ItemLayoutProcessor_FindBreakNode(
if (bBreakBefore) {
pCurActionNode = pBreakNode;
nCurStage = XFA_ItemLayoutProcessorStages_BreakBefore;
- bFindRs = TRUE;
+ bFindRs = true;
}
} break;
case XFA_Element::BreakAfter: {
if (!bBreakBefore) {
pCurActionNode = pBreakNode;
nCurStage = XFA_ItemLayoutProcessorStages_BreakAfter;
- bFindRs = TRUE;
+ bFindRs = true;
}
} break;
case XFA_Element::Break:
@@ -630,7 +629,7 @@ static FX_BOOL XFA_ItemLayoutProcessor_FindBreakNode(
if (!bBreakBefore) {
nCurStage = XFA_ItemLayoutProcessorStages_BreakAfter;
}
- bFindRs = TRUE;
+ bFindRs = true;
break;
}
default:
@@ -666,7 +665,7 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
CXFA_Node*& pCurActionNode,
XFA_ItemLayoutProcessorStages& nCurStage,
CXFA_Node* pParentContainer,
- FX_BOOL bUsePageBreak) {
+ bool bUsePageBreak) {
CXFA_Node* pEntireContainer = pParentContainer;
CXFA_Node* pChildContainer = XFA_LAYOUT_INVALIDNODE;
switch (nCurStage) {
@@ -688,7 +687,7 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
pChildContainer->GetNodeItem(XFA_NODEITEM_FirstChild);
if (!m_bKeepBreakFinish &&
XFA_ItemLayoutProcessor_FindBreakNode(pBreakAfterNode, pCurActionNode,
- nCurStage, FALSE)) {
+ nCurStage, false)) {
return;
}
goto CheckNextChildContainer;
@@ -721,7 +720,7 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
pCurActionNode->GetNodeItem(XFA_NODEITEM_NextSibling);
if (!m_bKeepBreakFinish &&
XFA_ItemLayoutProcessor_FindBreakNode(
- pBreakBeforeNode, pCurActionNode, nCurStage, TRUE)) {
+ pBreakBeforeNode, pCurActionNode, nCurStage, true)) {
return;
}
if (m_bIsProcessKeep) {
@@ -745,14 +744,14 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
pChildContainer->GetNodeItem(XFA_NODEITEM_FirstChild);
if (!m_bKeepBreakFinish &&
XFA_ItemLayoutProcessor_FindBreakNode(
- pBreakAfterNode, pCurActionNode, nCurStage, FALSE)) {
+ pBreakAfterNode, pCurActionNode, nCurStage, false)) {
return;
}
} else {
CXFA_Node* pBreakAfterNode =
pCurActionNode->GetNodeItem(XFA_NODEITEM_NextSibling);
if (XFA_ItemLayoutProcessor_FindBreakNode(
- pBreakAfterNode, pCurActionNode, nCurStage, FALSE)) {
+ pBreakAfterNode, pCurActionNode, nCurStage, false)) {
return;
}
}
@@ -777,7 +776,7 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
if (!pNextChildContainer) {
goto NoMoreChildContainer;
}
- FX_BOOL bLastKeep = FALSE;
+ bool bLastKeep = false;
if (ProcessKeepNodesForCheckNext(pCurActionNode, nCurStage,
pNextChildContainer, bLastKeep)) {
return;
@@ -785,7 +784,7 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
if (!m_bKeepBreakFinish && !bLastKeep &&
XFA_ItemLayoutProcessor_FindBreakNode(
pNextChildContainer->GetNodeItem(XFA_NODEITEM_FirstChild),
- pCurActionNode, nCurStage, TRUE)) {
+ pCurActionNode, nCurStage, true)) {
return;
}
pCurActionNode = pNextChildContainer;
@@ -821,20 +820,20 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode(
nCurStage = XFA_ItemLayoutProcessorStages_Done;
}
}
-FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepNodesForCheckNext(
+bool CXFA_ItemLayoutProcessor::ProcessKeepNodesForCheckNext(
CXFA_Node*& pCurActionNode,
XFA_ItemLayoutProcessorStages& nCurStage,
CXFA_Node*& pNextContainer,
- FX_BOOL& bLastKeepNode) {
+ bool& bLastKeepNode) {
const bool bCanSplit = pNextContainer->GetIntact() == XFA_ATTRIBUTEENUM_None;
- FX_BOOL bNextKeep = FALSE;
- if (XFA_ExistContainerKeep(pNextContainer, FALSE)) {
- bNextKeep = TRUE;
+ bool bNextKeep = false;
+ if (XFA_ExistContainerKeep(pNextContainer, false)) {
+ bNextKeep = true;
}
if (bNextKeep && !bCanSplit) {
if (!m_bIsProcessKeep && !m_bKeepBreakFinish) {
m_pKeepHeadNode = pNextContainer;
- m_bIsProcessKeep = TRUE;
+ m_bIsProcessKeep = true;
}
} else {
if (m_bIsProcessKeep && m_pKeepHeadNode) {
@@ -842,46 +841,46 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepNodesForCheckNext(
if (!m_bKeepBreakFinish &&
XFA_ItemLayoutProcessor_FindBreakNode(
pNextContainer->GetNodeItem(XFA_NODEITEM_FirstChild),
- pCurActionNode, nCurStage, TRUE)) {
- return TRUE;
+ pCurActionNode, nCurStage, true)) {
+ return true;
} else {
pNextContainer = m_pKeepHeadNode;
- m_bKeepBreakFinish = TRUE;
+ m_bKeepBreakFinish = true;
m_pKeepHeadNode = nullptr;
m_pKeepTailNode = nullptr;
- m_bIsProcessKeep = FALSE;
+ m_bIsProcessKeep = false;
}
} else {
if (m_bKeepBreakFinish) {
- bLastKeepNode = TRUE;
+ bLastKeepNode = true;
}
- m_bKeepBreakFinish = FALSE;
+ m_bKeepBreakFinish = false;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepNodesForBreakBefore(
+bool CXFA_ItemLayoutProcessor::ProcessKeepNodesForBreakBefore(
CXFA_Node*& pCurActionNode,
XFA_ItemLayoutProcessorStages& nCurStage,
CXFA_Node* pContainerNode) {
if (m_pKeepTailNode == pContainerNode) {
pCurActionNode = m_pKeepHeadNode;
- m_bKeepBreakFinish = TRUE;
+ m_bKeepBreakFinish = true;
m_pKeepHeadNode = nullptr;
m_pKeepTailNode = nullptr;
- m_bIsProcessKeep = FALSE;
+ m_bIsProcessKeep = false;
nCurStage = XFA_ItemLayoutProcessorStages_Container;
- return TRUE;
+ return true;
}
CXFA_Node* pBreakAfterNode =
pContainerNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (XFA_ItemLayoutProcessor_FindBreakNode(pBreakAfterNode, pCurActionNode,
- nCurStage, FALSE)) {
- return TRUE;
+ nCurStage, false)) {
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode) {
+bool XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode) {
XFA_ATTRIBUTEENUM ePresence = pNode->GetEnum(XFA_ATTRIBUTE_Presence);
return ePresence == XFA_ATTRIBUTEENUM_Visible ||
ePresence == XFA_ATTRIBUTEENUM_Invisible;
@@ -890,48 +889,48 @@ static inline void XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize(
CXFA_Node* pFormNode,
FX_FLOAT& fContainerWidth,
FX_FLOAT& fContainerHeight,
- FX_BOOL& bContainerWidthAutoSize,
- FX_BOOL& bContainerHeightAutoSize) {
+ bool& bContainerWidthAutoSize,
+ bool& bContainerHeightAutoSize) {
fContainerWidth = 0;
fContainerHeight = 0;
- bContainerWidthAutoSize = TRUE;
- bContainerHeightAutoSize = TRUE;
+ bContainerWidthAutoSize = true;
+ bContainerHeightAutoSize = true;
XFA_Element eType = pFormNode->GetElementType();
CXFA_Measurement mTmpValue;
if (bContainerWidthAutoSize &&
(eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup) &&
- pFormNode->TryMeasure(XFA_ATTRIBUTE_W, mTmpValue, FALSE) &&
+ pFormNode->TryMeasure(XFA_ATTRIBUTE_W, mTmpValue, false) &&
mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt);
- bContainerWidthAutoSize = FALSE;
+ bContainerWidthAutoSize = false;
}
if (bContainerHeightAutoSize &&
(eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup) &&
- pFormNode->TryMeasure(XFA_ATTRIBUTE_H, mTmpValue, FALSE) &&
+ pFormNode->TryMeasure(XFA_ATTRIBUTE_H, mTmpValue, false) &&
mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt);
- bContainerHeightAutoSize = FALSE;
+ bContainerHeightAutoSize = false;
}
if (bContainerWidthAutoSize && eType == XFA_Element::Subform &&
- pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxW, mTmpValue, FALSE) &&
+ pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxW, mTmpValue, false) &&
mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt);
- bContainerWidthAutoSize = FALSE;
+ bContainerWidthAutoSize = false;
}
if (bContainerHeightAutoSize && eType == XFA_Element::Subform &&
- pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxH, mTmpValue, FALSE) &&
+ pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxH, mTmpValue, false) &&
mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt);
- bContainerHeightAutoSize = FALSE;
+ bContainerHeightAutoSize = false;
}
}
static inline void
XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize(
CXFA_Node* pFormNode,
- FX_BOOL bContainerWidthAutoSize,
+ bool bContainerWidthAutoSize,
FX_FLOAT fContentCalculatedWidth,
FX_FLOAT& fContainerWidth,
- FX_BOOL bContainerHeightAutoSize,
+ bool bContainerHeightAutoSize,
FX_FLOAT fContentCalculatedHeight,
FX_FLOAT& fContainerHeight) {
CXFA_Node* pMarginNode = pFormNode->GetFirstChildByClass(XFA_Element::Margin);
@@ -939,10 +938,10 @@ XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize(
if (bContainerWidthAutoSize) {
fContainerWidth = fContentCalculatedWidth;
if (pMarginNode) {
- if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_LeftInset, mTmpValue, FALSE)) {
+ if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_LeftInset, mTmpValue, false)) {
fContainerWidth += mTmpValue.ToUnit(XFA_UNIT_Pt);
}
- if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_RightInset, mTmpValue, FALSE)) {
+ if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_RightInset, mTmpValue, false)) {
fContainerWidth += mTmpValue.ToUnit(XFA_UNIT_Pt);
}
}
@@ -950,11 +949,11 @@ XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize(
if (bContainerHeightAutoSize) {
fContainerHeight = fContentCalculatedHeight;
if (pMarginNode) {
- if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_TopInset, mTmpValue, FALSE)) {
+ if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_TopInset, mTmpValue, false)) {
fContainerHeight += mTmpValue.ToUnit(XFA_UNIT_Pt);
}
if (pMarginNode->TryMeasure(XFA_ATTRIBUTE_BottomInset, mTmpValue,
- FALSE)) {
+ false)) {
fContainerHeight += mTmpValue.ToUnit(XFA_UNIT_Pt);
}
}
@@ -1033,11 +1032,11 @@ void CXFA_ItemLayoutProcessor::CalculatePositionedContainerPos(
break;
}
}
-FX_BOOL CXFA_ItemLayoutProcessor::IncrementRelayoutNode(
+bool CXFA_ItemLayoutProcessor::IncrementRelayoutNode(
CXFA_LayoutProcessor* pLayoutProcessor,
CXFA_Node* pNode,
CXFA_Node* pParentNode) {
- return FALSE;
+ return false;
}
void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
CXFA_ContainerLayoutItem* pPageAreaLayoutItem) {
@@ -1047,9 +1046,9 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
XFA_ItemLayoutProcessorStages_None;
CXFA_LayoutItem* pBeforeItem = nullptr;
for (XFA_ItemLayoutProcessor_GotoNextContainerNode(
- pCurChildNode, nCurChildNodeStage, pFormNode, FALSE);
+ pCurChildNode, nCurChildNodeStage, pFormNode, false);
pCurChildNode; XFA_ItemLayoutProcessor_GotoNextContainerNode(
- pCurChildNode, nCurChildNodeStage, pFormNode, FALSE)) {
+ pCurChildNode, nCurChildNodeStage, pFormNode, false)) {
if (nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) {
continue;
}
@@ -1058,7 +1057,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
}
CXFA_ItemLayoutProcessor* pProcessor =
new CXFA_ItemLayoutProcessor(pCurChildNode, nullptr);
- pProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX);
+ pProcessor->DoLayout(false, XFA_LAYOUT_FLOAT_MAX);
if (!pProcessor->HasLayoutItem()) {
delete pProcessor;
continue;
@@ -1105,10 +1104,10 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
return;
m_pLayoutItem = CreateContentLayoutItem(m_pFormNode);
- FX_BOOL bIgnoreXY = (m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout) !=
- XFA_ATTRIBUTEENUM_Position);
+ bool bIgnoreXY = (m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout) !=
+ XFA_ATTRIBUTEENUM_Position);
FX_FLOAT fContainerWidth = 0, fContainerHeight = 0;
- FX_BOOL bContainerWidthAutoSize = TRUE, bContainerHeightAutoSize = TRUE;
+ bool bContainerWidthAutoSize = true, bContainerHeightAutoSize = true;
XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize(
m_pFormNode, fContainerWidth, fContainerHeight, bContainerWidthAutoSize,
bContainerHeightAutoSize);
@@ -1117,11 +1116,11 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
fHiddenContentCalculatedHeight = 0;
if (m_pCurChildNode == XFA_LAYOUT_INVALIDNODE) {
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE);
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, false);
}
int32_t iColIndex = 0;
for (; m_pCurChildNode; XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE)) {
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, false)) {
if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) {
continue;
}
@@ -1135,7 +1134,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
if (iColSpan <=
pContext->m_prgSpecifiedColumnWidths->GetSize() - iColIndex) {
pContext->m_fCurColumnWidth = 0;
- pContext->m_bCurColumnWidthAvaiable = TRUE;
+ pContext->m_bCurColumnWidthAvaiable = true;
if (iColSpan == -1)
iColSpan = pContext->m_prgSpecifiedColumnWidths->GetSize();
for (int32_t i = 0; iColIndex + i < iColSpan; ++i) {
@@ -1143,11 +1142,11 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
pContext->m_prgSpecifiedColumnWidths->GetAt(iColIndex + i);
}
if (pContext->m_fCurColumnWidth == 0)
- pContext->m_bCurColumnWidthAvaiable = FALSE;
+ pContext->m_bCurColumnWidthAvaiable = false;
iColIndex += iColSpan >= 0 ? iColSpan : 0;
}
}
- pProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX,
+ pProcessor->DoLayout(false, XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX,
pContext);
if (!pProcessor->HasLayoutItem()) {
delete pProcessor;
@@ -1155,9 +1154,9 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
}
FX_FLOAT fWidth, fHeight;
pProcessor->GetCurrentComponentSize(fWidth, fHeight);
- FX_BOOL bChangeParentSize = FALSE;
+ bool bChangeParentSize = false;
if (XFA_ItemLayoutProcessor_IsTakingSpace(m_pCurChildNode)) {
- bChangeParentSize = TRUE;
+ bChangeParentSize = true;
}
FX_FLOAT fAbsoluteX = 0, fAbsoluteY = 0;
if (!bIgnoreXY) {
@@ -1233,7 +1232,7 @@ static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize(
break;
}
default:
- ASSERT(FALSE);
+ ASSERT(false);
}
}
static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
@@ -1241,7 +1240,7 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
const CFX_ArrayTemplate<FX_FLOAT>& rgSpecifiedColumnWidths,
XFA_ATTRIBUTEENUM eLayout) {
FX_FLOAT fContainerWidth = 0, fContainerHeight = 0;
- FX_BOOL bContainerWidthAutoSize = TRUE, bContainerHeightAutoSize = TRUE;
+ bool bContainerWidthAutoSize = true, bContainerHeightAutoSize = true;
XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize(
pLayoutRow->m_pFormNode, fContainerWidth, fContainerHeight,
bContainerWidthAutoSize, bContainerHeightAutoSize);
@@ -1266,7 +1265,7 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
FX_FLOAT fContentCalculatedWidth = 0, fContentCalculatedHeight = 0;
FX_FLOAT fCurrentColX = 0;
int32_t nCurrentColIdx = 0;
- FX_BOOL bMetWholeRowCell = FALSE;
+ bool bMetWholeRowCell = false;
for (CXFA_ContentLayoutItem* pLayoutChild =
(CXFA_ContentLayoutItem*)pLayoutRow->m_pFirstChild;
pLayoutChild;
@@ -1287,7 +1286,7 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
pLayoutChild->m_sSize.y);
}
if (nOriginalColSpan == -1) {
- bMetWholeRowCell = TRUE;
+ bMetWholeRowCell = true;
}
pLayoutChild->m_sPos = CFX_PointF(fCurrentColX, 0);
pLayoutChild->m_sSize.x = fColSpanWidth;
@@ -1382,7 +1381,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
ASSERT(m_pCurChildNode == XFA_LAYOUT_INVALIDNODE);
m_pLayoutItem = CreateContentLayoutItem(m_pFormNode);
FX_FLOAT fContainerWidth = 0, fContainerHeight = 0;
- FX_BOOL bContainerWidthAutoSize = TRUE, bContainerHeightAutoSize = TRUE;
+ bool bContainerWidthAutoSize = true, bContainerHeightAutoSize = true;
XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize(
m_pFormNode, fContainerWidth, fContainerHeight, bContainerWidthAutoSize,
bContainerHeightAutoSize);
@@ -1424,18 +1423,18 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
iSpecifiedColumnCount > 0 ? &layoutContext : nullptr;
if (m_pCurChildNode == XFA_LAYOUT_INVALIDNODE) {
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE);
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, false);
}
for (; m_pCurChildNode; XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, FALSE)) {
- layoutContext.m_bCurColumnWidthAvaiable = FALSE;
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, false)) {
+ layoutContext.m_bCurColumnWidthAvaiable = false;
layoutContext.m_fCurColumnWidth = 0;
if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) {
continue;
}
CXFA_ItemLayoutProcessor* pProcessor =
new CXFA_ItemLayoutProcessor(m_pCurChildNode, m_pPageMgr);
- pProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX,
+ pProcessor->DoLayout(false, XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX,
pLayoutContext);
if (!pProcessor->HasLayoutItem()) {
delete pProcessor;
@@ -1476,10 +1475,10 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
iRowCount = rgRowItems.GetSize();
iColCount = 0;
- FX_BOOL bMoreColumns = TRUE;
+ bool bMoreColumns = true;
while (bMoreColumns) {
- bMoreColumns = FALSE;
- FX_BOOL bAutoCol = FALSE;
+ bMoreColumns = false;
+ bool bAutoCol = false;
for (int32_t i = 0; i < iRowCount; i++) {
while (rgRowItems[i] && (rgRowItemsSpan[i] <= 0 ||
!XFA_ItemLayoutProcessor_IsTakingSpace(
@@ -1501,7 +1500,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
if (!pCell) {
continue;
}
- bMoreColumns = TRUE;
+ bMoreColumns = true;
if (rgRowItemsSpan[i] == 1) {
if (iColCount >= iSpecifiedColumnCount) {
for (int32_t j = 0, c = iColCount + 1 -
@@ -1512,7 +1511,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
if (m_rgSpecifiedColumnWidths[iColCount] <
XFA_LAYOUT_FLOAT_PERCISION) {
- bAutoCol = TRUE;
+ bAutoCol = true;
}
if (bAutoCol &&
m_rgSpecifiedColumnWidths[iColCount] < rgRowItemsWidth[i]) {
@@ -1621,23 +1620,23 @@ static void XFA_ItemLayoutProcessor_UpdatePendedItemLayout(
break;
}
}
-FX_BOOL CXFA_ItemLayoutProcessor::IsAddNewRowForTrailer(
+bool CXFA_ItemLayoutProcessor::IsAddNewRowForTrailer(
CXFA_ContentLayoutItem* pTrailerItem) {
if (!pTrailerItem) {
- return FALSE;
+ return false;
}
FX_FLOAT fWidth = pTrailerItem->m_sSize.x;
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
if (eLayout != XFA_ATTRIBUTEENUM_Tb && m_fWidthLimite > fWidth) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static void XFA_ItemLayoutProcessor_AddTrailerBeforeSplit(
CXFA_ItemLayoutProcessor* pProcessor,
FX_FLOAT fSplitPos,
CXFA_ContentLayoutItem* pTrailerLayoutItem,
- FX_BOOL bUseInherited = FALSE) {
+ bool bUseInherited = false) {
if (!pTrailerLayoutItem) {
return;
}
@@ -1748,7 +1747,7 @@ static void XFA_ItemLayoutProcessor_AddLeaderAfterSplit(
static void XFA_ItemLayoutProcessor_AddPendingNode(
CXFA_ItemLayoutProcessor* pProcessor,
CXFA_Node* pPendingNode,
- FX_BOOL bBreakPending) {
+ bool bBreakPending) {
pProcessor->m_PendingNodes.push_back(pPendingNode);
pProcessor->m_bBreakPending = bBreakPending;
}
@@ -1769,7 +1768,7 @@ static FX_FLOAT XFA_ItemLayoutProcessor_InsertPendingItems(
new CXFA_ItemLayoutProcessor(pProcessor->m_PendingNodes.front(),
nullptr));
pProcessor->m_PendingNodes.pop_front();
- pPendingProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX);
+ pPendingProcessor->DoLayout(false, XFA_LAYOUT_FLOAT_MAX);
CXFA_ContentLayoutItem* pPendingLayoutItem =
pPendingProcessor->HasLayoutItem()
? pPendingProcessor->ExtractLayoutItem()
@@ -1801,7 +1800,7 @@ FX_FLOAT CXFA_ItemLayoutProcessor::InsertKeepLayoutItems() {
}
return fTotalHeight;
}
-FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
+bool CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
CXFA_ItemLayoutProcessor* pParentProcessor,
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
@@ -1809,16 +1808,16 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight,
FX_FLOAT& fContentCurRowY,
- FX_BOOL& bAddedItemInRow,
- FX_BOOL& bForceEndPage,
+ bool& bAddedItemInRow,
+ bool& bForceEndPage,
XFA_ItemLayoutProcessorResult& result) {
if (!pParentProcessor || !pChildProcessor) {
- return FALSE;
+ return false;
}
if (pParentProcessor->m_pCurChildNode->GetIntact() !=
XFA_ATTRIBUTEENUM_None ||
!pChildProcessor->m_bHasAvailHeight) {
- if (XFA_ExistContainerKeep(pParentProcessor->m_pCurChildNode, TRUE)) {
+ if (XFA_ExistContainerKeep(pParentProcessor->m_pCurChildNode, true)) {
FX_FLOAT fChildWidth, fChildHeight;
pChildProcessor->GetCurrentComponentSize(fChildWidth, fChildHeight);
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> keepLayoutItems;
@@ -1831,29 +1830,29 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
fContentCurRowY -= pItem->m_sSize.y;
m_arrayKeepItems.Add(pItem);
}
- bAddedItemInRow = TRUE;
- bForceEndPage = TRUE;
+ bAddedItemInRow = true;
+ bForceEndPage = true;
result = XFA_ItemLayoutProcessorResult_PageFullBreak;
- return TRUE;
+ return true;
}
rgCurLineLayoutItem.Add(pChildProcessor->ExtractLayoutItem());
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
fContentCurRowHeight = fChildHeight;
}
result = eRetValue;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CXFA_ItemLayoutProcessor::JudgePutNextPage(
+bool CXFA_ItemLayoutProcessor::JudgePutNextPage(
CXFA_ContentLayoutItem* pParentLayoutItem,
FX_FLOAT fChildHeight,
CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems) {
if (!pParentLayoutItem) {
- return FALSE;
+ return false;
}
FX_FLOAT fItemsHeight = 0;
for (CXFA_ContentLayoutItem* pChildLayoutItem =
@@ -1861,7 +1860,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgePutNextPage(
pChildLayoutItem;
pChildLayoutItem =
(CXFA_ContentLayoutItem*)pChildLayoutItem->m_pNextSibling) {
- if (XFA_ExistContainerKeep(pChildLayoutItem->m_pFormNode, FALSE)) {
+ if (XFA_ExistContainerKeep(pChildLayoutItem->m_pFormNode, false)) {
pKeepItems.Add(pChildLayoutItem);
fItemsHeight += pChildLayoutItem->m_sSize.y;
} else {
@@ -1871,9 +1870,9 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgePutNextPage(
}
fItemsHeight += fChildHeight;
if (m_pPageMgr->GetNextAvailContentHeight(fItemsHeight)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void CXFA_ItemLayoutProcessor::ProcessUnUseBinds(CXFA_Node* pFormNode) {
if (!pFormNode) {
@@ -1920,24 +1919,24 @@ void CXFA_ItemLayoutProcessor::ProcessUnUseOverFlow(
static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
CXFA_ItemLayoutProcessor* pThis,
CXFA_ItemLayoutProcessor* pProcessor,
- FX_BOOL bContainerWidthAutoSize,
- FX_BOOL bContainerHeightAutoSize,
+ bool bContainerWidthAutoSize,
+ bool bContainerHeightAutoSize,
FX_FLOAT fContainerHeight,
XFA_ATTRIBUTEENUM eFlowStrategy,
uint8_t& uCurHAlignState,
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3],
- FX_BOOL bUseBreakControl,
+ bool bUseBreakControl,
FX_FLOAT fAvailHeight,
FX_FLOAT fRealHeight,
FX_FLOAT& fContentCurRowY,
FX_FLOAT& fContentWidthLimit,
FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight,
- FX_BOOL& bAddedItemInRow,
- FX_BOOL& bForceEndPage,
+ bool& bAddedItemInRow,
+ bool& bForceEndPage,
CXFA_LayoutContext* pLayoutContext = nullptr,
- FX_BOOL bNewRow = FALSE) {
- FX_BOOL bTakeSpace =
+ bool bNewRow = false) {
+ bool bTakeSpace =
XFA_ItemLayoutProcessor_IsTakingSpace(pProcessor->m_pFormNode);
uint8_t uHAlign = XFA_ItemLayoutProcessor_HAlignEnumToInt(
pThis->m_pCurChildNode->GetEnum(XFA_ATTRIBUTE_HAlign));
@@ -1949,23 +1948,23 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
return XFA_ItemLayoutProcessorResult_RowFullBreak;
}
uCurHAlignState = uHAlign;
- FX_BOOL bIsOwnSplite =
+ bool bIsOwnSplite =
pProcessor->m_pFormNode->GetIntact() == XFA_ATTRIBUTEENUM_None;
- FX_BOOL bUseRealHeight =
+ bool bUseRealHeight =
bTakeSpace && bContainerHeightAutoSize && bIsOwnSplite &&
pProcessor->m_pFormNode->GetNodeItem(XFA_NODEITEM_Parent)->GetIntact() ==
XFA_ATTRIBUTEENUM_None;
- FX_BOOL bIsTransHeight = bTakeSpace;
+ bool bIsTransHeight = bTakeSpace;
if (bIsTransHeight && !bIsOwnSplite) {
- FX_BOOL bRootForceTb = FALSE;
+ bool bRootForceTb = false;
XFA_ATTRIBUTEENUM eLayoutStrategy = XFA_ItemLayoutProcessor_GetLayout(
pProcessor->m_pFormNode, bRootForceTb);
if (eLayoutStrategy == XFA_ATTRIBUTEENUM_Lr_tb ||
eLayoutStrategy == XFA_ATTRIBUTEENUM_Rl_tb) {
- bIsTransHeight = FALSE;
+ bIsTransHeight = false;
}
}
- FX_BOOL bUseInherited = FALSE;
+ bool bUseInherited = false;
CXFA_LayoutContext layoutContext;
if (pThis->m_pPageMgr) {
CXFA_Node* pOverflowNode =
@@ -1980,7 +1979,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
if (!bNewRow ||
pProcessor->m_ePreProcessRs == XFA_ItemLayoutProcessorResult_Done) {
eRetValue = pProcessor->DoLayout(
- bTakeSpace ? bUseBreakControl : FALSE,
+ bTakeSpace ? bUseBreakControl : false,
bUseRealHeight ? fRealHeight - fContentCurRowY : XFA_LAYOUT_FLOAT_MAX,
bIsTransHeight ? fRealHeight - fContentCurRowY : XFA_LAYOUT_FLOAT_MAX,
pLayoutContext);
@@ -1989,7 +1988,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
eRetValue = pProcessor->m_ePreProcessRs;
pProcessor->m_ePreProcessRs = XFA_ItemLayoutProcessorResult_Done;
}
- if (pProcessor->HasLayoutItem() == FALSE) {
+ if (pProcessor->HasLayoutItem() == false) {
return eRetValue;
}
FX_FLOAT fChildWidth, fChildHeight;
@@ -2006,23 +2005,23 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
CXFA_Node* pOverflowTrailerNode = nullptr;
CXFA_Node* pFormNode = nullptr;
CXFA_ContentLayoutItem* pTrailerLayoutItem = nullptr;
- FX_BOOL bIsAddTrailerHeight = FALSE;
+ bool bIsAddTrailerHeight = false;
if (pThis->m_pPageMgr &&
pProcessor->m_pFormNode->GetIntact() == XFA_ATTRIBUTEENUM_None) {
pFormNode = pThis->m_pPageMgr->QueryOverflow(pProcessor->m_pFormNode);
if (!pFormNode && pLayoutContext &&
pLayoutContext->m_pOverflowProcessor) {
pFormNode = pLayoutContext->m_pOverflowNode;
- bUseInherited = TRUE;
+ bUseInherited = true;
}
if (pThis->m_pPageMgr->ProcessOverflow(pFormNode, pOverflowLeaderNode,
- pOverflowTrailerNode, FALSE,
- FALSE)) {
+ pOverflowTrailerNode, false,
+ false)) {
if (pProcessor->JudgeLeaderOrTrailerForOccur(pOverflowTrailerNode)) {
if (pOverflowTrailerNode) {
CXFA_ItemLayoutProcessor* pOverflowLeaderProcessor =
new CXFA_ItemLayoutProcessor(pOverflowTrailerNode, nullptr);
- pOverflowLeaderProcessor->DoLayout(FALSE, XFA_LAYOUT_FLOAT_MAX);
+ pOverflowLeaderProcessor->DoLayout(false, XFA_LAYOUT_FLOAT_MAX);
pTrailerLayoutItem =
pOverflowLeaderProcessor->HasLayoutItem()
? pOverflowLeaderProcessor->ExtractLayoutItem()
@@ -2039,7 +2038,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
if (bIsAddTrailerHeight) {
FX_FLOAT fTrailerHeight = pTrailerLayoutItem->m_sSize.y;
fChildHeight += fTrailerHeight;
- bIsAddTrailerHeight = TRUE;
+ bIsAddTrailerHeight = true;
}
}
}
@@ -2058,9 +2057,9 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
if (pProcessor->JudgeLeaderOrTrailerForOccur(pOverflowLeaderNode)) {
XFA_ItemLayoutProcessor_AddPendingNode(pProcessor,
- pOverflowLeaderNode, FALSE);
+ pOverflowLeaderNode, false);
}
- pProcessor->m_bUseInheriated = FALSE;
+ pProcessor->m_bUseInheriated = false;
} else {
if (bIsAddTrailerHeight) {
fChildHeight -= pTrailerLayoutItem->m_sSize.y;
@@ -2071,14 +2070,14 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
CXFA_ContentLayoutItem* pChildLayoutItem =
pProcessor->ExtractLayoutItem();
- if (XFA_ExistContainerKeep(pProcessor->m_pFormNode, FALSE) &&
+ if (XFA_ExistContainerKeep(pProcessor->m_pFormNode, false) &&
pProcessor->m_pFormNode->GetIntact() == XFA_ATTRIBUTEENUM_None) {
pThis->m_arrayKeepItems.Add(pChildLayoutItem);
} else {
pThis->m_arrayKeepItems.RemoveAll();
}
rgCurLineLayoutItems[uHAlign].Add(pChildLayoutItem);
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
if (bTakeSpace) {
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
@@ -2095,9 +2094,9 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
if (pProcessor->JudgeLeaderOrTrailerForOccur(pOverflowLeaderNode)) {
XFA_ItemLayoutProcessor_AddPendingNode(
- pProcessor, pOverflowLeaderNode, FALSE);
+ pProcessor, pOverflowLeaderNode, false);
}
- pProcessor->m_bUseInheriated = FALSE;
+ pProcessor->m_bUseInheriated = false;
} else {
if (bIsAddTrailerHeight) {
fChildHeight -= pTrailerLayoutItem->m_sSize.y;
@@ -2108,7 +2107,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
}
rgCurLineLayoutItems[uHAlign].Add(pProcessor->ExtractLayoutItem());
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
fContentCurRowHeight = fChildHeight;
@@ -2123,7 +2122,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
bAddedItemInRow, bForceEndPage, eResult)) {
return eResult;
}
- bForceEndPage = TRUE;
+ bForceEndPage = true;
FX_FLOAT fSplitPos =
pProcessor->FindSplitPos(fAvailHeight - fContentCurRowY);
if (fSplitPos > XFA_LAYOUT_FLOAT_PERCISION) {
@@ -2135,7 +2134,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
pOverflowTrailerNode,
pTrailerLayoutItem, pFormNode);
rgCurLineLayoutItems[uHAlign].Add(pProcessor->ExtractLayoutItem());
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
if (bTakeSpace) {
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
@@ -2149,7 +2148,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
if (pThis->m_pPageMgr && !pProcessor->m_bUseInheriated &&
eRetValue != XFA_ItemLayoutProcessorResult_PageFullBreak) {
pThis->m_pPageMgr->ProcessOverflow(pFormNode, pTempLeaderNode,
- pTempTrailerNode, FALSE, TRUE);
+ pTempTrailerNode, false, true);
}
if (pTrailerLayoutItem && bIsAddTrailerHeight) {
XFA_ItemLayoutProcessor_AddTrailerBeforeSplit(
@@ -2161,7 +2160,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
pProcessor->ProcessUnUseOverFlow(pOverflowLeaderNode,
pOverflowTrailerNode,
pTrailerLayoutItem, pFormNode);
- pThis->m_bUseInheriated = TRUE;
+ pThis->m_bUseInheriated = true;
} else {
CXFA_LayoutItem* firstChild =
pProcessor->m_pLayoutItem->m_pFirstChild;
@@ -2173,14 +2172,14 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
} else {
if (pProcessor->JudgeLeaderOrTrailerForOccur(pOverflowLeaderNode)) {
XFA_ItemLayoutProcessor_AddPendingNode(
- pProcessor, pOverflowLeaderNode, FALSE);
+ pProcessor, pOverflowLeaderNode, false);
}
}
}
if (pProcessor->m_pLayoutItem->m_pNextSibling) {
pProcessor->GetCurrentComponentSize(fChildWidth, fChildHeight);
rgCurLineLayoutItems[uHAlign].Add(pProcessor->ExtractLayoutItem());
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
if (bTakeSpace) {
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
@@ -2199,18 +2198,18 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
pFormNode = pLayoutContext->m_pOverflowProcessor->m_pFormNode;
}
pThis->m_pPageMgr->ProcessOverflow(pFormNode, pTempLeaderNode,
- pTempTrailerNode, FALSE, TRUE);
+ pTempTrailerNode, false, true);
}
if (bUseInherited) {
pProcessor->ProcessUnUseOverFlow(pOverflowLeaderNode,
pOverflowTrailerNode,
pTrailerLayoutItem, pFormNode);
- pThis->m_bUseInheriated = TRUE;
+ pThis->m_bUseInheriated = true;
}
return XFA_ItemLayoutProcessorResult_PageFullBreak;
}
rgCurLineLayoutItems[uHAlign].Add(pProcessor->ExtractLayoutItem());
- bAddedItemInRow = TRUE;
+ bAddedItemInRow = true;
if (bTakeSpace) {
fContentCurRowAvailWidth -= fChildWidth;
if (fContentCurRowHeight < fChildHeight) {
@@ -2218,7 +2217,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
}
if (eRetValue == XFA_ItemLayoutProcessorResult_Done) {
- bForceEndPage = FALSE;
+ bForceEndPage = false;
}
return eRetValue;
} else {
@@ -2228,8 +2227,8 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
eLayout == XFA_ATTRIBUTEENUM_Tb) {
if (pThis->m_pPageMgr) {
pThis->m_pPageMgr->ProcessOverflow(pFormNode, pOverflowLeaderNode,
- pOverflowTrailerNode, FALSE,
- TRUE);
+ pOverflowTrailerNode, false,
+ true);
}
if (pTrailerLayoutItem) {
XFA_ItemLayoutProcessor_AddTrailerBeforeSplit(pProcessor, fSplitPos,
@@ -2237,7 +2236,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
if (pProcessor->JudgeLeaderOrTrailerForOccur(pOverflowLeaderNode)) {
XFA_ItemLayoutProcessor_AddPendingNode(pProcessor,
- pOverflowLeaderNode, FALSE);
+ pOverflowLeaderNode, false);
}
} else {
if (eRetValue == XFA_ItemLayoutProcessorResult_Done) {
@@ -2246,14 +2245,14 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
if (pThis->m_pPageMgr) {
pThis->m_pPageMgr->ProcessOverflow(pFormNode, pOverflowLeaderNode,
- pOverflowTrailerNode, FALSE,
- TRUE);
+ pOverflowTrailerNode, false,
+ true);
}
if (bUseInherited) {
pProcessor->ProcessUnUseOverFlow(pOverflowLeaderNode,
pOverflowTrailerNode,
pTrailerLayoutItem, pFormNode);
- pThis->m_bUseInheriated = TRUE;
+ pThis->m_bUseInheriated = true;
}
}
}
@@ -2267,18 +2266,18 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
}
XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
- FX_BOOL bUseBreakControl,
+ bool bUseBreakControl,
XFA_ATTRIBUTEENUM eFlowStrategy,
FX_FLOAT fHeightLimit,
FX_FLOAT fRealHeight,
CXFA_LayoutContext* pContext,
- FX_BOOL bRootForceTb) {
- m_bHasAvailHeight = TRUE;
+ bool bRootForceTb) {
+ m_bHasAvailHeight = true;
FX_FLOAT fContainerWidth = 0, fContainerHeight = 0;
- FX_BOOL bBreakDone = FALSE;
- FX_BOOL bContainerWidthAutoSize = TRUE, bContainerHeightAutoSize = TRUE;
- FX_BOOL bForceEndPage = FALSE;
- FX_BOOL bIsManualBreak = FALSE;
+ bool bBreakDone = false;
+ bool bContainerWidthAutoSize = true, bContainerHeightAutoSize = true;
+ bool bForceEndPage = false;
+ bool bIsManualBreak = false;
if (m_pCurChildPreprocessor) {
m_pCurChildPreprocessor->m_ePreProcessRs =
XFA_ItemLayoutProcessorResult_Done;
@@ -2287,7 +2286,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
m_pFormNode, fContainerWidth, fContainerHeight, bContainerWidthAutoSize,
bContainerHeightAutoSize);
if (pContext && pContext->m_bCurColumnWidthAvaiable) {
- bContainerWidthAutoSize = FALSE;
+ bContainerWidthAutoSize = false;
fContainerWidth = pContext->m_fCurColumnWidth;
}
if (!bContainerHeightAutoSize) {
@@ -2295,7 +2294,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
if (!bContainerHeightAutoSize) {
CXFA_Node* pParentNode = m_pFormNode->GetNodeItem(XFA_NODEITEM_Parent);
- FX_BOOL bFocrTb = FALSE;
+ bool bFocrTb = false;
if (pParentNode &&
XFA_ItemLayoutProcessor_GetLayout(pParentNode, bFocrTb) ==
XFA_ATTRIBUTEENUM_Row) {
@@ -2305,7 +2304,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
pChildContainer->GetNodeItem(XFA_NODEITEM_NextSibling,
XFA_ObjectType::ContainerNode)) {
fContainerHeight = 0;
- bContainerHeightAutoSize = TRUE;
+ bContainerHeightAutoSize = true;
}
}
}
@@ -2328,7 +2327,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
FX_FLOAT fContentCalculatedWidth = 0, fContentCalculatedHeight = 0;
FX_FLOAT fAvailHeight = fHeightLimit - fTopInset - fBottomInset;
if (fAvailHeight < 0) {
- m_bHasAvailHeight = FALSE;
+ m_bHasAvailHeight = false;
}
fRealHeight = fRealHeight - fTopInset - fBottomInset;
FX_FLOAT fContentCurRowY = 0;
@@ -2372,15 +2371,15 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
fContentCurRowY += InsertKeepLayoutItems();
if (m_nCurChildNodeStage == XFA_ItemLayoutProcessorStages_None) {
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, TRUE);
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, true);
}
fContentCurRowY +=
XFA_ItemLayoutProcessor_InsertPendingItems(this, m_pFormNode);
if (m_pCurChildPreprocessor &&
m_nCurChildNodeStage == XFA_ItemLayoutProcessorStages_Container) {
- if (XFA_ExistContainerKeep(m_pCurChildPreprocessor->GetFormNode(), FALSE)) {
+ if (XFA_ExistContainerKeep(m_pCurChildPreprocessor->GetFormNode(), false)) {
m_pKeepHeadNode = m_pCurChildNode;
- m_bIsProcessKeep = TRUE;
+ m_bIsProcessKeep = true;
m_nCurChildNodeStage = XFA_ItemLayoutProcessorStages_Keep;
}
}
@@ -2446,7 +2445,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
while (m_pCurChildNode) {
CXFA_ItemLayoutProcessor* pProcessor = nullptr;
- FX_BOOL bAddedItemInRow = FALSE;
+ bool bAddedItemInRow = false;
fContentCurRowY +=
XFA_ItemLayoutProcessor_InsertPendingItems(this, m_pFormNode);
switch (m_nCurChildNodeStage) {
@@ -2462,29 +2461,29 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
CXFA_Node* pLeaderNode = nullptr;
CXFA_Node* pTrailerNode = nullptr;
- FX_BOOL bCreatePage = FALSE;
+ bool bCreatePage = false;
if (bUseBreakControl && m_pPageMgr &&
- m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, TRUE,
+ m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, true,
pLeaderNode, pTrailerNode,
bCreatePage) &&
m_pFormNode->GetElementType() != XFA_Element::Form &&
bCreatePage) {
if (JudgeLeaderOrTrailerForOccur(pLeaderNode)) {
- XFA_ItemLayoutProcessor_AddPendingNode(this, pLeaderNode, TRUE);
+ XFA_ItemLayoutProcessor_AddPendingNode(this, pLeaderNode, true);
}
if (JudgeLeaderOrTrailerForOccur(pTrailerNode)) {
if (m_pFormNode->GetNodeItem(XFA_NODEITEM_Parent)
->GetElementType() == XFA_Element::Form &&
!m_pLayoutItem) {
XFA_ItemLayoutProcessor_AddPendingNode(this, pTrailerNode,
- TRUE);
+ true);
} else {
std::unique_ptr<CXFA_ItemLayoutProcessor> pTempProcessor(
new CXFA_ItemLayoutProcessor(pTrailerNode, nullptr));
XFA_ItemLayoutProcessor_InsertFlowedItem(
this, pTempProcessor.get(), bContainerWidthAutoSize,
bContainerHeightAutoSize, fContainerHeight, eFlowStrategy,
- uCurHAlignState, rgCurLineLayoutItems, FALSE,
+ uCurHAlignState, rgCurLineLayoutItems, false,
XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX, fContentCurRowY,
fContentWidthLimit, fContentCurRowAvailWidth,
fContentCurRowHeight, bAddedItemInRow, bForceEndPage,
@@ -2492,18 +2491,18 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
}
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, TRUE);
- bForceEndPage = TRUE;
- bIsManualBreak = TRUE;
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, true);
+ bForceEndPage = true;
+ bIsManualBreak = true;
goto SuspendAndCreateNewRow;
}
} break;
case XFA_ItemLayoutProcessorStages_BreakAfter: {
CXFA_Node* pLeaderNode = nullptr;
CXFA_Node* pTrailerNode = nullptr;
- FX_BOOL bCreatePage = FALSE;
+ bool bCreatePage = false;
if (bUseBreakControl && m_pPageMgr &&
- m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, FALSE,
+ m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, false,
pLeaderNode, pTrailerNode,
bCreatePage) &&
m_pFormNode->GetElementType() != XFA_Element::Form) {
@@ -2513,7 +2512,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
XFA_ItemLayoutProcessor_InsertFlowedItem(
this, pTempProcessor.get(), bContainerWidthAutoSize,
bContainerHeightAutoSize, fContainerHeight, eFlowStrategy,
- uCurHAlignState, rgCurLineLayoutItems, FALSE,
+ uCurHAlignState, rgCurLineLayoutItems, false,
XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX, fContentCurRowY,
fContentWidthLimit, fContentCurRowAvailWidth,
fContentCurRowHeight, bAddedItemInRow, bForceEndPage,
@@ -2532,7 +2531,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
XFA_ItemLayoutProcessor_InsertFlowedItem(
this, pTempProcessor.get(), bContainerWidthAutoSize,
bContainerHeightAutoSize, fContainerHeight, eFlowStrategy,
- uCurHAlignState, rgCurLineLayoutItems, FALSE,
+ uCurHAlignState, rgCurLineLayoutItems, false,
XFA_LAYOUT_FLOAT_MAX, XFA_LAYOUT_FLOAT_MAX, fContentCurRowY,
fContentWidthLimit, fContentCurRowAvailWidth,
fContentCurRowHeight, bAddedItemInRow, bForceEndPage,
@@ -2540,16 +2539,16 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
} else {
if (JudgeLeaderOrTrailerForOccur(pLeaderNode)) {
- XFA_ItemLayoutProcessor_AddPendingNode(this, pLeaderNode, TRUE);
+ XFA_ItemLayoutProcessor_AddPendingNode(this, pLeaderNode, true);
}
}
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, TRUE);
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, true);
if (bCreatePage) {
- bForceEndPage = TRUE;
- bIsManualBreak = TRUE;
+ bForceEndPage = true;
+ bIsManualBreak = true;
if (m_nCurChildNodeStage == XFA_ItemLayoutProcessorStages_Done) {
- bBreakDone = TRUE;
+ bBreakDone = true;
}
}
goto SuspendAndCreateNewRow;
@@ -2562,7 +2561,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
m_pCurChildPreprocessor = nullptr;
} else if (m_pPageMgr &&
m_pPageMgr->ProcessBookendLeaderOrTrailer(
- m_pCurChildNode, TRUE, pLeaderNode)) {
+ m_pCurChildNode, true, pLeaderNode)) {
pProcessor = new CXFA_ItemLayoutProcessor(pLeaderNode, m_pPageMgr);
}
if (pProcessor) {
@@ -2588,7 +2587,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
m_pCurChildPreprocessor = nullptr;
} else if (m_pPageMgr &&
m_pPageMgr->ProcessBookendLeaderOrTrailer(
- m_pCurChildNode, FALSE, pTrailerNode)) {
+ m_pCurChildNode, false, pTrailerNode)) {
pProcessor = new CXFA_ItemLayoutProcessor(pTrailerNode, m_pPageMgr);
}
if (pProcessor) {
@@ -2614,15 +2613,15 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
if (fContentCurRowY >= fHeightLimit + XFA_LAYOUT_FLOAT_PERCISION &&
XFA_ItemLayoutProcessor_IsTakingSpace(m_pCurChildNode)) {
- bForceEndPage = TRUE;
+ bForceEndPage = true;
goto SuspendAndCreateNewRow;
}
if (m_pCurChildNode->IsContainerNode()) {
- FX_BOOL bNewRow = FALSE;
+ bool bNewRow = false;
if (m_pCurChildPreprocessor) {
pProcessor = m_pCurChildPreprocessor;
m_pCurChildPreprocessor = nullptr;
- bNewRow = TRUE;
+ bNewRow = true;
} else {
pProcessor =
new CXFA_ItemLayoutProcessor(m_pCurChildNode, m_pPageMgr);
@@ -2640,9 +2639,9 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
pContext, bNewRow);
switch (rs) {
case XFA_ItemLayoutProcessorResult_ManualBreak:
- bIsManualBreak = TRUE;
+ bIsManualBreak = true;
case XFA_ItemLayoutProcessorResult_PageFullBreak:
- bForceEndPage = TRUE;
+ bForceEndPage = true;
case XFA_ItemLayoutProcessorResult_RowFullBreak:
goto SuspendAndCreateNewRow;
case XFA_ItemLayoutProcessorResult_Done:
@@ -2660,7 +2659,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
break;
}
XFA_ItemLayoutProcessor_GotoNextContainerNode(
- m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, TRUE);
+ m_pCurChildNode, m_nCurChildNodeStage, m_pFormNode, true);
if (bAddedItemInRow && eFlowStrategy == XFA_ATTRIBUTEENUM_Tb) {
break;
} else {
@@ -2682,11 +2681,10 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
break;
}
}
- FX_BOOL bRetValue =
- m_nCurChildNodeStage == XFA_ItemLayoutProcessorStages_Done &&
- m_PendingNodes.empty();
+ bool bRetValue = m_nCurChildNodeStage == XFA_ItemLayoutProcessorStages_Done &&
+ m_PendingNodes.empty();
if (bBreakDone) {
- bRetValue = FALSE;
+ bRetValue = false;
}
XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize(
m_pFormNode, bContainerWidthAutoSize, fContentCalculatedWidth,
@@ -2713,17 +2711,17 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
: XFA_ItemLayoutProcessorResult_PageFullBreak);
}
-FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
- CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3],
+bool CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3],
XFA_ATTRIBUTEENUM eFlowStrategy,
- FX_BOOL bContainerHeightAutoSize,
- FX_BOOL bContainerWidthAutoSize,
+ bool bContainerHeightAutoSize,
+ bool bContainerWidthAutoSize,
FX_FLOAT& fContentCalculatedWidth,
FX_FLOAT& fContentCalculatedHeight,
FX_FLOAT& fContentCurRowY,
FX_FLOAT fContentCurRowHeight,
FX_FLOAT fContentWidthLimit,
- FX_BOOL bRootForceTb) {
+ bool bRootForceTb) {
int32_t nGroupLengths[3] = {0, 0, 0};
FX_FLOAT fGroupWidths[3] = {0, 0, 0};
int32_t nTotalLength = 0;
@@ -2744,7 +2742,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
fContentCalculatedHeight = fNewHeight;
}
}
- return FALSE;
+ return false;
}
if (!m_pLayoutItem) {
m_pLayoutItem = CreateContentLayoutItem(m_pFormNode);
@@ -2866,7 +2864,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
fContentCalculatedHeight = fChildSuppliedHeight;
}
}
- return TRUE;
+ return true;
}
CXFA_Node* CXFA_ItemLayoutProcessor::GetSubformSetParent(
CXFA_Node* pSubformSet) {
@@ -2906,7 +2904,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutField() {
SetCurrentComponentSize(fWidth, fHeight);
}
XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout(
- FX_BOOL bUseBreakControl,
+ bool bUseBreakControl,
FX_FLOAT fHeightLimit,
FX_FLOAT fRealHeight,
CXFA_LayoutContext* pContext) {
@@ -2915,7 +2913,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout(
case XFA_Element::Area:
case XFA_Element::ExclGroup:
case XFA_Element::SubformSet: {
- FX_BOOL bRootForceTb = FALSE;
+ bool bRootForceTb = false;
CXFA_Node* pLayoutNode = GetSubformSetParent(m_pFormNode);
XFA_ATTRIBUTEENUM eLayoutStrategy =
XFA_ItemLayoutProcessor_GetLayout(pLayoutNode, bRootForceTb);
@@ -2971,10 +2969,10 @@ void CXFA_ItemLayoutProcessor::SetCurrentComponentSize(FX_FLOAT fWidth,
m_pLayoutItem->m_sSize = CFX_SizeF(fWidth, fHeight);
}
-FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(
+bool CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(
CXFA_Node* pFormNode) {
if (!pFormNode)
- return FALSE;
+ return false;
CXFA_Node* pTemplate = pFormNode->GetTemplateNode();
if (!pTemplate)
@@ -2983,12 +2981,12 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur(
CXFA_Occur NodeOccur(pTemplate->GetFirstChildByClass(XFA_Element::Occur));
int32_t iMax = NodeOccur.GetMax();
if (iMax < 0)
- return TRUE;
+ return true;
int32_t iCount = m_PendingNodesCount[pTemplate];
if (iCount >= iMax)
- return FALSE;
+ return false;
m_PendingNodesCount[pTemplate] = iCount + 1;
- return TRUE;
+ return true;
}
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h
index 6da09cb3f7..0d114a4d5c 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.h
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h
@@ -49,13 +49,13 @@ class CXFA_LayoutContext {
CXFA_LayoutContext()
: m_prgSpecifiedColumnWidths(nullptr),
m_fCurColumnWidth(0),
- m_bCurColumnWidthAvaiable(FALSE),
+ m_bCurColumnWidthAvaiable(false),
m_pOverflowProcessor(nullptr),
m_pOverflowNode(nullptr) {}
~CXFA_LayoutContext() { m_pOverflowProcessor = nullptr; }
CFX_ArrayTemplate<FX_FLOAT>* m_prgSpecifiedColumnWidths;
FX_FLOAT m_fCurColumnWidth;
- FX_BOOL m_bCurColumnWidthAvaiable;
+ bool m_bCurColumnWidthAvaiable;
CXFA_ItemLayoutProcessor* m_pOverflowProcessor;
CXFA_Node* m_pOverflowNode;
};
@@ -66,7 +66,7 @@ class CXFA_ItemLayoutProcessor {
~CXFA_ItemLayoutProcessor();
XFA_ItemLayoutProcessorResult DoLayout(
- FX_BOOL bUseBreakControl,
+ bool bUseBreakControl,
FX_FLOAT fHeightLimit,
FX_FLOAT fRealHeight = XFA_LAYOUT_FLOAT_MAX,
CXFA_LayoutContext* pContext = nullptr);
@@ -79,32 +79,31 @@ class CXFA_ItemLayoutProcessor {
void SetCurrentComponentSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
CXFA_Node* GetFormNode() { return m_pFormNode; }
- FX_BOOL HasLayoutItem() { return !!m_pLayoutItem; }
+ bool HasLayoutItem() { return !!m_pLayoutItem; }
CXFA_ContentLayoutItem* ExtractLayoutItem();
- static FX_BOOL IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor,
- CXFA_Node* pNode,
- CXFA_Node* pParentNode);
+ static bool IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor,
+ CXFA_Node* pNode,
+ CXFA_Node* pParentNode);
static void CalculatePositionedContainerPos(CXFA_Node* pNode,
FX_FLOAT fWidth,
FX_FLOAT fHeight,
FX_FLOAT& fAbsoluteX,
FX_FLOAT& fAbsoluteY);
- static FX_BOOL FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
- FX_FLOAT fCurVerticalOffset,
- FX_FLOAT& fProposedSplitPos,
- FX_BOOL& bAppChange,
- FX_BOOL bCalculateMargin = TRUE);
+ static bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
+ FX_FLOAT fCurVerticalOffset,
+ FX_FLOAT& fProposedSplitPos,
+ bool& bAppChange,
+ bool bCalculateMargin = true);
FX_FLOAT FindSplitPos(FX_FLOAT fProposedSplitPos);
void SplitLayoutItem(CXFA_ContentLayoutItem* pLayoutItem,
CXFA_ContentLayoutItem* pSecondParent,
FX_FLOAT fSplitPos);
void SplitLayoutItem(FX_FLOAT fSplitPos);
- FX_BOOL JudgePutNextPage(
- CXFA_ContentLayoutItem* pParentLayoutItem,
- FX_FLOAT fChildHeight,
- CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems);
- FX_BOOL ProcessKeepForSplite(
+ bool JudgePutNextPage(CXFA_ContentLayoutItem* pParentLayoutItem,
+ FX_FLOAT fChildHeight,
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems);
+ bool ProcessKeepForSplite(
CXFA_ItemLayoutProcessor* pParentProcessor,
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
@@ -112,64 +111,63 @@ class CXFA_ItemLayoutProcessor {
FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight,
FX_FLOAT& fContentCurRowY,
- FX_BOOL& bAddedItemInRow,
- FX_BOOL& bForceEndPage,
+ bool& bAddedItemInRow,
+ bool& bForceEndPage,
XFA_ItemLayoutProcessorResult& result);
FX_FLOAT InsertKeepLayoutItems();
void DoLayoutPageArea(CXFA_ContainerLayoutItem* pPageAreaLayoutItem);
- FX_BOOL CalculateRowChildPosition(
- CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3],
+ bool CalculateRowChildPosition(
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3],
XFA_ATTRIBUTEENUM eFlowStrategy,
- FX_BOOL bContainerHeightAutoSize,
- FX_BOOL bContainerWidthAutoSize,
+ bool bContainerHeightAutoSize,
+ bool bContainerWidthAutoSize,
FX_FLOAT& fContentCalculatedWidth,
FX_FLOAT& fContentCalculatedHeight,
FX_FLOAT& fContentCurRowY,
FX_FLOAT fContentCurRowHeight,
FX_FLOAT fContentWidthLimit,
- FX_BOOL bRootForceTb = FALSE);
+ bool bRootForceTb = false);
void ProcessUnUseOverFlow(CXFA_Node* pLeaderNode,
CXFA_Node* pTrailerNode,
CXFA_ContentLayoutItem* pTrailerItem,
CXFA_Node* pFormNode);
void ProcessUnUseBinds(CXFA_Node* pFormNode);
- FX_BOOL IsAddNewRowForTrailer(CXFA_ContentLayoutItem* pTrailerItem);
- FX_BOOL JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormNode);
+ bool IsAddNewRowForTrailer(CXFA_ContentLayoutItem* pTrailerItem);
+ bool JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormNode);
CXFA_ContentLayoutItem* CreateContentLayoutItem(CXFA_Node* pFormNode);
protected:
void DoLayoutPositionedContainer(CXFA_LayoutContext* pContext = nullptr);
void DoLayoutTableContainer(CXFA_Node* pLayoutNode);
XFA_ItemLayoutProcessorResult DoLayoutFlowedContainer(
- FX_BOOL bUseBreakControl,
+ bool bUseBreakControl,
XFA_ATTRIBUTEENUM eFlowStrategy,
FX_FLOAT fHeightLimit,
FX_FLOAT fRealHeight,
CXFA_LayoutContext* pContext = nullptr,
- FX_BOOL bRootForceTb = FALSE);
+ bool bRootForceTb = false);
void DoLayoutField();
void XFA_ItemLayoutProcessor_GotoNextContainerNode(
CXFA_Node*& pCurActionNode,
XFA_ItemLayoutProcessorStages& nCurStage,
CXFA_Node* pParentContainer,
- FX_BOOL bUsePageBreak);
+ bool bUsePageBreak);
- FX_BOOL ProcessKeepNodesForCheckNext(CXFA_Node*& pCurActionNode,
- XFA_ItemLayoutProcessorStages& nCurStage,
- CXFA_Node*& pNextContainer,
- FX_BOOL& bLastKeepNode);
+ bool ProcessKeepNodesForCheckNext(CXFA_Node*& pCurActionNode,
+ XFA_ItemLayoutProcessorStages& nCurStage,
+ CXFA_Node*& pNextContainer,
+ bool& bLastKeepNode);
- FX_BOOL ProcessKeepNodesForBreakBefore(
- CXFA_Node*& pCurActionNode,
- XFA_ItemLayoutProcessorStages& nCurStage,
- CXFA_Node* pContainerNode);
+ bool ProcessKeepNodesForBreakBefore(CXFA_Node*& pCurActionNode,
+ XFA_ItemLayoutProcessorStages& nCurStage,
+ CXFA_Node* pContainerNode);
CXFA_Node* GetSubformSetParent(CXFA_Node* pSubformSet);
public:
- FX_BOOL m_bKeepBreakFinish;
- FX_BOOL m_bIsProcessKeep;
+ bool m_bKeepBreakFinish;
+ bool m_bIsProcessKeep;
CXFA_Node* m_pKeepHeadNode;
CXFA_Node* m_pKeepTailNode;
CXFA_Node* m_pFormNode;
@@ -181,17 +179,17 @@ class CXFA_ItemLayoutProcessor {
FX_FLOAT m_fUsedSize;
CXFA_LayoutPageMgr* m_pPageMgr;
std::list<CXFA_Node*> m_PendingNodes;
- FX_BOOL m_bBreakPending;
+ bool m_bBreakPending;
CFX_ArrayTemplate<FX_FLOAT> m_rgSpecifiedColumnWidths;
CFX_ArrayTemplate<CXFA_ContentLayoutItem*> m_arrayKeepItems;
std::map<CXFA_Node*, int32_t> m_PendingNodesCount;
FX_FLOAT m_fLastRowWidth;
FX_FLOAT m_fLastRowY;
FX_FLOAT m_fWidthLimite;
- FX_BOOL m_bUseInheriated;
+ bool m_bUseInheriated;
XFA_ItemLayoutProcessorResult m_ePreProcessRs;
- FX_BOOL m_bHasAvailHeight;
+ bool m_bHasAvailHeight;
};
-FX_BOOL XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode);
+bool XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode);
#endif // XFA_FXFA_PARSER_XFA_LAYOUT_ITEMLAYOUT_H_
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index 5e8c7a208c..8c106209aa 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -88,32 +88,32 @@ void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
void CXFA_XMLLocale::GetMonthName(int32_t nMonth,
CFX_WideString& wsMonthName,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
wsMonthName = GetCalendarSymbol("month", nMonth, bAbbr);
}
void CXFA_XMLLocale::GetDayName(int32_t nWeek,
CFX_WideString& wsDayName,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
wsDayName = GetCalendarSymbol("day", nWeek, bAbbr);
}
void CXFA_XMLLocale::GetMeridiemName(CFX_WideString& wsMeridiemName,
- FX_BOOL bAM) const {
- wsMeridiemName = GetCalendarSymbol("meridiem", bAM ? 0 : 1, FALSE);
+ bool bAM) const {
+ wsMeridiemName = GetCalendarSymbol("meridiem", bAM ? 0 : 1, false);
}
void CXFA_XMLLocale::GetTimeZone(FX_TIMEZONE& tz) const {
CXFA_TimeZoneProvider::Get()->GetTimeZone(tz);
}
-void CXFA_XMLLocale::GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD) const {
- wsEraName = GetCalendarSymbol("era", bAD ? 1 : 0, FALSE);
+void CXFA_XMLLocale::GetEraName(CFX_WideString& wsEraName, bool bAD) const {
+ wsEraName = GetCalendarSymbol("era", bAD ? 1 : 0, false);
}
CFX_WideString CXFA_XMLLocale::GetCalendarSymbol(const CFX_ByteStringC& symbol,
int index,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
CFX_ByteString pstrSymbolNames = symbol + "Names";
CFX_WideString wsSymbolName = L"";
if (m_pLocaleData) {
@@ -272,28 +272,28 @@ void CXFA_NodeLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
void CXFA_NodeLocale::GetMonthName(int32_t nMonth,
CFX_WideString& wsMonthName,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
wsMonthName = GetCalendarSymbol(XFA_Element::MonthNames, nMonth, bAbbr);
}
void CXFA_NodeLocale::GetDayName(int32_t nWeek,
CFX_WideString& wsDayName,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
wsDayName = GetCalendarSymbol(XFA_Element::DayNames, nWeek, bAbbr);
}
void CXFA_NodeLocale::GetMeridiemName(CFX_WideString& wsMeridiemName,
- FX_BOOL bAM) const {
+ bool bAM) const {
wsMeridiemName =
- GetCalendarSymbol(XFA_Element::MeridiemNames, bAM ? 0 : 1, FALSE);
+ GetCalendarSymbol(XFA_Element::MeridiemNames, bAM ? 0 : 1, false);
}
void CXFA_NodeLocale::GetTimeZone(FX_TIMEZONE& tz) const {
CXFA_TimeZoneProvider::Get()->GetTimeZone(tz);
}
-void CXFA_NodeLocale::GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD) const {
- wsEraName = GetCalendarSymbol(XFA_Element::EraNames, bAD ? 1 : 0, FALSE);
+void CXFA_NodeLocale::GetEraName(CFX_WideString& wsEraName, bool bAD) const {
+ wsEraName = GetCalendarSymbol(XFA_Element::EraNames, bAD ? 1 : 0, false);
}
void CXFA_NodeLocale::GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
@@ -378,7 +378,7 @@ CFX_WideString CXFA_NodeLocale::GetSymbol(
CFX_WideString CXFA_NodeLocale::GetCalendarSymbol(XFA_Element eElement,
int index,
- FX_BOOL bAbbr) const {
+ bool bAbbr) const {
CXFA_Node* pCalendar =
m_pLocale ? m_pLocale->GetChild(0, XFA_Element::CalendarSymbols)
: nullptr;
diff --git a/xfa/fxfa/parser/xfa_locale.h b/xfa/fxfa/parser/xfa_locale.h
index 75104b456c..b9a3259ead 100644
--- a/xfa/fxfa/parser/xfa_locale.h
+++ b/xfa/fxfa/parser/xfa_locale.h
@@ -25,14 +25,14 @@ class CXFA_XMLLocale : public IFX_Locale {
void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const override;
void GetMonthName(int32_t nMonth,
CFX_WideString& wsMonthName,
- FX_BOOL bAbbr = TRUE) const override;
+ bool bAbbr = true) const override;
void GetDayName(int32_t nWeek,
CFX_WideString& wsDayName,
- FX_BOOL bAbbr = TRUE) const override;
+ bool bAbbr = true) const override;
void GetMeridiemName(CFX_WideString& wsMeridiemName,
- FX_BOOL bAM = TRUE) const override;
+ bool bAM = true) const override;
void GetTimeZone(FX_TIMEZONE& tz) const override;
- void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const override;
+ void GetEraName(CFX_WideString& wsEraName, bool bAD = true) const override;
void GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
CFX_WideString& wsPattern) const override;
@@ -48,7 +48,7 @@ class CXFA_XMLLocale : public IFX_Locale {
CFX_WideString& wsPattern) const;
CFX_WideString GetCalendarSymbol(const CFX_ByteStringC& symbol,
int index,
- FX_BOOL bAbbr) const;
+ bool bAbbr) const;
private:
std::unique_ptr<CXML_Element> m_pLocaleData;
@@ -67,14 +67,14 @@ class CXFA_NodeLocale : public IFX_Locale {
void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const override;
void GetMonthName(int32_t nMonth,
CFX_WideString& wsMonthName,
- FX_BOOL bAbbr = TRUE) const override;
+ bool bAbbr = true) const override;
void GetDayName(int32_t nWeek,
CFX_WideString& wsDayName,
- FX_BOOL bAbbr = TRUE) const override;
+ bool bAbbr = true) const override;
void GetMeridiemName(CFX_WideString& wsMeridiemName,
- FX_BOOL bAM = TRUE) const override;
+ bool bAM = true) const override;
void GetTimeZone(FX_TIMEZONE& tz) const override;
- void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const override;
+ void GetEraName(CFX_WideString& wsEraName, bool bAD = true) const override;
void GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType,
CFX_WideString& wsPattern) const override;
@@ -90,7 +90,7 @@ class CXFA_NodeLocale : public IFX_Locale {
const CFX_WideStringC& symbol_type) const;
CFX_WideString GetCalendarSymbol(XFA_Element eElement,
int index,
- FX_BOOL bAbbr) const;
+ bool bAbbr) const;
CXFA_Node* const m_pLocale;
};
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index b7f0fbea59..74565a7ea0 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1048,7 +1048,7 @@ static std::unique_ptr<IFX_Locale> XFA_GetLocaleFromBuffer(const uint8_t* pBuf,
std::unique_ptr<CXML_Element> pLocale;
uint8_t* pOut = nullptr;
uint32_t dwSize;
- pCodecMgr->GetFlateModule()->FlateOrLZWDecode(FALSE, pBuf, nBufLen, TRUE, 0,
+ pCodecMgr->GetFlateModule()->FlateOrLZWDecode(false, pBuf, nBufLen, true, 0,
0, 0, 0, 0, pOut, dwSize);
if (pOut) {
pLocale.reset(CXML_Element::Parse(pOut, dwSize));
@@ -1237,7 +1237,7 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) {
pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale)
: nullptr;
if (pLocale) {
- pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE);
+ pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, false);
}
}
m_dwLocaleFlags |= 0x01;
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 27f3b0cf3f..b662121230 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -31,12 +31,12 @@ static const FX_DOUBLE fraction_scales[] = {0.1,
0.0000000000000001};
CXFA_LocaleValue::CXFA_LocaleValue() {
m_dwType = XFA_VT_NULL;
- m_bValid = TRUE;
+ m_bValid = true;
m_pLocaleMgr = nullptr;
}
CXFA_LocaleValue::CXFA_LocaleValue(const CXFA_LocaleValue& value) {
m_dwType = XFA_VT_NULL;
- m_bValid = TRUE;
+ m_bValid = true;
m_pLocaleMgr = nullptr;
*this = value;
}
@@ -60,7 +60,7 @@ CXFA_LocaleValue::CXFA_LocaleValue(uint32_t dwType,
IFX_Locale* pLocale,
CXFA_LocaleMgr* pLocaleMgr) {
m_pLocaleMgr = pLocaleMgr;
- m_bValid = TRUE;
+ m_bValid = true;
m_dwType = dwType;
m_bValid = ParsePatternValue(wsValue, wsFormat, pLocale);
}
@@ -93,10 +93,10 @@ static FX_LOCALECATEGORY XFA_ValugeCategory(FX_LOCALECATEGORY eCategory,
}
return eCategory;
}
-FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsPattern,
- IFX_Locale* pLocale,
- CFX_WideString* pMatchFormat) {
+bool CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale,
+ CFX_WideString* pMatchFormat) {
CFX_WideString wsOutput;
IFX_Locale* locale = m_pLocaleMgr->GetDefLocale();
if (pLocale) {
@@ -104,11 +104,11 @@ FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
}
CFX_FormatString* pFormat = nullptr;
if (m_pLocaleMgr)
- pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+ pFormat = new CFX_FormatString(m_pLocaleMgr, false);
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
int32_t iCount = wsPatterns.GetSize();
int32_t i = 0;
for (; i < iCount && !bRet; i++) {
@@ -177,7 +177,7 @@ FX_BOOL CXFA_LocaleValue::ValidateValue(const CFX_WideString& wsValue,
break;
}
default:
- bRet = FALSE;
+ bRet = false;
break;
}
}
@@ -214,7 +214,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const {
uint32_t dwFractional = 0;
int32_t nExponent = 0;
int cc = 0;
- FX_BOOL bNegative = FALSE, bExpSign = FALSE;
+ bool bNegative = false, bExpSign = false;
const FX_WCHAR* str = m_wsValue.c_str();
int len = m_wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len) {
@@ -226,7 +226,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const {
if (str[0] == '+') {
cc++;
} else if (str[0] == '-') {
- bNegative = TRUE;
+ bNegative = true;
cc++;
}
int nIntegralLen = 0;
@@ -261,7 +261,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const {
if (str[cc] == '+') {
cc++;
} else if (str[cc] == '-') {
- bExpSign = TRUE;
+ bExpSign = true;
cc++;
}
}
@@ -290,7 +290,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const {
uint32_t dwFractional = 0;
int32_t nExponent = 0;
int32_t cc = 0;
- FX_BOOL bNegative = FALSE, bExpSign = FALSE;
+ bool bNegative = false, bExpSign = false;
const FX_WCHAR* str = m_wsValue.c_str();
int len = m_wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len) {
@@ -302,7 +302,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const {
if (str[0] == '+') {
cc++;
} else if (str[0] == '-') {
- bNegative = TRUE;
+ bNegative = true;
cc++;
}
int32_t nIntegralLen = 0;
@@ -337,7 +337,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const {
if (str[cc] == '+') {
cc++;
} else if (str[cc] == '-') {
- bExpSign = TRUE;
+ bExpSign = true;
cc++;
}
}
@@ -390,40 +390,40 @@ CFX_Unitime CXFA_LocaleValue::GetDateTime() const {
}
return CFX_Unitime();
}
-FX_BOOL CXFA_LocaleValue::SetText(const CFX_WideString& wsText) {
+bool CXFA_LocaleValue::SetText(const CFX_WideString& wsText) {
m_dwType = XFA_VT_TEXT;
m_wsValue = wsText;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::SetText(const CFX_WideString& wsText,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::SetText(const CFX_WideString& wsText,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale) {
m_dwType = XFA_VT_TEXT;
return m_bValid = ParsePatternValue(wsText, wsFormat, pLocale);
}
-FX_BOOL CXFA_LocaleValue::SetNum(FX_FLOAT fNum) {
+bool CXFA_LocaleValue::SetNum(FX_FLOAT fNum) {
m_dwType = XFA_VT_FLOAT;
m_wsValue.Format(L"%.8g", (FX_DOUBLE)fNum);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::SetNum(const CFX_WideString& wsNum,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::SetNum(const CFX_WideString& wsNum,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale) {
m_dwType = XFA_VT_FLOAT;
return m_bValid = ParsePatternValue(wsNum, wsFormat, pLocale);
}
-FX_BOOL CXFA_LocaleValue::SetDate(const CFX_Unitime& d) {
+bool CXFA_LocaleValue::SetDate(const CFX_Unitime& d) {
m_dwType = XFA_VT_DATE;
m_wsValue.Format(L"%04d-%02d-%02d", d.GetYear(), d.GetMonth(), d.GetDay());
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::SetDate(const CFX_WideString& wsDate,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::SetDate(const CFX_WideString& wsDate,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale) {
m_dwType = XFA_VT_DATE;
return m_bValid = ParsePatternValue(wsDate, wsFormat, pLocale);
}
-FX_BOOL CXFA_LocaleValue::SetTime(const CFX_Unitime& t) {
+bool CXFA_LocaleValue::SetTime(const CFX_Unitime& t) {
m_dwType = XFA_VT_TIME;
m_wsValue.Format(L"%02d:%02d:%02d", t.GetHour(), t.GetMinute(),
t.GetSecond());
@@ -432,15 +432,15 @@ FX_BOOL CXFA_LocaleValue::SetTime(const CFX_Unitime& t) {
wsTemp.Format(L"%:03d", t.GetMillisecond());
m_wsValue += wsTemp;
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::SetTime(const CFX_WideString& wsTime,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::SetTime(const CFX_WideString& wsTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale) {
m_dwType = XFA_VT_TIME;
return m_bValid = ParsePatternValue(wsTime, wsFormat, pLocale);
}
-FX_BOOL CXFA_LocaleValue::SetDateTime(const CFX_Unitime& dt) {
+bool CXFA_LocaleValue::SetDateTime(const CFX_Unitime& dt) {
m_dwType = XFA_VT_DATETIME;
m_wsValue.Format(L"%04d-%02d-%02dT%02d:%02d:%02d", dt.GetYear(),
dt.GetMonth(), dt.GetDay(), dt.GetHour(), dt.GetMinute(),
@@ -450,24 +450,24 @@ FX_BOOL CXFA_LocaleValue::SetDateTime(const CFX_Unitime& dt) {
wsTemp.Format(L"%:03d", dt.GetMillisecond());
m_wsValue += wsTemp;
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::SetDateTime(const CFX_WideString& wsDateTime,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::SetDateTime(const CFX_WideString& wsDateTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale) {
m_dwType = XFA_VT_DATETIME;
return m_bValid = ParsePatternValue(wsDateTime, wsFormat, pLocale);
}
-FX_BOOL CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale,
- XFA_VALUEPICTURE eValueType) const {
+bool CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const {
wsResult.clear();
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
CFX_FormatString* pFormat = nullptr;
if (m_pLocaleMgr)
- pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+ pFormat = new CFX_FormatString(m_pLocaleMgr, false);
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsFormat, wsPatterns);
@@ -481,21 +481,20 @@ FX_BOOL CXFA_LocaleValue::FormatPatterns(CFX_WideString& wsResult,
pFormat->Release();
return bRet;
}
-FX_BOOL CXFA_LocaleValue::FormatSinglePattern(
- CFX_WideString& wsResult,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale,
- XFA_VALUEPICTURE eValueType) const {
+bool CXFA_LocaleValue::FormatSinglePattern(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const {
IFX_Locale* locale = m_pLocaleMgr->GetDefLocale();
if (pLocale) {
m_pLocaleMgr->SetDefLocale(pLocale);
}
wsResult.clear();
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
CFX_FormatString* pFormat = nullptr;
if (m_pLocaleMgr)
- pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+ pFormat = new CFX_FormatString(m_pLocaleMgr, false);
FX_LOCALECATEGORY eCategory = pFormat->GetCategory(wsFormat);
eCategory = XFA_ValugeCategory(eCategory, m_dwType);
@@ -530,7 +529,7 @@ FX_BOOL CXFA_LocaleValue::FormatSinglePattern(
break;
default:
wsResult = m_wsValue;
- bRet = TRUE;
+ bRet = true;
}
pFormat->Release();
if (!bRet && (eCategory != FX_LOCALECATEGORY_Num ||
@@ -542,13 +541,13 @@ FX_BOOL CXFA_LocaleValue::FormatSinglePattern(
}
return bRet;
}
-static FX_BOOL XFA_ValueSplitDateTime(const CFX_WideString& wsDateTime,
- CFX_WideString& wsDate,
- CFX_WideString& wsTime) {
+static bool XFA_ValueSplitDateTime(const CFX_WideString& wsDateTime,
+ CFX_WideString& wsDate,
+ CFX_WideString& wsTime) {
wsDate = L"";
wsTime = L"";
if (wsDateTime.IsEmpty()) {
- return FALSE;
+ return false;
}
int nSplitIndex = -1;
nSplitIndex = wsDateTime.Find('T');
@@ -556,58 +555,58 @@ static FX_BOOL XFA_ValueSplitDateTime(const CFX_WideString& wsDateTime,
nSplitIndex = wsDateTime.Find(' ');
}
if (nSplitIndex < 0) {
- return FALSE;
+ return false;
}
wsDate = wsDateTime.Left(nSplitIndex);
wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1);
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::ValidateCanonicalValue(const CFX_WideString& wsValue,
- uint32_t dwVType) {
+bool CXFA_LocaleValue::ValidateCanonicalValue(const CFX_WideString& wsValue,
+ uint32_t dwVType) {
if (wsValue.IsEmpty()) {
- return TRUE;
+ return true;
}
CFX_Unitime dt;
switch (dwVType) {
case XFA_VT_DATE: {
if (ValidateCanonicalDate(wsValue, dt)) {
- return TRUE;
+ return true;
}
CFX_WideString wsDate, wsTime;
if (XFA_ValueSplitDateTime(wsValue, wsDate, wsTime) &&
ValidateCanonicalDate(wsDate, dt)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
case XFA_VT_TIME: {
if (ValidateCanonicalTime(wsValue)) {
- return TRUE;
+ return true;
}
CFX_WideString wsDate, wsTime;
if (XFA_ValueSplitDateTime(wsValue, wsDate, wsTime) &&
ValidateCanonicalTime(wsTime)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
case XFA_VT_DATETIME: {
CFX_WideString wsDate, wsTime;
if (XFA_ValueSplitDateTime(wsValue, wsDate, wsTime) &&
ValidateCanonicalDate(wsDate, dt) && ValidateCanonicalTime(wsTime)) {
- return TRUE;
+ return true;
}
} break;
}
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
- CFX_Unitime& unDate) {
+bool CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
+ CFX_Unitime& unDate) {
const uint16_t LastDay[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const uint16_t wCountY = 4, wCountM = 2, wCountD = 2;
int nLen = wsDate.GetLength();
if (nLen < wCountY || nLen > wCountY + wCountM + wCountD + 2) {
- return FALSE;
+ return false;
}
const bool bSymbol = wsDate.Find(0x2D) != -1;
uint16_t wYear = 0;
@@ -617,79 +616,79 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
int nIndex = 0, nStart = 0;
while (pDate[nIndex] != '\0' && nIndex < wCountY) {
if (!FXSYS_isDecimalDigit(pDate[nIndex])) {
- return FALSE;
+ return false;
}
wYear = (pDate[nIndex] - '0') + wYear * 10;
nIndex++;
}
if (bSymbol) {
if (pDate[nIndex] != 0x2D) {
- return FALSE;
+ return false;
}
nIndex++;
}
nStart = nIndex;
while (pDate[nIndex] != '\0' && nIndex - nStart < wCountM && nIndex < nLen) {
if (!FXSYS_isDecimalDigit(pDate[nIndex])) {
- return FALSE;
+ return false;
}
wMonth = (pDate[nIndex] - '0') + wMonth * 10;
nIndex++;
}
if (bSymbol) {
if (pDate[nIndex] != 0x2D) {
- return FALSE;
+ return false;
}
nIndex++;
}
nStart = nIndex;
while (pDate[nIndex] != '\0' && nIndex - nStart < wCountD && nIndex < nLen) {
if (!FXSYS_isDecimalDigit(pDate[nIndex])) {
- return FALSE;
+ return false;
}
wDay = (pDate[nIndex] - '0') + wDay * 10;
nIndex++;
}
if (nIndex != nLen) {
- return FALSE;
+ return false;
}
if (wYear < 1900 || wYear > 2029) {
- return FALSE;
+ return false;
}
if (wMonth < 1 || wMonth > 12) {
if (wMonth == 0 && nLen == wCountY) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (wDay < 1) {
if (wDay == 0 && (nLen == wCountY + wCountM)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (wMonth == 2) {
if (wYear % 400 == 0 || (wYear % 100 != 0 && wYear % 4 == 0)) {
if (wDay > 29) {
- return FALSE;
+ return false;
}
} else {
if (wDay > 28) {
- return FALSE;
+ return false;
}
}
} else if (wDay > LastDay[wMonth - 1]) {
- return FALSE;
+ return false;
}
CFX_Unitime ut;
ut.Set(wYear, static_cast<uint8_t>(wMonth), static_cast<uint8_t>(wDay));
unDate = unDate + ut;
- return TRUE;
+ return true;
}
-FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
+bool CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
int nLen = wsTime.GetLength();
if (nLen < 2)
- return FALSE;
+ return false;
const uint16_t wCountH = 2;
const uint16_t wCountM = 2;
const uint16_t wCountS = 2;
@@ -704,42 +703,42 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
int nStart = 0;
while (nIndex - nStart < wCountH && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
wHour = pTime[nIndex] - '0' + wHour * 10;
nIndex++;
}
if (bSymbol) {
if (nIndex < nLen && pTime[nIndex] != ':')
- return FALSE;
+ return false;
nIndex++;
}
nStart = nIndex;
while (nIndex - nStart < wCountM && nIndex < nLen && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
wMinute = pTime[nIndex] - '0' + wMinute * 10;
nIndex++;
}
if (bSymbol) {
if (nIndex < nLen && pTime[nIndex] != ':')
- return FALSE;
+ return false;
nIndex++;
}
nStart = nIndex;
while (nIndex - nStart < wCountS && nIndex < nLen && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
wSecond = pTime[nIndex] - '0' + wSecond * 10;
nIndex++;
}
if (wsTime.Find('.') > 0) {
if (pTime[nIndex] != '.')
- return FALSE;
+ return false;
nIndex++;
nStart = nIndex;
while (nIndex - nStart < wCountF && nIndex < nLen && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
wFraction = pTime[nIndex] - '0' + wFraction * 10;
nIndex++;
}
@@ -754,34 +753,34 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
nStart = nIndex;
while (nIndex - nStart < wCountH && nIndex < nLen && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
nOffsetH = pTime[nIndex] - '0' + nOffsetH * 10;
nIndex++;
}
if (bSymbol) {
if (nIndex < nLen && pTime[nIndex] != ':')
- return FALSE;
+ return false;
nIndex++;
}
nStart = nIndex;
while (nIndex - nStart < wCountM && nIndex < nLen && pTime[nIndex]) {
if (!FXSYS_isDecimalDigit(pTime[nIndex]))
- return FALSE;
+ return false;
nOffsetM = pTime[nIndex] - '0' + nOffsetM * 10;
nIndex++;
}
if (nOffsetH > 12 || nOffsetM >= 60)
- return FALSE;
+ return false;
}
}
return nIndex == nLen && wHour < 24 && wMinute < 60 && wSecond < 60 &&
wFraction <= 999;
}
-FX_BOOL CXFA_LocaleValue::ValidateCanonicalDateTime(
+bool CXFA_LocaleValue::ValidateCanonicalDateTime(
const CFX_WideString& wsDateTime) {
CFX_WideString wsDate, wsTime;
if (wsDateTime.IsEmpty()) {
- return FALSE;
+ return false;
}
int nSplitIndex = -1;
nSplitIndex = wsDateTime.Find('T');
@@ -789,16 +788,16 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalDateTime(
nSplitIndex = wsDateTime.Find(' ');
}
if (nSplitIndex < 0) {
- return FALSE;
+ return false;
}
wsDate = wsDateTime.Left(nSplitIndex);
wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1);
CFX_Unitime dt;
return ValidateCanonicalDate(wsDate, dt) && ValidateCanonicalTime(wsTime);
}
-FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsPattern,
- IFX_Locale* pLocale) {
+bool CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale) {
IFX_Locale* locale = m_pLocaleMgr->GetDefLocale();
if (pLocale) {
m_pLocaleMgr->SetDefLocale(pLocale);
@@ -806,11 +805,11 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
CFX_FormatString* pFormat = nullptr;
if (m_pLocaleMgr)
- pFormat = new CFX_FormatString(m_pLocaleMgr, FALSE);
+ pFormat = new CFX_FormatString(m_pLocaleMgr, false);
CFX_WideStringArray wsPatterns;
pFormat->SplitFormatString(wsPattern, wsPatterns);
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
int32_t iCount = wsPatterns.GetSize();
for (int32_t i = 0; i < iCount && !bRet; i++) {
CFX_WideString wsFormat = wsPatterns[i];
@@ -872,7 +871,7 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
}
default:
m_wsValue = wsValue;
- bRet = TRUE;
+ bRet = true;
break;
}
}
@@ -888,7 +887,7 @@ FX_BOOL CXFA_LocaleValue::ParsePatternValue(const CFX_WideString& wsValue,
void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString& wsFormat,
int32_t nIntLen,
int32_t nDecLen,
- FX_BOOL bSign) {
+ bool bSign) {
ASSERT(wsFormat.IsEmpty());
ASSERT(nIntLen >= -1 && nDecLen >= -1);
int32_t nTotalLen = (nIntLen >= 0 ? nIntLen : 2) + (bSign ? 1 : 0) +
@@ -921,12 +920,12 @@ void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString& wsFormat,
}
wsFormat.ReleaseBuffer(nTotalLen);
}
-FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
- CFX_WideString& wsFormat,
- IFX_Locale* pLocale,
- int32_t* pos) {
+bool CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
+ CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ int32_t* pos) {
if (wsFormat.IsEmpty() || wsNumeric.IsEmpty()) {
- return TRUE;
+ return true;
}
const FX_WCHAR* pNum = wsNumeric.c_str();
const FX_WCHAR* pFmt = wsFormat.c_str();
@@ -939,27 +938,27 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
}
++nf;
}
- FX_BOOL bLimit = TRUE;
+ bool bLimit = true;
int32_t nCount = wsNumeric.GetLength();
int32_t nCountFmt = wsFormat.GetLength();
- while (n < nCount && (bLimit ? nf < nCountFmt : TRUE) &&
+ while (n < nCount && (bLimit ? nf < nCountFmt : true) &&
FXSYS_isDecimalDigit(c = pNum[n])) {
- if (bLimit == TRUE) {
+ if (bLimit == true) {
if ((cf = pFmt[nf]) == L'*') {
- bLimit = FALSE;
+ bLimit = false;
} else if (cf == L'z') {
nf++;
} else {
- return FALSE;
+ return false;
}
}
n++;
}
if (n == nCount) {
- return TRUE;
+ return true;
}
if (nf == nCountFmt) {
- return FALSE;
+ return false;
}
while (nf < nCountFmt && (cf = pFmt[nf]) != L'.') {
ASSERT(cf == L'z' || cf == L'*');
@@ -972,23 +971,23 @@ FX_BOOL CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
wsDecimalSymbol = CFX_WideString(L'.');
}
if (pFmt[nf] != L'.') {
- return FALSE;
+ return false;
}
if (wsDecimalSymbol != CFX_WideStringC(c) && c != L'.') {
- return FALSE;
+ return false;
}
++nf;
++n;
- bLimit = TRUE;
- while (n < nCount && (bLimit ? nf < nCountFmt : TRUE) &&
+ bLimit = true;
+ while (n < nCount && (bLimit ? nf < nCountFmt : true) &&
FXSYS_isDecimalDigit(c = pNum[n])) {
- if (bLimit == TRUE) {
+ if (bLimit == true) {
if ((cf = pFmt[nf]) == L'*') {
- bLimit = FALSE;
+ bLimit = false;
} else if (cf == L'z') {
nf++;
} else {
- return FALSE;
+ return false;
}
}
n++;
diff --git a/xfa/fxfa/parser/xfa_localevalue.h b/xfa/fxfa/parser/xfa_localevalue.h
index f278c07105..dbc3513a3f 100644
--- a/xfa/fxfa/parser/xfa_localevalue.h
+++ b/xfa/fxfa/parser/xfa_localevalue.h
@@ -41,32 +41,30 @@ class CXFA_LocaleValue {
~CXFA_LocaleValue();
CXFA_LocaleValue& operator=(const CXFA_LocaleValue& value);
- FX_BOOL ValidateValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsPattern,
- IFX_Locale* pLocale,
- CFX_WideString* pMatchFormat = nullptr);
- FX_BOOL FormatPatterns(CFX_WideString& wsResult,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale,
- XFA_VALUEPICTURE eValueType) const;
- FX_BOOL FormatSinglePattern(CFX_WideString& wsResult,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale,
- XFA_VALUEPICTURE eValueType) const;
- FX_BOOL ValidateCanonicalValue(const CFX_WideString& wsValue,
- uint32_t dwVType);
- FX_BOOL ValidateCanonicalDate(const CFX_WideString& wsDate,
- CFX_Unitime& unDate);
- FX_BOOL ValidateCanonicalTime(const CFX_WideString& wsTime);
- FX_BOOL ValidateCanonicalDateTime(const CFX_WideString& wsDateTime);
+ bool ValidateValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale,
+ CFX_WideString* pMatchFormat = nullptr);
+ bool FormatPatterns(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const;
+ bool FormatSinglePattern(CFX_WideString& wsResult,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale,
+ XFA_VALUEPICTURE eValueType) const;
+ bool ValidateCanonicalValue(const CFX_WideString& wsValue, uint32_t dwVType);
+ bool ValidateCanonicalDate(const CFX_WideString& wsDate, CFX_Unitime& unDate);
+ bool ValidateCanonicalTime(const CFX_WideString& wsTime);
+ bool ValidateCanonicalDateTime(const CFX_WideString& wsDateTime);
void GetNumbericFormat(CFX_WideString& wsFormat,
int32_t nIntLen,
int32_t nDecLen,
- FX_BOOL bSign = TRUE);
- FX_BOOL ValidateNumericTemp(CFX_WideString& wsNumeric,
- CFX_WideString& wsFormat,
- IFX_Locale* pLocale = nullptr,
- int32_t* pos = nullptr);
+ bool bSign = true);
+ bool ValidateNumericTemp(CFX_WideString& wsNumeric,
+ CFX_WideString& wsFormat,
+ IFX_Locale* pLocale = nullptr,
+ int32_t* pos = nullptr);
CFX_WideString GetValue() const;
uint32_t GetType() const;
@@ -77,38 +75,38 @@ class CXFA_LocaleValue {
CFX_Unitime GetDate() const;
CFX_Unitime GetTime() const;
CFX_Unitime GetDateTime() const;
- FX_BOOL SetText(const CFX_WideString& wsText);
- FX_BOOL SetText(const CFX_WideString& wsText,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale);
- FX_BOOL SetNum(FX_FLOAT fNum);
- FX_BOOL SetNum(const CFX_WideString& wsNum,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale);
- FX_BOOL SetDate(const CFX_Unitime& d);
- FX_BOOL SetDate(const CFX_WideString& wsDate,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale);
- FX_BOOL SetTime(const CFX_Unitime& t);
- FX_BOOL SetTime(const CFX_WideString& wsTime,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale);
- FX_BOOL SetDateTime(const CFX_Unitime& dt);
- FX_BOOL SetDateTime(const CFX_WideString& wsDateTime,
- const CFX_WideString& wsFormat,
- IFX_Locale* pLocale);
+ bool SetText(const CFX_WideString& wsText);
+ bool SetText(const CFX_WideString& wsText,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ bool SetNum(FX_FLOAT fNum);
+ bool SetNum(const CFX_WideString& wsNum,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ bool SetDate(const CFX_Unitime& d);
+ bool SetDate(const CFX_WideString& wsDate,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ bool SetTime(const CFX_Unitime& t);
+ bool SetTime(const CFX_WideString& wsTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
+ bool SetDateTime(const CFX_Unitime& dt);
+ bool SetDateTime(const CFX_WideString& wsDateTime,
+ const CFX_WideString& wsFormat,
+ IFX_Locale* pLocale);
bool IsNull() const { return m_dwType == XFA_VT_NULL; }
- FX_BOOL IsEmpty() const { return m_wsValue.IsEmpty(); }
- FX_BOOL IsValid() const { return m_bValid; }
+ bool IsEmpty() const { return m_wsValue.IsEmpty(); }
+ bool IsValid() const { return m_bValid; }
protected:
- FX_BOOL ParsePatternValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsPattern,
- IFX_Locale* pLocale);
+ bool ParsePatternValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsPattern,
+ IFX_Locale* pLocale);
CXFA_LocaleMgr* m_pLocaleMgr;
CFX_WideString m_wsValue;
uint32_t m_dwType;
- FX_BOOL m_bValid;
+ bool m_bValid;
};
#endif // XFA_FXFA_PARSER_XFA_LOCALEVALUE_H_
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index 5056f59d9c..c3686ac076 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -88,7 +88,7 @@ class CXFA_Object : public CFXJSE_HostObject {
CFX_WideStringC GetClassName() const;
uint32_t GetClassHashCode() const;
void Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void ThrowException(int32_t iStringID, ...);
@@ -168,137 +168,131 @@ class CXFA_Node : public CXFA_Object {
}
bool NeedsInitApp() const { return HasFlag(XFA_NodeFlag_NeedsInitApp); }
- FX_BOOL IsAttributeInXML();
+ bool IsAttributeInXML();
bool IsFormContainer() const {
return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode();
}
void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; }
CFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; }
CFDE_XMLNode* CreateXMLMappingNode();
- FX_BOOL IsNeedSavingXMLNode();
+ bool IsNeedSavingXMLNode();
uint32_t GetNameHash() const { return m_dwNameHash; }
bool IsUnnamed() const { return m_dwNameHash == 0; }
CXFA_Node* GetModelNode();
void UpdateNameHash();
- FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE);
- FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr,
- const CFX_WideStringC& wsValue,
- bool bNotify = false);
- FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault = TRUE);
- FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr,
- const CFX_WideStringC& wsValue,
- bool bNotify = false);
- FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault = TRUE);
- FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr);
- FX_BOOL SetContent(const CFX_WideString& wsContent,
- const CFX_WideString& wsXMLValue,
- bool bNotify = false,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bSyncData = TRUE);
- FX_BOOL TryContent(CFX_WideString& wsContent,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bProto = TRUE);
+ bool HasAttribute(XFA_ATTRIBUTE eAttr, bool bCanInherit = false);
+ bool SetAttribute(XFA_ATTRIBUTE eAttr,
+ const CFX_WideStringC& wsValue,
+ bool bNotify = false);
+ bool GetAttribute(XFA_ATTRIBUTE eAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault = true);
+ bool SetAttribute(const CFX_WideStringC& wsAttr,
+ const CFX_WideStringC& wsValue,
+ bool bNotify = false);
+ bool GetAttribute(const CFX_WideStringC& wsAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault = true);
+ bool RemoveAttribute(const CFX_WideStringC& wsAttr);
+ bool SetContent(const CFX_WideString& wsContent,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify = false,
+ bool bScriptModify = false,
+ bool bSyncData = true);
+ bool TryContent(CFX_WideString& wsContent,
+ bool bScriptModify = false,
+ bool bProto = true);
CFX_WideString GetContent();
- FX_BOOL TryNamespace(CFX_WideString& wsNamespace);
+ bool TryNamespace(CFX_WideString& wsNamespace);
- FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr,
- FX_BOOL bValue,
- bool bNotify = false) {
+ bool SetBoolean(XFA_ATTRIBUTE eAttr, bool bValue, bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue,
bNotify);
}
- FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr,
- FX_BOOL& bValue,
- FX_BOOL bUseDefault = TRUE);
- FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) {
- FX_BOOL bValue;
- return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE;
+ bool TryBoolean(XFA_ATTRIBUTE eAttr, bool& bValue, bool bUseDefault = true);
+ bool GetBoolean(XFA_ATTRIBUTE eAttr) {
+ bool bValue;
+ return TryBoolean(eAttr, bValue, true) ? bValue : false;
}
- FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr,
- int32_t iValue,
- bool bNotify = false) {
+ bool SetInteger(XFA_ATTRIBUTE eAttr, int32_t iValue, bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue,
bNotify);
}
- FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr,
- int32_t& iValue,
- FX_BOOL bUseDefault = TRUE);
+ bool TryInteger(XFA_ATTRIBUTE eAttr,
+ int32_t& iValue,
+ bool bUseDefault = true);
int32_t GetInteger(XFA_ATTRIBUTE eAttr) {
int32_t iValue;
- return TryInteger(eAttr, iValue, TRUE) ? iValue : 0;
+ return TryInteger(eAttr, iValue, true) ? iValue : 0;
}
- FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTEENUM eValue,
- bool bNotify = false) {
+ bool SetEnum(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTEENUM eValue,
+ bool bNotify = false) {
return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue,
bNotify);
}
- FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTEENUM& eValue,
- FX_BOOL bUseDefault = TRUE);
+ bool TryEnum(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTEENUM& eValue,
+ bool bUseDefault = true);
XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) {
XFA_ATTRIBUTEENUM eValue;
- return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown;
+ return TryEnum(eAttr, eValue, true) ? eValue : XFA_ATTRIBUTEENUM_Unknown;
}
- FX_BOOL SetCData(XFA_ATTRIBUTE eAttr,
- const CFX_WideString& wsValue,
- bool bNotify = false,
- FX_BOOL bScriptModify = FALSE);
- FX_BOOL SetAttributeValue(const CFX_WideString& wsValue,
- const CFX_WideString& wsXMLValue,
- bool bNotify = false,
- FX_BOOL bScriptModify = FALSE);
- FX_BOOL TryCData(XFA_ATTRIBUTE eAttr,
- CFX_WideString& wsValue,
- FX_BOOL bUseDefault = TRUE,
- FX_BOOL bProto = TRUE);
- FX_BOOL TryCData(XFA_ATTRIBUTE eAttr,
- CFX_WideStringC& wsValue,
- FX_BOOL bUseDefault = TRUE,
- FX_BOOL bProto = TRUE);
+ bool SetCData(XFA_ATTRIBUTE eAttr,
+ const CFX_WideString& wsValue,
+ bool bNotify = false,
+ bool bScriptModify = false);
+ bool SetAttributeValue(const CFX_WideString& wsValue,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify = false,
+ bool bScriptModify = false);
+ bool TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideString& wsValue,
+ bool bUseDefault = true,
+ bool bProto = true);
+ bool TryCData(XFA_ATTRIBUTE eAttr,
+ CFX_WideStringC& wsValue,
+ bool bUseDefault = true,
+ bool bProto = true);
CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) {
CFX_WideStringC wsValue;
return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC();
}
- FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr,
- CXFA_Measurement mValue,
- bool bNotify = false);
- FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr,
- CXFA_Measurement& mValue,
- FX_BOOL bUseDefault = TRUE) const;
+ bool SetMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement mValue,
+ bool bNotify = false);
+ bool TryMeasure(XFA_ATTRIBUTE eAttr,
+ CXFA_Measurement& mValue,
+ bool bUseDefault = true) const;
CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) const;
- FX_BOOL SetObject(XFA_ATTRIBUTE eAttr,
- void* pData,
- XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
- FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData);
+ bool SetObject(XFA_ATTRIBUTE eAttr,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
+ bool TryObject(XFA_ATTRIBUTE eAttr, void*& pData);
void* GetObject(XFA_ATTRIBUTE eAttr) {
void* pData;
return TryObject(eAttr, pData) ? pData : nullptr;
}
- FX_BOOL SetUserData(void* pKey,
- void* pData,
- XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
- FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE);
- void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) {
+ bool SetUserData(void* pKey,
+ void* pData,
+ XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
+ bool TryUserData(void* pKey, void*& pData, bool bProtoAlso = false);
+ void* GetUserData(void* pKey, bool bProtoAlso = false) {
void* pData;
return TryUserData(pKey, pData, bProtoAlso) ? pData : nullptr;
}
CXFA_Node* GetProperty(int32_t index,
XFA_Element eType,
- FX_BOOL bCreateProperty = TRUE);
- int32_t CountChildren(XFA_Element eType, FX_BOOL bOnlyChild = FALSE);
+ bool bCreateProperty = true);
+ int32_t CountChildren(XFA_Element eType, bool bOnlyChild = false);
CXFA_Node* GetChild(int32_t index,
XFA_Element eType,
- FX_BOOL bOnlyChild = FALSE);
+ bool bOnlyChild = false);
int32_t InsertChild(int32_t index, CXFA_Node* pNode);
- FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = nullptr);
- FX_BOOL RemoveChild(CXFA_Node* pNode, bool bNotify = true);
- CXFA_Node* Clone(FX_BOOL bRecursive);
+ bool InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = nullptr);
+ bool RemoveChild(CXFA_Node* pNode, bool bNotify = true);
+ CXFA_Node* Clone(bool bRecursive);
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const;
CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_ObjectType eType) const;
int32_t GetNodeList(CXFA_NodeArray& nodes,
@@ -308,7 +302,7 @@ class CXFA_Node : public CXFA_Object {
int32_t iLevel = 1);
CXFA_Node* CreateSamePacketNode(XFA_Element eType,
uint32_t dwFlags = XFA_NodeFlag_Initialized);
- CXFA_Node* CloneTemplateToForm(FX_BOOL bRecursive);
+ CXFA_Node* CloneTemplateToForm(bool bRecursive);
CXFA_Node* GetTemplateNode() const;
void SetTemplateNode(CXFA_Node* pTemplateNode);
CXFA_Node* GetDataDescriptionNode();
@@ -317,10 +311,10 @@ class CXFA_Node : public CXFA_Object {
int32_t GetBindItems(CXFA_NodeArray& formItems);
int32_t AddBindItem(CXFA_Node* pFormNode);
int32_t RemoveBindItem(CXFA_Node* pFormNode);
- FX_BOOL HasBindItem();
+ bool HasBindItem();
CXFA_WidgetData* GetWidgetData();
CXFA_WidgetData* GetContainerWidgetData();
- FX_BOOL GetLocaleName(CFX_WideString& wsLocaleName);
+ bool GetLocaleName(CFX_WideString& wsLocaleName);
XFA_ATTRIBUTEENUM GetIntact();
CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const;
CXFA_Node* GetFirstChildByName(uint32_t dwNodeNameHash) const;
@@ -341,25 +335,25 @@ class CXFA_Node : public CXFA_Object {
uint32_t dwFlag,
CXFA_Node* refNode = nullptr);
void Script_TreeClass_All(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_Nodes(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_Parent(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_Index(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments);
void Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments);
@@ -373,19 +367,19 @@ class CXFA_Node : public CXFA_Object {
void Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments);
void Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments);
void Script_NodeClass_Ns(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_Model(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_IsNull(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ContainerClass_GetDelta(CFXJSE_Arguments* pArguments);
void Script_ContainerClass_GetDeltas(CFXJSE_Arguments* pArguments);
@@ -393,104 +387,104 @@ class CXFA_Node : public CXFA_Object {
void Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments);
void Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments);
void Script_ModelClass_Context(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ModelClass_AliasNode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments);
void Script_Delta_Restore(CFXJSE_Arguments* pArguments);
void Script_Delta_CurrentValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Delta_SavedValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Delta_Target(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_SendAttributeChangeMessage(XFA_ATTRIBUTE eAttribute,
- FX_BOOL bScriptModify);
+ bool bScriptModify);
void Script_Attribute_Integer(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_BOOL(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_String(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_StringRead(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_ValidationMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_Length(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Boolean_Value(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_Message(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_SOM_MESSAGETYPE iMessageType);
void Script_Som_BorderColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_BorderWidth(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_FillColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_DataNode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_FontColor(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_Mandatory(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_MandatoryMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Som_InstanceIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Draw_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_DefaultValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_EditValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_FormatMessage(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_FormattedValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_ParentSubform(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_SelectedIndex(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_ClearItems(CFXJSE_Arguments* pArguments);
void Script_Field_ExecEvent(CFXJSE_Arguments* pArguments);
@@ -506,13 +500,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Field_AddItem(CFXJSE_Arguments* pArguments);
void Script_Field_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ExclGroup_Transient(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments);
void Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments);
@@ -520,10 +514,10 @@ class CXFA_Node : public CXFA_Object {
void Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments);
void Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_Subform_InstanceManager(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Subform_Locale(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments);
void Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments);
@@ -541,13 +535,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Template_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments);
void Script_InstanceManager_Count(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_InstanceManager_Max(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_InstanceManager_Min(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments);
void Script_InstanceManager_RemoveInstance(CFXJSE_Arguments* pArguments);
@@ -557,10 +551,10 @@ class CXFA_Node : public CXFA_Object {
int32_t InstanceManager_SetInstances(int32_t iCount);
int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom);
void Script_Occur_Max(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Occur_Min(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Desc_Metadata(CFXJSE_Arguments* pArguments);
void Script_Form_FormNodes(CFXJSE_Arguments* pArguments);
@@ -570,13 +564,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments);
void Script_Form_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_Form_Checksum(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments);
void Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments);
void Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments);
void Script_Packet_Content(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Source_Next(CFXJSE_Arguments* pArguments);
void Script_Source_CancelBatch(CFXJSE_Arguments* pArguments);
@@ -596,25 +590,25 @@ class CXFA_Node : public CXFA_Object {
void Script_Source_Last(CFXJSE_Arguments* pArguments);
void Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments);
void Script_Source_Db(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Xfa_This(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Handler_Version(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_SubmitFormat_Mode(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Extras_Type(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Encrypt_Format(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Script_Stateless(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
protected:
@@ -629,48 +623,48 @@ class CXFA_Node : public CXFA_Object {
bool HasFlag(XFA_NodeFlag dwFlag) const;
CXFA_Node* Deprecated_GetPrevSibling();
- FX_BOOL SetValue(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTETYPE eType,
- void* pValue,
- bool bNotify);
- FX_BOOL GetValue(XFA_ATTRIBUTE eAttr,
- XFA_ATTRIBUTETYPE eType,
- FX_BOOL bUseDefault,
- void*& pValue);
+ bool SetValue(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTETYPE eType,
+ void* pValue,
+ bool bNotify);
+ bool GetValue(XFA_ATTRIBUTE eAttr,
+ XFA_ATTRIBUTETYPE eType,
+ bool bUseDefault,
+ void*& pValue);
void OnRemoved(bool bNotify);
void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify);
- void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, FX_BOOL bScriptModify);
+ void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, bool bScriptModify);
int32_t execSingleEventByName(const CFX_WideStringC& wsEventName,
XFA_Element eType);
- FX_BOOL SetScriptContent(const CFX_WideString& wsContent,
- const CFX_WideString& wsXMLValue,
- bool bNotify = true,
- FX_BOOL bScriptModify = FALSE,
- FX_BOOL bSyncData = TRUE);
- CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE);
+ bool SetScriptContent(const CFX_WideString& wsContent,
+ const CFX_WideString& wsXMLValue,
+ bool bNotify = true,
+ bool bScriptModify = false,
+ bool bSyncData = true);
+ CFX_WideString GetScriptContent(bool bScriptModify = false);
XFA_MAPMODULEDATA* CreateMapModuleData();
XFA_MAPMODULEDATA* GetMapModuleData() const;
void SetMapModuleValue(void* pKey, void* pValue);
- FX_BOOL GetMapModuleValue(void* pKey, void*& pValue);
+ bool GetMapModuleValue(void* pKey, void*& pValue);
void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue);
- FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue);
+ bool GetMapModuleString(void* pKey, CFX_WideStringC& wsValue);
void SetMapModuleBuffer(
void* pKey,
void* pValue,
int32_t iBytes,
XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr);
- FX_BOOL GetMapModuleBuffer(void* pKey,
- void*& pValue,
- int32_t& iBytes,
- FX_BOOL bProtoAlso = TRUE) const;
- FX_BOOL HasMapModuleKey(void* pKey, FX_BOOL bProtoAlso = FALSE);
+ bool GetMapModuleBuffer(void* pKey,
+ void*& pValue,
+ int32_t& iBytes,
+ bool bProtoAlso = true) const;
+ bool HasMapModuleKey(void* pKey, bool bProtoAlso = false);
void RemoveMapModuleKey(void* pKey = nullptr);
- void MergeAllData(void* pDstModule, FX_BOOL bUseSrcAttr = TRUE);
+ void MergeAllData(void* pDstModule, bool bUseSrcAttr = true);
void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey);
void MoveBufferMapData(CXFA_Node* pSrcModule,
CXFA_Node* pDstModule,
void* pKey,
- FX_BOOL bRecursive = FALSE);
+ bool bRecursive = false);
CXFA_Node* m_pNext;
CXFA_Node* m_pChild;
@@ -704,9 +698,9 @@ class CXFA_NodeList : public CXFA_Object {
CXFA_Node* NamedItem(const CFX_WideStringC& wsName);
virtual int32_t GetLength() = 0;
- virtual FX_BOOL Append(CXFA_Node* pNode) = 0;
- virtual FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0;
- virtual FX_BOOL Remove(CXFA_Node* pNode) = 0;
+ virtual bool Append(CXFA_Node* pNode) = 0;
+ virtual bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0;
+ virtual bool Remove(CXFA_Node* pNode) = 0;
virtual CXFA_Node* Item(int32_t iIndex) = 0;
void Script_ListClass_Append(CFXJSE_Arguments* pArguments);
@@ -716,7 +710,7 @@ class CXFA_NodeList : public CXFA_Object {
void Script_TreelistClass_NamedItem(CFXJSE_Arguments* pArguments);
void Script_ListClass_Length(CFXJSE_Value* pValue,
- FX_BOOL bSetting,
+ bool bSetting,
XFA_ATTRIBUTE eAttribute);
};
@@ -727,9 +721,9 @@ class CXFA_ArrayNodeList : public CXFA_NodeList {
// From CXFA_NodeList.
int32_t GetLength() override;
- FX_BOOL Append(CXFA_Node* pNode) override;
- FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override;
- FX_BOOL Remove(CXFA_Node* pNode) override;
+ bool Append(CXFA_Node* pNode) override;
+ bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override;
+ bool Remove(CXFA_Node* pNode) override;
CXFA_Node* Item(int32_t iIndex) override;
void SetArrayNodeList(const CXFA_NodeArray& srcArray);
@@ -744,9 +738,9 @@ class CXFA_AttachNodeList : public CXFA_NodeList {
// From CXFA_NodeList.
int32_t GetLength() override;
- FX_BOOL Append(CXFA_Node* pNode) override;
- FX_BOOL Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override;
- FX_BOOL Remove(CXFA_Node* pNode) override;
+ bool Append(CXFA_Node* pNode) override;
+ bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override;
+ bool Remove(CXFA_Node* pNode) override;
CXFA_Node* Item(int32_t iIndex) override;
protected:
diff --git a/xfa/fxfa/parser/xfa_resolvenode_rs.h b/xfa/fxfa/parser/xfa_resolvenode_rs.h
index 633d080876..2e7e297aea 100644
--- a/xfa/fxfa/parser/xfa_resolvenode_rs.h
+++ b/xfa/fxfa/parser/xfa_resolvenode_rs.h
@@ -47,7 +47,7 @@ struct XFA_RESOLVENODE_RS {
for (int32_t i = 0; i < nodes.GetSize(); i++) {
std::unique_ptr<CFXJSE_Value> pValue(new CFXJSE_Value(pIsolate));
(nodes[i]->*(pScriptAttribute->lpfnCallback))(
- pValue.get(), FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
+ pValue.get(), false, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
valueArray.Add(pValue.release());
}
}
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 3967784fe9..6f54c0e5fe 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -204,8 +204,8 @@ void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode,
}
}
-FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode) {
- FX_BOOL bRet = FALSE;
+bool XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode) {
+ bool bRet = false;
if (!pFieldNode)
return bRet;
@@ -395,29 +395,29 @@ CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_Element eElement,
return CXFA_Measurement();
}
-FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue,
- XFA_Element eElement,
- XFA_ATTRIBUTE eAttribute,
- XFA_ATTRIBUTETYPE eType,
- uint32_t dwPacket) {
+bool XFA_GetAttributeDefaultValue(void*& pValue,
+ XFA_Element eElement,
+ XFA_ATTRIBUTE eAttribute,
+ XFA_ATTRIBUTETYPE eType,
+ uint32_t dwPacket) {
const XFA_ATTRIBUTEINFO* pInfo = XFA_GetAttributeByID(eAttribute);
if (!pInfo)
- return FALSE;
+ return false;
if (dwPacket && (dwPacket & pInfo->dwPackets) == 0)
- return FALSE;
+ return false;
if (pInfo->eType == eType) {
pValue = pInfo->pDefValue;
- return TRUE;
+ return true;
}
if (pInfo->eType == XFA_ATTRIBUTETYPE_NOTSURE) {
const XFA_NOTSUREATTRIBUTE* pAttr =
XFA_GetNotsureAttribute(eElement, eAttribute, eType);
if (pAttr) {
pValue = pAttr->pValue;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName) {
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index 90168604eb..9a84fd6f67 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -18,7 +18,7 @@ class CXFA_LocaleValue;
class CXFA_Node;
class CXFA_WidgetData;
-FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier(
+bool XFA_FDEExtension_ResolveNamespaceQualifier(
CFDE_XMLElement* pNode,
const CFX_WideStringC& wsQualifier,
CFX_WideString& wsNamespaceURI);
@@ -32,24 +32,24 @@ class CXFA_NodeIteratorTemplate {
m_NodeStack.Push(pRootNode);
}
}
- FX_BOOL Init(NodeType* pRootNode) {
+ bool Init(NodeType* pRootNode) {
if (!pRootNode) {
- return FALSE;
+ return false;
}
m_pRoot = pRootNode;
- m_NodeStack.RemoveAll(FALSE);
+ m_NodeStack.RemoveAll(false);
m_NodeStack.Push(pRootNode);
- return TRUE;
+ return true;
}
- void Clear() { m_NodeStack.RemoveAll(FALSE); }
+ void Clear() { m_NodeStack.RemoveAll(false); }
void Reset() {
Clear();
if (m_pRoot) {
m_NodeStack.Push(m_pRoot);
}
}
- FX_BOOL SetCurrent(NodeType* pCurNode) {
- m_NodeStack.RemoveAll(FALSE);
+ bool SetCurrent(NodeType* pCurNode) {
+ m_NodeStack.RemoveAll(false);
if (pCurNode) {
CFX_StackTemplate<NodeType*> revStack(100);
NodeType* pNode;
@@ -58,7 +58,7 @@ class CXFA_NodeIteratorTemplate {
revStack.Push(pNode);
}
if (!pNode) {
- return FALSE;
+ return false;
}
revStack.Push(m_pRoot);
while (revStack.GetSize()) {
@@ -66,7 +66,7 @@ class CXFA_NodeIteratorTemplate {
revStack.Pop();
}
}
- return TRUE;
+ return true;
}
NodeType* GetCurrent() const {
return m_NodeStack.GetSize() ? *m_NodeStack.GetTopElement() : nullptr;
@@ -94,7 +94,7 @@ class CXFA_NodeIteratorTemplate {
}
m_NodeStack.Push(pPrevItem);
} else {
- m_NodeStack.RemoveAll(FALSE);
+ m_NodeStack.RemoveAll(false);
if (m_pRoot) {
m_NodeStack.Push(m_pRoot);
}
@@ -166,16 +166,16 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData);
FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal);
int32_t XFA_MapRotation(int32_t nRotation);
-FX_BOOL XFA_RecognizeRichText(CFDE_XMLElement* pRichTextXMLNode);
+bool XFA_RecognizeRichText(CFDE_XMLElement* pRichTextXMLNode);
void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode,
CFX_WideString& wsPlainText);
-FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode);
+bool XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode);
void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode);
void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
IFX_Stream* pStream,
const FX_CHAR* pChecksum = nullptr,
- FX_BOOL bSaveXML = FALSE);
+ bool bSaveXML = false);
const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(
XFA_Element eElement,
@@ -197,11 +197,11 @@ XFA_Element XFA_GetElementTypeForName(const CFX_WideStringC& wsName);
CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_Element eElement,
XFA_ATTRIBUTE eAttribute,
uint32_t dwPacket);
-FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue,
- XFA_Element eElement,
- XFA_ATTRIBUTE eAttribute,
- XFA_ATTRIBUTETYPE eType,
- uint32_t dwPacket);
+bool XFA_GetAttributeDefaultValue(void*& pValue,
+ XFA_Element eElement,
+ XFA_ATTRIBUTE eAttribute,
+ XFA_ATTRIBUTETYPE eType,
+ uint32_t dwPacket);
const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName);
const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_ATTRIBUTE eName);
const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByName(
diff --git a/xfa/fxfa/xfa_checksum.h b/xfa/fxfa/xfa_checksum.h
index 60312772a9..8f739151f4 100644
--- a/xfa/fxfa/xfa_checksum.h
+++ b/xfa/fxfa/xfa_checksum.h
@@ -49,7 +49,7 @@ class CXFA_SAXReaderHandler {
uint32_t dwStartPos);
protected:
- void UpdateChecksum(FX_BOOL bCheckSpace);
+ void UpdateChecksum(bool bCheckSpace);
CXFA_ChecksumContext* m_pContext;
CXFA_SAXContext m_SAXContext;
@@ -62,9 +62,9 @@ class CXFA_ChecksumContext {
void StartChecksum();
void Update(const CFX_ByteStringC& bsText);
- FX_BOOL UpdateChecksum(IFX_SeekableReadStream* pSrcFile,
- FX_FILESIZE offset = 0,
- size_t size = 0);
+ bool UpdateChecksum(IFX_SeekableReadStream* pSrcFile,
+ FX_FILESIZE offset = 0,
+ size_t size = 0);
void FinishChecksum();
CFX_ByteString GetChecksum() const;
diff --git a/xfa/fxfa/xfa_ffapp.h b/xfa/fxfa/xfa_ffapp.h
index 7d4893e827..359f8ffa3c 100644
--- a/xfa/fxfa/xfa_ffapp.h
+++ b/xfa/fxfa/xfa_ffapp.h
@@ -45,7 +45,7 @@ class CXFA_FFApp {
CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
IFX_SeekableReadStream* pStream,
- FX_BOOL bTakeOverFile);
+ bool bTakeOverFile);
CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
CPDF_Document* pPDFDoc);
void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr);
diff --git a/xfa/fxfa/xfa_ffdoc.h b/xfa/fxfa/xfa_ffdoc.h
index 3976f1d5fd..a31f6d7e50 100644
--- a/xfa/fxfa/xfa_ffdoc.h
+++ b/xfa/fxfa/xfa_ffdoc.h
@@ -40,9 +40,9 @@ class CXFA_FFDoc {
CXFA_FFDocView* CreateDocView(uint32_t dwView = 0);
- FX_BOOL OpenDoc(IFX_SeekableReadStream* pStream, FX_BOOL bTakeOverFile);
- FX_BOOL OpenDoc(CPDF_Document* pPDFDoc);
- FX_BOOL CloseDoc();
+ bool OpenDoc(IFX_SeekableReadStream* pStream, bool bTakeOverFile);
+ bool OpenDoc(CPDF_Document* pPDFDoc);
+ bool CloseDoc();
CXFA_Document* GetXFADoc() { return m_pDocumentParser->GetDocument(); }
CXFA_FFApp* GetApp() { return m_pApp; }
@@ -56,7 +56,7 @@ class CXFA_FFDoc {
bool SavePackage(XFA_HashCode code,
IFX_SeekableWriteStream* pFile,
CXFA_ChecksumContext* pCSContext);
- FX_BOOL ImportData(IFX_SeekableReadStream* pStream, FX_BOOL bXDP = TRUE);
+ bool ImportData(IFX_SeekableReadStream* pStream, bool bXDP = true);
protected:
IXFA_DocEnvironment* const m_pDocEnvironment;
@@ -68,7 +68,7 @@ class CXFA_FFDoc {
std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap;
std::map<uint32_t, std::unique_ptr<CXFA_FFDocView>> m_TypeToDocViewMap;
uint32_t m_dwDocType;
- FX_BOOL m_bOwnStream;
+ bool m_bOwnStream;
};
#endif // XFA_FXFA_XFA_FFDOC_H_
diff --git a/xfa/fxfa/xfa_ffdochandler.h b/xfa/fxfa/xfa_ffdochandler.h
index 3ffdae729a..0e4f71786c 100644
--- a/xfa/fxfa/xfa_ffdochandler.h
+++ b/xfa/fxfa/xfa_ffdochandler.h
@@ -19,11 +19,11 @@ class CXFA_FFDocHandler {
CFXJSE_Value* GetXFAScriptObject(CXFA_FFDoc* hDoc);
XFA_ATTRIBUTEENUM GetRestoreState(CXFA_FFDoc* hDoc);
- FX_BOOL RunDocScript(CXFA_FFDoc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const CFX_WideStringC& wsScript,
- CFXJSE_Value* pRetValue,
- CFXJSE_Value* pThisObject);
+ bool RunDocScript(CXFA_FFDoc* hDoc,
+ XFA_SCRIPTTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ CFXJSE_Value* pRetValue,
+ CFXJSE_Value* pThisObject);
protected:
};
diff --git a/xfa/fxfa/xfa_ffdocview.h b/xfa/fxfa/xfa_ffdocview.h
index dcc2f469da..31e4df955f 100644
--- a/xfa/fxfa/xfa_ffdocview.h
+++ b/xfa/fxfa/xfa_ffdocview.h
@@ -57,7 +57,7 @@ class CXFA_FFDocView {
XFA_WIDGETORDER eOrder = XFA_WIDGETORDER_PreOrder);
CXFA_FFWidget* GetFocusWidget();
void KillFocus();
- FX_BOOL SetFocus(CXFA_FFWidget* hWidget);
+ bool SetFocus(CXFA_FFWidget* hWidget);
CXFA_FFWidget* GetWidgetByName(const CFX_WideString& wsName,
CXFA_FFWidget* pRefWidget);
CXFA_WidgetAcc* GetWidgetAccByName(const CFX_WideString& wsName,
@@ -66,7 +66,7 @@ class CXFA_FFDocView {
void OnPageEvent(CXFA_ContainerLayoutItem* pSender, uint32_t dwEvent);
void LockUpdate();
void UnlockUpdate();
- FX_BOOL IsUpdateLocked();
+ bool IsUpdateLocked();
void ClearInvalidateList();
void AddInvalidateRect(CXFA_FFWidget* pWidget, const CFX_RectF& rtInvalidate);
void AddInvalidateRect(CXFA_FFPageView* pPageView,
@@ -75,8 +75,8 @@ class CXFA_FFDocView {
void RunDocClose();
void DestroyDocView();
- FX_BOOL InitValidate(CXFA_Node* pNode);
- FX_BOOL RunValidate();
+ bool InitValidate(CXFA_Node* pNode);
+ bool RunValidate();
void SetChangeMark();
@@ -84,8 +84,8 @@ class CXFA_FFDocView {
void AddCalculateNodeNotify(CXFA_Node* pNodeChange);
void AddCalculateWidgetAcc(CXFA_WidgetAcc* pWidgetAcc);
int32_t RunCalculateWidgets();
- FX_BOOL IsStaticNotify();
- FX_BOOL RunLayout();
+ bool IsStaticNotify();
+ bool RunLayout();
void RunSubformIndexChange();
void AddNewFormNode(CXFA_Node* pNode);
void AddIndexChangedSubform(CXFA_Node* pNode);
@@ -94,22 +94,22 @@ class CXFA_FFDocView {
void DeleteLayoutItem(CXFA_FFWidget* pWidget);
int32_t ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
XFA_EVENTTYPE eEventType,
- FX_BOOL bIsFormReady,
- FX_BOOL bRecursive,
+ bool bIsFormReady,
+ bool bRecursive,
CXFA_Node* pExclude);
- FX_BOOL m_bLayoutEvent;
+ bool m_bLayoutEvent;
CFX_WideStringArray m_arrNullTestMsg;
CXFA_FFWidget* m_pListFocusWidget;
- FX_BOOL m_bInLayoutStatus;
+ bool m_bInLayoutStatus;
protected:
- FX_BOOL RunEventLayoutReady();
+ bool RunEventLayoutReady();
void RunBindItems();
- FX_BOOL InitCalculate(CXFA_Node* pNode);
+ bool InitCalculate(CXFA_Node* pNode);
void InitLayout(CXFA_Node* pNode);
void RunCalculateRecursive(int32_t& iIndex);
void ShowNullTestMsg();
- FX_BOOL ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc);
+ bool ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc);
CXFA_Node* GetRootSubform();
CXFA_FFDoc* const m_pDoc;
@@ -140,7 +140,7 @@ class CXFA_WidgetAccIterator {
CXFA_WidgetAcc* MoveToNext();
CXFA_WidgetAcc* MoveToPrevious();
CXFA_WidgetAcc* GetCurrentWidgetAcc();
- FX_BOOL SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget);
+ bool SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget);
void SkipTree();
protected:
diff --git a/xfa/fxfa/xfa_ffpageview.h b/xfa/fxfa/xfa_ffpageview.h
index cd0f68c080..c6bbe7dbe9 100644
--- a/xfa/fxfa/xfa_ffpageview.h
+++ b/xfa/fxfa/xfa_ffpageview.h
@@ -48,7 +48,7 @@ class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator {
CXFA_FFWidget* MoveToNext() override;
CXFA_FFWidget* MoveToPrevious() override;
CXFA_FFWidget* GetCurrentWidget() override;
- FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) override;
+ bool SetCurrentWidget(CXFA_FFWidget* hWidget) override;
protected:
CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem);
@@ -56,7 +56,7 @@ class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator {
CXFA_FFPageView* m_pPageView;
CXFA_FFWidget* m_hCurWidget;
uint32_t m_dwFilter;
- FX_BOOL m_bIgnorerelevant;
+ bool m_bIgnorerelevant;
CXFA_LayoutItemIterator m_sIterator;
};
typedef CFX_ArrayTemplate<CXFA_FFWidget*> CXFA_WidgetArray;
@@ -82,7 +82,7 @@ class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator {
CXFA_FFWidget* MoveToNext() override;
CXFA_FFWidget* MoveToPrevious() override;
CXFA_FFWidget* GetCurrentWidget() override;
- FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) override;
+ bool SetCurrentWidget(CXFA_FFWidget* hWidget) override;
protected:
CXFA_FFWidget* GetTraverseWidget(CXFA_FFWidget* pWidget);
@@ -94,15 +94,15 @@ class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator {
void OrderContainer(CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
- FX_BOOL& bCurrentItem,
- FX_BOOL& bContentArea,
- FX_BOOL bMarsterPage = FALSE);
+ bool& bCurrentItem,
+ bool& bContentArea,
+ bool bMarsterPage = false);
CXFA_WidgetArray m_TabOrderWidgetArray;
CXFA_FFPageView* m_pPageView;
uint32_t m_dwFilter;
int32_t m_iCurWidget;
- FX_BOOL m_bIgnorerelevant;
+ bool m_bIgnorerelevant;
};
#endif // XFA_FXFA_XFA_FFPAGEVIEW_H_
diff --git a/xfa/fxfa/xfa_ffwidget.h b/xfa/fxfa/xfa_ffwidget.h
index c8c954d8b9..a2aaee2fe2 100644
--- a/xfa/fxfa/xfa_ffwidget.h
+++ b/xfa/fxfa/xfa_ffwidget.h
@@ -46,59 +46,59 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem {
CXFA_FFWidget(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
~CXFA_FFWidget() override;
- virtual FX_BOOL GetBBox(CFX_RectF& rtBox,
- uint32_t dwStatus,
- FX_BOOL bDrawFocus = FALSE);
+ virtual bool GetBBox(CFX_RectF& rtBox,
+ uint32_t dwStatus,
+ bool bDrawFocus = false);
virtual void RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
uint32_t dwStatus);
- virtual FX_BOOL IsLoaded();
- virtual FX_BOOL LoadWidget();
+ virtual bool IsLoaded();
+ virtual bool LoadWidget();
virtual void UnloadWidget();
- virtual FX_BOOL PerformLayout();
- virtual FX_BOOL UpdateFWLData();
+ virtual bool PerformLayout();
+ virtual bool UpdateFWLData();
virtual void UpdateWidgetProperty();
- virtual FX_BOOL OnMouseEnter();
- virtual FX_BOOL OnMouseExit();
- virtual FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnMouseWheel(uint32_t dwFlags,
- int16_t zDelta,
- FX_FLOAT fx,
- FX_FLOAT fy);
- virtual FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
-
- virtual FX_BOOL OnSetFocus(CXFA_FFWidget* pOldWidget);
- virtual FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget);
- virtual FX_BOOL OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags);
- virtual FX_BOOL OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags);
- virtual FX_BOOL OnChar(uint32_t dwChar, uint32_t dwFlags);
+ virtual bool OnMouseEnter();
+ virtual bool OnMouseExit();
+ virtual bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnLButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnLButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnMouseWheel(uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ virtual bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool OnRButtonDblClk(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy);
+
+ virtual bool OnSetFocus(CXFA_FFWidget* pOldWidget);
+ virtual bool OnKillFocus(CXFA_FFWidget* pNewWidget);
+ virtual bool OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags);
+ virtual bool OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags);
+ virtual bool OnChar(uint32_t dwChar, uint32_t dwFlags);
virtual FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL OnSetCursor(FX_FLOAT fx, FX_FLOAT fy);
- virtual FX_BOOL CanUndo();
- virtual FX_BOOL CanRedo();
- virtual FX_BOOL Undo();
- virtual FX_BOOL Redo();
- virtual FX_BOOL CanCopy();
- virtual FX_BOOL CanCut();
- virtual FX_BOOL CanPaste();
- virtual FX_BOOL CanSelectAll();
- virtual FX_BOOL CanDelete();
- virtual FX_BOOL CanDeSelect();
- virtual FX_BOOL Copy(CFX_WideString& wsCopy);
- virtual FX_BOOL Cut(CFX_WideString& wsCut);
- virtual FX_BOOL Paste(const CFX_WideString& wsPaste);
- virtual FX_BOOL SelectAll();
- virtual FX_BOOL Delete();
- virtual FX_BOOL DeSelect();
- virtual FX_BOOL GetSuggestWords(CFX_PointF pointf,
- std::vector<CFX_ByteString>& sSuggest);
- virtual FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
- const CFX_ByteStringC& bsReplace);
+ virtual bool OnSetCursor(FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool CanUndo();
+ virtual bool CanRedo();
+ virtual bool Undo();
+ virtual bool Redo();
+ virtual bool CanCopy();
+ virtual bool CanCut();
+ virtual bool CanPaste();
+ virtual bool CanSelectAll();
+ virtual bool CanDelete();
+ virtual bool CanDeSelect();
+ virtual bool Copy(CFX_WideString& wsCopy);
+ virtual bool Cut(CFX_WideString& wsCut);
+ virtual bool Paste(const CFX_WideString& wsPaste);
+ virtual bool SelectAll();
+ virtual bool Delete();
+ virtual bool DeSelect();
+ virtual bool GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest);
+ virtual bool ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace);
CXFA_FFPageView* GetPageView();
void SetPageView(CXFA_FFPageView* pPageView);
@@ -108,7 +108,7 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem {
void ModifyStatus(uint32_t dwAdded, uint32_t dwRemoved);
CXFA_WidgetAcc* GetDataAcc();
- FX_BOOL GetToolTip(CFX_WideString& wsToolTip);
+ bool GetToolTip(CFX_WideString& wsToolTip);
CXFA_FFDocView* GetDocView();
void SetDocView(CXFA_FFDocView* pDocView);
@@ -117,17 +117,17 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem {
IXFA_AppProvider* GetAppProvider();
void InvalidateWidget(const CFX_RectF* pRect = nullptr);
void AddInvalidateRect(const CFX_RectF* pRect = nullptr);
- FX_BOOL GetCaptionText(CFX_WideString& wsCap);
+ bool GetCaptionText(CFX_WideString& wsCap);
bool IsFocused();
void Rotate2Normal(FX_FLOAT& fx, FX_FLOAT& fy);
void GetRotateMatrix(CFX_Matrix& mt);
- FX_BOOL IsLayoutRectEmpty();
+ bool IsLayoutRectEmpty();
CXFA_FFWidget* GetParent();
- FX_BOOL IsAncestorOf(CXFA_FFWidget* pWidget);
+ bool IsAncestorOf(CXFA_FFWidget* pWidget);
const IFWL_App* GetFWLApp();
protected:
- virtual FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy);
+ virtual bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy);
void DrawBorder(CFX_Graphics* pGS,
CXFA_Box box,
@@ -139,8 +139,8 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem {
void GetRectWithoutRotate(CFX_RectF& rtWidget);
bool IsMatchVisibleStatus(uint32_t dwStatus);
void EventKillFocus();
- FX_BOOL IsButtonDown();
- void SetButtonDown(FX_BOOL bSet);
+ bool IsButtonDown();
+ void SetButtonDown(bool bSet);
CXFA_FFDocView* m_pDocView;
CXFA_FFPageView* m_pPageView;
@@ -163,7 +163,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top);
CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
CXFA_Image* pImage,
- FX_BOOL& bNameImage,
+ bool& bNameImage,
int32_t& iImageXDpi,
int32_t& iImageYDpi);
CFX_DIBitmap* XFA_LoadImageFromBuffer(IFX_SeekableReadStream* pImageFileRead,
@@ -174,9 +174,9 @@ FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType);
FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len);
void XFA_RectWidthoutMargin(CFX_RectF& rt,
const CXFA_Margin& mg,
- FX_BOOL bUI = FALSE);
+ bool bUI = false);
CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem);
-FX_BOOL XFA_IsCreateWidget(XFA_Element iType);
+bool XFA_IsCreateWidget(XFA_Element iType);
#define XFA_DRAWBOX_ForceRound 1
#define XFA_DRAWBOX_Lowered3D 2
void XFA_DrawBox(CXFA_Box box,
diff --git a/xfa/fxfa/xfa_ffwidgethandler.h b/xfa/fxfa/xfa_ffwidgethandler.h
index 720ec66f4c..ccb2f3d630 100644
--- a/xfa/fxfa/xfa_ffwidgethandler.h
+++ b/xfa/fxfa/xfa_ffwidgethandler.h
@@ -25,54 +25,52 @@ class CXFA_FFWidgetHandler {
XFA_WIDGETTYPE eType,
CXFA_FFWidget* hBefore = nullptr);
- FX_BOOL OnMouseEnter(CXFA_FFWidget* hWidget);
- FX_BOOL OnMouseExit(CXFA_FFWidget* hWidget);
- FX_BOOL OnLButtonDown(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnLButtonUp(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnLButtonDblClk(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnMouseMove(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnMouseWheel(CXFA_FFWidget* hWidget,
+ bool OnMouseEnter(CXFA_FFWidget* hWidget);
+ bool OnMouseExit(CXFA_FFWidget* hWidget);
+ bool OnLButtonDown(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnLButtonUp(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnLButtonDblClk(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnMouseMove(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnMouseWheel(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ int16_t zDelta,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnRButtonDown(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnRButtonUp(CXFA_FFWidget* hWidget,
+ uint32_t dwFlags,
+ FX_FLOAT fx,
+ FX_FLOAT fy);
+ bool OnRButtonDblClk(CXFA_FFWidget* hWidget,
uint32_t dwFlags,
- int16_t zDelta,
FX_FLOAT fx,
FX_FLOAT fy);
- FX_BOOL OnRButtonDown(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnRButtonUp(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnRButtonDblClk(CXFA_FFWidget* hWidget,
- uint32_t dwFlags,
- FX_FLOAT fx,
- FX_FLOAT fy);
- FX_BOOL OnKeyDown(CXFA_FFWidget* hWidget,
- uint32_t dwKeyCode,
- uint32_t dwFlags);
- FX_BOOL OnKeyUp(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags);
- FX_BOOL OnChar(CXFA_FFWidget* hWidget, uint32_t dwChar, uint32_t dwFlags);
+ bool OnKeyDown(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags);
+ bool OnKeyUp(CXFA_FFWidget* hWidget, uint32_t dwKeyCode, uint32_t dwFlags);
+ bool OnChar(CXFA_FFWidget* hWidget, uint32_t dwChar, uint32_t dwFlags);
FWL_WidgetHit OnHitTest(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
- FX_BOOL OnSetCursor(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
+ bool OnSetCursor(CXFA_FFWidget* hWidget, FX_FLOAT fx, FX_FLOAT fy);
void RenderWidget(CXFA_FFWidget* hWidget,
CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
- FX_BOOL bHighlight);
- FX_BOOL HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType);
+ bool bHighlight);
+ bool HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType);
int32_t ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam);
protected:
diff --git a/xfa/fxfa/xfa_rendercontext.h b/xfa/fxfa/xfa_rendercontext.h
index de2449eded..c424005b1e 100644
--- a/xfa/fxfa/xfa_rendercontext.h
+++ b/xfa/fxfa/xfa_rendercontext.h
@@ -13,10 +13,10 @@
class CXFA_RenderOptions {
public:
- CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {}
+ CXFA_RenderOptions() : m_bPrint(false), m_bHighlight(true) {}
- FX_BOOL m_bPrint;
- FX_BOOL m_bHighlight;
+ bool m_bPrint;
+ bool m_bHighlight;
};
class CXFA_RenderContext {