summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp6
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h10
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp25
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h4
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.h6
5 files changed, 24 insertions, 27 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index b7dd33fa32..a67ac0178b 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -153,7 +153,7 @@ int CPDFXFA_Context::GetPageCount() const {
}
}
-CFX_RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(int page_index) {
+RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(int page_index) {
if (page_index < 0)
return nullptr;
@@ -175,7 +175,7 @@ CFX_RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(int page_index) {
return pPage;
}
-CFX_RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(
+RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(
CXFA_FFPageView* pPage) const {
if (!pPage)
return nullptr;
@@ -314,7 +314,7 @@ WideString CPDFXFA_Context::Response(const WideString& wsQuestion,
nLength / sizeof(uint16_t));
}
-CFX_RetainPtr<IFX_SeekableReadStream> CPDFXFA_Context::DownloadURL(
+RetainPtr<IFX_SeekableReadStream> CPDFXFA_Context::DownloadURL(
const WideString& wsURL) {
return m_pFormFillEnv ? m_pFormFillEnv->DownloadFromURL(wsURL.c_str())
: nullptr;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index 0dbc51e54b..df42cbb9fd 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -51,8 +51,8 @@ class CPDFXFA_Context : public IXFA_AppProvider {
int GetPageCount() const;
void DeletePage(int page_index);
- CFX_RetainPtr<CPDFXFA_Page> GetXFAPage(int page_index);
- CFX_RetainPtr<CPDFXFA_Page> GetXFAPage(CXFA_FFPageView* pPage) const;
+ RetainPtr<CPDFXFA_Page> GetXFAPage(int page_index);
+ RetainPtr<CPDFXFA_Page> GetXFAPage(CXFA_FFPageView* pPage) const;
void ClearChangeMark();
// IFXA_AppProvider:
@@ -70,7 +70,7 @@ class CPDFXFA_Context : public IXFA_AppProvider {
const WideString& wsTitle,
const WideString& wsDefaultAnswer,
bool bMark) override;
- CFX_RetainPtr<IFX_SeekableReadStream> DownloadURL(
+ RetainPtr<IFX_SeekableReadStream> DownloadURL(
const WideString& wsURL) override;
bool PostRequestURL(const WideString& wsURL,
const WideString& wsData,
@@ -94,7 +94,7 @@ class CPDFXFA_Context : public IXFA_AppProvider {
}
LoadStatus GetLoadStatus() const { return m_nLoadStatus; }
- std::vector<CFX_RetainPtr<CPDFXFA_Page>>* GetXFAPageList() {
+ std::vector<RetainPtr<CPDFXFA_Page>>* GetXFAPageList() {
return &m_XFAPageList;
}
@@ -108,7 +108,7 @@ class CPDFXFA_Context : public IXFA_AppProvider {
CFX_UnownedPtr<CXFA_FFDocView> m_pXFADocView;
std::unique_ptr<CXFA_FFApp> m_pXFAApp;
std::unique_ptr<CJS_Runtime> m_pRuntime;
- std::vector<CFX_RetainPtr<CPDFXFA_Page>> m_XFAPageList;
+ std::vector<RetainPtr<CPDFXFA_Page>> m_XFAPageList;
LoadStatus m_nLoadStatus;
int m_nPageCount;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index b4dc3f1ed0..4dcdcac0f6 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -11,7 +11,7 @@
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
-#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
@@ -58,7 +58,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
return;
- CFX_RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pPageView);
+ RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pPageView);
if (!pPage)
return;
@@ -88,7 +88,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
if (!pPageView)
return;
- CFX_RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pPageView);
+ RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pPageView);
if (!pPage)
return;
@@ -113,7 +113,7 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
if (!pXFAPageView)
return false;
- CFX_RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pXFAPageView);
+ RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pXFAPageView);
if (!pPage)
return false;
@@ -225,7 +225,7 @@ bool CPDFXFA_DocEnvironment::PopupMenu(CXFA_FFWidget* hWidget,
if (!pXFAPageView)
return false;
- CFX_RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pXFAPageView);
+ RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pXFAPageView);
if (!pPage)
return false;
@@ -271,8 +271,7 @@ void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
for (int iPageIter = 0; iPageIter < m_pContext->GetOriginalPageCount();
iPageIter++) {
- CFX_RetainPtr<CPDFXFA_Page> pPage =
- (*m_pContext->GetXFAPageList())[iPageIter];
+ RetainPtr<CPDFXFA_Page> pPage = (*m_pContext->GetXFAPageList())[iPageIter];
if (!pPage)
continue;
@@ -297,7 +296,7 @@ void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
if (!pPageView)
return;
- CFX_RetainPtr<CPDFXFA_Page> pXFAPage = m_pContext->GetXFAPage(pPageView);
+ RetainPtr<CPDFXFA_Page> pXFAPage = m_pContext->GetXFAPage(pPageView);
if (!pXFAPage)
return;
@@ -315,7 +314,7 @@ void CPDFXFA_DocEnvironment::WidgetPreRemove(CXFA_FFWidget* hWidget,
if (!pPageView)
return;
- CFX_RetainPtr<CPDFXFA_Page> pXFAPage = m_pContext->GetXFAPage(pPageView);
+ RetainPtr<CPDFXFA_Page> pXFAPage = m_pContext->GetXFAPage(pPageView);
if (!pXFAPage)
return;
@@ -436,8 +435,7 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
if (!pFileHandler)
return;
- CFX_RetainPtr<IFX_SeekableStream> fileWrite =
- MakeSeekableStream(pFileHandler);
+ RetainPtr<IFX_SeekableStream> fileWrite = MakeSeekableStream(pFileHandler);
ByteString content;
if (fileType == FXFA_SAVEAS_XML) {
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
@@ -697,7 +695,7 @@ bool CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) {
return ret;
}
-CFX_RetainPtr<IFX_SeekableReadStream> CPDFXFA_DocEnvironment::OpenLinkedFile(
+RetainPtr<IFX_SeekableReadStream> CPDFXFA_DocEnvironment::OpenLinkedFile(
CXFA_FFDoc* hDoc,
const WideString& wsLink) {
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
@@ -727,8 +725,7 @@ bool CPDFXFA_DocEnvironment::ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
if (!pFormFillEnv)
return false;
- CFX_RetainPtr<IFX_SeekableStream> fileStream =
- MakeSeekableStream(pFileHandler);
+ RetainPtr<IFX_SeekableStream> fileStream = MakeSeekableStream(pFileHandler);
if (fileType == FXFA_SAVEAS_XML) {
const char kContent[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index e6a0f926af..6f7d41d86e 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -7,8 +7,8 @@
#ifndef FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_
#define FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
#include "public/fpdfview.h"
#include "xfa/fxfa/fxfa.h"
@@ -85,7 +85,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
const ByteStringView& szPropName,
CFXJSE_Value* pValue) override;
- CFX_RetainPtr<IFX_SeekableReadStream> OpenLinkedFile(
+ RetainPtr<IFX_SeekableReadStream> OpenLinkedFile(
CXFA_FFDoc* hDoc,
const WideString& wsLink) override;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.h b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
index 19dc0f29b1..5c4e0dca76 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
@@ -9,9 +9,9 @@
#include <memory>
-#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxcrt/retain_ptr.h"
class CFX_Matrix;
class CPDFXFA_Context;
@@ -19,10 +19,10 @@ class CPDF_Dictionary;
class CPDF_Page;
class CXFA_FFPageView;
-class CPDFXFA_Page : public CFX_Retainable {
+class CPDFXFA_Page : public Retainable {
public:
template <typename T, typename... Args>
- friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
bool LoadPage();
bool LoadPDFPage(CPDF_Dictionary* pageDict);