summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_annothandler.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-12 15:47:07 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-12 15:47:07 -0700
commita8a39e25af3c19bb91434fdf367cffa0e1536934 (patch)
treed6bfa30a756014ec79dfce75d6658ecf3778594a /fpdfsdk/src/fsdk_annothandler.cpp
parent5ef9faa8e8f5593556d78f775d86f1e52e4c341a (diff)
downloadpdfium-a8a39e25af3c19bb91434fdf367cffa0e1536934.tar.xz
Allow building of XFA branch without XFA
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1399833002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_annothandler.cpp')
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 287a26baa8..11d2aef928 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,