summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-05-04 12:09:52 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-04 16:24:55 +0000
commitdf673c28191cca181ef526d02f24b4a7a6f5e200 (patch)
tree8fe9304aa58e3c0045bba5140f6b6fbb322d7ea7 /xfa/fxfa
parentc5fc83c50dee0968bd3c16e69ca84300531c6391 (diff)
downloadpdfium-df673c28191cca181ef526d02f24b4a7a6f5e200.tar.xz
Cleanup more null IFX_Pause parameters
This Cl cleans up more IFX_Pause parameters which are always null. Change-Id: Ia48600f06216db64a2db8e6e97222a91bd4ba149 Reviewed-on: https://pdfium-review.googlesource.com/4890 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-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
13 files changed, 31 insertions, 34 deletions
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;