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

Side by Side Diff: fpdfsdk/fxedit/fxet_edit.cpp

Issue 2347313002: Remove duplicated charset definitions (Closed)
Patch Set: Nits 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 | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fxedit/include/fx_edit.h » ('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 "fpdfsdk/fxedit/include/fxet_edit.h" 7 #include "fpdfsdk/fxedit/include/fxet_edit.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 m_pEdit->SelectNone(); 626 m_pEdit->SelectNone();
627 m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos); 627 m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
628 m_pEdit->Clear(FALSE, TRUE); 628 m_pEdit->Clear(FALSE, TRUE);
629 } 629 }
630 } 630 }
631 631
632 void CFXEU_Clear::Undo() { 632 void CFXEU_Clear::Undo() {
633 if (m_pEdit) { 633 if (m_pEdit) {
634 m_pEdit->SelectNone(); 634 m_pEdit->SelectNone();
635 m_pEdit->SetCaret(m_wrSel.BeginPos); 635 m_pEdit->SetCaret(m_wrSel.BeginPos);
636 m_pEdit->InsertText(m_swText, DEFAULT_CHARSET, FALSE, TRUE); 636 m_pEdit->InsertText(m_swText, FXFONT_DEFAULT_CHARSET, FALSE, TRUE);
637 m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos); 637 m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
638 } 638 }
639 } 639 }
640 640
641 CFXEU_InsertText::CFXEU_InsertText(CFX_Edit* pEdit, 641 CFXEU_InsertText::CFXEU_InsertText(CFX_Edit* pEdit,
642 const CPVT_WordPlace& wpOldPlace, 642 const CPVT_WordPlace& wpOldPlace,
643 const CPVT_WordPlace& wpNewPlace, 643 const CPVT_WordPlace& wpNewPlace,
644 const CFX_WideString& swText, 644 const CFX_WideString& swText,
645 int32_t charset) 645 int32_t charset)
646 : m_pEdit(pEdit), 646 : m_pEdit(pEdit),
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 1264
1265 return nLines; 1265 return nLines;
1266 } 1266 }
1267 1267
1268 CPVT_WordRange CFX_Edit::GetSelectWordRange() const { 1268 CPVT_WordRange CFX_Edit::GetSelectWordRange() const {
1269 return m_SelState.ConvertToWordRange(); 1269 return m_SelState.ConvertToWordRange();
1270 } 1270 }
1271 1271
1272 void CFX_Edit::SetText(const CFX_WideString& sText) { 1272 void CFX_Edit::SetText(const CFX_WideString& sText) {
1273 Empty(); 1273 Empty();
1274 DoInsertText(CPVT_WordPlace(0, 0, -1), sText, DEFAULT_CHARSET); 1274 DoInsertText(CPVT_WordPlace(0, 0, -1), sText, FXFONT_DEFAULT_CHARSET);
1275 Paint(); 1275 Paint();
1276 } 1276 }
1277 1277
1278 FX_BOOL CFX_Edit::InsertWord(uint16_t word, int32_t charset) { 1278 FX_BOOL CFX_Edit::InsertWord(uint16_t word, int32_t charset) {
1279 return InsertWord(word, charset, nullptr, TRUE, TRUE); 1279 return InsertWord(word, charset, nullptr, TRUE, TRUE);
1280 } 1280 }
1281 1281
1282 FX_BOOL CFX_Edit::InsertReturn() { 1282 FX_BOOL CFX_Edit::InsertReturn() {
1283 return InsertReturn(nullptr, nullptr, TRUE, TRUE); 1283 return InsertReturn(nullptr, nullptr, TRUE, TRUE);
1284 } 1284 }
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 int32_t CFX_Edit_RectArray::GetSize() const { 2522 int32_t CFX_Edit_RectArray::GetSize() const {
2523 return m_Rects.GetSize(); 2523 return m_Rects.GetSize();
2524 } 2524 }
2525 2525
2526 CFX_FloatRect* CFX_Edit_RectArray::GetAt(int32_t nIndex) const { 2526 CFX_FloatRect* CFX_Edit_RectArray::GetAt(int32_t nIndex) const {
2527 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) 2527 if (nIndex < 0 || nIndex >= m_Rects.GetSize())
2528 return nullptr; 2528 return nullptr;
2529 2529
2530 return m_Rects.GetAt(nIndex); 2530 return m_Rects.GetAt(nIndex);
2531 } 2531 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fxedit/include/fx_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698