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

Side by Side Diff: xfa/fwl/basewidget/fwl_editimp.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 | « xfa/fgas/localization/fgas_locale.cpp ('k') | xfa/fxbarcode/oned/BC_OnedCodaBarReader.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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoRedoUndo) { 727 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoRedoUndo) {
728 return TRUE; 728 return TRUE;
729 } 729 }
730 return m_pEdtEngine->Undo(bsRecord); 730 return m_pEdtEngine->Undo(bsRecord);
731 } 731 }
732 FX_BOOL CFWL_EditImp::Undo() { 732 FX_BOOL CFWL_EditImp::Undo() {
733 if (!CanUndo()) { 733 if (!CanUndo()) {
734 return FALSE; 734 return FALSE;
735 } 735 }
736 CFX_ByteString bsRecord = m_RecordArr[m_iCurRecord--]; 736 CFX_ByteString bsRecord = m_RecordArr[m_iCurRecord--];
737 return Undo(bsRecord); 737 return Undo(bsRecord.AsByteStringC());
738 } 738 }
739 FX_BOOL CFWL_EditImp::Redo() { 739 FX_BOOL CFWL_EditImp::Redo() {
740 if (!CanRedo()) { 740 if (!CanRedo()) {
741 return FALSE; 741 return FALSE;
742 } 742 }
743 CFX_ByteString bsRecord = m_RecordArr[++m_iCurRecord]; 743 CFX_ByteString bsRecord = m_RecordArr[++m_iCurRecord];
744 return Redo(bsRecord); 744 return Redo(bsRecord.AsByteStringC());
745 } 745 }
746 FX_BOOL CFWL_EditImp::CanUndo() { 746 FX_BOOL CFWL_EditImp::CanUndo() {
747 return m_iCurRecord >= 0; 747 return m_iCurRecord >= 0;
748 } 748 }
749 FX_BOOL CFWL_EditImp::CanRedo() { 749 FX_BOOL CFWL_EditImp::CanRedo() {
750 return m_iCurRecord < m_RecordArr.GetSize() - 1; 750 return m_iCurRecord < m_RecordArr.GetSize() - 1;
751 } 751 }
752 FWL_ERR CFWL_EditImp::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) { 752 FWL_ERR CFWL_EditImp::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) {
753 if (!m_pEdtEngine) 753 if (!m_pEdtEngine)
754 return FWL_ERR_Succeeded; 754 return FWL_ERR_Succeeded;
(...skipping 1415 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/fgas/localization/fgas_locale.cpp ('k') | xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698