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

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

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit 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
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Icon.cpp ('k') | fpdfsdk/pdfwindow/PWL_Utils.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/fxedit/include/fx_edit.h" 7 #include "fpdfsdk/fxedit/include/fx_edit.h"
8 #include "fpdfsdk/pdfwindow/PWL_Label.h" 8 #include "fpdfsdk/pdfwindow/PWL_Label.h"
9 #include "fpdfsdk/pdfwindow/PWL_Utils.h" 9 #include "fpdfsdk/pdfwindow/PWL_Utils.h"
10 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" 10 #include "fpdfsdk/pdfwindow/PWL_Wnd.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { 116 void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
117 CPWL_Wnd::GetThisAppearanceStream(sAppStream); 117 CPWL_Wnd::GetThisAppearanceStream(sAppStream);
118 118
119 sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)).AsStringC(); 119 sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)).AsStringC();
120 } 120 }
121 121
122 CFX_ByteString CPWL_Label::GetTextAppearanceStream( 122 CFX_ByteString CPWL_Label::GetTextAppearanceStream(
123 const CFX_FloatPoint& ptOffset) const { 123 const CFX_FloatPoint& ptOffset) const {
124 CFX_ByteTextBuf sRet; 124 CFX_ByteTextBuf sRet;
125 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); 125 CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset);
126
127 if (sEdit.GetLength() > 0) { 126 if (sEdit.GetLength() > 0) {
128 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() 127 sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC()
129 << sEdit.AsStringC() << "ET\n"; 128 << sEdit.AsStringC() << "ET\n";
130 } 129 }
131 130 return sRet.MakeString();
132 return sRet.AsStringC();
133 } 131 }
134 132
135 CFX_WideString CPWL_Label::GetText() const { 133 CFX_WideString CPWL_Label::GetText() const {
136 return m_pEdit->GetText(); 134 return m_pEdit->GetText();
137 } 135 }
138 136
139 void CPWL_Label::SetLimitChar(int32_t nLimitChar) { 137 void CPWL_Label::SetLimitChar(int32_t nLimitChar) {
140 m_pEdit->SetLimitChar(nLimitChar); 138 m_pEdit->SetLimitChar(nLimitChar);
141 } 139 }
142 140
143 int32_t CPWL_Label::GetTotalWords() { 141 int32_t CPWL_Label::GetTotalWords() {
144 return m_pEdit->GetTotalWords(); 142 return m_pEdit->GetTotalWords();
145 } 143 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Icon.cpp ('k') | fpdfsdk/pdfwindow/PWL_Utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698