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

Side by Side Diff: xfa/src/fwl/src/basewidget/fwl_editimp.cpp

Issue 1736133002: Remove FDE_USEFORMATBLOCK. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master 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 unified diff | Download patch
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/src/fwl/src/basewidget/include/fwl_editimp.h" 7 #include "xfa/src/fwl/src/basewidget/include/fwl_editimp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 int32_t IFWL_Edit::GetLimit() { 79 int32_t IFWL_Edit::GetLimit() {
80 return static_cast<CFWL_EditImp*>(GetImpl())->GetLimit(); 80 return static_cast<CFWL_EditImp*>(GetImpl())->GetLimit();
81 } 81 }
82 FWL_ERR IFWL_Edit::SetLimit(int32_t nLimit) { 82 FWL_ERR IFWL_Edit::SetLimit(int32_t nLimit) {
83 return static_cast<CFWL_EditImp*>(GetImpl())->SetLimit(nLimit); 83 return static_cast<CFWL_EditImp*>(GetImpl())->SetLimit(nLimit);
84 } 84 }
85 FWL_ERR IFWL_Edit::SetAliasChar(FX_WCHAR wAlias) { 85 FWL_ERR IFWL_Edit::SetAliasChar(FX_WCHAR wAlias) {
86 return static_cast<CFWL_EditImp*>(GetImpl())->SetAliasChar(wAlias); 86 return static_cast<CFWL_EditImp*>(GetImpl())->SetAliasChar(wAlias);
87 } 87 }
88 FWL_ERR IFWL_Edit::SetFormatString(const CFX_WideString& wsFormat) {
89 return static_cast<CFWL_EditImp*>(GetImpl())->SetFormatString(wsFormat);
90 }
91 FWL_ERR IFWL_Edit::Insert(int32_t nStart, 88 FWL_ERR IFWL_Edit::Insert(int32_t nStart,
92 const FX_WCHAR* lpText, 89 const FX_WCHAR* lpText,
93 int32_t nLen) { 90 int32_t nLen) {
94 return static_cast<CFWL_EditImp*>(GetImpl())->Insert(nStart, lpText, nLen); 91 return static_cast<CFWL_EditImp*>(GetImpl())->Insert(nStart, lpText, nLen);
95 } 92 }
96 FWL_ERR IFWL_Edit::DeleteSelections() { 93 FWL_ERR IFWL_Edit::DeleteSelections() {
97 return static_cast<CFWL_EditImp*>(GetImpl())->DeleteSelections(); 94 return static_cast<CFWL_EditImp*>(GetImpl())->DeleteSelections();
98 } 95 }
99 FWL_ERR IFWL_Edit::DeleteRange(int32_t nStart, int32_t nCount) { 96 FWL_ERR IFWL_Edit::DeleteRange(int32_t nStart, int32_t nCount) {
100 return static_cast<CFWL_EditImp*>(GetImpl())->DeleteRange(nStart, nCount); 97 return static_cast<CFWL_EditImp*>(GetImpl())->DeleteRange(nStart, nCount);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 return FWL_ERR_Succeeded; 585 return FWL_ERR_Succeeded;
589 m_pEdtEngine->SetLimit(nLimit); 586 m_pEdtEngine->SetLimit(nLimit);
590 return FWL_ERR_Succeeded; 587 return FWL_ERR_Succeeded;
591 } 588 }
592 FWL_ERR CFWL_EditImp::SetAliasChar(FX_WCHAR wAlias) { 589 FWL_ERR CFWL_EditImp::SetAliasChar(FX_WCHAR wAlias) {
593 if (!m_pEdtEngine) 590 if (!m_pEdtEngine)
594 return FWL_ERR_Indefinite; 591 return FWL_ERR_Indefinite;
595 m_pEdtEngine->SetAliasChar(wAlias); 592 m_pEdtEngine->SetAliasChar(wAlias);
596 return FWL_ERR_Succeeded; 593 return FWL_ERR_Succeeded;
597 } 594 }
598 FWL_ERR CFWL_EditImp::SetFormatString(const CFX_WideString& wsFormat) {
599 if (!m_pEdtEngine)
600 return FWL_ERR_Succeeded;
601 m_pEdtEngine->SetFormatBlock(0, wsFormat);
602 return FWL_ERR_Succeeded;
603 }
604 FWL_ERR CFWL_EditImp::Insert(int32_t nStart, 595 FWL_ERR CFWL_EditImp::Insert(int32_t nStart,
605 const FX_WCHAR* lpText, 596 const FX_WCHAR* lpText,
606 int32_t nLen) { 597 int32_t nLen) {
607 if (!m_pEdtEngine) 598 if (!m_pEdtEngine)
608 return FWL_ERR_Succeeded; 599 return FWL_ERR_Succeeded;
609 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly) || 600 if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly) ||
610 (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) { 601 (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)) {
611 return FWL_ERR_Indefinite; 602 return FWL_ERR_Indefinite;
612 } 603 }
613 m_pEdtEngine->Insert(nStart, lpText, nLen); 604 m_pEdtEngine->Insert(nStart, lpText, nLen);
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 CFX_RectF rect; 2144 CFX_RectF rect;
2154 m_pOwner->GetWidgetRect(rect); 2145 m_pOwner->GetWidgetRect(rect);
2155 CFX_RectF rtInvalidate; 2146 CFX_RectF rtInvalidate;
2156 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); 2147 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2);
2157 m_pOwner->Repaint(&rtInvalidate); 2148 m_pOwner->Repaint(&rtInvalidate);
2158 } 2149 }
2159 return TRUE; 2150 return TRUE;
2160 } 2151 }
2161 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) { 2152 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {
2162 } 2153 }
OLDNEW
« no previous file with comments | « xfa/src/fee/src/fee/fde_txtedtengine.cpp ('k') | xfa/src/fwl/src/basewidget/include/fwl_editimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698