#include "xfa/fxfa/cxfa_ffdoc.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfdoc/cpdf_nametree.h"
#include "core/fxcrt/cfx_read_only_span_stream.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/xml/cfx_xmldocument.h"
#include "core/fxcrt/xml/cfx_xmlelement.h"
#include "core/fxcrt/xml/cfx_xmlnode.h"
#include "core/fxcrt/xml/cfx_xmlparser.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "fxjs/xfa/cjx_object.h"
#include "v8/include/cppgc/allocation.h"
#include "v8/include/cppgc/heap.h"
#include "xfa/fgas/font/cfgas_gefont.h"
#include "xfa/fgas/font/cfgas_pdffontmgr.h"
#include "xfa/fwl/cfwl_notedriver.h"
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffdocview.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/cxfa_fontmgr.h"
#include "xfa/fxfa/layout/cxfa_layoutprocessor.h"
#include "xfa/fxfa/parser/cxfa_acrobat.h"
#include "xfa/fxfa/parser/cxfa_acrobat7.h"
#include "xfa/fxfa/parser/cxfa_dataexporter.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_document_builder.h"
#include "xfa/fxfa/parser/cxfa_dynamicrender.h"
#include "xfa/fxfa/parser/cxfa_node.h"
FX_IMAGEDIB_AND_DPI::FX_IMAGEDIB_AND_DPI() = default;
FX_IMAGEDIB_AND_DPI::FX_IMAGEDIB_AND_DPI(const FX_IMAGEDIB_AND_DPI& that) =
default;
FX_IMAGEDIB_AND_DPI::FX_IMAGEDIB_AND_DPI(const RetainPtr<CFX_DIBBase>& pDib,
int32_t xDpi,
int32_t yDpi)
: … { … }
FX_IMAGEDIB_AND_DPI::~FX_IMAGEDIB_AND_DPI() = default;
CXFA_FFDoc::CXFA_FFDoc(CXFA_FFApp* pApp,
CallbackIface* pDocEnvironment,
CPDF_Document* pPDFDoc,
cppgc::Heap* pHeap)
: … { … }
CXFA_FFDoc::~CXFA_FFDoc() = default;
void CXFA_FFDoc::PreFinalize() { … }
void CXFA_FFDoc::Trace(cppgc::Visitor* visitor) const { … }
bool CXFA_FFDoc::BuildDoc(CFX_XMLDocument* pXML) { … }
CXFA_FFDocView* CXFA_FFDoc::CreateDocView() { … }
void CXFA_FFDoc::SetChangeMark() { … }
void CXFA_FFDoc::InvalidateRect(CXFA_FFPageView* pPageView,
const CFX_RectF& rt) { … }
void CXFA_FFDoc::DisplayCaret(CXFA_FFWidget* hWidget,
bool bVisible,
const CFX_RectF* pRtAnchor) { … }
bool CXFA_FFDoc::GetPopupPos(CXFA_FFWidget* hWidget,
float fMinPopup,
float fMaxPopup,
const CFX_RectF& rtAnchor,
CFX_RectF* pPopupRect) const { … }
bool CXFA_FFDoc::PopupMenu(CXFA_FFWidget* hWidget, const CFX_PointF& ptPopup) { … }
void CXFA_FFDoc::OnPageViewEvent(CXFA_FFPageView* pPageView,
PageViewEvent eEvent) { … }
void CXFA_FFDoc::WidgetPostAdd(CXFA_FFWidget* hWidget) { … }
void CXFA_FFDoc::WidgetPreRemove(CXFA_FFWidget* hWidget) { … }
int32_t CXFA_FFDoc::CountPages() const { … }
int32_t CXFA_FFDoc::GetCurrentPage() const { … }
void CXFA_FFDoc::SetCurrentPage(int32_t iCurPage) { … }
bool CXFA_FFDoc::IsCalculationsEnabled() const { … }
void CXFA_FFDoc::SetCalculationsEnabled(bool bEnabled) { … }
WideString CXFA_FFDoc::GetTitle() const { … }
void CXFA_FFDoc::SetTitle(const WideString& wsTitle) { … }
void CXFA_FFDoc::ExportData(const WideString& wsFilePath, bool bXDP) { … }
void CXFA_FFDoc::GotoURL(const WideString& bsURL) { … }
bool CXFA_FFDoc::IsValidationsEnabled() const { … }
void CXFA_FFDoc::SetValidationsEnabled(bool bEnabled) { … }
void CXFA_FFDoc::SetFocusWidget(CXFA_FFWidget* hWidget) { … }
void CXFA_FFDoc::Print(int32_t nStartPage,
int32_t nEndPage,
Mask<XFA_PrintOpt> dwOptions) { … }
FX_ARGB CXFA_FFDoc::GetHighlightColor() const { … }
IJS_Runtime* CXFA_FFDoc::GetIJSRuntime() const { … }
CFX_XMLDocument* CXFA_FFDoc::GetXMLDocument() const { … }
RetainPtr<IFX_SeekableReadStream> CXFA_FFDoc::OpenLinkedFile(
const WideString& wsLink) { … }
CXFA_FFDocView* CXFA_FFDoc::GetDocView(CXFA_LayoutProcessor* pLayout) { … }
CXFA_FFDocView* CXFA_FFDoc::GetDocView() { … }
bool CXFA_FFDoc::OpenDoc(CFX_XMLDocument* pXML) { … }
RetainPtr<CFGAS_GEFont> CXFA_FFDoc::GetPDFFont(const WideString& family,
uint32_t styles,
bool strict) { … }
RetainPtr<CFX_DIBitmap> CXFA_FFDoc::GetPDFNamedImage(WideStringView wsName,
int32_t& iImageXDpi,
int32_t& iImageYDpi) { … }
bool CXFA_FFDoc::SavePackage(CXFA_Node* pNode,
const RetainPtr<IFX_SeekableStream>& pFile) { … }