mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
* Bugfix: fix issue #717.
* Rely on IsFloat instead of a more obscure check to determine float values.
This commit is contained in:
@ -920,7 +920,7 @@ begin
|
|||||||
// Remove 0x.
|
// Remove 0x.
|
||||||
if GridData.Columns[i].IsBinary then Delete(Data, 1, 2);
|
if GridData.Columns[i].IsBinary then Delete(Data, 1, 2);
|
||||||
// Unformat float values
|
// Unformat float values
|
||||||
if Grid.Header.Columns[i].Alignment = taRightJustify then Data := FloatStr(Data);
|
if GridData.Columns[i].IsFloat then Data := FloatStr(Data);
|
||||||
// Escape encloser characters inside data per de-facto CSV.
|
// Escape encloser characters inside data per de-facto CSV.
|
||||||
Data := WideStringReplace(Data, Encloser, Encloser + Encloser, [rfReplaceAll]);
|
Data := WideStringReplace(Data, Encloser, Encloser + Encloser, [rfReplaceAll]);
|
||||||
// Special handling for NULL (MySQL-ism, not de-facto CSV: unquote value)
|
// Special handling for NULL (MySQL-ism, not de-facto CSV: unquote value)
|
||||||
@ -971,18 +971,19 @@ begin
|
|||||||
Continue;
|
Continue;
|
||||||
// Print cell start tag.
|
// Print cell start tag.
|
||||||
tmp := tmp + #9#9'<' + Grid.Header.Columns[i].Text;
|
tmp := tmp + #9#9'<' + Grid.Header.Columns[i].Text;
|
||||||
|
// Ensure basic data is loaded.
|
||||||
|
Mainform.Childwin.EnsureDataLoaded(Grid, Node);
|
||||||
if GridData.Rows[Node.Index].Cells[i].IsNull then tmp := tmp + ' isnull="true" />' + CRLF
|
if GridData.Rows[Node.Index].Cells[i].IsNull then tmp := tmp + ' isnull="true" />' + CRLF
|
||||||
else begin
|
else begin
|
||||||
if GridData.Columns[i].IsBinary then tmp := tmp + ' format="hex"';
|
if GridData.Columns[i].IsBinary then tmp := tmp + ' format="hex"';
|
||||||
tmp := tmp + '>';
|
tmp := tmp + '>';
|
||||||
// Ensure basic data is loaded and load remainder of large fields.
|
// Load remainder of large fields.
|
||||||
Mainform.Childwin.EnsureDataLoaded(Grid, Node);
|
|
||||||
Mainform.Childwin.EnsureFullWidth(Grid, i, Node);
|
Mainform.Childwin.EnsureFullWidth(Grid, i, Node);
|
||||||
Data := Grid.Text[Node, i];
|
Data := Grid.Text[Node, i];
|
||||||
// Remove 0x.
|
// Remove 0x.
|
||||||
if GridData.Columns[i].IsBinary then Delete(Data, 1, 2);
|
if GridData.Columns[i].IsBinary then Delete(Data, 1, 2);
|
||||||
// Unformat float values
|
// Unformat float values
|
||||||
if Grid.Header.Columns[i].Alignment = taRightJustify then Data := FloatStr(Data);
|
if GridData.Columns[i].IsFloat then Data := FloatStr(Data);
|
||||||
// Escape XML control characters in data.
|
// Escape XML control characters in data.
|
||||||
Data := htmlentities(Data);
|
Data := htmlentities(Data);
|
||||||
// Add data and cell end tag.
|
// Add data and cell end tag.
|
||||||
|
Reference in New Issue
Block a user