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

Unified Diff: fpdfsdk/cpdfsdk_xfawidget.cpp

Issue 2252723002: Split fpdfsdk/fsdk_baseform.h into individual classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Split fpdfsdk/fsdk_baseform.h into individual classes. Created 4 years, 4 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/cpdfsdk_xfaannothandler.cpp ('k') | fpdfsdk/formfiller/cffl_checkbox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_xfawidget.cpp
diff --git a/fpdfsdk/cpdfsdk_xfawidget.cpp b/fpdfsdk/cpdfsdk_xfawidget.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b866156da803490a1d77b4c3fdb9ea00544df451
--- /dev/null
+++ b/fpdfsdk/cpdfsdk_xfawidget.cpp
@@ -0,0 +1,40 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "fpdfsdk/include/cpdfsdk_xfawidget.h"
+
+#include "fpdfsdk/include/ipdfsdk_annothandler.h"
+#include "xfa/fxfa/include/xfa_ffwidget.h"
+
+CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(CXFA_FFWidget* pAnnot,
+ CPDFSDK_PageView* pPageView,
+ CPDFSDK_InterForm* pInterForm)
+ : CPDFSDK_Annot(pPageView),
+ m_pInterForm(pInterForm),
+ m_hXFAWidget(pAnnot) {}
+
+FX_BOOL CPDFSDK_XFAWidget::IsXFAField() {
+ return TRUE;
+}
+
+CXFA_FFWidget* CPDFSDK_XFAWidget::GetXFAWidget() const {
+ return m_hXFAWidget;
+}
+
+CFX_ByteString CPDFSDK_XFAWidget::GetType() const {
+ return FSDK_XFAWIDGET_TYPENAME;
+}
+
+CFX_ByteString CPDFSDK_XFAWidget::GetSubType() const {
+ return "";
+}
+
+CFX_FloatRect CPDFSDK_XFAWidget::GetRect() const {
+ CFX_RectF rcBBox;
+ GetXFAWidget()->GetRect(rcBBox);
+ return CFX_FloatRect(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
+ rcBBox.top + rcBBox.height);
+}
« no previous file with comments | « fpdfsdk/cpdfsdk_xfaannothandler.cpp ('k') | fpdfsdk/formfiller/cffl_checkbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698