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

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp

Issue 1101933003: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore operator. Created 5 years, 8 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/src/javascript/util.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Edit.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 "../../include/pdfwindow/PDFWindow.h" 7 #include "../../include/pdfwindow/PDFWindow.h"
8 #include "../../include/pdfwindow/PWL_Wnd.h" 8 #include "../../include/pdfwindow/PWL_Wnd.h"
9 #include "../../include/pdfwindow/PWL_EditCtrl.h" 9 #include "../../include/pdfwindow/PWL_EditCtrl.h"
10 #include "../../include/pdfwindow/PWL_Edit.h" 10 #include "../../include/pdfwindow/PWL_Edit.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 FX_INT32 CPWL_ComboBox::GetSelect() const 259 FX_INT32 CPWL_ComboBox::GetSelect() const
260 { 260 {
261 return m_nSelectItem; 261 return m_nSelectItem;
262 } 262 }
263 263
264 void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex) 264 void CPWL_ComboBox::SetSelect(FX_INT32 nItemIndex)
265 { 265 {
266 if (m_pList) 266 if (m_pList)
267 m_pList->Select(nItemIndex); 267 m_pList->Select(nItemIndex);
268 268
269 » m_pEdit->SetText(m_pList->GetText()); 269 » m_pEdit->SetText(m_pList->GetText().c_str());
270 270
271 m_nSelectItem = nItemIndex; 271 m_nSelectItem = nItemIndex;
272 } 272 }
273 273
274 void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar) 274 void CPWL_ComboBox::SetEditSel(FX_INT32 nStartChar,FX_INT32 nEndChar)
275 { 275 {
276 if (m_pEdit) 276 if (m_pEdit)
277 { 277 {
278 m_pEdit->SetSel(nStartChar,nEndChar); 278 m_pEdit->SetSel(nStartChar,nEndChar);
279 } 279 }
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 FX_BOOL CPWL_ComboBox::IsPopup() const 632 FX_BOOL CPWL_ComboBox::IsPopup() const
633 { 633 {
634 return m_bPopup; 634 return m_bPopup;
635 } 635 }
636 636
637 void CPWL_ComboBox::SetSelectText() 637 void CPWL_ComboBox::SetSelectText()
638 { 638 {
639 CFX_WideString swText = m_pList->GetText(); 639 CFX_WideString swText = m_pList->GetText();
640 m_pEdit->SelectAll(); 640 m_pEdit->SelectAll();
641 » m_pEdit->ReplaceSel(m_pList->GetText()); 641 » m_pEdit->ReplaceSel(m_pList->GetText().c_str());
642 m_pEdit->SelectAll(); 642 m_pEdit->SelectAll();
643 643
644 m_nSelectItem = m_pList->GetCurSel(); 644 m_nSelectItem = m_pList->GetCurSel();
645 } 645 }
646 646
647 FX_BOOL CPWL_ComboBox::IsModified() const 647 FX_BOOL CPWL_ComboBox::IsModified() const
648 { 648 {
649 return m_pEdit->IsModified(); 649 return m_pEdit->IsModified();
650 } 650 }
651 651
652 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify) 652 void CPWL_ComboBox::SetFillerNotify(IPWL_Filler_Notify* pNotify)
653 { 653 {
654 m_pFillerNotify = pNotify; 654 m_pFillerNotify = pNotify;
655 655
656 if (m_pEdit) 656 if (m_pEdit)
657 m_pEdit->SetFillerNotify(pNotify); 657 m_pEdit->SetFillerNotify(pNotify);
658 658
659 if (m_pList) 659 if (m_pList)
660 m_pList->SetFillerNotify(pNotify); 660 m_pList->SetFillerNotify(pNotify);
661 } 661 }
662 662
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/util.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698