mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Replace TSMDBGrid in Data + Query tabs by TTntDBGrid.
- Implement an alternative solution for handling sorted columns without usage of SMDBGrid's sortcolumns. Move relevant structures and functions from data_sorting.pas to childwin.pas and use them in both units. - Upgrade some code parts to use WideStrings instead of Strings so they don't break with the new grid. - Use Grid.OnDrawDataCell as an alternative to Grid.OnGetCellParams as the latter one is a feature of SMDBGrid - Cosmetic: enhance screen real estate in viewdata()
This commit is contained in:
@ -32,7 +32,7 @@ type
|
||||
function implodestr(seperator: String; a: TStringList) :String;
|
||||
function explode(separator, a: String) :TStringList;
|
||||
procedure ensureValidIdentifier(name: String);
|
||||
function getEnumValues(str: String):String;
|
||||
function getEnumValues(str: WideString): WideString;
|
||||
function IsValidDelimiter(var s: string): string;
|
||||
type TParseSQLProcessCommand = procedure(command: String; parameter: String) of object;
|
||||
function parsesql(sql: String; delimiter: String; processcommand: TParseSQLProcessCommand = nil) : TStringList;
|
||||
@ -284,7 +284,7 @@ end;
|
||||
@param string Type definition, fx: enum('Y','N')
|
||||
@return string Content of brackets
|
||||
}
|
||||
function getEnumValues(str: String):String;
|
||||
function getEnumValues(str: WideString): WideString;
|
||||
var
|
||||
p1,p2 : Integer;
|
||||
begin
|
||||
@ -293,7 +293,7 @@ begin
|
||||
// Only return something if opening bracket was found, otherwise empty string
|
||||
if p1 > 0 then
|
||||
begin
|
||||
for p2:=strlen(pchar(str)) downto 0 do
|
||||
for p2:=Length(str) downto 0 do
|
||||
if str[p2] = ')' then break;
|
||||
result := copy (str, p1+1, p2-p1-1);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user