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

Unified Diff: xfa/fwl/basewidget/fwl_editimp.cpp

Issue 1827343003: Cleanup some extern method declarations. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 | « core/fxge/ge/fx_ge_font.cpp ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_editimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 73c7fa31e14b75ea7802887c32501e1270d5349d..237e461917a0169ef9a3708755f1010c8d8817b1 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -27,6 +27,8 @@
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/fwl_widgetmgrimp.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
+#include "xfa/fxfa/app/xfa_ffdoc.h"
+#include "xfa/fxfa/app/xfa_ffwidget.h"
#include "xfa/fxgraphics/cfx_path.h"
// static
@@ -1619,9 +1621,30 @@ void CFWL_EditImp::InitEngine() {
}
m_pEdtEngine = IFDE_TxtEdtEngine::Create();
}
-extern FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
- FX_BOOL bVisible,
- const CFX_RectF* pRtAnchor);
+
+FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
+ FX_BOOL bVisible,
+ const CFX_RectF* pRtAnchor) {
+ CXFA_FFWidget* pXFAWidget = (CXFA_FFWidget*)pWidget->GetPrivateData(pWidget);
+ if (!pXFAWidget) {
+ return FALSE;
+ }
+ IXFA_DocProvider* pDocProvider = pXFAWidget->GetDoc()->GetDocProvider();
+ if (!pDocProvider) {
+ return FALSE;
+ }
+ if (bVisible) {
+ CFX_Matrix mt;
+ pXFAWidget->GetRotateMatrix(mt);
+ CFX_RectF rt(*pRtAnchor);
+ mt.TransformRect(rt);
+ pDocProvider->DisplayCaret(pXFAWidget, bVisible, &rt);
+ return TRUE;
+ }
+ pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);
+ return TRUE;
+}
+
void CFWL_EditImp::ShowCaret(FX_BOOL bVisible, CFX_RectF* pRect) {
if (m_pCaret) {
m_pCaret->ShowCaret(bVisible);
« no previous file with comments | « core/fxge/ge/fx_ge_font.cpp ('k') | xfa/fwl/core/fwl_noteimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698