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

Side by Side Diff: fpdfsdk/pdfwindow/PWL_ListBox.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 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/pdfwindow/PWL_Label.cpp ('k') | fpdfsdk/pdfwindow/PWL_ScrollBar.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 "fpdfsdk/pdfwindow/PWL_ListBox.h" 7 #include "fpdfsdk/pdfwindow/PWL_ListBox.h"
8 8
9 #include "fpdfsdk/pdfwindow/PWL_Edit.h" 9 #include "fpdfsdk/pdfwindow/PWL_Edit.h"
10 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" 10 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 for (int32_t i = 0, sz = m_pList->GetCount(); i < sz; i++) { 113 for (int32_t i = 0, sz = m_pList->GetCount(); i < sz; i++) {
114 CFX_FloatRect rcItem = m_pList->GetItemRect(i); 114 CFX_FloatRect rcItem = m_pList->GetItemRect(i);
115 115
116 if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom) 116 if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom)
117 continue; 117 continue;
118 118
119 CFX_FloatPoint ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f); 119 CFX_FloatPoint ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f);
120 if (m_pList->IsItemSelected(i)) { 120 if (m_pList->IsItemSelected(i)) {
121 sListItems << CPWL_Utils::GetRectFillAppStream(rcItem, 121 sListItems << CPWL_Utils::GetRectFillAppStream(rcItem,
122 PWL_DEFAULT_SELBACKCOLOR) 122 PWL_DEFAULT_SELBACKCOLOR)
123 .AsByteStringC(); 123 .AsStringC();
124 CFX_ByteString sItem = 124 CFX_ByteString sItem =
125 CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset); 125 CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset);
126 if (sItem.GetLength() > 0) { 126 if (sItem.GetLength() > 0) {
127 sListItems << "BT\n" 127 sListItems << "BT\n"
128 << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELTEXTCOLOR) 128 << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELTEXTCOLOR)
129 .AsByteStringC() 129 .AsStringC()
130 << sItem.AsByteStringC() << "ET\n"; 130 << sItem.AsStringC() << "ET\n";
131 } 131 }
132 } else { 132 } else {
133 CFX_ByteString sItem = 133 CFX_ByteString sItem =
134 CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset); 134 CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset);
135 if (sItem.GetLength() > 0) { 135 if (sItem.GetLength() > 0) {
136 sListItems << "BT\n" 136 sListItems << "BT\n"
137 << CPWL_Utils::GetColorAppStream(GetTextColor()) 137 << CPWL_Utils::GetColorAppStream(GetTextColor())
138 .AsByteStringC() 138 .AsStringC()
139 << sItem.AsByteStringC() << "ET\n"; 139 << sItem.AsStringC() << "ET\n";
140 } 140 }
141 } 141 }
142 } 142 }
143 } 143 }
144 144
145 if (sListItems.GetLength() > 0) { 145 if (sListItems.GetLength() > 0) {
146 CFX_ByteTextBuf sClip; 146 CFX_ByteTextBuf sClip;
147 CFX_FloatRect rcClient = GetClientRect(); 147 CFX_FloatRect rcClient = GetClientRect();
148 148
149 sClip << "q\n"; 149 sClip << "q\n";
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 if (zDelta < 0) { 528 if (zDelta < 0) {
529 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 529 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
530 } else { 530 } else {
531 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 531 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
532 } 532 }
533 533
534 FX_BOOL bExit = FALSE; 534 FX_BOOL bExit = FALSE;
535 OnNotifySelChanged(FALSE, bExit, nFlag); 535 OnNotifySelChanged(FALSE, bExit, nFlag);
536 return TRUE; 536 return TRUE;
537 } 537 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Label.cpp ('k') | fpdfsdk/pdfwindow/PWL_ScrollBar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698