Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDFXFA_Context Class Referencefinal

#include <cpdfxfa_context.h>

+ Inheritance diagram for CPDFXFA_Context:
+ Collaboration diagram for CPDFXFA_Context:

Public Types

enum class  LoadStatus : uint8_t { kPreload = 0 , kLoading , kLoaded , kClosing }
 

Public Member Functions

 CPDFXFA_Context (CPDF_Document *pPDFDoc)
 
 ~CPDFXFA_Context () override
 
bool LoadXFADoc ()
 
LoadStatus GetLoadStatus () const
 
FormType GetFormType () const
 
int GetOriginalPageCount () const
 
void SetOriginalPageCount (int count)
 
CPDF_DocumentGetPDFDoc () const
 
CFX_XMLDocumentGetXMLDoc ()
 
CXFA_FFDocGetXFADoc ()
 
CXFA_FFDocViewGetXFADocView () const
 
CPDFSDK_FormFillEnvironmentGetFormFillEnv () const
 
void SetFormFillEnv (CPDFSDK_FormFillEnvironment *pFormFillEnv)
 
RetainPtr< CPDFXFA_PageGetOrCreateXFAPage (int page_index)
 
RetainPtr< CPDFXFA_PageGetXFAPage (int page_index)
 
RetainPtr< CPDFXFA_PageGetXFAPage (CXFA_FFPageView *pPage) const
 
void ClearChangeMark ()
 
int GetPageCount () const override
 
void DeletePage (int page_index) override
 
bool ContainsExtensionForm () const override
 
bool ContainsExtensionFullForm () const override
 
bool ContainsExtensionForegroundForm () const override
 
WideString GetLanguage () override
 
WideString GetPlatform () override
 
WideString GetAppName () override
 
WideString GetAppTitle () const override
 
void Beep (uint32_t dwType) override
 
int32_t MsgBox (const WideString &wsMessage, const WideString &wsTitle, uint32_t dwIconType, uint32_t dwButtonType) override
 
WideString Response (const WideString &wsQuestion, const WideString &wsTitle, const WideString &wsDefaultAnswer, bool bMark) override
 
RetainPtr< IFX_SeekableReadStreamDownloadURL (const WideString &wsURL) override
 
bool PostRequestURL (const WideString &wsURL, const WideString &wsData, const WideString &wsContentType, const WideString &wsEncode, const WideString &wsHeader, WideString &wsResponse) override
 
bool PutRequestURL (const WideString &wsURL, const WideString &wsData, const WideString &wsEncode) override
 
CFX_Timer::HandlerIfaceGetTimerHandler () const override
 
cppgc::Heap * GetGCHeap () const override
 
bool SaveDatasetsPackage (const RetainPtr< IFX_SeekableStream > &pStream)
 
bool SaveFormPackage (const RetainPtr< IFX_SeekableStream > &pStream)
 
void SendPostSaveToXFADoc ()
 
void SendPreSaveToXFADoc (std::vector< RetainPtr< IFX_SeekableStream > > *fileList)
 
- Public Member Functions inherited from CPDF_Document::Extension
virtual ~Extension ()=default
 
- Public Member Functions inherited from CXFA_FFApp::CallbackIface
virtual ~CallbackIface ()=default
 

Detailed Description

Definition at line 35 of file cpdfxfa_context.h.

Member Enumeration Documentation

◆ LoadStatus

enum class CPDFXFA_Context::LoadStatus : uint8_t
strong
Enumerator
kPreload 
kLoading 
kLoaded 
kClosing 

Definition at line 38 of file cpdfxfa_context.h.

Constructor & Destructor Documentation

◆ CPDFXFA_Context()

CPDFXFA_Context::CPDFXFA_Context ( CPDF_Document * pPDFDoc)
explicit

Definition at line 127 of file cpdfxfa_context.cpp.

References CPDFXFA_Context().

Referenced by CPDFXFA_Context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~CPDFXFA_Context()

CPDFXFA_Context::~CPDFXFA_Context ( )
override

Definition at line 140 of file cpdfxfa_context.cpp.

References kClosing.

Member Function Documentation

◆ Beep()

void CPDFXFA_Context::Beep ( uint32_t dwType)
overridevirtual

Causes the system to play a sound.

Parameters
[in]dwTypeThe system code for the appropriate sound.0 (Error)1 (Warning)2 (Question)3 (Status)4 (Default)

Implements CXFA_FFApp::CallbackIface.

Definition at line 339 of file cpdfxfa_context.cpp.

◆ ClearChangeMark()

void CPDFXFA_Context::ClearChangeMark ( )

Definition at line 311 of file cpdfxfa_context.cpp.

Referenced by SendPostSaveToXFADoc().

+ Here is the caller graph for this function:

◆ ContainsExtensionForegroundForm()

bool CPDFXFA_Context::ContainsExtensionForegroundForm ( ) const
overridevirtual

Implements CPDF_Document::Extension.

Definition at line 307 of file cpdfxfa_context.cpp.

References kXFAForeground.

◆ ContainsExtensionForm()

