You've already forked lazarus-ccr
spready: Adapt to changes in fpspreadsheet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6582 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -94,7 +94,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LConvEncoding, fpsUtils;
|
LConvEncoding, fpsUtils, sUtils;
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
rsLikeSpreadsheet = 'like spreadsheet';
|
rsLikeSpreadsheet = 'like spreadsheet';
|
||||||
@ -134,7 +134,7 @@ var
|
|||||||
arr: Array[1..12] of String;
|
arr: Array[1..12] of String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
fs := UTF8FormatSettings;
|
InitUTF8FormatSettings(fs);
|
||||||
if CbLongDateFormat.ItemIndex <> 0 then
|
if CbLongDateFormat.ItemIndex <> 0 then
|
||||||
fs.LongDateFormat := CbLongDateFormat.Text;
|
fs.LongDateFormat := CbLongDateFormat.Text;
|
||||||
if CbShortDateFormat.ItemIndex <> 0 then
|
if CbShortDateFormat.ItemIndex <> 0 then
|
||||||
|
@ -347,7 +347,7 @@ object MainForm: TMainForm
|
|||||||
Width = 130
|
Width = 130
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
DropDownCount = 24
|
DropDownCount = 24
|
||||||
ItemIndex = 46
|
ItemIndex = 49
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'Arial'
|
Text = 'Arial'
|
||||||
end
|
end
|
||||||
@ -873,7 +873,7 @@ object MainForm: TMainForm
|
|||||||
Category = 'FPSpreadsheet'
|
Category = 'FPSpreadsheet'
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Caption = 'Fraction (1 digit)'
|
Caption = 'Fraction (1 digit)'
|
||||||
Hint = 'Fraction with 1-digit numbers'
|
Hint = 'Fraction (1 digit)'
|
||||||
NumberFormat = nfFraction
|
NumberFormat = nfFraction
|
||||||
NumberFormatString = '# ?/?'
|
NumberFormatString = '# ?/?'
|
||||||
end
|
end
|
||||||
@ -881,7 +881,7 @@ object MainForm: TMainForm
|
|||||||
Category = 'FPSpreadsheet'
|
Category = 'FPSpreadsheet'
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Caption = 'Fraction (2 digits)'
|
Caption = 'Fraction (2 digits)'
|
||||||
Hint = 'Fraction with 2-digit numbers'
|
Hint = 'Fraction (2 digits)'
|
||||||
NumberFormat = nfFraction
|
NumberFormat = nfFraction
|
||||||
NumberFormatString = '# ??/??'
|
NumberFormatString = '# ??/??'
|
||||||
end
|
end
|
||||||
@ -889,7 +889,7 @@ object MainForm: TMainForm
|
|||||||
Category = 'FPSpreadsheet'
|
Category = 'FPSpreadsheet'
|
||||||
WorkbookSource = WorkbookSource
|
WorkbookSource = WorkbookSource
|
||||||
Caption = 'Fraction (3 digits)'
|
Caption = 'Fraction (3 digits)'
|
||||||
Hint = 'Fraction with 3-digit numbers'
|
Hint = 'Fraction (3 digits)'
|
||||||
NumberFormat = nfFraction
|
NumberFormat = nfFraction
|
||||||
NumberFormatString = '# ???/???'
|
NumberFormatString = '# ???/???'
|
||||||
end
|
end
|
||||||
|
@ -502,7 +502,7 @@ uses
|
|||||||
fpsUtils, fpsCSV, fpsReaderWriter,
|
fpsUtils, fpsCSV, fpsReaderWriter,
|
||||||
sCSVParamsForm, sCurrencyForm, sFormatSettingsForm, sSortParamsForm,
|
sCSVParamsForm, sCurrencyForm, sFormatSettingsForm, sSortParamsForm,
|
||||||
sHyperlinkForm, sNumFormatForm, sSearchForm, sColWidthForm, sRowHeightForm,
|
sHyperlinkForm, sNumFormatForm, sSearchForm, sColWidthForm, sRowHeightForm,
|
||||||
sWorksheetProtection, sAbout;
|
sWorksheetProtection, sAbout, sUtils;
|
||||||
|
|
||||||
var
|
var
|
||||||
SEARCH_DLG_POS: TPoint = (X: -1; Y: -1);
|
SEARCH_DLG_POS: TPoint = (X: -1; Y: -1);
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
</Linking>
|
</Linking>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<Exceptions Count="6">
|
<Exceptions Count="7">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Name Value="EAbort"/>
|
<Name Value="EAbort"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
@ -217,6 +217,9 @@
|
|||||||
<Item6>
|
<Item6>
|
||||||
<Name Value="EFpSpreadsheet"/>
|
<Name Value="EFpSpreadsheet"/>
|
||||||
</Item6>
|
</Item6>
|
||||||
|
<Item7>
|
||||||
|
<Name Value="EFpSpreadsheetReader"/>
|
||||||
|
</Item7>
|
||||||
</Exceptions>
|
</Exceptions>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -5,18 +5,30 @@ unit sutils;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
SysUtils,
|
||||||
fpstypes, fpspreadsheet;
|
fpstypes, fpspreadsheet;
|
||||||
|
|
||||||
function GetCellFormatAsString(AWorkbook: TsWorkbook; AIndex: Integer): String;
|
var
|
||||||
|
UTF8FormatSettings: TFormatSettings;
|
||||||
|
|
||||||
|
//function GetCellFormatAsString(AWorkbook: TsWorkbook; AIndex: Integer): String;
|
||||||
function GetColorName(AColor: TsColor): String;
|
function GetColorName(AColor: TsColor): String;
|
||||||
function GetFontAsString(AFont: TsFont): String;
|
function GetFontAsString(AFont: TsFont): String;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
fpsstrings, fpsNumFormat;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Determines the name of a color from its rgb value
|
Determines the name of a color from its rgb value
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
|
type
|
||||||
|
TRGBA = packed record
|
||||||
|
R, G, B, A: byte;
|
||||||
|
end;
|
||||||
|
|
||||||
function GetColorName(AColor: TsColor): string;
|
function GetColorName(AColor: TsColor): string;
|
||||||
var
|
var
|
||||||
rgba: TRGBA absolute AColor;
|
rgba: TRGBA absolute AColor;
|
||||||
@ -29,7 +41,7 @@ begin
|
|||||||
scBlueGray : Result := rsBlueGray;
|
scBlueGray : Result := rsBlueGray;
|
||||||
scBrown : Result := rsBrown;
|
scBrown : Result := rsBrown;
|
||||||
scCoral : Result := rsCoral;
|
scCoral : Result := rsCoral;
|
||||||
scCyan : Result := rsCyan;
|
//scCyan : Result := rsCyan;
|
||||||
scDarkBlue : Result := rsDarkBlue;
|
scDarkBlue : Result := rsDarkBlue;
|
||||||
scDarkGreen : Result := rsDarkGreen;
|
scDarkGreen : Result := rsDarkGreen;
|
||||||
scDarkPurple : Result := rsDarkPurple;
|
scDarkPurple : Result := rsDarkPurple;
|
||||||
@ -51,9 +63,9 @@ begin
|
|||||||
scLightOrange: Result := rsLightOrange;
|
scLightOrange: Result := rsLightOrange;
|
||||||
scLightTurquoise: Result := rsLightTurquoise;
|
scLightTurquoise: Result := rsLightTurquoise;
|
||||||
scLightYellow: Result := rsLightYellow;
|
scLightYellow: Result := rsLightYellow;
|
||||||
scLime : Result := rsLime;
|
// scLime : Result := rsLime;
|
||||||
scMagenta : Result := rsMagenta;
|
scMagenta : Result := rsMagenta;
|
||||||
scNavy : Result := rsNavy;
|
// scNavy : Result := rsNavy;
|
||||||
scOceanBlue : Result := rsOceanBlue;
|
scOceanBlue : Result := rsOceanBlue;
|
||||||
scOlive : Result := rsOlive;
|
scOlive : Result := rsOlive;
|
||||||
scOliveGreen : Result := rsOliveGreen;
|
scOliveGreen : Result := rsOliveGreen;
|
||||||
@ -88,7 +100,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
(*
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Returns a string describing the cell format with the specified index.
|
Returns a string describing the cell format with the specified index.
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
@ -100,6 +112,7 @@ var
|
|||||||
numFmt: TsNumFormatParams;
|
numFmt: TsNumFormatParams;
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
|
|
||||||
fmt := GetPointerToCellFormat(AIndex);
|
fmt := GetPointerToCellFormat(AIndex);
|
||||||
if fmt = nil then
|
if fmt = nil then
|
||||||
exit;
|
exit;
|
||||||
@ -141,6 +154,7 @@ begin
|
|||||||
Result := Format('%s; %s', [Result, GetEnumName(TypeInfo(TsBiDiMode), ord(fmt^.BiDiMode))]);
|
Result := Format('%s; %s', [Result, GetEnumName(TypeInfo(TsBiDiMode), ord(fmt^.BiDiMode))]);
|
||||||
if Result <> '' then Delete(Result, 1, 2);
|
if Result <> '' then Delete(Result, 1, 2);
|
||||||
end;
|
end;
|
||||||
|
*)
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Returns a string which identifies the font.
|
Returns a string which identifies the font.
|
||||||
@ -163,4 +177,8 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
initialization
|
||||||
|
InitUTF8FormatSettings(UTF8FormatSettings);
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user