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

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

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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_ListBox.cpp ('k') | fpdfsdk/pdfwindow/PWL_Signature.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_ScrollBar.h" 7 #include "fpdfsdk/pdfwindow/PWL_ScrollBar.h"
8 8
9 #include "core/include/fxge/fx_ge.h" 9 #include "core/include/fxge/fx_ge.h"
10 #include "fpdfsdk/pdfwindow/PWL_Utils.h" 10 #include "fpdfsdk/pdfwindow/PWL_Utils.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 664
665 void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { 665 void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
666 CFX_FloatRect rectWnd = GetWindowRect(); 666 CFX_FloatRect rectWnd = GetWindowRect();
667 667
668 if (IsVisible() && !rectWnd.IsEmpty()) { 668 if (IsVisible() && !rectWnd.IsEmpty()) {
669 CFX_ByteTextBuf sButton; 669 CFX_ByteTextBuf sButton;
670 670
671 sButton << "q\n"; 671 sButton << "q\n";
672 sButton << "0 w\n" 672 sButton << "0 w\n"
673 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE); 673 << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE)
674 .AsByteStringC();
674 sButton << rectWnd.left << " " << rectWnd.bottom << " " 675 sButton << rectWnd.left << " " << rectWnd.bottom << " "
675 << rectWnd.right - rectWnd.left << " " 676 << rectWnd.right - rectWnd.left << " "
676 << rectWnd.top - rectWnd.bottom << " re b Q\n"; 677 << rectWnd.top - rectWnd.bottom << " re b Q\n";
677 678
678 sAppStream << sButton; 679 sAppStream << sButton;
679 } 680 }
680 } 681 }
681 682
682 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, 683 void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice,
683 CFX_Matrix* pUser2Device) { 684 CFX_Matrix* pUser2Device) {
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 if (m_bMinOrMax) 1191 if (m_bMinOrMax)
1191 m_sData.SubSmall(); 1192 m_sData.SubSmall();
1192 else 1193 else
1193 m_sData.AddSmall(); 1194 m_sData.AddSmall();
1194 1195
1195 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) { 1196 if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0) {
1196 MovePosButton(TRUE); 1197 MovePosButton(TRUE);
1197 NotifyScrollWindow(); 1198 NotifyScrollWindow();
1198 } 1199 }
1199 } 1200 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_ListBox.cpp ('k') | fpdfsdk/pdfwindow/PWL_Signature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698