bool CPDFXFA_Context::ContainsExtensionForm ( ) const
overridevirtual

Implements CPDF_Document::Extension.

Definition at line 298 of file cpdfxfa_context.cpp.

References kXFAForeground, and kXFAFull.

Referenced by SendPostSaveToXFADoc(), and SendPreSaveToXFADoc().

+ Here is the caller graph for this function:

◆ ContainsExtensionFullForm()

bool CPDFXFA_Context::ContainsExtensionFullForm ( ) const
overridevirtual

Implements CPDF_Document::Extension.

Definition at line 303 of file cpdfxfa_context.cpp.

References kXFAFull.

◆ DeletePage()

void CPDFXFA_Context::DeletePage ( int page_index)
overridevirtual

Implements CPDF_Document::Extension.

Definition at line 282 of file cpdfxfa_context.cpp.

◆ DownloadURL()

RetainPtr< IFX_SeekableReadStream > CPDFXFA_Context::DownloadURL ( const WideString & wsURL)
overridevirtual

Download something from somewhere.

Parameters
[in]wsURL- http, ftp, such as "http://www.w3.org/TR/REC-xml-names/".

Implements CXFA_FFApp::CallbackIface.

Definition at line 379 of file cpdfxfa_context.cpp.

◆ GetAppName()

WideString CPDFXFA_Context::GetAppName ( )
overridevirtual

Get application name, such as Phantom.

Implements CXFA_FFApp::CallbackIface.

Definition at line 327 of file cpdfxfa_context.cpp.

◆ GetAppTitle()

WideString CPDFXFA_Context::GetAppTitle ( ) const
overridevirtual

Get application message box title.

Implements CXFA_FFApp::CallbackIface.

Definition at line 323 of file cpdfxfa_context.cpp.

◆ GetFormFillEnv()

CPDFSDK_FormFillEnvironment * CPDFXFA_Context::GetFormFillEnv ( ) const
inline

Definition at line 61 of file cpdfxfa_context.h.

◆ GetFormType()

FormType CPDFXFA_Context::GetFormType ( ) const
inline

Definition at line 50 of file cpdfxfa_context.h.

◆ GetGCHeap()

cppgc::Heap * CPDFXFA_Context::GetGCHeap ( ) const
overridevirtual

Implements CXFA_FFApp::CallbackIface.

Definition at line 409 of file cpdfxfa_context.cpp.

◆ GetLanguage()

WideString CPDFXFA_Context::GetLanguage ( )
overridevirtual

Returns the language of the running host application. Such as zh_CN

Implements CXFA_FFApp::CallbackIface.

Definition at line 331 of file cpdfxfa_context.cpp.

◆ GetLoadStatus()

LoadStatus CPDFXFA_Context::GetLoadStatus ( ) const
inline

Definition at line 49 of file cpdfxfa_context.h.

◆ GetOrCreateXFAPage()

RetainPtr< CPDFXFA_Page > CPDFXFA_Context::GetOrCreateXFAPage ( int page_index)

Definition at line 235 of file cpdfxfa_context.cpp.

References GetPageCount(), and GetPDFDoc().

+ Here is the call graph for this function:

◆ GetOriginalPageCount()

int CPDFXFA_Context::GetOriginalPageCount ( ) const
inline

Definition at line 51 of file cpdfxfa_context.h.

◆ GetPageCount()

int CPDFXFA_Context::GetPageCount ( ) const
overridevirtual

Implements CPDF_Document::Extension.

Definition at line 224 of file cpdfxfa_context.cpp.

Referenced by GetOrCreateXFAPage().

+ Here is the caller graph for this function:

◆ GetPDFDoc()

CPDF_Document * CPDFXFA_Context::GetPDFDoc ( ) const
inline

Definition at line 57 of file cpdfxfa_context.h.

Referenced by GetOrCreateXFAPage().

+ Here is the caller graph for this function:

◆ GetPlatform()

WideString CPDFXFA_Context::GetPlatform ( )
overridevirtual

Returns the platform of the machine running the script. Such as WIN

Implements CXFA_FFApp::CallbackIface.

Definition at line 335 of file cpdfxfa_context.cpp.

◆ GetTimerHandler()

CFX_Timer::HandlerIface * CPDFXFA_Context::GetTimerHandler ( ) const
overridevirtual

Implements CXFA_FFApp::CallbackIface.

Definition at line 405 of file cpdfxfa_context.cpp.

◆ GetXFADoc()

CXFA_FFDoc * CPDFXFA_Context::GetXFADoc ( )
inline

Definition at line 59 of file cpdfxfa_context.h.

◆ GetXFADocView()

CXFA_FFDocView * CPDFXFA_Context::GetXFADocView ( ) const
inline

Definition at line 60 of file cpdfxfa_context.h.

Referenced by SendPostSaveToXFADoc(), and SendPreSaveToXFADoc().

+ Here is the caller graph for this function:

◆ GetXFAPage() [1/2]

RetainPtr< CPDFXFA_Page > CPDFXFA_Context::GetXFAPage ( CXFA_FFPageView * pPage) const

