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

Side by Side Diff: xfa/fwl/basewidget/fwl_editimp.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type 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 | « xfa/fwl/basewidget/fwl_barcodeimp.cpp ('k') | xfa/fwl/core/fwl_formimp.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 "xfa/fwl/basewidget/fwl_editimp.h" 7 #include "xfa/fwl/basewidget/fwl_editimp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 break; 416 break;
417 } 417 }
418 } 418 }
419 int32_t nDestLen = bsReplace.GetLength(); 419 int32_t nDestLen = bsReplace.GetLength();
420 CFX_WideString wsDest; 420 CFX_WideString wsDest;
421 FX_WCHAR* pBuffer = wsDest.GetBuffer(nDestLen); 421 FX_WCHAR* pBuffer = wsDest.GetBuffer(nDestLen);
422 for (int32_t i = 0; i < nDestLen; i++) { 422 for (int32_t i = 0; i < nDestLen; i++) {
423 pBuffer[i] = bsReplace[i]; 423 pBuffer[i] = bsReplace[i];
424 } 424 }
425 wsDest.ReleaseBuffer(nDestLen); 425 wsDest.ReleaseBuffer(nDestLen);
426 Replace(nWordStart, nWordCount, wsDest); 426 Replace(nWordStart, nWordCount, wsDest.AsWideStringC());
427 return TRUE; 427 return TRUE;
428 } 428 }
429 void CFWL_EditImp::DrawSpellCheck(CFX_Graphics* pGraphics, 429 void CFWL_EditImp::DrawSpellCheck(CFX_Graphics* pGraphics,
430 const CFX_Matrix* pMatrix) { 430 const CFX_Matrix* pMatrix) {
431 pGraphics->SaveGraphState(); 431 pGraphics->SaveGraphState();
432 if (pMatrix) { 432 if (pMatrix) {
433 pGraphics->ConcatMatrix(const_cast<CFX_Matrix*>(pMatrix)); 433 pGraphics->ConcatMatrix(const_cast<CFX_Matrix*>(pMatrix));
434 } 434 }
435 FX_ARGB cr = 0xFFFF0000; 435 FX_ARGB cr = 0xFFFF0000;
436 CFX_Color crLine(cr); 436 CFX_Color crLine(cr);
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 } 2170 }
2171 CFX_RectF rect; 2171 CFX_RectF rect;
2172 m_pOwner->GetWidgetRect(rect); 2172 m_pOwner->GetWidgetRect(rect);
2173 CFX_RectF rtInvalidate; 2173 CFX_RectF rtInvalidate;
2174 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); 2174 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2);
2175 m_pOwner->Repaint(&rtInvalidate); 2175 m_pOwner->Repaint(&rtInvalidate);
2176 } 2176 }
2177 return TRUE; 2177 return TRUE;
2178 } 2178 }
2179 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} 2179 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {}
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_barcodeimp.cpp ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698