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

Side by Side Diff: xfa/fxfa/app/xfa_fftextedit.cpp

Issue 2328573002: Split CPDFXFA_Document apart (Closed)
Patch Set: Fix merge Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_fftext.cpp ('k') | xfa/fxfa/app/xfa_ffwidget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_fftextedit.h" 7 #include "xfa/fxfa/app/xfa_fftextedit.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 FWLToClient(ms.m_fx, ms.m_fy); 139 FWLToClient(ms.m_fx, ms.m_fy);
140 TranslateFWLMessage(&ms); 140 TranslateFWLMessage(&ms);
141 return TRUE; 141 return TRUE;
142 } 142 }
143 FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags, 143 FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags,
144 FX_FLOAT fx, 144 FX_FLOAT fx,
145 FX_FLOAT fy) { 145 FX_FLOAT fy) {
146 if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy)) 146 if (!CXFA_FFField::OnRButtonUp(dwFlags, fx, fy))
147 return FALSE; 147 return FALSE;
148 148
149 GetDoc()->GetDocProvider()->PopupMenu(this, CFX_PointF(fx, fy)); 149 GetDoc()->GetDocEnvironment()->PopupMenu(this, CFX_PointF(fx, fy));
150 return TRUE; 150 return TRUE;
151 } 151 }
152 FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) { 152 FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) {
153 m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged; 153 m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged;
154 if (!IsFocused()) { 154 if (!IsFocused()) {
155 m_dwStatus |= XFA_WidgetStatus_Focused; 155 m_dwStatus |= XFA_WidgetStatus_Focused;
156 UpdateFWLData(); 156 UpdateFWLData();
157 AddInvalidateRect(); 157 AddInvalidateRect();
158 } 158 }
159 CXFA_FFWidget::OnSetFocus(pOldWidget); 159 CXFA_FFWidget::OnSetFocus(pOldWidget);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 CXFA_LocaleValue date(XFA_VT_DATE, GetDoc()->GetXFADoc()->GetLocalMgr()); 765 CXFA_LocaleValue date(XFA_VT_DATE, GetDoc()->GetXFADoc()->GetLocalMgr());
766 CFX_Unitime dt; 766 CFX_Unitime dt;
767 dt.Set(iYear, iMonth, iDay); 767 dt.Set(iYear, iMonth, iDay);
768 date.SetDate(dt); 768 date.SetDate(dt);
769 CFX_WideString wsDate; 769 CFX_WideString wsDate;
770 date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(), 770 date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(),
771 XFA_VALUEPICTURE_Edit); 771 XFA_VALUEPICTURE_Edit);
772 CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget; 772 CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget;
773 pDateTime->SetEditText(wsDate); 773 pDateTime->SetEditText(wsDate);
774 pDateTime->Update(); 774 pDateTime->Update();
775 GetDoc()->GetDocProvider()->SetFocusWidget(GetDoc(), nullptr); 775 GetDoc()->GetDocEnvironment()->SetFocusWidget(GetDoc(), nullptr);
776 CXFA_EventParam eParam; 776 CXFA_EventParam eParam;
777 eParam.m_eType = XFA_EVENT_Change; 777 eParam.m_eType = XFA_EVENT_Change;
778 eParam.m_pTarget = m_pDataAcc; 778 eParam.m_pTarget = m_pDataAcc;
779 m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw); 779 m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw);
780 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); 780 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
781 } 781 }
782 782
783 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { 783 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) {
784 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { 784 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) {
785 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; 785 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent;
786 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, 786 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth,
787 event->iDay); 787 event->iDay);
788 return; 788 return;
789 } 789 }
790 CXFA_FFTextEdit::OnProcessEvent(pEvent); 790 CXFA_FFTextEdit::OnProcessEvent(pEvent);
791 } 791 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_fftext.cpp ('k') | xfa/fxfa/app/xfa_ffwidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698