Definition at line 264 of file cpdfxfa_context.cpp.

References kXFAFull.

◆ GetXFAPage() [2/2]

RetainPtr< CPDFXFA_Page > CPDFXFA_Context::GetXFAPage ( int page_index)

Definition at line 257 of file cpdfxfa_context.cpp.

◆ GetXMLDoc()

CFX_XMLDocument * CPDFXFA_Context::GetXMLDoc ( )
inline

Definition at line 58 of file cpdfxfa_context.h.

◆ LoadXFADoc()

bool CPDFXFA_Context::LoadXFADoc ( )

Definition at line 161 of file cpdfxfa_context.cpp.

References kLoaded, kLoading, kXFAForeground, and kXFAFull.

◆ MsgBox()

int32_t CPDFXFA_Context::MsgBox ( const WideString & wsMessage,
const WideString & wsTitle,
uint32_t dwIconType,
uint32_t dwButtonType )
overridevirtual

Displays a message box.

Parameters
[in]wsMessage- Message string to display in box.
[in]wsTitle- Title string for box.
[in]dwIconType- Icon type, refer to XFA_MBICON.
[in]dwButtonType- Button type, refer to XFA_MESSAGEBUTTON.
Returns
A valid integer representing the value of the button pressed by the user, refer to XFA_ID.

Implements CXFA_FFApp::CallbackIface.

Definition at line 344 of file cpdfxfa_context.cpp.

◆ PostRequestURL()

bool CPDFXFA_Context::PostRequestURL ( const WideString & wsURL,
const WideString & wsData,
const WideString & wsContentType,
const WideString & wsEncode,
const WideString & wsHeader,
WideString & wsResponse )
overridevirtual

POST data to the given url.

Parameters
[in]wsURLthe URL being uploaded.
[in]wsDatathe data being uploaded.
[in]wsContentTypethe content type of data including text/html, text/xml, text/plain, multipart/form-data, application/x-www-form-urlencoded, application/octet-stream, any valid MIME type.
[in]wsEncodethe encode of data including UTF-8, UTF-16, ISO8859-1, any recognized [IANA]character encoding
[in]wsHeaderany additional HTTP headers to be included in the post.
[out]wsResponsedecoded response from server.
Returns
true Server permitted the post request, false otherwise.

Implements CXFA_FFApp::CallbackIface.

Definition at line 384 of file cpdfxfa_context.cpp.

◆ PutRequestURL()

bool CPDFXFA_Context::PutRequestURL ( const WideString & wsURL,
const WideString & wsData,
const WideString & wsEncode )
overridevirtual

PUT data to the given url.

Parameters
[in]wsURLthe URL being uploaded.
[in]wsDatathe data being uploaded.
[in]wsEncodethe encode of data including UTF-8, UTF-16, ISO8859-1, any recognized [IANA]character encoding
Returns
true Server permitted the post request, false otherwise.

Implements CXFA_FFApp::CallbackIface.

Definition at line 398 of file cpdfxfa_context.cpp.

◆ Response()

WideString CPDFXFA_Context::Response ( const WideString & wsQuestion,
const WideString & wsTitle,
const WideString & wsDefaultAnswer,
bool bMask )
overridevirtual

Get a response from the user.

Parameters
[in]wsQuestion- Message string to display in box.
[in]wsTitle- Title string for box.
[in]wsDefaultAnswer- Initial contents for answer.
[in]bMask- Mask the user input with asterisks when true,
Returns
A string containing the user's response.

Implements CXFA_FFApp::CallbackIface.

Definition at line 359 of file cpdfxfa_context.cpp.

References fxcrt::WideString::WideString(), and fxcrt::WideString::FromUTF16LE().

+ Here is the call graph for this function:

◆ SaveDatasetsPackage()

bool CPDFXFA_Context::SaveDatasetsPackage ( const RetainPtr< IFX_SeekableStream > & pStream)

Definition at line 413 of file cpdfxfa_context.cpp.

References XFA_HASHCODE_Datasets.

◆ SaveFormPackage()

bool CPDFXFA_Context::SaveFormPackage ( const RetainPtr< IFX_SeekableStream > & pStream)

Definition at line 418 of file cpdfxfa_context.cpp.

References XFA_HASHCODE_Form.

◆ SendPostSaveToXFADoc()

void CPDFXFA_Context::SendPostSaveToXFADoc ( )

◆ SendPreSaveToXFADoc()

void CPDFXFA_Context::SendPreSaveToXFADoc ( std::vector< RetainPtr< IFX_SeekableStream > > * fileList)

◆ SetFormFillEnv()

void CPDFXFA_Context::SetFormFillEnv ( CPDFSDK_FormFillEnvironment * pFormFillEnv)

Definition at line 146 of file cpdfxfa_context.cpp.

◆ SetOriginalPageCount()

void CPDFXFA_Context::SetOriginalPageCount ( int count)
inline

Definition at line 52 of file cpdfxfa_context.h.


The documentation for this class was generated from the following files: