From: Maël Hörz <ma...@us...> - 2009-06-14 14:11:47
|
Update of /cvsroot/synedit/SynEdit/Source In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14874 Modified Files: Tag: Unicode_2004_08_31 SynEdit.inc SynEditTextBuffer.pas Log Message: Merged minor updates from gexperts UniSynEdit version Index: SynEditTextBuffer.pas =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEditTextBuffer.pas,v retrieving revision 1.63.2.14 retrieving revision 1.63.2.15 diff -u -d -r1.63.2.14 -r1.63.2.15 --- SynEditTextBuffer.pas 17 Mar 2009 18:12:14 -0000 1.63.2.14 +++ SynEditTextBuffer.pas 14 Jun 2009 13:41:44 -0000 1.63.2.15 @@ -601,30 +601,29 @@ end; function TSynEditStringList.GetTextStr: UnicodeString; + + procedure RemoveTrailingUnicodeLineBreak; + begin // The Delphi 2009+ RTL forces a trailing line break when getting the text, so we remove it + {$IFDEF UNICODE} + if Copy(Result, Length(Result) - Length(LineBreak) + 1, Length(LineBreak)) = LineBreak then + SetLength(Result, Length(Result) - Length(LineBreak)); + {$ENDIF} + end; + var SLineBreak: UnicodeString; begin if not FStreaming then begin Result := inherited GetTextStr; -{$IFDEF UNICODE} - if copy(Result, Length(Result) - Length(LineBreak) + 1, Length(LineBreak)) = - LineBreak then - begin - SetLength(Result, Length(Result) - Length(LineBreak)); - end; -{$ENDIF} + RemoveTrailingUnicodeLineBreak; end else begin {$IFDEF UNICODE} SLineBreak := LineBreak; Result := inherited GetTextStr; - if copy(Result, Length(Result) - Length(LineBreak) + 1, Length(LineBreak)) = - LineBreak then - begin - SetLength(Result, Length(Result) - Length(LineBreak)); - end; + RemoveTrailingUnicodeLineBreak; {$ELSE} case FileFormat of sffDos: Index: SynEdit.inc =================================================================== RCS file: /cvsroot/synedit/SynEdit/Source/SynEdit.inc,v retrieving revision 1.16.2.18 retrieving revision 1.16.2.19 diff -u -d -r1.16.2.18 -r1.16.2.19 --- SynEdit.inc 6 Jan 2009 16:26:01 -0000 1.16.2.18 +++ SynEdit.inc 14 Jun 2009 13:41:44 -0000 1.16.2.19 @@ -76,6 +76,8 @@ (* SYN_DELPHI_2007_UP : Delphi 2007 or higher is being used. *) (* SYN_DELPHI_2009 : Delphi 2009 is being used. *) (* SYN_DELPHI_2009_UP : Delphi 2009 or higher is being used. *) +(* SYN_DELPHI_2010 : Delphi 2010 is being used. *) +(* SYN_DELPHI_2010_UP : Delphi 2010 or higher is being used. *) (* SYN_KYLIX : Kylix 1.0 is being using. *) (* SYN_CLX : A CLX application is being created. *) (******************************************************************************) @@ -122,6 +124,12 @@ { VERXXX to SYN_COMPILERX, SYN_DELPHIX and SYN_CPPBX mappings } {------------------------------------------------------------------------------} +{$IFDEF VER210} + {$DEFINE SYN_COMPILER_14} + {$DEFINE SYN_DELPHI} + {$DEFINE SYN_DELPHI_2010} +{$ENDIF} + {$IFDEF VER200} {$DEFINE SYN_COMPILER_12} {$DEFINE SYN_DELPHI} @@ -331,6 +339,22 @@ {$DEFINE SYN_COMPILER_12_UP} {$ENDIF} +{$IFDEF SYN_COMPILER_14} + {$DEFINE SYN_COMPILER_1_UP} + {$DEFINE SYN_COMPILER_2_UP} + {$DEFINE SYN_COMPILER_3_UP} + {$DEFINE SYN_COMPILER_4_UP} + {$DEFINE SYN_COMPILER_5_UP} + {$DEFINE SYN_COMPILER_6_UP} + {$DEFINE SYN_COMPILER_7_UP} + {$DEFINE SYN_COMPILER_8_UP} + {$DEFINE SYN_COMPILER_9_UP} + {$DEFINE SYN_COMPILER_10_UP} + {$DEFINE SYN_COMPILER_11_UP} + {$DEFINE SYN_COMPILER_12_UP} + {$DEFINE SYN_COMPILER_14_UP} +{$ENDIF} + {$IFDEF SYN_DELPHI_2} {$DEFINE SYN_DELPHI_2_UP} {$ENDIF} @@ -430,6 +454,21 @@ {$DEFINE SYN_DELPHI_2009_UP} {$ENDIF} +{$IFDEF SYN_DELPHI_2010} + {$DEFINE SYN_DELPHI_2_UP} + {$DEFINE SYN_DELPHI_3_UP} + {$DEFINE SYN_DELPHI_4_UP} + {$DEFINE SYN_DELPHI_5_UP} + {$DEFINE SYN_DELPHI_6_UP} + {$DEFINE SYN_DELPHI_7_UP} + {$DEFINE SYN_DELPHI_8_UP} + {$DEFINE SYN_DELPHI_2005_UP} + {$DEFINE SYN_DELPHI_2006_UP} + {$DEFINE SYN_DELPHI_2007_UP} + {$DEFINE SYN_DELPHI_2009_UP} + {$DEFINE SYN_DELPHI_20010_UP} +{$ENDIF} + {$IFDEF SYN_CPPB_6} {$DEFINE SYN_CPPB_3_UP} {$DEFINE SYN_CPPB_4_UP} |