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 "../../include/fxedit/fxet_stub.h" | 7 #include "../../include/fxedit/fxet_stub.h" |
8 #include "../../include/fxedit/fxet_edit.h" | 8 #include "../../include/fxedit/fxet_edit.h" |
9 | 9 |
10 #define FX_EDIT_UNDO_MAXITEM 10000 | 10 #define FX_EDIT_UNDO_MAXITEM 10000 |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 } | 864 } |
865 } | 865 } |
866 | 866 |
867 /* -------------------------------------------------------------------------- */ | 867 /* -------------------------------------------------------------------------- */ |
868 | 868 |
869 CFXEU_SetSecProps::CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & pl
ace, EDIT_PROPS_E ep, | 869 CFXEU_SetSecProps::CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & pl
ace, EDIT_PROPS_E ep, |
870 const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwor
dprops, | 870 const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwor
dprops, |
871 const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwor
dprops, const CPVT_WordRange & range) | 871 const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwor
dprops, const CPVT_WordRange & range) |
872 : m_pEdit(pEdit), | 872 : m_pEdit(pEdit), |
873 m_wpPlace(place), | 873 m_wpPlace(place), |
| 874 m_wrPlace(range), |
874 m_eProps(ep), | 875 m_eProps(ep), |
875 m_OldSecProps(oldsecprops), | 876 m_OldSecProps(oldsecprops), |
876 m_NewSecProps(newsecprops), | 877 m_NewSecProps(newsecprops), |
877 m_OldWordProps(oldwordprops), | 878 m_OldWordProps(oldwordprops), |
878 » » m_NewWordProps(newwordprops), | 879 » » m_NewWordProps(newwordprops) |
879 » » m_wrPlace(range) | |
880 { | 880 { |
881 } | 881 } |
882 | 882 |
883 CFXEU_SetSecProps::~CFXEU_SetSecProps() | 883 CFXEU_SetSecProps::~CFXEU_SetSecProps() |
884 { | 884 { |
885 } | 885 } |
886 | 886 |
887 void CFXEU_SetSecProps::Redo() | 887 void CFXEU_SetSecProps::Redo() |
888 { | 888 { |
889 if (m_pEdit) | 889 if (m_pEdit) |
(...skipping 21 matching lines...) Expand all Loading... |
911 } | 911 } |
912 } | 912 } |
913 } | 913 } |
914 | 914 |
915 /* -------------------------------------------------------------------------- */ | 915 /* -------------------------------------------------------------------------- */ |
916 | 916 |
917 CFXEU_SetWordProps::CFXEU_SetWordProps(CFX_Edit * pEdit, const CPVT_WordPlace &
place, EDIT_PROPS_E ep, | 917 CFXEU_SetWordProps::CFXEU_SetWordProps(CFX_Edit * pEdit, const CPVT_WordPlace &
place, EDIT_PROPS_E ep, |
918 const CPVT_WordProps & oldprops, const CPVT_WordProps & newprops
, const CPVT_WordRange & range) | 918 const CPVT_WordProps & oldprops, const CPVT_WordProps & newprops
, const CPVT_WordRange & range) |
919 : m_pEdit(pEdit), | 919 : m_pEdit(pEdit), |
920 m_wpPlace(place), | 920 m_wpPlace(place), |
| 921 m_wrPlace(range), |
921 m_eProps(ep), | 922 m_eProps(ep), |
922 m_OldWordProps(oldprops), | 923 m_OldWordProps(oldprops), |
923 » » m_NewWordProps(newprops), | 924 » » m_NewWordProps(newprops) |
924 » » m_wrPlace(range) | |
925 { | 925 { |
926 } | 926 } |
927 | 927 |
928 CFXEU_SetWordProps::~CFXEU_SetWordProps() | 928 CFXEU_SetWordProps::~CFXEU_SetWordProps() |
929 { | 929 { |
930 } | 930 } |
931 | 931 |
932 void CFXEU_SetWordProps::Redo() | 932 void CFXEU_SetWordProps::Redo() |
933 { | 933 { |
934 if (m_pEdit) | 934 if (m_pEdit) |
(...skipping 21 matching lines...) Expand all Loading... |
956 } | 956 } |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
960 /* ------------------------------------- CFX_Edit ------------------------------
------- */ | 960 /* ------------------------------------- CFX_Edit ------------------------------
------- */ |
961 | 961 |
962 CFX_Edit::CFX_Edit(IPDF_VariableText * pVT) : | 962 CFX_Edit::CFX_Edit(IPDF_VariableText * pVT) : |
963 m_pVT(pVT), | 963 m_pVT(pVT), |
964 m_pNotify(NULL), | 964 m_pNotify(NULL), |
965 m_pOprNotify(NULL), | 965 m_pOprNotify(NULL), |
| 966 m_pVTProvide(NULL), |
966 m_wpCaret(-1,-1,-1), | 967 m_wpCaret(-1,-1,-1), |
967 m_wpOldCaret(-1,-1,-1), | 968 m_wpOldCaret(-1,-1,-1), |
| 969 m_SelState(), |
968 m_ptScrollPos(0,0), | 970 m_ptScrollPos(0,0), |
969 m_ptRefreshScrollPos(0,0), | 971 m_ptRefreshScrollPos(0,0), |
970 m_bEnableScroll(FALSE), | 972 m_bEnableScroll(FALSE), |
971 m_bEnableOverflow(FALSE), | |
972 m_pVTProvide(NULL), | |
973 m_pIterator(NULL), | 973 m_pIterator(NULL), |
974 m_SelState(), | |
975 m_ptCaret(0.0f,0.0f), | 974 m_ptCaret(0.0f,0.0f), |
976 m_Undo(FX_EDIT_UNDO_MAXITEM), | 975 m_Undo(FX_EDIT_UNDO_MAXITEM), |
977 m_nAlignment(0), | 976 m_nAlignment(0), |
978 m_bNotifyFlag(FALSE), | 977 m_bNotifyFlag(FALSE), |
| 978 m_bEnableOverflow(FALSE), |
979 m_bEnableRefresh(TRUE), | 979 m_bEnableRefresh(TRUE), |
980 m_rcOldContent(0.0f,0.0f,0.0f,0.0f), | 980 m_rcOldContent(0.0f,0.0f,0.0f,0.0f), |
981 m_bEnableUndo(TRUE), | 981 m_bEnableUndo(TRUE), |
982 m_bNotify(TRUE), | 982 m_bNotify(TRUE), |
983 m_bOprNotify(FALSE), | 983 m_bOprNotify(FALSE), |
984 m_pGroupUndoItem(NULL) | 984 m_pGroupUndoItem(NULL) |
985 { | 985 { |
986 ASSERT(pVT != NULL); | 986 ASSERT(pVT != NULL); |
987 } | 987 } |
988 | 988 |
(...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3601 } | 3601 } |
3602 } | 3602 } |
3603 | 3603 |
3604 void CFX_Edit::AddUndoItem(IFX_Edit_UndoItem* pUndoItem) | 3604 void CFX_Edit::AddUndoItem(IFX_Edit_UndoItem* pUndoItem) |
3605 { | 3605 { |
3606 m_Undo.AddItem(pUndoItem); | 3606 m_Undo.AddItem(pUndoItem); |
3607 if (m_bOprNotify && m_pOprNotify) | 3607 if (m_bOprNotify && m_pOprNotify) |
3608 m_pOprNotify->OnAddUndo(pUndoItem); | 3608 m_pOprNotify->OnAddUndo(pUndoItem); |
3609 } | 3609 } |
3610 | 3610 |
OLD | NEW |