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

Side by Side Diff: views/controls/table/native_table_win.cc

Issue 6902069: Increase warning level to 4 on Visual Studio (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed remaining issues Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/ssl.gyp ('k') | views/view_win.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium 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 #include "views/controls/table/native_table_win.h" 5 #include "views/controls/table/native_table_win.h"
6 6
7 #include <commctrl.h> 7 #include <commctrl.h>
8 #include <windowsx.h> 8 #include <windowsx.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 } 580 }
581 581
582 memset(&item, 0, sizeof(LVITEM)); 582 memset(&item, 0, sizeof(LVITEM));
583 item.stateMask = 0; 583 item.stateMask = 0;
584 item.mask = LVIF_TEXT; 584 item.mask = LVIF_TEXT;
585 if (table_->type() == ICON_AND_TEXT) 585 if (table_->type() == ICON_AND_TEXT)
586 item.mask |= LVIF_IMAGE; 586 item.mask |= LVIF_IMAGE;
587 587
588 for (size_t j = start_column; j < table_->GetVisibleColumnCount(); ++j) { 588 for (size_t j = start_column; j < table_->GetVisibleColumnCount(); ++j) {
589 TableColumn& col = table_->GetVisibleColumnAt(j); 589 TableColumn col = table_->GetVisibleColumnAt(j);
590 int max_text_width = ListView_GetStringWidth(native_view(), 590 int max_text_width = ListView_GetStringWidth(native_view(),
591 col.title.c_str()); 591 col.title.c_str());
592 for (int i = start; i < max_row; ++i) { 592 for (int i = start; i < max_row; ++i) {
593 item.iItem = i; 593 item.iItem = i;
594 item.iSubItem = j; 594 item.iSubItem = j;
595 std::wstring text = table_->model()->GetText(i, col.id); 595 std::wstring text = table_->model()->GetText(i, col.id);
596 item.pszText = const_cast<LPWSTR>(text.c_str()); 596 item.pszText = const_cast<LPWSTR>(text.c_str());
597 item.iImage = 0; 597 item.iImage = 0;
598 ListView_SetItem(native_view(), &item); 598 ListView_SetItem(native_view(), &item);
599 599
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 903
904 //////////////////////////////////////////////////////////////////////////////// 904 ////////////////////////////////////////////////////////////////////////////////
905 // NativeButtonWrapper, public: 905 // NativeButtonWrapper, public:
906 906
907 // static 907 // static
908 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { 908 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) {
909 return new NativeTableWin(table); 909 return new NativeTableWin(table);
910 } 910 }
911 911
912 } // namespace views 912 } // namespace views
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl.gyp ('k') | views/view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698