From: <ah...@us...> - 2009-01-03 18:47:30
|
Revision: 12121 http://jvcl.svn.sourceforge.net/jvcl/?rev=12121&view=rev Author: ahuser Date: 2009-01-03 18:47:21 +0000 (Sat, 03 Jan 2009) Log Message: ----------- TabStop: AnsiString => TabStop: string Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2009-01-03 01:24:34 UTC (rev 12120) +++ trunk/jvcl/run/JvEditorCommon.pas 2009-01-03 18:47:21 UTC (rev 12121) @@ -708,7 +708,7 @@ FMouseDown: Boolean; { internal } - FTabStops: AnsiString; // Tabs string is always an AnsiString + FTabStops: string; FCompound: Integer; @@ -1047,7 +1047,7 @@ property InsertMode: Boolean index 0 read FInsertMode write SetMode default True; property ReadOnly: Boolean index 1 read FReadOnly write SetMode default False; property DoubleClickLine: Boolean read FDoubleClickLine write FDoubleClickLine default False; - property TabStops: AnsiString read FTabStops write FTabStops; + property TabStops: string read FTabStops write FTabStops; property SmartTab: Boolean read FSmartTab write FSmartTab default True; property BackSpaceUnindents: Boolean read FBackSpaceUnindents write FBackSpaceUnindents default True; property AutoIndent: Boolean read FAutoIndent write FAutoIndent default True; @@ -2910,7 +2910,7 @@ if Next then begin I := 0; - S := Trim(SubStrBySeparator(string(FTabStops), I, ' ')); + S := Trim(SubStrBySeparator(FTabStops, I, ' ')); A := 0; B := 1; while S <> '' do @@ -2923,7 +2923,7 @@ Exit; end; Inc(I); - S := Trim(SubStrBySeparator(string(FTabStops), I, ' ')); + S := Trim(SubStrBySeparator(FTabStops, I, ' ')); end; { after last tab pos } Result := X + ((B - A) - ((X - B) mod (B - A))); @@ -2931,7 +2931,7 @@ else begin I := 0; - S := Trim(SubStrBySeparator(string(FTabStops), I, ' ')); + S := Trim(SubStrBySeparator(FTabStops, I, ' ')); A := 0; B := 0; while S <> '' do @@ -2944,7 +2944,7 @@ Exit; end; Inc(I); - S := Trim(SubStrBySeparator(string(FTabStops), I, ' ')); + S := Trim(SubStrBySeparator(FTabStops, I, ' ')); end; { after last tab pos } Result := X - ((B - A) - ((X - B) mod (B - A))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2009-03-18 12:19:52
|
Revision: 12241 http://jvcl.svn.sourceforge.net/jvcl/?rev=12241&view=rev Author: ahuser Date: 2009-03-18 12:19:38 +0000 (Wed, 18 Mar 2009) Log Message: ----------- Fixed rev12240 Revision Links: -------------- http://jvcl.svn.sourceforge.net/jvcl/?rev=12240&view=rev Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2009-03-18 10:27:22 UTC (rev 12240) +++ trunk/jvcl/run/JvEditorCommon.pas 2009-03-18 12:19:38 UTC (rev 12241) @@ -4325,7 +4325,7 @@ ECR: TRect; BX, EX, BY, EY: Integer; begin - if (UpdateLock > 0) and (CellRect.Width > 1) and (CellRect.Height > 0) then + if (UpdateLock > 0) or (CellRect.Width <= 1) or (CellRect.Height <= 1) then Exit; PaintCaret(False); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2009-10-21 21:11:48
|
Revision: 12565 http://jvcl.svn.sourceforge.net/jvcl/?rev=12565&view=rev Author: ahuser Date: 2009-10-21 21:11:39 +0000 (Wed, 21 Oct 2009) Log Message: ----------- Mantis #4987: Editor components do not accept cyrrilic characters in Delphi 2010 Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2009-10-20 21:52:23 UTC (rev 12564) +++ trunk/jvcl/run/JvEditorCommon.pas 2009-10-21 21:11:39 UTC (rev 12565) @@ -265,8 +265,12 @@ TJvLineChangeEvent = procedure(Sender: TObject; Line: Integer) of object; TJvCaretChangedEvent = procedure(Sender: TObject; LastCaretX, LastCaretY: Integer) of object; - TEditCommand = Word; - TMacro = AnsiString; { used as buffer (array of char) } + {$IFDEF UNICODE} + TEditCommand = type LongWord; + {$ELSE} + TEditCommand = type Word; + {$ENDIF UNICODE} + TMacro = string; { used as buffer (array of char) } TJvEditKey = class(TObject) public @@ -275,15 +279,15 @@ Shift1: TShiftState; Shift2: TShiftState; Command: TEditCommand; - constructor Create(const ACommand: TEditCommand; const AKey1: Word; - const AShift1: TShiftState); - constructor Create2(const ACommand: TEditCommand; const AKey1: Word; - const AShift1: TShiftState; const AKey2: Word; - const AShift2: TShiftState); + constructor Create(const ACommand: TEditCommand; + const AKey1: Word; const AShift1: TShiftState); + constructor Create2(const ACommand: TEditCommand; + const AKey1: Word; const AShift1: TShiftState; + const AKey2: Word; const AShift2: TShiftState); end; TCommand2Event = procedure(Sender: TObject; const Key1: Word; const Shift1: TShiftState; - const Key2: Word; const Shift2: TShiftState; var Command: TEditCommand) of object; + const Key2: Word; const Shift2: TShiftState; var Command: TEditCommand) of object; TJvKeyboard = class(TPersistent) private @@ -293,13 +297,13 @@ constructor Create; destructor Destroy; override; procedure Assign(Source: TPersistent); override; - procedure Add(const ACommand: TEditCommand; const AKey1: Word; - const AShift1: TShiftState); - procedure Add2(const ACommand: TEditCommand; const AKey1: Word; - const AShift1: TShiftState; const AKey2: Word; - const AShift2: TShiftState); - procedure Add2Ctrl(const ACommand: TEditCommand; const AKey1: Word; - const AShift1: TShiftState; const AKey2: Word); + procedure Add(const ACommand: TEditCommand; + const AKey1: Word; const AShift1: TShiftState); + procedure Add2(const ACommand: TEditCommand; + const AKey1: Word; const AShift1: TShiftState; + const AKey2: Word; const AShift2: TShiftState); + procedure Add2Ctrl(const ACommand: TEditCommand; + const AKey1: Word; const AShift1: TShiftState; const AKey2: Word); procedure Remove(const AKey1: Word; const AShift1: TShiftState); procedure Remove2(const AKey1: Word; const AShift1: TShiftState; const AKey2: Word; const AShift2: TShiftState); @@ -1250,10 +1254,17 @@ { Editor commands } { When add new commands, please add them into JvInterpreter_JvEditor.pas unit also ! } ecCharFirst = $00; + {$IFDEF UNICODE} + ecCharLast = $FFFF; + ecCommandFirst = $10000; + ecIntern = $400000; { use on internal updates } + ecUser = $800000; { use this for descendants } + {$ELSE} ecCharLast = $FF; ecCommandFirst = $100; ecIntern = $1000; { use on internal updates } ecUser = $8000; { use this for descendants } + {$ENDIF UNICODE} {Cursor} ecLeft = ecCommandFirst + 1; @@ -1362,7 +1373,7 @@ ecBeginRecord = ecRecordMacro + 2; ecEndRecord = ecRecordMacro + 3; - twoKeyCommand = High(Word); + twoKeyCommand = High(TEditCommand); function KeyPressed(VK: Integer): Boolean; @@ -3317,7 +3328,7 @@ procedure TJvCustomEditorBase.KeyDown(var Key: Word; Shift: TShiftState); var - Com: Word; + Com: TEditCommand; begin PaintCaret(False); try @@ -5017,7 +5028,11 @@ I := 1; while I < Length(AMacro) do begin + {$IFDEF UNICODE} + Command(Word(AMacro[I]) + Word(AMacro[I + 1]) shl 16); + {$ELSE} Command(Byte(AMacro[I]) + Byte(AMacro[I + 1]) shl 8); + {$ENDIF UNICODE} Inc(I, 2); end; finally @@ -5336,7 +5351,13 @@ // LockUpdate; { macro recording } if Recording and not Com([ecRecordMacro, ecBeginCompound]) and (Compound = 0) then + begin + {$IFDEF UNICODE} + FMacro := FMacro + Char(LoWord(ACommand)) + Char(HiWord(ACommand)); + {$ELSE} FMacro := FMacro + AnsiChar(Lo(ACommand)) + AnsiChar(Hi(ACommand)); + {$ENDIF UNICODE} + end; PaintCaret(False); try @@ -6486,4 +6507,4 @@ UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} -end. \ No newline at end of file +end. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2010-03-16 22:20:51
|
Revision: 12726 http://jvcl.svn.sourceforge.net/jvcl/?rev=12726&view=rev Author: ahuser Date: 2010-03-16 22:20:45 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Mantis #5134: No text in autocomplete dialog for TJvEditor and descendants in D2010 on Vista Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2010-03-16 22:12:27 UTC (rev 12725) +++ trunk/jvcl/run/JvEditorCommon.pas 2010-03-16 22:20:45 UTC (rev 12726) @@ -6340,7 +6340,7 @@ FPopupList.ItemHeight := FItemHeight; FVisible := True; SetItemIndex(FItemIndex); - if FListBoxStyle in [lbStandard] then + if (FListBoxStyle in [lbStandard]) and Assigned(FJvEditor.OnCompletionDrawItem) then FPopupList.Style := lbOwnerDrawFixed else FPopupList.Style := FListBoxStyle; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2010-07-01 13:22:37
|
Revision: 12817 http://jvcl.svn.sourceforge.net/jvcl/?rev=12817&view=rev Author: ahuser Date: 2010-07-01 13:22:30 +0000 (Thu, 01 Jul 2010) Log Message: ----------- Fixed memory overwrite in WM_GETTEXT due to wrong GetTextLen result Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2010-06-28 11:30:11 UTC (rev 12816) +++ trunk/jvcl/run/JvEditorCommon.pas 2010-07-01 13:22:30 UTC (rev 12817) @@ -5324,7 +5324,6 @@ Result := 0; for I := 0 to LineCount - 1 do Inc(Result, LineLength[I] + sLineBreakLen); - Dec(Result, sLineBreakLen); end; procedure TJvCustomEditorBase.BeginUpdate; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2012-08-16 17:33:44
|
Revision: 13398 http://jvcl.svn.sourceforge.net/jvcl/?rev=13398&view=rev Author: ahuser Date: 2012-08-16 17:33:38 +0000 (Thu, 16 Aug 2012) Log Message: ----------- Fixed access violation when editor was destroyed and the VCL wants to backup the WindowText. Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2012-08-16 17:23:19 UTC (rev 13397) +++ trunk/jvcl/run/JvEditorCommon.pas 2012-08-16 17:33:38 UTC (rev 13398) @@ -2793,7 +2793,7 @@ var S: string; begin - if Msg.Text = nil then + if (Msg.Text = nil) or (csDestroying in ComponentState) then // stupid VCL wants to save the WindowText when the control is released Msg.Result := 0 else begin @@ -2806,7 +2806,10 @@ procedure TJvCustomEditorBase.WMGetTextLength(var Msg: TMessage); begin - Msg.Result := GetTextLen; + if csDestroying in ComponentState then // stupid VCL wants to save the WindowText when the control is released + Msg.Result := 0 + else + Msg.Result := GetTextLen; end; procedure TJvCustomEditorBase.UpdateEditorSize; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2013-05-07 06:23:39
|
Revision: 13507 http://jvcl.svn.sourceforge.net/jvcl/?rev=13507&view=rev Author: ahuser Date: 2013-05-07 06:23:30 +0000 (Tue, 07 May 2013) Log Message: ----------- Fixed Undo-Objects memory leak Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2013-04-30 05:30:59 UTC (rev 13506) +++ trunk/jvcl/run/JvEditorCommon.pas 2013-05-07 06:23:30 UTC (rev 13507) @@ -361,6 +361,7 @@ FJvEditor: TJvCustomEditorBase; FPtr: Integer; InUndo: Boolean; + FDiscardList: TObjectList; function LastUndo: TJvUndo; function IsNewGroup(AUndo: TJvUndo): Boolean; function CanRedo: Boolean; @@ -1436,7 +1437,12 @@ procedure TJvUndoBuffer.Add(AUndo: TJvUndo); begin if InUndo then + begin + if FDiscardList = nil then + FDiscardList := TObjectList.Create; + FDiscardList.Add(AUndo); Exit; + end; ClearRedo; inherited Add(AUndo); FPtr := Count - 1; @@ -1527,6 +1533,7 @@ FJvEditor.StatusChanged; end; finally + FreeAndNil(FDiscardList); InUndo := False; end; end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ah...@us...> - 2013-05-15 06:53:41
|
Revision: 13512 http://jvcl.svn.sourceforge.net/jvcl/?rev=13512&view=rev Author: ahuser Date: 2013-05-15 06:53:34 +0000 (Wed, 15 May 2013) Log Message: ----------- Only a part of a word was selected if another application had the focus when dbl-clicking on the editor Modified Paths: -------------- trunk/jvcl/run/JvEditorCommon.pas Modified: trunk/jvcl/run/JvEditorCommon.pas =================================================================== --- trunk/jvcl/run/JvEditorCommon.pas 2013-05-14 21:38:20 UTC (rev 13511) +++ trunk/jvcl/run/JvEditorCommon.pas 2013-05-15 06:53:34 UTC (rev 13512) @@ -3524,6 +3524,7 @@ pt: TPoint; XX, YY: Integer; begin + FSelection.Selecting := False; // may be true from a MouseDown+MouseMove, if another application had the focus when dbl-clicking on the editor FDoubleClick := True; if Assigned(FOnDblClick) then FOnDblClick(Self); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |