diff --git a/applications/spready/scsvparamsform.pas b/applications/spready/scsvparamsform.pas index b23f60325..4404b1a87 100644 --- a/applications/spready/scsvparamsform.pas +++ b/applications/spready/scsvparamsform.pas @@ -94,7 +94,7 @@ implementation {$R *.lfm} uses - LConvEncoding, fpsUtils; + LConvEncoding, fpsUtils, sUtils; resourcestring rsLikeSpreadsheet = 'like spreadsheet'; @@ -134,7 +134,7 @@ var arr: Array[1..12] of String; i: Integer; begin - fs := UTF8FormatSettings; + InitUTF8FormatSettings(fs); if CbLongDateFormat.ItemIndex <> 0 then fs.LongDateFormat := CbLongDateFormat.Text; if CbShortDateFormat.ItemIndex <> 0 then diff --git a/applications/spready/smain.lfm b/applications/spready/smain.lfm index df6e1f539..34d1735c4 100644 --- a/applications/spready/smain.lfm +++ b/applications/spready/smain.lfm @@ -347,7 +347,7 @@ object MainForm: TMainForm Width = 130 WorkbookSource = WorkbookSource DropDownCount = 24 - ItemIndex = 46 + ItemIndex = 49 TabOrder = 0 Text = 'Arial' end @@ -873,7 +873,7 @@ object MainForm: TMainForm Category = 'FPSpreadsheet' WorkbookSource = WorkbookSource Caption = 'Fraction (1 digit)' - Hint = 'Fraction with 1-digit numbers' + Hint = 'Fraction (1 digit)' NumberFormat = nfFraction NumberFormatString = '# ?/?' end @@ -881,7 +881,7 @@ object MainForm: TMainForm Category = 'FPSpreadsheet' WorkbookSource = WorkbookSource Caption = 'Fraction (2 digits)' - Hint = 'Fraction with 2-digit numbers' + Hint = 'Fraction (2 digits)' NumberFormat = nfFraction NumberFormatString = '# ??/??' end @@ -889,7 +889,7 @@ object MainForm: TMainForm Category = 'FPSpreadsheet' WorkbookSource = WorkbookSource Caption = 'Fraction (3 digits)' - Hint = 'Fraction with 3-digit numbers' + Hint = 'Fraction (3 digits)' NumberFormat = nfFraction NumberFormatString = '# ???/???' end diff --git a/applications/spready/smain.pas b/applications/spready/smain.pas index 4a65d8247..8e9149acf 100644 --- a/applications/spready/smain.pas +++ b/applications/spready/smain.pas @@ -502,7 +502,7 @@ uses fpsUtils, fpsCSV, fpsReaderWriter, sCSVParamsForm, sCurrencyForm, sFormatSettingsForm, sSortParamsForm, sHyperlinkForm, sNumFormatForm, sSearchForm, sColWidthForm, sRowHeightForm, - sWorksheetProtection, sAbout; + sWorksheetProtection, sAbout, sUtils; var SEARCH_DLG_POS: TPoint = (X: -1; Y: -1); diff --git a/applications/spready/spready.lpi b/applications/spready/spready.lpi index 39678ad1f..e489f1a40 100644 --- a/applications/spready/spready.lpi +++ b/applications/spready/spready.lpi @@ -198,7 +198,7 @@ - + @@ -217,6 +217,9 @@ + + + diff --git a/applications/spready/sutils.pas b/applications/spready/sutils.pas index 628dc27fa..cf44f6c9f 100644 --- a/applications/spready/sutils.pas +++ b/applications/spready/sutils.pas @@ -5,18 +5,30 @@ unit sutils; interface uses + SysUtils, 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 GetFontAsString(AFont: TsFont): String; implementation +uses + fpsstrings, fpsNumFormat; + {@@ ---------------------------------------------------------------------------- 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; var rgba: TRGBA absolute AColor; @@ -29,7 +41,7 @@ begin scBlueGray : Result := rsBlueGray; scBrown : Result := rsBrown; scCoral : Result := rsCoral; - scCyan : Result := rsCyan; + //scCyan : Result := rsCyan; scDarkBlue : Result := rsDarkBlue; scDarkGreen : Result := rsDarkGreen; scDarkPurple : Result := rsDarkPurple; @@ -51,9 +63,9 @@ begin scLightOrange: Result := rsLightOrange; scLightTurquoise: Result := rsLightTurquoise; scLightYellow: Result := rsLightYellow; - scLime : Result := rsLime; +// scLime : Result := rsLime; scMagenta : Result := rsMagenta; - scNavy : Result := rsNavy; +// scNavy : Result := rsNavy; scOceanBlue : Result := rsOceanBlue; scOlive : Result := rsOlive; scOliveGreen : Result := rsOliveGreen; @@ -88,7 +100,7 @@ begin end; end; end; - +(* {@@ ---------------------------------------------------------------------------- Returns a string describing the cell format with the specified index. -------------------------------------------------------------------------------} @@ -100,6 +112,7 @@ var numFmt: TsNumFormatParams; begin Result := ''; + fmt := GetPointerToCellFormat(AIndex); if fmt = nil then exit; @@ -141,6 +154,7 @@ begin Result := Format('%s; %s', [Result, GetEnumName(TypeInfo(TsBiDiMode), ord(fmt^.BiDiMode))]); if Result <> '' then Delete(Result, 1, 2); end; +*) {@@ ---------------------------------------------------------------------------- Returns a string which identifies the font. @@ -163,4 +177,8 @@ begin Result := ''; end; + +initialization + InitUTF8FormatSettings(UTF8FormatSettings); + end.