| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) {} |
| OLD | NEW |