summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp29
-rw-r--r--xfa/fwl/core/fwl_noteimp.cpp6
-rw-r--r--xfa/fwl/core/fwl_noteimp.h1
-rw-r--r--xfa/fwl/core/ifwl_notedriver.h1
-rw-r--r--xfa/fxfa/app/xfa_fwladapter.cpp25
5 files changed, 27 insertions, 35 deletions
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 73c7fa31e1..237e461917 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);
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index ecc13f082e..72dd9ecff2 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -161,11 +161,7 @@ FX_BOOL CFWL_NoteDriver::SendNote(CFWL_Note* pNote) {
}
return TRUE;
}
-extern void FWL_PostMessageToMainRoop(CFWL_Message* pMessage);
-FX_BOOL CFWL_NoteDriver::PostMessage(CFWL_Message* pMessage) {
- FWL_PostMessageToMainRoop(pMessage);
- return TRUE;
-}
+
#define FWL_NoteDriver_EventKey 1100
FWL_ERR CFWL_NoteDriver::RegisterEventTarget(IFWL_Widget* pListener,
IFWL_Widget* pEventSource,
diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h
index 7554082871..57c70edee0 100644
--- a/xfa/fwl/core/fwl_noteimp.h
+++ b/xfa/fwl/core/fwl_noteimp.h
@@ -55,7 +55,6 @@ class CFWL_NoteDriver : public IFWL_NoteDriver {
// IFWL_NoteDriver:
FX_BOOL SendNote(CFWL_Note* pNote) override;
- FX_BOOL PostMessage(CFWL_Message* pMessage) override;
FWL_ERR RegisterEventTarget(IFWL_Widget* pListener,
IFWL_Widget* pEventSource = NULL,
FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) override;
diff --git a/xfa/fwl/core/ifwl_notedriver.h b/xfa/fwl/core/ifwl_notedriver.h
index cdedd6f0c9..cdb751f324 100644
--- a/xfa/fwl/core/ifwl_notedriver.h
+++ b/xfa/fwl/core/ifwl_notedriver.h
@@ -30,7 +30,6 @@ class IFWL_NoteDriver {
virtual ~IFWL_NoteDriver() {}
virtual FX_BOOL SendNote(CFWL_Note* pNote) = 0;
- virtual FX_BOOL PostMessage(CFWL_Message* pMessage) = 0;
virtual FWL_ERR RegisterEventTarget(
IFWL_Widget* pListener,
IFWL_Widget* pEventSource = NULL,
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 1e6010e0c9..78d4918a9c 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -8,31 +8,6 @@
#include "xfa/fxfa/app/xfa_ffdoc.h"
#include "xfa/fxfa/app/xfa_fffield.h"
-#include "xfa/fxfa/app/xfa_ffwidget.h"
-
-void FWL_PostMessageToMainRoop(CFWL_Message* pMessage) {}
-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;
-}
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
const CFX_RectF* pRect) {