summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fde/cfde_txtedtbuf.h2
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp6
-rw-r--r--xfa/fde/cfde_txtedtengine.h2
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp8
-rw-r--r--xfa/fde/cfde_txtedtpage.h2
-rw-r--r--xfa/fwl/cfwl_edit.cpp6
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp4
-rw-r--r--xfa/fxfa/cxfa_ffdoc.h2
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp10
-rw-r--r--xfa/fxfa/cxfa_ffdocview.h2
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_dataimporter.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.h3
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.cpp7
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.h3
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp9
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.h5
19 files changed, 41 insertions, 50 deletions
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h
index 096ce6bf77..39187f48a3 100644
--- a/xfa/fde/cfde_txtedtbuf.h
+++ b/xfa/fde/cfde_txtedtbuf.h
@@ -15,8 +15,6 @@
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/ifx_chariter.h"
-class IFX_Pause;
-
class CFDE_TxtEdtBuf {
public:
class Iterator : public IFX_CharIter {
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 7bd9259b5f..a8445b028e 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -622,7 +622,7 @@ int32_t CFDE_TxtEdtEngine::StartLayout() {
return 0;
}
-int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) {
+int32_t CFDE_TxtEdtEngine::DoLayout() {
int32_t nCount = pdfium::CollectionSize<int32_t>(m_ParagPtrArray);
CFDE_TxtEdtParag* pParag = nullptr;
int32_t nLineCount = 0;
@@ -630,10 +630,6 @@ int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) {
pParag = m_ParagPtrArray[m_nLayoutPos].get();
pParag->CalcLines();
nLineCount += pParag->GetLineCount();
- if (nLineCount > m_nPageLineCount && pPause && pPause->NeedToPauseNow()) {
- m_nLineCount += nLineCount;
- return (++m_nLayoutPos * 100) / nCount;
- }
}
m_nLineCount += nLineCount;
return 100;
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 3166f1854c..31883fc3c8 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -68,7 +68,7 @@ class CFDE_TxtEdtEngine {
bool Undo(const IFDE_TxtEdtDoRecord* pRecord);
int32_t StartLayout();
- int32_t DoLayout(IFX_Pause* pPause);
+ int32_t DoLayout();
void EndLayout();
int32_t CountParags() const;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index f0b03af7ca..f3127e7708 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -226,18 +226,18 @@ bool CFDE_TxtEdtPage::IsLoaded(const CFX_RectF* pClipBox) {
return m_bLoaded;
}
-int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
- IFX_Pause* pPause) {
+int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox) {
if (m_nRefCount > 0) {
m_nRefCount++;
return m_nRefCount;
}
+
CFDE_TxtEdtBuf* pBuf = m_pEditEngine->GetTextBuf();
const FDE_TXTEDTPARAMS* pParams = m_pEditEngine->GetEditParams();
wchar_t wcAlias = 0;
- if (pParams->dwMode & FDE_TEXTEDITMODE_Password) {
+ if (pParams->dwMode & FDE_TEXTEDITMODE_Password)
wcAlias = m_pEditEngine->GetAliasChar();
- }
+
m_pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(
static_cast<CFDE_TxtEdtBuf*>(pBuf), wcAlias);
CFX_TxtBreak* pBreak = m_pEditEngine->GetTextBreak();
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index beebdad2af..c715c45062 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -42,7 +42,7 @@ class CFDE_TxtEdtPage : public IFDE_VisualSet {
FXTEXT_CHARPOS*& pCharPos,
CFX_RectF* pBBox) const;
bool IsLoaded(const CFX_RectF* pClipBox);
- int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause);
+ int32_t LoadPage(const CFX_RectF* pClipBox);
void UnloadPage(const CFX_RectF* pClipBox);
const CFX_RectF& GetContentsBox();
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 1b76ec6240..2dc4bcff7b 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -439,7 +439,7 @@ bool CFWL_Edit::OnPageLoad(int32_t nPageIndex) {
if (!pPage)
return false;
- pPage->LoadPage(nullptr, nullptr);
+ pPage->LoadPage(nullptr);
return true;
}
@@ -698,11 +698,11 @@ void CFWL_Edit::UpdateEditLayout() {
pPage->UnloadPage(nullptr);
m_EdtEngine.StartLayout();
- m_EdtEngine.DoLayout(nullptr);
+ m_EdtEngine.DoLayout();
m_EdtEngine.EndLayout();
pPage = m_EdtEngine.GetPage(0);
if (pPage)
- pPage->LoadPage(nullptr, nullptr);
+ pPage->LoadPage(nullptr);
}
bool CFWL_Edit::UpdateOffset() {
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index 228c4948b6..bddc02a9ce 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -233,8 +233,8 @@ void XFA_XPDPacket_MergeRootNode(CXFA_Node* pOriginRoot, CXFA_Node* pNewRoot) {
}
}
-int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
- int32_t iStatus = m_pDocumentParser->DoParse(pPause);
+int32_t CXFA_FFDoc::DoLoad() {
+ int32_t iStatus = m_pDocumentParser->DoParse();
if (iStatus == XFA_PARSESTATUS_Done && !m_pPDFDoc)
return XFA_PARSESTATUS_SyntaxErr;
return iStatus;
diff --git a/xfa/fxfa/cxfa_ffdoc.h b/xfa/fxfa/cxfa_ffdoc.h
index c5822e3577..1cfbb50a2c 100644
--- a/xfa/fxfa/cxfa_ffdoc.h
+++ b/xfa/fxfa/cxfa_ffdoc.h
@@ -53,7 +53,7 @@ class CXFA_FFDoc {
XFA_DocType GetDocType() const { return m_dwDocType; }
int32_t StartLoad();
- int32_t DoLoad(IFX_Pause* pPause = nullptr);
+ int32_t DoLoad();
void StopLoad();
CXFA_FFDocView* CreateDocView();
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index bcf5ef2772..058116be72 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -99,15 +99,17 @@ int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) {
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
return iStatus;
}
-int32_t CXFA_FFDocView::DoLayout(IFX_Pause* pPause) {
+
+int32_t CXFA_FFDocView::DoLayout() {
int32_t iStatus = 100;
- iStatus = m_pXFADocLayout->DoLayout(pPause);
- if (iStatus != 100) {
+ iStatus = m_pXFADocLayout->DoLayout();
+ if (iStatus != 100)
return iStatus;
- }
+
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Doing;
return iStatus;
}
+
void CXFA_FFDocView::StopLayout() {
CXFA_Node* pRootItem =
ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
diff --git a/xfa/fxfa/cxfa_ffdocview.h b/xfa/fxfa/cxfa_ffdocview.h
index 7b443d4019..761397c4b0 100644
--- a/xfa/fxfa/cxfa_ffdocview.h
+++ b/xfa/fxfa/cxfa_ffdocview.h
@@ -44,7 +44,7 @@ class CXFA_FFDocView {
CXFA_FFDoc* GetDoc() { return m_pDoc; }
int32_t StartLayout(int32_t iStartPage = 0);
- int32_t DoLayout(IFX_Pause* pPause);
+ int32_t DoLayout();
void StopLayout();
int32_t GetLayoutStatus();
void UpdateDocView();
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index b74e1dcaf7..69aabe38be 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -568,7 +568,7 @@ class CXFA_ImageRenderer {
const CFX_Matrix* pImage2Device,
uint32_t flags,
int blendType = FXDIB_BLEND_NORMAL);
- bool Continue(IFX_Pause* pPause);
+ bool Continue();
protected:
bool StartDIBSource();
@@ -709,9 +709,9 @@ bool CXFA_ImageRenderer::StartDIBSource() {
return false;
}
-bool CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
+bool CXFA_ImageRenderer::Continue() {
if (m_Status == 2) {
- if (m_pTransformer->Continue(pPause))
+ if (m_pTransformer->Continue(nullptr))
return true;
CFX_RetainPtr<CFX_DIBitmap> pBitmap = m_pTransformer->DetachBitmap();
@@ -734,7 +734,7 @@ bool CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
return false;
}
if (m_Status == 3)
- return m_pDevice->ContinueDIBits(m_DeviceHandle.get(), pPause);
+ return m_pDevice->ContinueDIBits(m_DeviceHandle.get(), nullptr);
return false;
}
@@ -828,7 +828,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(
&m_ImageMatrix, m_Flags)) {
return;
}
- while (imageRender.Continue(nullptr))
+ while (imageRender.Continue())
continue;
}
@@ -901,7 +901,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
FXDIB_INTERPOL)) {
return;
}
- while (imageRender.Continue(nullptr))
+ while (imageRender.Continue())
continue;
}
diff --git a/xfa/fxfa/parser/cxfa_dataimporter.cpp b/xfa/fxfa/parser/cxfa_dataimporter.cpp
index cb5a42c428..d83b92b08d 100644
--- a/xfa/fxfa/parser/cxfa_dataimporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataimporter.cpp
@@ -30,7 +30,7 @@ bool CXFA_DataImporter::ImportData(
XFA_PARSESTATUS_Ready) {
return false;
}
- if (pDataDocumentParser->DoParse(nullptr) < XFA_PARSESTATUS_Done)
+ if (pDataDocumentParser->DoParse() < XFA_PARSESTATUS_Done)
return false;
CXFA_Node* pImportDataRoot = pDataDocumentParser->GetRootNode();
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index eb7cadc01c..99b36749d1 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -31,8 +31,8 @@ int32_t CXFA_DocumentParser::StartParse(
return nRetStatus;
}
-int32_t CXFA_DocumentParser::DoParse(IFX_Pause* pPause) {
- int32_t nRetStatus = m_nodeParser.DoParse(pPause);
+int32_t CXFA_DocumentParser::DoParse() {
+ int32_t nRetStatus = m_nodeParser.DoParse();
if (nRetStatus >= XFA_PARSESTATUS_Done) {
ASSERT(m_pDocument);
m_pDocument->SetRoot(m_nodeParser.GetRootNode());
diff --git a/xfa/fxfa/parser/cxfa_document_parser.h b/xfa/fxfa/parser/cxfa_document_parser.h
index d876244e35..ad3f17f8e8 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.h
+++ b/xfa/fxfa/parser/cxfa_document_parser.h
@@ -16,7 +16,6 @@ class CXFA_Document;
class CXFA_FFNotify;
class CXFA_Notify;
class IFX_SeekableStream;
-class IFX_Pause;
class CXFA_DocumentParser {
public:
@@ -25,7 +24,7 @@ class CXFA_DocumentParser {
int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream,
XFA_XDPPACKET ePacketID);
- int32_t DoParse(IFX_Pause* pPause);
+ int32_t DoParse();
CFX_XMLDoc* GetXMLDoc() const;
CXFA_FFNotify* GetNotify() const;
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
index 2e919dbc84..0fbae9e368 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
@@ -57,7 +57,7 @@ int32_t CXFA_LayoutProcessor::StartLayout(bool bForceRestart) {
return 0;
}
-int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
+int32_t CXFA_LayoutProcessor::DoLayout() {
if (m_nProgressCounter < 1)
return -1;
@@ -78,8 +78,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
pLayoutItem->m_sPos = CFX_PointF(fPosX, fPosY);
m_pLayoutPageMgr->SubmitContentItem(pLayoutItem, eStatus);
- } while (eStatus != XFA_ItemLayoutProcessorResult::Done &&
- (!pPause || !pPause->NeedToPauseNow()));
+ } while (eStatus != XFA_ItemLayoutProcessorResult::Done);
if (eStatus == XFA_ItemLayoutProcessorResult::Done) {
m_pLayoutPageMgr->FinishPaginatedPageSets();
@@ -96,7 +95,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
bool CXFA_LayoutProcessor::IncrementLayout() {
if (m_bNeedLayout) {
StartLayout(true);
- return DoLayout(nullptr) == 100;
+ return DoLayout() == 100;
}
for (CXFA_Node* pNode : m_rgChangedContainers) {
CXFA_Node* pParentNode =
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h
index 75bf2597c5..5a48560f26 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -18,7 +18,6 @@ class CXFA_ItemLayoutProcessor;
class CXFA_LayoutItem;
class CXFA_LayoutPageMgr;
class CXFA_Node;
-class IFX_Pause;
class CXFA_LayoutProcessor {
public:
@@ -27,7 +26,7 @@ class CXFA_LayoutProcessor {
CXFA_Document* GetDocument() const;
int32_t StartLayout(bool bForceRestart = false);
- int32_t DoLayout(IFX_Pause* pPause = nullptr);
+ int32_t DoLayout();
bool IncrementLayout();
int32_t CountPages() const;
CXFA_ContainerLayoutItem* GetPage(int32_t index) const;
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 9fae4a43aa..e136814e9f 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1284,7 +1284,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
auto pParser = pdfium::MakeUnique<CXFA_SimpleParser>(m_pDocument, false);
if (!pParser)
return;
- CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression, nullptr);
+ CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression);
if (!pXMLNode)
return;
if (bIgnoreRoot &&
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 4773fda22a..3cbcd26100 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -293,11 +293,11 @@ int32_t CXFA_SimpleParser::StartParse(
return XFA_PARSESTATUS_Ready;
}
-int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) {
+int32_t CXFA_SimpleParser::DoParse() {
if (!m_pXMLDoc || m_ePacketID == XFA_XDPPACKET_UNKNOWN)
return XFA_PARSESTATUS_StatusErr;
- int32_t iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad();
if (iRet < 0)
return XFA_PARSESTATUS_SyntaxErr;
if (iRet < 100)
@@ -313,8 +313,7 @@ int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) {
return XFA_PARSESTATUS_Done;
}
-CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
- IFX_Pause* pPause) {
+CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML) {
CloseParser();
m_pXMLDoc = pdfium::MakeUnique<CFX_XMLDoc>();
@@ -326,7 +325,7 @@ CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
if (!m_pXMLDoc->LoadXML(std::move(pParser)))
return nullptr;
- int32_t iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad();
if (iRet < 0 || iRet >= 100)
m_pXMLDoc->CloseXML();
return iRet < 100 ? nullptr : GetDocumentNode(m_pXMLDoc.get());
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h
index cb1efcc1d5..705b6bde5c 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.h
+++ b/xfa/fxfa/parser/cxfa_simple_parser.h
@@ -18,7 +18,6 @@ class CFX_XMLInstruction;
class CFX_XMLNode;
class CFX_XMLParser;
class IFX_SeekableStream;
-class IFX_Pause;
class CFX_SeekableStreamProxy;
class CXFA_SimpleParser {
@@ -28,8 +27,8 @@ class CXFA_SimpleParser {
int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream,
XFA_XDPPACKET ePacketID);
- int32_t DoParse(IFX_Pause* pPause);
- CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML, IFX_Pause* pPause);
+ int32_t DoParse();
+ CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML);
void ConstructXFANode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode);
CXFA_Node* GetRootNode() const;
CFX_XMLDoc* GetXMLDoc() const;