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

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

Issue 1960043003: Fix some misc nits. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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 "fpdfsdk/fxedit/include/fxet_list.h" 7 #include "fpdfsdk/fxedit/include/fxet_list.h"
8 8
9 #include "core/fpdfdoc/include/cpvt_word.h" 9 #include "core/fpdfdoc/include/cpvt_word.h"
10 #include "fpdfsdk/fxedit/include/fxet_edit.h" 10 #include "fpdfsdk/fxedit/include/fxet_edit.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void CFX_ListItem::SetFontSize(FX_FLOAT fFontSize) { 56 void CFX_ListItem::SetFontSize(FX_FLOAT fFontSize) {
57 m_pEdit->SetFontSize(fFontSize); 57 m_pEdit->SetFontSize(fFontSize);
58 } 58 }
59 59
60 FX_FLOAT CFX_ListItem::GetItemHeight() const { 60 FX_FLOAT CFX_ListItem::GetItemHeight() const {
61 return m_pEdit->GetContentRect().Height(); 61 return m_pEdit->GetContentRect().Height();
62 } 62 }
63 63
64 uint16_t CFX_ListItem::GetFirstChar() const { 64 uint16_t CFX_ListItem::GetFirstChar() const {
65 CPVT_Word word; 65 CPVT_Word word;
66 66 IFX_Edit_Iterator* pIterator = GetIterator();
67 if (IFX_Edit_Iterator* pIterator = GetIterator()) { 67 pIterator->SetAt(1);
68 pIterator->SetAt(1); 68 pIterator->GetWord(word);
69 pIterator->GetWord(word);
70 }
71
72 return word.Word; 69 return word.Word;
73 } 70 }
74 71
75 CFX_WideString CFX_ListItem::GetText() const { 72 CFX_WideString CFX_ListItem::GetText() const {
76 return m_pEdit->GetText(); 73 return m_pEdit->GetText();
77 } 74 }
78 75
79 CFX_List::CFX_List() 76 CFX_List::CFX_List()
80 : m_fFontSize(0.0f), m_pFontMap(NULL), m_bMultiple(FALSE) {} 77 : m_fFontSize(0.0f), m_pFontMap(NULL), m_bMultiple(FALSE) {}
81 78
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 777
781 int32_t CFX_ListCtrl::GetItemIndex(const CFX_FloatPoint& point) const { 778 int32_t CFX_ListCtrl::GetItemIndex(const CFX_FloatPoint& point) const {
782 return CFX_List::GetItemIndex(OutToIn(point)); 779 return CFX_List::GetItemIndex(OutToIn(point));
783 } 780 }
784 781
785 CFX_WideString CFX_ListCtrl::GetText() const { 782 CFX_WideString CFX_ListCtrl::GetText() const {
786 if (IsMultipleSel()) 783 if (IsMultipleSel())
787 return GetItemText(m_nCaretIndex); 784 return GetItemText(m_nCaretIndex);
788 return GetItemText(m_nSelItem); 785 return GetItemText(m_nSelItem);
789 } 786 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698