Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: fpdfsdk/src/fsdk_annothandler.cpp

Issue 1399833002: Allow building of XFA branch without XFA (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Keep GN in sync. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_annothandler.cpp
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 287a26baa81c6497b77a81196b738993303201bd..11d2aef928379076e7c65ab1b11a7344b7a83d54 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -765,6 +765,8 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
CFX_RenderDevice* pDevice,
CPDF_Matrix* pUser2Device,
FX_DWORD dwFlags) {
+#ifdef PDF_ENABLE_XFA
+
ASSERT(pPageView != NULL);
ASSERT(pAnnot != NULL);
@@ -790,6 +792,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight);
// to do highlight and shadow
+#endif // PDF_ENABLE_XFA
}
void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) {
@@ -811,13 +814,15 @@ CPDF_Rect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot);
ASSERT(pWidgetHandler != NULL);
+ CFX_RectF rcBBox;
+#ifdef PDF_ENABLE_XFA
XFA_ELEMENT eType =
pWidgetHandler->GetDataAcc(pAnnot->GetXFAWidget())->GetUIType();
- CFX_RectF rcBBox;
if (eType == XFA_ELEMENT_Signature)
pWidgetHandler->GetBBox(pAnnot->GetXFAWidget(), rcBBox,
XFA_WIDGETSTATUS_Visible, TRUE);
else
+#endif
pWidgetHandler->GetBBox(pAnnot->GetXFAWidget(), rcBBox, 0);
CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
« no previous file with comments | « fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698